{"repo":"lrstanley/bubblezone","free":true,"listed":false,"github":"https://github.com/lrstanley/bubblezone","clone":"git clone https://github.com/lrstanley/bubblezone.git","description":"helper utility for BubbleTea, allowing easy mouse event tracking","language":"Go","stars":901,"topics":["bubbletea","cli","go","tui","golang","lipgloss","terminal"],"license":"MIT","category":"cli-tools","readme_excerpt":":link: Table of Contents - Problem - Solution - Features - Usage - Examples - List example - Lipgloss full example - Tips - Overlapping markers - Use lipgloss.Width - MaxHeight and MaxWidth - Only scan at the root model - Organic shapes - Changes in v2 - Support &amp; Assistance - Contributing - License :x: Problem BubbleTea and lipgloss allow you to build extremely fast terminal interfaces, in a semantic and scalable way. Through abstracting layout, colors, events, and more, it's very easy to build a user-friendly application. BubbleTea also supports mouse events, either through the \"basic\" mouse events, like MouseButtonLeft , MouseButtonRight , MouseButtonWheelUp and MouseButtonWheelDown (and more), or through full motion tracking, allowing hover and mouse movement tracking. This works great for a single-component application, where the state is managed in one location. However, when you start expanding your application, where components have various children, and those children have children, calculating mouse events like MouseButtonLeft and MouseButtonRight and determining which component was clicked becomes complicated, and rather tedious. :heavy check mark: Solution BubbleZone is one solution to this problem. BubbleZone allows you to wrap your components in zero-printable-width (to not impact lipgloss.Width() calculations) identifiers. Additionally, there is a scan method that wraps the entire application, stores the offsets of those identifiers as zones , and then remo","default_branch":null,"files":null,"tree":[],"storefront":"/r/lrstanley","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lrstanley/bubblezone/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}