@ufira/vibma 1.0.0-rc6 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp.cjs +80 -26
- package/dist/mcp.js +80 -26
- package/dist/tools/generated/guards.cjs +35 -0
- package/dist/tools/generated/guards.d.cts +3 -1
- package/dist/tools/generated/guards.d.ts +3 -1
- package/dist/tools/generated/guards.js +34 -0
- package/dist/tools/registry.cjs +29 -13
- package/dist/tools/registry.js +29 -13
- package/package.json +1 -1
|
@@ -156,6 +156,8 @@ var nodeUpdate = /* @__PURE__ */ new Set([
|
|
|
156
156
|
"layoutSizingHorizontal",
|
|
157
157
|
"layoutSizingVertical",
|
|
158
158
|
"layoutWrap",
|
|
159
|
+
"letterSpacing",
|
|
160
|
+
"lineHeight",
|
|
159
161
|
"locked",
|
|
160
162
|
"maxHeight",
|
|
161
163
|
"maxWidth",
|
|
@@ -186,6 +188,8 @@ var nodeUpdate = /* @__PURE__ */ new Set([
|
|
|
186
188
|
"textAlignHorizontal",
|
|
187
189
|
"textAlignVertical",
|
|
188
190
|
"textAutoResize",
|
|
191
|
+
"textCase",
|
|
192
|
+
"textDecoration",
|
|
189
193
|
"textStyleId",
|
|
190
194
|
"textStyleName",
|
|
191
195
|
"topLeftRadius",
|
|
@@ -447,6 +451,8 @@ var instancesUpdate = /* @__PURE__ */ new Set([
|
|
|
447
451
|
"layoutSizingHorizontal",
|
|
448
452
|
"layoutSizingVertical",
|
|
449
453
|
"layoutWrap",
|
|
454
|
+
"letterSpacing",
|
|
455
|
+
"lineHeight",
|
|
450
456
|
"locked",
|
|
451
457
|
"maxHeight",
|
|
452
458
|
"maxWidth",
|
|
@@ -476,6 +482,8 @@ var instancesUpdate = /* @__PURE__ */ new Set([
|
|
|
476
482
|
"textAlignHorizontal",
|
|
477
483
|
"textAlignVertical",
|
|
478
484
|
"textAutoResize",
|
|
485
|
+
"textCase",
|
|
486
|
+
"textDecoration",
|
|
479
487
|
"textStyleId",
|
|
480
488
|
"textStyleName",
|
|
481
489
|
"topLeftRadius",
|
|
@@ -489,6 +497,23 @@ var instancesSwap = /* @__PURE__ */ new Set(["componentId", "id"]);
|
|
|
489
497
|
var instancesDetach = /* @__PURE__ */ new Set(["id"]);
|
|
490
498
|
var instancesResetOverrides = /* @__PURE__ */ new Set(["id"]);
|
|
491
499
|
var lintFix = /* @__PURE__ */ new Set(["itemSpacing", "layoutMode", "nodeId"]);
|
|
500
|
+
var prototypingAdd = /* @__PURE__ */ new Set([
|
|
501
|
+
"actionType",
|
|
502
|
+
"actions",
|
|
503
|
+
"collectionName",
|
|
504
|
+
"destination",
|
|
505
|
+
"duration",
|
|
506
|
+
"easing",
|
|
507
|
+
"id",
|
|
508
|
+
"modeName",
|
|
509
|
+
"navigation",
|
|
510
|
+
"resetScrollPosition",
|
|
511
|
+
"transition",
|
|
512
|
+
"transitionDirection",
|
|
513
|
+
"trigger",
|
|
514
|
+
"triggerDelay",
|
|
515
|
+
"url"
|
|
516
|
+
]);
|
|
492
517
|
var stylesCreatePaint = /* @__PURE__ */ new Set(["color", "colorVariableName", "description", "name"]);
|
|
493
518
|
var stylesCreateText = /* @__PURE__ */ new Set([
|
|
494
519
|
"description",
|
|
@@ -539,12 +564,16 @@ var textCreate = /* @__PURE__ */ new Set([
|
|
|
539
564
|
"fontWeight",
|
|
540
565
|
"layoutSizingHorizontal",
|
|
541
566
|
"layoutSizingVertical",
|
|
567
|
+
"letterSpacing",
|
|
568
|
+
"lineHeight",
|
|
542
569
|
"name",
|
|
543
570
|
"parentId",
|
|
544
571
|
"text",
|
|
545
572
|
"textAlignHorizontal",
|
|
546
573
|
"textAlignVertical",
|
|
547
574
|
"textAutoResize",
|
|
575
|
+
"textCase",
|
|
576
|
+
"textDecoration",
|
|
548
577
|
"textStyleId",
|
|
549
578
|
"textStyleName",
|
|
550
579
|
"width",
|
|
@@ -667,9 +696,13 @@ var mixinTextParams = /* @__PURE__ */ new Set([
|
|
|
667
696
|
"fontSize",
|
|
668
697
|
"fontStyle",
|
|
669
698
|
"fontWeight",
|
|
699
|
+
"letterSpacing",
|
|
700
|
+
"lineHeight",
|
|
670
701
|
"textAlignHorizontal",
|
|
671
702
|
"textAlignVertical",
|
|
672
703
|
"textAutoResize",
|
|
704
|
+
"textCase",
|
|
705
|
+
"textDecoration",
|
|
673
706
|
"textStyleId",
|
|
674
707
|
"textStyleName"
|
|
675
708
|
]);
|
|
@@ -703,6 +736,7 @@ export {
|
|
|
703
736
|
nodeDelete,
|
|
704
737
|
nodeReparent,
|
|
705
738
|
nodeUpdate,
|
|
739
|
+
prototypingAdd,
|
|
706
740
|
stylesCreateEffect,
|
|
707
741
|
stylesCreateGrid,
|
|
708
742
|
stylesCreatePaint,
|
package/dist/tools/registry.cjs
CHANGED
|
@@ -143,7 +143,7 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
143
143
|
bottomLeftRadius (string, optional)
|
|
144
144
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
145
145
|
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)
|
|
146
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
146
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
147
147
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
148
148
|
paddingTop (string, optional)
|
|
149
149
|
paddingRight (string, optional)
|
|
@@ -209,7 +209,7 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
209
209
|
bottomLeftRadius (string, optional)
|
|
210
210
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
211
211
|
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)
|
|
212
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
212
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
213
213
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
214
214
|
paddingTop (string, optional)
|
|
215
215
|
paddingRight (string, optional)
|
|
@@ -295,7 +295,7 @@ Params:
|
|
|
295
295
|
blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)
|
|
296
296
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
297
297
|
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: NONE)
|
|
298
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
298
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
299
299
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
300
300
|
paddingTop (string, optional)
|
|
301
301
|
paddingRight (string, optional)
|
|
@@ -316,6 +316,10 @@ Params:
|
|
|
316
316
|
fontFamily (string, optional) \u2014 Font family
|
|
317
317
|
fontStyle (string, optional) \u2014 Font variant e.g. "Bold", "Italic" \u2014 overrides fontWeight
|
|
318
318
|
fontWeight (number, optional) \u2014 100-900. Ignored when fontStyle is set.
|
|
319
|
+
lineHeight (number | {value, unit: "PIXELS"|"PERCENT"|"AUTO"}, optional)
|
|
320
|
+
letterSpacing (number | {value, unit: "PIXELS"|"PERCENT"}, optional)
|
|
321
|
+
textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)
|
|
322
|
+
textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)
|
|
319
323
|
fontColor (Color, optional) \u2014 Shorthand \u2014 sets text color (auto-binds to matching variable/style)
|
|
320
324
|
fontColorVariableName (string, optional) \u2014 Bind color variable by name e.g. 'text/primary'
|
|
321
325
|
fontColorStyleName (string, optional) \u2014 Apply paint style \u2014 overrides fontColor
|
|
@@ -397,7 +401,7 @@ Discriminant: type (frame | auto_layout | section | rectangle | ellipse | line |
|
|
|
397
401
|
bottomLeftRadius (string, optional)
|
|
398
402
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
399
403
|
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)
|
|
400
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
404
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
401
405
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
402
406
|
paddingTop (string, optional)
|
|
403
407
|
paddingRight (string, optional)
|
|
@@ -453,7 +457,7 @@ Discriminant: type (frame | auto_layout | section | rectangle | ellipse | line |
|
|
|
453
457
|
bottomLeftRadius (string, optional)
|
|
454
458
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
455
459
|
layoutMode (HORIZONTAL | VERTICAL, required) \u2014 Primary axis direction
|
|
456
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
460
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
457
461
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
458
462
|
paddingTop (string, optional)
|
|
459
463
|
paddingRight (string, optional)
|
|
@@ -650,7 +654,7 @@ Params:
|
|
|
650
654
|
blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)
|
|
651
655
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
652
656
|
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: NONE)
|
|
653
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
657
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
654
658
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
655
659
|
paddingTop (string, optional)
|
|
656
660
|
paddingRight (string, optional)
|
|
@@ -671,6 +675,10 @@ Params:
|
|
|
671
675
|
fontFamily (string, optional) \u2014 Font family
|
|
672
676
|
fontStyle (string, optional) \u2014 Font variant e.g. "Bold", "Italic" \u2014 overrides fontWeight
|
|
673
677
|
fontWeight (number, optional) \u2014 100-900. Ignored when fontStyle is set.
|
|
678
|
+
lineHeight (number | {value, unit: "PIXELS"|"PERCENT"|"AUTO"}, optional)
|
|
679
|
+
letterSpacing (number | {value, unit: "PIXELS"|"PERCENT"}, optional)
|
|
680
|
+
textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)
|
|
681
|
+
textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)
|
|
674
682
|
fontColor (Color, optional) \u2014 Shorthand \u2014 sets text color (auto-binds to matching variable/style)
|
|
675
683
|
fontColorVariableName (string, optional) \u2014 Bind color variable by name e.g. 'text/primary'
|
|
676
684
|
fontColorStyleName (string, optional) \u2014 Apply paint style \u2014 overrides fontColor
|
|
@@ -768,7 +776,7 @@ Use lint(method: "help", topic: "<method>") for method details.`,
|
|
|
768
776
|
"summary": '# prototyping\nManage prototype interactions, reactions, and navigation flows.\n\nMethods:\n get Get reactions and overflow direction on a node [read]\n add Add a prototype reaction to a node [edit]\n set Replace all reactions on a node (raw reactions array) [edit]\n remove Remove a reaction from a node by index [edit]\n\n// Reactions wire up interactions: trigger (ON_CLICK, ON_HOVER, ...) \u2192 action (navigate, swap, overlay).\n// Common patterns: button ON_CLICK \u2192 NAVIGATE to detail frame; card ON_HOVER \u2192 CHANGE_TO hover variant.\n// Multi-action: pass actions[] array to run multiple actions on one trigger (e.g. navigate + set variable mode).\n// ---\n// IMPORTANT: destination rules depend on navigation type:\n// NAVIGATE/SWAP/OVERLAY/SCROLL_TO \u2192 destination must be a top-level frame (direct child of a page). Nested frames are rejected.\n// CHANGE_TO \u2192 destination must be a variant (COMPONENT inside a COMPONENT_SET). Used for hover/state swaps within the same component.\n// ---\n// TRIGGERS: ON_CLICK | ON_HOVER | ON_PRESS | ON_DRAG | AFTER_TIMEOUT(timeout) | MOUSE_ENTER(delay) | MOUSE_LEAVE(delay) | ON_KEY_DOWN(keyCodes)\n// NAVIGATION: NAVIGATE (go to frame) | SWAP (swap overlay) | OVERLAY (show overlay) | SCROLL_TO | CHANGE_TO (swap component variant)\n// TRANSITIONS: DISSOLVE | SMART_ANIMATE | MOVE_IN | MOVE_OUT | PUSH | SLIDE_IN | SLIDE_OUT (+ direction for directional)\n// EASING: EASE_IN | EASE_OUT | EASE_IN_AND_OUT | LINEAR | GENTLE | QUICK | BOUNCY | SLOW\n// ACTIONS: NODE (navigate/swap) | BACK (go back) | CLOSE (close overlay) | URL (open link) | SET_VARIABLE_MODE (switch theme/mode)\n\nUse prototyping(method: "help", topic: "<method>") for method details.',
|
|
769
777
|
"methods": {
|
|
770
778
|
"get": "# prototyping.get\nGet reactions and overflow direction on a node\n\nParams:\n id (string, required) \u2014 Node ID",
|
|
771
|
-
"add": '# prototyping.add\nAdd a prototype reaction to a node\n\nExample: prototyping(method:"add", id:"btn-1", trigger:"ON_CLICK", destination:"
|
|
779
|
+
"add": '# prototyping.add\nAdd a prototype reaction to a node\n\nExample: prototyping(method:"add", items:[{id:"btn-1", trigger:"ON_CLICK", destination:"frame-2", navigation:"NAVIGATE", transition:"SMART_ANIMATE"}, {id:"btn-2", trigger:"ON_CLICK", destination:"frame-3"}])\n\nParams:\n id (string, optional) \u2014 Node ID\n trigger (ON_CLICK | ON_HOVER | ON_PRESS | ON_DRAG | AFTER_TIMEOUT | MOUSE_ENTER | MOUSE_LEAVE | ON_KEY_DOWN, optional) \u2014 Trigger type\n triggerDelay (number, optional) \u2014 Delay in ms for AFTER_TIMEOUT / MOUSE_ENTER / MOUSE_LEAVE triggers\n triggerKeyCodes (number[], optional) \u2014 Key codes for ON_KEY_DOWN trigger\n triggerDevice (KEYBOARD | XBOX_ONE | PS4 | SWITCH_PRO, optional) \u2014 Device for ON_KEY_DOWN (default: KEYBOARD)\n destination (string, optional) \u2014 Target node ID (required for NODE actions). NAVIGATE/SWAP/OVERLAY: must be a top-level frame. CHANGE_TO: must be a variant (component inside a component set).\n navigation (NAVIGATE | SWAP | OVERLAY | SCROLL_TO | CHANGE_TO, optional) \u2014 Navigation type (default: NAVIGATE)\n transition (DISSOLVE | SMART_ANIMATE | MOVE_IN | MOVE_OUT | PUSH | SLIDE_IN | SLIDE_OUT | INSTANT, optional) \u2014 Transition animation (default: DISSOLVE). INSTANT = no animation.\n transitionDirection (LEFT | RIGHT | TOP | BOTTOM, optional) \u2014 Direction for MOVE_IN, MOVE_OUT, PUSH, SLIDE_IN, SLIDE_OUT\n duration (number, optional) \u2014 Transition duration in seconds (default: 0.3)\n easing (EASE_IN | EASE_OUT | EASE_IN_AND_OUT | LINEAR | GENTLE | QUICK | BOUNCY | SLOW, optional) \u2014 Easing function (default: EASE_OUT)\n actionType (NODE | BACK | CLOSE | URL | SET_VARIABLE_MODE, optional) \u2014 Action type (default: NODE). SET_VARIABLE_MODE switches a variable collection mode.\n url (string, optional) \u2014 URL for URL action type\n collectionName (string, optional) \u2014 Variable collection name (for SET_VARIABLE_MODE)\n modeName (string, optional) \u2014 Mode name to switch to (for SET_VARIABLE_MODE)\n resetScrollPosition (boolean, optional) \u2014 Reset scroll position on navigate (default: true)\n actions (array, optional) \u2014 Multi-action: [{actionType, destination?, navigation?, collectionName?, modeName?, ...}]. Overrides single-action params.\n items (array, optional) \u2014 Batch: array of {id, trigger, destination?, ...} reaction items\n id (string, required) \u2014 Node ID\n trigger (ON_CLICK | ON_HOVER | ON_PRESS | ON_DRAG | AFTER_TIMEOUT | MOUSE_ENTER | MOUSE_LEAVE | ON_KEY_DOWN, required) \u2014 Trigger type\n destination (string, optional) \u2014 Target node ID\n navigation (NAVIGATE | SWAP | OVERLAY | SCROLL_TO | CHANGE_TO, optional)\n transition (DISSOLVE | SMART_ANIMATE | MOVE_IN | MOVE_OUT | PUSH | SLIDE_IN | SLIDE_OUT | INSTANT, optional)\n transitionDirection (LEFT | RIGHT | TOP | BOTTOM, optional)\n duration (number, optional)\n easing (EASE_IN | EASE_OUT | EASE_IN_AND_OUT | LINEAR | GENTLE | QUICK | BOUNCY | SLOW, optional)\n actionType (NODE | BACK | CLOSE | URL | SET_VARIABLE_MODE, optional)\n triggerDelay (number, optional)\n url (string, optional)\n collectionName (string, optional)\n modeName (string, optional)\n resetScrollPosition (boolean, optional)\n actions (array, optional)',
|
|
772
780
|
"set": "# prototyping.set\nReplace all reactions on a node (raw reactions array)\n\nParams:\n id (string, required) \u2014 Node ID\n reactions (array, required) \u2014 Full reactions array \u2014 [{trigger:{type}, actions:[{type, destinationId, navigation, transition}]}]",
|
|
773
781
|
"remove": "# prototyping.remove\nRemove a reaction from a node by index\n\nParams:\n id (string, required) \u2014 Node ID\n index (number, required) \u2014 Reaction index (0-based)"
|
|
774
782
|
}
|
|
@@ -785,8 +793,8 @@ Use lint(method: "help", topic: "<method>") for method details.`,
|
|
|
785
793
|
"methods": {
|
|
786
794
|
"list": '# styles.list\nList local styles with optional type filter\n\nParams:\n type (paint | text | effect | grid, optional) \u2014 Filter by style type\n fields (string[], optional) \u2014 Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass ["*"] for all.\n offset (number, optional) \u2014 Skip N items for pagination (default 0)\n limit (number, optional) \u2014 Max items per page (default 100)',
|
|
787
795
|
"get": '# styles.get\nGet full style detail by ID\n\nParams:\n id (string, required) \u2014 Style ID or name\n fields (string[], optional) \u2014 Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass ["*"] for all.',
|
|
788
|
-
"create": '# styles.create\nCreate local styles\n\nExample: styles(method:"create", type:"effect", name:"Shadow/Medium", effects:[{type:"DROP_SHADOW", color:"#00000040", offset:{x:0,y:4}, radius:8}])\n\nDiscriminant: type (paint | text | effect | grid)\n\n ## paint \u2014 Paint/color style\n name (string, required) \u2014 Style name\n color (Color, optional) \u2014 Color value. Optional when colorVariableName is provided.\n colorVariableName (string, optional) \u2014 Bind to a COLOR variable by name (style tracks the variable). Can be used alone \u2014 color is resolved from the variable.\n description (string, optional) \u2014 Style description\n\n ## text \u2014 Text style\n name (string, required) \u2014 Style name\n fontFamily (string, required) \u2014 Font family\n fontStyle (string, optional) \u2014 Font style (default: Regular)\n fontSize (number, required) \u2014 Font size\n lineHeight (
|
|
789
|
-
"update": '# styles.update\nUpdate styles by ID or name\n\nExample: styles(method:"update", items:[{id:"Surface/Primary", color:"#F5F5F5"}])\n\nParams:\n type (paint | text | effect | grid, optional) \u2014 Style type hint for strict validation (optional, auto-detected)\n items (PatchStyleItem[], required) \u2014 Array of {id, ...fields} to update\n id (string, required) \u2014 Style ID or name\n name (string, optional) \u2014 Rename the style\n description (string, optional) \u2014 Style description\n color (Color, optional) \u2014 New color (paint styles)\n colorVariableName (string, optional) \u2014 Bind to a COLOR variable by name (paint styles)\n fontFamily (string, optional)\n fontStyle (string, optional)\n fontSize (number, optional)\n lineHeight (
|
|
796
|
+
"create": '# styles.create\nCreate local styles\n\nExample: styles(method:"create", type:"effect", name:"Shadow/Medium", effects:[{type:"DROP_SHADOW", color:"#00000040", offset:{x:0,y:4}, radius:8}])\n\nDiscriminant: type (paint | text | effect | grid)\n\n ## paint \u2014 Paint/color style\n name (string, required) \u2014 Style name\n color (Color, optional) \u2014 Color value. Optional when colorVariableName is provided.\n colorVariableName (string, optional) \u2014 Bind to a COLOR variable by name (style tracks the variable). Can be used alone \u2014 color is resolved from the variable.\n description (string, optional) \u2014 Style description\n\n ## text \u2014 Text style\n name (string, required) \u2014 Style name\n fontFamily (string, required) \u2014 Font family\n fontStyle (string, optional) \u2014 Font style (default: Regular)\n fontSize (number, required) \u2014 Font size\n lineHeight (number | {value, unit: "PIXELS"|"PERCENT"|"AUTO"}, optional)\n letterSpacing (number | {value, unit: "PIXELS"|"PERCENT"}, optional)\n textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)\n textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)\n paragraphIndent (number, optional) \u2014 Paragraph indent (px)\n paragraphSpacing (number, optional) \u2014 Paragraph spacing (px)\n leadingTrim (CAP_HEIGHT | NONE, optional) \u2014 Leading trim mode\n description (string, optional) \u2014 Style description\n\n ## effect \u2014 Effect style\n name (string, required) \u2014 Style name\n effects (array, required) \u2014 Array of Effect objects\n description (string, optional) \u2014 Style description\n\n ## grid \u2014 Grid/layout grid style\n name (string, required) \u2014 Style name\n layoutGrids (array, required) \u2014 Array of LayoutGrid objects\n description (string, optional) \u2014 Style description',
|
|
797
|
+
"update": '# styles.update\nUpdate styles by ID or name\n\nExample: styles(method:"update", items:[{id:"Surface/Primary", color:"#F5F5F5"}])\n\nParams:\n type (paint | text | effect | grid, optional) \u2014 Style type hint for strict validation (optional, auto-detected)\n items (PatchStyleItem[], required) \u2014 Array of {id, ...fields} to update\n id (string, required) \u2014 Style ID or name\n name (string, optional) \u2014 Rename the style\n description (string, optional) \u2014 Style description\n color (Color, optional) \u2014 New color (paint styles)\n colorVariableName (string, optional) \u2014 Bind to a COLOR variable by name (paint styles)\n fontFamily (string, optional)\n fontStyle (string, optional)\n fontSize (number, optional)\n lineHeight (number | {value, unit: "PIXELS"|"PERCENT"|"AUTO"}, optional)\n letterSpacing (number | {value, unit: "PIXELS"|"PERCENT"}, optional)\n textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)\n textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)\n paragraphIndent (number, optional) \u2014 Paragraph indent (px)\n paragraphSpacing (number, optional) \u2014 Paragraph spacing (px)\n leadingTrim (CAP_HEIGHT | NONE, optional)\n effects (array, optional) \u2014 Array of Effect objects\n layoutGrids (array, optional) \u2014 Array of LayoutGrid objects (grid styles)',
|
|
790
798
|
"delete": "# styles.delete\nDelete styles\n\nParams:\n id (string, optional) \u2014 Style ID or name\n items (array, optional) \u2014 Batch: [{id}, ...]\n id (string, required) \u2014 Style ID or name"
|
|
791
799
|
}
|
|
792
800
|
},
|
|
@@ -826,7 +834,7 @@ Params:
|
|
|
826
834
|
blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)
|
|
827
835
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
828
836
|
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: NONE)
|
|
829
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
837
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
830
838
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
831
839
|
paddingTop (string, optional)
|
|
832
840
|
paddingRight (string, optional)
|
|
@@ -847,6 +855,10 @@ Params:
|
|
|
847
855
|
fontFamily (string, optional) \u2014 Font family
|
|
848
856
|
fontStyle (string, optional) \u2014 Font variant e.g. "Bold", "Italic" \u2014 overrides fontWeight
|
|
849
857
|
fontWeight (number, optional) \u2014 100-900. Ignored when fontStyle is set.
|
|
858
|
+
lineHeight (number | {value, unit: "PIXELS"|"PERCENT"|"AUTO"}, optional)
|
|
859
|
+
letterSpacing (number | {value, unit: "PIXELS"|"PERCENT"}, optional)
|
|
860
|
+
textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)
|
|
861
|
+
textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)
|
|
850
862
|
fontColor (Color, optional) \u2014 Shorthand \u2014 sets text color (auto-binds to matching variable/style)
|
|
851
863
|
fontColorVariableName (string, optional) \u2014 Bind color variable by name e.g. 'text/primary'
|
|
852
864
|
fontColorStyleName (string, optional) \u2014 Apply paint style \u2014 overrides fontColor
|
|
@@ -903,6 +915,10 @@ Params:
|
|
|
903
915
|
fontStyle (string, optional) \u2014 Font variant e.g. "Bold", "Italic" \u2014 overrides fontWeight
|
|
904
916
|
fontSize (number, optional) \u2014 Font size (default: 14)
|
|
905
917
|
fontWeight (number, optional) \u2014 100-900 (default: 400). Ignored when fontStyle is set.
|
|
918
|
+
lineHeight (number | {value, unit: "PIXELS"|"PERCENT"|"AUTO"}, optional)
|
|
919
|
+
letterSpacing (number | {value, unit: "PIXELS"|"PERCENT"}, optional)
|
|
920
|
+
textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)
|
|
921
|
+
textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)
|
|
906
922
|
fills (array, optional) \u2014 Text color paints \u2014 e.g. [{type: 'SOLID', color: '#hex'}]. Same as node fills.
|
|
907
923
|
fontColor (Color, optional) \u2014 Shorthand \u2014 sets text color (auto-binds to matching variable/style)
|
|
908
924
|
fontColorVariableName (string, optional) \u2014 Bind color variable by name e.g. 'text/primary'
|
|
@@ -938,7 +954,7 @@ Params:
|
|
|
938
954
|
variables (array, optional) \u2014 Variables to create inside this collection
|
|
939
955
|
name (string, required) \u2014 Variable name (unique within collection)
|
|
940
956
|
type (COLOR | FLOAT | STRING | BOOLEAN, required) \u2014 Variable type
|
|
941
|
-
value (variable_value, optional) \u2014
|
|
957
|
+
value (variable_value, optional) \u2014 Sets all modes to this value. Use valuesByMode for per-mode control.
|
|
942
958
|
valuesByMode (object, optional) \u2014 Values keyed by mode name (e.g. {"Light": "#FFF", "Dark": "#111"})
|
|
943
959
|
description (string, optional)
|
|
944
960
|
scopes (string[], optional) \u2014 Restrict where variable can be applied (default: ALL_SCOPES)`,
|
|
@@ -950,11 +966,11 @@ Params:
|
|
|
950
966
|
}
|
|
951
967
|
},
|
|
952
968
|
"variables": {
|
|
953
|
-
"summary": '# variables\nSearch and update design variables within a collection.\n\nMethods:\n list Search variables within a collection [read]\n get Get variable detail by name [read]\n create Create variables in a collection. Use valuesByMode for
|
|
969
|
+
"summary": '# variables\nSearch and update design variables within a collection.\n\nMethods:\n list Search variables within a collection [read]\n get Get variable detail by name [read]\n create Create variables in a collection. Use valuesByMode for per-mode control, or value to set all modes at once. [create]\n update Update variable metadata and/or set values [edit]\n delete Delete variables [edit]\n\n// Search and update variables within a collection. collectionId is required on all methods.\n// Use variable_collections to create full token sets (collection + modes + variables in one call).\n// ---\n// query: prefix match first, then substring. "bg/" matches bg/canvas, bg/surface, etc.\n// valuesByMode: values keyed by mode name. On create, value sets all modes; on update, value sets the default mode only.\n// Aliases: {type: "VARIABLE_ALIAS", name: "other/variable"}.\n// scopes: ALL_SCOPES, TEXT_CONTENT, WIDTH_HEIGHT, GAP, CORNER_RADIUS, ALL_FILLS, FRAME_FILL, SHAPE_FILL,\n// TEXT_FILL, STROKE_COLOR, STROKE_FLOAT, EFFECT_FLOAT, EFFECT_COLOR, OPACITY, FONT_FAMILY, FONT_STYLE,\n// FONT_WEIGHT, FONT_SIZE, LINE_HEIGHT, LETTER_SPACING, PARAGRAPH_SPACING, PARAGRAPH_INDENT\n\nUse variables(method: "help", topic: "<method>") for method details.',
|
|
954
970
|
"methods": {
|
|
955
971
|
"list": '# variables.list\nSearch variables within a collection\n\nExample: variables(method:"list", collectionId:"Colors", query:"bg/")\n\nParams:\n collectionId (string, required) \u2014 Collection ID or name\n query (string, optional) \u2014 Search query \u2014 prefix match first, then substring fallback\n type (COLOR | FLOAT | STRING | BOOLEAN, optional) \u2014 Filter by variable type\n fields (string[], optional) \u2014 Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass ["*"] for all.\n offset (number, optional) \u2014 Skip N items for pagination (default 0)\n limit (number, optional) \u2014 Max items per page (default 100)',
|
|
956
972
|
"get": '# variables.get\nGet variable detail by name\n\nParams:\n name (string, required) \u2014 Variable name (unique within collection)\n collectionId (string, required) \u2014 Collection ID or name\n fields (string[], optional) \u2014 Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass ["*"] for all.',
|
|
957
|
-
"create": '# variables.create\nCreate variables in a collection. Use valuesByMode for
|
|
973
|
+
"create": '# variables.create\nCreate variables in a collection. Use valuesByMode for per-mode control, or value to set all modes at once.\n\nExample: variables(method:"create", collectionId:"Colors", items:[{name:"bg/primary", type:"COLOR", valuesByMode:{"Light":"#FFF","Dark":"#111"}, scopes:["ALL_FILLS"]}])\n\nParams:\n collectionId (string, required) \u2014 Collection ID or name\n items (VariableCreateItem[], required) \u2014 Array of variables to create\n name (string, required) \u2014 Variable name (must be unique within collection)\n type (COLOR | FLOAT | STRING | BOOLEAN, required) \u2014 Variable type\n value (variable_value, optional) \u2014 Sets all modes to this value. Use valuesByMode for per-mode control.\n valuesByMode (object, optional) \u2014 Values keyed by mode name (e.g. {"Light": "#FFF", "Dark": "#111"}). Takes precedence over value.\n description (string, optional) \u2014 Variable description\n scopes (string[], optional) \u2014 Restrict where variable can be applied (default: ALL_SCOPES)',
|
|
958
974
|
"update": '# variables.update\nUpdate variable metadata and/or set values\n\nExample: variables(method:"update", collectionId:"Colors", items:[{name:"bg/primary", valuesByMode:{"Light":"#FFF","Dark":"#222"}}])\n\nParams:\n collectionId (string, required) \u2014 Collection ID or name\n items (VariableUpdateItem[], required) \u2014 Array of variable updates\n name (string, required) \u2014 Variable name\n rename (string, optional) \u2014 Rename the variable\n description (string, optional) \u2014 Set description\n scopes (string[], optional) \u2014 Update scopes\n value (variable_value, optional) \u2014 Shorthand \u2014 sets the default mode value. Use valuesByMode for multi-mode.\n valuesByMode (object, optional) \u2014 Values keyed by mode name. Takes precedence over value.',
|
|
959
975
|
"delete": "# variables.delete\nDelete variables\n\nParams:\n collectionId (string, required) \u2014 Collection ID or name\n name (string, optional) \u2014 Variable name\n items (array, optional) \u2014 Batch: [{name}, ...]\n name (string, required)"
|
|
960
976
|
}
|
package/dist/tools/registry.js
CHANGED
|
@@ -120,7 +120,7 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
120
120
|
bottomLeftRadius (string, optional)
|
|
121
121
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
122
122
|
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)
|
|
123
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
123
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
124
124
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
125
125
|
paddingTop (string, optional)
|
|
126
126
|
paddingRight (string, optional)
|
|
@@ -186,7 +186,7 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
186
186
|
bottomLeftRadius (string, optional)
|
|
187
187
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
188
188
|
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)
|
|
189
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
189
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
190
190
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
191
191
|
paddingTop (string, optional)
|
|
192
192
|
paddingRight (string, optional)
|
|
@@ -272,7 +272,7 @@ Params:
|
|
|
272
272
|
blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)
|
|
273
273
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
274
274
|
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: NONE)
|
|
275
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
275
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
276
276
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
277
277
|
paddingTop (string, optional)
|
|
278
278
|
paddingRight (string, optional)
|
|
@@ -293,6 +293,10 @@ Params:
|
|
|
293
293
|
fontFamily (string, optional) \u2014 Font family
|
|
294
294
|
fontStyle (string, optional) \u2014 Font variant e.g. "Bold", "Italic" \u2014 overrides fontWeight
|
|
295
295
|
fontWeight (number, optional) \u2014 100-900. Ignored when fontStyle is set.
|
|
296
|
+
lineHeight (number | {value, unit: "PIXELS"|"PERCENT"|"AUTO"}, optional)
|
|
297
|
+
letterSpacing (number | {value, unit: "PIXELS"|"PERCENT"}, optional)
|
|
298
|
+
textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)
|
|
299
|
+
textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)
|
|
296
300
|
fontColor (Color, optional) \u2014 Shorthand \u2014 sets text color (auto-binds to matching variable/style)
|
|
297
301
|
fontColorVariableName (string, optional) \u2014 Bind color variable by name e.g. 'text/primary'
|
|
298
302
|
fontColorStyleName (string, optional) \u2014 Apply paint style \u2014 overrides fontColor
|
|
@@ -374,7 +378,7 @@ Discriminant: type (frame | auto_layout | section | rectangle | ellipse | line |
|
|
|
374
378
|
bottomLeftRadius (string, optional)
|
|
375
379
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
376
380
|
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)
|
|
377
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
381
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
378
382
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
379
383
|
paddingTop (string, optional)
|
|
380
384
|
paddingRight (string, optional)
|
|
@@ -430,7 +434,7 @@ Discriminant: type (frame | auto_layout | section | rectangle | ellipse | line |
|
|
|
430
434
|
bottomLeftRadius (string, optional)
|
|
431
435
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
432
436
|
layoutMode (HORIZONTAL | VERTICAL, required) \u2014 Primary axis direction
|
|
433
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
437
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
434
438
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
435
439
|
paddingTop (string, optional)
|
|
436
440
|
paddingRight (string, optional)
|
|
@@ -627,7 +631,7 @@ Params:
|
|
|
627
631
|
blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)
|
|
628
632
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
629
633
|
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: NONE)
|
|
630
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
634
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
631
635
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
632
636
|
paddingTop (string, optional)
|
|
633
637
|
paddingRight (string, optional)
|
|
@@ -648,6 +652,10 @@ Params:
|
|
|
648
652
|
fontFamily (string, optional) \u2014 Font family
|
|
649
653
|
fontStyle (string, optional) \u2014 Font variant e.g. "Bold", "Italic" \u2014 overrides fontWeight
|
|
650
654
|
fontWeight (number, optional) \u2014 100-900. Ignored when fontStyle is set.
|
|
655
|
+
lineHeight (number | {value, unit: "PIXELS"|"PERCENT"|"AUTO"}, optional)
|
|
656
|
+
letterSpacing (number | {value, unit: "PIXELS"|"PERCENT"}, optional)
|
|
657
|
+
textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)
|
|
658
|
+
textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)
|
|
651
659
|
fontColor (Color, optional) \u2014 Shorthand \u2014 sets text color (auto-binds to matching variable/style)
|
|
652
660
|
fontColorVariableName (string, optional) \u2014 Bind color variable by name e.g. 'text/primary'
|
|
653
661
|
fontColorStyleName (string, optional) \u2014 Apply paint style \u2014 overrides fontColor
|
|
@@ -745,7 +753,7 @@ Use lint(method: "help", topic: "<method>") for method details.`,
|
|
|
745
753
|
"summary": '# prototyping\nManage prototype interactions, reactions, and navigation flows.\n\nMethods:\n get Get reactions and overflow direction on a node [read]\n add Add a prototype reaction to a node [edit]\n set Replace all reactions on a node (raw reactions array) [edit]\n remove Remove a reaction from a node by index [edit]\n\n// Reactions wire up interactions: trigger (ON_CLICK, ON_HOVER, ...) \u2192 action (navigate, swap, overlay).\n// Common patterns: button ON_CLICK \u2192 NAVIGATE to detail frame; card ON_HOVER \u2192 CHANGE_TO hover variant.\n// Multi-action: pass actions[] array to run multiple actions on one trigger (e.g. navigate + set variable mode).\n// ---\n// IMPORTANT: destination rules depend on navigation type:\n// NAVIGATE/SWAP/OVERLAY/SCROLL_TO \u2192 destination must be a top-level frame (direct child of a page). Nested frames are rejected.\n// CHANGE_TO \u2192 destination must be a variant (COMPONENT inside a COMPONENT_SET). Used for hover/state swaps within the same component.\n// ---\n// TRIGGERS: ON_CLICK | ON_HOVER | ON_PRESS | ON_DRAG | AFTER_TIMEOUT(timeout) | MOUSE_ENTER(delay) | MOUSE_LEAVE(delay) | ON_KEY_DOWN(keyCodes)\n// NAVIGATION: NAVIGATE (go to frame) | SWAP (swap overlay) | OVERLAY (show overlay) | SCROLL_TO | CHANGE_TO (swap component variant)\n// TRANSITIONS: DISSOLVE | SMART_ANIMATE | MOVE_IN | MOVE_OUT | PUSH | SLIDE_IN | SLIDE_OUT (+ direction for directional)\n// EASING: EASE_IN | EASE_OUT | EASE_IN_AND_OUT | LINEAR | GENTLE | QUICK | BOUNCY | SLOW\n// ACTIONS: NODE (navigate/swap) | BACK (go back) | CLOSE (close overlay) | URL (open link) | SET_VARIABLE_MODE (switch theme/mode)\n\nUse prototyping(method: "help", topic: "<method>") for method details.',
|
|
746
754
|
"methods": {
|
|
747
755
|
"get": "# prototyping.get\nGet reactions and overflow direction on a node\n\nParams:\n id (string, required) \u2014 Node ID",
|
|
748
|
-
"add": '# prototyping.add\nAdd a prototype reaction to a node\n\nExample: prototyping(method:"add", id:"btn-1", trigger:"ON_CLICK", destination:"
|
|
756
|
+
"add": '# prototyping.add\nAdd a prototype reaction to a node\n\nExample: prototyping(method:"add", items:[{id:"btn-1", trigger:"ON_CLICK", destination:"frame-2", navigation:"NAVIGATE", transition:"SMART_ANIMATE"}, {id:"btn-2", trigger:"ON_CLICK", destination:"frame-3"}])\n\nParams:\n id (string, optional) \u2014 Node ID\n trigger (ON_CLICK | ON_HOVER | ON_PRESS | ON_DRAG | AFTER_TIMEOUT | MOUSE_ENTER | MOUSE_LEAVE | ON_KEY_DOWN, optional) \u2014 Trigger type\n triggerDelay (number, optional) \u2014 Delay in ms for AFTER_TIMEOUT / MOUSE_ENTER / MOUSE_LEAVE triggers\n triggerKeyCodes (number[], optional) \u2014 Key codes for ON_KEY_DOWN trigger\n triggerDevice (KEYBOARD | XBOX_ONE | PS4 | SWITCH_PRO, optional) \u2014 Device for ON_KEY_DOWN (default: KEYBOARD)\n destination (string, optional) \u2014 Target node ID (required for NODE actions). NAVIGATE/SWAP/OVERLAY: must be a top-level frame. CHANGE_TO: must be a variant (component inside a component set).\n navigation (NAVIGATE | SWAP | OVERLAY | SCROLL_TO | CHANGE_TO, optional) \u2014 Navigation type (default: NAVIGATE)\n transition (DISSOLVE | SMART_ANIMATE | MOVE_IN | MOVE_OUT | PUSH | SLIDE_IN | SLIDE_OUT | INSTANT, optional) \u2014 Transition animation (default: DISSOLVE). INSTANT = no animation.\n transitionDirection (LEFT | RIGHT | TOP | BOTTOM, optional) \u2014 Direction for MOVE_IN, MOVE_OUT, PUSH, SLIDE_IN, SLIDE_OUT\n duration (number, optional) \u2014 Transition duration in seconds (default: 0.3)\n easing (EASE_IN | EASE_OUT | EASE_IN_AND_OUT | LINEAR | GENTLE | QUICK | BOUNCY | SLOW, optional) \u2014 Easing function (default: EASE_OUT)\n actionType (NODE | BACK | CLOSE | URL | SET_VARIABLE_MODE, optional) \u2014 Action type (default: NODE). SET_VARIABLE_MODE switches a variable collection mode.\n url (string, optional) \u2014 URL for URL action type\n collectionName (string, optional) \u2014 Variable collection name (for SET_VARIABLE_MODE)\n modeName (string, optional) \u2014 Mode name to switch to (for SET_VARIABLE_MODE)\n resetScrollPosition (boolean, optional) \u2014 Reset scroll position on navigate (default: true)\n actions (array, optional) \u2014 Multi-action: [{actionType, destination?, navigation?, collectionName?, modeName?, ...}]. Overrides single-action params.\n items (array, optional) \u2014 Batch: array of {id, trigger, destination?, ...} reaction items\n id (string, required) \u2014 Node ID\n trigger (ON_CLICK | ON_HOVER | ON_PRESS | ON_DRAG | AFTER_TIMEOUT | MOUSE_ENTER | MOUSE_LEAVE | ON_KEY_DOWN, required) \u2014 Trigger type\n destination (string, optional) \u2014 Target node ID\n navigation (NAVIGATE | SWAP | OVERLAY | SCROLL_TO | CHANGE_TO, optional)\n transition (DISSOLVE | SMART_ANIMATE | MOVE_IN | MOVE_OUT | PUSH | SLIDE_IN | SLIDE_OUT | INSTANT, optional)\n transitionDirection (LEFT | RIGHT | TOP | BOTTOM, optional)\n duration (number, optional)\n easing (EASE_IN | EASE_OUT | EASE_IN_AND_OUT | LINEAR | GENTLE | QUICK | BOUNCY | SLOW, optional)\n actionType (NODE | BACK | CLOSE | URL | SET_VARIABLE_MODE, optional)\n triggerDelay (number, optional)\n url (string, optional)\n collectionName (string, optional)\n modeName (string, optional)\n resetScrollPosition (boolean, optional)\n actions (array, optional)',
|
|
749
757
|
"set": "# prototyping.set\nReplace all reactions on a node (raw reactions array)\n\nParams:\n id (string, required) \u2014 Node ID\n reactions (array, required) \u2014 Full reactions array \u2014 [{trigger:{type}, actions:[{type, destinationId, navigation, transition}]}]",
|
|
750
758
|
"remove": "# prototyping.remove\nRemove a reaction from a node by index\n\nParams:\n id (string, required) \u2014 Node ID\n index (number, required) \u2014 Reaction index (0-based)"
|
|
751
759
|
}
|
|
@@ -762,8 +770,8 @@ Use lint(method: "help", topic: "<method>") for method details.`,
|
|
|
762
770
|
"methods": {
|
|
763
771
|
"list": '# styles.list\nList local styles with optional type filter\n\nParams:\n type (paint | text | effect | grid, optional) \u2014 Filter by style type\n fields (string[], optional) \u2014 Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass ["*"] for all.\n offset (number, optional) \u2014 Skip N items for pagination (default 0)\n limit (number, optional) \u2014 Max items per page (default 100)',
|
|
764
772
|
"get": '# styles.get\nGet full style detail by ID\n\nParams:\n id (string, required) \u2014 Style ID or name\n fields (string[], optional) \u2014 Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass ["*"] for all.',
|
|
765
|
-
"create": '# styles.create\nCreate local styles\n\nExample: styles(method:"create", type:"effect", name:"Shadow/Medium", effects:[{type:"DROP_SHADOW", color:"#00000040", offset:{x:0,y:4}, radius:8}])\n\nDiscriminant: type (paint | text | effect | grid)\n\n ## paint \u2014 Paint/color style\n name (string, required) \u2014 Style name\n color (Color, optional) \u2014 Color value. Optional when colorVariableName is provided.\n colorVariableName (string, optional) \u2014 Bind to a COLOR variable by name (style tracks the variable). Can be used alone \u2014 color is resolved from the variable.\n description (string, optional) \u2014 Style description\n\n ## text \u2014 Text style\n name (string, required) \u2014 Style name\n fontFamily (string, required) \u2014 Font family\n fontStyle (string, optional) \u2014 Font style (default: Regular)\n fontSize (number, required) \u2014 Font size\n lineHeight (
|
|
766
|
-
"update": '# styles.update\nUpdate styles by ID or name\n\nExample: styles(method:"update", items:[{id:"Surface/Primary", color:"#F5F5F5"}])\n\nParams:\n type (paint | text | effect | grid, optional) \u2014 Style type hint for strict validation (optional, auto-detected)\n items (PatchStyleItem[], required) \u2014 Array of {id, ...fields} to update\n id (string, required) \u2014 Style ID or name\n name (string, optional) \u2014 Rename the style\n description (string, optional) \u2014 Style description\n color (Color, optional) \u2014 New color (paint styles)\n colorVariableName (string, optional) \u2014 Bind to a COLOR variable by name (paint styles)\n fontFamily (string, optional)\n fontStyle (string, optional)\n fontSize (number, optional)\n lineHeight (
|
|
773
|
+
"create": '# styles.create\nCreate local styles\n\nExample: styles(method:"create", type:"effect", name:"Shadow/Medium", effects:[{type:"DROP_SHADOW", color:"#00000040", offset:{x:0,y:4}, radius:8}])\n\nDiscriminant: type (paint | text | effect | grid)\n\n ## paint \u2014 Paint/color style\n name (string, required) \u2014 Style name\n color (Color, optional) \u2014 Color value. Optional when colorVariableName is provided.\n colorVariableName (string, optional) \u2014 Bind to a COLOR variable by name (style tracks the variable). Can be used alone \u2014 color is resolved from the variable.\n description (string, optional) \u2014 Style description\n\n ## text \u2014 Text style\n name (string, required) \u2014 Style name\n fontFamily (string, required) \u2014 Font family\n fontStyle (string, optional) \u2014 Font style (default: Regular)\n fontSize (number, required) \u2014 Font size\n lineHeight (number | {value, unit: "PIXELS"|"PERCENT"|"AUTO"}, optional)\n letterSpacing (number | {value, unit: "PIXELS"|"PERCENT"}, optional)\n textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)\n textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)\n paragraphIndent (number, optional) \u2014 Paragraph indent (px)\n paragraphSpacing (number, optional) \u2014 Paragraph spacing (px)\n leadingTrim (CAP_HEIGHT | NONE, optional) \u2014 Leading trim mode\n description (string, optional) \u2014 Style description\n\n ## effect \u2014 Effect style\n name (string, required) \u2014 Style name\n effects (array, required) \u2014 Array of Effect objects\n description (string, optional) \u2014 Style description\n\n ## grid \u2014 Grid/layout grid style\n name (string, required) \u2014 Style name\n layoutGrids (array, required) \u2014 Array of LayoutGrid objects\n description (string, optional) \u2014 Style description',
|
|
774
|
+
"update": '# styles.update\nUpdate styles by ID or name\n\nExample: styles(method:"update", items:[{id:"Surface/Primary", color:"#F5F5F5"}])\n\nParams:\n type (paint | text | effect | grid, optional) \u2014 Style type hint for strict validation (optional, auto-detected)\n items (PatchStyleItem[], required) \u2014 Array of {id, ...fields} to update\n id (string, required) \u2014 Style ID or name\n name (string, optional) \u2014 Rename the style\n description (string, optional) \u2014 Style description\n color (Color, optional) \u2014 New color (paint styles)\n colorVariableName (string, optional) \u2014 Bind to a COLOR variable by name (paint styles)\n fontFamily (string, optional)\n fontStyle (string, optional)\n fontSize (number, optional)\n lineHeight (number | {value, unit: "PIXELS"|"PERCENT"|"AUTO"}, optional)\n letterSpacing (number | {value, unit: "PIXELS"|"PERCENT"}, optional)\n textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)\n textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)\n paragraphIndent (number, optional) \u2014 Paragraph indent (px)\n paragraphSpacing (number, optional) \u2014 Paragraph spacing (px)\n leadingTrim (CAP_HEIGHT | NONE, optional)\n effects (array, optional) \u2014 Array of Effect objects\n layoutGrids (array, optional) \u2014 Array of LayoutGrid objects (grid styles)',
|
|
767
775
|
"delete": "# styles.delete\nDelete styles\n\nParams:\n id (string, optional) \u2014 Style ID or name\n items (array, optional) \u2014 Batch: [{id}, ...]\n id (string, required) \u2014 Style ID or name"
|
|
768
776
|
}
|
|
769
777
|
},
|
|
@@ -803,7 +811,7 @@ Params:
|
|
|
803
811
|
blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)
|
|
804
812
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
805
813
|
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: NONE)
|
|
806
|
-
layoutWrap (NO_WRAP | WRAP, optional)
|
|
814
|
+
layoutWrap (NO_WRAP | WRAP, optional) \u2014 Wrap children to new rows (HORIZONTAL layout only \u2014 Figma does not support WRAP on VERTICAL layouts). Use column frames inside a HORIZONTAL parent for vertical grid patterns.
|
|
807
815
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
808
816
|
paddingTop (string, optional)
|
|
809
817
|
paddingRight (string, optional)
|
|
@@ -824,6 +832,10 @@ Params:
|
|
|
824
832
|
fontFamily (string, optional) \u2014 Font family
|
|
825
833
|
fontStyle (string, optional) \u2014 Font variant e.g. "Bold", "Italic" \u2014 overrides fontWeight
|
|
826
834
|
fontWeight (number, optional) \u2014 100-900. Ignored when fontStyle is set.
|
|
835
|
+
lineHeight (number | {value, unit: "PIXELS"|"PERCENT"|"AUTO"}, optional)
|
|
836
|
+
letterSpacing (number | {value, unit: "PIXELS"|"PERCENT"}, optional)
|
|
837
|
+
textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)
|
|
838
|
+
textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)
|
|
827
839
|
fontColor (Color, optional) \u2014 Shorthand \u2014 sets text color (auto-binds to matching variable/style)
|
|
828
840
|
fontColorVariableName (string, optional) \u2014 Bind color variable by name e.g. 'text/primary'
|
|
829
841
|
fontColorStyleName (string, optional) \u2014 Apply paint style \u2014 overrides fontColor
|
|
@@ -880,6 +892,10 @@ Params:
|
|
|
880
892
|
fontStyle (string, optional) \u2014 Font variant e.g. "Bold", "Italic" \u2014 overrides fontWeight
|
|
881
893
|
fontSize (number, optional) \u2014 Font size (default: 14)
|
|
882
894
|
fontWeight (number, optional) \u2014 100-900 (default: 400). Ignored when fontStyle is set.
|
|
895
|
+
lineHeight (number | {value, unit: "PIXELS"|"PERCENT"|"AUTO"}, optional)
|
|
896
|
+
letterSpacing (number | {value, unit: "PIXELS"|"PERCENT"}, optional)
|
|
897
|
+
textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)
|
|
898
|
+
textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)
|
|
883
899
|
fills (array, optional) \u2014 Text color paints \u2014 e.g. [{type: 'SOLID', color: '#hex'}]. Same as node fills.
|
|
884
900
|
fontColor (Color, optional) \u2014 Shorthand \u2014 sets text color (auto-binds to matching variable/style)
|
|
885
901
|
fontColorVariableName (string, optional) \u2014 Bind color variable by name e.g. 'text/primary'
|
|
@@ -915,7 +931,7 @@ Params:
|
|
|
915
931
|
variables (array, optional) \u2014 Variables to create inside this collection
|
|
916
932
|
name (string, required) \u2014 Variable name (unique within collection)
|
|
917
933
|
type (COLOR | FLOAT | STRING | BOOLEAN, required) \u2014 Variable type
|
|
918
|
-
value (variable_value, optional) \u2014
|
|
934
|
+
value (variable_value, optional) \u2014 Sets all modes to this value. Use valuesByMode for per-mode control.
|
|
919
935
|
valuesByMode (object, optional) \u2014 Values keyed by mode name (e.g. {"Light": "#FFF", "Dark": "#111"})
|
|
920
936
|
description (string, optional)
|
|
921
937
|
scopes (string[], optional) \u2014 Restrict where variable can be applied (default: ALL_SCOPES)`,
|
|
@@ -927,11 +943,11 @@ Params:
|
|
|
927
943
|
}
|
|
928
944
|
},
|
|
929
945
|
"variables": {
|
|
930
|
-
"summary": '# variables\nSearch and update design variables within a collection.\n\nMethods:\n list Search variables within a collection [read]\n get Get variable detail by name [read]\n create Create variables in a collection. Use valuesByMode for
|
|
946
|
+
"summary": '# variables\nSearch and update design variables within a collection.\n\nMethods:\n list Search variables within a collection [read]\n get Get variable detail by name [read]\n create Create variables in a collection. Use valuesByMode for per-mode control, or value to set all modes at once. [create]\n update Update variable metadata and/or set values [edit]\n delete Delete variables [edit]\n\n// Search and update variables within a collection. collectionId is required on all methods.\n// Use variable_collections to create full token sets (collection + modes + variables in one call).\n// ---\n// query: prefix match first, then substring. "bg/" matches bg/canvas, bg/surface, etc.\n// valuesByMode: values keyed by mode name. On create, value sets all modes; on update, value sets the default mode only.\n// Aliases: {type: "VARIABLE_ALIAS", name: "other/variable"}.\n// scopes: ALL_SCOPES, TEXT_CONTENT, WIDTH_HEIGHT, GAP, CORNER_RADIUS, ALL_FILLS, FRAME_FILL, SHAPE_FILL,\n// TEXT_FILL, STROKE_COLOR, STROKE_FLOAT, EFFECT_FLOAT, EFFECT_COLOR, OPACITY, FONT_FAMILY, FONT_STYLE,\n// FONT_WEIGHT, FONT_SIZE, LINE_HEIGHT, LETTER_SPACING, PARAGRAPH_SPACING, PARAGRAPH_INDENT\n\nUse variables(method: "help", topic: "<method>") for method details.',
|
|
931
947
|
"methods": {
|
|
932
948
|
"list": '# variables.list\nSearch variables within a collection\n\nExample: variables(method:"list", collectionId:"Colors", query:"bg/")\n\nParams:\n collectionId (string, required) \u2014 Collection ID or name\n query (string, optional) \u2014 Search query \u2014 prefix match first, then substring fallback\n type (COLOR | FLOAT | STRING | BOOLEAN, optional) \u2014 Filter by variable type\n fields (string[], optional) \u2014 Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass ["*"] for all.\n offset (number, optional) \u2014 Skip N items for pagination (default 0)\n limit (number, optional) \u2014 Max items per page (default 100)',
|
|
933
949
|
"get": '# variables.get\nGet variable detail by name\n\nParams:\n name (string, required) \u2014 Variable name (unique within collection)\n collectionId (string, required) \u2014 Collection ID or name\n fields (string[], optional) \u2014 Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass ["*"] for all.',
|
|
934
|
-
"create": '# variables.create\nCreate variables in a collection. Use valuesByMode for
|
|
950
|
+
"create": '# variables.create\nCreate variables in a collection. Use valuesByMode for per-mode control, or value to set all modes at once.\n\nExample: variables(method:"create", collectionId:"Colors", items:[{name:"bg/primary", type:"COLOR", valuesByMode:{"Light":"#FFF","Dark":"#111"}, scopes:["ALL_FILLS"]}])\n\nParams:\n collectionId (string, required) \u2014 Collection ID or name\n items (VariableCreateItem[], required) \u2014 Array of variables to create\n name (string, required) \u2014 Variable name (must be unique within collection)\n type (COLOR | FLOAT | STRING | BOOLEAN, required) \u2014 Variable type\n value (variable_value, optional) \u2014 Sets all modes to this value. Use valuesByMode for per-mode control.\n valuesByMode (object, optional) \u2014 Values keyed by mode name (e.g. {"Light": "#FFF", "Dark": "#111"}). Takes precedence over value.\n description (string, optional) \u2014 Variable description\n scopes (string[], optional) \u2014 Restrict where variable can be applied (default: ALL_SCOPES)',
|
|
935
951
|
"update": '# variables.update\nUpdate variable metadata and/or set values\n\nExample: variables(method:"update", collectionId:"Colors", items:[{name:"bg/primary", valuesByMode:{"Light":"#FFF","Dark":"#222"}}])\n\nParams:\n collectionId (string, required) \u2014 Collection ID or name\n items (VariableUpdateItem[], required) \u2014 Array of variable updates\n name (string, required) \u2014 Variable name\n rename (string, optional) \u2014 Rename the variable\n description (string, optional) \u2014 Set description\n scopes (string[], optional) \u2014 Update scopes\n value (variable_value, optional) \u2014 Shorthand \u2014 sets the default mode value. Use valuesByMode for multi-mode.\n valuesByMode (object, optional) \u2014 Values keyed by mode name. Takes precedence over value.',
|
|
936
952
|
"delete": "# variables.delete\nDelete variables\n\nParams:\n collectionId (string, required) \u2014 Collection ID or name\n name (string, optional) \u2014 Variable name\n items (array, optional) \u2014 Batch: [{name}, ...]\n name (string, required)"
|
|
937
953
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ufira/vibma",
|
|
3
3
|
"description": "Vibma — Vibe Design meets Figma. AI-powered MCP bridge for designing in Figma.",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ufira <https://github.com/ufira-ai>",
|
|
7
7
|
"homepage": "https://github.com/ufira-ai/vibma",
|