openpencil/packages/dom-css/tests/export
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
..
bundle feat: write variable-bound properties as tokens in exported code (#895) 2026-10-05 09:15:44 +00:00
projection feat: write variable-bound properties as tokens in exported code (#895) 2026-10-05 09:15:44 +00:00
storybook refactor(dom-css): group sources into import, export, and runtime (#789) 2026-09-30 09:44:52 +04:00
tailwind-jsx feat: write variable-bound properties as tokens in exported code (#895) 2026-10-05 09:15:44 +00:00
token-fixtures.ts feat: write variable-bound properties as tokens in exported code (#895) 2026-10-05 09:15:44 +00:00