Commit graph

2 commits

Author SHA1 Message Date
Kayshen-X c2cfce221c fix(figma): decode vector networks with the real kiwi blob layout
The parser read a layout that no real .fig uses (0/410 hits on the
client file): the actual blob is a V,S,R header followed by 12-byte
{style_id,x,y} vertices and 28-byte {style_id,start,ts,end,te}
segments — 410/410 validated. Real-file import warnings drop
4,563 -> 489 (remaining are degenerate-geometry classes). Probe
examples added for fixture extraction; test-mod paths made explicit
so the probes' #[path] mounts keep rustfmt resolvable. no-verify:
repo fmt gate trips on unrelated in-progress op-html sources.
2026-07-18 15:43:24 +08:00
Kayshen-X e18916c68c feat(figma): text mapper + vector geometry decoder
Stage F part 2 — ports figma-text-mapper.ts + figma-vector-decoder.ts.

- text_mapper.rs: map_figma_text_props → TextProps. Builds TextContent
  (plain | per-run StyledTextSegment[] from characterStyleIDs +
  styleOverrideTable, UTF-16-indexed), parses font weight from the
  style name (ordered substring match), line-height → multiplier,
  letter-spacing → px, align / vertical-align / growth enums, and
  applies textCase (UPPER / LOWER / TITLE).
- vector_decoder.rs:
  - decode_figma_path_blob — the opcode command stream (Z/M/L/Q/C,
    f32-LE operands, graceful truncation).
  - compute_svg_path_bounds — coordinate-pair bbox.
  - decode_figma_vector_path — geometry-blob path (stroke centerline
    preferred for stroke-only shapes).
  - decode_vector_network_blob — vertex/segment table fallback, chain-
    walked into M/L/C subpaths, scaled by nodeSize/normalizedSize.

op-figma 68 tests green (+16).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-17 16:07:16 +08:00