@pagemold/graph 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1409 @@
1
+ /**
2
+ * Design Graph Validation
3
+ * Runtime validation using Zod to prevent injection and SSRF
4
+ */
5
+ import { z } from 'zod';
6
+ /**
7
+ * Resolve hostname to IP addresses with caching
8
+ * Returns array of resolved IP addresses
9
+ */
10
+ export declare function resolveHostname(hostname: string): Promise<string[]>;
11
+ /**
12
+ * Check if an IP address is private/internal
13
+ */
14
+ export declare function isPrivateIP(ip: string): boolean;
15
+ /**
16
+ * Validate URL with DNS resolution check (async)
17
+ * Returns validation result with any SSRF issues found
18
+ */
19
+ export declare function validateUrlWithDns(url: string): Promise<{
20
+ valid: boolean;
21
+ errors: string[];
22
+ }>;
23
+ export declare function isHostnamePrivate(hostname: string): boolean;
24
+ export declare const urlSchema: z.ZodEffects<z.ZodString, string, string>;
25
+ export declare const GradientStopSchema: z.ZodObject<{
26
+ position: z.ZodNumber;
27
+ color: z.ZodString;
28
+ }, "strict", z.ZodTypeAny, {
29
+ position: number;
30
+ color: string;
31
+ }, {
32
+ position: number;
33
+ color: string;
34
+ }>;
35
+ export declare const FillSchema: z.ZodObject<{
36
+ type: z.ZodEnum<["solid", "linear", "radial", "conic"]>;
37
+ visible: z.ZodBoolean;
38
+ opacity: z.ZodNumber;
39
+ blendMode: z.ZodEffects<z.ZodString, string, string>;
40
+ color: z.ZodOptional<z.ZodString>;
41
+ gradientHandlePositions: z.ZodOptional<z.ZodArray<z.ZodObject<{
42
+ position: z.ZodNumber;
43
+ color: z.ZodString;
44
+ }, "strict", z.ZodTypeAny, {
45
+ position: number;
46
+ color: string;
47
+ }, {
48
+ position: number;
49
+ color: string;
50
+ }>, "many">>;
51
+ gradientStops: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
+ position: z.ZodNumber;
53
+ color: z.ZodString;
54
+ }, "strict", z.ZodTypeAny, {
55
+ position: number;
56
+ color: string;
57
+ }, {
58
+ position: number;
59
+ color: string;
60
+ }>, "many">>;
61
+ transition: z.ZodOptional<z.ZodEnum<["exact", "approx"]>>;
62
+ }, "strict", z.ZodTypeAny, {
63
+ opacity: number;
64
+ type: "solid" | "linear" | "radial" | "conic";
65
+ visible: boolean;
66
+ blendMode: string;
67
+ color?: string | undefined;
68
+ gradientHandlePositions?: {
69
+ position: number;
70
+ color: string;
71
+ }[] | undefined;
72
+ gradientStops?: {
73
+ position: number;
74
+ color: string;
75
+ }[] | undefined;
76
+ transition?: "exact" | "approx" | undefined;
77
+ }, {
78
+ opacity: number;
79
+ type: "solid" | "linear" | "radial" | "conic";
80
+ visible: boolean;
81
+ blendMode: string;
82
+ color?: string | undefined;
83
+ gradientHandlePositions?: {
84
+ position: number;
85
+ color: string;
86
+ }[] | undefined;
87
+ gradientStops?: {
88
+ position: number;
89
+ color: string;
90
+ }[] | undefined;
91
+ transition?: "exact" | "approx" | undefined;
92
+ }>;
93
+ export declare const StrokeSchema: z.ZodObject<{
94
+ visible: z.ZodBoolean;
95
+ width: z.ZodNumber;
96
+ color: z.ZodString;
97
+ opacity: z.ZodNumber;
98
+ pattern: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
99
+ align: z.ZodOptional<z.ZodEnum<["INSIDE", "CENTER", "OUTSIDE"]>>;
100
+ cap: z.ZodOptional<z.ZodEnum<["NONE", "ROUND", "SQUARE", "ARROW"]>>;
101
+ join: z.ZodOptional<z.ZodEnum<["NONE", "ROUND", "BEVEL", "MITER", "MITER_ROUND"]>>;
102
+ dash: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
103
+ cornerRadius: z.ZodOptional<z.ZodNumber>;
104
+ }, "strict", z.ZodTypeAny, {
105
+ opacity: number;
106
+ color: string;
107
+ visible: boolean;
108
+ width: number;
109
+ join?: "NONE" | "ROUND" | "BEVEL" | "MITER" | "MITER_ROUND" | undefined;
110
+ pattern?: string | undefined;
111
+ align?: "INSIDE" | "CENTER" | "OUTSIDE" | undefined;
112
+ cap?: "NONE" | "ROUND" | "SQUARE" | "ARROW" | undefined;
113
+ dash?: number[] | undefined;
114
+ cornerRadius?: number | undefined;
115
+ }, {
116
+ opacity: number;
117
+ color: string;
118
+ visible: boolean;
119
+ width: number;
120
+ join?: "NONE" | "ROUND" | "BEVEL" | "MITER" | "MITER_ROUND" | undefined;
121
+ pattern?: string | undefined;
122
+ align?: "INSIDE" | "CENTER" | "OUTSIDE" | undefined;
123
+ cap?: "NONE" | "ROUND" | "SQUARE" | "ARROW" | undefined;
124
+ dash?: number[] | undefined;
125
+ cornerRadius?: number | undefined;
126
+ }>;
127
+ export declare const EffectSchema: z.ZodObject<{
128
+ type: z.ZodEnum<["DROP_SHADOW", "INNER_SHADOW", "LAYER_BLUR", "BACKGROUND_BLUR"]>;
129
+ visible: z.ZodBoolean;
130
+ radius: z.ZodNumber;
131
+ color: z.ZodString;
132
+ opacity: z.ZodNumber;
133
+ offset: z.ZodOptional<z.ZodObject<{
134
+ x: z.ZodNumber;
135
+ y: z.ZodNumber;
136
+ }, "strip", z.ZodTypeAny, {
137
+ x: number;
138
+ y: number;
139
+ }, {
140
+ x: number;
141
+ y: number;
142
+ }>>;
143
+ spread: z.ZodOptional<z.ZodNumber>;
144
+ blendMode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
145
+ }, "strict", z.ZodTypeAny, {
146
+ opacity: number;
147
+ color: string;
148
+ type: "DROP_SHADOW" | "INNER_SHADOW" | "LAYER_BLUR" | "BACKGROUND_BLUR";
149
+ visible: boolean;
150
+ radius: number;
151
+ blendMode?: string | undefined;
152
+ offset?: {
153
+ x: number;
154
+ y: number;
155
+ } | undefined;
156
+ spread?: number | undefined;
157
+ }, {
158
+ opacity: number;
159
+ color: string;
160
+ type: "DROP_SHADOW" | "INNER_SHADOW" | "LAYER_BLUR" | "BACKGROUND_BLUR";
161
+ visible: boolean;
162
+ radius: number;
163
+ blendMode?: string | undefined;
164
+ offset?: {
165
+ x: number;
166
+ y: number;
167
+ } | undefined;
168
+ spread?: number | undefined;
169
+ }>;
170
+ export declare const FontSchema: z.ZodObject<{
171
+ family: z.ZodString;
172
+ style: z.ZodString;
173
+ weight: z.ZodNumber;
174
+ url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
175
+ }, "strict", z.ZodTypeAny, {
176
+ family: string;
177
+ style: string;
178
+ weight: number;
179
+ url?: string | undefined;
180
+ }, {
181
+ family: string;
182
+ style: string;
183
+ weight: number;
184
+ url?: string | undefined;
185
+ }>;
186
+ export declare const BoxSchema: z.ZodObject<{
187
+ x: z.ZodNumber;
188
+ y: z.ZodNumber;
189
+ w: z.ZodNumber;
190
+ h: z.ZodNumber;
191
+ }, "strip", z.ZodTypeAny, {
192
+ x: number;
193
+ y: number;
194
+ w: number;
195
+ h: number;
196
+ }, {
197
+ x: number;
198
+ y: number;
199
+ w: number;
200
+ h: number;
201
+ }>;
202
+ export declare const StyleSchema: z.ZodObject<{
203
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
204
+ type: z.ZodEnum<["solid", "linear", "radial", "conic"]>;
205
+ visible: z.ZodBoolean;
206
+ opacity: z.ZodNumber;
207
+ blendMode: z.ZodEffects<z.ZodString, string, string>;
208
+ color: z.ZodOptional<z.ZodString>;
209
+ gradientHandlePositions: z.ZodOptional<z.ZodArray<z.ZodObject<{
210
+ position: z.ZodNumber;
211
+ color: z.ZodString;
212
+ }, "strict", z.ZodTypeAny, {
213
+ position: number;
214
+ color: string;
215
+ }, {
216
+ position: number;
217
+ color: string;
218
+ }>, "many">>;
219
+ gradientStops: z.ZodOptional<z.ZodArray<z.ZodObject<{
220
+ position: z.ZodNumber;
221
+ color: z.ZodString;
222
+ }, "strict", z.ZodTypeAny, {
223
+ position: number;
224
+ color: string;
225
+ }, {
226
+ position: number;
227
+ color: string;
228
+ }>, "many">>;
229
+ transition: z.ZodOptional<z.ZodEnum<["exact", "approx"]>>;
230
+ }, "strict", z.ZodTypeAny, {
231
+ opacity: number;
232
+ type: "solid" | "linear" | "radial" | "conic";
233
+ visible: boolean;
234
+ blendMode: string;
235
+ color?: string | undefined;
236
+ gradientHandlePositions?: {
237
+ position: number;
238
+ color: string;
239
+ }[] | undefined;
240
+ gradientStops?: {
241
+ position: number;
242
+ color: string;
243
+ }[] | undefined;
244
+ transition?: "exact" | "approx" | undefined;
245
+ }, {
246
+ opacity: number;
247
+ type: "solid" | "linear" | "radial" | "conic";
248
+ visible: boolean;
249
+ blendMode: string;
250
+ color?: string | undefined;
251
+ gradientHandlePositions?: {
252
+ position: number;
253
+ color: string;
254
+ }[] | undefined;
255
+ gradientStops?: {
256
+ position: number;
257
+ color: string;
258
+ }[] | undefined;
259
+ transition?: "exact" | "approx" | undefined;
260
+ }>, "many">>;
261
+ strokes: z.ZodOptional<z.ZodArray<z.ZodObject<{
262
+ visible: z.ZodBoolean;
263
+ width: z.ZodNumber;
264
+ color: z.ZodString;
265
+ opacity: z.ZodNumber;
266
+ pattern: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
267
+ align: z.ZodOptional<z.ZodEnum<["INSIDE", "CENTER", "OUTSIDE"]>>;
268
+ cap: z.ZodOptional<z.ZodEnum<["NONE", "ROUND", "SQUARE", "ARROW"]>>;
269
+ join: z.ZodOptional<z.ZodEnum<["NONE", "ROUND", "BEVEL", "MITER", "MITER_ROUND"]>>;
270
+ dash: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
271
+ cornerRadius: z.ZodOptional<z.ZodNumber>;
272
+ }, "strict", z.ZodTypeAny, {
273
+ opacity: number;
274
+ color: string;
275
+ visible: boolean;
276
+ width: number;
277
+ join?: "NONE" | "ROUND" | "BEVEL" | "MITER" | "MITER_ROUND" | undefined;
278
+ pattern?: string | undefined;
279
+ align?: "INSIDE" | "CENTER" | "OUTSIDE" | undefined;
280
+ cap?: "NONE" | "ROUND" | "SQUARE" | "ARROW" | undefined;
281
+ dash?: number[] | undefined;
282
+ cornerRadius?: number | undefined;
283
+ }, {
284
+ opacity: number;
285
+ color: string;
286
+ visible: boolean;
287
+ width: number;
288
+ join?: "NONE" | "ROUND" | "BEVEL" | "MITER" | "MITER_ROUND" | undefined;
289
+ pattern?: string | undefined;
290
+ align?: "INSIDE" | "CENTER" | "OUTSIDE" | undefined;
291
+ cap?: "NONE" | "ROUND" | "SQUARE" | "ARROW" | undefined;
292
+ dash?: number[] | undefined;
293
+ cornerRadius?: number | undefined;
294
+ }>, "many">>;
295
+ radius: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>>;
296
+ effects: z.ZodOptional<z.ZodArray<z.ZodObject<{
297
+ type: z.ZodEnum<["DROP_SHADOW", "INNER_SHADOW", "LAYER_BLUR", "BACKGROUND_BLUR"]>;
298
+ visible: z.ZodBoolean;
299
+ radius: z.ZodNumber;
300
+ color: z.ZodString;
301
+ opacity: z.ZodNumber;
302
+ offset: z.ZodOptional<z.ZodObject<{
303
+ x: z.ZodNumber;
304
+ y: z.ZodNumber;
305
+ }, "strip", z.ZodTypeAny, {
306
+ x: number;
307
+ y: number;
308
+ }, {
309
+ x: number;
310
+ y: number;
311
+ }>>;
312
+ spread: z.ZodOptional<z.ZodNumber>;
313
+ blendMode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
314
+ }, "strict", z.ZodTypeAny, {
315
+ opacity: number;
316
+ color: string;
317
+ type: "DROP_SHADOW" | "INNER_SHADOW" | "LAYER_BLUR" | "BACKGROUND_BLUR";
318
+ visible: boolean;
319
+ radius: number;
320
+ blendMode?: string | undefined;
321
+ offset?: {
322
+ x: number;
323
+ y: number;
324
+ } | undefined;
325
+ spread?: number | undefined;
326
+ }, {
327
+ opacity: number;
328
+ color: string;
329
+ type: "DROP_SHADOW" | "INNER_SHADOW" | "LAYER_BLUR" | "BACKGROUND_BLUR";
330
+ visible: boolean;
331
+ radius: number;
332
+ blendMode?: string | undefined;
333
+ offset?: {
334
+ x: number;
335
+ y: number;
336
+ } | undefined;
337
+ spread?: number | undefined;
338
+ }>, "many">>;
339
+ opacity: z.ZodOptional<z.ZodNumber>;
340
+ clip: z.ZodOptional<z.ZodBoolean>;
341
+ blend: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
342
+ transform: z.ZodOptional<z.ZodObject<{
343
+ rotate: z.ZodOptional<z.ZodNumber>;
344
+ scale: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
345
+ }, "strip", z.ZodTypeAny, {
346
+ scale?: [number, number] | undefined;
347
+ rotate?: number | undefined;
348
+ }, {
349
+ scale?: [number, number] | undefined;
350
+ rotate?: number | undefined;
351
+ }>>;
352
+ position: z.ZodOptional<z.ZodEnum<["static", "fixed", "sticky"]>>;
353
+ }, "strict", z.ZodTypeAny, {
354
+ opacity?: number | undefined;
355
+ effects?: {
356
+ opacity: number;
357
+ color: string;
358
+ type: "DROP_SHADOW" | "INNER_SHADOW" | "LAYER_BLUR" | "BACKGROUND_BLUR";
359
+ visible: boolean;
360
+ radius: number;
361
+ blendMode?: string | undefined;
362
+ offset?: {
363
+ x: number;
364
+ y: number;
365
+ } | undefined;
366
+ spread?: number | undefined;
367
+ }[] | undefined;
368
+ transform?: {
369
+ scale?: [number, number] | undefined;
370
+ rotate?: number | undefined;
371
+ } | undefined;
372
+ position?: "static" | "fixed" | "sticky" | undefined;
373
+ radius?: number | [number, number, number, number] | undefined;
374
+ fills?: {
375
+ opacity: number;
376
+ type: "solid" | "linear" | "radial" | "conic";
377
+ visible: boolean;
378
+ blendMode: string;
379
+ color?: string | undefined;
380
+ gradientHandlePositions?: {
381
+ position: number;
382
+ color: string;
383
+ }[] | undefined;
384
+ gradientStops?: {
385
+ position: number;
386
+ color: string;
387
+ }[] | undefined;
388
+ transition?: "exact" | "approx" | undefined;
389
+ }[] | undefined;
390
+ strokes?: {
391
+ opacity: number;
392
+ color: string;
393
+ visible: boolean;
394
+ width: number;
395
+ join?: "NONE" | "ROUND" | "BEVEL" | "MITER" | "MITER_ROUND" | undefined;
396
+ pattern?: string | undefined;
397
+ align?: "INSIDE" | "CENTER" | "OUTSIDE" | undefined;
398
+ cap?: "NONE" | "ROUND" | "SQUARE" | "ARROW" | undefined;
399
+ dash?: number[] | undefined;
400
+ cornerRadius?: number | undefined;
401
+ }[] | undefined;
402
+ clip?: boolean | undefined;
403
+ blend?: string | undefined;
404
+ }, {
405
+ opacity?: number | undefined;
406
+ effects?: {
407
+ opacity: number;
408
+ color: string;
409
+ type: "DROP_SHADOW" | "INNER_SHADOW" | "LAYER_BLUR" | "BACKGROUND_BLUR";
410
+ visible: boolean;
411
+ radius: number;
412
+ blendMode?: string | undefined;
413
+ offset?: {
414
+ x: number;
415
+ y: number;
416
+ } | undefined;
417
+ spread?: number | undefined;
418
+ }[] | undefined;
419
+ transform?: {
420
+ scale?: [number, number] | undefined;
421
+ rotate?: number | undefined;
422
+ } | undefined;
423
+ position?: "static" | "fixed" | "sticky" | undefined;
424
+ radius?: number | [number, number, number, number] | undefined;
425
+ fills?: {
426
+ opacity: number;
427
+ type: "solid" | "linear" | "radial" | "conic";
428
+ visible: boolean;
429
+ blendMode: string;
430
+ color?: string | undefined;
431
+ gradientHandlePositions?: {
432
+ position: number;
433
+ color: string;
434
+ }[] | undefined;
435
+ gradientStops?: {
436
+ position: number;
437
+ color: string;
438
+ }[] | undefined;
439
+ transition?: "exact" | "approx" | undefined;
440
+ }[] | undefined;
441
+ strokes?: {
442
+ opacity: number;
443
+ color: string;
444
+ visible: boolean;
445
+ width: number;
446
+ join?: "NONE" | "ROUND" | "BEVEL" | "MITER" | "MITER_ROUND" | undefined;
447
+ pattern?: string | undefined;
448
+ align?: "INSIDE" | "CENTER" | "OUTSIDE" | undefined;
449
+ cap?: "NONE" | "ROUND" | "SQUARE" | "ARROW" | undefined;
450
+ dash?: number[] | undefined;
451
+ cornerRadius?: number | undefined;
452
+ }[] | undefined;
453
+ clip?: boolean | undefined;
454
+ blend?: string | undefined;
455
+ }>;
456
+ export declare const FidelitySchema: z.ZodObject<{
457
+ tag: z.ZodEnum<["exact", "approx", "unsupported"]>;
458
+ reason: z.ZodOptional<z.ZodEnum<["RASTER_FALLBACK", "FONT_SUBSTITUTED", "EASING_APPROX", "WEBGL", "CANVAS", "LOTTIE", "SCROLL_LINKED", "SVG_INVALID", "VIDEO", "IFRAME_CROSS_ORIGIN", "OTHER"]>>;
459
+ confidence: z.ZodOptional<z.ZodNumber>;
460
+ }, "strip", z.ZodTypeAny, {
461
+ tag: "exact" | "approx" | "unsupported";
462
+ reason?: "RASTER_FALLBACK" | "FONT_SUBSTITUTED" | "EASING_APPROX" | "WEBGL" | "CANVAS" | "LOTTIE" | "SCROLL_LINKED" | "SVG_INVALID" | "VIDEO" | "IFRAME_CROSS_ORIGIN" | "OTHER" | undefined;
463
+ confidence?: number | undefined;
464
+ }, {
465
+ tag: "exact" | "approx" | "unsupported";
466
+ reason?: "RASTER_FALLBACK" | "FONT_SUBSTITUTED" | "EASING_APPROX" | "WEBGL" | "CANVAS" | "LOTTIE" | "SCROLL_LINKED" | "SVG_INVALID" | "VIDEO" | "IFRAME_CROSS_ORIGIN" | "OTHER" | undefined;
467
+ confidence?: number | undefined;
468
+ }>;
469
+ export declare const ColorTokenSchema: z.ZodObject<{
470
+ type: z.ZodLiteral<"color">;
471
+ value: z.ZodString;
472
+ }, "strip", z.ZodTypeAny, {
473
+ value: string;
474
+ type: "color";
475
+ }, {
476
+ value: string;
477
+ type: "color";
478
+ }>;
479
+ export declare const TypographyTokenSchema: z.ZodObject<{
480
+ type: z.ZodLiteral<"typography">;
481
+ value: z.ZodObject<{
482
+ fontFamily: z.ZodString;
483
+ fontSize: z.ZodNumber;
484
+ lineHeight: z.ZodNumber;
485
+ fontWeight: z.ZodNumber;
486
+ }, "strip", z.ZodTypeAny, {
487
+ fontFamily: string;
488
+ fontSize: number;
489
+ lineHeight: number;
490
+ fontWeight: number;
491
+ }, {
492
+ fontFamily: string;
493
+ fontSize: number;
494
+ lineHeight: number;
495
+ fontWeight: number;
496
+ }>;
497
+ }, "strip", z.ZodTypeAny, {
498
+ value: {
499
+ fontFamily: string;
500
+ fontSize: number;
501
+ lineHeight: number;
502
+ fontWeight: number;
503
+ };
504
+ type: "typography";
505
+ }, {
506
+ value: {
507
+ fontFamily: string;
508
+ fontSize: number;
509
+ lineHeight: number;
510
+ fontWeight: number;
511
+ };
512
+ type: "typography";
513
+ }>;
514
+ export declare const SpacingTokenSchema: z.ZodObject<{
515
+ type: z.ZodLiteral<"spacing">;
516
+ value: z.ZodNumber;
517
+ }, "strip", z.ZodTypeAny, {
518
+ value: number;
519
+ type: "spacing";
520
+ }, {
521
+ value: number;
522
+ type: "spacing";
523
+ }>;
524
+ export declare const RadiusTokenSchema: z.ZodObject<{
525
+ type: z.ZodLiteral<"radius">;
526
+ value: z.ZodNumber;
527
+ }, "strip", z.ZodTypeAny, {
528
+ value: number;
529
+ type: "radius";
530
+ }, {
531
+ value: number;
532
+ type: "radius";
533
+ }>;
534
+ export declare const ShadowTokenSchema: z.ZodObject<{
535
+ type: z.ZodLiteral<"shadow">;
536
+ value: z.ZodObject<{
537
+ x: z.ZodNumber;
538
+ y: z.ZodNumber;
539
+ radius: z.ZodNumber;
540
+ color: z.ZodString;
541
+ }, "strip", z.ZodTypeAny, {
542
+ color: string;
543
+ radius: number;
544
+ x: number;
545
+ y: number;
546
+ }, {
547
+ color: string;
548
+ radius: number;
549
+ x: number;
550
+ y: number;
551
+ }>;
552
+ }, "strip", z.ZodTypeAny, {
553
+ value: {
554
+ color: string;
555
+ radius: number;
556
+ x: number;
557
+ y: number;
558
+ };
559
+ type: "shadow";
560
+ }, {
561
+ value: {
562
+ color: string;
563
+ radius: number;
564
+ x: number;
565
+ y: number;
566
+ };
567
+ type: "shadow";
568
+ }>;
569
+ export declare const TokenValueSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
570
+ type: z.ZodLiteral<"color">;
571
+ value: z.ZodString;
572
+ }, "strip", z.ZodTypeAny, {
573
+ value: string;
574
+ type: "color";
575
+ }, {
576
+ value: string;
577
+ type: "color";
578
+ }>, z.ZodObject<{
579
+ type: z.ZodLiteral<"typography">;
580
+ value: z.ZodObject<{
581
+ fontFamily: z.ZodString;
582
+ fontSize: z.ZodNumber;
583
+ lineHeight: z.ZodNumber;
584
+ fontWeight: z.ZodNumber;
585
+ }, "strip", z.ZodTypeAny, {
586
+ fontFamily: string;
587
+ fontSize: number;
588
+ lineHeight: number;
589
+ fontWeight: number;
590
+ }, {
591
+ fontFamily: string;
592
+ fontSize: number;
593
+ lineHeight: number;
594
+ fontWeight: number;
595
+ }>;
596
+ }, "strip", z.ZodTypeAny, {
597
+ value: {
598
+ fontFamily: string;
599
+ fontSize: number;
600
+ lineHeight: number;
601
+ fontWeight: number;
602
+ };
603
+ type: "typography";
604
+ }, {
605
+ value: {
606
+ fontFamily: string;
607
+ fontSize: number;
608
+ lineHeight: number;
609
+ fontWeight: number;
610
+ };
611
+ type: "typography";
612
+ }>, z.ZodObject<{
613
+ type: z.ZodLiteral<"spacing">;
614
+ value: z.ZodNumber;
615
+ }, "strip", z.ZodTypeAny, {
616
+ value: number;
617
+ type: "spacing";
618
+ }, {
619
+ value: number;
620
+ type: "spacing";
621
+ }>, z.ZodObject<{
622
+ type: z.ZodLiteral<"radius">;
623
+ value: z.ZodNumber;
624
+ }, "strip", z.ZodTypeAny, {
625
+ value: number;
626
+ type: "radius";
627
+ }, {
628
+ value: number;
629
+ type: "radius";
630
+ }>, z.ZodObject<{
631
+ type: z.ZodLiteral<"shadow">;
632
+ value: z.ZodObject<{
633
+ x: z.ZodNumber;
634
+ y: z.ZodNumber;
635
+ radius: z.ZodNumber;
636
+ color: z.ZodString;
637
+ }, "strip", z.ZodTypeAny, {
638
+ color: string;
639
+ radius: number;
640
+ x: number;
641
+ y: number;
642
+ }, {
643
+ color: string;
644
+ radius: number;
645
+ x: number;
646
+ y: number;
647
+ }>;
648
+ }, "strip", z.ZodTypeAny, {
649
+ value: {
650
+ color: string;
651
+ radius: number;
652
+ x: number;
653
+ y: number;
654
+ };
655
+ type: "shadow";
656
+ }, {
657
+ value: {
658
+ color: string;
659
+ radius: number;
660
+ x: number;
661
+ y: number;
662
+ };
663
+ type: "shadow";
664
+ }>]>;
665
+ export declare const TokenSchema: z.ZodObject<{
666
+ id: z.ZodString;
667
+ type: z.ZodEnum<["color", "typography", "spacing", "radius", "shadow"]>;
668
+ name: z.ZodString;
669
+ value: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
670
+ type: z.ZodLiteral<"color">;
671
+ value: z.ZodString;
672
+ }, "strip", z.ZodTypeAny, {
673
+ value: string;
674
+ type: "color";
675
+ }, {
676
+ value: string;
677
+ type: "color";
678
+ }>, z.ZodObject<{
679
+ type: z.ZodLiteral<"typography">;
680
+ value: z.ZodObject<{
681
+ fontFamily: z.ZodString;
682
+ fontSize: z.ZodNumber;
683
+ lineHeight: z.ZodNumber;
684
+ fontWeight: z.ZodNumber;
685
+ }, "strip", z.ZodTypeAny, {
686
+ fontFamily: string;
687
+ fontSize: number;
688
+ lineHeight: number;
689
+ fontWeight: number;
690
+ }, {
691
+ fontFamily: string;
692
+ fontSize: number;
693
+ lineHeight: number;
694
+ fontWeight: number;
695
+ }>;
696
+ }, "strip", z.ZodTypeAny, {
697
+ value: {
698
+ fontFamily: string;
699
+ fontSize: number;
700
+ lineHeight: number;
701
+ fontWeight: number;
702
+ };
703
+ type: "typography";
704
+ }, {
705
+ value: {
706
+ fontFamily: string;
707
+ fontSize: number;
708
+ lineHeight: number;
709
+ fontWeight: number;
710
+ };
711
+ type: "typography";
712
+ }>, z.ZodObject<{
713
+ type: z.ZodLiteral<"spacing">;
714
+ value: z.ZodNumber;
715
+ }, "strip", z.ZodTypeAny, {
716
+ value: number;
717
+ type: "spacing";
718
+ }, {
719
+ value: number;
720
+ type: "spacing";
721
+ }>, z.ZodObject<{
722
+ type: z.ZodLiteral<"radius">;
723
+ value: z.ZodNumber;
724
+ }, "strip", z.ZodTypeAny, {
725
+ value: number;
726
+ type: "radius";
727
+ }, {
728
+ value: number;
729
+ type: "radius";
730
+ }>, z.ZodObject<{
731
+ type: z.ZodLiteral<"shadow">;
732
+ value: z.ZodObject<{
733
+ x: z.ZodNumber;
734
+ y: z.ZodNumber;
735
+ radius: z.ZodNumber;
736
+ color: z.ZodString;
737
+ }, "strip", z.ZodTypeAny, {
738
+ color: string;
739
+ radius: number;
740
+ x: number;
741
+ y: number;
742
+ }, {
743
+ color: string;
744
+ radius: number;
745
+ x: number;
746
+ y: number;
747
+ }>;
748
+ }, "strip", z.ZodTypeAny, {
749
+ value: {
750
+ color: string;
751
+ radius: number;
752
+ x: number;
753
+ y: number;
754
+ };
755
+ type: "shadow";
756
+ }, {
757
+ value: {
758
+ color: string;
759
+ radius: number;
760
+ x: number;
761
+ y: number;
762
+ };
763
+ type: "shadow";
764
+ }>]>;
765
+ sourceNodes: z.ZodArray<z.ZodString, "many">;
766
+ fidelity: z.ZodEnum<["exact", "approx"]>;
767
+ }, "strict", z.ZodTypeAny, {
768
+ value: {
769
+ value: string;
770
+ type: "color";
771
+ } | {
772
+ value: {
773
+ fontFamily: string;
774
+ fontSize: number;
775
+ lineHeight: number;
776
+ fontWeight: number;
777
+ };
778
+ type: "typography";
779
+ } | {
780
+ value: number;
781
+ type: "spacing";
782
+ } | {
783
+ value: number;
784
+ type: "radius";
785
+ } | {
786
+ value: {
787
+ color: string;
788
+ radius: number;
789
+ x: number;
790
+ y: number;
791
+ };
792
+ type: "shadow";
793
+ };
794
+ type: "color" | "radius" | "typography" | "spacing" | "shadow";
795
+ id: string;
796
+ name: string;
797
+ sourceNodes: string[];
798
+ fidelity: "exact" | "approx";
799
+ }, {
800
+ value: {
801
+ value: string;
802
+ type: "color";
803
+ } | {
804
+ value: {
805
+ fontFamily: string;
806
+ fontSize: number;
807
+ lineHeight: number;
808
+ fontWeight: number;
809
+ };
810
+ type: "typography";
811
+ } | {
812
+ value: number;
813
+ type: "spacing";
814
+ } | {
815
+ value: number;
816
+ type: "radius";
817
+ } | {
818
+ value: {
819
+ color: string;
820
+ radius: number;
821
+ x: number;
822
+ y: number;
823
+ };
824
+ type: "shadow";
825
+ };
826
+ type: "color" | "radius" | "typography" | "spacing" | "shadow";
827
+ id: string;
828
+ name: string;
829
+ sourceNodes: string[];
830
+ fidelity: "exact" | "approx";
831
+ }>;
832
+ export interface GraphNode {
833
+ id: string;
834
+ kind: 'frame' | 'text' | 'image' | 'svg' | 'shape' | 'raster' | 'placeholder';
835
+ name: string;
836
+ role?: string;
837
+ box: {
838
+ x: number;
839
+ y: number;
840
+ w: number;
841
+ h: number;
842
+ };
843
+ style: {
844
+ fills?: Array<{
845
+ type: 'solid' | 'linear' | 'radial' | 'conic';
846
+ visible: boolean;
847
+ opacity: number;
848
+ blendMode?: string;
849
+ color?: string;
850
+ gradientHandlePositions?: Array<{
851
+ position: number;
852
+ color: string;
853
+ }>;
854
+ gradientStops?: Array<{
855
+ position: number;
856
+ color: string;
857
+ }>;
858
+ transition?: 'exact' | 'approx';
859
+ }>;
860
+ strokes?: Array<{
861
+ visible: boolean;
862
+ width: number;
863
+ color: string;
864
+ opacity: number;
865
+ pattern?: string;
866
+ align?: 'INSIDE' | 'CENTER' | 'OUTSIDE';
867
+ cap?: 'NONE' | 'ROUND' | 'SQUARE' | 'ARROW';
868
+ join?: 'NONE' | 'ROUND' | 'BEVEL' | 'MITER' | 'MITER_ROUND';
869
+ dash?: number[];
870
+ cornerRadius?: number;
871
+ }>;
872
+ effects?: Array<{
873
+ type: 'DROP_SHADOW' | 'INNER_SHADOW' | 'LAYER_BLUR' | 'BACKGROUND_BLUR';
874
+ visible: boolean;
875
+ radius: number;
876
+ color: string;
877
+ opacity: number;
878
+ offset?: {
879
+ x: number;
880
+ y: number;
881
+ };
882
+ spread?: number;
883
+ blendMode?: string;
884
+ }>;
885
+ radius?: number | [number, number, number, number];
886
+ opacity?: number;
887
+ clip?: boolean;
888
+ blend?: string;
889
+ transform?: {
890
+ rotate?: number;
891
+ scale?: [number, number];
892
+ };
893
+ position?: 'static' | 'fixed' | 'sticky';
894
+ };
895
+ text?: {
896
+ runs: Array<{
897
+ text: string;
898
+ font: {
899
+ family: string;
900
+ style: string;
901
+ weight: number;
902
+ url?: string;
903
+ };
904
+ color: string;
905
+ deco?: string;
906
+ }>;
907
+ align: string;
908
+ lineHeight: number;
909
+ };
910
+ asset?: string;
911
+ layoutHint?: {
912
+ mode: 'row' | 'column' | 'grid';
913
+ gap: number;
914
+ padding: [number, number, number, number];
915
+ align: string;
916
+ justify: string;
917
+ wrap: boolean;
918
+ confidence: number;
919
+ };
920
+ componentRef?: string;
921
+ fidelity: {
922
+ tag: 'exact' | 'approx' | 'unsupported';
923
+ reason?: 'RASTER_FALLBACK' | 'FONT_SUBSTITUTED' | 'EASING_APPROX' | 'WEBGL' | 'CANVAS' | 'LOTTIE' | 'SCROLL_LINKED' | 'SVG_INVALID' | 'VIDEO' | 'IFRAME_CROSS_ORIGIN' | 'OTHER';
924
+ confidence?: number;
925
+ };
926
+ children: GraphNode[];
927
+ }
928
+ export declare let NodeSchema: z.ZodType<GraphNode>;
929
+ export declare const ComponentSchema: z.ZodObject<{
930
+ id: z.ZodString;
931
+ name: z.ZodString;
932
+ node: z.ZodType<GraphNode, z.ZodTypeDef, GraphNode>;
933
+ variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
934
+ propertyName: z.ZodString;
935
+ values: z.ZodArray<z.ZodObject<{
936
+ value: z.ZodString;
937
+ nodeId: z.ZodString;
938
+ }, "strip", z.ZodTypeAny, {
939
+ value: string;
940
+ nodeId: string;
941
+ }, {
942
+ value: string;
943
+ nodeId: string;
944
+ }>, "many">;
945
+ }, "strip", z.ZodTypeAny, {
946
+ values: {
947
+ value: string;
948
+ nodeId: string;
949
+ }[];
950
+ propertyName: string;
951
+ }, {
952
+ values: {
953
+ value: string;
954
+ nodeId: string;
955
+ }[];
956
+ propertyName: string;
957
+ }>, "many">>;
958
+ fidelity: z.ZodEnum<["exact", "approx"]>;
959
+ }, "strict", z.ZodTypeAny, {
960
+ id: string;
961
+ name: string;
962
+ fidelity: "exact" | "approx";
963
+ node: GraphNode;
964
+ variants?: {
965
+ values: {
966
+ value: string;
967
+ nodeId: string;
968
+ }[];
969
+ propertyName: string;
970
+ }[] | undefined;
971
+ }, {
972
+ id: string;
973
+ name: string;
974
+ fidelity: "exact" | "approx";
975
+ node: GraphNode;
976
+ variants?: {
977
+ values: {
978
+ value: string;
979
+ nodeId: string;
980
+ }[];
981
+ propertyName: string;
982
+ }[] | undefined;
983
+ }>;
984
+ export declare const StateSchema: z.ZodObject<{
985
+ id: z.ZodString;
986
+ target: z.ZodString;
987
+ trigger: z.ZodEnum<["hover", "click", "focus", "timeout", "key"]>;
988
+ delta: z.ZodObject<{
989
+ styleChanges: z.ZodOptional<z.ZodRecord<z.ZodEnum<["opacity", "fill", "stroke", "stroke-width", "corner-radius", "effects", "transform", "scale", "rotate", "translate"]>, z.ZodUnknown>>;
990
+ added: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<GraphNode, z.ZodTypeDef, GraphNode>>, "many">>;
991
+ removed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
992
+ }, "strip", z.ZodTypeAny, {
993
+ styleChanges?: Partial<Record<"opacity" | "fill" | "stroke" | "stroke-width" | "corner-radius" | "effects" | "transform" | "scale" | "rotate" | "translate", unknown>> | undefined;
994
+ added?: GraphNode[] | undefined;
995
+ removed?: string[] | undefined;
996
+ }, {
997
+ styleChanges?: Partial<Record<"opacity" | "fill" | "stroke" | "stroke-width" | "corner-radius" | "effects" | "transform" | "scale" | "rotate" | "translate", unknown>> | undefined;
998
+ added?: GraphNode[] | undefined;
999
+ removed?: string[] | undefined;
1000
+ }>;
1001
+ transition: z.ZodOptional<z.ZodObject<{
1002
+ durationMs: z.ZodNumber;
1003
+ delayMs: z.ZodNumber;
1004
+ easing: z.ZodEffects<z.ZodString, string, string>;
1005
+ }, "strip", z.ZodTypeAny, {
1006
+ durationMs: number;
1007
+ delayMs: number;
1008
+ easing: string;
1009
+ }, {
1010
+ durationMs: number;
1011
+ delayMs: number;
1012
+ easing: string;
1013
+ }>>;
1014
+ kind: z.ZodEnum<["variant", "overlay", "navigate"]>;
1015
+ toPage: z.ZodOptional<z.ZodString>;
1016
+ }, "strict", z.ZodTypeAny, {
1017
+ id: string;
1018
+ kind: "variant" | "overlay" | "navigate";
1019
+ target: string;
1020
+ trigger: "hover" | "click" | "focus" | "timeout" | "key";
1021
+ delta: {
1022
+ styleChanges?: Partial<Record<"opacity" | "fill" | "stroke" | "stroke-width" | "corner-radius" | "effects" | "transform" | "scale" | "rotate" | "translate", unknown>> | undefined;
1023
+ added?: GraphNode[] | undefined;
1024
+ removed?: string[] | undefined;
1025
+ };
1026
+ transition?: {
1027
+ durationMs: number;
1028
+ delayMs: number;
1029
+ easing: string;
1030
+ } | undefined;
1031
+ toPage?: string | undefined;
1032
+ }, {
1033
+ id: string;
1034
+ kind: "variant" | "overlay" | "navigate";
1035
+ target: string;
1036
+ trigger: "hover" | "click" | "focus" | "timeout" | "key";
1037
+ delta: {
1038
+ styleChanges?: Partial<Record<"opacity" | "fill" | "stroke" | "stroke-width" | "corner-radius" | "effects" | "transform" | "scale" | "rotate" | "translate", unknown>> | undefined;
1039
+ added?: GraphNode[] | undefined;
1040
+ removed?: string[] | undefined;
1041
+ };
1042
+ transition?: {
1043
+ durationMs: number;
1044
+ delayMs: number;
1045
+ easing: string;
1046
+ } | undefined;
1047
+ toPage?: string | undefined;
1048
+ }>;
1049
+ export declare const DiagnosticSchema: z.ZodObject<{
1050
+ level: z.ZodEnum<["info", "warn", "error"]>;
1051
+ code: z.ZodString;
1052
+ message: z.ZodString;
1053
+ nodeId: z.ZodOptional<z.ZodString>;
1054
+ }, "strict", z.ZodTypeAny, {
1055
+ code: string;
1056
+ message: string;
1057
+ level: "info" | "warn" | "error";
1058
+ nodeId?: string | undefined;
1059
+ }, {
1060
+ code: string;
1061
+ message: string;
1062
+ level: "info" | "warn" | "error";
1063
+ nodeId?: string | undefined;
1064
+ }>;
1065
+ export declare const PageDocSchema: z.ZodObject<{
1066
+ id: z.ZodString;
1067
+ url: z.ZodEffects<z.ZodString, string, string>;
1068
+ title: z.ZodString;
1069
+ captures: z.ZodArray<z.ZodObject<{
1070
+ viewport: z.ZodObject<{
1071
+ width: z.ZodNumber;
1072
+ height: z.ZodNumber;
1073
+ deviceScale: z.ZodNumber;
1074
+ }, "strip", z.ZodTypeAny, {
1075
+ width: number;
1076
+ height: number;
1077
+ deviceScale: number;
1078
+ }, {
1079
+ width: number;
1080
+ height: number;
1081
+ deviceScale: number;
1082
+ }>;
1083
+ screenshot: z.ZodEffects<z.ZodString, string, string>;
1084
+ root: z.ZodType<GraphNode, z.ZodTypeDef, GraphNode>;
1085
+ }, "strip", z.ZodTypeAny, {
1086
+ viewport: {
1087
+ width: number;
1088
+ height: number;
1089
+ deviceScale: number;
1090
+ };
1091
+ screenshot: string;
1092
+ root: GraphNode;
1093
+ }, {
1094
+ viewport: {
1095
+ width: number;
1096
+ height: number;
1097
+ deviceScale: number;
1098
+ };
1099
+ screenshot: string;
1100
+ root: GraphNode;
1101
+ }>, "many">;
1102
+ states: z.ZodDefault<z.ZodArray<z.ZodObject<{
1103
+ id: z.ZodString;
1104
+ target: z.ZodString;
1105
+ trigger: z.ZodEnum<["hover", "click", "focus", "timeout", "key"]>;
1106
+ delta: z.ZodObject<{
1107
+ styleChanges: z.ZodOptional<z.ZodRecord<z.ZodEnum<["opacity", "fill", "stroke", "stroke-width", "corner-radius", "effects", "transform", "scale", "rotate", "translate"]>, z.ZodUnknown>>;
1108
+ added: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<GraphNode, z.ZodTypeDef, GraphNode>>, "many">>;
1109
+ removed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1110
+ }, "strip", z.ZodTypeAny, {
1111
+ styleChanges?: Partial<Record<"opacity" | "fill" | "stroke" | "stroke-width" | "corner-radius" | "effects" | "transform" | "scale" | "rotate" | "translate", unknown>> | undefined;
1112
+ added?: GraphNode[] | undefined;
1113
+ removed?: string[] | undefined;
1114
+ }, {
1115
+ styleChanges?: Partial<Record<"opacity" | "fill" | "stroke" | "stroke-width" | "corner-radius" | "effects" | "transform" | "scale" | "rotate" | "translate", unknown>> | undefined;
1116
+ added?: GraphNode[] | undefined;
1117
+ removed?: string[] | undefined;
1118
+ }>;
1119
+ transition: z.ZodOptional<z.ZodObject<{
1120
+ durationMs: z.ZodNumber;
1121
+ delayMs: z.ZodNumber;
1122
+ easing: z.ZodEffects<z.ZodString, string, string>;
1123
+ }, "strip", z.ZodTypeAny, {
1124
+ durationMs: number;
1125
+ delayMs: number;
1126
+ easing: string;
1127
+ }, {
1128
+ durationMs: number;
1129
+ delayMs: number;
1130
+ easing: string;
1131
+ }>>;
1132
+ kind: z.ZodEnum<["variant", "overlay", "navigate"]>;
1133
+ toPage: z.ZodOptional<z.ZodString>;
1134
+ }, "strict", z.ZodTypeAny, {
1135
+ id: string;
1136
+ kind: "variant" | "overlay" | "navigate";
1137
+ target: string;
1138
+ trigger: "hover" | "click" | "focus" | "timeout" | "key";
1139
+ delta: {
1140
+ styleChanges?: Partial<Record<"opacity" | "fill" | "stroke" | "stroke-width" | "corner-radius" | "effects" | "transform" | "scale" | "rotate" | "translate", unknown>> | undefined;
1141
+ added?: GraphNode[] | undefined;
1142
+ removed?: string[] | undefined;
1143
+ };
1144
+ transition?: {
1145
+ durationMs: number;
1146
+ delayMs: number;
1147
+ easing: string;
1148
+ } | undefined;
1149
+ toPage?: string | undefined;
1150
+ }, {
1151
+ id: string;
1152
+ kind: "variant" | "overlay" | "navigate";
1153
+ target: string;
1154
+ trigger: "hover" | "click" | "focus" | "timeout" | "key";
1155
+ delta: {
1156
+ styleChanges?: Partial<Record<"opacity" | "fill" | "stroke" | "stroke-width" | "corner-radius" | "effects" | "transform" | "scale" | "rotate" | "translate", unknown>> | undefined;
1157
+ added?: GraphNode[] | undefined;
1158
+ removed?: string[] | undefined;
1159
+ };
1160
+ transition?: {
1161
+ durationMs: number;
1162
+ delayMs: number;
1163
+ easing: string;
1164
+ } | undefined;
1165
+ toPage?: string | undefined;
1166
+ }>, "many">>;
1167
+ flow: z.ZodDefault<z.ZodArray<z.ZodObject<{
1168
+ to: z.ZodString;
1169
+ via: z.ZodString;
1170
+ }, "strip", z.ZodTypeAny, {
1171
+ to: string;
1172
+ via: string;
1173
+ }, {
1174
+ to: string;
1175
+ via: string;
1176
+ }>, "many">>;
1177
+ diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
1178
+ level: z.ZodEnum<["info", "warn", "error"]>;
1179
+ code: z.ZodString;
1180
+ message: z.ZodString;
1181
+ nodeId: z.ZodOptional<z.ZodString>;
1182
+ }, "strict", z.ZodTypeAny, {
1183
+ code: string;
1184
+ message: string;
1185
+ level: "info" | "warn" | "error";
1186
+ nodeId?: string | undefined;
1187
+ }, {
1188
+ code: string;
1189
+ message: string;
1190
+ level: "info" | "warn" | "error";
1191
+ nodeId?: string | undefined;
1192
+ }>, "many">>;
1193
+ }, "strip", z.ZodTypeAny, {
1194
+ url: string;
1195
+ id: string;
1196
+ title: string;
1197
+ captures: {
1198
+ viewport: {
1199
+ width: number;
1200
+ height: number;
1201
+ deviceScale: number;
1202
+ };
1203
+ screenshot: string;
1204
+ root: GraphNode;
1205
+ }[];
1206
+ states: {
1207
+ id: string;
1208
+ kind: "variant" | "overlay" | "navigate";
1209
+ target: string;
1210
+ trigger: "hover" | "click" | "focus" | "timeout" | "key";
1211
+ delta: {
1212
+ styleChanges?: Partial<Record<"opacity" | "fill" | "stroke" | "stroke-width" | "corner-radius" | "effects" | "transform" | "scale" | "rotate" | "translate", unknown>> | undefined;
1213
+ added?: GraphNode[] | undefined;
1214
+ removed?: string[] | undefined;
1215
+ };
1216
+ transition?: {
1217
+ durationMs: number;
1218
+ delayMs: number;
1219
+ easing: string;
1220
+ } | undefined;
1221
+ toPage?: string | undefined;
1222
+ }[];
1223
+ flow: {
1224
+ to: string;
1225
+ via: string;
1226
+ }[];
1227
+ diagnostics: {
1228
+ code: string;
1229
+ message: string;
1230
+ level: "info" | "warn" | "error";
1231
+ nodeId?: string | undefined;
1232
+ }[];
1233
+ }, {
1234
+ url: string;
1235
+ id: string;
1236
+ title: string;
1237
+ captures: {
1238
+ viewport: {
1239
+ width: number;
1240
+ height: number;
1241
+ deviceScale: number;
1242
+ };
1243
+ screenshot: string;
1244
+ root: GraphNode;
1245
+ }[];
1246
+ states?: {
1247
+ id: string;
1248
+ kind: "variant" | "overlay" | "navigate";
1249
+ target: string;
1250
+ trigger: "hover" | "click" | "focus" | "timeout" | "key";
1251
+ delta: {
1252
+ styleChanges?: Partial<Record<"opacity" | "fill" | "stroke" | "stroke-width" | "corner-radius" | "effects" | "transform" | "scale" | "rotate" | "translate", unknown>> | undefined;
1253
+ added?: GraphNode[] | undefined;
1254
+ removed?: string[] | undefined;
1255
+ };
1256
+ transition?: {
1257
+ durationMs: number;
1258
+ delayMs: number;
1259
+ easing: string;
1260
+ } | undefined;
1261
+ toPage?: string | undefined;
1262
+ }[] | undefined;
1263
+ flow?: {
1264
+ to: string;
1265
+ via: string;
1266
+ }[] | undefined;
1267
+ diagnostics?: {
1268
+ code: string;
1269
+ message: string;
1270
+ level: "info" | "warn" | "error";
1271
+ nodeId?: string | undefined;
1272
+ }[] | undefined;
1273
+ }>;
1274
+ export declare const ManifestSchema: z.ZodObject<{
1275
+ schemaVersion: z.ZodLiteral<1>;
1276
+ toolVersions: z.ZodObject<{
1277
+ graph: z.ZodString;
1278
+ capture: z.ZodString;
1279
+ analyze: z.ZodString;
1280
+ }, "strip", z.ZodTypeAny, {
1281
+ graph: string;
1282
+ capture: string;
1283
+ analyze: string;
1284
+ }, {
1285
+ graph: string;
1286
+ capture: string;
1287
+ analyze: string;
1288
+ }>;
1289
+ createdAt: z.ZodString;
1290
+ site: z.ZodObject<{
1291
+ origin: z.ZodString;
1292
+ title: z.ZodOptional<z.ZodString>;
1293
+ }, "strip", z.ZodTypeAny, {
1294
+ origin: string;
1295
+ title?: string | undefined;
1296
+ }, {
1297
+ origin: string;
1298
+ title?: string | undefined;
1299
+ }>;
1300
+ authorization: z.ZodObject<{
1301
+ attested: z.ZodBoolean;
1302
+ by: z.ZodString;
1303
+ at: z.ZodString;
1304
+ }, "strip", z.ZodTypeAny, {
1305
+ at: string;
1306
+ attested: boolean;
1307
+ by: string;
1308
+ }, {
1309
+ at: string;
1310
+ attested: boolean;
1311
+ by: string;
1312
+ }>;
1313
+ pages: z.ZodArray<z.ZodObject<{
1314
+ id: z.ZodString;
1315
+ url: z.ZodEffects<z.ZodString, string, string>;
1316
+ file: z.ZodEffects<z.ZodString, string, string>;
1317
+ status: z.ZodEnum<["ok", "partial", "failed"]>;
1318
+ failure: z.ZodOptional<z.ZodObject<{
1319
+ code: z.ZodString;
1320
+ message: z.ZodString;
1321
+ }, "strip", z.ZodTypeAny, {
1322
+ code: string;
1323
+ message: string;
1324
+ }, {
1325
+ code: string;
1326
+ message: string;
1327
+ }>>;
1328
+ }, "strip", z.ZodTypeAny, {
1329
+ status: "ok" | "partial" | "failed";
1330
+ url: string;
1331
+ id: string;
1332
+ file: string;
1333
+ failure?: {
1334
+ code: string;
1335
+ message: string;
1336
+ } | undefined;
1337
+ }, {
1338
+ status: "ok" | "partial" | "failed";
1339
+ url: string;
1340
+ id: string;
1341
+ file: string;
1342
+ failure?: {
1343
+ code: string;
1344
+ message: string;
1345
+ } | undefined;
1346
+ }>, "many">;
1347
+ checksums: z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodString>;
1348
+ }, "strict", z.ZodTypeAny, {
1349
+ schemaVersion: 1;
1350
+ toolVersions: {
1351
+ graph: string;
1352
+ capture: string;
1353
+ analyze: string;
1354
+ };
1355
+ createdAt: string;
1356
+ site: {
1357
+ origin: string;
1358
+ title?: string | undefined;
1359
+ };
1360
+ authorization: {
1361
+ at: string;
1362
+ attested: boolean;
1363
+ by: string;
1364
+ };
1365
+ pages: {
1366
+ status: "ok" | "partial" | "failed";
1367
+ url: string;
1368
+ id: string;
1369
+ file: string;
1370
+ failure?: {
1371
+ code: string;
1372
+ message: string;
1373
+ } | undefined;
1374
+ }[];
1375
+ checksums: Record<string, string>;
1376
+ }, {
1377
+ schemaVersion: 1;
1378
+ toolVersions: {
1379
+ graph: string;
1380
+ capture: string;
1381
+ analyze: string;
1382
+ };
1383
+ createdAt: string;
1384
+ site: {
1385
+ origin: string;
1386
+ title?: string | undefined;
1387
+ };
1388
+ authorization: {
1389
+ at: string;
1390
+ attested: boolean;
1391
+ by: string;
1392
+ };
1393
+ pages: {
1394
+ status: "ok" | "partial" | "failed";
1395
+ url: string;
1396
+ id: string;
1397
+ file: string;
1398
+ failure?: {
1399
+ code: string;
1400
+ message: string;
1401
+ } | undefined;
1402
+ }[];
1403
+ checksums: Record<string, string>;
1404
+ }>;
1405
+ export declare function validateDesignGraph(data: unknown): {
1406
+ valid: boolean;
1407
+ errors?: string[];
1408
+ };
1409
+ //# sourceMappingURL=validation.d.ts.map