openpencil/packages/fig/src
xemc 783cdf9dbc fix(fig): component property definitions/references/assignments never survive a save/reload round trip
parseGuidOrNull requires the strict Figma GUID shape (sessionID:localID),
but every OpenPencil code path that creates a component property definition
uses `prop:<hex>` IDs, which never match. applyComponentMetadata silently
dropped componentPropDefs/componentPropRefs/componentPropAssignments/
variantPropSpecs whenever any entry failed that check, so any component
property created by the app (as opposed to imported straight from a real
Figma file) vanished on the very next save.

Mint a stable synthetic GUID for non-Figma-shaped property IDs instead of
dropping them, memoized per export so defs/refs/assignments/variantPropSpecs
pointing at the same property stay consistent. Also fix INSTANCE_SWAP
default/preferred/assignment values, which reference target node IDs and
had the same GUID-shape assumption, and were never being resolved back to
real node IDs on import in the first place (remapComponentIds only handled
instance.componentId, not these fields).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-18 08:10:11 +10:00
..
instance-overrides feat(fig): support text on path 2026-08-17 12:00:01 +03:00
node-change fix(fig): component property definitions/references/assignments never survive a save/reload round trip 2026-08-18 08:10:11 +10:00
archive.ts fix: complete acronym casing follow-ups 2026-08-10 16:38:17 +03:00
index.ts feat(storage): show workspace document previews 2026-08-10 17:21:36 +03:00
source-metadata.ts fix(fig): restore strict parse validation 2026-07-18 03:58:18 +03:00
thumbnail.ts fix(storage): isolate workspace refresh state 2026-08-10 22:30:54 +03:00