Ayman Bagabas
f6f93348b0
feat: switch to term/ansi for text manipulation ( #268 )
...
* feat: switch to term/ansi for text manipulation
Use ANSI aware, wide characters support, uniseg backed term/ansi package
to calculate string widths, truncate, and wrap strings.
Related: https://github.com/muesli/reflow/pull/71
Fixes: https://github.com/charmbracelet/lipgloss/issues/258
Fixes: https://github.com/charmbracelet/lipgloss/issues/220
* Update get.go
2024-03-29 15:05:18 -04:00
Christian Rocha
d354842a40
feat: Style.Transform for altering strings at render time ( #232 )
...
* feat: Style.Transform for altering strings at render time
* feat: add `UnsetTransform`
---------
Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-11-27 14:33:38 -05:00
nervo
b0eb95dbc1
fix(border): both GetHorizontalBorderSize and GetVerticalBorderSize ( #225 )
2023-10-05 11:48:38 -04:00
nervo
2d2a577e2d
fix(border): GetBorderRightSize ( #224 )
2023-10-05 11:45:52 -04:00
Christian Rocha
df8b3fa1f2
feat: convert tabs to spaces with Style.TabWidth(int)
( #204 )
...
* feat: convert tabs to spaces with Style.TabWidth(int)
By default tabs will be converted to 4 spaces. To disable tab
conversion set Style.TabWidth(NoTabConversion).
2023-07-24 11:22:48 -04:00
Glenn Gonda
303724f7da
docs: fix typos and clean up comments ( #182 )
2023-03-12 11:04:42 +01:00
László GÖRÖG
d09532a91a
chore: unify get border size function names
2023-03-08 09:16:03 -05:00
Ayman Bagabas
b9c2626fe7
feat(renderer): use style renderer
...
lipgloss.Style now takes a renderer instance to be used to detect styles
and colors based on its termenv.Output and terminal
2023-02-09 11:59:54 -05:00
nervo
1c1240fd65
docs: fix various typos ( #156 )
2022-11-08 10:55:11 +01:00
Will Winder
3dd9f0bfb8
docs: minor fixes to comments
2022-10-15 15:40:38 -04:00
Maas Lalani
9852bb3017
feat: VerticalAlign
...
Add VerticalAlign, UnsetVerticalAlign, etc...
2022-09-06 14:11:09 -04:00
Christian Rocha
514fa059f3
Fix and generally improve various doc comments
2022-02-14 11:43:23 -05:00
Christian Rocha
a9b894aa07
Add Style.GetFrameSize(), improve border method naming
2021-08-19 15:26:30 -04:00
Christian Rocha
e1ec4e822e
Return a width of 0 for disabled border edges
2021-08-19 15:26:30 -04:00
Christian Rocha
3b4907dffe
Simplify how border styles are queried
2021-08-19 15:26:30 -04:00
Christian Rocha
0fe0960eaa
Add meta-getters for horizontal and vertical gaps
2021-08-19 15:26:30 -04:00
Christian Rocha
adee683da4
Add methods to query border widths
2021-08-19 15:26:30 -04:00
Christian Rocha
e71af71a23
Add getters for all style rules
2021-04-21 10:52:50 -04:00
Christian Rocha
9b77d4607b
Rename ColorType to TerminalColor
2021-03-30 22:19:38 -04:00
Christian Rocha
5b43b10fd6
Add utility for horizontally and vertically placing blocks in whitespace
2021-03-26 13:35:48 -04:00
Christian Rocha
d7bd9ebc4f
Borders are back
2021-03-25 20:43:40 -04:00
Christian Rocha
552799ac29
Improve NoColor primative
2021-03-18 14:34:39 -04:00
Christian Rocha
6bfa4297a0
Style.Inline and Style.MaxWidth no longer mutate the style
2021-03-17 14:27:09 -04:00