openpencil/tests/engine
Danila Poyarkov 5ae6234e40
Tailwind CSS v4 JSX export (#54)
* Add Tailwind CSS v4 JSX export format

- Add JSXFormat type ('openpencil' | 'tailwind') to sceneNodeToJSX/selectionToJSX
- Tailwind resolver (tailwind.ts): px→spacing (v4 multiplier), hex→color class,
  fontSize/fontWeight/borderRadius named lookups with arbitrary value fallback
- Export: FRAME→div, TEXT→p, SECTION→section, className with TW utility classes
- CLI: export --format jsx --style tailwind
- CodePanel: format toggle button (OpenPencil / Tailwind)
- Rename Jsx→JSX in all public APIs (sceneNodeToJSX, selectionToJSX, renderJSX, etc.)
- 29 new Tailwind export tests, all 43 export tests pass

* Extract escapeJSXText — replace nested ternary with entity map lookup

* Deduplicate export-jsx: extract shared padding, corner radius, and node context helpers

* Update changelog

* Tighten Tailwind JSX export fidelity
2026-03-06 18:04:11 +03:00
..
abspos-cache.test.ts Improve zoom smoothness, add absolute position cache (#21) 2026-03-03 11:44:31 +03:00
acp-agent.test.ts Add ACP agent package with tests 2026-03-05 09:14:54 +03:00
clipboard.test.ts Apply instance symbolOverrides on clipboard paste 2026-03-03 23:26:29 +03:00
effects-and-resize.test.ts Fix effects rendering: shadows, blur, spread (#24) 2026-03-03 09:53:39 +03:00
eval-cli.test.ts Fix hit-testing: scope hover to current page, click-through empty containers 2026-03-05 08:56:35 +03:00
export-jsx.test.ts Tailwind CSS v4 JSX export (#54) 2026-03-06 18:04:11 +03:00
fig-import.test.ts Detect component sets and skip internal canvas on paste 2026-03-03 23:20:55 +03:00
fig-roundtrip.test.ts Fix hit-testing: scope hover to current page, click-through empty containers 2026-03-05 08:56:35 +03:00
figma-api.test.ts Fill Figma Plugin API gaps: 29 new tests, 30+ new properties and methods 2026-03-01 13:35:02 +03:00
fonts.test.ts Extract collectFontKeys into core and add font tests 2026-03-04 10:16:26 +03:00
individual-strokes.test.ts Add stroke align, individual side strokes, and side selector UI 2026-03-04 09:47:14 +03:00
layout.test.ts Populate instance children from components on .fig import 2026-03-04 10:55:29 +03:00
mcp-server.test.ts Fix hit-testing: scope hover to current page, click-through empty containers 2026-03-05 08:56:35 +03:00
mcp.test.ts Fix hit-testing: scope hover to current page, click-through empty containers 2026-03-05 08:56:35 +03:00
multi-selection.test.ts Multi-selection properties panel with tests 2026-03-03 20:35:51 +03:00
profiler.test.ts Add renderer profiler with HUD overlay, GPU timing, and phase instrumentation 2026-03-04 14:13:17 +03:00
render.test.ts Tailwind CSS v4 JSX export (#54) 2026-03-06 18:04:11 +03:00
renderer-effects.test.ts Fix effect ordering test, add contributors to release notes 2026-03-05 09:56:13 +03:00
scene-graph.test.ts Fix hit-testing: scope hover to current page, click-through empty containers 2026-03-05 08:56:35 +03:00
svg-export.test.ts SVG export (#52) 2026-03-05 10:31:02 +03:00
tailwind-jsx.test.ts Tailwind CSS v4 JSX export (#54) 2026-03-06 18:04:11 +03:00
tools-ai-adapter.test.ts Unify tool definitions: define once, adapt for AI/CLI/MCP 2026-03-01 15:02:05 +03:00
tools-cli.test.ts Fix hit-testing: scope hover to current page, click-through empty containers 2026-03-05 08:56:35 +03:00
tools.test.ts Unify tool definitions: define once, adapt for AI/CLI/MCP 2026-03-01 15:02:05 +03:00