* fix: renderer race condition
Guard accessing the underlying Termenv output behind a mutex. Multiple goroutines can set/get the dark background color causing a race condition.
* fix: cache color profile and background
* docs: add comment
Guard accessing the underlying Termenv output behind a mutex. Multiple goroutines can set/get the dark background color causing a race condition.
Needs: https://github.com/muesli/termenv/pull/146
Creating a _new_ global termenv output clashes with the default global
termenv output leading the terminal to block and freeze.
Share the default termenv output with the global default lipgloss renderer.
* docs(readme): add some context to the examples
* docs(readme): revert to render-function-based initial example
* docs(readme): drop extraneous stringer usage
* docs(readme): copyedits
* docs(renderer): minor documentation improvements
* docs(readme): edit renderer section to focus on custom outputs
* docs(readme): for now just use SetString to illustrate stringer
* docs(readme): re-add Ayman's clever stringer example
* docs(examples): tidy up wish example
* docs(examples): improve wish example
* docs(examples): session is an io.Writer
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
* docs(examples): add missing pty argument
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
* docs(example): remove extra space
* fix(examples): use termenv output
---------
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
* Use lipgloss instances instead of a singleton global instance
* Deprecate (s Style).Render & (s Style).String
* Deprecate the Stringer interface
* Update README and godocs
* Update example