openpencil/tests/engine/figma/api/create
xemc 7dc46bb993 feat(figma-api): add exposeInstanceSwap for real instance-swap component properties
Adds figma.exposeInstanceSwap(slots, candidates, propertyName), which
exposes one or more nested instances as an instance-swap slot — the
enclosing component (or component set, walking up past intermediate
variant members) gets an INSTANCE_SWAP property offering the given
candidates, and each slot instance is tagged to respond to it. Mirrors
Figma's "Create component property > Instance swap", letting a designer
pick which component fills a slot (e.g. an icon on a button) instead of
the slot being baked-in static content.

Exposed as the expose_instance_swap MCP/CLI/chat tool.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-29 16:30:42 +03:00
..
combine-as-variants.test.ts fix(figma-api): align variant combination behavior 2026-08-19 20:05:54 +03:00
component-from-node.test.ts style(figma-api): format component conversion test 2026-08-29 15:47:43 +03:00
expose-instance-swap.test.ts feat(figma-api): add exposeInstanceSwap for real instance-swap component properties 2026-08-29 16:30:42 +03:00