openpencil/packages/kiwi/tests
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
..
codec.test.ts fix(fig)!: clear a colour variable binding when the layer is unbound 2026-10-01 17:06:00 +04:00
container.test.ts fix(kiwi): harden FIG containers and DOM imports 2026-08-13 20:33:10 +03:00
fig-schema.test.ts feat(kiwi): scaffold standalone Kiwi package 2026-06-30 10:48:47 +03:00
guid.test.ts refactor(kiwi): move FIG GUID helpers 2026-06-30 10:50:39 +03:00
parse.test.ts refactor(kiwi): move FIG parse helpers 2026-06-30 10:49:29 +03:00
protocol.test.ts refactor: standardize acronym casing 2026-08-10 15:48:16 +03:00
schema-runtime.test.ts feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
variable-bindings.test.ts fix(fig)!: clear a colour variable binding when the layer is unbound 2026-10-01 17:06:00 +04:00