%txt should be reserved for chunks of pasted text and other
non-keystroke text inputs. Perhaps at a later point in time we'll handle
paste events explicitly, letting this be more accurate.
- only resize when necessary (check the container's height)
- refactor CSS: use position relative / absolute to stack Buffers instead of display:none; this affects the calcuations used by fit()
- fix dark mode styles, tweak viewport height (100vh --> 99vh) to prevent overflow scroller
- debounced resize event listener
- new Buffer#onSelect: resize, focus, and pokes `herm` with updated rows / cols
- simplify container ref implementation (no need for a callback ref), remove isOpen hack
- add lodash for debounce
- Tab#onClick no longer handles focus (it's now handled by Buffer#onSelect)
Having the origin at the top left instead of the bottom left is more
conventional and ergonomic. The only thing this complicates is
prompt-specific logic, where we care about the coordinates of the
bottom-most line on the screen.
For that reason, the bulk of the changes here are in vere, where we
treat the bottom-most line specially, drawing the spinner onto it.
Webterm is likewise updated to account for the new coordinate system.
Drum now opts to accept clicks anywhere on the screen, and does its best
to move the cursor as close to the clicked location as possible (within
the confines of the prompt).
Presumably due to how js non-objects work in closures, the selected prop
we were reading out whenever a blit came in was stale.
Also, it was possible that a bell was hiding inside a %mor blit, so we
add a small helper for checking properly.
%rez has always used "width & height". Certainly, "x & y" is more
standard than "row & column". As such, we settle on making %hop and %hit
respect the more natural ordering. This change is safe because these
interfaces haven't made it to livenet yet.
Fully implements webterm support for multiple dill terminal sessions.
Remaining work includes styling, session creation safety (name-wise),
and general cleanup.
Co-authored-by: tomholford <tomholford@users.noreply.github.com>
Co-authored-by: liam-fitzgerald <liam@tlon.io>