openpencil/packages/scene-graph
Danila Poyarkov aeba9a6bd5
fix(scene-graph): leave a field a component property drives to its instance (#843)
* fix(scene-graph): leave a field a component property drives to its instance

A component states the default for a field a property reference drives,
but the enclosing instance's assignment decides the value. Synchronising
copied the default over it, so loading a page into an open document —
which synchronises every component it places — reset those layers. A
label a navigation item assigned came back as the component's default
when its page loaded on its own, while reading the whole archive gave
the assigned text.

Synchronising now skips a field whose reference names a property an
enclosing instance assigns, and carries everything else as before.

* fix(scene-graph): read an own assignment, not an inherited key

A document-authored component property id can collide with an Object
prototype key, and `in` would then report an assignment the instance
never made, silently leaving the referenced field unsynchronised.

* test(core): cover visibility and swap on an independent page load

The fix skips any field a component property reference drives, so the
page-scoped test should exercise VISIBLE and INSTANCE_SWAP alongside
TEXT rather than leaving the other two to full-document reads.

* fix(scene-graph): leave slot content to its own guard

#850 added a SLOT_CONTENT reference field, which drives a slot frame's
children rather than a scalar field, so the property-driven field map
no longer claims to cover every reference field.
2026-10-04 01:38:23 +04:00
..
scripts feat: split SceneGraph and Pen packages 2026-06-30 10:54:32 +03:00
src fix(scene-graph): leave a field a component property drives to its instance (#843) 2026-10-04 01:38:23 +04:00
tests fix(scene-graph): leave a field a component property drives to its instance (#843) 2026-10-04 01:38:23 +04:00
AGENTS.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
package.json test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
README.md feat: split SceneGraph and Pen packages 2026-06-30 10:54:32 +03:00
tsconfig.json feat: split SceneGraph and Pen packages 2026-06-30 10:54:32 +03:00
tsconfig.test.json test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
tsdown.config.ts refactor!: move shared primitives below dom-css and core (#771) 2026-09-26 11:39:11 +04:00

@open-pencil/scene-graph

Shared OpenPencil design document model.

This package owns SceneGraph, SceneNode, paint/effect/layout/variable types, graph mutation helpers, source metadata, and model-level utilities. It does not own editor state, UI, file format policy, rendering, or app document I/O.