openpencil/packages
Danila Poyarkov fb0cb9ee5f
feat: write variable-bound properties as tokens in exported code (#895)
* feat: write variable-bound properties as tokens in exported code

HTML and Tailwind JSX export reference the design tokens a layer is bound to, var(--color-primary) or bg-primary, instead of baking in their values. A binding becomes a reference only where the stylesheet resolves it as the canvas draws it: the layer still draws the value, the token's unit fits the property, and an attribute such as data-theme="dark" can put the element in the layer's mode. Standalone HTML includes the stylesheet for the tokens it uses, compiled into Tailwind's @theme for Tailwind pages.

* refactor: share the collection variable list and tighten token helpers

Read every variable in collection order through one collectionVariables helper built on es-toolkit's compact, used by the stylesheet and the token references, and map padding sides and color channels instead of repeating them.
2026-10-05 09:15:44 +00:00
..
cli feat: write variables as a CSS token stylesheet (#856) 2026-10-04 18:15:52 +00:00
core feat(scene-graph)!: let a SceneGraph take its ID generator (#887) 2026-10-05 08:21:22 +00:00
demos
design-jsx feat(scene-graph)!: let a SceneGraph take its ID generator (#887) 2026-10-05 08:21:22 +00:00
docs feat: write variable-bound properties as tokens in exported code (#895) 2026-10-05 09:15:44 +00:00
dom-css feat: write variable-bound properties as tokens in exported code (#895) 2026-10-05 09:15:44 +00:00
emit refactor: rename @open-pencil/codegen to @open-pencil/emit (#822) 2026-10-04 11:22:20 +00:00
fig refactor: define OpenPencil plugin data in one typed registry (#878) 2026-10-04 17:32:18 +00:00
harness build: update dependencies (#873) 2026-10-04 12:48:24 +00:00
kiwi fix(fig): keep variable metadata, plugin data and default mode on save (#848) 2026-10-04 12:53:04 +04:00
mcp fix: validate parsed JSON at untrusted boundaries with Valibot (#855) 2026-10-04 17:01:50 +00:00
pen feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
scene-graph fix(scene-graph): apply an instance's assignment to a late child (#884) 2026-10-05 09:10:44 +00:00
vue feat(scene-graph)!: let a SceneGraph take its ID generator (#887) 2026-10-05 08:21:22 +00:00