- Use twirlwind for CSS-to-Tailwind class conversion instead of
450 lines of manual lookup tables and formatting functions
- Build a CSS style object from scene node properties, pass to twirl()
- Remove design-jsx/tailwind.ts (pxToSpacing, colorToTwClass, etc.)
- Remove unused Tailwind-specific helpers from jsx/helpers.ts
- Update tests for twirlwind's v4-native output format
Single-node selection draws handles inside withNodeBounds() which
applies canvas.scale(zoom), so handle size / zoom is correct there.
Multi-selection drawGroupBounds() computes screen-space coordinates
directly (x * zoom + pan) without a canvas zoom transform, so handles
need fixed screen-space sizes. Added drawHandleScreenSpace() and
drawBoundsHandlesScreenSpace() for the multi-select path.
- shapeTextForClipboard() now processes all lines, not just the first
- buildFigmaClipboardHTML() passes CanvasKit-shaped positions to
derivedTextData when available (browser with CanvasKit loaded)
- Add @chenglou/pretext for proper Unicode-aware word wrapping as
fallback when CanvasKit isn't available (CLI, headless, .fig export)
- Falls back to basic word-boundary wrapping if pretext fails
Figma expects derivedTextData glyph advance values normalized to
font-size units (advance / fontSize), not absolute pixel values.
This caused pasted text to appear horizontally mirrored because
Figma multiplied the already-absolute advances by fontSize again.
- useEditorSetup() / useEditorSetupWithClear() in tests/e2e/fixtures.ts
- Migrated 17 specs to shared fixture, removing ~300 lines of boilerplate
- Moved getSelectedNode/getSelectedNodes to shared store helpers
- Replaced inline getSelectedNode in 4 specs with shared import
- Test duplication: 329 → 308 clones (10.12% → 9.08%)
- Add &no-rulers to all E2E test URLs that use &no-chrome
- Regenerate snapshots without ruler ticks/selection badges
- Remove stale snapshot dirs from old test paths