openpencil/packages
Danila Poyarkov c48886920d
fix(fig)!: clear a colour variable binding when the layer is unbound
Unbinding a fill or stroke and saving handed Figma back the variable
the layer was imported with: the raw paint kept its `colorVar` and only
the bound path ever touched it. The unbound path now clears it, and an
emptied bindings record is dropped rather than written, since nothing
reads an empty map and it would otherwise sit in every exported file.

With that, nothing writes `colorVariableBinding`. It had no entry in
`fig.kiwi`, so encoding one meant splicing bytes into the encoded
message by searching for marker sequences; exports have written
`colorVar`, the field the schema defines, since the reader landed. The
splicing encoder and the three helpers it exposed are gone, leaving
`parseVariableId`. Importers still read the old field, so files earlier
versions wrote still open.

Co-authored-by: mrhard9090 <74858909+mrhard9090@users.noreply.github.com>
2026-10-01 17:06:00 +04:00
..
cli feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
core fix(fig)!: clear a colour variable binding when the layer is unbound 2026-10-01 17:06:00 +04:00
demos
design-jsx feat: preview streamed JSX on the canvas (#692) 2026-10-01 10:52:36 +04:00
docs feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
dom-css refactor(dom-css): group sources into import, export, and runtime (#789) 2026-09-30 09:44:52 +04:00
fig fix(fig)!: clear a colour variable binding when the layer is unbound 2026-10-01 17:06:00 +04:00
harness docs: route contributors through per-domain guides and ship npm license text (#785) 2026-09-29 01:02:06 +04:00
kiwi fix(fig)!: clear a colour variable binding when the layer is unbound 2026-10-01 17:06:00 +04:00
mcp refactor(design-jsx): extract design JSX into its own package (#793) 2026-09-30 20:55:27 +04:00
pen fix(figma-api): validate effects like Figma (#794) 2026-09-30 21:18:20 +04:00
scene-graph test(core): move the fig round-trip suite home, and stop test imports drilling 2026-10-01 14:11:53 +04:00
vue docs: route contributors through per-domain guides and ship npm license text (#785) 2026-09-29 01:02:06 +04:00