openpencil/packages/docs/programmable
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 variable-bound properties as tokens in exported code (#895) 2026-10-05 09:15:44 +00:00
sdk feat(updater): show download progress while installing an update 2026-09-25 23:15:14 +04:00
ai-chat.md feat(app): show who works on each page (#815) 2026-10-04 01:18:16 +04:00
byok-provider-compatibility.md docs(ai): tighten BYOK compatibility probes 2026-08-05 16:23:23 +03:00
collaboration.md feat(app): show who works on each page (#815) 2026-10-04 01:18:16 +04:00
index.md feat: control documents, history, settings, and tools from the CLI and MCP (#871) 2026-10-04 16:02:36 +00:00
jsx-renderer.md feat(design-jsx): export every property the renderer accepts (#814) 2026-10-03 15:40:21 +04:00
mcp-server.md feat: control documents, history, settings, and tools from the CLI and MCP (#871) 2026-10-04 16:02:36 +00:00
native-api.md refactor(design-jsx): extract design JSX into its own package (#793) 2026-09-30 20:55:27 +04:00