openpencil/src
Danila Poyarkov f44f06f721 Refactor: extract business logic from components, clean composables
Tier 1 — Core API fixes:
- updateNodeWithUndo now calls requestRender internally, eliminating
  15+ redundant requestRender() calls across 6 property panel components
- New editor/variables.ts: 7 undo-able variable CRUD operations
  (renameCollection, addCollection, removeCollection, addVariable,
  removeVariable, renameVariable, updateVariableValue)
- New editor/alignment.ts: alignNodes, flipNodes, rotateNodes —
  moves bounding box geometry out of PositionSection.vue

Tier 2 — Composable cleanup:
- Merged use-node-props + use-multi-props into single useNodeProps()
  with MIXED sentinel, eliminating duplicate computed refs
- Added toolCursor() utility — replaces if/else chain in EditorCanvas
- Renamed use-toast.ts → toast.ts (singleton module, not a composable)

Tier 3 — use-canvas-input.ts split (1497 → 817 lines):
- input/types.ts (88) — DragState variants, HandlePosition, TOOL_TO_NODE
- input/geometry.ts (170) — hit testing, handle positions, rotation cursor
- input/pan-zoom.ts (266) — wheel, touch pinch, Safari gestures
- input/resize.ts (121) — constrainToAspectRatio, applyResize
- input/auto-layout.ts (103) — insert indicator computation

All 955 tests pass, 0 lint errors, 1.48% duplication.
2026-03-16 20:35:17 +03:00
..
ai Clean up ACP branch: gate debug log, fix capitalizations, harden types 2026-03-15 18:24:37 +03:00
assets Fix per-character text fill colors and vector region loop direction (#95) 2026-03-12 18:28:04 +03:00
automation Add random.ts helpers, replace all raw crypto.getRandomValues calls 2026-03-16 14:13:36 +03:00
components Refactor: extract business logic from components, clean composables 2026-03-16 20:35:17 +03:00
composables Refactor: extract business logic from components, clean composables 2026-03-16 20:35:17 +03:00
engine Remove re-export shims and import types directly from core 2026-03-09 08:56:47 +03:00
shims Remove shiki shim — handled by forked vue-stream-markdown 2026-03-15 16:40:38 +03:00
stores Move composables to @open-pencil/vue SDK, unify Editor type 2026-03-16 17:41:07 +03:00
utils Refactor mobile drawer: use VueUse composables, unify panels 2026-03-05 22:13:24 +03:00
views Use collab injection in MobileHud instead of prop drilling 2026-03-16 13:27:17 +03:00
app.css Add random.ts helpers, replace all raw crypto.getRandomValues calls 2026-03-16 14:13:36 +03:00
App.vue Eliminate as Record<string, unknown> casts 2026-03-06 21:43:32 +03:00
constants.ts Extract createEditor() to packages/core/src/editor/ folder 2026-03-16 15:14:50 +03:00
demo.ts Delete re-export shims, import from @open-pencil/core directly 2026-03-06 21:42:56 +03:00
env.d.ts Eliminate as Record<string, unknown> casts 2026-03-06 21:43:32 +03:00
global.d.ts Release v0.3.2 2026-03-02 11:36:18 +03:00
main.ts Fix all type-aware lint warnings 2026-03-08 23:04:44 +03:00
router.d.ts Move demo to /demo route, add @unhead/vue for title management 2026-03-06 20:54:48 +03:00
router.ts Move demo to /demo route, add @unhead/vue for title management 2026-03-06 20:54:48 +03:00