openpencil/packages/core
Danila Poyarkov b3053601f7 Add arrow key nudge and fix undo/redo bugs
Nudge: Arrow keys move selection by 1px, Shift+Arrow by 10px.
Consecutive nudges within 300ms are batched into a single undo
entry so Cmd+Z undoes the entire sequence at once.

Fix duplicate redo creating nodes with new IDs, breaking
subsequent undo entries that reference the original IDs. Now
snapshotSubtree/restoreSubtree preserve node IDs across redo.

Fix delete undo not restoring children — deleteSelected only
snapshotted top-level nodes, so undoing a frame delete lost all
its children. Now snapshots the full subtree.

Fix draw tool not committing resize to undo — shapes created via
draw had their final dimensions lost on redo because handleDrawUp
never recorded the resize. Now uses beginBatch/commitBatch to
combine create+resize into a single undo entry.

Clean up use-keyboard.ts — remove shouldPreventDefault and opaque
PREVENT_* sets, move tool switch and nudge to dedicated keydown
listener, add shift() helper.

Closes #182
2026-04-10 00:26:13 +03:00
..
assets Refactor font loading: DRY up local font lookup, fix headless fallback 2026-03-16 13:38:16 +03:00
src Add arrow key nudge and fix undo/redo bugs 2026-04-10 00:26:13 +03:00
package.json fix(core): correct version to 0.11.6 in package.json 2026-04-08 22:28:00 +03:00
tsconfig.json Fix core release build config 2026-03-30 18:54:18 +03:00
tsdown.config.ts Release v0.11.6 2026-04-08 22:04:22 +03:00