Commit graph

60 commits

Author SHA1 Message Date
Danila Poyarkov 2c69e0949b fix(text): preserve Figma auto-size text imports
- Normalize auto-layout text imported from Figma when fixed bounds match derived text layout
- Recompute auto-size text bounds on typography metric changes
- Clear stale Figma derived text layout caches when text sizing changes
- Cover FIG import text sizing and line-height resize regressions
2026-07-02 17:30:15 +03:00
Danila Poyarkov 898431e646 feat: split SceneGraph and Pen packages 2026-06-30 10:54:32 +03:00
Danila Poyarkov 6bf930e9e9 refactor(kiwi): tidy direct Kiwi imports 2026-06-30 10:50:34 +03:00
Danila Poyarkov 7d27cac5ab refactor(kiwi): remove redundant core shims 2026-06-30 10:50:30 +03:00
Danila Poyarkov 6877516f06 refactor(kiwi): consume standalone Kiwi package 2026-06-30 10:49:14 +03:00
Joseph Cumines fa5c072cad test: extend timeout for slow gold-preview fixture tests
Port the timeout fixes from PR #351 that resolved the unit-test CI
timeouts. Add HEAVY_TEST_TIMEOUT_MS (30s) in tests/helpers/test-utils.ts
and apply it to the slow gold-preview.fig fixture tests/hooks:
- clipboard roundtrip
- group reclassification
- glyph blob preservation
- auto-layout text measurement
- render/canvas/cache
2026-06-19 11:05:25 +10:00
rcoenen 922235d2c8
fix(kiwi): import Figma groups as groups
* fix(kiwi): import Figma groups as GROUP nodes instead of FRAME

- Map FRAME nodes with `resizeToFit === true` to `GROUP` type on import
- Write `resizeToFit = true` when exporting `GROUP` nodes back to Kiwi format
- Document findings and diagnosis in packages/docs/development/group-to-frame-import-issue.md
- Extract resolveNodeType helper to satisfy cyclomatic complexity limits

* test(kiwi): harden Figma group import + add coverage

Follow-up hardening on the group import/export fix:

- convert.ts: reorder so the COMPONENT_SET check runs before the FRAME→GROUP
  reclassification, and guard the group check on the absence of auto-layout
  (`stackMode` unset/NONE). Figma auto-layout "hug" frames use
  stackPrimarySizing/stackCounterSizing, not `resizeToFit`, so this prevents a
  component-set or auto-layout frame that happens to carry `resizeToFit` from being
  misclassified as a group.

- Add tests/engine/io/fig/import/group-reclassify.test.ts: unit coverage for the
  reclassification (FRAME+resizeToFit → GROUP, plain frame stays FRAME, auto-layout
  hug frame stays FRAME), plus a real-file assertion that gold-preview.fig imports
  its groups as GROUP.

- Add tests/engine/io/fig/roundtrip/group.test.ts: a created GROUP survives
  export → re-import as a GROUP (validates the export-side resizeToFit write).

- Update exhaustive.test.ts gold-preview golden: 519 nodes that were misimported as
  FRAME are now correctly GROUP (FRAME 4525→4006, GROUP 519), and export size shifts
  594758→594770 because exported groups now carry resizeToFit.

Note: the pre-existing material3 variables roundtrip failure
("Invalid value EXCLUDE for enum BooleanOperation") is unrelated to groups and
also fails on master — out of scope here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore(kiwi): remove temporary group-to-frame analysis doc

