@defai.digital/ax-cli 3.14.9 → 3.14.11

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.
Files changed (106) hide show
  1. package/README.md +17 -2
  2. package/dist/agent/execution/tool-executor.d.ts +6 -0
  3. package/dist/agent/execution/tool-executor.js +72 -0
  4. package/dist/agent/execution/tool-executor.js.map +1 -1
  5. package/dist/commands/design.d.ts +18 -0
  6. package/dist/commands/design.js +495 -0
  7. package/dist/commands/design.js.map +1 -0
  8. package/dist/commands/vscode.js +1 -1
  9. package/dist/commands/vscode.js.map +1 -1
  10. package/dist/design/figma-alias.d.ts +88 -0
  11. package/dist/design/figma-alias.js +324 -0
  12. package/dist/design/figma-alias.js.map +1 -0
  13. package/dist/design/figma-audit.d.ts +40 -0
  14. package/dist/design/figma-audit.js +375 -0
  15. package/dist/design/figma-audit.js.map +1 -0
  16. package/dist/design/figma-client.d.ts +123 -0
  17. package/dist/design/figma-client.js +316 -0
  18. package/dist/design/figma-client.js.map +1 -0
  19. package/dist/design/figma-map.d.ts +29 -0
  20. package/dist/design/figma-map.js +274 -0
  21. package/dist/design/figma-map.js.map +1 -0
  22. package/dist/design/figma-tokens.d.ts +73 -0
  23. package/dist/design/figma-tokens.js +431 -0
  24. package/dist/design/figma-tokens.js.map +1 -0
  25. package/dist/design/index.d.ts +13 -0
  26. package/dist/design/index.js +18 -0
  27. package/dist/design/index.js.map +1 -0
  28. package/dist/design/types.d.ts +89 -0
  29. package/dist/design/types.js +9 -0
  30. package/dist/design/types.js.map +1 -0
  31. package/dist/hooks/hook-runner.js +2 -2
  32. package/dist/hooks/hook-runner.js.map +1 -1
  33. package/dist/index.js +3 -0
  34. package/dist/index.js.map +1 -1
  35. package/dist/ipc/vscode-client.js +1 -1
  36. package/dist/ipc/vscode-client.js.map +1 -1
  37. package/dist/llm/tools.js +170 -0
  38. package/dist/llm/tools.js.map +1 -1
  39. package/dist/mcp/client-v2.js +1 -1
  40. package/dist/mcp/client-v2.js.map +1 -1
  41. package/dist/mcp/validation.js +1 -1
  42. package/dist/mcp/validation.js.map +1 -1
  43. package/dist/permissions/permission-manager.js +2 -2
  44. package/dist/permissions/permission-manager.js.map +1 -1
  45. package/dist/tools/design-tool.d.ts +59 -0
  46. package/dist/tools/design-tool.js +258 -0
  47. package/dist/tools/design-tool.js.map +1 -0
  48. package/dist/ui/hooks/use-input-history.js +1 -1
  49. package/dist/ui/hooks/use-input-history.js.map +1 -1
  50. package/dist/ui/utils/image-handler.js +1 -1
  51. package/dist/ui/utils/image-handler.js.map +1 -1
  52. package/dist/utils/path-security.js +2 -2
  53. package/dist/utils/path-security.js.map +1 -1
  54. package/dist/utils/progress-tracker.js +1 -1
  55. package/dist/utils/progress-tracker.js.map +1 -1
  56. package/dist/utils/settings-manager.js +8 -3
  57. package/dist/utils/settings-manager.js.map +1 -1
  58. package/node_modules/@ax-cli/schemas/dist/index.d.ts +1 -0
  59. package/node_modules/@ax-cli/schemas/dist/index.d.ts.map +1 -1
  60. package/node_modules/@ax-cli/schemas/dist/index.js +2 -2
  61. package/node_modules/@ax-cli/schemas/dist/index.js.map +1 -1
  62. package/node_modules/@ax-cli/schemas/dist/public/design/alias-types.d.ts +346 -0
  63. package/node_modules/@ax-cli/schemas/dist/public/design/alias-types.d.ts.map +1 -0
  64. package/node_modules/@ax-cli/schemas/dist/public/design/alias-types.js +171 -0
  65. package/node_modules/@ax-cli/schemas/dist/public/design/alias-types.js.map +1 -0
  66. package/node_modules/@ax-cli/schemas/dist/public/design/audit-types.d.ts +545 -0
  67. package/node_modules/@ax-cli/schemas/dist/public/design/audit-types.d.ts.map +1 -0
  68. package/node_modules/@ax-cli/schemas/dist/public/design/audit-types.js +307 -0
  69. package/node_modules/@ax-cli/schemas/dist/public/design/audit-types.js.map +1 -0
  70. package/node_modules/@ax-cli/schemas/dist/public/design/figma-types.d.ts +1306 -0
  71. package/node_modules/@ax-cli/schemas/dist/public/design/figma-types.d.ts.map +1 -0
  72. package/node_modules/@ax-cli/schemas/dist/public/design/figma-types.js +428 -0
  73. package/node_modules/@ax-cli/schemas/dist/public/design/figma-types.js.map +1 -0
  74. package/node_modules/@ax-cli/schemas/dist/public/design/index.d.ts +13 -0
  75. package/node_modules/@ax-cli/schemas/dist/public/design/index.d.ts.map +1 -0
  76. package/node_modules/@ax-cli/schemas/dist/public/design/index.js +82 -0
  77. package/node_modules/@ax-cli/schemas/dist/public/design/index.js.map +1 -0
  78. package/node_modules/@ax-cli/schemas/dist/public/design/token-types.d.ts +1245 -0
  79. package/node_modules/@ax-cli/schemas/dist/public/design/token-types.d.ts.map +1 -0
  80. package/node_modules/@ax-cli/schemas/dist/public/design/token-types.js +282 -0
  81. package/node_modules/@ax-cli/schemas/dist/public/design/token-types.js.map +1 -0
  82. package/package.json +2 -2
  83. package/packages/schemas/dist/index.d.ts +1 -0
  84. package/packages/schemas/dist/index.d.ts.map +1 -1
  85. package/packages/schemas/dist/index.js +2 -2
  86. package/packages/schemas/dist/index.js.map +1 -1
  87. package/packages/schemas/dist/public/design/alias-types.d.ts +346 -0
  88. package/packages/schemas/dist/public/design/alias-types.d.ts.map +1 -0
  89. package/packages/schemas/dist/public/design/alias-types.js +171 -0
  90. package/packages/schemas/dist/public/design/alias-types.js.map +1 -0
  91. package/packages/schemas/dist/public/design/audit-types.d.ts +545 -0
  92. package/packages/schemas/dist/public/design/audit-types.d.ts.map +1 -0
  93. package/packages/schemas/dist/public/design/audit-types.js +307 -0
  94. package/packages/schemas/dist/public/design/audit-types.js.map +1 -0
  95. package/packages/schemas/dist/public/design/figma-types.d.ts +1306 -0
  96. package/packages/schemas/dist/public/design/figma-types.d.ts.map +1 -0
  97. package/packages/schemas/dist/public/design/figma-types.js +428 -0
  98. package/packages/schemas/dist/public/design/figma-types.js.map +1 -0
  99. package/packages/schemas/dist/public/design/index.d.ts +13 -0
  100. package/packages/schemas/dist/public/design/index.d.ts.map +1 -0
  101. package/packages/schemas/dist/public/design/index.js +82 -0
  102. package/packages/schemas/dist/public/design/index.js.map +1 -0
  103. package/packages/schemas/dist/public/design/token-types.d.ts +1245 -0
  104. package/packages/schemas/dist/public/design/token-types.d.ts.map +1 -0
  105. package/packages/schemas/dist/public/design/token-types.js +282 -0
  106. package/packages/schemas/dist/public/design/token-types.js.map +1 -0
