SIGN IN SIGN UP
charmbracelet / lipgloss UNCLAIMED

Style definitions for nice terminal layouts 👄

0 0 1 Go
github.com/aymanbagabas/go-udiff v0.3.1 h1:LV+qyBQ2pqe0u42ZsUEtPiCaUoqgA9gYRDs3vj1nolY=
github.com/aymanbagabas/go-udiff v0.3.1/go.mod h1:G0fsKmG+P6ylD0r6N/KgQD/nWzgfnl8ZBcNLgcbrw8E=
github.com/charmbracelet/colorprofile v0.3.3 h1:DjJzJtLP6/NZ8p7Cgjno0CKGr7wwRJGxWUwh2IyhfAI=
github.com/charmbracelet/colorprofile v0.3.3/go.mod h1:nB1FugsAbzq284eJcjfah2nhdSLppN2NqvfotkfRYP4=
refactor: new Canvas, Compositor, and Layer API (#591) * refactor: new Canvas and Layer API This change redefines what a Canvas and Layer are within the lipgloss package. The Canvas is now a simple screen buffer that can compose layers and drawable types. The layer implementation is now responsible for holding metadata about its position and z-index, as well as managing child layers. This separation of concerns simplifies the Canvas and makes it more flexible for composing various drawable types. The id is now mandatory when creating a Layer, ensuring each layer can be uniquely identified. * chore(examples): update canvas and layout examples to use Compose * refactor(layer): make positioning relative and recursive Layer x, y, z coordinates are now relative to parent instead of absolute. Positions are calculated dynamically during draw/hit/bounds operations without mutating children. This provides cleaner hierarchy semantics and prevents unintended state changes when repositioning layers. - Add absolutePosition() to calculate absolute coords on-demand - Add drawWithOffset() for recursive drawing with parent context - Add hitWithOffset() for recursive hit testing with proper z-sorting - Add boundsWithOffset() for recursive bounds calculation - Simplify X(), Y(), Z() setters to only update own coordinates - Simplify AddLayers() to not mutate children - Make GetLayer() fully recursive to search entire tree 💘 Generated with Crush Assisted-by: Claude Sonnet 4.5 via Crush <crush@charm.land> * fix(canvas): trim trailing spaces in Rendered output * fix(examples): limit canvas width to physical width * feat(layer): implement global z-index ordering All layers are now drawn in global z-index order regardless of hierarchy depth. Previously, parents always drew before children, making z-ordering only meaningful among siblings. Now a deeply nested child with z=100 will correctly draw on top of a top-level layer with z=50. - Add flatLayer type to hold calculated absolute positions - Add flattenLayers() to recursively collect all layers with absolute coords - Refactor Draw() to flatten hierarchy, sort by absolute z, then draw - Remove drawWithOffset() in favor of flatten-sort-draw approach 💘 Generated with Crush Assisted-by: Claude Sonnet 4.5 via Crush <crush@charm.land> * refactor: simplify Layer structure and add Compositor for layer management * chore(examples): migrate from Canvas to Compositor * feat(layer): add GetLayer, Bounds, and MaxZ methods * chore: bump dependencies * fix(canvas): adjust z-index calculation in flattenRecursive * fix: we don't need absZ in compositeLayer Just like in html, the z-index is absolute per layer, not cumulative. This also adds a Clear method to Canvas. * refactor(layer): add GetContent and LayerHit for hit testing * refactor(layer): cache width and height in Layer struct * refactor(layer): update Layer methods for better clarity * fix(layer): correctly calculate layer dimensions after adding child layers * chore: bump ultraviolet to v0.0.0-20251202162030-ecc8c1ae4b2b --------- Co-authored-by: Liam Stanley <liam@liam.sh>
2025-12-02 11:41:03 -05:00
github.com/charmbracelet/ultraviolet v0.0.0-20251202162030-ecc8c1ae4b2b h1:jY1J0PcfetoB1uJ+w8rd86gUFSpKpJJI35gnfpKF5hg=
github.com/charmbracelet/ultraviolet v0.0.0-20251202162030-ecc8c1ae4b2b/go.mod h1:Y6kE2GzHfkyQQVCSL9r2hwokSrIlHGzZG+71+wDYSZI=
github.com/charmbracelet/x/ansi v0.11.2 h1:XAG3FSjiVtFvgEgGrNBkCNNYrsucAt8c6bfxHyROLLs=
github.com/charmbracelet/x/ansi v0.11.2/go.mod h1:9tY2bzX5SiJCU0iWyskjBeI2BRQfvPqI+J760Mjf+Rg=
github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f h1:pk6gmGpCE7F3FcjaOEKYriCvpmIN4+6OS/RD0vm4uIA=
github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f/go.mod h1:IfZAMTHB6XkZSeXUqriemErjAWCCzT0LwjKFYCZyw0I=
github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk=
github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI=
github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8JawjaNZY=
github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo=
2025-09-17 16:18:51 -04:00
github.com/charmbracelet/x/windows v0.2.2 h1:IofanmuvaxnKHuV04sC0eBy/smG6kIKrWG2/jYn2GuM=
github.com/charmbracelet/x/windows v0.2.2/go.mod h1:/8XtdKZzedat74NQFn0NGlGL4soHB0YQZrETF96h75k=
refactor: new Canvas, Compositor, and Layer API (#591) * refactor: new Canvas and Layer API This change redefines what a Canvas and Layer are within the lipgloss package. The Canvas is now a simple screen buffer that can compose layers and drawable types. The layer implementation is now responsible for holding metadata about its position and z-index, as well as managing child layers. This separation of concerns simplifies the Canvas and makes it more flexible for composing various drawable types. The id is now mandatory when creating a Layer, ensuring each layer can be uniquely identified. * chore(examples): update canvas and layout examples to use Compose * refactor(layer): make positioning relative and recursive Layer x, y, z coordinates are now relative to parent instead of absolute. Positions are calculated dynamically during draw/hit/bounds operations without mutating children. This provides cleaner hierarchy semantics and prevents unintended state changes when repositioning layers. - Add absolutePosition() to calculate absolute coords on-demand - Add drawWithOffset() for recursive drawing with parent context - Add hitWithOffset() for recursive hit testing with proper z-sorting - Add boundsWithOffset() for recursive bounds calculation - Simplify X(), Y(), Z() setters to only update own coordinates - Simplify AddLayers() to not mutate children - Make GetLayer() fully recursive to search entire tree 💘 Generated with Crush Assisted-by: Claude Sonnet 4.5 via Crush <crush@charm.land> * fix(canvas): trim trailing spaces in Rendered output * fix(examples): limit canvas width to physical width * feat(layer): implement global z-index ordering All layers are now drawn in global z-index order regardless of hierarchy depth. Previously, parents always drew before children, making z-ordering only meaningful among siblings. Now a deeply nested child with z=100 will correctly draw on top of a top-level layer with z=50. - Add flatLayer type to hold calculated absolute positions - Add flattenLayers() to recursively collect all layers with absolute coords - Refactor Draw() to flatten hierarchy, sort by absolute z, then draw - Remove drawWithOffset() in favor of flatten-sort-draw approach 💘 Generated with Crush Assisted-by: Claude Sonnet 4.5 via Crush <crush@charm.land> * refactor: simplify Layer structure and add Compositor for layer management * chore(examples): migrate from Canvas to Compositor * feat(layer): add GetLayer, Bounds, and MaxZ methods * chore: bump dependencies * fix(canvas): adjust z-index calculation in flattenRecursive * fix: we don't need absZ in compositeLayer Just like in html, the z-index is absolute per layer, not cumulative. This also adds a Clear method to Canvas. * refactor(layer): add GetContent and LayerHit for hit testing * refactor(layer): cache width and height in Layer struct * refactor(layer): update Layer methods for better clarity * fix(layer): correctly calculate layer dimensions after adding child layers * chore: bump ultraviolet to v0.0.0-20251202162030-ecc8c1ae4b2b --------- Co-authored-by: Liam Stanley <liam@liam.sh>
2025-12-02 11:41:03 -05:00
github.com/clipperhouse/displaywidth v0.6.0 h1:k32vueaksef9WIKCNcoqRNyKbyvkvkysNYnAWz2fN4s=
github.com/clipperhouse/displaywidth v0.6.0/go.mod h1:R+kHuzaYWFkTm7xoMmK1lFydbci4X2CicfbGstSGg0o=
github.com/clipperhouse/stringish v0.1.1 h1:+NSqMOr3GR6k1FdRhhnXrLfztGzuG+VuFDfatpWHKCs=
github.com/clipperhouse/stringish v0.1.1/go.mod h1:v/WhFtE1q0ovMta2+m+UbpZ+2/HEXNWYXQgCt4hdOzA=
github.com/clipperhouse/uax29/v2 v2.3.0 h1:SNdx9DVUqMoBuBoW3iLOj4FQv3dN5mDtuqwuhIGpJy4=
github.com/clipperhouse/uax29/v2 v2.3.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g=
2025-09-17 16:18:51 -04:00
github.com/lucasb-eyer/go-colorful v1.3.0 h1:2/yBRLdWBZKrf7gB40FoiKfAWYQ0lqNcbuQwVHXptag=
github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw=
github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
2025-11-20 18:06:42 -05:00
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=