It was a scratch diagnostic artifact (and contained a hardcoded local path);
the rationale now lives in the fix's commit messages, code comments, and tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Danila Poyarkov <dev@dannote.net>
2026-06-06 13:49:19 +03:00
Danila Poyarkov 22ff3acdb5 Merge remote-tracking branch 'origin/master' into figma-compat-render-gaps
# Conflicts:
#	CHANGELOG.md
2026-05-31 13:59:19 +03:00
Danila Poyarkov 6ee0e5f9e8 fix(kiwi): preserve imported boolean geometry 2026-05-31 13:28:41 +03:00
Danila Poyarkov 883782846f docs(cli): use released openpencil command 2026-05-29 15:56:52 +03:00
Danila Poyarkov ef1ef0c9b1 test(kiwi): use public schema runtime export 2026-05-28 15:15:40 +03:00
Danila Poyarkov 6ae425ee3b fix(core): address compatibility review findings 2026-05-28 09:57:46 +03:00
Danila Poyarkov 5fcd8e0e9c fix(canvas): support stretched layout grids 2026-05-28 05:39:40 +03:00
Danila Poyarkov 64e8b21949 fix(canvas): render imported page guides 2026-05-27 19:00:23 +03:00
Danila Poyarkov 711106518e test(kiwi): record raw metadata oracle 2026-05-27 15:37:14 +03:00
Danila Poyarkov da537c05a7 test(canvas): summarize pattern oracle deltas 2026-05-27 14:25:10 +03:00
Danila Poyarkov f67c6c78c7 test(kiwi): record pattern alignment oracle 2026-05-27 13:21:44 +03:00
Danila Poyarkov 5c6808e219 test(kiwi): record Figma noise effect payloads 2026-05-27 02:56:05 +03:00
Danila Poyarkov 16e523380b test(canvas): tighten pattern visual oracle 2026-05-26 21:12:57 +03:00
Danila Poyarkov c1532610db fix(canvas): tighten Figma text and pattern fidelity 2026-05-26 18:30:08 +03:00
Danila Poyarkov d208cc326e fix(canvas): render Figma pattern fills 2026-05-26 17:33:45 +03:00
Danila Poyarkov 63f391d694 test(kiwi): add Figma mask oracle coverage 2026-05-26 16:34:33 +03:00
Danila Poyarkov 3348115a04 test(kiwi): record pattern paint oracle gap 2026-05-26 16:24:55 +03:00
Danila Poyarkov 1e1d78c7f6 fix(canvas): render Figma leading trim 2026-05-26 16:23:59 +03:00
Danila Poyarkov 3e1a37d34d fix(kiwi): preserve mask outline metadata 2026-05-26 15:44:35 +03:00
Danila Poyarkov c2a0de5f0c fix(kiwi): support Figma OpenType variant fields 2026-05-26 15:14:23 +03:00
Danila Poyarkov a53ab45e86 fix(kiwi): use Figma mask schema fields 2026-05-26 14:53:23 +03:00
Danila Poyarkov 80daa0d1e9 fix(canvas): render Figma text decoration styles 2026-05-26 13:22:56 +03:00
Danila Poyarkov f77f58e2f6 fix(kiwi): support raw OpenType toggles 2026-05-26 12:01:03 +03:00
Danila Poyarkov 4cd187c766 fix(kiwi): preserve more Figma metadata 2026-05-26 11:57:13 +03:00
Danila Poyarkov e31234a0ed test(kiwi): audit fig schema coverage 2026-05-26 11:33:52 +03:00
Danila Poyarkov a79d671873 fix(kiwi): preserve pattern spacing 2026-05-25 10:23:19 +03:00
Danila Poyarkov 75412ed59f fix(kiwi): preserve rich text schema metadata 2026-05-25 09:19:46 +03:00
Danila Poyarkov 84cf18ba80 fix(kiwi): preserve schema paint fields 2026-05-25 09:19:25 +03:00
Danila Poyarkov 35db955cb9 fix(kiwi): improve fig roundtrip fidelity
- Refresh the bundled Figma Kiwi schema from a newer embedded schema
- Preserve additional raw node fields and omitted imported stack sizing
- Tighten idempotent roundtrip checks while documenting known G0 import gaps
2026-05-24 19:27:19 +03:00
Danila Poyarkov abd795bd9a chore: format codebase 2026-05-24 12:15:29 +03:00
Danila Poyarkov c337905a02 fix(canvas): preserve text OpenType toggles 2026-05-23 01:43:00 +03:00
Danila Poyarkov 054199ac15 fix(kiwi): preserve edited font variation axes 2026-05-23 00:26:58 +03:00
Danila Poyarkov 8c85d2b953 fix(canvas): improve Figma mask and text fidelity 2026-05-23 00:18:33 +03:00
Danila Poyarkov 3dc0904466 fix(canvas): support luminance masks and tile transforms 2026-05-22 23:44:10 +03:00
Danila Poyarkov 24ac31d4ab fix(fig): restore lazy badge visibility overrides 2026-05-21 14:54:18 +03:00
Danila Poyarkov 213db6373a refactor(kiwi): group fig format internals
- Move codec, NodeChange conversion, and instance overrides under kiwi/fig
- Flatten the codec entrypoint to kiwi/fig/codec
- Keep schema-runtime as the generic Kiwi parser/compiler boundary
2026-05-21 14:54:13 +03:00
Danila Poyarkov e6da2736fe fix(fig): sync lazy link component overrides
- Carry resolved text styling and glyph data through component-property text clones
- Align lazy cloned child placement and hidden chevrons with their resolved source
- Cover the gold-preview dropzone link lazy import regression
2026-05-20 15:02:01 +03:00
Danila Poyarkov 957db338ba fix(fig): sync lazy instance override clones
- Re-propagate resolved overrides after lazy instance population
- Preserve Figma showShadowBehindNode on effects
- Mask unfilled stroke shadows behind their fill geometry
2026-05-20 13:12:16 +03:00
Danila Poyarkov 82fc5fb7bb fix(fig): propagate cloned component property overrides
- Resolve component-property refs through override keys on cloned children
- Apply instance component-property assignments through clone chains
- Use child shadow shapes for containers without visible fills
- Keep clipped export bounds from leaking hidden descendants
2026-05-20 12:29:51 +03:00
Danila Poyarkov a22d39210c fix(fig): populate lazy pages before export 2026-05-19 21:01:17 +03:00
Danila Poyarkov edf28f3659 fix(fig): scale instance stroke weights 2026-05-18 03:11:47 +03:00
Danila Poyarkov 2d011580f0 fix(fig): scale instance stroke weights 2026-05-18 02:47:05 +03:00
Danila Poyarkov 1de4f65767 fix(fig): propagate derived text glyphs 2026-05-18 02:35:33 +03:00
Danila Poyarkov 773b1539d2 fix(fig): prefer shared stroke styles 2026-05-18 02:30:37 +03:00