Skip to content

v0.11.4

Choose a tag to compare

@github-actions github-actions released this 02 Nov 18:54
e998f8c

Smaller node handoffs and clearer design limits

Compact nodes, when you want them

Large frames often repeat the same styles and component structure. nodes --compact shares repeated style values; add --subtrees to share repeated subtrees while preserving every node's ID and bounds:

figlens nodes design.fig 12:345 --compact --subtrees

MCP: call nodes with compact: true and optionally subtrees: true. This works through the shared MCP tools in Pi, OpenCode and OMP. Without these options, nodes stays REST-shaped.

Compact output is a versioned wrapper, not ordinary REST JSON. Resolve its references before using REST paths; see the lossless wire contract. On 58 screens across four kits, per-kit median JSON-byte savings were 9–26% with style sharing and 11–27% with subtree sharing. These are byte measurements, not token guarantees. Independent decoding reproduced the default JSON exactly on those screens, five held-out screens and an expanded instance sublayer. Complete MCP replies still have an 8 MiB cap; large inputs also have finite construction guards.

More useful layout and limitation evidence

  • Grid auto layout now includes recorded row/column counts, gaps, child spans/alignment and ordered track sizes. Track sizes are exposed in _figlens.gridTracks, not guessed CSS strings. Stored cell anchors can disagree with saved positions, so cell indices are not emitted.
  • Stored Motion and code-layer content is identified as a handoff gap, rather than silently suggesting a complete static handoff. Animation and code are not reconstructed; detection has synthetic/schema coverage, not real-file confirmation.
  • Render warnings now identify paint types figlens does not draw, including shader, noise, pattern, video and emoji paints. This adds diagnostics, not rendering support.

Migration: semantic metadata is now sparse

Breaking change for metadata consumers: fields with no stored semantic source no longer produce state: "absent" entries. Empty semantic wrappers are omitted too. Verification is stated once at response-level _figlens.semantics.verification: "not-compared-with-figma", rather than repeated on each node. This also affects bundle design/nodes.json; inspect reports verification at response level.

Update consumers to tolerate missing semantic entries/wrappers and read verification from the response root. Missing evidence is not a Figma default or proof of support. Recorded and unsupported entries remain distinct. Removing this boilerplate made the measured default node output 18–26% smaller; compact-mode savings above are additional, measured after that change.

Update

figlens update
# Or run this exact npm version:
npx --yes @runkids/figlens@0.11.4 --version

Binaries remain unsigned. Snapshot mappings and figlens renders are not a claim of same-version Figma API or visual parity.

Changes: #201, #202, #209, #210, #211.