@@ -0,0 +1,1306 @@
1
+ /**
2
+ * Figma API Response Schemas
3
+ *
4
+ * Zod schemas for Figma REST API responses.
5
+ * These schemas validate API responses at system boundaries.
6
+ *
7
+ * @see https://www.figma.com/developers/api
8
+ * @module design/figma-types
9
+ */
10
+ import { z } from 'zod';
11
+ import { type Brand } from '../core/brand-types.js';
12
+ /**
13
+ * Figma File Key - unique identifier for a Figma file
14
+ * Format: alphanumeric string, typically 22 characters
15
+ */
16
+ export type FigmaFileKey = Brand<string, 'FigmaFileKey'>;
17
+ /**
18
+ * Figma Node ID - unique identifier for a node within a file
19
+ * Format: "number:number" (e.g., "123:456")
20
+ */
21
+ export type FigmaNodeId = Brand<string, 'FigmaNodeId'>;
22
+ /**
23
+ * Schema for Figma file key validation
24
+ */
25
+ export declare const FigmaFileKeySchema: z.ZodEffects<z.ZodString, Brand<string, "FigmaFileKey">, string>;
26
+ /**
27
+ * Schema for Figma node ID validation
28
+ */
29
+ export declare const FigmaNodeIdSchema: z.ZodEffects<z.ZodString, Brand<string, "FigmaNodeId">, string>;
30
+ /**
31
+ * Color in RGBA format (0-1 range)
32
+ */
33
+ export declare const FigmaColorSchema: z.ZodObject<{
34
+ r: z.ZodNumber;
35
+ g: z.ZodNumber;
36
+ b: z.ZodNumber;
37
+ a: z.ZodNumber;
38
+ }, "strip", z.ZodTypeAny, {
39
+ r: number;
40
+ g: number;
41
+ b: number;
42
+ a: number;
43
+ }, {
44
+ r: number;
45
+ g: number;
46
+ b: number;
47
+ a: number;
48
+ }>;
49
+ export type FigmaColor = z.infer<typeof FigmaColorSchema>;
50
+ /**
51
+ * Rectangle bounds
52
+ */
53
+ export declare const FigmaRectSchema: z.ZodObject<{
54
+ x: z.ZodNumber;
55
+ y: z.ZodNumber;
56
+ width: z.ZodNumber;
57
+ height: z.ZodNumber;
58
+ }, "strip", z.ZodTypeAny, {
59
+ x: number;
60
+ y: number;
61
+ width: number;
62
+ height: number;
63
+ }, {
64
+ x: number;
65
+ y: number;
66
+ width: number;
67
+ height: number;
68
+ }>;
69
+ export type FigmaRect = z.infer<typeof FigmaRectSchema>;
70
+ /**
71
+ * Constraint for resizing behavior
72
+ */
73
+ export declare const FigmaConstraintSchema: z.ZodObject<{
74
+ type: z.ZodEnum<["MIN", "CENTER", "MAX", "STRETCH", "SCALE"]>;
75
+ value: z.ZodOptional<z.ZodNumber>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ type: "MIN" | "CENTER" | "MAX" | "STRETCH" | "SCALE";
78
+ value?: number | undefined;
79
+ }, {
80
+ type: "MIN" | "CENTER" | "MAX" | "STRETCH" | "SCALE";
81
+ value?: number | undefined;
82
+ }>;
83
+ export type FigmaConstraint = z.infer<typeof FigmaConstraintSchema>;
84
+ /**
85
+ * Layout constraint pair (horizontal, vertical)
86
+ */
87
+ export declare const FigmaConstraintsSchema: z.ZodObject<{
88
+ horizontal: z.ZodObject<{
89
+ type: z.ZodEnum<["MIN", "CENTER", "MAX", "STRETCH", "SCALE"]>;
90
+ value: z.ZodOptional<z.ZodNumber>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ type: "MIN" | "CENTER" | "MAX" | "STRETCH" | "SCALE";
93
+ value?: number | undefined;
94
+ }, {
95
+ type: "MIN" | "CENTER" | "MAX" | "STRETCH" | "SCALE";
96
+ value?: number | undefined;
97
+ }>;
98
+ vertical: z.ZodObject<{
99
+ type: z.ZodEnum<["MIN", "CENTER", "MAX", "STRETCH", "SCALE"]>;
100
+ value: z.ZodOptional<z.ZodNumber>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ type: "MIN" | "CENTER" | "MAX" | "STRETCH" | "SCALE";
103
+ value?: number | undefined;
104
+ }, {
105
+ type: "MIN" | "CENTER" | "MAX" | "STRETCH" | "SCALE";
106
+ value?: number | undefined;
107
+ }>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ horizontal: {
110
+ type: "MIN" | "CENTER" | "MAX" | "STRETCH" | "SCALE";
111
+ value?: number | undefined;
112
+ };
113
+ vertical: {
114
+ type: "MIN" | "CENTER" | "MAX" | "STRETCH" | "SCALE";
115
+ value?: number | undefined;
116
+ };
117
+ }, {
118
+ horizontal: {
119
+ type: "MIN" | "CENTER" | "MAX" | "STRETCH" | "SCALE";
120
+ value?: number | undefined;
121
+ };
122
+ vertical: {
123
+ type: "MIN" | "CENTER" | "MAX" | "STRETCH" | "SCALE";
124
+ value?: number | undefined;
125
+ };
126
+ }>;
127
+ export type FigmaConstraints = z.infer<typeof FigmaConstraintsSchema>;
128
+ /**
129
+ * Auto-layout properties
130
+ */
131
+ export declare const FigmaAutoLayoutSchema: z.ZodObject<{
132
+ layoutMode: z.ZodOptional<z.ZodEnum<["NONE", "HORIZONTAL", "VERTICAL"]>>;
133
+ primaryAxisSizingMode: z.ZodOptional<z.ZodEnum<["FIXED", "AUTO"]>>;
134
+ counterAxisSizingMode: z.ZodOptional<z.ZodEnum<["FIXED", "AUTO"]>>;
135
+ primaryAxisAlignItems: z.ZodOptional<z.ZodEnum<["MIN", "CENTER", "MAX", "SPACE_BETWEEN"]>>;
136
+ counterAxisAlignItems: z.ZodOptional<z.ZodEnum<["MIN", "CENTER", "MAX", "BASELINE"]>>;
137
+ paddingLeft: z.ZodOptional<z.ZodNumber>;
138
+ paddingRight: z.ZodOptional<z.ZodNumber>;
139
+ paddingTop: z.ZodOptional<z.ZodNumber>;
140
+ paddingBottom: z.ZodOptional<z.ZodNumber>;
141
+ itemSpacing: z.ZodOptional<z.ZodNumber>;
142
+ counterAxisSpacing: z.ZodOptional<z.ZodNumber>;
143
+ layoutWrap: z.ZodOptional<z.ZodEnum<["NO_WRAP", "WRAP"]>>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ layoutMode?: "NONE" | "HORIZONTAL" | "VERTICAL" | undefined;
146
+ primaryAxisSizingMode?: "FIXED" | "AUTO" | undefined;
147
+ counterAxisSizingMode?: "FIXED" | "AUTO" | undefined;
148
+ primaryAxisAlignItems?: "MIN" | "CENTER" | "MAX" | "SPACE_BETWEEN" | undefined;
149
+ counterAxisAlignItems?: "MIN" | "CENTER" | "MAX" | "BASELINE" | undefined;
150
+ paddingLeft?: number | undefined;
151
+ paddingRight?: number | undefined;
152
+ paddingTop?: number | undefined;
153
+ paddingBottom?: number | undefined;
154
+ itemSpacing?: number | undefined;
155
+ counterAxisSpacing?: number | undefined;
156
+ layoutWrap?: "NO_WRAP" | "WRAP" | undefined;
157
+ }, {
158
+ layoutMode?: "NONE" | "HORIZONTAL" | "VERTICAL" | undefined;
159
+ primaryAxisSizingMode?: "FIXED" | "AUTO" | undefined;
160
+ counterAxisSizingMode?: "FIXED" | "AUTO" | undefined;
161
+ primaryAxisAlignItems?: "MIN" | "CENTER" | "MAX" | "SPACE_BETWEEN" | undefined;
162
+ counterAxisAlignItems?: "MIN" | "CENTER" | "MAX" | "BASELINE" | undefined;
163
+ paddingLeft?: number | undefined;
164
+ paddingRight?: number | undefined;
165
+ paddingTop?: number | undefined;
166
+ paddingBottom?: number | undefined;
167
+ itemSpacing?: number | undefined;
168
+ counterAxisSpacing?: number | undefined;
169
+ layoutWrap?: "NO_WRAP" | "WRAP" | undefined;
170
+ }>;
171
+ export type FigmaAutoLayout = z.infer<typeof FigmaAutoLayoutSchema>;
172
+ /**
173
+ * Paint fill/stroke
174
+ */
175
+ export declare const FigmaPaintSchema: z.ZodObject<{
176
+ type: z.ZodEnum<["SOLID", "GRADIENT_LINEAR", "GRADIENT_RADIAL", "GRADIENT_ANGULAR", "GRADIENT_DIAMOND", "IMAGE", "EMOJI", "VIDEO"]>;
177
+ visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
178
+ opacity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
179
+ color: z.ZodOptional<z.ZodObject<{
180
+ r: z.ZodNumber;
181
+ g: z.ZodNumber;
182
+ b: z.ZodNumber;
183
+ a: z.ZodNumber;
184
+ }, "strip", z.ZodTypeAny, {
185
+ r: number;
186
+ g: number;
187
+ b: number;
188
+ a: number;
189
+ }, {
190
+ r: number;
191
+ g: number;
192
+ b: number;
193
+ a: number;
194
+ }>>;
195
+ blendMode: z.ZodOptional<z.ZodString>;
196
+ gradientStops: z.ZodOptional<z.ZodArray<z.ZodObject<{
197
+ position: z.ZodNumber;
198
+ color: z.ZodObject<{
199
+ r: z.ZodNumber;
200
+ g: z.ZodNumber;
201
+ b: z.ZodNumber;
202
+ a: z.ZodNumber;
203
+ }, "strip", z.ZodTypeAny, {
204
+ r: number;
205
+ g: number;
206
+ b: number;
207
+ a: number;
208
+ }, {
209
+ r: number;
210
+ g: number;
211
+ b: number;
212
+ a: number;
213
+ }>;
214
+ }, "strip", z.ZodTypeAny, {
215
+ color: {
216
+ r: number;
217
+ g: number;
218
+ b: number;
219
+ a: number;
220
+ };
221
+ position: number;
222
+ }, {
223
+ color: {
224
+ r: number;
225
+ g: number;
226
+ b: number;
227
+ a: number;
228
+ };
229
+ position: number;
230
+ }>, "many">>;
231
+ scaleMode: z.ZodOptional<z.ZodEnum<["FILL", "FIT", "TILE", "STRETCH"]>>;
232
+ imageRef: z.ZodOptional<z.ZodString>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ type: "SOLID" | "GRADIENT_LINEAR" | "GRADIENT_RADIAL" | "GRADIENT_ANGULAR" | "GRADIENT_DIAMOND" | "IMAGE" | "EMOJI" | "VIDEO";
235
+ visible: boolean;
236
+ opacity: number;
237
+ color?: {
238
+ r: number;
239
+ g: number;
240
+ b: number;
241
+ a: number;
242
+ } | undefined;
243
+ blendMode?: string | undefined;
244
+ gradientStops?: {
245
+ color: {
246
+ r: number;
247
+ g: number;
248
+ b: number;
249
+ a: number;
250
+ };
251
+ position: number;
252
+ }[] | undefined;
253
+ scaleMode?: "STRETCH" | "FILL" | "FIT" | "TILE" | undefined;
254
+ imageRef?: string | undefined;
255
+ }, {
256
+ type: "SOLID" | "GRADIENT_LINEAR" | "GRADIENT_RADIAL" | "GRADIENT_ANGULAR" | "GRADIENT_DIAMOND" | "IMAGE" | "EMOJI" | "VIDEO";
257
+ visible?: boolean | undefined;
258
+ opacity?: number | undefined;
259
+ color?: {
260
+ r: number;
261
+ g: number;
262
+ b: number;
263
+ a: number;
264
+ } | undefined;
265
+ blendMode?: string | undefined;
266
+ gradientStops?: {
267
+ color: {
268
+ r: number;
269
+ g: number;
270
+ b: number;
271
+ a: number;
272
+ };
273
+ position: number;
274
+ }[] | undefined;
275
+ scaleMode?: "STRETCH" | "FILL" | "FIT" | "TILE" | undefined;
276
+ imageRef?: string | undefined;
277
+ }>;
278
+ export type FigmaPaint = z.infer<typeof FigmaPaintSchema>;
279
+ /**
280
+ * Text style properties
281
+ */
282
+ export declare const FigmaTextStyleSchema: z.ZodObject<{
283
+ fontFamily: z.ZodOptional<z.ZodString>;
284
+ fontPostScriptName: z.ZodOptional<z.ZodString>;
285
+ fontWeight: z.ZodOptional<z.ZodNumber>;
286
+ fontSize: z.ZodOptional<z.ZodNumber>;
287
+ textAlignHorizontal: z.ZodOptional<z.ZodEnum<["LEFT", "CENTER", "RIGHT", "JUSTIFIED"]>>;
288
+ textAlignVertical: z.ZodOptional<z.ZodEnum<["TOP", "CENTER", "BOTTOM"]>>;
289
+ letterSpacing: z.ZodOptional<z.ZodNumber>;
290
+ lineHeightPx: z.ZodOptional<z.ZodNumber>;
291
+ lineHeightPercent: z.ZodOptional<z.ZodNumber>;
292
+ lineHeightUnit: z.ZodOptional<z.ZodEnum<["PIXELS", "FONT_SIZE_%", "INTRINSIC_%"]>>;
293
+ textCase: z.ZodOptional<z.ZodEnum<["ORIGINAL", "UPPER", "LOWER", "TITLE", "SMALL_CAPS", "SMALL_CAPS_FORCED"]>>;
294
+ textDecoration: z.ZodOptional<z.ZodEnum<["NONE", "STRIKETHROUGH", "UNDERLINE"]>>;
295
+ paragraphSpacing: z.ZodOptional<z.ZodNumber>;
296
+ paragraphIndent: z.ZodOptional<z.ZodNumber>;
297
+ }, "strip", z.ZodTypeAny, {
298
+ fontFamily?: string | undefined;
299
+ fontPostScriptName?: string | undefined;
300
+ fontWeight?: number | undefined;
301
+ fontSize?: number | undefined;
302
+ textAlignHorizontal?: "CENTER" | "LEFT" | "RIGHT" | "JUSTIFIED" | undefined;
303
+ textAlignVertical?: "CENTER" | "TOP" | "BOTTOM" | undefined;
304
+ letterSpacing?: number | undefined;
305
+ lineHeightPx?: number | undefined;
306
+ lineHeightPercent?: number | undefined;
307
+ lineHeightUnit?: "PIXELS" | "FONT_SIZE_%" | "INTRINSIC_%" | undefined;
308
+ textCase?: "ORIGINAL" | "UPPER" | "LOWER" | "TITLE" | "SMALL_CAPS" | "SMALL_CAPS_FORCED" | undefined;
309
+ textDecoration?: "NONE" | "STRIKETHROUGH" | "UNDERLINE" | undefined;
310
+ paragraphSpacing?: number | undefined;
311
+ paragraphIndent?: number | undefined;
312
+ }, {
313
+ fontFamily?: string | undefined;
314
+ fontPostScriptName?: string | undefined;
315
+ fontWeight?: number | undefined;
316
+ fontSize?: number | undefined;
317
+ textAlignHorizontal?: "CENTER" | "LEFT" | "RIGHT" | "JUSTIFIED" | undefined;
318
+ textAlignVertical?: "CENTER" | "TOP" | "BOTTOM" | undefined;
319
+ letterSpacing?: number | undefined;
320
+ lineHeightPx?: number | undefined;
321
+ lineHeightPercent?: number | undefined;
322
+ lineHeightUnit?: "PIXELS" | "FONT_SIZE_%" | "INTRINSIC_%" | undefined;
323
+ textCase?: "ORIGINAL" | "UPPER" | "LOWER" | "TITLE" | "SMALL_CAPS" | "SMALL_CAPS_FORCED" | undefined;
324
+ textDecoration?: "NONE" | "STRIKETHROUGH" | "UNDERLINE" | undefined;
325
+ paragraphSpacing?: number | undefined;
326
+ paragraphIndent?: number | undefined;
327
+ }>;
328
+ export type FigmaTextStyle = z.infer<typeof FigmaTextStyleSchema>;
329
+ /**
330
+ * Effect (shadow, blur, etc.)
331
+ */
332
+ export declare const FigmaEffectSchema: z.ZodObject<{
333
+ type: z.ZodEnum<["INNER_SHADOW", "DROP_SHADOW", "LAYER_BLUR", "BACKGROUND_BLUR"]>;
334
+ visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
335
+ radius: z.ZodOptional<z.ZodNumber>;
336
+ color: z.ZodOptional<z.ZodObject<{
337
+ r: z.ZodNumber;
338
+ g: z.ZodNumber;
339
+ b: z.ZodNumber;
340
+ a: z.ZodNumber;
341
+ }, "strip", z.ZodTypeAny, {
342
+ r: number;
343
+ g: number;
344
+ b: number;
345
+ a: number;
346
+ }, {
347
+ r: number;
348
+ g: number;
349
+ b: number;
350
+ a: number;
351
+ }>>;
352
+ blendMode: z.ZodOptional<z.ZodString>;
353
+ offset: z.ZodOptional<z.ZodObject<{
354
+ x: z.ZodNumber;
355
+ y: z.ZodNumber;
356
+ }, "strip", z.ZodTypeAny, {
357
+ x: number;
358
+ y: number;
359
+ }, {
360
+ x: number;
361
+ y: number;
362
+ }>>;
363
+ spread: z.ZodOptional<z.ZodNumber>;
364
+ showShadowBehindNode: z.ZodOptional<z.ZodBoolean>;
365
+ }, "strip", z.ZodTypeAny, {
366
+ type: "INNER_SHADOW" | "DROP_SHADOW" | "LAYER_BLUR" | "BACKGROUND_BLUR";
367
+ visible: boolean;
368
+ color?: {
369
+ r: number;
370
+ g: number;
371
+ b: number;
372
+ a: number;
373
+ } | undefined;
374
+ blendMode?: string | undefined;
375
+ radius?: number | undefined;
376
+ offset?: {
377
+ x: number;
378
+ y: number;
379
+ } | undefined;
380
+ spread?: number | undefined;
381
+ showShadowBehindNode?: boolean | undefined;
382
+ }, {
383
+ type: "INNER_SHADOW" | "DROP_SHADOW" | "LAYER_BLUR" | "BACKGROUND_BLUR";
384
+ visible?: boolean | undefined;
385
+ color?: {
386
+ r: number;
387
+ g: number;
388
+ b: number;
389
+ a: number;
390
+ } | undefined;
391
+ blendMode?: string | undefined;
392
+ radius?: number | undefined;
393
+ offset?: {
394
+ x: number;
395
+ y: number;
396
+ } | undefined;
397
+ spread?: number | undefined;
398
+ showShadowBehindNode?: boolean | undefined;
399
+ }>;
400
+ export type FigmaEffect = z.infer<typeof FigmaEffectSchema>;
401
+ /**
402
+ * Component property definition
403
+ */
404
+ export declare const FigmaComponentPropertyDefinitionSchema: z.ZodObject<{
405
+ type: z.ZodEnum<["BOOLEAN", "TEXT", "INSTANCE_SWAP", "VARIANT"]>;
406
+ defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
407
+ variantOptions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
408
+ preferredValues: z.ZodOptional<z.ZodArray<z.ZodObject<{
409
+ type: z.ZodEnum<["COMPONENT", "COMPONENT_SET"]>;
410
+ key: z.ZodString;
411
+ }, "strip", z.ZodTypeAny, {
412
+ type: "COMPONENT" | "COMPONENT_SET";
413
+ key: string;
414
+ }, {
415
+ type: "COMPONENT" | "COMPONENT_SET";
416
+ key: string;
417
+ }>, "many">>;
418
+ }, "strip", z.ZodTypeAny, {
419
+ type: "BOOLEAN" | "TEXT" | "INSTANCE_SWAP" | "VARIANT";
420
+ defaultValue?: string | boolean | undefined;
421
+ variantOptions?: string[] | undefined;
422
+ preferredValues?: {
423
+ type: "COMPONENT" | "COMPONENT_SET";
424
+ key: string;
425
+ }[] | undefined;
426
+ }, {
427
+ type: "BOOLEAN" | "TEXT" | "INSTANCE_SWAP" | "VARIANT";
428
+ defaultValue?: string | boolean | undefined;
429
+ variantOptions?: string[] | undefined;
430
+ preferredValues?: {
431
+ type: "COMPONENT" | "COMPONENT_SET";
432
+ key: string;
433
+ }[] | undefined;
434
+ }>;
435
+ export type FigmaComponentPropertyDefinition = z.infer<typeof FigmaComponentPropertyDefinitionSchema>;
436
+ /**
437
+ * All possible Figma node types
438
+ */
439
+ export declare const FigmaNodeTypeSchema: z.ZodEnum<["DOCUMENT", "CANVAS", "FRAME", "GROUP", "SECTION", "VECTOR", "LINE", "ELLIPSE", "REGULAR_POLYGON", "STAR", "BOOLEAN_OPERATION", "RECTANGLE", "TEXT", "COMPONENT", "COMPONENT_SET", "INSTANCE", "SLICE", "STICKY", "SHAPE_WITH_TEXT", "CONNECTOR", "STAMP", "WIDGET", "EMBED", "LINK_UNFURL", "MEDIA", "TABLE", "TABLE_CELL", "WASHI_TAPE"]>;
440
+ export type FigmaNodeType = z.infer<typeof FigmaNodeTypeSchema>;
441
+ /**
442
+ * Base node interface - manually defined to avoid circular inference
443
+ */
444
+ export interface FigmaBaseNode {
445
+ id: string;
446
+ name: string;
447
+ type: FigmaNodeType;
448
+ visible?: boolean;
449
+ locked?: boolean;
450
+ pluginData?: Record<string, unknown>;
451
+ sharedPluginData?: Record<string, Record<string, unknown>>;
452
+ componentPropertyReferences?: Record<string, string>;
453
+ }
454
+ /**
455
+ * Frame-like node interface (FRAME, GROUP, SECTION, COMPONENT, etc.)
456
+ */
457
+ export interface FigmaFrameLikeNode extends FigmaBaseNode {
458
+ type: 'FRAME' | 'GROUP' | 'SECTION' | 'COMPONENT' | 'COMPONENT_SET' | 'INSTANCE';
459
+ absoluteBoundingBox?: FigmaRect;
460
+ absoluteRenderBounds?: FigmaRect | null;
461
+ constraints?: FigmaConstraints;
462
+ fills?: FigmaPaint[];
463
+ strokes?: FigmaPaint[];
464
+ strokeWeight?: number;
465
+ strokeAlign?: 'INSIDE' | 'OUTSIDE' | 'CENTER';
466
+ cornerRadius?: number;
467
+ rectangleCornerRadii?: [number, number, number, number];
468
+ effects?: FigmaEffect[];
469
+ blendMode?: string;
470
+ opacity?: number;
471
+ clipsContent?: boolean;
472
+ layoutMode?: 'NONE' | 'HORIZONTAL' | 'VERTICAL';
473
+ primaryAxisSizingMode?: 'FIXED' | 'AUTO';
474
+ counterAxisSizingMode?: 'FIXED' | 'AUTO';
475
+ primaryAxisAlignItems?: 'MIN' | 'CENTER' | 'MAX' | 'SPACE_BETWEEN';
476
+ counterAxisAlignItems?: 'MIN' | 'CENTER' | 'MAX' | 'BASELINE';
477
+ paddingLeft?: number;
478
+ paddingRight?: number;
479
+ paddingTop?: number;
480
+ paddingBottom?: number;
481
+ itemSpacing?: number;
482
+ children?: FigmaNode[];
483
+ componentPropertyDefinitions?: Record<string, FigmaComponentPropertyDefinition>;
484
+ componentId?: string;
485
+ componentProperties?: Record<string, {
486
+ value: string | boolean;
487
+ type: string;
488
+ }>;
489
+ }
490
+ /**
491
+ * Text node interface
492
+ */
493
+ export interface FigmaTextNode extends FigmaBaseNode {
494
+ type: 'TEXT';
495
+ absoluteBoundingBox?: FigmaRect;
496
+ fills?: FigmaPaint[];
497
+ strokes?: FigmaPaint[];
498
+ strokeWeight?: number;
499
+ effects?: FigmaEffect[];
500
+ characters?: string;
501
+ style?: FigmaTextStyle;
502
+ characterStyleOverrides?: number[];
503
+ styleOverrideTable?: Record<string, FigmaTextStyle>;
504
+ }
505
+ /**
506
+ * Vector-like node interface
507
+ */
508
+ export interface FigmaVectorLikeNode extends FigmaBaseNode {
509
+ type: 'VECTOR' | 'LINE' | 'ELLIPSE' | 'REGULAR_POLYGON' | 'STAR' | 'BOOLEAN_OPERATION' | 'RECTANGLE';
510
+ absoluteBoundingBox?: FigmaRect;
511
+ fills?: FigmaPaint[];
512
+ strokes?: FigmaPaint[];
513
+ strokeWeight?: number;
514
+ effects?: FigmaEffect[];
515
+ cornerRadius?: number;
516
+ rectangleCornerRadii?: [number, number, number, number];
517
+ }
518
+ /**
519
+ * Document node interface
520
+ */
521
+ export interface FigmaDocumentNode extends FigmaBaseNode {
522
+ type: 'DOCUMENT';
523
+ children: FigmaNode[];
524
+ }
525
+ /**
526
+ * Canvas (page) node interface
527
+ */
528
+ export interface FigmaCanvasNode extends FigmaBaseNode {
529
+ type: 'CANVAS';
530
+ backgroundColor?: FigmaColor;
531
+ prototypeStartNodeID?: string | null;
532
+ flowStartingPoints?: Array<{
533
+ nodeId: string;
534
+ name: string;
535
+ }>;
536
+ children: FigmaNode[];
537
+ }
538
+ /**
539
+ * Union type for all Figma nodes
540
+ */
541
+ export type FigmaNode = FigmaDocumentNode | FigmaCanvasNode | FigmaFrameLikeNode | FigmaTextNode | FigmaVectorLikeNode | (FigmaBaseNode & {
542
+ children?: FigmaNode[];
543
+ });
544
+ /**
545
+ * Permissive node schema that handles recursive children
546
+ * Uses passthrough to preserve all properties from API
547
+ */
548
+ export declare const FigmaNodeSchema: z.ZodType<FigmaNode>;
549
+ /**
550
+ * Component metadata
551
+ */
552
+ export declare const FigmaComponentMetaSchema: z.ZodObject<{
553
+ key: z.ZodString;
554
+ name: z.ZodString;
555
+ description: z.ZodOptional<z.ZodString>;
556
+ documentationLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
557
+ uri: z.ZodString;
558
+ }, "strip", z.ZodTypeAny, {
559
+ uri: string;
560
+ }, {
561
+ uri: string;
562
+ }>, "many">>;
563
+ }, "strip", z.ZodTypeAny, {
564
+ key: string;
565
+ name: string;
566
+ description?: string | undefined;
567
+ documentationLinks?: {
568
+ uri: string;
569
+ }[] | undefined;
570
+ }, {
571
+ key: string;
572
+ name: string;
573
+ description?: string | undefined;
574
+ documentationLinks?: {
575
+ uri: string;
576
+ }[] | undefined;
577
+ }>;
578
+ export type FigmaComponentMeta = z.infer<typeof FigmaComponentMetaSchema>;
579
+ /**
580
+ * Style metadata
581
+ */
582
+ export declare const FigmaStyleMetaSchema: z.ZodObject<{
583
+ key: z.ZodString;
584
+ name: z.ZodString;
585
+ description: z.ZodOptional<z.ZodString>;
586
+ styleType: z.ZodEnum<["FILL", "TEXT", "EFFECT", "GRID"]>;
587
+ }, "strip", z.ZodTypeAny, {
588
+ key: string;
589
+ name: string;
590
+ styleType: "FILL" | "TEXT" | "EFFECT" | "GRID";
591
+ description?: string | undefined;
592
+ }, {
593
+ key: string;
594
+ name: string;
595
+ styleType: "FILL" | "TEXT" | "EFFECT" | "GRID";
596
+ description?: string | undefined;
597
+ }>;
598
+ export type FigmaStyleMeta = z.infer<typeof FigmaStyleMetaSchema>;
599
+ /**
600
+ * Full file response from GET /v1/files/:key
601
+ */
602
+ export declare const FigmaFileResponseSchema: z.ZodObject<{
603
+ name: z.ZodString;
604
+ lastModified: z.ZodString;
605
+ thumbnailUrl: z.ZodOptional<z.ZodString>;
606
+ version: z.ZodString;
607
+ role: z.ZodOptional<z.ZodEnum<["owner", "editor", "viewer"]>>;
608
+ editorType: z.ZodOptional<z.ZodEnum<["figma", "figjam"]>>;
609
+ document: z.ZodType<FigmaNode, z.ZodTypeDef, FigmaNode>;
610
+ components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
611
+ key: z.ZodString;
612
+ name: z.ZodString;
613
+ description: z.ZodOptional<z.ZodString>;
614
+ documentationLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
615
+ uri: z.ZodString;
616
+ }, "strip", z.ZodTypeAny, {
617
+ uri: string;
618
+ }, {
619
+ uri: string;
620
+ }>, "many">>;
621
+ }, "strip", z.ZodTypeAny, {
622
+ key: string;
623
+ name: string;
624
+ description?: string | undefined;
625
+ documentationLinks?: {
626
+ uri: string;
627
+ }[] | undefined;
628
+ }, {
629
+ key: string;
630
+ name: string;
631
+ description?: string | undefined;
632
+ documentationLinks?: {
633
+ uri: string;
634
+ }[] | undefined;
635
+ }>>>;
636
+ componentSets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
637
+ key: z.ZodString;
638
+ name: z.ZodString;
639
+ description: z.ZodOptional<z.ZodString>;
640
+ documentationLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
641
+ uri: z.ZodString;
642
+ }, "strip", z.ZodTypeAny, {
643
+ uri: string;
644
+ }, {
645
+ uri: string;
646
+ }>, "many">>;
647
+ }, "strip", z.ZodTypeAny, {
648
+ key: string;
649
+ name: string;
650
+ description?: string | undefined;
651
+ documentationLinks?: {
652
+ uri: string;
653
+ }[] | undefined;
654
+ }, {
655
+ key: string;
656
+ name: string;
657
+ description?: string | undefined;
658
+ documentationLinks?: {
659
+ uri: string;
660
+ }[] | undefined;
661
+ }>>>;
662
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
663
+ key: z.ZodString;
664
+ name: z.ZodString;
665
+ description: z.ZodOptional<z.ZodString>;
666
+ styleType: z.ZodEnum<["FILL", "TEXT", "EFFECT", "GRID"]>;
667
+ }, "strip", z.ZodTypeAny, {
668
+ key: string;
669
+ name: string;
670
+ styleType: "FILL" | "TEXT" | "EFFECT" | "GRID";
671
+ description?: string | undefined;
672
+ }, {
673
+ key: string;
674
+ name: string;
675
+ styleType: "FILL" | "TEXT" | "EFFECT" | "GRID";
676
+ description?: string | undefined;
677
+ }>>>;
678
+ schemaVersion: z.ZodOptional<z.ZodNumber>;
679
+ mainFileKey: z.ZodOptional<z.ZodString>;
680
+ }, "strip", z.ZodTypeAny, {
681
+ name: string;
682
+ lastModified: string;
683
+ version: string;
684
+ document: FigmaNode;
685
+ role?: "owner" | "editor" | "viewer" | undefined;
686
+ thumbnailUrl?: string | undefined;
687
+ editorType?: "figma" | "figjam" | undefined;
688
+ components?: Record<string, {
689
+ key: string;
690
+ name: string;
691
+ description?: string | undefined;
692
+ documentationLinks?: {
693
+ uri: string;
694
+ }[] | undefined;
695
+ }> | undefined;
696
+ componentSets?: Record<string, {
697
+ key: string;
698
+ name: string;
699
+ description?: string | undefined;
700
+ documentationLinks?: {
701
+ uri: string;
702
+ }[] | undefined;
703
+ }> | undefined;
704
+ styles?: Record<string, {
705
+ key: string;
706
+ name: string;
707
+ styleType: "FILL" | "TEXT" | "EFFECT" | "GRID";
708
+ description?: string | undefined;
709
+ }> | undefined;
710
+ schemaVersion?: number | undefined;
711
+ mainFileKey?: string | undefined;
712
+ }, {
713
+ name: string;
714
+ lastModified: string;
715
+ version: string;
716
+ document: FigmaNode;
717
+ role?: "owner" | "editor" | "viewer" | undefined;
718
+ thumbnailUrl?: string | undefined;
719
+ editorType?: "figma" | "figjam" | undefined;
720
+ components?: Record<string, {
721
+ key: string;
722
+ name: string;
723
+ description?: string | undefined;
724
+ documentationLinks?: {
725
+ uri: string;
726
+ }[] | undefined;
727
+ }> | undefined;
728
+ componentSets?: Record<string, {
729
+ key: string;
730
+ name: string;
731
+ description?: string | undefined;
732
+ documentationLinks?: {
733
+ uri: string;
734
+ }[] | undefined;
735
+ }> | undefined;
736
+ styles?: Record<string, {
737
+ key: string;
738
+ name: string;
739
+ styleType: "FILL" | "TEXT" | "EFFECT" | "GRID";
740
+ description?: string | undefined;
741
+ }> | undefined;
742
+ schemaVersion?: number | undefined;
743
+ mainFileKey?: string | undefined;
744
+ }>;
745
+ export type FigmaFileResponse = z.infer<typeof FigmaFileResponseSchema>;
746
+ /**
747
+ * Partial file response for nodes endpoint GET /v1/files/:key/nodes
748
+ */
749
+ export declare const FigmaNodesResponseSchema: z.ZodObject<{
750
+ name: z.ZodString;
751
+ lastModified: z.ZodString;
752
+ thumbnailUrl: z.ZodOptional<z.ZodString>;
753
+ version: z.ZodString;
754
+ nodes: z.ZodRecord<z.ZodString, z.ZodObject<{
755
+ document: z.ZodType<FigmaNode, z.ZodTypeDef, FigmaNode>;
756
+ components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
757
+ key: z.ZodString;
758
+ name: z.ZodString;
759
+ description: z.ZodOptional<z.ZodString>;
760
+ documentationLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
761
+ uri: z.ZodString;
762
+ }, "strip", z.ZodTypeAny, {
763
+ uri: string;
764
+ }, {
765
+ uri: string;
766
+ }>, "many">>;
767
+ }, "strip", z.ZodTypeAny, {
768
+ key: string;
769
+ name: string;
770
+ description?: string | undefined;
771
+ documentationLinks?: {
772
+ uri: string;
773
+ }[] | undefined;
774
+ }, {
775
+ key: string;
776
+ name: string;
777
+ description?: string | undefined;
778
+ documentationLinks?: {
779
+ uri: string;
780
+ }[] | undefined;
781
+ }>>>;
782
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
783
+ key: z.ZodString;
784
+ name: z.ZodString;
785
+ description: z.ZodOptional<z.ZodString>;
786
+ styleType: z.ZodEnum<["FILL", "TEXT", "EFFECT", "GRID"]>;
787
+ }, "strip", z.ZodTypeAny, {
788
+ key: string;
789
+ name: string;
790
+ styleType: "FILL" | "TEXT" | "EFFECT" | "GRID";
791
+ description?: string | undefined;
792
+ }, {
793
+ key: string;
794
+ name: string;
795
+ styleType: "FILL" | "TEXT" | "EFFECT" | "GRID";
796
+ description?: string | undefined;
797
+ }>>>;
798
+ }, "strip", z.ZodTypeAny, {
799
+ document: FigmaNode;
800
+ components?: Record<string, {
801
+ key: string;
802
+ name: string;
803
+ description?: string | undefined;
804
+ documentationLinks?: {
805
+ uri: string;
806
+ }[] | undefined;
807
+ }> | undefined;
808
+ styles?: Record<string, {
809
+ key: string;
810
+ name: string;
811
+ styleType: "FILL" | "TEXT" | "EFFECT" | "GRID";
812
+ description?: string | undefined;
813
+ }> | undefined;
814
+ }, {
815
+ document: FigmaNode;
816
+ components?: Record<string, {
817
+ key: string;
818
+ name: string;
819
+ description?: string | undefined;
820
+ documentationLinks?: {
821
+ uri: string;
822
+ }[] | undefined;
823
+ }> | undefined;
824
+ styles?: Record<string, {
825
+ key: string;
826
+ name: string;
827
+ styleType: "FILL" | "TEXT" | "EFFECT" | "GRID";
828
+ description?: string | undefined;
829
+ }> | undefined;
830
+ }>>;
831
+ }, "strip", z.ZodTypeAny, {
832
+ name: string;
833
+ lastModified: string;
834
+ version: string;
835
+ nodes: Record<string, {
836
+ document: FigmaNode;
837
+ components?: Record<string, {
838
+ key: string;
839
+ name: string;
840
+ description?: string | undefined;
841
+ documentationLinks?: {
842
+ uri: string;
843
+ }[] | undefined;
844
+ }> | undefined;
845
+ styles?: Record<string, {
846
+ key: string;
847
+ name: string;
848
+ styleType: "FILL" | "TEXT" | "EFFECT" | "GRID";
849
+ description?: string | undefined;
850
+ }> | undefined;
851
+ }>;
852
+ thumbnailUrl?: string | undefined;
853
+ }, {
854
+ name: string;
855
+ lastModified: string;
856
+ version: string;
857
+ nodes: Record<string, {
858
+ document: FigmaNode;
859
+ components?: Record<string, {
860
+ key: string;
861
+ name: string;
862
+ description?: string | undefined;
863
+ documentationLinks?: {
864
+ uri: string;
865
+ }[] | undefined;
866
+ }> | undefined;
867
+ styles?: Record<string, {
868
+ key: string;
869
+ name: string;
870
+ styleType: "FILL" | "TEXT" | "EFFECT" | "GRID";
871
+ description?: string | undefined;
872
+ }> | undefined;
873
+ }>;
874
+ thumbnailUrl?: string | undefined;
875
+ }>;
876
+ export type FigmaNodesResponse = z.infer<typeof FigmaNodesResponseSchema>;
877
+ /**
878
+ * Variable value types
879
+ */
880
+ export declare const FigmaVariableValueSchema: z.ZodUnion<[z.ZodObject<{
881
+ type: z.ZodLiteral<"COLOR">;
882
+ value: z.ZodObject<{
883
+ r: z.ZodNumber;
884
+ g: z.ZodNumber;
885
+ b: z.ZodNumber;
886
+ a: z.ZodNumber;
887
+ }, "strip", z.ZodTypeAny, {
888
+ r: number;
889
+ g: number;
890
+ b: number;
891
+ a: number;
892
+ }, {
893
+ r: number;
894
+ g: number;
895
+ b: number;
896
+ a: number;
897
+ }>;
898
+ }, "strip", z.ZodTypeAny, {
899
+ value: {
900
+ r: number;
901
+ g: number;
902
+ b: number;
903
+ a: number;
904
+ };
905
+ type: "COLOR";
906
+ }, {
907
+ value: {
908
+ r: number;
909
+ g: number;
910
+ b: number;
911
+ a: number;
912
+ };
913
+ type: "COLOR";
914
+ }>, z.ZodObject<{
915
+ type: z.ZodLiteral<"FLOAT">;
916
+ value: z.ZodNumber;
917
+ }, "strip", z.ZodTypeAny, {
918
+ value: number;
919
+ type: "FLOAT";
920
+ }, {
921
+ value: number;
922
+ type: "FLOAT";
923
+ }>, z.ZodObject<{
924
+ type: z.ZodLiteral<"STRING">;
925
+ value: z.ZodString;
926
+ }, "strip", z.ZodTypeAny, {
927
+ value: string;
928
+ type: "STRING";
929
+ }, {
930
+ value: string;
931
+ type: "STRING";
932
+ }>, z.ZodObject<{
933
+ type: z.ZodLiteral<"BOOLEAN">;
934
+ value: z.ZodBoolean;
935
+ }, "strip", z.ZodTypeAny, {
936
+ value: boolean;
937
+ type: "BOOLEAN";
938
+ }, {
939
+ value: boolean;
940
+ type: "BOOLEAN";
941
+ }>, z.ZodObject<{
942
+ type: z.ZodLiteral<"VARIABLE_ALIAS">;
943
+ value: z.ZodObject<{
944
+ id: z.ZodString;
945
+ }, "strip", z.ZodTypeAny, {
946
+ id: string;
947
+ }, {
948
+ id: string;
949
+ }>;
950
+ }, "strip", z.ZodTypeAny, {
951
+ value: {
952
+ id: string;
953
+ };
954
+ type: "VARIABLE_ALIAS";
955
+ }, {
956
+ value: {
957
+ id: string;
958
+ };
959
+ type: "VARIABLE_ALIAS";
960
+ }>]>;
961
+ export type FigmaVariableValue = z.infer<typeof FigmaVariableValueSchema>;
962
+ /**
963
+ * Variable definition
964
+ */
965
+ export declare const FigmaVariableSchema: z.ZodObject<{
966
+ id: z.ZodString;
967
+ name: z.ZodString;
968
+ key: z.ZodString;
969
+ variableCollectionId: z.ZodString;
970
+ resolvedType: z.ZodEnum<["COLOR", "FLOAT", "STRING", "BOOLEAN"]>;
971
+ description: z.ZodOptional<z.ZodString>;
972
+ hiddenFromPublishing: z.ZodOptional<z.ZodBoolean>;
973
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<["ALL_SCOPES", "TEXT_CONTENT", "CORNER_RADIUS", "WIDTH_HEIGHT", "GAP", "ALL_FILLS", "FRAME_FILL", "SHAPE_FILL", "TEXT_FILL", "STROKE_COLOR", "STROKE_FLOAT", "EFFECT_COLOR", "EFFECT_FLOAT", "OPACITY", "FONT_FAMILY", "FONT_STYLE", "FONT_WEIGHT", "FONT_SIZE", "LINE_HEIGHT", "LETTER_SPACING", "PARAGRAPH_SPACING", "PARAGRAPH_INDENT"]>, "many">>;
974
+ codeSyntax: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
975
+ valuesByMode: z.ZodRecord<z.ZodString, z.ZodUnknown>;
976
+ }, "strip", z.ZodTypeAny, {
977
+ key: string;
978
+ id: string;
979
+ name: string;
980
+ variableCollectionId: string;
981
+ resolvedType: "BOOLEAN" | "COLOR" | "FLOAT" | "STRING";
982
+ valuesByMode: Record<string, unknown>;
983
+ description?: string | undefined;
984
+ hiddenFromPublishing?: boolean | undefined;
985
+ scopes?: ("ALL_SCOPES" | "TEXT_CONTENT" | "CORNER_RADIUS" | "WIDTH_HEIGHT" | "GAP" | "ALL_FILLS" | "FRAME_FILL" | "SHAPE_FILL" | "TEXT_FILL" | "STROKE_COLOR" | "STROKE_FLOAT" | "EFFECT_COLOR" | "EFFECT_FLOAT" | "OPACITY" | "FONT_FAMILY" | "FONT_STYLE" | "FONT_WEIGHT" | "FONT_SIZE" | "LINE_HEIGHT" | "LETTER_SPACING" | "PARAGRAPH_SPACING" | "PARAGRAPH_INDENT")[] | undefined;
986
+ codeSyntax?: Record<string, string> | undefined;
987
+ }, {
988
+ key: string;
989
+ id: string;
990
+ name: string;
991
+ variableCollectionId: string;
992
+ resolvedType: "BOOLEAN" | "COLOR" | "FLOAT" | "STRING";
993
+ valuesByMode: Record<string, unknown>;
994
+ description?: string | undefined;
995
+ hiddenFromPublishing?: boolean | undefined;
996
+ scopes?: ("ALL_SCOPES" | "TEXT_CONTENT" | "CORNER_RADIUS" | "WIDTH_HEIGHT" | "GAP" | "ALL_FILLS" | "FRAME_FILL" | "SHAPE_FILL" | "TEXT_FILL" | "STROKE_COLOR" | "STROKE_FLOAT" | "EFFECT_COLOR" | "EFFECT_FLOAT" | "OPACITY" | "FONT_FAMILY" | "FONT_STYLE" | "FONT_WEIGHT" | "FONT_SIZE" | "LINE_HEIGHT" | "LETTER_SPACING" | "PARAGRAPH_SPACING" | "PARAGRAPH_INDENT")[] | undefined;
997
+ codeSyntax?: Record<string, string> | undefined;
998
+ }>;
999
+ export type FigmaVariable = z.infer<typeof FigmaVariableSchema>;
1000
+ /**
1001
+ * Variable collection
1002
+ */
1003
+ export declare const FigmaVariableCollectionSchema: z.ZodObject<{
1004
+ id: z.ZodString;
1005
+ name: z.ZodString;
1006
+ key: z.ZodString;
1007
+ modes: z.ZodArray<z.ZodObject<{
1008
+ modeId: z.ZodString;
1009
+ name: z.ZodString;
1010
+ }, "strip", z.ZodTypeAny, {
1011
+ name: string;
1012
+ modeId: string;
1013
+ }, {
1014
+ name: string;
1015
+ modeId: string;
1016
+ }>, "many">;
1017
+ defaultModeId: z.ZodString;
1018
+ remote: z.ZodOptional<z.ZodBoolean>;
1019
+ hiddenFromPublishing: z.ZodOptional<z.ZodBoolean>;
1020
+ variableIds: z.ZodArray<z.ZodString, "many">;
1021
+ }, "strip", z.ZodTypeAny, {
1022
+ key: string;
1023
+ id: string;
1024
+ name: string;
1025
+ modes: {
1026
+ name: string;
1027
+ modeId: string;
1028
+ }[];
1029
+ defaultModeId: string;
1030
+ variableIds: string[];
1031
+ hiddenFromPublishing?: boolean | undefined;
1032
+ remote?: boolean | undefined;
1033
+ }, {
1034
+ key: string;
1035
+ id: string;
1036
+ name: string;
1037
+ modes: {
1038
+ name: string;
1039
+ modeId: string;
1040
+ }[];
1041
+ defaultModeId: string;
1042
+ variableIds: string[];
1043
+ hiddenFromPublishing?: boolean | undefined;
1044
+ remote?: boolean | undefined;
1045
+ }>;
1046
+ export type FigmaVariableCollection = z.infer<typeof FigmaVariableCollectionSchema>;
1047
+ /**
1048
+ * Variables response from GET /v1/files/:key/variables/local
1049
+ */
1050
+ export declare const FigmaVariablesResponseSchema: z.ZodObject<{
1051
+ status: z.ZodOptional<z.ZodNumber>;
1052
+ error: z.ZodOptional<z.ZodBoolean>;
1053
+ meta: z.ZodObject<{
1054
+ variables: z.ZodRecord<z.ZodString, z.ZodObject<{
1055
+ id: z.ZodString;
1056
+ name: z.ZodString;
1057
+ key: z.ZodString;
1058
+ variableCollectionId: z.ZodString;
1059
+ resolvedType: z.ZodEnum<["COLOR", "FLOAT", "STRING", "BOOLEAN"]>;
1060
+ description: z.ZodOptional<z.ZodString>;
1061
+ hiddenFromPublishing: z.ZodOptional<z.ZodBoolean>;
1062
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<["ALL_SCOPES", "TEXT_CONTENT", "CORNER_RADIUS", "WIDTH_HEIGHT", "GAP", "ALL_FILLS", "FRAME_FILL", "SHAPE_FILL", "TEXT_FILL", "STROKE_COLOR", "STROKE_FLOAT", "EFFECT_COLOR", "EFFECT_FLOAT", "OPACITY", "FONT_FAMILY", "FONT_STYLE", "FONT_WEIGHT", "FONT_SIZE", "LINE_HEIGHT", "LETTER_SPACING", "PARAGRAPH_SPACING", "PARAGRAPH_INDENT"]>, "many">>;
1063
+ codeSyntax: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1064
+ valuesByMode: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1065
+ }, "strip", z.ZodTypeAny, {
1066
+ key: string;
1067
+ id: string;
1068
+ name: string;
1069
+ variableCollectionId: string;
1070
+ resolvedType: "BOOLEAN" | "COLOR" | "FLOAT" | "STRING";
1071
+ valuesByMode: Record<string, unknown>;
1072
+ description?: string | undefined;
1073
+ hiddenFromPublishing?: boolean | undefined;
1074
+ scopes?: ("ALL_SCOPES" | "TEXT_CONTENT" | "CORNER_RADIUS" | "WIDTH_HEIGHT" | "GAP" | "ALL_FILLS" | "FRAME_FILL" | "SHAPE_FILL" | "TEXT_FILL" | "STROKE_COLOR" | "STROKE_FLOAT" | "EFFECT_COLOR" | "EFFECT_FLOAT" | "OPACITY" | "FONT_FAMILY" | "FONT_STYLE" | "FONT_WEIGHT" | "FONT_SIZE" | "LINE_HEIGHT" | "LETTER_SPACING" | "PARAGRAPH_SPACING" | "PARAGRAPH_INDENT")[] | undefined;
1075
+ codeSyntax?: Record<string, string> | undefined;
1076
+ }, {
1077
+ key: string;
1078
+ id: string;
1079
+ name: string;
1080
+ variableCollectionId: string;
1081
+ resolvedType: "BOOLEAN" | "COLOR" | "FLOAT" | "STRING";
1082
+ valuesByMode: Record<string, unknown>;
1083
+ description?: string | undefined;
1084
+ hiddenFromPublishing?: boolean | undefined;
1085
+ scopes?: ("ALL_SCOPES" | "TEXT_CONTENT" | "CORNER_RADIUS" | "WIDTH_HEIGHT" | "GAP" | "ALL_FILLS" | "FRAME_FILL" | "SHAPE_FILL" | "TEXT_FILL" | "STROKE_COLOR" | "STROKE_FLOAT" | "EFFECT_COLOR" | "EFFECT_FLOAT" | "OPACITY" | "FONT_FAMILY" | "FONT_STYLE" | "FONT_WEIGHT" | "FONT_SIZE" | "LINE_HEIGHT" | "LETTER_SPACING" | "PARAGRAPH_SPACING" | "PARAGRAPH_INDENT")[] | undefined;
1086
+ codeSyntax?: Record<string, string> | undefined;
1087
+ }>>;
1088
+ variableCollections: z.ZodRecord<z.ZodString, z.ZodObject<{
1089
+ id: z.ZodString;
1090
+ name: z.ZodString;
1091
+ key: z.ZodString;
1092
+ modes: z.ZodArray<z.ZodObject<{
1093
+ modeId: z.ZodString;
1094
+ name: z.ZodString;
1095
+ }, "strip", z.ZodTypeAny, {
1096
+ name: string;
1097
+ modeId: string;
1098
+ }, {
1099
+ name: string;
1100
+ modeId: string;
1101
+ }>, "many">;
1102
+ defaultModeId: z.ZodString;
1103
+ remote: z.ZodOptional<z.ZodBoolean>;
1104
+ hiddenFromPublishing: z.ZodOptional<z.ZodBoolean>;
1105
+ variableIds: z.ZodArray<z.ZodString, "many">;
1106
+ }, "strip", z.ZodTypeAny, {
1107
+ key: string;
1108
+ id: string;
1109
+ name: string;
1110
+ modes: {
1111
+ name: string;
1112
+ modeId: string;
1113
+ }[];
1114
+ defaultModeId: string;
1115
+ variableIds: string[];
1116
+ hiddenFromPublishing?: boolean | undefined;
1117
+ remote?: boolean | undefined;
1118
+ }, {
1119
+ key: string;
1120
+ id: string;
1121
+ name: string;
1122
+ modes: {
1123
+ name: string;
1124
+ modeId: string;
1125
+ }[];
1126
+ defaultModeId: string;
1127
+ variableIds: string[];
1128
+ hiddenFromPublishing?: boolean | undefined;
1129
+ remote?: boolean | undefined;
1130
+ }>>;
1131
+ }, "strip", z.ZodTypeAny, {
1132
+ variables: Record<string, {
1133
+ key: string;
1134
+ id: string;
1135
+ name: string;
1136
+ variableCollectionId: string;
1137
+ resolvedType: "BOOLEAN" | "COLOR" | "FLOAT" | "STRING";
1138
+ valuesByMode: Record<string, unknown>;
1139
+ description?: string | undefined;
1140
+ hiddenFromPublishing?: boolean | undefined;
1141
+ scopes?: ("ALL_SCOPES" | "TEXT_CONTENT" | "CORNER_RADIUS" | "WIDTH_HEIGHT" | "GAP" | "ALL_FILLS" | "FRAME_FILL" | "SHAPE_FILL" | "TEXT_FILL" | "STROKE_COLOR" | "STROKE_FLOAT" | "EFFECT_COLOR" | "EFFECT_FLOAT" | "OPACITY" | "FONT_FAMILY" | "FONT_STYLE" | "FONT_WEIGHT" | "FONT_SIZE" | "LINE_HEIGHT" | "LETTER_SPACING" | "PARAGRAPH_SPACING" | "PARAGRAPH_INDENT")[] | undefined;
1142
+ codeSyntax?: Record<string, string> | undefined;
1143
+ }>;
1144
+ variableCollections: Record<string, {
1145
+ key: string;
1146
+ id: string;
1147
+ name: string;
1148
+ modes: {
1149
+ name: string;
1150
+ modeId: string;
1151
+ }[];
1152
+ defaultModeId: string;
1153
+ variableIds: string[];
1154
+ hiddenFromPublishing?: boolean | undefined;
1155
+ remote?: boolean | undefined;
1156
+ }>;
1157
+ }, {
1158
+ variables: Record<string, {
1159
+ key: string;
1160
+ id: string;
1161
+ name: string;
1162
+ variableCollectionId: string;
1163
+ resolvedType: "BOOLEAN" | "COLOR" | "FLOAT" | "STRING";
1164
+ valuesByMode: Record<string, unknown>;
1165
+ description?: string | undefined;
1166
+ hiddenFromPublishing?: boolean | undefined;
1167
+ scopes?: ("ALL_SCOPES" | "TEXT_CONTENT" | "CORNER_RADIUS" | "WIDTH_HEIGHT" | "GAP" | "ALL_FILLS" | "FRAME_FILL" | "SHAPE_FILL" | "TEXT_FILL" | "STROKE_COLOR" | "STROKE_FLOAT" | "EFFECT_COLOR" | "EFFECT_FLOAT" | "OPACITY" | "FONT_FAMILY" | "FONT_STYLE" | "FONT_WEIGHT" | "FONT_SIZE" | "LINE_HEIGHT" | "LETTER_SPACING" | "PARAGRAPH_SPACING" | "PARAGRAPH_INDENT")[] | undefined;
1168
+ codeSyntax?: Record<string, string> | undefined;
1169
+ }>;
1170
+ variableCollections: Record<string, {
1171
+ key: string;
1172
+ id: string;
1173
+ name: string;
1174
+ modes: {
1175
+ name: string;
1176
+ modeId: string;
1177
+ }[];
1178
+ defaultModeId: string;
1179
+ variableIds: string[];
1180
+ hiddenFromPublishing?: boolean | undefined;
1181
+ remote?: boolean | undefined;
1182
+ }>;
1183
+ }>;
1184
+ }, "strip", z.ZodTypeAny, {
1185
+ meta: {
1186
+ variables: Record<string, {
1187
+ key: string;
1188
+ id: string;
1189
+ name: string;
1190
+ variableCollectionId: string;
1191
+ resolvedType: "BOOLEAN" | "COLOR" | "FLOAT" | "STRING";
1192
+ valuesByMode: Record<string, unknown>;
1193
+ description?: string | undefined;
1194
+ hiddenFromPublishing?: boolean | undefined;
1195
+ scopes?: ("ALL_SCOPES" | "TEXT_CONTENT" | "CORNER_RADIUS" | "WIDTH_HEIGHT" | "GAP" | "ALL_FILLS" | "FRAME_FILL" | "SHAPE_FILL" | "TEXT_FILL" | "STROKE_COLOR" | "STROKE_FLOAT" | "EFFECT_COLOR" | "EFFECT_FLOAT" | "OPACITY" | "FONT_FAMILY" | "FONT_STYLE" | "FONT_WEIGHT" | "FONT_SIZE" | "LINE_HEIGHT" | "LETTER_SPACING" | "PARAGRAPH_SPACING" | "PARAGRAPH_INDENT")[] | undefined;
1196
+ codeSyntax?: Record<string, string> | undefined;
1197
+ }>;
1198
+ variableCollections: Record<string, {
1199
+ key: string;
1200
+ id: string;
1201
+ name: string;
1202
+ modes: {
1203
+ name: string;
1204
+ modeId: string;
1205
+ }[];
1206
+ defaultModeId: string;
1207
+ variableIds: string[];
1208
+ hiddenFromPublishing?: boolean | undefined;
1209
+ remote?: boolean | undefined;
1210
+ }>;
1211
+ };
1212
+ error?: boolean | undefined;
1213
+ status?: number | undefined;
1214
+ }, {
1215
+ meta: {
1216
+ variables: Record<string, {
1217
+ key: string;
1218
+ id: string;
1219
+ name: string;
1220
+ variableCollectionId: string;
1221
+ resolvedType: "BOOLEAN" | "COLOR" | "FLOAT" | "STRING";
1222
+ valuesByMode: Record<string, unknown>;
1223
+ description?: string | undefined;
1224
+ hiddenFromPublishing?: boolean | undefined;
1225
+ scopes?: ("ALL_SCOPES" | "TEXT_CONTENT" | "CORNER_RADIUS" | "WIDTH_HEIGHT" | "GAP" | "ALL_FILLS" | "FRAME_FILL" | "SHAPE_FILL" | "TEXT_FILL" | "STROKE_COLOR" | "STROKE_FLOAT" | "EFFECT_COLOR" | "EFFECT_FLOAT" | "OPACITY" | "FONT_FAMILY" | "FONT_STYLE" | "FONT_WEIGHT" | "FONT_SIZE" | "LINE_HEIGHT" | "LETTER_SPACING" | "PARAGRAPH_SPACING" | "PARAGRAPH_INDENT")[] | undefined;
1226
+ codeSyntax?: Record<string, string> | undefined;
1227
+ }>;
1228
+ variableCollections: Record<string, {
1229
+ key: string;
1230
+ id: string;
1231
+ name: string;
1232
+ modes: {
1233
+ name: string;
1234
+ modeId: string;
1235
+ }[];
1236
+ defaultModeId: string;
1237
+ variableIds: string[];
1238
+ hiddenFromPublishing?: boolean | undefined;
1239
+ remote?: boolean | undefined;
1240
+ }>;
1241
+ };
1242
+ error?: boolean | undefined;
1243
+ status?: number | undefined;
1244
+ }>;
1245
+ export type FigmaVariablesResponse = z.infer<typeof FigmaVariablesResponseSchema>;
1246
+ /**
1247
+ * Images response from GET /v1/images/:key
1248
+ */
1249
+ export declare const FigmaImagesResponseSchema: z.ZodObject<{
1250
+ err: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1251
+ images: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
1252
+ }, "strip", z.ZodTypeAny, {
1253
+ images: Record<string, string | null>;
1254
+ err?: string | null | undefined;
1255
+ }, {
1256
+ images: Record<string, string | null>;
1257
+ err?: string | null | undefined;
1258
+ }>;
1259
+ export type FigmaImagesResponse = z.infer<typeof FigmaImagesResponseSchema>;
1260
+ /**
1261
+ * Options for GET /v1/files/:key
1262
+ */
1263
+ export declare const GetFileOptionsSchema: z.ZodObject<{
1264
+ version: z.ZodOptional<z.ZodString>;
1265
+ depth: z.ZodOptional<z.ZodNumber>;
1266
+ geometry: z.ZodOptional<z.ZodEnum<["paths", "bounds"]>>;
1267
+ plugin_data: z.ZodOptional<z.ZodString>;
1268
+ branch_data: z.ZodOptional<z.ZodBoolean>;
1269
+ }, "strip", z.ZodTypeAny, {
1270
+ version?: string | undefined;
1271
+ depth?: number | undefined;
1272
+ geometry?: "paths" | "bounds" | undefined;
1273
+ plugin_data?: string | undefined;
1274
+ branch_data?: boolean | undefined;
1275
+ }, {
1276
+ version?: string | undefined;
1277
+ depth?: number | undefined;
1278
+ geometry?: "paths" | "bounds" | undefined;
1279
+ plugin_data?: string | undefined;
1280
+ branch_data?: boolean | undefined;
1281
+ }>;
1282
+ export type GetFileOptions = z.infer<typeof GetFileOptionsSchema>;
1283
+ /**
1284
+ * Options for GET /v1/images/:key
1285
+ */
1286
+ export declare const GetImagesOptionsSchema: z.ZodObject<{
1287
+ scale: z.ZodOptional<z.ZodNumber>;
1288
+ format: z.ZodOptional<z.ZodEnum<["jpg", "png", "svg", "pdf"]>>;
1289
+ svg_include_id: z.ZodOptional<z.ZodBoolean>;
1290
+ svg_simplify_stroke: z.ZodOptional<z.ZodBoolean>;
1291
+ use_absolute_bounds: z.ZodOptional<z.ZodBoolean>;
1292
+ }, "strip", z.ZodTypeAny, {
1293
+ scale?: number | undefined;
1294
+ format?: "jpg" | "png" | "svg" | "pdf" | undefined;
1295
+ svg_include_id?: boolean | undefined;
1296
+ svg_simplify_stroke?: boolean | undefined;
1297
+ use_absolute_bounds?: boolean | undefined;
1298
+ }, {
1299
+ scale?: number | undefined;
1300
+ format?: "jpg" | "png" | "svg" | "pdf" | undefined;
1301
+ svg_include_id?: boolean | undefined;
1302
+ svg_simplify_stroke?: boolean | undefined;
1303
+ use_absolute_bounds?: boolean | undefined;
1304
+ }>;
1305
+ export type GetImagesOptions = z.infer<typeof GetImagesOptionsSchema>;
1306
+ //# sourceMappingURL=figma-types.d.ts.map