openpencil/tests/engine/figma/api
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
..
absolute fix(figma-api): expose node transforms 2026-08-03 20:17:32 +03:00
auto-layout test: move prefixed splits into domain folders 2026-05-06 14:27:21 +03:00
corner test: move prefixed splits into domain folders 2026-05-06 14:27:21 +03:00
create feat(figma-api): add combineAsVariants for real component variant sets 2026-08-19 20:05:54 +03:00
document test: move prefixed splits into domain folders 2026-05-06 14:27:21 +03:00
find test: move prefixed splits into domain folders 2026-05-06 14:27:21 +03:00
frozen test: move prefixed splits into domain folders 2026-05-06 14:27:21 +03:00
internals test: move prefixed splits into domain folders 2026-05-06 14:27:21 +03:00
layout fix(figma-api): implement layout compatibility gaps 2026-08-12 18:50:25 +03:00
min-max test: move prefixed splits into domain folders 2026-05-06 14:27:21 +03:00
node test: move prefixed splits into domain folders 2026-05-06 14:27:21 +03:00
property test: move prefixed splits into domain folders 2026-05-06 14:27:21 +03:00
stroke feat(editor): add stroke geometry controls 2026-07-17 19:01:42 +03:00
text test: move prefixed splits into domain folders 2026-05-06 14:27:21 +03:00
tree test: move prefixed splits into domain folders 2026-05-06 14:27:21 +03:00
vector fix(figma-api): match Figma vector editing (#444) 2026-08-02 22:32:16 +03:00
clone.test.ts test(figma): split API coverage 2026-05-06 13:37:15 +03:00
components.test.ts test(figma): split API coverage 2026-05-06 13:37:15 +03:00
expanded.test.ts test(figma): split API coverage 2026-05-06 13:37:15 +03:00
flatten-renderer.test.ts feat(text): wrap styled outline text 2026-05-17 20:23:55 +03:00
grouping-compat.test.ts refactor(figma-api): align grouping API signatures 2026-05-17 17:11:15 +03:00
grouping.test.ts test(figma): split API coverage 2026-05-06 13:37:15 +03:00
helpers.ts test(figma): split API coverage 2026-05-06 13:37:15 +03:00
images.test.ts chore: format codebase 2026-05-24 12:15:29 +03:00
mask.test.ts test(figma): split API coverage 2026-05-06 13:37:15 +03:00
selection.test.ts test(figma): split API coverage 2026-05-06 13:37:15 +03:00
serialization.test.ts chore(lint): reject broad unknown type assertions 2026-05-25 00:26:02 +03:00
stubs.test.ts test(figma): split API coverage 2026-05-06 13:37:15 +03:00
traversal.test.ts test(figma): split API coverage 2026-05-06 13:37:15 +03:00
variables.test.ts feat(figma-api): expose vector paths and modes 2026-07-22 15:07:20 +03:00