This migrates all remaining eventbus events sent over the websocket to
use the wps interface. WPS is more flexible for registering events and
callbacks and provides support for more reliable unsubscribes and
resubscribes.
This was hard to debug. It manifested in nodes that had been collapsed
into their parent. When a node was dragged over the recently-collapsed
node, the placeholder would show the action as if the flex direction was
reversed. It turns out useDrag has trouble tracking changes to the
LayoutNode objects. For now, I am just finding the nodes again in the
computeMoveNode function. Later when I redo the drag system, I will fix
this better.
Rather than try to track the transition state, which was proving
unreliable, I am just directly tracking the node state and determining
whether to debounce the inner rect based on whether the user has the
prefers-reduced-motion setting or query, whether the node is resizing,
and whether it's currently magnified. I'm then using the actual
animation time setting to determine how long to debounce.
Use a better system for scrolling using scrollTo on the
OverlayScrollbars ref. This lets me get the heading as close to the top
of the viewport as possible without the convoluted CSS tricks I was
trying before.
A couple small things:
- make the timer more robust in case of a timing issue where the timer
skips 0
- make the x button in the corner work
- style the title to stand out
The title will need more styling in the future, but this is still an
improvement.
Adds a list of potential remotes to add and filters it as you type. It
also provides options for reconnecting on a disconnection and
specifically connecting to a local connection
The frontend wshserver.ts had a weird circuitous dependency on wos.ts,
which was unnecessary. This moves the misplaced functions into wshrpc.ts
and updates the generation logic.
Adds a new setting for the gap size between tiles in a layout. Also
updates the resize handle calculations so they are dynamically generated
based on the gap size. Also updates the styling for the resize handles
to be more robust.
This also updates the default gap size to 3px.
This also slims out the Block Frame padding so it is just enough that
the blocks don't overlap when there's no gap.
Adds a table of contents in the markdown preview, with a button in the
header to toggle whether to show the TOC. When a user clicks one of the
TOC elements, the preview will scroll to the corresponding heading.
I've also cleaned up some MD preview styling that was inconsistent and
causing the preview to overflow unnecessarily. This also fixes some
terminology in the preview code.
<img width="574" alt="image"
src="https://github.com/user-attachments/assets/abb18ba9-21d3-4315-bdc3-e4bdcca39a4c">
This adjusts the block header styling to remove a bunch of unnecessary
attributes and to ensure that we have more consistent shrinking
behavior. Now, file paths will truncate starting on the left side, to
preserve the file name as long as possible. Also, the widget name can
shrink down to zero, while preserving the widget icon, since it's
unnecessary to have both when the widget is small.
<img width="415" alt="image"
src="https://github.com/user-attachments/assets/46e0a74a-f35d-4d09-9c67-019936e67e41">
This makes the background for the "wave-theme-dark" theme transparent.
The light theme is still opaque because otherwise it will look somewhat
dark.
This also suppresses TypeScript/JavaScript import errors in the default
linter, since we don't have support for project directories.
This also reworks the useWidth and useHeight hooks to use the
useResizeObserver hook, which limits the number of ResizeObserver
instances floating around, thereby improving performance