Update the computeMove function to only set pendingAction if the action
is not a no-op (i.e. it will not place the node adjacent to itself at
the same level). Also clears the pendingAction if the user hovers over
the node that is being dragged.
Adds the ability to swap nodes by dragging to the center of a tile.
Also fixes a bug where moving a node to a new lesser index under the
same parent would produce a no-op.
This adds support for windows builds. With it, the app can successfully
run on windows and unix systems. Note that the terminal still only works
on unix systems at this time.
This was a weird one, apparently Storybook still uses CJS but Vite has fully deprecated CJS support. So we need to dynamically import the electron.vite.config.ts file for Storybook, but this breaks because Typescript doesn't resolve and properly compile the dynamic import. To get around this, I am using the `tsx` package, which can dynamically compile typescript imports.
This sets us back up to use Vite via the electron-vite package. This
will let us continue to build our testing suite on Vitest and take
advantage of Vite features like Hot Module Reloading, etc.
---------
Co-authored-by: sawka <mike.sawka@gmail.com>
I found that the drag preview images would get unset when the app went idle. I am now caching the preview image and resetting it every time a user hovers over a TileNode. I am also updating the logic for the placeholder slightly to reduce the number of variables floating around.
It turns out that WebKit uses its own prefix for user-select so I'm adding this everywhere we currently define user-select, as well as a few new places
Insert the node at the new location before removing it from its old location. With the old order, removing a node from its parent could change the indexing of the parent node, if moving a node to a new location under the same parent.