openpencil/packages/docs/reference
Danila Poyarkov 9bc353587f
refactor!: generate Tailwind JSX through dom-css (#763)
* refactor!: generate Tailwind JSX through dom-css

Core kept its own SceneGraph → Tailwind mapper next to the one dom-css
uses for Tailwind HTML, and the two drifted: HTML export turned grid
frames into flex columns and dropped rotation, inner shadows, blur, and
flex grow, while Tailwind JSX had them.

Tailwind JSX is now printed by dom-css from the same CSS projection as
HTML export, with esrap building the JSX and string literals carrying
text or attributes that JSX would otherwise reinterpret. The projection
gains grid layout and placement, rotation, every shadow, layer and
background blur, flex grow, right-to-left direction, and sections, and
writes opaque colors as hex so Tailwind can match its palette.

BREAKING CHANGE: `sceneNodeToJSX` and `selectionToJSX` in
`@open-pencil/core` no longer accept a format, and `JSXFormat` and
`JSXExportOptions` are removed. Use `sceneNodesToTailwindJSX` from
`@open-pencil/dom-css` or `@open-pencil/dom-css/browser`.

* fix(dom-css): keep backslashes and line breaks in Tailwind JSX attributes

JSX attribute strings keep backslashes literally, but the printer
escapes backslashes and line breaks in string literals, so a layer
named `a\b` came back as `a\\b`. Such values are now written as
expression containers, like values containing quotes or `&`.
2026-09-26 10:50:28 +04:00
..
cli.md fix(dom-css): compile standalone HTML exports 2026-07-04 19:37:58 +03:00
design-authoring.md test: cover and document inherited instance dimensions 2026-09-14 00:24:52 +03:00
dom-css-mapping.md refactor!: generate Tailwind JSX through dom-css (#763) 2026-09-26 10:50:28 +04:00
figma-compatibility.md feat(fig): support text on path 2026-08-17 12:00:01 +03:00
file-format.md docs(fig): clarify existing round-trip fidelity limits 2026-09-13 15:32:57 +03:00
keyboard-shortcuts.md feat(app): expand Figma menu and selection parity (#459) 2026-08-03 00:23:05 +03:00
node-types.md feat(editor): add component property controls 2026-07-17 21:59:49 +03:00
scene-graph.md