@ufira/vibma 1.0.0-rc1 → 1.0.0-rc3
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 +37 -31
- package/dist/mcp.js +37 -31
- package/dist/tools/generated/guards.cjs +3 -0
- package/dist/tools/generated/guards.js +3 -0
- package/dist/tools/registry.cjs +18 -15
- package/dist/tools/registry.js +18 -15
- package/package.json +3 -2
- package/dist/mcp.cjs.map +0 -1
- package/dist/mcp.js.map +0 -1
- package/dist/tools/endpoint.cjs.map +0 -1
- package/dist/tools/endpoint.js.map +0 -1
- package/dist/tools/generated/guards.cjs.map +0 -1
- package/dist/tools/generated/guards.js.map +0 -1
- package/dist/tools/registry.cjs.map +0 -1
- package/dist/tools/registry.js.map +0 -1
- package/dist/tools/schemas.cjs.map +0 -1
- package/dist/tools/schemas.js.map +0 -1
- package/dist/tools/types.cjs.map +0 -1
- package/dist/tools/types.js.map +0 -1
- package/dist/utils/coercion.cjs.map +0 -1
- package/dist/utils/coercion.js.map +0 -1
- package/dist/utils/color.cjs.map +0 -1
- package/dist/utils/color.js.map +0 -1
- package/dist/utils/wcag.cjs.map +0 -1
- package/dist/utils/wcag.js.map +0 -1
package/dist/mcp.cjs
CHANGED
|
@@ -117,8 +117,8 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
117
117
|
parentId (string, optional) \u2014 Parent node ID. Omit to place on current page.
|
|
118
118
|
x (number, optional) \u2014 X position (default: 0)
|
|
119
119
|
y (number, optional) \u2014 Y position (default: 0)
|
|
120
|
-
width (number, optional) \u2014 Width (
|
|
121
|
-
height (number, optional) \u2014 Height (
|
|
120
|
+
width (number, optional) \u2014 Width in px (omit to shrink-to-content via HUG)
|
|
121
|
+
height (number, optional) \u2014 Height in px (omit to shrink-to-content via HUG)
|
|
122
122
|
rotation (number, optional) \u2014 Rotation in degrees (0-360)
|
|
123
123
|
opacity (string, optional) \u2014 Opacity (0-1) or variable name
|
|
124
124
|
visible (boolean, optional) \u2014 Show/hide (default true)
|
|
@@ -146,7 +146,7 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
146
146
|
bottomRightRadius (string, optional)
|
|
147
147
|
bottomLeftRadius (string, optional)
|
|
148
148
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
149
|
-
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: NONE)
|
|
149
|
+
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)
|
|
150
150
|
layoutWrap (NO_WRAP | WRAP, optional)
|
|
151
151
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
152
152
|
paddingTop (string, optional)
|
|
@@ -165,7 +165,7 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
165
165
|
maxHeight (number, optional) \u2014 Max height for responsive auto-layout
|
|
166
166
|
overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) \u2014 Scroll overflow in prototype (default: NONE)
|
|
167
167
|
description (string, optional) \u2014 Component description (shown in Figma's component panel)
|
|
168
|
-
children (array, optional) \u2014 Inline child nodes. Text: {type:"text", text, componentPropertyName?, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}.
|
|
168
|
+
children (array, optional) \u2014 Inline child nodes. Text: {type:"text", text, componentPropertyName?, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}. Instance: {type:"instance", componentId, componentPropertyName?, variantProperties?, properties?}. Component: {type:"component", name, children?}. componentPropertyName auto-creates and binds a TEXT (text) or INSTANCE_SWAP (instance) property.
|
|
169
169
|
properties (array, optional) \u2014 Component properties to define at creation: [{propertyName, type, defaultValue}]. TEXT properties for inline children with componentPropertyName are created automatically.
|
|
170
170
|
propertyName (string, required) \u2014 Property name
|
|
171
171
|
type (BOOLEAN | TEXT | INSTANCE_SWAP, required) \u2014 Property type
|
|
@@ -181,8 +181,8 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
181
181
|
parentId (string, optional) \u2014 Parent node ID. Omit to place on current page.
|
|
182
182
|
x (number, optional) \u2014 X position (default: 0)
|
|
183
183
|
y (number, optional) \u2014 Y position (default: 0)
|
|
184
|
-
width (number, optional) \u2014 Width (
|
|
185
|
-
height (number, optional) \u2014 Height (
|
|
184
|
+
width (number, optional) \u2014 Width in px (omit to shrink-to-content via HUG)
|
|
185
|
+
height (number, optional) \u2014 Height in px (omit to shrink-to-content via HUG)
|
|
186
186
|
rotation (number, optional) \u2014 Rotation in degrees (0-360)
|
|
187
187
|
opacity (string, optional) \u2014 Opacity (0-1) or variable name
|
|
188
188
|
visible (boolean, optional) \u2014 Show/hide (default true)
|
|
@@ -210,7 +210,7 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
210
210
|
bottomRightRadius (string, optional)
|
|
211
211
|
bottomLeftRadius (string, optional)
|
|
212
212
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
213
|
-
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: NONE)
|
|
213
|
+
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)
|
|
214
214
|
layoutWrap (NO_WRAP | WRAP, optional)
|
|
215
215
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
216
216
|
paddingTop (string, optional)
|
|
@@ -228,8 +228,9 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
228
228
|
minHeight (number, optional) \u2014 Min height for responsive auto-layout
|
|
229
229
|
maxHeight (number, optional) \u2014 Max height for responsive auto-layout
|
|
230
230
|
overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) \u2014 Scroll overflow in prototype (default: NONE)
|
|
231
|
-
componentIds (string[],
|
|
232
|
-
variantPropertyName (string, optional) \u2014 Rename the auto-generated variant property (default: 'Property 1')
|
|
231
|
+
componentIds (string[], optional) \u2014 Existing component IDs to combine (min 2). Alternative to children.
|
|
232
|
+
variantPropertyName (string, optional) \u2014 Rename the auto-generated variant property (default: 'Property 1')
|
|
233
|
+
children (array, optional) \u2014 Inline variant components. Each must be {type:"component", name, children?, ...frame_params}. All variants must share the same child structure. Alternative to componentIds \u2014 do not combine both.`,
|
|
233
234
|
"update": '# components.update\nAdd, edit, or delete component properties\n\nExample: components(method:"update", items:[{id:"1:23", propertyName:"Label", action:"edit", defaultValue:"Click Me"}])\n\nParams:\n items (UpdatePropertyItem[], required) \u2014 Array of {id, propertyName, action?, type?, defaultValue?, name?, preferredValues?}\n id (string, required) \u2014 Component or component set ID\n propertyName (string, required) \u2014 Property name with #suffix for edit/delete (e.g. "Label#1:0"). Call components.get to find exact keys. For add, plain name works.\n action (add | edit | delete | rename_variant, optional) \u2014 "add" (default): requires type + defaultValue. "edit": pass defaultValue to change default, name to rename property. "delete": just propertyName. "rename_variant": pass defaultValue=current option name, name=new option name.\n type (BOOLEAN | TEXT | INSTANCE_SWAP | VARIANT, optional) \u2014 Property type (required for add)\n defaultValue (string_or_boolean, optional) \u2014 Default value (add/edit). For rename_variant: the CURRENT option name to rename\n name (string, optional) \u2014 New name \u2014 for edit: renames the property itself, for rename_variant: the new option value name\n preferredValues (array, optional) \u2014 Preferred values for INSTANCE_SWAP\n depth (number, optional) \u2014 Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.',
|
|
234
235
|
"delete": "# components.delete\nDelete components or component sets\n\nParams:\n id (string, required) \u2014 Component or component set ID"
|
|
235
236
|
}
|
|
@@ -353,13 +354,13 @@ Example: frames(method:"create", type:"auto_layout", layoutMode:"VERTICAL", item
|
|
|
353
354
|
|
|
354
355
|
Discriminant: type (frame | auto_layout | section | rectangle | ellipse | line | group | boolean_operation | svg)
|
|
355
356
|
|
|
356
|
-
## frame \u2014
|
|
357
|
+
## frame \u2014 General-purpose frame \u2014 shrinks to content by default, static when width+height given
|
|
357
358
|
name (string, optional) \u2014 Node name
|
|
358
359
|
parentId (string, optional) \u2014 Parent node ID. Omit to place on current page.
|
|
359
360
|
x (number, optional) \u2014 X position (default: 0)
|
|
360
361
|
y (number, optional) \u2014 Y position (default: 0)
|
|
361
|
-
width (number, optional) \u2014 Width (
|
|
362
|
-
height (number, optional) \u2014 Height (
|
|
362
|
+
width (number, optional) \u2014 Width in px (omit to shrink-to-content via HUG)
|
|
363
|
+
height (number, optional) \u2014 Height in px (omit to shrink-to-content via HUG)
|
|
363
364
|
rotation (number, optional) \u2014 Rotation in degrees (0-360)
|
|
364
365
|
opacity (string, optional) \u2014 Opacity (0-1) or variable name
|
|
365
366
|
visible (boolean, optional) \u2014 Show/hide (default true)
|
|
@@ -387,7 +388,7 @@ Discriminant: type (frame | auto_layout | section | rectangle | ellipse | line |
|
|
|
387
388
|
bottomRightRadius (string, optional)
|
|
388
389
|
bottomLeftRadius (string, optional)
|
|
389
390
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
390
|
-
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: NONE)
|
|
391
|
+
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)
|
|
391
392
|
layoutWrap (NO_WRAP | WRAP, optional)
|
|
392
393
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
393
394
|
paddingTop (string, optional)
|
|
@@ -406,14 +407,15 @@ Discriminant: type (frame | auto_layout | section | rectangle | ellipse | line |
|
|
|
406
407
|
maxHeight (number, optional) \u2014 Max height for responsive auto-layout
|
|
407
408
|
overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) \u2014 Scroll overflow in prototype (default: NONE)
|
|
408
409
|
clipsContent (boolean, optional)
|
|
410
|
+
children (array, optional) \u2014 Inline child nodes. Text: {type:"text", text, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}. Instance: {type:"instance", componentId, variantProperties?, properties?}. Component: {type:"component", name, children?}. Inside components: add componentPropertyName to auto-bind TEXT or INSTANCE_SWAP properties.
|
|
409
411
|
|
|
410
412
|
## auto_layout \u2014 Auto-layout frame that arranges children automatically
|
|
411
413
|
name (string, optional) \u2014 Node name
|
|
412
414
|
parentId (string, optional) \u2014 Parent node ID. Omit to place on current page.
|
|
413
415
|
x (number, optional) \u2014 X position (default: 0)
|
|
414
416
|
y (number, optional) \u2014 Y position (default: 0)
|
|
415
|
-
width (number, optional) \u2014 Width (
|
|
416
|
-
height (number, optional) \u2014 Height (
|
|
417
|
+
width (number, optional) \u2014 Width in px (omit to shrink-to-content via HUG)
|
|
418
|
+
height (number, optional) \u2014 Height in px (omit to shrink-to-content via HUG)
|
|
417
419
|
rotation (number, optional) \u2014 Rotation in degrees (0-360)
|
|
418
420
|
opacity (string, optional) \u2014 Opacity (0-1) or variable name
|
|
419
421
|
visible (boolean, optional) \u2014 Show/hide (default true)
|
|
@@ -461,6 +463,7 @@ Discriminant: type (frame | auto_layout | section | rectangle | ellipse | line |
|
|
|
461
463
|
overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) \u2014 Scroll overflow in prototype (default: NONE)
|
|
462
464
|
clipsContent (boolean, optional)
|
|
463
465
|
nodeIds (string[], optional) \u2014 Existing node IDs to wrap into auto-layout
|
|
466
|
+
children (array, optional) \u2014 Inline child nodes. Text: {type:"text", text, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}. Instance: {type:"instance", componentId, variantProperties?, properties?}. Component: {type:"component", name, children?}. Inside components: add componentPropertyName to auto-bind TEXT or INSTANCE_SWAP properties.
|
|
464
467
|
|
|
465
468
|
## section \u2014 Figma section (top-level organizer)
|
|
466
469
|
name (string, required) \u2014 Section name
|
|
@@ -1167,8 +1170,8 @@ var tools = [
|
|
|
1167
1170
|
parentId: import_zod4.z.string().optional().describe("Parent node ID. Omit to place on current page."),
|
|
1168
1171
|
x: import_zod4.z.coerce.number().optional().describe("X position (default: 0)"),
|
|
1169
1172
|
y: import_zod4.z.coerce.number().optional().describe("Y position (default: 0)"),
|
|
1170
|
-
width: import_zod4.z.coerce.number().optional().describe("Width (
|
|
1171
|
-
height: import_zod4.z.coerce.number().optional().describe("Height (
|
|
1173
|
+
width: import_zod4.z.coerce.number().optional().describe("Width in px (omit to shrink-to-content via HUG)"),
|
|
1174
|
+
height: import_zod4.z.coerce.number().optional().describe("Height in px (omit to shrink-to-content via HUG)"),
|
|
1172
1175
|
rotation: import_zod4.z.coerce.number().optional().describe("Rotation in degrees (0-360)"),
|
|
1173
1176
|
opacity: token.optional().describe("Opacity (0-1) or variable name"),
|
|
1174
1177
|
visible: flexBool(import_zod4.z.boolean()).optional().describe("Show/hide (default true)"),
|
|
@@ -1196,7 +1199,7 @@ var tools = [
|
|
|
1196
1199
|
bottomRightRadius: token.optional(),
|
|
1197
1200
|
bottomLeftRadius: token.optional(),
|
|
1198
1201
|
effectStyleName: import_zod4.z.string().optional().describe("Effect style name (e.g. 'Shadow/Card') for shadows, blurs"),
|
|
1199
|
-
layoutMode: import_zod4.z.enum(["NONE", "HORIZONTAL", "VERTICAL"]).optional().describe("Layout direction (default: NONE)"),
|
|
1202
|
+
layoutMode: import_zod4.z.enum(["NONE", "HORIZONTAL", "VERTICAL"]).optional().describe("Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)"),
|
|
1200
1203
|
layoutWrap: import_zod4.z.enum(["NO_WRAP", "WRAP"]).optional(),
|
|
1201
1204
|
padding: token.optional().describe("All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft."),
|
|
1202
1205
|
paddingTop: token.optional(),
|
|
@@ -1215,7 +1218,7 @@ var tools = [
|
|
|
1215
1218
|
maxHeight: import_zod4.z.coerce.number().optional().describe("Max height for responsive auto-layout"),
|
|
1216
1219
|
overflowDirection: import_zod4.z.enum(["NONE", "HORIZONTAL", "VERTICAL", "BOTH"]).optional().describe("Scroll overflow in prototype (default: NONE)"),
|
|
1217
1220
|
description: import_zod4.z.string().optional().describe("Component description (shown in Figma's component panel)"),
|
|
1218
|
-
children: flexJson(import_zod4.z.array(import_zod4.z.record(import_zod4.z.string(), import_zod4.z.unknown()))).optional().describe('Inline child nodes. Text: {type:"text", text, componentPropertyName?, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}.
|
|
1221
|
+
children: flexJson(import_zod4.z.array(import_zod4.z.record(import_zod4.z.string(), import_zod4.z.unknown()))).optional().describe('Inline child nodes. Text: {type:"text", text, componentPropertyName?, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}. Instance: {type:"instance", componentId, componentPropertyName?, variantProperties?, properties?}. Component: {type:"component", name, children?}. componentPropertyName auto-creates and binds a TEXT (text) or INSTANCE_SWAP (instance) property.'),
|
|
1219
1222
|
properties: flexJson(import_zod4.z.array(import_zod4.z.record(import_zod4.z.string(), import_zod4.z.unknown()))).optional().describe("Component properties to define at creation: [{propertyName, type, defaultValue}]. TEXT properties for inline children with componentPropertyName are created automatically.")
|
|
1220
1223
|
}).passthrough(),
|
|
1221
1224
|
"from_node": import_zod4.z.object({
|
|
@@ -1227,8 +1230,8 @@ var tools = [
|
|
|
1227
1230
|
parentId: import_zod4.z.string().optional().describe("Parent node ID. Omit to place on current page."),
|
|
1228
1231
|
x: import_zod4.z.coerce.number().optional().describe("X position (default: 0)"),
|
|
1229
1232
|
y: import_zod4.z.coerce.number().optional().describe("Y position (default: 0)"),
|
|
1230
|
-
width: import_zod4.z.coerce.number().optional().describe("Width (
|
|
1231
|
-
height: import_zod4.z.coerce.number().optional().describe("Height (
|
|
1233
|
+
width: import_zod4.z.coerce.number().optional().describe("Width in px (omit to shrink-to-content via HUG)"),
|
|
1234
|
+
height: import_zod4.z.coerce.number().optional().describe("Height in px (omit to shrink-to-content via HUG)"),
|
|
1232
1235
|
rotation: import_zod4.z.coerce.number().optional().describe("Rotation in degrees (0-360)"),
|
|
1233
1236
|
opacity: token.optional().describe("Opacity (0-1) or variable name"),
|
|
1234
1237
|
visible: flexBool(import_zod4.z.boolean()).optional().describe("Show/hide (default true)"),
|
|
@@ -1256,7 +1259,7 @@ var tools = [
|
|
|
1256
1259
|
bottomRightRadius: token.optional(),
|
|
1257
1260
|
bottomLeftRadius: token.optional(),
|
|
1258
1261
|
effectStyleName: import_zod4.z.string().optional().describe("Effect style name (e.g. 'Shadow/Card') for shadows, blurs"),
|
|
1259
|
-
layoutMode: import_zod4.z.enum(["NONE", "HORIZONTAL", "VERTICAL"]).optional().describe("Layout direction (default: NONE)"),
|
|
1262
|
+
layoutMode: import_zod4.z.enum(["NONE", "HORIZONTAL", "VERTICAL"]).optional().describe("Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)"),
|
|
1260
1263
|
layoutWrap: import_zod4.z.enum(["NO_WRAP", "WRAP"]).optional(),
|
|
1261
1264
|
padding: token.optional().describe("All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft."),
|
|
1262
1265
|
paddingTop: token.optional(),
|
|
@@ -1274,8 +1277,9 @@ var tools = [
|
|
|
1274
1277
|
minHeight: import_zod4.z.coerce.number().optional().describe("Min height for responsive auto-layout"),
|
|
1275
1278
|
maxHeight: import_zod4.z.coerce.number().optional().describe("Max height for responsive auto-layout"),
|
|
1276
1279
|
overflowDirection: import_zod4.z.enum(["NONE", "HORIZONTAL", "VERTICAL", "BOTH"]).optional().describe("Scroll overflow in prototype (default: NONE)"),
|
|
1277
|
-
componentIds: flexJson(import_zod4.z.array(import_zod4.z.string())).describe("
|
|
1278
|
-
variantPropertyName: import_zod4.z.string().optional().describe("Rename the auto-generated variant property (default: 'Property 1')")
|
|
1280
|
+
componentIds: flexJson(import_zod4.z.array(import_zod4.z.string())).optional().describe("Existing component IDs to combine (min 2). Alternative to children."),
|
|
1281
|
+
variantPropertyName: import_zod4.z.string().optional().describe("Rename the auto-generated variant property (default: 'Property 1')"),
|
|
1282
|
+
children: flexJson(import_zod4.z.array(import_zod4.z.record(import_zod4.z.string(), import_zod4.z.unknown()))).optional().describe('Inline variant components. Each must be {type:"component", name, children?, ...frame_params}. All variants must share the same child structure. Alternative to componentIds \u2014 do not combine both.')
|
|
1279
1283
|
}).passthrough()
|
|
1280
1284
|
};
|
|
1281
1285
|
const s = params.type && schemas[params.type];
|
|
@@ -1407,8 +1411,8 @@ var tools = [
|
|
|
1407
1411
|
parentId: import_zod4.z.string().optional().describe("Parent node ID. Omit to place on current page."),
|
|
1408
1412
|
x: import_zod4.z.coerce.number().optional().describe("X position (default: 0)"),
|
|
1409
1413
|
y: import_zod4.z.coerce.number().optional().describe("Y position (default: 0)"),
|
|
1410
|
-
width: import_zod4.z.coerce.number().optional().describe("Width (
|
|
1411
|
-
height: import_zod4.z.coerce.number().optional().describe("Height (
|
|
1414
|
+
width: import_zod4.z.coerce.number().optional().describe("Width in px (omit to shrink-to-content via HUG)"),
|
|
1415
|
+
height: import_zod4.z.coerce.number().optional().describe("Height in px (omit to shrink-to-content via HUG)"),
|
|
1412
1416
|
rotation: import_zod4.z.coerce.number().optional().describe("Rotation in degrees (0-360)"),
|
|
1413
1417
|
opacity: token.optional().describe("Opacity (0-1) or variable name"),
|
|
1414
1418
|
visible: flexBool(import_zod4.z.boolean()).optional().describe("Show/hide (default true)"),
|
|
@@ -1436,7 +1440,7 @@ var tools = [
|
|
|
1436
1440
|
bottomRightRadius: token.optional(),
|
|
1437
1441
|
bottomLeftRadius: token.optional(),
|
|
1438
1442
|
effectStyleName: import_zod4.z.string().optional().describe("Effect style name (e.g. 'Shadow/Card') for shadows, blurs"),
|
|
1439
|
-
layoutMode: import_zod4.z.enum(["NONE", "HORIZONTAL", "VERTICAL"]).optional().describe("Layout direction (default: NONE)"),
|
|
1443
|
+
layoutMode: import_zod4.z.enum(["NONE", "HORIZONTAL", "VERTICAL"]).optional().describe("Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)"),
|
|
1440
1444
|
layoutWrap: import_zod4.z.enum(["NO_WRAP", "WRAP"]).optional(),
|
|
1441
1445
|
padding: token.optional().describe("All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft."),
|
|
1442
1446
|
paddingTop: token.optional(),
|
|
@@ -1454,15 +1458,16 @@ var tools = [
|
|
|
1454
1458
|
minHeight: import_zod4.z.coerce.number().optional().describe("Min height for responsive auto-layout"),
|
|
1455
1459
|
maxHeight: import_zod4.z.coerce.number().optional().describe("Max height for responsive auto-layout"),
|
|
1456
1460
|
overflowDirection: import_zod4.z.enum(["NONE", "HORIZONTAL", "VERTICAL", "BOTH"]).optional().describe("Scroll overflow in prototype (default: NONE)"),
|
|
1457
|
-
clipsContent: flexBool(import_zod4.z.boolean()).optional()
|
|
1461
|
+
clipsContent: flexBool(import_zod4.z.boolean()).optional(),
|
|
1462
|
+
children: flexJson(import_zod4.z.array(import_zod4.z.record(import_zod4.z.string(), import_zod4.z.unknown()))).optional().describe('Inline child nodes. Text: {type:"text", text, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}. Instance: {type:"instance", componentId, variantProperties?, properties?}. Component: {type:"component", name, children?}. Inside components: add componentPropertyName to auto-bind TEXT or INSTANCE_SWAP properties.')
|
|
1458
1463
|
}).passthrough(),
|
|
1459
1464
|
"auto_layout": import_zod4.z.object({
|
|
1460
1465
|
name: import_zod4.z.string().optional().describe("Node name"),
|
|
1461
1466
|
parentId: import_zod4.z.string().optional().describe("Parent node ID. Omit to place on current page."),
|
|
1462
1467
|
x: import_zod4.z.coerce.number().optional().describe("X position (default: 0)"),
|
|
1463
1468
|
y: import_zod4.z.coerce.number().optional().describe("Y position (default: 0)"),
|
|
1464
|
-
width: import_zod4.z.coerce.number().optional().describe("Width (
|
|
1465
|
-
height: import_zod4.z.coerce.number().optional().describe("Height (
|
|
1469
|
+
width: import_zod4.z.coerce.number().optional().describe("Width in px (omit to shrink-to-content via HUG)"),
|
|
1470
|
+
height: import_zod4.z.coerce.number().optional().describe("Height in px (omit to shrink-to-content via HUG)"),
|
|
1466
1471
|
rotation: import_zod4.z.coerce.number().optional().describe("Rotation in degrees (0-360)"),
|
|
1467
1472
|
opacity: token.optional().describe("Opacity (0-1) or variable name"),
|
|
1468
1473
|
visible: flexBool(import_zod4.z.boolean()).optional().describe("Show/hide (default true)"),
|
|
@@ -1509,7 +1514,8 @@ var tools = [
|
|
|
1509
1514
|
maxHeight: import_zod4.z.coerce.number().optional().describe("Max height for responsive auto-layout"),
|
|
1510
1515
|
overflowDirection: import_zod4.z.enum(["NONE", "HORIZONTAL", "VERTICAL", "BOTH"]).optional().describe("Scroll overflow in prototype (default: NONE)"),
|
|
1511
1516
|
clipsContent: flexBool(import_zod4.z.boolean()).optional(),
|
|
1512
|
-
nodeIds: flexJson(import_zod4.z.array(import_zod4.z.string())).optional().describe("Existing node IDs to wrap into auto-layout")
|
|
1517
|
+
nodeIds: flexJson(import_zod4.z.array(import_zod4.z.string())).optional().describe("Existing node IDs to wrap into auto-layout"),
|
|
1518
|
+
children: flexJson(import_zod4.z.array(import_zod4.z.record(import_zod4.z.string(), import_zod4.z.unknown()))).optional().describe('Inline child nodes. Text: {type:"text", text, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}. Instance: {type:"instance", componentId, variantProperties?, properties?}. Component: {type:"component", name, children?}. Inside components: add componentPropertyName to auto-bind TEXT or INSTANCE_SWAP properties.')
|
|
1513
1519
|
}).passthrough(),
|
|
1514
1520
|
"section": import_zod4.z.object({
|
|
1515
1521
|
name: import_zod4.z.string().describe("Section name"),
|
package/dist/mcp.js
CHANGED
|
@@ -95,8 +95,8 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
95
95
|
parentId (string, optional) \u2014 Parent node ID. Omit to place on current page.
|
|
96
96
|
x (number, optional) \u2014 X position (default: 0)
|
|
97
97
|
y (number, optional) \u2014 Y position (default: 0)
|
|
98
|
-
width (number, optional) \u2014 Width (
|
|
99
|
-
height (number, optional) \u2014 Height (
|
|
98
|
+
width (number, optional) \u2014 Width in px (omit to shrink-to-content via HUG)
|
|
99
|
+
height (number, optional) \u2014 Height in px (omit to shrink-to-content via HUG)
|
|
100
100
|
rotation (number, optional) \u2014 Rotation in degrees (0-360)
|
|
101
101
|
opacity (string, optional) \u2014 Opacity (0-1) or variable name
|
|
102
102
|
visible (boolean, optional) \u2014 Show/hide (default true)
|
|
@@ -124,7 +124,7 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
124
124
|
bottomRightRadius (string, optional)
|
|
125
125
|
bottomLeftRadius (string, optional)
|
|
126
126
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
127
|
-
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: NONE)
|
|
127
|
+
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)
|
|
128
128
|
layoutWrap (NO_WRAP | WRAP, optional)
|
|
129
129
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
130
130
|
paddingTop (string, optional)
|
|
@@ -143,7 +143,7 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
143
143
|
maxHeight (number, optional) \u2014 Max height for responsive auto-layout
|
|
144
144
|
overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) \u2014 Scroll overflow in prototype (default: NONE)
|
|
145
145
|
description (string, optional) \u2014 Component description (shown in Figma's component panel)
|
|
146
|
-
children (array, optional) \u2014 Inline child nodes. Text: {type:"text", text, componentPropertyName?, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}.
|
|
146
|
+
children (array, optional) \u2014 Inline child nodes. Text: {type:"text", text, componentPropertyName?, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}. Instance: {type:"instance", componentId, componentPropertyName?, variantProperties?, properties?}. Component: {type:"component", name, children?}. componentPropertyName auto-creates and binds a TEXT (text) or INSTANCE_SWAP (instance) property.
|
|
147
147
|
properties (array, optional) \u2014 Component properties to define at creation: [{propertyName, type, defaultValue}]. TEXT properties for inline children with componentPropertyName are created automatically.
|
|
148
148
|
propertyName (string, required) \u2014 Property name
|
|
149
149
|
type (BOOLEAN | TEXT | INSTANCE_SWAP, required) \u2014 Property type
|
|
@@ -159,8 +159,8 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
159
159
|
parentId (string, optional) \u2014 Parent node ID. Omit to place on current page.
|
|
160
160
|
x (number, optional) \u2014 X position (default: 0)
|
|
161
161
|
y (number, optional) \u2014 Y position (default: 0)
|
|
162
|
-
width (number, optional) \u2014 Width (
|
|
163
|
-
height (number, optional) \u2014 Height (
|
|
162
|
+
width (number, optional) \u2014 Width in px (omit to shrink-to-content via HUG)
|
|
163
|
+
height (number, optional) \u2014 Height in px (omit to shrink-to-content via HUG)
|
|
164
164
|
rotation (number, optional) \u2014 Rotation in degrees (0-360)
|
|
165
165
|
opacity (string, optional) \u2014 Opacity (0-1) or variable name
|
|
166
166
|
visible (boolean, optional) \u2014 Show/hide (default true)
|
|
@@ -188,7 +188,7 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
188
188
|
bottomRightRadius (string, optional)
|
|
189
189
|
bottomLeftRadius (string, optional)
|
|
190
190
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
191
|
-
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: NONE)
|
|
191
|
+
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)
|
|
192
192
|
layoutWrap (NO_WRAP | WRAP, optional)
|
|
193
193
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
194
194
|
paddingTop (string, optional)
|
|
@@ -206,8 +206,9 @@ Discriminant: type (component | from_node | variant_set)
|
|
|
206
206
|
minHeight (number, optional) \u2014 Min height for responsive auto-layout
|
|
207
207
|
maxHeight (number, optional) \u2014 Max height for responsive auto-layout
|
|
208
208
|
overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) \u2014 Scroll overflow in prototype (default: NONE)
|
|
209
|
-
componentIds (string[],
|
|
210
|
-
variantPropertyName (string, optional) \u2014 Rename the auto-generated variant property (default: 'Property 1')
|
|
209
|
+
componentIds (string[], optional) \u2014 Existing component IDs to combine (min 2). Alternative to children.
|
|
210
|
+
variantPropertyName (string, optional) \u2014 Rename the auto-generated variant property (default: 'Property 1')
|
|
211
|
+
children (array, optional) \u2014 Inline variant components. Each must be {type:"component", name, children?, ...frame_params}. All variants must share the same child structure. Alternative to componentIds \u2014 do not combine both.`,
|
|
211
212
|
"update": '# components.update\nAdd, edit, or delete component properties\n\nExample: components(method:"update", items:[{id:"1:23", propertyName:"Label", action:"edit", defaultValue:"Click Me"}])\n\nParams:\n items (UpdatePropertyItem[], required) \u2014 Array of {id, propertyName, action?, type?, defaultValue?, name?, preferredValues?}\n id (string, required) \u2014 Component or component set ID\n propertyName (string, required) \u2014 Property name with #suffix for edit/delete (e.g. "Label#1:0"). Call components.get to find exact keys. For add, plain name works.\n action (add | edit | delete | rename_variant, optional) \u2014 "add" (default): requires type + defaultValue. "edit": pass defaultValue to change default, name to rename property. "delete": just propertyName. "rename_variant": pass defaultValue=current option name, name=new option name.\n type (BOOLEAN | TEXT | INSTANCE_SWAP | VARIANT, optional) \u2014 Property type (required for add)\n defaultValue (string_or_boolean, optional) \u2014 Default value (add/edit). For rename_variant: the CURRENT option name to rename\n name (string, optional) \u2014 New name \u2014 for edit: renames the property itself, for rename_variant: the new option value name\n preferredValues (array, optional) \u2014 Preferred values for INSTANCE_SWAP\n depth (number, optional) \u2014 Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.',
|
|
212
213
|
"delete": "# components.delete\nDelete components or component sets\n\nParams:\n id (string, required) \u2014 Component or component set ID"
|
|
213
214
|
}
|
|
@@ -331,13 +332,13 @@ Example: frames(method:"create", type:"auto_layout", layoutMode:"VERTICAL", item
|
|
|
331
332
|
|
|
332
333
|
Discriminant: type (frame | auto_layout | section | rectangle | ellipse | line | group | boolean_operation | svg)
|
|
333
334
|
|
|
334
|
-
## frame \u2014
|
|
335
|
+
## frame \u2014 General-purpose frame \u2014 shrinks to content by default, static when width+height given
|
|
335
336
|
name (string, optional) \u2014 Node name
|
|
336
337
|
parentId (string, optional) \u2014 Parent node ID. Omit to place on current page.
|
|
337
338
|
x (number, optional) \u2014 X position (default: 0)
|
|
338
339
|
y (number, optional) \u2014 Y position (default: 0)
|
|
339
|
-
width (number, optional) \u2014 Width (
|
|
340
|
-
height (number, optional) \u2014 Height (
|
|
340
|
+
width (number, optional) \u2014 Width in px (omit to shrink-to-content via HUG)
|
|
341
|
+
height (number, optional) \u2014 Height in px (omit to shrink-to-content via HUG)
|
|
341
342
|
rotation (number, optional) \u2014 Rotation in degrees (0-360)
|
|
342
343
|
opacity (string, optional) \u2014 Opacity (0-1) or variable name
|
|
343
344
|
visible (boolean, optional) \u2014 Show/hide (default true)
|
|
@@ -365,7 +366,7 @@ Discriminant: type (frame | auto_layout | section | rectangle | ellipse | line |
|
|
|
365
366
|
bottomRightRadius (string, optional)
|
|
366
367
|
bottomLeftRadius (string, optional)
|
|
367
368
|
effectStyleName (string, optional) \u2014 Effect style name (e.g. 'Shadow/Card') for shadows, blurs
|
|
368
|
-
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: NONE)
|
|
369
|
+
layoutMode (NONE | HORIZONTAL | VERTICAL, optional) \u2014 Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)
|
|
369
370
|
layoutWrap (NO_WRAP | WRAP, optional)
|
|
370
371
|
padding (string, optional) \u2014 All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.
|
|
371
372
|
paddingTop (string, optional)
|
|
@@ -384,14 +385,15 @@ Discriminant: type (frame | auto_layout | section | rectangle | ellipse | line |
|
|
|
384
385
|
maxHeight (number, optional) \u2014 Max height for responsive auto-layout
|
|
385
386
|
overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) \u2014 Scroll overflow in prototype (default: NONE)
|
|
386
387
|
clipsContent (boolean, optional)
|
|
388
|
+
children (array, optional) \u2014 Inline child nodes. Text: {type:"text", text, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}. Instance: {type:"instance", componentId, variantProperties?, properties?}. Component: {type:"component", name, children?}. Inside components: add componentPropertyName to auto-bind TEXT or INSTANCE_SWAP properties.
|
|
387
389
|
|
|
388
390
|
## auto_layout \u2014 Auto-layout frame that arranges children automatically
|
|
389
391
|
name (string, optional) \u2014 Node name
|
|
390
392
|
parentId (string, optional) \u2014 Parent node ID. Omit to place on current page.
|
|
391
393
|
x (number, optional) \u2014 X position (default: 0)
|
|
392
394
|
y (number, optional) \u2014 Y position (default: 0)
|
|
393
|
-
width (number, optional) \u2014 Width (
|
|
394
|
-
height (number, optional) \u2014 Height (
|
|
395
|
+
width (number, optional) \u2014 Width in px (omit to shrink-to-content via HUG)
|
|
396
|
+
height (number, optional) \u2014 Height in px (omit to shrink-to-content via HUG)
|
|
395
397
|
rotation (number, optional) \u2014 Rotation in degrees (0-360)
|
|
396
398
|
opacity (string, optional) \u2014 Opacity (0-1) or variable name
|
|
397
399
|
visible (boolean, optional) \u2014 Show/hide (default true)
|
|
@@ -439,6 +441,7 @@ Discriminant: type (frame | auto_layout | section | rectangle | ellipse | line |
|
|
|
439
441
|
overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) \u2014 Scroll overflow in prototype (default: NONE)
|
|
440
442
|
clipsContent (boolean, optional)
|
|
441
443
|
nodeIds (string[], optional) \u2014 Existing node IDs to wrap into auto-layout
|
|
444
|
+
children (array, optional) \u2014 Inline child nodes. Text: {type:"text", text, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}. Instance: {type:"instance", componentId, variantProperties?, properties?}. Component: {type:"component", name, children?}. Inside components: add componentPropertyName to auto-bind TEXT or INSTANCE_SWAP properties.
|
|
442
445
|
|
|
443
446
|
## section \u2014 Figma section (top-level organizer)
|
|
444
447
|
name (string, required) \u2014 Section name
|
|
@@ -1145,8 +1148,8 @@ var tools = [
|
|
|
1145
1148
|
parentId: z3.string().optional().describe("Parent node ID. Omit to place on current page."),
|
|
1146
1149
|
x: z3.coerce.number().optional().describe("X position (default: 0)"),
|
|
1147
1150
|
y: z3.coerce.number().optional().describe("Y position (default: 0)"),
|
|
1148
|
-
width: z3.coerce.number().optional().describe("Width (
|
|
1149
|
-
height: z3.coerce.number().optional().describe("Height (
|
|
1151
|
+
width: z3.coerce.number().optional().describe("Width in px (omit to shrink-to-content via HUG)"),
|
|
1152
|
+
height: z3.coerce.number().optional().describe("Height in px (omit to shrink-to-content via HUG)"),
|
|
1150
1153
|
rotation: z3.coerce.number().optional().describe("Rotation in degrees (0-360)"),
|
|
1151
1154
|
opacity: token.optional().describe("Opacity (0-1) or variable name"),
|
|
1152
1155
|
visible: flexBool(z3.boolean()).optional().describe("Show/hide (default true)"),
|
|
@@ -1174,7 +1177,7 @@ var tools = [
|
|
|
1174
1177
|
bottomRightRadius: token.optional(),
|
|
1175
1178
|
bottomLeftRadius: token.optional(),
|
|
1176
1179
|
effectStyleName: z3.string().optional().describe("Effect style name (e.g. 'Shadow/Card') for shadows, blurs"),
|
|
1177
|
-
layoutMode: z3.enum(["NONE", "HORIZONTAL", "VERTICAL"]).optional().describe("Layout direction (default: NONE)"),
|
|
1180
|
+
layoutMode: z3.enum(["NONE", "HORIZONTAL", "VERTICAL"]).optional().describe("Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)"),
|
|
1178
1181
|
layoutWrap: z3.enum(["NO_WRAP", "WRAP"]).optional(),
|
|
1179
1182
|
padding: token.optional().describe("All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft."),
|
|
1180
1183
|
paddingTop: token.optional(),
|
|
@@ -1193,7 +1196,7 @@ var tools = [
|
|
|
1193
1196
|
maxHeight: z3.coerce.number().optional().describe("Max height for responsive auto-layout"),
|
|
1194
1197
|
overflowDirection: z3.enum(["NONE", "HORIZONTAL", "VERTICAL", "BOTH"]).optional().describe("Scroll overflow in prototype (default: NONE)"),
|
|
1195
1198
|
description: z3.string().optional().describe("Component description (shown in Figma's component panel)"),
|
|
1196
|
-
children: flexJson(z3.array(z3.record(z3.string(), z3.unknown()))).optional().describe('Inline child nodes. Text: {type:"text", text, componentPropertyName?, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}.
|
|
1199
|
+
children: flexJson(z3.array(z3.record(z3.string(), z3.unknown()))).optional().describe('Inline child nodes. Text: {type:"text", text, componentPropertyName?, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}. Instance: {type:"instance", componentId, componentPropertyName?, variantProperties?, properties?}. Component: {type:"component", name, children?}. componentPropertyName auto-creates and binds a TEXT (text) or INSTANCE_SWAP (instance) property.'),
|
|
1197
1200
|
properties: flexJson(z3.array(z3.record(z3.string(), z3.unknown()))).optional().describe("Component properties to define at creation: [{propertyName, type, defaultValue}]. TEXT properties for inline children with componentPropertyName are created automatically.")
|
|
1198
1201
|
}).passthrough(),
|
|
1199
1202
|
"from_node": z3.object({
|
|
@@ -1205,8 +1208,8 @@ var tools = [
|
|
|
1205
1208
|
parentId: z3.string().optional().describe("Parent node ID. Omit to place on current page."),
|
|
1206
1209
|
x: z3.coerce.number().optional().describe("X position (default: 0)"),
|
|
1207
1210
|
y: z3.coerce.number().optional().describe("Y position (default: 0)"),
|
|
1208
|
-
width: z3.coerce.number().optional().describe("Width (
|
|
1209
|
-
height: z3.coerce.number().optional().describe("Height (
|
|
1211
|
+
width: z3.coerce.number().optional().describe("Width in px (omit to shrink-to-content via HUG)"),
|
|
1212
|
+
height: z3.coerce.number().optional().describe("Height in px (omit to shrink-to-content via HUG)"),
|
|
1210
1213
|
rotation: z3.coerce.number().optional().describe("Rotation in degrees (0-360)"),
|
|
1211
1214
|
opacity: token.optional().describe("Opacity (0-1) or variable name"),
|
|
1212
1215
|
visible: flexBool(z3.boolean()).optional().describe("Show/hide (default true)"),
|
|
@@ -1234,7 +1237,7 @@ var tools = [
|
|
|
1234
1237
|
bottomRightRadius: token.optional(),
|
|
1235
1238
|
bottomLeftRadius: token.optional(),
|
|
1236
1239
|
effectStyleName: z3.string().optional().describe("Effect style name (e.g. 'Shadow/Card') for shadows, blurs"),
|
|
1237
|
-
layoutMode: z3.enum(["NONE", "HORIZONTAL", "VERTICAL"]).optional().describe("Layout direction (default: NONE)"),
|
|
1240
|
+
layoutMode: z3.enum(["NONE", "HORIZONTAL", "VERTICAL"]).optional().describe("Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)"),
|
|
1238
1241
|
layoutWrap: z3.enum(["NO_WRAP", "WRAP"]).optional(),
|
|
1239
1242
|
padding: token.optional().describe("All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft."),
|
|
1240
1243
|
paddingTop: token.optional(),
|
|
@@ -1252,8 +1255,9 @@ var tools = [
|
|
|
1252
1255
|
minHeight: z3.coerce.number().optional().describe("Min height for responsive auto-layout"),
|
|
1253
1256
|
maxHeight: z3.coerce.number().optional().describe("Max height for responsive auto-layout"),
|
|
1254
1257
|
overflowDirection: z3.enum(["NONE", "HORIZONTAL", "VERTICAL", "BOTH"]).optional().describe("Scroll overflow in prototype (default: NONE)"),
|
|
1255
|
-
componentIds: flexJson(z3.array(z3.string())).describe("
|
|
1256
|
-
variantPropertyName: z3.string().optional().describe("Rename the auto-generated variant property (default: 'Property 1')")
|
|
1258
|
+
componentIds: flexJson(z3.array(z3.string())).optional().describe("Existing component IDs to combine (min 2). Alternative to children."),
|
|
1259
|
+
variantPropertyName: z3.string().optional().describe("Rename the auto-generated variant property (default: 'Property 1')"),
|
|
1260
|
+
children: flexJson(z3.array(z3.record(z3.string(), z3.unknown()))).optional().describe('Inline variant components. Each must be {type:"component", name, children?, ...frame_params}. All variants must share the same child structure. Alternative to componentIds \u2014 do not combine both.')
|
|
1257
1261
|
}).passthrough()
|
|
1258
1262
|
};
|
|
1259
1263
|
const s = params.type && schemas[params.type];
|
|
@@ -1385,8 +1389,8 @@ var tools = [
|
|
|
1385
1389
|
parentId: z3.string().optional().describe("Parent node ID. Omit to place on current page."),
|
|
1386
1390
|
x: z3.coerce.number().optional().describe("X position (default: 0)"),
|
|
1387
1391
|
y: z3.coerce.number().optional().describe("Y position (default: 0)"),
|
|
1388
|
-
width: z3.coerce.number().optional().describe("Width (
|
|
1389
|
-
height: z3.coerce.number().optional().describe("Height (
|
|
1392
|
+
width: z3.coerce.number().optional().describe("Width in px (omit to shrink-to-content via HUG)"),
|
|
1393
|
+
height: z3.coerce.number().optional().describe("Height in px (omit to shrink-to-content via HUG)"),
|
|
1390
1394
|
rotation: z3.coerce.number().optional().describe("Rotation in degrees (0-360)"),
|
|
1391
1395
|
opacity: token.optional().describe("Opacity (0-1) or variable name"),
|
|
1392
1396
|
visible: flexBool(z3.boolean()).optional().describe("Show/hide (default true)"),
|
|
@@ -1414,7 +1418,7 @@ var tools = [
|
|
|
1414
1418
|
bottomRightRadius: token.optional(),
|
|
1415
1419
|
bottomLeftRadius: token.optional(),
|
|
1416
1420
|
effectStyleName: z3.string().optional().describe("Effect style name (e.g. 'Shadow/Card') for shadows, blurs"),
|
|
1417
|
-
layoutMode: z3.enum(["NONE", "HORIZONTAL", "VERTICAL"]).optional().describe("Layout direction (default: NONE)"),
|
|
1421
|
+
layoutMode: z3.enum(["NONE", "HORIZONTAL", "VERTICAL"]).optional().describe("Layout direction (default: auto \u2014 NONE when width+height set, otherwise inferred from layout props)"),
|
|
1418
1422
|
layoutWrap: z3.enum(["NO_WRAP", "WRAP"]).optional(),
|
|
1419
1423
|
padding: token.optional().describe("All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft."),
|
|
1420
1424
|
paddingTop: token.optional(),
|
|
@@ -1432,15 +1436,16 @@ var tools = [
|
|
|
1432
1436
|
minHeight: z3.coerce.number().optional().describe("Min height for responsive auto-layout"),
|
|
1433
1437
|
maxHeight: z3.coerce.number().optional().describe("Max height for responsive auto-layout"),
|
|
1434
1438
|
overflowDirection: z3.enum(["NONE", "HORIZONTAL", "VERTICAL", "BOTH"]).optional().describe("Scroll overflow in prototype (default: NONE)"),
|
|
1435
|
-
clipsContent: flexBool(z3.boolean()).optional()
|
|
1439
|
+
clipsContent: flexBool(z3.boolean()).optional(),
|
|
1440
|
+
children: flexJson(z3.array(z3.record(z3.string(), z3.unknown()))).optional().describe('Inline child nodes. Text: {type:"text", text, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}. Instance: {type:"instance", componentId, variantProperties?, properties?}. Component: {type:"component", name, children?}. Inside components: add componentPropertyName to auto-bind TEXT or INSTANCE_SWAP properties.')
|
|
1436
1441
|
}).passthrough(),
|
|
1437
1442
|
"auto_layout": z3.object({
|
|
1438
1443
|
name: z3.string().optional().describe("Node name"),
|
|
1439
1444
|
parentId: z3.string().optional().describe("Parent node ID. Omit to place on current page."),
|
|
1440
1445
|
x: z3.coerce.number().optional().describe("X position (default: 0)"),
|
|
1441
1446
|
y: z3.coerce.number().optional().describe("Y position (default: 0)"),
|
|
1442
|
-
width: z3.coerce.number().optional().describe("Width (
|
|
1443
|
-
height: z3.coerce.number().optional().describe("Height (
|
|
1447
|
+
width: z3.coerce.number().optional().describe("Width in px (omit to shrink-to-content via HUG)"),
|
|
1448
|
+
height: z3.coerce.number().optional().describe("Height in px (omit to shrink-to-content via HUG)"),
|
|
1444
1449
|
rotation: z3.coerce.number().optional().describe("Rotation in degrees (0-360)"),
|
|
1445
1450
|
opacity: token.optional().describe("Opacity (0-1) or variable name"),
|
|
1446
1451
|
visible: flexBool(z3.boolean()).optional().describe("Show/hide (default true)"),
|
|
@@ -1487,7 +1492,8 @@ var tools = [
|
|
|
1487
1492
|
maxHeight: z3.coerce.number().optional().describe("Max height for responsive auto-layout"),
|
|
1488
1493
|
overflowDirection: z3.enum(["NONE", "HORIZONTAL", "VERTICAL", "BOTH"]).optional().describe("Scroll overflow in prototype (default: NONE)"),
|
|
1489
1494
|
clipsContent: flexBool(z3.boolean()).optional(),
|
|
1490
|
-
nodeIds: flexJson(z3.array(z3.string())).optional().describe("Existing node IDs to wrap into auto-layout")
|
|
1495
|
+
nodeIds: flexJson(z3.array(z3.string())).optional().describe("Existing node IDs to wrap into auto-layout"),
|
|
1496
|
+
children: flexJson(z3.array(z3.record(z3.string(), z3.unknown()))).optional().describe('Inline child nodes. Text: {type:"text", text, fontFamily?, fontSize?, fontColor?}. Frame: {type:"frame", name?, layoutMode?, fillColor?, children?}. Instance: {type:"instance", componentId, variantProperties?, properties?}. Component: {type:"component", name, children?}. Inside components: add componentPropertyName to auto-bind TEXT or INSTANCE_SWAP properties.')
|
|
1491
1497
|
}).passthrough(),
|
|
1492
1498
|
"section": z3.object({
|
|
1493
1499
|
name: z3.string().describe("Section name"),
|
|
@@ -128,6 +128,7 @@ var componentsCreateVariantSet = /* @__PURE__ */ new Set([
|
|
|
128
128
|
"blendMode",
|
|
129
129
|
"bottomLeftRadius",
|
|
130
130
|
"bottomRightRadius",
|
|
131
|
+
"children",
|
|
131
132
|
"componentIds",
|
|
132
133
|
"cornerRadius",
|
|
133
134
|
"counterAxisAlignItems",
|
|
@@ -265,6 +266,7 @@ var framesCreateFrame = /* @__PURE__ */ new Set([
|
|
|
265
266
|
"blendMode",
|
|
266
267
|
"bottomLeftRadius",
|
|
267
268
|
"bottomRightRadius",
|
|
269
|
+
"children",
|
|
268
270
|
"clipsContent",
|
|
269
271
|
"cornerRadius",
|
|
270
272
|
"counterAxisAlignItems",
|
|
@@ -319,6 +321,7 @@ var framesCreateAutoLayout = /* @__PURE__ */ new Set([
|
|
|
319
321
|
"blendMode",
|
|
320
322
|
"bottomLeftRadius",
|
|
321
323
|
"bottomRightRadius",
|
|
324
|
+
"children",
|
|
322
325
|
"clipsContent",
|
|
323
326
|
"cornerRadius",
|
|
324
327
|
"counterAxisAlignItems",
|
|
@@ -61,6 +61,7 @@ var componentsCreateVariantSet = /* @__PURE__ */ new Set([
|
|
|
61
61
|
"blendMode",
|
|
62
62
|
"bottomLeftRadius",
|
|
63
63
|
"bottomRightRadius",
|
|
64
|
+
"children",
|
|
64
65
|
"componentIds",
|
|
65
66
|
"cornerRadius",
|
|
66
67
|
"counterAxisAlignItems",
|
|
@@ -198,6 +199,7 @@ var framesCreateFrame = /* @__PURE__ */ new Set([
|
|
|
198
199
|
"blendMode",
|
|
199
200
|
"bottomLeftRadius",
|
|
200
201
|
"bottomRightRadius",
|
|
202
|
+
"children",
|
|
201
203
|
"clipsContent",
|
|
202
204
|
"cornerRadius",
|
|
203
205
|
"counterAxisAlignItems",
|
|
@@ -252,6 +254,7 @@ var framesCreateAutoLayout = /* @__PURE__ */ new Set([
|
|
|
252
254
|
"blendMode",
|
|
253
255
|
"bottomLeftRadius",
|
|
254
256
|
"bottomRightRadius",
|
|
257
|
+
"children",
|
|
255
258
|
"clipsContent",
|
|
256
259
|
"cornerRadius",
|
|
257
260
|
"counterAxisAlignItems",
|