@ufira/vibma 1.1.3 → 1.1.4
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/README.md +2 -2
- package/dist/mcp.cjs +1179 -648
- package/dist/mcp.js +1179 -648
- package/dist/tools/generated/guards.cjs +16 -3
- package/dist/tools/generated/guards.d.cts +3 -1
- package/dist/tools/generated/guards.d.ts +3 -1
- package/dist/tools/generated/guards.js +15 -3
- package/dist/tools/registry.cjs +798 -494
- package/dist/tools/registry.js +798 -494
- package/dist/tools/schemas.cjs +135 -0
- package/dist/tools/schemas.d.cts +519 -1
- package/dist/tools/schemas.d.ts +519 -1
- package/dist/tools/schemas.js +121 -0
- package/package.json +1 -1
package/dist/tools/schemas.cjs
CHANGED
|
@@ -19,17 +19,31 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
// src/tools/schemas.ts
|
|
20
20
|
var schemas_exports = {};
|
|
21
21
|
__export(schemas_exports, {
|
|
22
|
+
blendMode: () => blendMode,
|
|
22
23
|
colorRgba: () => colorRgba,
|
|
24
|
+
colorStop: () => colorStop,
|
|
23
25
|
depth: () => depth,
|
|
24
26
|
effectEntry: () => effectEntry,
|
|
27
|
+
gradientPaint: () => gradientPaint,
|
|
28
|
+
imagePaint: () => imagePaint,
|
|
25
29
|
letterSpacing: () => letterSpacing,
|
|
26
30
|
lineHeight: () => lineHeight,
|
|
27
31
|
nodeId: () => nodeId,
|
|
28
32
|
nodeIds: () => nodeIds,
|
|
33
|
+
paint: () => paint,
|
|
34
|
+
paintArray: () => paintArray,
|
|
35
|
+
paintArrayLoose: () => paintArrayLoose,
|
|
36
|
+
paintColor: () => paintColor,
|
|
37
|
+
paintInput: () => paintInput,
|
|
29
38
|
parentId: () => parentId,
|
|
39
|
+
patternPaint: () => patternPaint,
|
|
40
|
+
solidPaint: () => solidPaint,
|
|
30
41
|
stringOrBoolean: () => stringOrBoolean,
|
|
31
42
|
token: () => token,
|
|
43
|
+
transform: () => transform,
|
|
44
|
+
variableAlias: () => variableAlias,
|
|
32
45
|
variableValue: () => variableValue,
|
|
46
|
+
videoPaint: () => videoPaint,
|
|
33
47
|
xPos: () => xPos,
|
|
34
48
|
yPos: () => yPos
|
|
35
49
|
});
|
|
@@ -87,6 +101,113 @@ var colorRgba = import_zod2.z.preprocess((v) => {
|
|
|
87
101
|
import_zod2.z.string()
|
|
88
102
|
// Non-hex strings pass through for handler-level style/variable resolution
|
|
89
103
|
])).describe('Hex "#FF0000", {r,g,b,a?} 0-1, or style/variable name.');
|
|
104
|
+
var variableAlias = import_zod2.z.object({
|
|
105
|
+
type: import_zod2.z.literal("VARIABLE_ALIAS"),
|
|
106
|
+
id: import_zod2.z.string()
|
|
107
|
+
}).strict().describe('{type:"VARIABLE_ALIAS", id:string}. Discover VariableIDs via variables.get/list or variable_collections.get; prefer *VariableName helpers when available.');
|
|
108
|
+
var transform = import_zod2.z.tuple([
|
|
109
|
+
import_zod2.z.tuple([import_zod2.z.coerce.number(), import_zod2.z.coerce.number(), import_zod2.z.coerce.number()]),
|
|
110
|
+
import_zod2.z.tuple([import_zod2.z.coerce.number(), import_zod2.z.coerce.number(), import_zod2.z.coerce.number()])
|
|
111
|
+
]).describe("Figma Plugin API Transform: [[number,number,number],[number,number,number]]");
|
|
112
|
+
var blendMode = import_zod2.z.enum([
|
|
113
|
+
"PASS_THROUGH",
|
|
114
|
+
"NORMAL",
|
|
115
|
+
"DARKEN",
|
|
116
|
+
"MULTIPLY",
|
|
117
|
+
"LINEAR_BURN",
|
|
118
|
+
"COLOR_BURN",
|
|
119
|
+
"LIGHTEN",
|
|
120
|
+
"SCREEN",
|
|
121
|
+
"LINEAR_DODGE",
|
|
122
|
+
"COLOR_DODGE",
|
|
123
|
+
"OVERLAY",
|
|
124
|
+
"SOFT_LIGHT",
|
|
125
|
+
"HARD_LIGHT",
|
|
126
|
+
"DIFFERENCE",
|
|
127
|
+
"EXCLUSION",
|
|
128
|
+
"HUE",
|
|
129
|
+
"SATURATION",
|
|
130
|
+
"COLOR",
|
|
131
|
+
"LUMINOSITY"
|
|
132
|
+
]);
|
|
133
|
+
var paintColor = import_zod2.z.preprocess((v) => {
|
|
134
|
+
if (typeof v === "string") return parseHex(v) ?? v;
|
|
135
|
+
return v;
|
|
136
|
+
}, import_zod2.z.object({
|
|
137
|
+
r: import_zod2.z.coerce.number().min(0).max(1),
|
|
138
|
+
g: import_zod2.z.coerce.number().min(0).max(1),
|
|
139
|
+
b: import_zod2.z.coerce.number().min(0).max(1),
|
|
140
|
+
a: import_zod2.z.coerce.number().min(0).max(1).optional()
|
|
141
|
+
}).strict()).describe('Paint color: hex "#FF0000"/"#FF000080" or {r,g,b,a?} 0-1. Non-hex strings are not valid inside Paint[].');
|
|
142
|
+
var paintBoundVariables = import_zod2.z.object({
|
|
143
|
+
color: variableAlias.optional()
|
|
144
|
+
}).strict();
|
|
145
|
+
var commonPaintFields = {
|
|
146
|
+
visible: flexBool(import_zod2.z.boolean()).optional(),
|
|
147
|
+
opacity: import_zod2.z.coerce.number().min(0).max(1).optional(),
|
|
148
|
+
blendMode: blendMode.optional()
|
|
149
|
+
};
|
|
150
|
+
var colorStop = import_zod2.z.object({
|
|
151
|
+
position: import_zod2.z.coerce.number().min(0).max(1),
|
|
152
|
+
color: paintColor,
|
|
153
|
+
boundVariables: paintBoundVariables.optional()
|
|
154
|
+
}).strict().describe("ColorStop: {position:0..1, color: Color, boundVariables?: {color: VariableAlias}}");
|
|
155
|
+
var solidPaint = import_zod2.z.object({
|
|
156
|
+
type: import_zod2.z.literal("SOLID"),
|
|
157
|
+
color: paintColor,
|
|
158
|
+
boundVariables: paintBoundVariables.optional(),
|
|
159
|
+
...commonPaintFields
|
|
160
|
+
}).strict();
|
|
161
|
+
var gradientPaint = import_zod2.z.object({
|
|
162
|
+
type: import_zod2.z.enum(["GRADIENT_LINEAR", "GRADIENT_RADIAL", "GRADIENT_ANGULAR", "GRADIENT_DIAMOND"]),
|
|
163
|
+
gradientTransform: transform,
|
|
164
|
+
gradientStops: import_zod2.z.array(colorStop),
|
|
165
|
+
...commonPaintFields
|
|
166
|
+
}).strict().describe("GradientPaint: use gradientTransform + gradientStops. Do not use REST gradientHandlePositions.");
|
|
167
|
+
var imageFilters = import_zod2.z.object({
|
|
168
|
+
exposure: import_zod2.z.coerce.number().optional(),
|
|
169
|
+
contrast: import_zod2.z.coerce.number().optional(),
|
|
170
|
+
saturation: import_zod2.z.coerce.number().optional(),
|
|
171
|
+
temperature: import_zod2.z.coerce.number().optional(),
|
|
172
|
+
tint: import_zod2.z.coerce.number().optional(),
|
|
173
|
+
highlights: import_zod2.z.coerce.number().optional(),
|
|
174
|
+
shadows: import_zod2.z.coerce.number().optional()
|
|
175
|
+
}).strict();
|
|
176
|
+
var imagePaint = import_zod2.z.object({
|
|
177
|
+
type: import_zod2.z.literal("IMAGE"),
|
|
178
|
+
scaleMode: import_zod2.z.enum(["FILL", "FIT", "CROP", "TILE"]),
|
|
179
|
+
imageHash: import_zod2.z.string().nullable(),
|
|
180
|
+
imageTransform: transform.optional(),
|
|
181
|
+
scalingFactor: import_zod2.z.coerce.number().optional(),
|
|
182
|
+
rotation: import_zod2.z.coerce.number().optional(),
|
|
183
|
+
filters: imageFilters.optional(),
|
|
184
|
+
...commonPaintFields
|
|
185
|
+
}).strict();
|
|
186
|
+
var videoPaint = import_zod2.z.object({
|
|
187
|
+
type: import_zod2.z.literal("VIDEO"),
|
|
188
|
+
scaleMode: import_zod2.z.enum(["FILL", "FIT", "CROP", "TILE"]),
|
|
189
|
+
videoHash: import_zod2.z.string().nullable(),
|
|
190
|
+
videoTransform: transform.optional(),
|
|
191
|
+
scalingFactor: import_zod2.z.coerce.number().optional(),
|
|
192
|
+
rotation: import_zod2.z.coerce.number().optional(),
|
|
193
|
+
filters: imageFilters.optional(),
|
|
194
|
+
...commonPaintFields
|
|
195
|
+
}).strict();
|
|
196
|
+
var patternPaint = import_zod2.z.object({
|
|
197
|
+
type: import_zod2.z.literal("PATTERN"),
|
|
198
|
+
sourceNodeId: import_zod2.z.string(),
|
|
199
|
+
tileType: import_zod2.z.enum(["RECTANGULAR", "HORIZONTAL_HEXAGONAL", "VERTICAL_HEXAGONAL"]),
|
|
200
|
+
scalingFactor: import_zod2.z.coerce.number(),
|
|
201
|
+
spacing: import_zod2.z.object({ x: import_zod2.z.coerce.number(), y: import_zod2.z.coerce.number() }).strict(),
|
|
202
|
+
horizontalAlignment: import_zod2.z.enum(["START", "CENTER", "END"]),
|
|
203
|
+
...commonPaintFields
|
|
204
|
+
}).strict();
|
|
205
|
+
var paintInput = import_zod2.z.union([solidPaint, gradientPaint], {
|
|
206
|
+
error: "Invalid Paint[] payload. Supported Paint[] authoring types: SOLID, GRADIENT_LINEAR, GRADIENT_RADIAL, GRADIENT_ANGULAR, GRADIENT_DIAMOND. Use gradientTransform + gradientStops; do not use CSS gradients, REST gradientHandlePositions, IMAGE, VIDEO, or PATTERN."
|
|
207
|
+
}).describe("Paint[] authoring input supports SOLID and Figma gradient paints only. Images use imageUrl/images endpoint; VIDEO and PATTERN authoring are not supported here.");
|
|
208
|
+
var paint = paintInput.describe("Paint[] authoring input. Supports SOLID and gradients: GRADIENT_LINEAR, GRADIENT_RADIAL, GRADIENT_ANGULAR, GRADIENT_DIAMOND. Use gradientTransform + gradientStops; REST gradientHandlePositions is not accepted. IMAGE/VIDEO/PATTERN are readback-only metadata, not authoring input.");
|
|
209
|
+
var paintArray = flexJson(import_zod2.z.array(paintInput)).describe("Paint[] input array. Authoring accepts only SOLID and gradients: GRADIENT_LINEAR, GRADIENT_RADIAL, GRADIENT_ANGULAR, GRADIENT_DIAMOND. Use imageUrl/images for images; VIDEO/PATTERN authoring is not supported here.");
|
|
210
|
+
var paintArrayLoose = flexJson(import_zod2.z.array(import_zod2.z.unknown())).describe("Paint[] input array. Authoring accepts only SOLID and gradients. Adapter validates details and returns guidance; CSS gradients, REST gradientHandlePositions, IMAGE, VIDEO, and PATTERN are not supported as authoring input. Use imageUrl/images for images.");
|
|
90
211
|
var variableValue = import_zod2.z.preprocess((v) => {
|
|
91
212
|
if (typeof v === "string") return parseHex(v) ?? v;
|
|
92
213
|
return v;
|
|
@@ -121,17 +242,31 @@ var effectEntry = import_zod2.z.object({
|
|
|
121
242
|
});
|
|
122
243
|
// Annotate the CommonJS export names for ESM import in node:
|
|
123
244
|
0 && (module.exports = {
|
|
245
|
+
blendMode,
|
|
124
246
|
colorRgba,
|
|
247
|
+
colorStop,
|
|
125
248
|
depth,
|
|
126
249
|
effectEntry,
|
|
250
|
+
gradientPaint,
|
|
251
|
+
imagePaint,
|
|
127
252
|
letterSpacing,
|
|
128
253
|
lineHeight,
|
|
129
254
|
nodeId,
|
|
130
255
|
nodeIds,
|
|
256
|
+
paint,
|
|
257
|
+
paintArray,
|
|
258
|
+
paintArrayLoose,
|
|
259
|
+
paintColor,
|
|
260
|
+
paintInput,
|
|
131
261
|
parentId,
|
|
262
|
+
patternPaint,
|
|
263
|
+
solidPaint,
|
|
132
264
|
stringOrBoolean,
|
|
133
265
|
token,
|
|
266
|
+
transform,
|
|
267
|
+
variableAlias,
|
|
134
268
|
variableValue,
|
|
269
|
+
videoPaint,
|
|
135
270
|
xPos,
|
|
136
271
|
yPos
|
|
137
272
|
});
|