openpencil/tests/engine/render/jsx
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
..
component fix: reject ambiguous variant property names 2026-09-14 00:14:09 +03:00
builders.test.ts
export.test.ts
gaps.test.ts fix(core): preserve inline SVG primitives (#485) 2026-08-12 16:02:45 +03:00
grid-layout.test.ts
instance-sizing.test.ts test: cover and document inherited instance dimensions 2026-09-14 00:24:52 +03:00
reference.test.ts docs: clarify scalar modes and instance sizing guidance 2026-09-13 20:54:27 +03:00
render-tree.test.ts test: share scene variable helper 2026-06-30 10:55:05 +03:00
scalar-variables.test.ts feat: bind Design JSX scalar props to variables 2026-09-13 19:06:20 +03:00
schema.test.ts feat(code): add live JSX and HTML/CSS editing (#525) 2026-08-15 09:48:42 +03:00
text-props.test.ts fix: escape string attributes in JSX export (#754) 2026-09-25 15:50:36 +04:00