Christian Rocha
0ee74a5a90
feat: non-interpolated colors, aka CompleteColor ( #100 )
...
* feat: add color types for specifying colors on a per-profile basis
* chore: remove go-colourful references
* fix: lint (#101 )
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
2022-08-30 13:38:15 -07:00
Christian Rocha
2cb1d4a5c1
docs(lint): update example code in GoDocs per new style standard
...
This revision was made automatically via 'golangci-lint run --fix'
2022-08-24 09:22:45 -07:00
Luka Markušić
f651363297
Fix height doc (width -> height)
2022-08-24 08:48:32 -07:00
Christian Rocha
81744becf3
chore(lint): remove magic numbers
2022-08-17 17:13:05 -07:00
Christian Rocha
1fb1fb9602
chore: drop go-colorful dependency (but it's a great lib)
2022-08-17 17:13:05 -07:00
Ismael Padilla
e8297c491f
Use ReplaceAll instead of Replace with n=-1
2022-07-14 23:03:04 +02:00
Christian Muehlhaeuser
a86f21a0ae
ci: add benchmark test for Style.Render
2022-04-07 04:02:10 +02:00
Brandon Fulljames
6b5dc18b3b
Clarify Inherit comment
2022-03-04 12:27:20 -05:00
Dusan Gligoric
3616f64fab
remove vet dir
2022-02-25 14:34:10 -05:00
Dusan Gligoric
74e01f672d
remove repeating code
2022-02-25 14:34:10 -05:00
Dusan Gligoric
75c95df92d
dont overwrite background when inheriting
2022-02-25 14:34:10 -05:00
Christian Muehlhaeuser
0c67c8c3bb
Protect against concurrent color profile access with a sync.RWMutex
2022-02-14 16:13:12 -05:00
Christian Rocha
514fa059f3
Fix and generally improve various doc comments
2022-02-14 11:43:23 -05:00
Dusan Gligoric
0a77f6374d
Add Value method ( #66 )
2022-02-14 15:57:02 +01:00
Ryan Plant
f05ca49b39
Fix JoinVertical behavior for non-edge non-center alignments
2022-02-08 13:02:30 -08:00
Christian Muehlhaeuser
526700ffe4
Use termenv to enable Windows virtual terminal processing
2022-02-08 12:47:44 -08:00
Christian Muehlhaeuser
0ba6420185
Use termenv's EnvColorProfile, which respects NO_COLOR and CLICOLOR_FORCE env vars
2022-02-06 04:18:22 +01:00
Christian Muehlhaeuser
8a90d5aa4b
Fix typo in AdaptiveColor's godoc comment
2022-02-06 03:05:13 +01:00
Christian Muehlhaeuser
bf2912e703
Bump termenv dependency
2022-02-04 05:13:08 +01:00
Christian Muehlhaeuser
b3934f5a81
Lazily detect background color setting
...
This change prevents Lipgloss from querying the terminal's background
color setting on init. Instead, the background color will get queried
the first time the setting gets accessed by HasDarkBackground, and the
result will be cached.
Furthermore SetHasDarkBackground(bool) has been added, which explicitly
sets a value and avoids the automatic detection from ever being run.
2022-02-04 05:03:02 +01:00
Christian Muehlhaeuser
024177a630
Bump termenv to v0.11.0
2022-01-31 22:31:00 +01:00
Christian Muehlhaeuser
7ec01f7542
Bump termenv to v0.10.0
2022-01-28 16:17:21 +01:00
Ayman Bagabas
5f55bc8eac
feat: sync lipgloss with git.charm.sh
2022-01-24 17:12:24 -05:00
Christian Muehlhaeuser
3e568c8b14
Add Go 1.17 build tags
2022-01-11 14:06:16 -05:00
Christian Muehlhaeuser
20656fd247
Add separate sets of hard- and soft-enforced linters
2022-01-11 14:06:16 -05:00
Stefan VanBuren
94046d357b
Fix README.md typo
2021-12-10 15:22:07 -05:00
Maas Lalani
87d191bbb7
doc: fix typos in README
2021-11-22 11:49:27 -05:00
Christian Rocha
43f7d86f20
Run go mod tidy on example so it'll run without any fuss
2021-10-15 18:44:46 -04:00
Christian Rocha
4f0d448967
Force-wrap strings that run wider than the width
2021-09-03 10:20:33 -04:00
Christian Rocha
7f051d0e92
Add HiddenBorder(), which renders a border comprised of spaces
...
HiddenBorder() can be useful if you want to remove a border but maintain
layout positioning. This said, you can still apply a background color to
a hidden border.
2021-08-19 15:36:14 -04: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 Muehlhaeuser
4b93de0799
Update linter config
2021-07-12 03:26:40 +02:00
Christian Rocha
4b96343a09
go mod tidy
2021-07-01 09:28:51 -04:00
Christian Rocha
a6ae7e925f
Update color profile test per termenv v0.9.0 update
2021-07-01 09:28:51 -04:00
Christian Rocha
093474ebdf
Bump termenv to v0.9.0
2021-07-01 09:28:51 -04:00
Christian Rocha
639b1fe3b8
Correct stringer interface example in README
2021-06-16 12:56:04 -04:00
Christian Muehlhaeuser
40b2c31765
Fix README examples for joins
2021-06-16 03:46:47 +02:00
Christian Rocha
c66ed10823
Bump go-runewidth to v0.0.13
2021-06-02 18:30:46 -04:00
Christian Rocha
117c27dc45
Add SetColorProfile for explicitly setting the color profile
2021-05-31 12:47:39 -04:00
Christian Rocha
66eb23093a
Add StyleRunes function for styling specific runes in a string
2021-05-25 14:06:45 -04:00
Christian Rocha
d9fae9f03a
For now, limit corners on border to a single rune
2021-04-29 09:59:44 -04:00
Christian Rocha
f5b1667a09
Adjust some instructional README copy
2021-04-29 09:59:44 -04:00
Christian Rocha
6064d52be1
Support for multi-rune borders
2021-04-29 09:59:44 -04:00
Christian Rocha
8a64d5c381
Bump go-runewidth to fix some emoji mis-measuring
2021-04-29 09:59:44 -04:00
Christian Rocha
36f851c815
Add some border documentation to the README
2021-04-29 09:59:44 -04:00
Christian Rocha
493d49e38a
Add info on measuring width/height to README + add Size helper function
2021-04-29 09:59:44 -04:00