openpencil/packages/core/tests
Danila Poyarkov 2bb43c85dc
fix(fig): keep the sizes Figma derived for instance layers when a page loads (#951)
* fix(fig): keep the sizes Figma derived for instance layers when a page loads

Loading a page resynced every component its new instances used, which copied component sizes over the sizes Figma derived for instance layers on earlier pages, and over those of the page's own new instances. A text field filling a 312px instance came back at its component's 210px.

The page now syncs only the instances it placed, through a new SceneGraph.syncInstance, and then puts back the sizes Figma derived for them unless that component layer's size was edited live. The gold input now matches the captured Figma Content width (374.86 instead of 633.69), and its placeholder matches the 97.51 x 39.38 Figma derived in the file.

* fix(fig): keep live edits to mapped component layers over derived sizes

restoreDerivedSizes checked only a layer's own component for live edits. A
nested instance clone syncs from the layer its owning instance maps it to
through sourceComponentId, so a live width edit to that layer was carried
over by the sync and then replaced by the size Figma derived. The restore
now reads the same source layers as reconcileLiveComponentEdits, through a
shared syncSourceLayers helper.
2026-10-07 20:57:55 +00:00
..
canvas fix(canvas): keep image-heavy documents within CanvasKit memory (#963) 2026-10-07 20:30:25 +00:00
clipboard test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
design-jsx fix(layout): size each axis on its own and lay out before geometry reads (#942) 2026-10-07 11:52:08 +00:00
editor refactor: share behaviour control roles through dom-css (#960) 2026-10-07 20:06:16 +00:00
figma-api fix(figma-api): size script text to its content, as Figma does (#950) 2026-10-07 20:49:37 +00:00
geometry fix: match Figma's panel X, Y, rotation and themed page backgrounds (#940) 2026-10-07 10:02:52 +00:00
helpers test: resolve repository files without climbing directories (#946) 2026-10-07 12:35:39 +00:00
icons fix(core): fill open subpaths of filled SVG paths (#876) 2026-10-04 13:25:23 +00:00
io/formats/fig fix(fig): keep the sizes Figma derived for instance layers when a page loads (#951) 2026-10-07 20:57:55 +00:00
layout fix: release documents when their tabs close (#904) 2026-10-05 18:11:34 +00:00
library feat: behaviours and preview mode (#893) 2026-10-06 13:23:05 +00:00
lint feat(lint): suggest group-to-frame and hidden-layer fixes; keep canvas edits in code previews (#870) 2026-10-04 12:46:06 +00:00
openpencil-api test(core): type the behaviour tests for the test typecheck (#934) 2026-10-06 13:58:17 +00:00
rpc feat: write variables as a CSS token stylesheet (#856) 2026-10-04 18:15:52 +00:00
text/derived-text feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
tools feat: behaviours and preview mode (#893) 2026-10-06 13:23:05 +00:00
vector/vectorize fix(core): fill open subpaths of filled SVG paths (#876) 2026-10-04 13:25:23 +00:00