openpencil/packages/core/src/editor/structure
Danila Poyarkov 1835903e56 feat(editor): add event bus for editor lifecycle events
Wire nanoevents-based event bus to the editor core:

- EditorEvents type with render, graph, selection, tool, page, viewport events
- All node mutations (create/update/delete/reparent/reorder) forwarded from SceneGraph
- Selection changes routed through setSelectedIds() with diff detection
- Tool changes routed through setActiveTool() with change detection
- Page switches emit page:changed
- Viewport pan/zoom/fit/zoomTo emit viewport:changed
- Graph replacement emits graph:replaced
- Typed onEditorEvent() subscription on the Editor return object
- useEditorEvent() Vue composable with automatic scope cleanup
- Replace all direct state.selectedIds/state.activeTool mutations in core, app, and SDK
2026-05-06 15:25:27 +03:00
..
auto-layout-wrap.ts feat(editor): add event bus for editor lifecycle events 2026-05-06 15:25:27 +03:00
container-wrap.ts feat(editor): add event bus for editor lifecycle events 2026-05-06 15:25:27 +03:00
group.ts feat(editor): add event bus for editor lifecycle events 2026-05-06 15:25:27 +03:00
reorder.ts style: tighten import grouping 2026-05-06 02:22:08 +03:00
state.ts Refactor architecture boundaries across core, app, and packages (#234) 2026-04-30 15:14:19 +03:00