openpencil/packages/docs
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
..
.vitepress fix: validate parsed JSON at untrusted boundaries with Valibot (#855) 2026-10-04 17:01:50 +00:00
de docs: sync translations with documentation changes since v0.15.1 (#886) 2026-10-04 16:38:35 +00:00
development feat: create, fill, and edit slots (#862) 2026-10-04 17:02:28 +00:00
es docs: sync translations with documentation changes since v0.15.1 (#886) 2026-10-04 16:38:35 +00:00
fr docs: sync translations with documentation changes since v0.15.1 (#886) 2026-10-04 16:38:35 +00:00
it docs: sync translations with documentation changes since v0.15.1 (#886) 2026-10-04 16:38:35 +00:00
overview feat(code): link the Code tab to canvas layers and sync both ways (#805) 2026-10-04 10:08:40 +00:00
pl docs: sync translations with documentation changes since v0.15.1 (#886) 2026-10-04 16:38:35 +00:00
programmable feat: write variable-bound properties as tokens in exported code (#895) 2026-10-05 09:15:44 +00:00
public feat: refresh branding with generated platform icons (#707) 2026-09-16 11:54:07 +03:00
reference fix(design-jsx): say what gradient helpers expect when stops are not an array (#881) 2026-10-04 18:28:44 +00:00
ru docs: sync translations with documentation changes since v0.15.1 (#886) 2026-10-04 16:38:35 +00:00
user-guide feat(lint): suggest group-to-frame and hidden-layer fixes; keep canvas edits in code previews (#870) 2026-10-04 12:46:06 +00:00
AGENTS.md build(tools): group tools by role and gate them like the rest of the repo (#791) 2026-09-30 05:00:31 +04:00
getting-started.md fix: explain unsupported browsers instead of a blank window (#745) 2026-09-22 14:40:59 +04:00
index.md
package.json build: update dependencies (#873) 2026-10-04 12:48:24 +00:00