openpencil/tests/engine
Danila Poyarkov 9b418de13e
refactor: print OpenPencil JSX export as syntax trees (#799)
* refactor(codegen): share syntax-tree code generation between exporters

dom-css printed Tailwind JSX with its own esrap JSX builders and kept TypeScript template helpers under its Storybook export. The OpenPencil JSX exporter needs the same JSX builders, and design-jsx and dom-css may not depend on each other.

@open-pencil/codegen holds both: es for ESTree templates and modules (moved from dom-css) and jsx for JSX elements, attributes, text, and printing, including the literal rules that keep exported strings from being reinterpreted. dom-css no longer depends on acorn and esrap directly.

* refactor(design-jsx): print JSX export as syntax trees

sceneNodeToJSX concatenated strings with hand-written escaping and indentation. It now collects typed props (moved to export/props.ts) and prints them with @open-pencil/codegen's JSX builders. Output is unchanged except for text: special characters print as a string expression instead of entities, and multi-line text keeps its line breaks, which the old line-splitting lost on render.

* docs(codegen): fix package metadata and dependency rules

codegen's repository.directory still named design-jsx, the README mentioned es without showing it, and the design-jsx and dom-css guides still said they depend only on scene-graph.

* test(core): move the JSX export round-trips to the design-jsx test home

Covers tabs in layer names and text, which JSX keeps as written.
2026-10-01 21:22:43 +04:00
..
acp
app feat: preview streamed JSX on the canvas (#692) 2026-10-01 10:52:36 +04:00
cli feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
clipboard refactor!: move shared primitives below dom-css and core (#771) 2026-09-26 11:39:11 +04:00
collab Release v0.15.0 2026-09-16 17:57:35 +03:00
color refactor!: move shared primitives below dom-css and core (#771) 2026-09-26 11:39:11 +04:00
core feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
dom-css fix(fig): restore strict parse validation 2026-07-18 03:58:18 +03:00
figma/api feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
geometry feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
hit-test perf(scene-graph): accelerate axis-aligned hit tests (#534) 2026-08-16 15:43:25 +03:00
icons fix(core): preserve inline SVG primitives (#485) 2026-08-12 16:02:45 +03:00
io test(core): move the fig round-trip suite home, and stop test imports drilling 2026-10-01 14:11:53 +04:00
kiwi feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
layout test: fix heavy unit-test measurement and round-trip checks (#655) 2026-09-07 00:33:12 +03:00
library build: upgrade oxfmt and format Vue imports (#669) 2026-09-10 02:45:13 +03:00
lint test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
mcp fix(MCP): add read-only file lifecycle tools (#722) 2026-09-18 11:55:06 +03:00
pen feat: export components as Storybook stories (#751) 2026-09-30 03:16:47 +04:00
profiler chore: format codebase 2026-05-24 12:15:29 +03:00
random
render refactor: print OpenPencil JSX export as syntax trees (#799) 2026-10-01 21:22:43 +04:00
snap
tauri fix(fonts): explain PingFang substitution and draw its CJK text (#781) 2026-09-26 11:14:30 +04:00
text fix(text): render variable font styles at their named instances (#773) 2026-09-26 11:25:01 +04:00
tools fix(figma-api): validate effects like Figma (#794) 2026-09-30 21:18:20 +04:00
vector feat(canvas): render arrow stroke caps on lines and open vectors 2026-08-31 21:25:38 +03:00
vue fix: convert document colour profiles, keep text edits live, and fix .fig exports (#716) 2026-09-18 00:43:10 +03:00
perf.bench.ts feat: split SceneGraph and Pen packages 2026-06-30 10:54:32 +03:00