Ayman Bagabas
387f2d73e8
refactor: replace props map with struct fields
...
Use an int to store property existence and style struct fields to store
the actual values for each non-bool property.
Fixes: https://github.com/charmbracelet/lipgloss/pull/139
Fixes: https://github.com/charmbracelet/lipgloss/pull/141
2024-03-28 17:47:40 -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
Maas Lalani
4476263d05
Feature: Tables ( #218 )
...
* feat: tables
* fix(table): examples
* docs(table): `any` -> `string`
* chore: go mod tidy
* docs(table): update image
* fix(table): lint
* fix: remove binary
* chore: color adjustments to pokemon example (#231 )
* fix(table): support rendering empty data sets
* chore(table): simplify table's data interface
* fix(table): correct GoDoc + add doc comments to Data methods
---------
Co-authored-by: Christian Rocha <christian@rocha.is>
Co-authored-by: Christian Muehlhaeuser <muesli@gmail.com>
2023-10-10 10:27: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
nervo
1c1240fd65
docs: fix various typos ( #156 )
2022-11-08 10:55:11 +01: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
0f0a70603a
Improve some doc comments
2021-04-07 12:23:36 -04:00
Christian Rocha
bb42143109
Remove 'Color' suffix from border FG/BG API methods
...
This makes the border API better match the rest of the API. Also, the
'Color' part is implicit.
2021-04-07 12:23:36 -04:00
Kiyon
09613e226b
Fix typos in unset
2021-04-06 08:24:10 +02:00
Christian Rocha
cb8b96556e
Margins inherit background color
2021-03-30 22:15:28 -04:00
Christian Rocha
a47a89f4ae
Remove setting for underlining and striking whitespace
2021-03-26 10:36:23 -04:00
Christian Rocha
a3ab90a71c
Remove setting for not drawing trailing spaces
2021-03-26 09:30:54 -04:00
Christian Rocha
d7bd9ebc4f
Borders are back
2021-03-25 20:43:40 -04:00
Christian Rocha
7b5208a1cd
Add Height and MaxHeight properties
2021-03-24 14:42:45 -04:00
Christian Rocha
acd9df30a7
Change margin and padding APIs to closer match CSS
2021-03-24 13:55:43 -04:00
Christian Rocha
143b345c10
Add unsetter for the underlying string value
2021-03-24 12:59:09 -04:00
Christian Rocha
6bfa4297a0
Style.Inline and Style.MaxWidth no longer mutate the style
2021-03-17 14:27:09 -04:00
Christian Rocha
303947c10c
Implement the Stringer interface for the Style type
2021-03-17 14:27:09 -04:00
Christian Rocha
cbe446f299
GoDocs and GoDoc spelling corrections
2021-03-10 10:21:21 -05:00
Christian Rocha
228d50837b
Switch to a map-based implementation to make things less complicated
2021-03-08 09:00:42 -05:00
Christian Rocha
53b7cb3cdb
Rules for underlines/strikethroughs relating to spaces between words
2021-03-05 16:34:46 -05:00
Christian Rocha
4665de69d0
Rework renderer
2021-03-05 12:43:51 -05:00
Christian Rocha
def6454724
Remove some redundancy, rename some functions
2021-03-04 21:07:54 -05:00
Christian Rocha
fc6780cbaf
Add unsetters
2021-03-04 21:07:20 -05:00