openpencil/packages
xemc b01ed830e8 feat(figma-api): add combineAsVariants for real component variant sets
figma.combineAsVariants() was unimplemented in the scripting/automation
layer (figma-api/proxy.ts's compatibility surface), even though the editor
UI already has a full equivalent — createComponentSetFromComponents()
(editor/components.ts) plus wrapSelectionInContainer()
(editor/structure/container-wrap.ts) — wired to the app's own "Create
component set" menu action.

This ports that logic down to FigmaAPI (the class MCP tools, the CLI, and
AI chat scripting all run against): wraps selected COMPONENT nodes sharing
a parent into a COMPONENT_SET, and derives variant property definitions from
"Category/Value" node-name segments, matching the editor behavior exactly.
Drops the undo-stack push and selection-state writes the editor path has,
since neither concept exists at the scripting layer — everything else is
the same primitives (SceneGraph.createNode/insertChildAt/reparentNode),
which FigmaAPI already had direct access to.

Also adds a matching combine_as_variants tool (packages/core/src/tools/
create/components.ts) registered in EXTENDED_TOOLS, so it's exposed
through MCP, the CLI, and AI chat alongside the existing create_component/
create_instance tools.
2026-08-19 20:05:54 +03:00
..
cli refactor(canvas): adopt immutable CanvasKit paths (#554) 2026-08-18 23:09:45 +03:00
core feat(figma-api): add combineAsVariants for real component variant sets 2026-08-19 20:05:54 +03:00
demos feat: mobile layout, PWA support (#27) (#27) 2026-03-05 19:51:51 +03:00
docs chore: refresh compatible dependencies (#545) 2026-08-18 17:44:40 +03:00
dom-css chore: refresh compatible dependencies (#545) 2026-08-18 17:44:40 +03:00
fig fix(fig): harden component property round trips 2026-08-19 18:05:25 +03:00
harness refactor(ai): ship Harness as optional companion (#561) 2026-08-19 20:04:35 +03:00
kiwi chore: refresh compatible dependencies (#545) 2026-08-18 17:44:40 +03:00
mcp chore: refresh compatible dependencies (#545) 2026-08-18 17:44:40 +03:00
pen chore: refresh compatible dependencies (#545) 2026-08-18 17:44:40 +03:00
scene-graph fix(editor): harden snapping edge cases 2026-08-19 12:33:32 +03:00
vue feat(ai): add HarnessAgent sidecar foundation (#560) 2026-08-19 17:41:10 +03:00