extraktor 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2774 @@
1
+ import { z } from 'zod';
2
+ import { Page } from 'playwright';
3
+
4
+ /**
5
+ * Core extraction types for extraktor
6
+ * Defines the unified extraction result schema
7
+ */
8
+ type ColorFormat = 'hex' | 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'oklch' | 'lab';
9
+ type ColorUsageType = 'background' | 'text' | 'border' | 'shadow' | 'accent' | 'gradient';
10
+ interface ColorToken {
11
+ name: string;
12
+ value: string;
13
+ originalValue: string;
14
+ format: ColorFormat;
15
+ usage: ColorUsageType[];
16
+ frequency: number;
17
+ elements: string[];
18
+ tailwindClass?: string;
19
+ }
20
+ interface GradientToken {
21
+ name: string;
22
+ value: string;
23
+ type: 'linear' | 'radial' | 'conic';
24
+ stops: GradientStop[];
25
+ angle?: string;
26
+ position?: string;
27
+ frequency: number;
28
+ }
29
+ interface GradientStop {
30
+ color: string;
31
+ position: string;
32
+ }
33
+ interface ExtractedColors {
34
+ palette: ColorToken[];
35
+ backgrounds: ColorToken[];
36
+ text: ColorToken[];
37
+ borders: ColorToken[];
38
+ accents: ColorToken[];
39
+ gradients: GradientToken[];
40
+ }
41
+ interface FontFamilyToken {
42
+ name: string;
43
+ value: string;
44
+ fallbacks: string[];
45
+ category: 'sans' | 'serif' | 'mono' | 'display' | 'handwriting';
46
+ source: 'system' | 'google' | 'custom' | 'variable';
47
+ fontFiles?: FontFile[];
48
+ tailwindClass?: string;
49
+ frequency: number;
50
+ }
51
+ interface FontFile {
52
+ url: string;
53
+ format: 'woff2' | 'woff' | 'ttf' | 'otf' | 'eot';
54
+ weight?: string;
55
+ style?: string;
56
+ localPath?: string;
57
+ }
58
+ interface FontSizeToken {
59
+ name: string;
60
+ value: string;
61
+ pxValue: number;
62
+ remValue: number;
63
+ tailwindClass?: string;
64
+ frequency: number;
65
+ }
66
+ interface FontWeightToken {
67
+ name: string;
68
+ value: string;
69
+ numericValue: number;
70
+ tailwindClass?: string;
71
+ frequency: number;
72
+ }
73
+ interface LineHeightToken {
74
+ name: string;
75
+ value: string;
76
+ numericValue?: number;
77
+ tailwindClass?: string;
78
+ frequency: number;
79
+ }
80
+ interface LetterSpacingToken {
81
+ name: string;
82
+ value: string;
83
+ emValue?: number;
84
+ tailwindClass?: string;
85
+ frequency: number;
86
+ }
87
+ interface TextStyleToken {
88
+ name: string;
89
+ fontFamily: string;
90
+ fontSize: string;
91
+ fontWeight: string;
92
+ lineHeight: string;
93
+ letterSpacing?: string;
94
+ textTransform?: string;
95
+ textDecoration?: string;
96
+ elements: string[];
97
+ }
98
+ interface ExtractedTypography {
99
+ fontFamilies: FontFamilyToken[];
100
+ fontSizes: FontSizeToken[];
101
+ fontWeights: FontWeightToken[];
102
+ lineHeights: LineHeightToken[];
103
+ letterSpacings: LetterSpacingToken[];
104
+ textStyles: TextStyleToken[];
105
+ }
106
+ interface SpacingToken {
107
+ name: string;
108
+ value: string;
109
+ pxValue: number;
110
+ remValue: number;
111
+ tailwindClass?: string;
112
+ frequency: number;
113
+ }
114
+ interface SpacingUsage {
115
+ property: string;
116
+ value: string;
117
+ elements: string[];
118
+ frequency: number;
119
+ }
120
+ interface ExtractedSpacing {
121
+ scale: SpacingToken[];
122
+ margins: SpacingUsage[];
123
+ paddings: SpacingUsage[];
124
+ gaps: SpacingUsage[];
125
+ }
126
+ interface ShadowToken {
127
+ name: string;
128
+ value: string;
129
+ type: 'box' | 'text' | 'drop';
130
+ layers: ShadowLayer[];
131
+ tailwindClass?: string;
132
+ frequency: number;
133
+ }
134
+ interface ShadowLayer {
135
+ offsetX: string;
136
+ offsetY: string;
137
+ blur: string;
138
+ spread?: string;
139
+ color: string;
140
+ inset: boolean;
141
+ }
142
+ interface BorderToken {
143
+ name: string;
144
+ width: string;
145
+ style: string;
146
+ color: string;
147
+ tailwindClass?: string;
148
+ frequency: number;
149
+ }
150
+ interface BorderRadiusToken {
151
+ name: string;
152
+ value: string;
153
+ pxValue: number;
154
+ tailwindClass?: string;
155
+ frequency: number;
156
+ }
157
+ interface FilterToken {
158
+ name: string;
159
+ value: string;
160
+ type: 'blur' | 'brightness' | 'contrast' | 'grayscale' | 'saturate' | 'sepia' | 'hue-rotate' | 'invert' | 'opacity' | 'backdrop';
161
+ amount: string;
162
+ frequency: number;
163
+ }
164
+ interface OpacityToken {
165
+ name: string;
166
+ value: string;
167
+ numericValue: number;
168
+ tailwindClass?: string;
169
+ frequency: number;
170
+ }
171
+ interface ExtractedEffects {
172
+ shadows: ShadowToken[];
173
+ borders: BorderToken[];
174
+ borderRadii: BorderRadiusToken[];
175
+ filters: FilterToken[];
176
+ opacity: OpacityToken[];
177
+ }
178
+ interface ContainerPattern {
179
+ maxWidth: string;
180
+ padding?: string;
181
+ margin?: string;
182
+ elements: string[];
183
+ frequency: number;
184
+ }
185
+ interface FlexPattern {
186
+ direction: string;
187
+ justifyContent: string;
188
+ alignItems: string;
189
+ gap?: string;
190
+ wrap?: string;
191
+ elements: string[];
192
+ frequency: number;
193
+ }
194
+ interface GridPattern {
195
+ columns: string;
196
+ rows?: string;
197
+ gap?: string;
198
+ areas?: string[];
199
+ elements: string[];
200
+ frequency: number;
201
+ }
202
+ interface BreakpointToken {
203
+ name: string;
204
+ minWidth?: string;
205
+ maxWidth?: string;
206
+ tailwindKey?: string;
207
+ mediaQuery: string;
208
+ }
209
+ interface ZIndexToken {
210
+ name: string;
211
+ value: number;
212
+ tailwindClass?: string;
213
+ elements: string[];
214
+ frequency: number;
215
+ }
216
+ interface ExtractedLayout {
217
+ containers: ContainerPattern[];
218
+ flexPatterns: FlexPattern[];
219
+ gridPatterns: GridPattern[];
220
+ breakpoints: BreakpointToken[];
221
+ zIndexLayers: ZIndexToken[];
222
+ }
223
+ interface KeyframeStep {
224
+ offset: string;
225
+ properties: Record<string, string>;
226
+ }
227
+ interface KeyframeAnimation {
228
+ name: string;
229
+ keyframes: KeyframeStep[];
230
+ duration?: string;
231
+ timingFunction?: string;
232
+ delay?: string;
233
+ iterationCount?: string;
234
+ direction?: string;
235
+ fillMode?: string;
236
+ cssText: string;
237
+ }
238
+ interface TransitionToken {
239
+ property: string;
240
+ duration: string;
241
+ timingFunction: string;
242
+ delay?: string;
243
+ tailwindClass?: string;
244
+ frequency: number;
245
+ }
246
+ interface TransformToken {
247
+ name: string;
248
+ value: string;
249
+ functions: TransformFunction[];
250
+ frequency: number;
251
+ }
252
+ interface TransformFunction {
253
+ name: string;
254
+ value: string;
255
+ }
256
+ interface TimingFunctionToken {
257
+ name: string;
258
+ value: string;
259
+ type: 'ease' | 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'cubic-bezier' | 'steps';
260
+ tailwindClass?: string;
261
+ frequency: number;
262
+ }
263
+ interface DurationToken {
264
+ name: string;
265
+ value: string;
266
+ msValue: number;
267
+ tailwindClass?: string;
268
+ frequency: number;
269
+ }
270
+ interface ExtractedAnimations {
271
+ keyframes: KeyframeAnimation[];
272
+ transitions: TransitionToken[];
273
+ transforms: TransformToken[];
274
+ timingFunctions: TimingFunctionToken[];
275
+ durations: DurationToken[];
276
+ }
277
+ interface ImageAsset {
278
+ id: string;
279
+ url: string;
280
+ localPath?: string;
281
+ originalFormat: string;
282
+ width?: number;
283
+ height?: number;
284
+ aspectRatio?: number;
285
+ size?: number;
286
+ alt?: string;
287
+ srcset?: string;
288
+ optimized?: {
289
+ webp?: string;
290
+ avif?: string;
291
+ };
292
+ }
293
+ interface SVGAsset {
294
+ id: string;
295
+ source: 'inline' | 'external' | 'sprite' | 'data-uri';
296
+ content: string;
297
+ optimizedContent?: string;
298
+ viewBox?: string;
299
+ width?: string;
300
+ height?: string;
301
+ fill?: string;
302
+ stroke?: string;
303
+ reactComponentPath?: string;
304
+ usage: string[];
305
+ }
306
+ interface FontAsset {
307
+ family: string;
308
+ source: string;
309
+ format: string;
310
+ weight?: string;
311
+ style?: string;
312
+ localPath?: string;
313
+ subsetPath?: string;
314
+ usedCharacters?: string;
315
+ }
316
+ interface IconAsset {
317
+ id: string;
318
+ name: string;
319
+ svg: SVGAsset;
320
+ category?: string;
321
+ usage: string[];
322
+ }
323
+ interface ExtractedAssets {
324
+ images: ImageAsset[];
325
+ svgs: SVGAsset[];
326
+ fonts: FontAsset[];
327
+ icons: IconAsset[];
328
+ }
329
+ type ComponentType$1 = 'button' | 'input' | 'textarea' | 'select' | 'checkbox' | 'radio' | 'switch' | 'card' | 'modal' | 'dialog' | 'dropdown' | 'menu' | 'navigation' | 'header' | 'footer' | 'sidebar' | 'avatar' | 'badge' | 'tag' | 'alert' | 'toast' | 'tooltip' | 'popover' | 'tab' | 'accordion' | 'table' | 'list' | 'form' | 'link' | 'image' | 'video' | 'slider' | 'progress' | 'spinner' | 'skeleton' | 'divider' | 'breadcrumb' | 'pagination' | 'custom';
330
+ interface ComponentVariant$1 {
331
+ name: string;
332
+ selector: string;
333
+ styles: Record<string, string>;
334
+ state?: 'default' | 'hover' | 'active' | 'focus' | 'disabled';
335
+ }
336
+ interface ComponentProp {
337
+ name: string;
338
+ type: string;
339
+ defaultValue?: string;
340
+ variants?: string[];
341
+ }
342
+ interface ComponentDefinition {
343
+ id: string;
344
+ type: ComponentType$1;
345
+ name: string;
346
+ selector: string;
347
+ html: string;
348
+ variants: ComponentVariant$1[];
349
+ styles: Record<string, string>;
350
+ children?: ComponentDefinition[];
351
+ props?: ComponentProp[];
352
+ tailwindClasses?: string;
353
+ }
354
+ interface ComponentPattern {
355
+ type: ComponentType$1;
356
+ count: number;
357
+ examples: string[];
358
+ }
359
+ interface ExtractedComponents$1 {
360
+ detected: ComponentDefinition[];
361
+ patterns: ComponentPattern[];
362
+ }
363
+ interface ExtractionMetadata {
364
+ url: string;
365
+ title: string;
366
+ description?: string;
367
+ favicon?: string;
368
+ timestamp: string;
369
+ duration: number;
370
+ elementsAnalyzed: number;
371
+ stylesheetsProcessed: number;
372
+ spaFramework?: 'react' | 'vue' | 'angular' | 'svelte' | 'none';
373
+ errors: ExtractionError[];
374
+ warnings: string[];
375
+ }
376
+ interface ExtractionError {
377
+ type: string;
378
+ message: string;
379
+ context?: string;
380
+ }
381
+ interface ExtractionResult {
382
+ metadata: ExtractionMetadata;
383
+ colors: ExtractedColors;
384
+ typography: ExtractedTypography;
385
+ spacing: ExtractedSpacing;
386
+ effects: ExtractedEffects;
387
+ layout: ExtractedLayout;
388
+ animations: ExtractedAnimations;
389
+ assets: ExtractedAssets;
390
+ components: ExtractedComponents$1;
391
+ cssVariables: Record<string, string>;
392
+ rawStyles: ElementStyles[];
393
+ }
394
+ interface ElementStyles {
395
+ selector: string;
396
+ tagName: string;
397
+ id?: string;
398
+ classes: string[];
399
+ computedStyles: Record<string, string>;
400
+ boundingBox: {
401
+ x: number;
402
+ y: number;
403
+ width: number;
404
+ height: number;
405
+ };
406
+ isVisible: boolean;
407
+ pseudoElements?: {
408
+ before?: Record<string, string>;
409
+ after?: Record<string, string>;
410
+ };
411
+ }
412
+
413
+ /**
414
+ * Configuration types for extraktor
415
+ * Validated with Zod schema
416
+ */
417
+
418
+ declare const BrowserConfigSchema: z.ZodObject<{
419
+ engine: z.ZodDefault<z.ZodEnum<["playwright", "puppeteer"]>>;
420
+ headless: z.ZodDefault<z.ZodBoolean>;
421
+ cdpEndpoint: z.ZodOptional<z.ZodString>;
422
+ timeout: z.ZodDefault<z.ZodNumber>;
423
+ viewport: z.ZodDefault<z.ZodObject<{
424
+ width: z.ZodDefault<z.ZodNumber>;
425
+ height: z.ZodDefault<z.ZodNumber>;
426
+ }, "strip", z.ZodTypeAny, {
427
+ width: number;
428
+ height: number;
429
+ }, {
430
+ width?: number | undefined;
431
+ height?: number | undefined;
432
+ }>>;
433
+ userAgent: z.ZodOptional<z.ZodString>;
434
+ deviceScaleFactor: z.ZodDefault<z.ZodNumber>;
435
+ }, "strip", z.ZodTypeAny, {
436
+ engine: "playwright" | "puppeteer";
437
+ headless: boolean;
438
+ timeout: number;
439
+ viewport: {
440
+ width: number;
441
+ height: number;
442
+ };
443
+ deviceScaleFactor: number;
444
+ cdpEndpoint?: string | undefined;
445
+ userAgent?: string | undefined;
446
+ }, {
447
+ engine?: "playwright" | "puppeteer" | undefined;
448
+ headless?: boolean | undefined;
449
+ cdpEndpoint?: string | undefined;
450
+ timeout?: number | undefined;
451
+ viewport?: {
452
+ width?: number | undefined;
453
+ height?: number | undefined;
454
+ } | undefined;
455
+ userAgent?: string | undefined;
456
+ deviceScaleFactor?: number | undefined;
457
+ }>;
458
+ declare const SPAConfigSchema: z.ZodObject<{
459
+ enabled: z.ZodDefault<z.ZodBoolean>;
460
+ framework: z.ZodDefault<z.ZodEnum<["auto", "react", "vue", "angular", "svelte", "none"]>>;
461
+ hydrationTimeout: z.ZodDefault<z.ZodNumber>;
462
+ waitForSelector: z.ZodOptional<z.ZodString>;
463
+ waitForNetworkIdle: z.ZodDefault<z.ZodBoolean>;
464
+ scrollToLoad: z.ZodDefault<z.ZodBoolean>;
465
+ maxScrollAttempts: z.ZodDefault<z.ZodNumber>;
466
+ }, "strip", z.ZodTypeAny, {
467
+ enabled: boolean;
468
+ framework: "react" | "vue" | "angular" | "svelte" | "none" | "auto";
469
+ hydrationTimeout: number;
470
+ waitForNetworkIdle: boolean;
471
+ scrollToLoad: boolean;
472
+ maxScrollAttempts: number;
473
+ waitForSelector?: string | undefined;
474
+ }, {
475
+ enabled?: boolean | undefined;
476
+ framework?: "react" | "vue" | "angular" | "svelte" | "none" | "auto" | undefined;
477
+ hydrationTimeout?: number | undefined;
478
+ waitForSelector?: string | undefined;
479
+ waitForNetworkIdle?: boolean | undefined;
480
+ scrollToLoad?: boolean | undefined;
481
+ maxScrollAttempts?: number | undefined;
482
+ }>;
483
+ declare const ExtractionOptionsSchema: z.ZodObject<{
484
+ colors: z.ZodDefault<z.ZodBoolean>;
485
+ typography: z.ZodDefault<z.ZodBoolean>;
486
+ spacing: z.ZodDefault<z.ZodBoolean>;
487
+ shadows: z.ZodDefault<z.ZodBoolean>;
488
+ borders: z.ZodDefault<z.ZodBoolean>;
489
+ layout: z.ZodDefault<z.ZodBoolean>;
490
+ animations: z.ZodDefault<z.ZodBoolean>;
491
+ transitions: z.ZodDefault<z.ZodBoolean>;
492
+ transforms: z.ZodDefault<z.ZodBoolean>;
493
+ zIndex: z.ZodDefault<z.ZodBoolean>;
494
+ opacity: z.ZodDefault<z.ZodBoolean>;
495
+ cssVariables: z.ZodDefault<z.ZodBoolean>;
496
+ assets: z.ZodDefault<z.ZodObject<{
497
+ images: z.ZodDefault<z.ZodBoolean>;
498
+ svgs: z.ZodDefault<z.ZodBoolean>;
499
+ fonts: z.ZodDefault<z.ZodBoolean>;
500
+ icons: z.ZodDefault<z.ZodBoolean>;
501
+ }, "strip", z.ZodTypeAny, {
502
+ images: boolean;
503
+ svgs: boolean;
504
+ fonts: boolean;
505
+ icons: boolean;
506
+ }, {
507
+ images?: boolean | undefined;
508
+ svgs?: boolean | undefined;
509
+ fonts?: boolean | undefined;
510
+ icons?: boolean | undefined;
511
+ }>>;
512
+ components: z.ZodDefault<z.ZodBoolean>;
513
+ hoverStates: z.ZodDefault<z.ZodBoolean>;
514
+ focusStates: z.ZodDefault<z.ZodBoolean>;
515
+ activeStates: z.ZodDefault<z.ZodBoolean>;
516
+ }, "strip", z.ZodTypeAny, {
517
+ opacity: boolean;
518
+ colors: boolean;
519
+ typography: boolean;
520
+ spacing: boolean;
521
+ shadows: boolean;
522
+ borders: boolean;
523
+ layout: boolean;
524
+ animations: boolean;
525
+ transitions: boolean;
526
+ transforms: boolean;
527
+ zIndex: boolean;
528
+ cssVariables: boolean;
529
+ assets: {
530
+ images: boolean;
531
+ svgs: boolean;
532
+ fonts: boolean;
533
+ icons: boolean;
534
+ };
535
+ components: boolean;
536
+ hoverStates: boolean;
537
+ focusStates: boolean;
538
+ activeStates: boolean;
539
+ }, {
540
+ opacity?: boolean | undefined;
541
+ colors?: boolean | undefined;
542
+ typography?: boolean | undefined;
543
+ spacing?: boolean | undefined;
544
+ shadows?: boolean | undefined;
545
+ borders?: boolean | undefined;
546
+ layout?: boolean | undefined;
547
+ animations?: boolean | undefined;
548
+ transitions?: boolean | undefined;
549
+ transforms?: boolean | undefined;
550
+ zIndex?: boolean | undefined;
551
+ cssVariables?: boolean | undefined;
552
+ assets?: {
553
+ images?: boolean | undefined;
554
+ svgs?: boolean | undefined;
555
+ fonts?: boolean | undefined;
556
+ icons?: boolean | undefined;
557
+ } | undefined;
558
+ components?: boolean | undefined;
559
+ hoverStates?: boolean | undefined;
560
+ focusStates?: boolean | undefined;
561
+ activeStates?: boolean | undefined;
562
+ }>;
563
+ declare const TailwindOutputConfigSchema: z.ZodObject<{
564
+ filename: z.ZodDefault<z.ZodString>;
565
+ format: z.ZodDefault<z.ZodEnum<["ts", "js", "cjs", "mjs"]>>;
566
+ includeComments: z.ZodDefault<z.ZodBoolean>;
567
+ extendOnly: z.ZodDefault<z.ZodBoolean>;
568
+ prefix: z.ZodOptional<z.ZodString>;
569
+ darkMode: z.ZodDefault<z.ZodUnion<[z.ZodEnum<["class", "media", "selector"]>, z.ZodLiteral<false>]>>;
570
+ }, "strip", z.ZodTypeAny, {
571
+ filename: string;
572
+ format: "ts" | "js" | "cjs" | "mjs";
573
+ includeComments: boolean;
574
+ extendOnly: boolean;
575
+ darkMode: false | "class" | "media" | "selector";
576
+ prefix?: string | undefined;
577
+ }, {
578
+ filename?: string | undefined;
579
+ format?: "ts" | "js" | "cjs" | "mjs" | undefined;
580
+ includeComments?: boolean | undefined;
581
+ extendOnly?: boolean | undefined;
582
+ prefix?: string | undefined;
583
+ darkMode?: false | "class" | "media" | "selector" | undefined;
584
+ }>;
585
+ declare const TokenOutputConfigSchema: z.ZodObject<{
586
+ filename: z.ZodDefault<z.ZodString>;
587
+ format: z.ZodDefault<z.ZodEnum<["style-dictionary", "dtcg", "figma"]>>;
588
+ platforms: z.ZodDefault<z.ZodArray<z.ZodEnum<["web", "ios", "android"]>, "many">>;
589
+ }, "strip", z.ZodTypeAny, {
590
+ filename: string;
591
+ format: "style-dictionary" | "dtcg" | "figma";
592
+ platforms: ("web" | "ios" | "android")[];
593
+ }, {
594
+ filename?: string | undefined;
595
+ format?: "style-dictionary" | "dtcg" | "figma" | undefined;
596
+ platforms?: ("web" | "ios" | "android")[] | undefined;
597
+ }>;
598
+ declare const FigmaOutputConfigSchema: z.ZodObject<{
599
+ filename: z.ZodDefault<z.ZodString>;
600
+ includeTypography: z.ZodDefault<z.ZodBoolean>;
601
+ includeEffects: z.ZodDefault<z.ZodBoolean>;
602
+ includeSpacing: z.ZodDefault<z.ZodBoolean>;
603
+ }, "strip", z.ZodTypeAny, {
604
+ filename: string;
605
+ includeTypography: boolean;
606
+ includeEffects: boolean;
607
+ includeSpacing: boolean;
608
+ }, {
609
+ filename?: string | undefined;
610
+ includeTypography?: boolean | undefined;
611
+ includeEffects?: boolean | undefined;
612
+ includeSpacing?: boolean | undefined;
613
+ }>;
614
+ declare const TSXOutputConfigSchema: z.ZodObject<{
615
+ directory: z.ZodDefault<z.ZodString>;
616
+ framework: z.ZodDefault<z.ZodEnum<["react", "preact", "solid"]>>;
617
+ styling: z.ZodDefault<z.ZodEnum<["tailwind", "css-modules", "styled-components", "emotion", "inline"]>>;
618
+ typescript: z.ZodDefault<z.ZodBoolean>;
619
+ includeStories: z.ZodDefault<z.ZodBoolean>;
620
+ }, "strip", z.ZodTypeAny, {
621
+ framework: "react" | "preact" | "solid";
622
+ directory: string;
623
+ styling: "inline" | "tailwind" | "css-modules" | "styled-components" | "emotion";
624
+ typescript: boolean;
625
+ includeStories: boolean;
626
+ }, {
627
+ framework?: "react" | "preact" | "solid" | undefined;
628
+ directory?: string | undefined;
629
+ styling?: "inline" | "tailwind" | "css-modules" | "styled-components" | "emotion" | undefined;
630
+ typescript?: boolean | undefined;
631
+ includeStories?: boolean | undefined;
632
+ }>;
633
+ declare const OutputConfigSchema: z.ZodObject<{
634
+ directory: z.ZodDefault<z.ZodString>;
635
+ formats: z.ZodDefault<z.ZodArray<z.ZodEnum<["tailwind", "css-variables", "design-tokens", "dtcg", "figma", "tsx"]>, "many">>;
636
+ tailwind: z.ZodDefault<z.ZodObject<{
637
+ filename: z.ZodDefault<z.ZodString>;
638
+ format: z.ZodDefault<z.ZodEnum<["ts", "js", "cjs", "mjs"]>>;
639
+ includeComments: z.ZodDefault<z.ZodBoolean>;
640
+ extendOnly: z.ZodDefault<z.ZodBoolean>;
641
+ prefix: z.ZodOptional<z.ZodString>;
642
+ darkMode: z.ZodDefault<z.ZodUnion<[z.ZodEnum<["class", "media", "selector"]>, z.ZodLiteral<false>]>>;
643
+ }, "strip", z.ZodTypeAny, {
644
+ filename: string;
645
+ format: "ts" | "js" | "cjs" | "mjs";
646
+ includeComments: boolean;
647
+ extendOnly: boolean;
648
+ darkMode: false | "class" | "media" | "selector";
649
+ prefix?: string | undefined;
650
+ }, {
651
+ filename?: string | undefined;
652
+ format?: "ts" | "js" | "cjs" | "mjs" | undefined;
653
+ includeComments?: boolean | undefined;
654
+ extendOnly?: boolean | undefined;
655
+ prefix?: string | undefined;
656
+ darkMode?: false | "class" | "media" | "selector" | undefined;
657
+ }>>;
658
+ tokens: z.ZodDefault<z.ZodObject<{
659
+ filename: z.ZodDefault<z.ZodString>;
660
+ format: z.ZodDefault<z.ZodEnum<["style-dictionary", "dtcg", "figma"]>>;
661
+ platforms: z.ZodDefault<z.ZodArray<z.ZodEnum<["web", "ios", "android"]>, "many">>;
662
+ }, "strip", z.ZodTypeAny, {
663
+ filename: string;
664
+ format: "style-dictionary" | "dtcg" | "figma";
665
+ platforms: ("web" | "ios" | "android")[];
666
+ }, {
667
+ filename?: string | undefined;
668
+ format?: "style-dictionary" | "dtcg" | "figma" | undefined;
669
+ platforms?: ("web" | "ios" | "android")[] | undefined;
670
+ }>>;
671
+ figma: z.ZodDefault<z.ZodObject<{
672
+ filename: z.ZodDefault<z.ZodString>;
673
+ includeTypography: z.ZodDefault<z.ZodBoolean>;
674
+ includeEffects: z.ZodDefault<z.ZodBoolean>;
675
+ includeSpacing: z.ZodDefault<z.ZodBoolean>;
676
+ }, "strip", z.ZodTypeAny, {
677
+ filename: string;
678
+ includeTypography: boolean;
679
+ includeEffects: boolean;
680
+ includeSpacing: boolean;
681
+ }, {
682
+ filename?: string | undefined;
683
+ includeTypography?: boolean | undefined;
684
+ includeEffects?: boolean | undefined;
685
+ includeSpacing?: boolean | undefined;
686
+ }>>;
687
+ tsx: z.ZodDefault<z.ZodObject<{
688
+ directory: z.ZodDefault<z.ZodString>;
689
+ framework: z.ZodDefault<z.ZodEnum<["react", "preact", "solid"]>>;
690
+ styling: z.ZodDefault<z.ZodEnum<["tailwind", "css-modules", "styled-components", "emotion", "inline"]>>;
691
+ typescript: z.ZodDefault<z.ZodBoolean>;
692
+ includeStories: z.ZodDefault<z.ZodBoolean>;
693
+ }, "strip", z.ZodTypeAny, {
694
+ framework: "react" | "preact" | "solid";
695
+ directory: string;
696
+ styling: "inline" | "tailwind" | "css-modules" | "styled-components" | "emotion";
697
+ typescript: boolean;
698
+ includeStories: boolean;
699
+ }, {
700
+ framework?: "react" | "preact" | "solid" | undefined;
701
+ directory?: string | undefined;
702
+ styling?: "inline" | "tailwind" | "css-modules" | "styled-components" | "emotion" | undefined;
703
+ typescript?: boolean | undefined;
704
+ includeStories?: boolean | undefined;
705
+ }>>;
706
+ cleanOutput: z.ZodDefault<z.ZodBoolean>;
707
+ }, "strip", z.ZodTypeAny, {
708
+ figma: {
709
+ filename: string;
710
+ includeTypography: boolean;
711
+ includeEffects: boolean;
712
+ includeSpacing: boolean;
713
+ };
714
+ directory: string;
715
+ tailwind: {
716
+ filename: string;
717
+ format: "ts" | "js" | "cjs" | "mjs";
718
+ includeComments: boolean;
719
+ extendOnly: boolean;
720
+ darkMode: false | "class" | "media" | "selector";
721
+ prefix?: string | undefined;
722
+ };
723
+ tsx: {
724
+ framework: "react" | "preact" | "solid";
725
+ directory: string;
726
+ styling: "inline" | "tailwind" | "css-modules" | "styled-components" | "emotion";
727
+ typescript: boolean;
728
+ includeStories: boolean;
729
+ };
730
+ formats: ("dtcg" | "figma" | "tailwind" | "css-variables" | "design-tokens" | "tsx")[];
731
+ tokens: {
732
+ filename: string;
733
+ format: "style-dictionary" | "dtcg" | "figma";
734
+ platforms: ("web" | "ios" | "android")[];
735
+ };
736
+ cleanOutput: boolean;
737
+ }, {
738
+ figma?: {
739
+ filename?: string | undefined;
740
+ includeTypography?: boolean | undefined;
741
+ includeEffects?: boolean | undefined;
742
+ includeSpacing?: boolean | undefined;
743
+ } | undefined;
744
+ directory?: string | undefined;
745
+ tailwind?: {
746
+ filename?: string | undefined;
747
+ format?: "ts" | "js" | "cjs" | "mjs" | undefined;
748
+ includeComments?: boolean | undefined;
749
+ extendOnly?: boolean | undefined;
750
+ prefix?: string | undefined;
751
+ darkMode?: false | "class" | "media" | "selector" | undefined;
752
+ } | undefined;
753
+ tsx?: {
754
+ framework?: "react" | "preact" | "solid" | undefined;
755
+ directory?: string | undefined;
756
+ styling?: "inline" | "tailwind" | "css-modules" | "styled-components" | "emotion" | undefined;
757
+ typescript?: boolean | undefined;
758
+ includeStories?: boolean | undefined;
759
+ } | undefined;
760
+ formats?: ("dtcg" | "figma" | "tailwind" | "css-variables" | "design-tokens" | "tsx")[] | undefined;
761
+ tokens?: {
762
+ filename?: string | undefined;
763
+ format?: "style-dictionary" | "dtcg" | "figma" | undefined;
764
+ platforms?: ("web" | "ios" | "android")[] | undefined;
765
+ } | undefined;
766
+ cleanOutput?: boolean | undefined;
767
+ }>;
768
+ declare const ImageOptimizationSchema: z.ZodObject<{
769
+ enabled: z.ZodDefault<z.ZodBoolean>;
770
+ formats: z.ZodDefault<z.ZodArray<z.ZodEnum<["webp", "avif", "original"]>, "many">>;
771
+ quality: z.ZodDefault<z.ZodNumber>;
772
+ maxWidth: z.ZodOptional<z.ZodNumber>;
773
+ maxHeight: z.ZodOptional<z.ZodNumber>;
774
+ preserveOriginal: z.ZodDefault<z.ZodBoolean>;
775
+ }, "strip", z.ZodTypeAny, {
776
+ enabled: boolean;
777
+ formats: ("webp" | "avif" | "original")[];
778
+ quality: number;
779
+ preserveOriginal: boolean;
780
+ maxWidth?: number | undefined;
781
+ maxHeight?: number | undefined;
782
+ }, {
783
+ enabled?: boolean | undefined;
784
+ formats?: ("webp" | "avif" | "original")[] | undefined;
785
+ quality?: number | undefined;
786
+ maxWidth?: number | undefined;
787
+ maxHeight?: number | undefined;
788
+ preserveOriginal?: boolean | undefined;
789
+ }>;
790
+ declare const SVGOptimizationSchema: z.ZodObject<{
791
+ enabled: z.ZodDefault<z.ZodBoolean>;
792
+ plugins: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
793
+ convertToReact: z.ZodDefault<z.ZodBoolean>;
794
+ removeViewBox: z.ZodDefault<z.ZodBoolean>;
795
+ addClassNames: z.ZodDefault<z.ZodBoolean>;
796
+ }, "strip", z.ZodTypeAny, {
797
+ enabled: boolean;
798
+ plugins: string[];
799
+ convertToReact: boolean;
800
+ removeViewBox: boolean;
801
+ addClassNames: boolean;
802
+ }, {
803
+ enabled?: boolean | undefined;
804
+ plugins?: string[] | undefined;
805
+ convertToReact?: boolean | undefined;
806
+ removeViewBox?: boolean | undefined;
807
+ addClassNames?: boolean | undefined;
808
+ }>;
809
+ declare const FontOptimizationSchema: z.ZodObject<{
810
+ enabled: z.ZodDefault<z.ZodBoolean>;
811
+ subset: z.ZodDefault<z.ZodBoolean>;
812
+ formats: z.ZodDefault<z.ZodArray<z.ZodEnum<["woff2", "woff", "ttf"]>, "many">>;
813
+ includeLatinExtended: z.ZodDefault<z.ZodBoolean>;
814
+ }, "strip", z.ZodTypeAny, {
815
+ enabled: boolean;
816
+ formats: ("woff2" | "woff" | "ttf")[];
817
+ subset: boolean;
818
+ includeLatinExtended: boolean;
819
+ }, {
820
+ enabled?: boolean | undefined;
821
+ formats?: ("woff2" | "woff" | "ttf")[] | undefined;
822
+ subset?: boolean | undefined;
823
+ includeLatinExtended?: boolean | undefined;
824
+ }>;
825
+ declare const OptimizationConfigSchema: z.ZodObject<{
826
+ images: z.ZodDefault<z.ZodObject<{
827
+ enabled: z.ZodDefault<z.ZodBoolean>;
828
+ formats: z.ZodDefault<z.ZodArray<z.ZodEnum<["webp", "avif", "original"]>, "many">>;
829
+ quality: z.ZodDefault<z.ZodNumber>;
830
+ maxWidth: z.ZodOptional<z.ZodNumber>;
831
+ maxHeight: z.ZodOptional<z.ZodNumber>;
832
+ preserveOriginal: z.ZodDefault<z.ZodBoolean>;
833
+ }, "strip", z.ZodTypeAny, {
834
+ enabled: boolean;
835
+ formats: ("webp" | "avif" | "original")[];
836
+ quality: number;
837
+ preserveOriginal: boolean;
838
+ maxWidth?: number | undefined;
839
+ maxHeight?: number | undefined;
840
+ }, {
841
+ enabled?: boolean | undefined;
842
+ formats?: ("webp" | "avif" | "original")[] | undefined;
843
+ quality?: number | undefined;
844
+ maxWidth?: number | undefined;
845
+ maxHeight?: number | undefined;
846
+ preserveOriginal?: boolean | undefined;
847
+ }>>;
848
+ svgs: z.ZodDefault<z.ZodObject<{
849
+ enabled: z.ZodDefault<z.ZodBoolean>;
850
+ plugins: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
851
+ convertToReact: z.ZodDefault<z.ZodBoolean>;
852
+ removeViewBox: z.ZodDefault<z.ZodBoolean>;
853
+ addClassNames: z.ZodDefault<z.ZodBoolean>;
854
+ }, "strip", z.ZodTypeAny, {
855
+ enabled: boolean;
856
+ plugins: string[];
857
+ convertToReact: boolean;
858
+ removeViewBox: boolean;
859
+ addClassNames: boolean;
860
+ }, {
861
+ enabled?: boolean | undefined;
862
+ plugins?: string[] | undefined;
863
+ convertToReact?: boolean | undefined;
864
+ removeViewBox?: boolean | undefined;
865
+ addClassNames?: boolean | undefined;
866
+ }>>;
867
+ fonts: z.ZodDefault<z.ZodObject<{
868
+ enabled: z.ZodDefault<z.ZodBoolean>;
869
+ subset: z.ZodDefault<z.ZodBoolean>;
870
+ formats: z.ZodDefault<z.ZodArray<z.ZodEnum<["woff2", "woff", "ttf"]>, "many">>;
871
+ includeLatinExtended: z.ZodDefault<z.ZodBoolean>;
872
+ }, "strip", z.ZodTypeAny, {
873
+ enabled: boolean;
874
+ formats: ("woff2" | "woff" | "ttf")[];
875
+ subset: boolean;
876
+ includeLatinExtended: boolean;
877
+ }, {
878
+ enabled?: boolean | undefined;
879
+ formats?: ("woff2" | "woff" | "ttf")[] | undefined;
880
+ subset?: boolean | undefined;
881
+ includeLatinExtended?: boolean | undefined;
882
+ }>>;
883
+ sprites: z.ZodDefault<z.ZodObject<{
884
+ enabled: z.ZodDefault<z.ZodBoolean>;
885
+ threshold: z.ZodDefault<z.ZodNumber>;
886
+ format: z.ZodDefault<z.ZodEnum<["svg", "css"]>>;
887
+ }, "strip", z.ZodTypeAny, {
888
+ enabled: boolean;
889
+ format: "svg" | "css";
890
+ threshold: number;
891
+ }, {
892
+ enabled?: boolean | undefined;
893
+ format?: "svg" | "css" | undefined;
894
+ threshold?: number | undefined;
895
+ }>>;
896
+ }, "strip", z.ZodTypeAny, {
897
+ images: {
898
+ enabled: boolean;
899
+ formats: ("webp" | "avif" | "original")[];
900
+ quality: number;
901
+ preserveOriginal: boolean;
902
+ maxWidth?: number | undefined;
903
+ maxHeight?: number | undefined;
904
+ };
905
+ svgs: {
906
+ enabled: boolean;
907
+ plugins: string[];
908
+ convertToReact: boolean;
909
+ removeViewBox: boolean;
910
+ addClassNames: boolean;
911
+ };
912
+ fonts: {
913
+ enabled: boolean;
914
+ formats: ("woff2" | "woff" | "ttf")[];
915
+ subset: boolean;
916
+ includeLatinExtended: boolean;
917
+ };
918
+ sprites: {
919
+ enabled: boolean;
920
+ format: "svg" | "css";
921
+ threshold: number;
922
+ };
923
+ }, {
924
+ images?: {
925
+ enabled?: boolean | undefined;
926
+ formats?: ("webp" | "avif" | "original")[] | undefined;
927
+ quality?: number | undefined;
928
+ maxWidth?: number | undefined;
929
+ maxHeight?: number | undefined;
930
+ preserveOriginal?: boolean | undefined;
931
+ } | undefined;
932
+ svgs?: {
933
+ enabled?: boolean | undefined;
934
+ plugins?: string[] | undefined;
935
+ convertToReact?: boolean | undefined;
936
+ removeViewBox?: boolean | undefined;
937
+ addClassNames?: boolean | undefined;
938
+ } | undefined;
939
+ fonts?: {
940
+ enabled?: boolean | undefined;
941
+ formats?: ("woff2" | "woff" | "ttf")[] | undefined;
942
+ subset?: boolean | undefined;
943
+ includeLatinExtended?: boolean | undefined;
944
+ } | undefined;
945
+ sprites?: {
946
+ enabled?: boolean | undefined;
947
+ format?: "svg" | "css" | undefined;
948
+ threshold?: number | undefined;
949
+ } | undefined;
950
+ }>;
951
+ declare const TailwindMappingSchema: z.ZodObject<{
952
+ strategy: z.ZodDefault<z.ZodEnum<["smart", "strict", "arbitrary"]>>;
953
+ threshold: z.ZodDefault<z.ZodNumber>;
954
+ customMappings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
955
+ }, "strip", z.ZodTypeAny, {
956
+ threshold: number;
957
+ strategy: "smart" | "strict" | "arbitrary";
958
+ customMappings?: Record<string, string> | undefined;
959
+ }, {
960
+ threshold?: number | undefined;
961
+ strategy?: "smart" | "strict" | "arbitrary" | undefined;
962
+ customMappings?: Record<string, string> | undefined;
963
+ }>;
964
+ declare const CacheConfigSchema: z.ZodObject<{
965
+ enabled: z.ZodDefault<z.ZodBoolean>;
966
+ directory: z.ZodDefault<z.ZodString>;
967
+ ttl: z.ZodDefault<z.ZodNumber>;
968
+ maxSize: z.ZodDefault<z.ZodNumber>;
969
+ }, "strip", z.ZodTypeAny, {
970
+ enabled: boolean;
971
+ directory: string;
972
+ ttl: number;
973
+ maxSize: number;
974
+ }, {
975
+ enabled?: boolean | undefined;
976
+ directory?: string | undefined;
977
+ ttl?: number | undefined;
978
+ maxSize?: number | undefined;
979
+ }>;
980
+ declare const ThemeConfigSchema: z.ZodObject<{
981
+ variants: z.ZodDefault<z.ZodArray<z.ZodEnum<["dark", "light", "high-contrast", "custom"]>, "many">>;
982
+ colorSwap: z.ZodDefault<z.ZodObject<{
983
+ enabled: z.ZodDefault<z.ZodBoolean>;
984
+ mappings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
985
+ }, "strip", z.ZodTypeAny, {
986
+ enabled: boolean;
987
+ mappings: Record<string, string>;
988
+ }, {
989
+ enabled?: boolean | undefined;
990
+ mappings?: Record<string, string> | undefined;
991
+ }>>;
992
+ aiGeneration: z.ZodDefault<z.ZodObject<{
993
+ enabled: z.ZodDefault<z.ZodBoolean>;
994
+ provider: z.ZodDefault<z.ZodEnum<["openai", "anthropic"]>>;
995
+ apiKey: z.ZodOptional<z.ZodString>;
996
+ model: z.ZodDefault<z.ZodString>;
997
+ }, "strip", z.ZodTypeAny, {
998
+ enabled: boolean;
999
+ provider: "openai" | "anthropic";
1000
+ model: string;
1001
+ apiKey?: string | undefined;
1002
+ }, {
1003
+ enabled?: boolean | undefined;
1004
+ provider?: "openai" | "anthropic" | undefined;
1005
+ apiKey?: string | undefined;
1006
+ model?: string | undefined;
1007
+ }>>;
1008
+ }, "strip", z.ZodTypeAny, {
1009
+ variants: ("custom" | "dark" | "light" | "high-contrast")[];
1010
+ colorSwap: {
1011
+ enabled: boolean;
1012
+ mappings: Record<string, string>;
1013
+ };
1014
+ aiGeneration: {
1015
+ enabled: boolean;
1016
+ provider: "openai" | "anthropic";
1017
+ model: string;
1018
+ apiKey?: string | undefined;
1019
+ };
1020
+ }, {
1021
+ variants?: ("custom" | "dark" | "light" | "high-contrast")[] | undefined;
1022
+ colorSwap?: {
1023
+ enabled?: boolean | undefined;
1024
+ mappings?: Record<string, string> | undefined;
1025
+ } | undefined;
1026
+ aiGeneration?: {
1027
+ enabled?: boolean | undefined;
1028
+ provider?: "openai" | "anthropic" | undefined;
1029
+ apiKey?: string | undefined;
1030
+ model?: string | undefined;
1031
+ } | undefined;
1032
+ }>;
1033
+ declare const LoggingConfigSchema: z.ZodObject<{
1034
+ level: z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error"]>>;
1035
+ file: z.ZodOptional<z.ZodString>;
1036
+ pretty: z.ZodDefault<z.ZodBoolean>;
1037
+ }, "strip", z.ZodTypeAny, {
1038
+ level: "debug" | "info" | "warn" | "error";
1039
+ pretty: boolean;
1040
+ file?: string | undefined;
1041
+ }, {
1042
+ level?: "debug" | "info" | "warn" | "error" | undefined;
1043
+ file?: string | undefined;
1044
+ pretty?: boolean | undefined;
1045
+ }>;
1046
+ declare const ExtraktorConfigSchema: z.ZodObject<{
1047
+ $schema: z.ZodOptional<z.ZodString>;
1048
+ browser: z.ZodDefault<z.ZodObject<{
1049
+ engine: z.ZodDefault<z.ZodEnum<["playwright", "puppeteer"]>>;
1050
+ headless: z.ZodDefault<z.ZodBoolean>;
1051
+ cdpEndpoint: z.ZodOptional<z.ZodString>;
1052
+ timeout: z.ZodDefault<z.ZodNumber>;
1053
+ viewport: z.ZodDefault<z.ZodObject<{
1054
+ width: z.ZodDefault<z.ZodNumber>;
1055
+ height: z.ZodDefault<z.ZodNumber>;
1056
+ }, "strip", z.ZodTypeAny, {
1057
+ width: number;
1058
+ height: number;
1059
+ }, {
1060
+ width?: number | undefined;
1061
+ height?: number | undefined;
1062
+ }>>;
1063
+ userAgent: z.ZodOptional<z.ZodString>;
1064
+ deviceScaleFactor: z.ZodDefault<z.ZodNumber>;
1065
+ }, "strip", z.ZodTypeAny, {
1066
+ engine: "playwright" | "puppeteer";
1067
+ headless: boolean;
1068
+ timeout: number;
1069
+ viewport: {
1070
+ width: number;
1071
+ height: number;
1072
+ };
1073
+ deviceScaleFactor: number;
1074
+ cdpEndpoint?: string | undefined;
1075
+ userAgent?: string | undefined;
1076
+ }, {
1077
+ engine?: "playwright" | "puppeteer" | undefined;
1078
+ headless?: boolean | undefined;
1079
+ cdpEndpoint?: string | undefined;
1080
+ timeout?: number | undefined;
1081
+ viewport?: {
1082
+ width?: number | undefined;
1083
+ height?: number | undefined;
1084
+ } | undefined;
1085
+ userAgent?: string | undefined;
1086
+ deviceScaleFactor?: number | undefined;
1087
+ }>>;
1088
+ spa: z.ZodDefault<z.ZodObject<{
1089
+ enabled: z.ZodDefault<z.ZodBoolean>;
1090
+ framework: z.ZodDefault<z.ZodEnum<["auto", "react", "vue", "angular", "svelte", "none"]>>;
1091
+ hydrationTimeout: z.ZodDefault<z.ZodNumber>;
1092
+ waitForSelector: z.ZodOptional<z.ZodString>;
1093
+ waitForNetworkIdle: z.ZodDefault<z.ZodBoolean>;
1094
+ scrollToLoad: z.ZodDefault<z.ZodBoolean>;
1095
+ maxScrollAttempts: z.ZodDefault<z.ZodNumber>;
1096
+ }, "strip", z.ZodTypeAny, {
1097
+ enabled: boolean;
1098
+ framework: "react" | "vue" | "angular" | "svelte" | "none" | "auto";
1099
+ hydrationTimeout: number;
1100
+ waitForNetworkIdle: boolean;
1101
+ scrollToLoad: boolean;
1102
+ maxScrollAttempts: number;
1103
+ waitForSelector?: string | undefined;
1104
+ }, {
1105
+ enabled?: boolean | undefined;
1106
+ framework?: "react" | "vue" | "angular" | "svelte" | "none" | "auto" | undefined;
1107
+ hydrationTimeout?: number | undefined;
1108
+ waitForSelector?: string | undefined;
1109
+ waitForNetworkIdle?: boolean | undefined;
1110
+ scrollToLoad?: boolean | undefined;
1111
+ maxScrollAttempts?: number | undefined;
1112
+ }>>;
1113
+ extraction: z.ZodDefault<z.ZodObject<{
1114
+ colors: z.ZodDefault<z.ZodBoolean>;
1115
+ typography: z.ZodDefault<z.ZodBoolean>;
1116
+ spacing: z.ZodDefault<z.ZodBoolean>;
1117
+ shadows: z.ZodDefault<z.ZodBoolean>;
1118
+ borders: z.ZodDefault<z.ZodBoolean>;
1119
+ layout: z.ZodDefault<z.ZodBoolean>;
1120
+ animations: z.ZodDefault<z.ZodBoolean>;
1121
+ transitions: z.ZodDefault<z.ZodBoolean>;
1122
+ transforms: z.ZodDefault<z.ZodBoolean>;
1123
+ zIndex: z.ZodDefault<z.ZodBoolean>;
1124
+ opacity: z.ZodDefault<z.ZodBoolean>;
1125
+ cssVariables: z.ZodDefault<z.ZodBoolean>;
1126
+ assets: z.ZodDefault<z.ZodObject<{
1127
+ images: z.ZodDefault<z.ZodBoolean>;
1128
+ svgs: z.ZodDefault<z.ZodBoolean>;
1129
+ fonts: z.ZodDefault<z.ZodBoolean>;
1130
+ icons: z.ZodDefault<z.ZodBoolean>;
1131
+ }, "strip", z.ZodTypeAny, {
1132
+ images: boolean;
1133
+ svgs: boolean;
1134
+ fonts: boolean;
1135
+ icons: boolean;
1136
+ }, {
1137
+ images?: boolean | undefined;
1138
+ svgs?: boolean | undefined;
1139
+ fonts?: boolean | undefined;
1140
+ icons?: boolean | undefined;
1141
+ }>>;
1142
+ components: z.ZodDefault<z.ZodBoolean>;
1143
+ hoverStates: z.ZodDefault<z.ZodBoolean>;
1144
+ focusStates: z.ZodDefault<z.ZodBoolean>;
1145
+ activeStates: z.ZodDefault<z.ZodBoolean>;
1146
+ }, "strip", z.ZodTypeAny, {
1147
+ opacity: boolean;
1148
+ colors: boolean;
1149
+ typography: boolean;
1150
+ spacing: boolean;
1151
+ shadows: boolean;
1152
+ borders: boolean;
1153
+ layout: boolean;
1154
+ animations: boolean;
1155
+ transitions: boolean;
1156
+ transforms: boolean;
1157
+ zIndex: boolean;
1158
+ cssVariables: boolean;
1159
+ assets: {
1160
+ images: boolean;
1161
+ svgs: boolean;
1162
+ fonts: boolean;
1163
+ icons: boolean;
1164
+ };
1165
+ components: boolean;
1166
+ hoverStates: boolean;
1167
+ focusStates: boolean;
1168
+ activeStates: boolean;
1169
+ }, {
1170
+ opacity?: boolean | undefined;
1171
+ colors?: boolean | undefined;
1172
+ typography?: boolean | undefined;
1173
+ spacing?: boolean | undefined;
1174
+ shadows?: boolean | undefined;
1175
+ borders?: boolean | undefined;
1176
+ layout?: boolean | undefined;
1177
+ animations?: boolean | undefined;
1178
+ transitions?: boolean | undefined;
1179
+ transforms?: boolean | undefined;
1180
+ zIndex?: boolean | undefined;
1181
+ cssVariables?: boolean | undefined;
1182
+ assets?: {
1183
+ images?: boolean | undefined;
1184
+ svgs?: boolean | undefined;
1185
+ fonts?: boolean | undefined;
1186
+ icons?: boolean | undefined;
1187
+ } | undefined;
1188
+ components?: boolean | undefined;
1189
+ hoverStates?: boolean | undefined;
1190
+ focusStates?: boolean | undefined;
1191
+ activeStates?: boolean | undefined;
1192
+ }>>;
1193
+ output: z.ZodDefault<z.ZodObject<{
1194
+ directory: z.ZodDefault<z.ZodString>;
1195
+ formats: z.ZodDefault<z.ZodArray<z.ZodEnum<["tailwind", "css-variables", "design-tokens", "dtcg", "figma", "tsx"]>, "many">>;
1196
+ tailwind: z.ZodDefault<z.ZodObject<{
1197
+ filename: z.ZodDefault<z.ZodString>;
1198
+ format: z.ZodDefault<z.ZodEnum<["ts", "js", "cjs", "mjs"]>>;
1199
+ includeComments: z.ZodDefault<z.ZodBoolean>;
1200
+ extendOnly: z.ZodDefault<z.ZodBoolean>;
1201
+ prefix: z.ZodOptional<z.ZodString>;
1202
+ darkMode: z.ZodDefault<z.ZodUnion<[z.ZodEnum<["class", "media", "selector"]>, z.ZodLiteral<false>]>>;
1203
+ }, "strip", z.ZodTypeAny, {
1204
+ filename: string;
1205
+ format: "ts" | "js" | "cjs" | "mjs";
1206
+ includeComments: boolean;
1207
+ extendOnly: boolean;
1208
+ darkMode: false | "class" | "media" | "selector";
1209
+ prefix?: string | undefined;
1210
+ }, {
1211
+ filename?: string | undefined;
1212
+ format?: "ts" | "js" | "cjs" | "mjs" | undefined;
1213
+ includeComments?: boolean | undefined;
1214
+ extendOnly?: boolean | undefined;
1215
+ prefix?: string | undefined;
1216
+ darkMode?: false | "class" | "media" | "selector" | undefined;
1217
+ }>>;
1218
+ tokens: z.ZodDefault<z.ZodObject<{
1219
+ filename: z.ZodDefault<z.ZodString>;
1220
+ format: z.ZodDefault<z.ZodEnum<["style-dictionary", "dtcg", "figma"]>>;
1221
+ platforms: z.ZodDefault<z.ZodArray<z.ZodEnum<["web", "ios", "android"]>, "many">>;
1222
+ }, "strip", z.ZodTypeAny, {
1223
+ filename: string;
1224
+ format: "style-dictionary" | "dtcg" | "figma";
1225
+ platforms: ("web" | "ios" | "android")[];
1226
+ }, {
1227
+ filename?: string | undefined;
1228
+ format?: "style-dictionary" | "dtcg" | "figma" | undefined;
1229
+ platforms?: ("web" | "ios" | "android")[] | undefined;
1230
+ }>>;
1231
+ figma: z.ZodDefault<z.ZodObject<{
1232
+ filename: z.ZodDefault<z.ZodString>;
1233
+ includeTypography: z.ZodDefault<z.ZodBoolean>;
1234
+ includeEffects: z.ZodDefault<z.ZodBoolean>;
1235
+ includeSpacing: z.ZodDefault<z.ZodBoolean>;
1236
+ }, "strip", z.ZodTypeAny, {
1237
+ filename: string;
1238
+ includeTypography: boolean;
1239
+ includeEffects: boolean;
1240
+ includeSpacing: boolean;
1241
+ }, {
1242
+ filename?: string | undefined;
1243
+ includeTypography?: boolean | undefined;
1244
+ includeEffects?: boolean | undefined;
1245
+ includeSpacing?: boolean | undefined;
1246
+ }>>;
1247
+ tsx: z.ZodDefault<z.ZodObject<{
1248
+ directory: z.ZodDefault<z.ZodString>;
1249
+ framework: z.ZodDefault<z.ZodEnum<["react", "preact", "solid"]>>;
1250
+ styling: z.ZodDefault<z.ZodEnum<["tailwind", "css-modules", "styled-components", "emotion", "inline"]>>;
1251
+ typescript: z.ZodDefault<z.ZodBoolean>;
1252
+ includeStories: z.ZodDefault<z.ZodBoolean>;
1253
+ }, "strip", z.ZodTypeAny, {
1254
+ framework: "react" | "preact" | "solid";
1255
+ directory: string;
1256
+ styling: "inline" | "tailwind" | "css-modules" | "styled-components" | "emotion";
1257
+ typescript: boolean;
1258
+ includeStories: boolean;
1259
+ }, {
1260
+ framework?: "react" | "preact" | "solid" | undefined;
1261
+ directory?: string | undefined;
1262
+ styling?: "inline" | "tailwind" | "css-modules" | "styled-components" | "emotion" | undefined;
1263
+ typescript?: boolean | undefined;
1264
+ includeStories?: boolean | undefined;
1265
+ }>>;
1266
+ cleanOutput: z.ZodDefault<z.ZodBoolean>;
1267
+ }, "strip", z.ZodTypeAny, {
1268
+ figma: {
1269
+ filename: string;
1270
+ includeTypography: boolean;
1271
+ includeEffects: boolean;
1272
+ includeSpacing: boolean;
1273
+ };
1274
+ directory: string;
1275
+ tailwind: {
1276
+ filename: string;
1277
+ format: "ts" | "js" | "cjs" | "mjs";
1278
+ includeComments: boolean;
1279
+ extendOnly: boolean;
1280
+ darkMode: false | "class" | "media" | "selector";
1281
+ prefix?: string | undefined;
1282
+ };
1283
+ tsx: {
1284
+ framework: "react" | "preact" | "solid";
1285
+ directory: string;
1286
+ styling: "inline" | "tailwind" | "css-modules" | "styled-components" | "emotion";
1287
+ typescript: boolean;
1288
+ includeStories: boolean;
1289
+ };
1290
+ formats: ("dtcg" | "figma" | "tailwind" | "css-variables" | "design-tokens" | "tsx")[];
1291
+ tokens: {
1292
+ filename: string;
1293
+ format: "style-dictionary" | "dtcg" | "figma";
1294
+ platforms: ("web" | "ios" | "android")[];
1295
+ };
1296
+ cleanOutput: boolean;
1297
+ }, {
1298
+ figma?: {
1299
+ filename?: string | undefined;
1300
+ includeTypography?: boolean | undefined;
1301
+ includeEffects?: boolean | undefined;
1302
+ includeSpacing?: boolean | undefined;
1303
+ } | undefined;
1304
+ directory?: string | undefined;
1305
+ tailwind?: {
1306
+ filename?: string | undefined;
1307
+ format?: "ts" | "js" | "cjs" | "mjs" | undefined;
1308
+ includeComments?: boolean | undefined;
1309
+ extendOnly?: boolean | undefined;
1310
+ prefix?: string | undefined;
1311
+ darkMode?: false | "class" | "media" | "selector" | undefined;
1312
+ } | undefined;
1313
+ tsx?: {
1314
+ framework?: "react" | "preact" | "solid" | undefined;
1315
+ directory?: string | undefined;
1316
+ styling?: "inline" | "tailwind" | "css-modules" | "styled-components" | "emotion" | undefined;
1317
+ typescript?: boolean | undefined;
1318
+ includeStories?: boolean | undefined;
1319
+ } | undefined;
1320
+ formats?: ("dtcg" | "figma" | "tailwind" | "css-variables" | "design-tokens" | "tsx")[] | undefined;
1321
+ tokens?: {
1322
+ filename?: string | undefined;
1323
+ format?: "style-dictionary" | "dtcg" | "figma" | undefined;
1324
+ platforms?: ("web" | "ios" | "android")[] | undefined;
1325
+ } | undefined;
1326
+ cleanOutput?: boolean | undefined;
1327
+ }>>;
1328
+ optimization: z.ZodDefault<z.ZodObject<{
1329
+ images: z.ZodDefault<z.ZodObject<{
1330
+ enabled: z.ZodDefault<z.ZodBoolean>;
1331
+ formats: z.ZodDefault<z.ZodArray<z.ZodEnum<["webp", "avif", "original"]>, "many">>;
1332
+ quality: z.ZodDefault<z.ZodNumber>;
1333
+ maxWidth: z.ZodOptional<z.ZodNumber>;
1334
+ maxHeight: z.ZodOptional<z.ZodNumber>;
1335
+ preserveOriginal: z.ZodDefault<z.ZodBoolean>;
1336
+ }, "strip", z.ZodTypeAny, {
1337
+ enabled: boolean;
1338
+ formats: ("webp" | "avif" | "original")[];
1339
+ quality: number;
1340
+ preserveOriginal: boolean;
1341
+ maxWidth?: number | undefined;
1342
+ maxHeight?: number | undefined;
1343
+ }, {
1344
+ enabled?: boolean | undefined;
1345
+ formats?: ("webp" | "avif" | "original")[] | undefined;
1346
+ quality?: number | undefined;
1347
+ maxWidth?: number | undefined;
1348
+ maxHeight?: number | undefined;
1349
+ preserveOriginal?: boolean | undefined;
1350
+ }>>;
1351
+ svgs: z.ZodDefault<z.ZodObject<{
1352
+ enabled: z.ZodDefault<z.ZodBoolean>;
1353
+ plugins: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1354
+ convertToReact: z.ZodDefault<z.ZodBoolean>;
1355
+ removeViewBox: z.ZodDefault<z.ZodBoolean>;
1356
+ addClassNames: z.ZodDefault<z.ZodBoolean>;
1357
+ }, "strip", z.ZodTypeAny, {
1358
+ enabled: boolean;
1359
+ plugins: string[];
1360
+ convertToReact: boolean;
1361
+ removeViewBox: boolean;
1362
+ addClassNames: boolean;
1363
+ }, {
1364
+ enabled?: boolean | undefined;
1365
+ plugins?: string[] | undefined;
1366
+ convertToReact?: boolean | undefined;
1367
+ removeViewBox?: boolean | undefined;
1368
+ addClassNames?: boolean | undefined;
1369
+ }>>;
1370
+ fonts: z.ZodDefault<z.ZodObject<{
1371
+ enabled: z.ZodDefault<z.ZodBoolean>;
1372
+ subset: z.ZodDefault<z.ZodBoolean>;
1373
+ formats: z.ZodDefault<z.ZodArray<z.ZodEnum<["woff2", "woff", "ttf"]>, "many">>;
1374
+ includeLatinExtended: z.ZodDefault<z.ZodBoolean>;
1375
+ }, "strip", z.ZodTypeAny, {
1376
+ enabled: boolean;
1377
+ formats: ("woff2" | "woff" | "ttf")[];
1378
+ subset: boolean;
1379
+ includeLatinExtended: boolean;
1380
+ }, {
1381
+ enabled?: boolean | undefined;
1382
+ formats?: ("woff2" | "woff" | "ttf")[] | undefined;
1383
+ subset?: boolean | undefined;
1384
+ includeLatinExtended?: boolean | undefined;
1385
+ }>>;
1386
+ sprites: z.ZodDefault<z.ZodObject<{
1387
+ enabled: z.ZodDefault<z.ZodBoolean>;
1388
+ threshold: z.ZodDefault<z.ZodNumber>;
1389
+ format: z.ZodDefault<z.ZodEnum<["svg", "css"]>>;
1390
+ }, "strip", z.ZodTypeAny, {
1391
+ enabled: boolean;
1392
+ format: "svg" | "css";
1393
+ threshold: number;
1394
+ }, {
1395
+ enabled?: boolean | undefined;
1396
+ format?: "svg" | "css" | undefined;
1397
+ threshold?: number | undefined;
1398
+ }>>;
1399
+ }, "strip", z.ZodTypeAny, {
1400
+ images: {
1401
+ enabled: boolean;
1402
+ formats: ("webp" | "avif" | "original")[];
1403
+ quality: number;
1404
+ preserveOriginal: boolean;
1405
+ maxWidth?: number | undefined;
1406
+ maxHeight?: number | undefined;
1407
+ };
1408
+ svgs: {
1409
+ enabled: boolean;
1410
+ plugins: string[];
1411
+ convertToReact: boolean;
1412
+ removeViewBox: boolean;
1413
+ addClassNames: boolean;
1414
+ };
1415
+ fonts: {
1416
+ enabled: boolean;
1417
+ formats: ("woff2" | "woff" | "ttf")[];
1418
+ subset: boolean;
1419
+ includeLatinExtended: boolean;
1420
+ };
1421
+ sprites: {
1422
+ enabled: boolean;
1423
+ format: "svg" | "css";
1424
+ threshold: number;
1425
+ };
1426
+ }, {
1427
+ images?: {
1428
+ enabled?: boolean | undefined;
1429
+ formats?: ("webp" | "avif" | "original")[] | undefined;
1430
+ quality?: number | undefined;
1431
+ maxWidth?: number | undefined;
1432
+ maxHeight?: number | undefined;
1433
+ preserveOriginal?: boolean | undefined;
1434
+ } | undefined;
1435
+ svgs?: {
1436
+ enabled?: boolean | undefined;
1437
+ plugins?: string[] | undefined;
1438
+ convertToReact?: boolean | undefined;
1439
+ removeViewBox?: boolean | undefined;
1440
+ addClassNames?: boolean | undefined;
1441
+ } | undefined;
1442
+ fonts?: {
1443
+ enabled?: boolean | undefined;
1444
+ formats?: ("woff2" | "woff" | "ttf")[] | undefined;
1445
+ subset?: boolean | undefined;
1446
+ includeLatinExtended?: boolean | undefined;
1447
+ } | undefined;
1448
+ sprites?: {
1449
+ enabled?: boolean | undefined;
1450
+ format?: "svg" | "css" | undefined;
1451
+ threshold?: number | undefined;
1452
+ } | undefined;
1453
+ }>>;
1454
+ tailwind: z.ZodDefault<z.ZodObject<{
1455
+ strategy: z.ZodDefault<z.ZodEnum<["smart", "strict", "arbitrary"]>>;
1456
+ threshold: z.ZodDefault<z.ZodNumber>;
1457
+ customMappings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1458
+ }, "strip", z.ZodTypeAny, {
1459
+ threshold: number;
1460
+ strategy: "smart" | "strict" | "arbitrary";
1461
+ customMappings?: Record<string, string> | undefined;
1462
+ }, {
1463
+ threshold?: number | undefined;
1464
+ strategy?: "smart" | "strict" | "arbitrary" | undefined;
1465
+ customMappings?: Record<string, string> | undefined;
1466
+ }>>;
1467
+ cache: z.ZodDefault<z.ZodObject<{
1468
+ enabled: z.ZodDefault<z.ZodBoolean>;
1469
+ directory: z.ZodDefault<z.ZodString>;
1470
+ ttl: z.ZodDefault<z.ZodNumber>;
1471
+ maxSize: z.ZodDefault<z.ZodNumber>;
1472
+ }, "strip", z.ZodTypeAny, {
1473
+ enabled: boolean;
1474
+ directory: string;
1475
+ ttl: number;
1476
+ maxSize: number;
1477
+ }, {
1478
+ enabled?: boolean | undefined;
1479
+ directory?: string | undefined;
1480
+ ttl?: number | undefined;
1481
+ maxSize?: number | undefined;
1482
+ }>>;
1483
+ parallel: z.ZodDefault<z.ZodObject<{
1484
+ enabled: z.ZodDefault<z.ZodBoolean>;
1485
+ maxWorkers: z.ZodDefault<z.ZodNumber>;
1486
+ }, "strip", z.ZodTypeAny, {
1487
+ enabled: boolean;
1488
+ maxWorkers: number;
1489
+ }, {
1490
+ enabled?: boolean | undefined;
1491
+ maxWorkers?: number | undefined;
1492
+ }>>;
1493
+ theme: z.ZodDefault<z.ZodObject<{
1494
+ variants: z.ZodDefault<z.ZodArray<z.ZodEnum<["dark", "light", "high-contrast", "custom"]>, "many">>;
1495
+ colorSwap: z.ZodDefault<z.ZodObject<{
1496
+ enabled: z.ZodDefault<z.ZodBoolean>;
1497
+ mappings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1498
+ }, "strip", z.ZodTypeAny, {
1499
+ enabled: boolean;
1500
+ mappings: Record<string, string>;
1501
+ }, {
1502
+ enabled?: boolean | undefined;
1503
+ mappings?: Record<string, string> | undefined;
1504
+ }>>;
1505
+ aiGeneration: z.ZodDefault<z.ZodObject<{
1506
+ enabled: z.ZodDefault<z.ZodBoolean>;
1507
+ provider: z.ZodDefault<z.ZodEnum<["openai", "anthropic"]>>;
1508
+ apiKey: z.ZodOptional<z.ZodString>;
1509
+ model: z.ZodDefault<z.ZodString>;
1510
+ }, "strip", z.ZodTypeAny, {
1511
+ enabled: boolean;
1512
+ provider: "openai" | "anthropic";
1513
+ model: string;
1514
+ apiKey?: string | undefined;
1515
+ }, {
1516
+ enabled?: boolean | undefined;
1517
+ provider?: "openai" | "anthropic" | undefined;
1518
+ apiKey?: string | undefined;
1519
+ model?: string | undefined;
1520
+ }>>;
1521
+ }, "strip", z.ZodTypeAny, {
1522
+ variants: ("custom" | "dark" | "light" | "high-contrast")[];
1523
+ colorSwap: {
1524
+ enabled: boolean;
1525
+ mappings: Record<string, string>;
1526
+ };
1527
+ aiGeneration: {
1528
+ enabled: boolean;
1529
+ provider: "openai" | "anthropic";
1530
+ model: string;
1531
+ apiKey?: string | undefined;
1532
+ };
1533
+ }, {
1534
+ variants?: ("custom" | "dark" | "light" | "high-contrast")[] | undefined;
1535
+ colorSwap?: {
1536
+ enabled?: boolean | undefined;
1537
+ mappings?: Record<string, string> | undefined;
1538
+ } | undefined;
1539
+ aiGeneration?: {
1540
+ enabled?: boolean | undefined;
1541
+ provider?: "openai" | "anthropic" | undefined;
1542
+ apiKey?: string | undefined;
1543
+ model?: string | undefined;
1544
+ } | undefined;
1545
+ }>>;
1546
+ logging: z.ZodDefault<z.ZodObject<{
1547
+ level: z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error"]>>;
1548
+ file: z.ZodOptional<z.ZodString>;
1549
+ pretty: z.ZodDefault<z.ZodBoolean>;
1550
+ }, "strip", z.ZodTypeAny, {
1551
+ level: "debug" | "info" | "warn" | "error";
1552
+ pretty: boolean;
1553
+ file?: string | undefined;
1554
+ }, {
1555
+ level?: "debug" | "info" | "warn" | "error" | undefined;
1556
+ file?: string | undefined;
1557
+ pretty?: boolean | undefined;
1558
+ }>>;
1559
+ }, "strip", z.ZodTypeAny, {
1560
+ tailwind: {
1561
+ threshold: number;
1562
+ strategy: "smart" | "strict" | "arbitrary";
1563
+ customMappings?: Record<string, string> | undefined;
1564
+ };
1565
+ browser: {
1566
+ engine: "playwright" | "puppeteer";
1567
+ headless: boolean;
1568
+ timeout: number;
1569
+ viewport: {
1570
+ width: number;
1571
+ height: number;
1572
+ };
1573
+ deviceScaleFactor: number;
1574
+ cdpEndpoint?: string | undefined;
1575
+ userAgent?: string | undefined;
1576
+ };
1577
+ spa: {
1578
+ enabled: boolean;
1579
+ framework: "react" | "vue" | "angular" | "svelte" | "none" | "auto";
1580
+ hydrationTimeout: number;
1581
+ waitForNetworkIdle: boolean;
1582
+ scrollToLoad: boolean;
1583
+ maxScrollAttempts: number;
1584
+ waitForSelector?: string | undefined;
1585
+ };
1586
+ extraction: {
1587
+ opacity: boolean;
1588
+ colors: boolean;
1589
+ typography: boolean;
1590
+ spacing: boolean;
1591
+ shadows: boolean;
1592
+ borders: boolean;
1593
+ layout: boolean;
1594
+ animations: boolean;
1595
+ transitions: boolean;
1596
+ transforms: boolean;
1597
+ zIndex: boolean;
1598
+ cssVariables: boolean;
1599
+ assets: {
1600
+ images: boolean;
1601
+ svgs: boolean;
1602
+ fonts: boolean;
1603
+ icons: boolean;
1604
+ };
1605
+ components: boolean;
1606
+ hoverStates: boolean;
1607
+ focusStates: boolean;
1608
+ activeStates: boolean;
1609
+ };
1610
+ output: {
1611
+ figma: {
1612
+ filename: string;
1613
+ includeTypography: boolean;
1614
+ includeEffects: boolean;
1615
+ includeSpacing: boolean;
1616
+ };
1617
+ directory: string;
1618
+ tailwind: {
1619
+ filename: string;
1620
+ format: "ts" | "js" | "cjs" | "mjs";
1621
+ includeComments: boolean;
1622
+ extendOnly: boolean;
1623
+ darkMode: false | "class" | "media" | "selector";
1624
+ prefix?: string | undefined;
1625
+ };
1626
+ tsx: {
1627
+ framework: "react" | "preact" | "solid";
1628
+ directory: string;
1629
+ styling: "inline" | "tailwind" | "css-modules" | "styled-components" | "emotion";
1630
+ typescript: boolean;
1631
+ includeStories: boolean;
1632
+ };
1633
+ formats: ("dtcg" | "figma" | "tailwind" | "css-variables" | "design-tokens" | "tsx")[];
1634
+ tokens: {
1635
+ filename: string;
1636
+ format: "style-dictionary" | "dtcg" | "figma";
1637
+ platforms: ("web" | "ios" | "android")[];
1638
+ };
1639
+ cleanOutput: boolean;
1640
+ };
1641
+ optimization: {
1642
+ images: {
1643
+ enabled: boolean;
1644
+ formats: ("webp" | "avif" | "original")[];
1645
+ quality: number;
1646
+ preserveOriginal: boolean;
1647
+ maxWidth?: number | undefined;
1648
+ maxHeight?: number | undefined;
1649
+ };
1650
+ svgs: {
1651
+ enabled: boolean;
1652
+ plugins: string[];
1653
+ convertToReact: boolean;
1654
+ removeViewBox: boolean;
1655
+ addClassNames: boolean;
1656
+ };
1657
+ fonts: {
1658
+ enabled: boolean;
1659
+ formats: ("woff2" | "woff" | "ttf")[];
1660
+ subset: boolean;
1661
+ includeLatinExtended: boolean;
1662
+ };
1663
+ sprites: {
1664
+ enabled: boolean;
1665
+ format: "svg" | "css";
1666
+ threshold: number;
1667
+ };
1668
+ };
1669
+ cache: {
1670
+ enabled: boolean;
1671
+ directory: string;
1672
+ ttl: number;
1673
+ maxSize: number;
1674
+ };
1675
+ parallel: {
1676
+ enabled: boolean;
1677
+ maxWorkers: number;
1678
+ };
1679
+ theme: {
1680
+ variants: ("custom" | "dark" | "light" | "high-contrast")[];
1681
+ colorSwap: {
1682
+ enabled: boolean;
1683
+ mappings: Record<string, string>;
1684
+ };
1685
+ aiGeneration: {
1686
+ enabled: boolean;
1687
+ provider: "openai" | "anthropic";
1688
+ model: string;
1689
+ apiKey?: string | undefined;
1690
+ };
1691
+ };
1692
+ logging: {
1693
+ level: "debug" | "info" | "warn" | "error";
1694
+ pretty: boolean;
1695
+ file?: string | undefined;
1696
+ };
1697
+ $schema?: string | undefined;
1698
+ }, {
1699
+ tailwind?: {
1700
+ threshold?: number | undefined;
1701
+ strategy?: "smart" | "strict" | "arbitrary" | undefined;
1702
+ customMappings?: Record<string, string> | undefined;
1703
+ } | undefined;
1704
+ $schema?: string | undefined;
1705
+ browser?: {
1706
+ engine?: "playwright" | "puppeteer" | undefined;
1707
+ headless?: boolean | undefined;
1708
+ cdpEndpoint?: string | undefined;
1709
+ timeout?: number | undefined;
1710
+ viewport?: {
1711
+ width?: number | undefined;
1712
+ height?: number | undefined;
1713
+ } | undefined;
1714
+ userAgent?: string | undefined;
1715
+ deviceScaleFactor?: number | undefined;
1716
+ } | undefined;
1717
+ spa?: {
1718
+ enabled?: boolean | undefined;
1719
+ framework?: "react" | "vue" | "angular" | "svelte" | "none" | "auto" | undefined;
1720
+ hydrationTimeout?: number | undefined;
1721
+ waitForSelector?: string | undefined;
1722
+ waitForNetworkIdle?: boolean | undefined;
1723
+ scrollToLoad?: boolean | undefined;
1724
+ maxScrollAttempts?: number | undefined;
1725
+ } | undefined;
1726
+ extraction?: {
1727
+ opacity?: boolean | undefined;
1728
+ colors?: boolean | undefined;
1729
+ typography?: boolean | undefined;
1730
+ spacing?: boolean | undefined;
1731
+ shadows?: boolean | undefined;
1732
+ borders?: boolean | undefined;
1733
+ layout?: boolean | undefined;
1734
+ animations?: boolean | undefined;
1735
+ transitions?: boolean | undefined;
1736
+ transforms?: boolean | undefined;
1737
+ zIndex?: boolean | undefined;
1738
+ cssVariables?: boolean | undefined;
1739
+ assets?: {
1740
+ images?: boolean | undefined;
1741
+ svgs?: boolean | undefined;
1742
+ fonts?: boolean | undefined;
1743
+ icons?: boolean | undefined;
1744
+ } | undefined;
1745
+ components?: boolean | undefined;
1746
+ hoverStates?: boolean | undefined;
1747
+ focusStates?: boolean | undefined;
1748
+ activeStates?: boolean | undefined;
1749
+ } | undefined;
1750
+ output?: {
1751
+ figma?: {
1752
+ filename?: string | undefined;
1753
+ includeTypography?: boolean | undefined;
1754
+ includeEffects?: boolean | undefined;
1755
+ includeSpacing?: boolean | undefined;
1756
+ } | undefined;
1757
+ directory?: string | undefined;
1758
+ tailwind?: {
1759
+ filename?: string | undefined;
1760
+ format?: "ts" | "js" | "cjs" | "mjs" | undefined;
1761
+ includeComments?: boolean | undefined;
1762
+ extendOnly?: boolean | undefined;
1763
+ prefix?: string | undefined;
1764
+ darkMode?: false | "class" | "media" | "selector" | undefined;
1765
+ } | undefined;
1766
+ tsx?: {
1767
+ framework?: "react" | "preact" | "solid" | undefined;
1768
+ directory?: string | undefined;
1769
+ styling?: "inline" | "tailwind" | "css-modules" | "styled-components" | "emotion" | undefined;
1770
+ typescript?: boolean | undefined;
1771
+ includeStories?: boolean | undefined;
1772
+ } | undefined;
1773
+ formats?: ("dtcg" | "figma" | "tailwind" | "css-variables" | "design-tokens" | "tsx")[] | undefined;
1774
+ tokens?: {
1775
+ filename?: string | undefined;
1776
+ format?: "style-dictionary" | "dtcg" | "figma" | undefined;
1777
+ platforms?: ("web" | "ios" | "android")[] | undefined;
1778
+ } | undefined;
1779
+ cleanOutput?: boolean | undefined;
1780
+ } | undefined;
1781
+ optimization?: {
1782
+ images?: {
1783
+ enabled?: boolean | undefined;
1784
+ formats?: ("webp" | "avif" | "original")[] | undefined;
1785
+ quality?: number | undefined;
1786
+ maxWidth?: number | undefined;
1787
+ maxHeight?: number | undefined;
1788
+ preserveOriginal?: boolean | undefined;
1789
+ } | undefined;
1790
+ svgs?: {
1791
+ enabled?: boolean | undefined;
1792
+ plugins?: string[] | undefined;
1793
+ convertToReact?: boolean | undefined;
1794
+ removeViewBox?: boolean | undefined;
1795
+ addClassNames?: boolean | undefined;
1796
+ } | undefined;
1797
+ fonts?: {
1798
+ enabled?: boolean | undefined;
1799
+ formats?: ("woff2" | "woff" | "ttf")[] | undefined;
1800
+ subset?: boolean | undefined;
1801
+ includeLatinExtended?: boolean | undefined;
1802
+ } | undefined;
1803
+ sprites?: {
1804
+ enabled?: boolean | undefined;
1805
+ format?: "svg" | "css" | undefined;
1806
+ threshold?: number | undefined;
1807
+ } | undefined;
1808
+ } | undefined;
1809
+ cache?: {
1810
+ enabled?: boolean | undefined;
1811
+ directory?: string | undefined;
1812
+ ttl?: number | undefined;
1813
+ maxSize?: number | undefined;
1814
+ } | undefined;
1815
+ parallel?: {
1816
+ enabled?: boolean | undefined;
1817
+ maxWorkers?: number | undefined;
1818
+ } | undefined;
1819
+ theme?: {
1820
+ variants?: ("custom" | "dark" | "light" | "high-contrast")[] | undefined;
1821
+ colorSwap?: {
1822
+ enabled?: boolean | undefined;
1823
+ mappings?: Record<string, string> | undefined;
1824
+ } | undefined;
1825
+ aiGeneration?: {
1826
+ enabled?: boolean | undefined;
1827
+ provider?: "openai" | "anthropic" | undefined;
1828
+ apiKey?: string | undefined;
1829
+ model?: string | undefined;
1830
+ } | undefined;
1831
+ } | undefined;
1832
+ logging?: {
1833
+ level?: "debug" | "info" | "warn" | "error" | undefined;
1834
+ file?: string | undefined;
1835
+ pretty?: boolean | undefined;
1836
+ } | undefined;
1837
+ }>;
1838
+ type BrowserConfig = z.infer<typeof BrowserConfigSchema>;
1839
+ type SPAConfig = z.infer<typeof SPAConfigSchema>;
1840
+ type ExtractionOptions = z.infer<typeof ExtractionOptionsSchema>;
1841
+ type TailwindOutputConfig = z.infer<typeof TailwindOutputConfigSchema>;
1842
+ type TokenOutputConfig = z.infer<typeof TokenOutputConfigSchema>;
1843
+ type FigmaOutputConfig = z.infer<typeof FigmaOutputConfigSchema>;
1844
+ type TSXOutputConfig = z.infer<typeof TSXOutputConfigSchema>;
1845
+ type OutputConfig = z.infer<typeof OutputConfigSchema>;
1846
+ type ImageOptimization = z.infer<typeof ImageOptimizationSchema>;
1847
+ type SVGOptimization = z.infer<typeof SVGOptimizationSchema>;
1848
+ type FontOptimization = z.infer<typeof FontOptimizationSchema>;
1849
+ type OptimizationConfig = z.infer<typeof OptimizationConfigSchema>;
1850
+ type TailwindMapping = z.infer<typeof TailwindMappingSchema>;
1851
+ type CacheConfig = z.infer<typeof CacheConfigSchema>;
1852
+ type ThemeConfig = z.infer<typeof ThemeConfigSchema>;
1853
+ type LoggingConfig = z.infer<typeof LoggingConfigSchema>;
1854
+ type ExtraktorConfig = z.infer<typeof ExtraktorConfigSchema>;
1855
+
1856
+ /**
1857
+ * Configuration loader for extraktor
1858
+ * Uses cosmiconfig for flexible config file support
1859
+ */
1860
+
1861
+ interface LoadConfigOptions {
1862
+ configPath?: string;
1863
+ cwd?: string;
1864
+ defaults?: Partial<ExtraktorConfig>;
1865
+ }
1866
+ interface LoadConfigResult {
1867
+ config: ExtraktorConfig;
1868
+ filepath: string | null;
1869
+ isEmpty: boolean;
1870
+ }
1871
+ /**
1872
+ * Load and validate extraktor configuration
1873
+ */
1874
+ declare function loadConfig(options?: LoadConfigOptions): Promise<LoadConfigResult>;
1875
+ /**
1876
+ * Create default configuration file
1877
+ */
1878
+ declare function createDefaultConfig(outputPath: string, format?: 'json' | 'js' | 'ts'): Promise<void>;
1879
+ /**
1880
+ * Get default configuration
1881
+ */
1882
+ declare function getDefaultConfig(): ExtraktorConfig;
1883
+ /**
1884
+ * Merge partial config with defaults
1885
+ */
1886
+ declare function mergeConfig(partial: Partial<ExtraktorConfig>): ExtraktorConfig;
1887
+
1888
+ /**
1889
+ * Logger utility for extraktor
1890
+ * Simple console-based logger with levels and colors
1891
+ */
1892
+ type LogLevel = 'debug' | 'info' | 'warn' | 'error';
1893
+ interface LoggerOptions {
1894
+ level?: LogLevel;
1895
+ prefix?: string;
1896
+ pretty?: boolean;
1897
+ timestamp?: boolean;
1898
+ }
1899
+ interface Logger {
1900
+ debug: (message: string, ...args: unknown[]) => void;
1901
+ info: (message: string, ...args: unknown[]) => void;
1902
+ warn: (message: string, ...args: unknown[]) => void;
1903
+ error: (message: string, ...args: unknown[]) => void;
1904
+ child: (options: {
1905
+ prefix?: string;
1906
+ }) => Logger;
1907
+ setLevel: (level: LogLevel) => void;
1908
+ }
1909
+ declare function createLogger(options?: LoggerOptions): Logger;
1910
+
1911
+ /**
1912
+ * Page analyzer for extraktor
1913
+ * Traverses DOM and extracts computed styles from all elements
1914
+ */
1915
+
1916
+ interface PageAnalyzerOptions {
1917
+ logger: Logger;
1918
+ includeHidden?: boolean;
1919
+ maxElements?: number;
1920
+ }
1921
+ interface AnalysisResult {
1922
+ url: string;
1923
+ title: string;
1924
+ elements: ElementStyles[];
1925
+ cssVariables: Record<string, string>;
1926
+ keyframes: KeyframeData[];
1927
+ mediaQueries: MediaQueryData[];
1928
+ fontFaces: FontFaceData[];
1929
+ stylesheets?: string[];
1930
+ totalElements: number;
1931
+ visibleElements: number;
1932
+ duration: number;
1933
+ spaFramework?: 'react' | 'vue' | 'angular' | 'svelte' | 'none';
1934
+ }
1935
+ interface KeyframeData {
1936
+ name: string;
1937
+ cssText: string;
1938
+ keyframes: Array<{
1939
+ offset: string;
1940
+ style: string;
1941
+ }>;
1942
+ }
1943
+ interface MediaQueryData {
1944
+ query: string;
1945
+ rules: string[];
1946
+ }
1947
+ interface FontFaceData {
1948
+ family: string;
1949
+ src: string;
1950
+ weight?: string;
1951
+ style?: string;
1952
+ display?: string;
1953
+ }
1954
+ declare class PageAnalyzer {
1955
+ private logger;
1956
+ private includeHidden;
1957
+ private maxElements;
1958
+ constructor(options: PageAnalyzerOptions);
1959
+ /**
1960
+ * Analyze page and extract all styles
1961
+ */
1962
+ analyze(page: Page, url: string): Promise<AnalysisResult>;
1963
+ /**
1964
+ * Detect SPA framework
1965
+ */
1966
+ private detectSPAFramework;
1967
+ /**
1968
+ * Extract computed styles from all elements
1969
+ */
1970
+ private extractElementStyles;
1971
+ /**
1972
+ * Extract CSS custom properties (variables)
1973
+ */
1974
+ private extractCSSVariables;
1975
+ /**
1976
+ * Extract @keyframes animations
1977
+ */
1978
+ private extractKeyframes;
1979
+ /**
1980
+ * Extract @media queries
1981
+ */
1982
+ private extractMediaQueries;
1983
+ /**
1984
+ * Extract @font-face declarations
1985
+ */
1986
+ private extractFontFaces;
1987
+ }
1988
+
1989
+ /**
1990
+ * Base extractor interface for extraktor
1991
+ * All extractors must implement this interface
1992
+ */
1993
+
1994
+ /**
1995
+ * Extraction context passed to all extractors
1996
+ */
1997
+ interface ExtractionContext {
1998
+ url: string;
1999
+ config: ExtraktorConfig;
2000
+ logger: Logger;
2001
+ analysisResult: AnalysisResult;
2002
+ }
2003
+ /**
2004
+ * Base interface for all extractors
2005
+ */
2006
+ interface IExtractor<T = unknown> {
2007
+ /** Unique name of the extractor */
2008
+ name: string;
2009
+ /** Version of the extractor */
2010
+ version: string;
2011
+ /** Priority for execution order (lower = earlier) */
2012
+ priority: number;
2013
+ /** Initialize the extractor */
2014
+ initialize(context: ExtractionContext): Promise<void>;
2015
+ /** Perform extraction */
2016
+ extract(page: Page, context: ExtractionContext): Promise<T>;
2017
+ /** Cleanup after extraction */
2018
+ cleanup(): Promise<void>;
2019
+ /** Configure extractor options */
2020
+ configure(options: Record<string, unknown>): void;
2021
+ /** Get default options */
2022
+ getDefaultOptions(): Record<string, unknown>;
2023
+ }
2024
+ /**
2025
+ * Abstract base class for extractors
2026
+ */
2027
+ declare abstract class BaseExtractor<T = unknown> implements IExtractor<T> {
2028
+ abstract name: string;
2029
+ abstract version: string;
2030
+ priority: number;
2031
+ protected options: Record<string, unknown>;
2032
+ protected logger: Logger;
2033
+ protected context: ExtractionContext;
2034
+ /**
2035
+ * Initialize the extractor with context
2036
+ */
2037
+ initialize(context: ExtractionContext): Promise<void>;
2038
+ /**
2039
+ * Abstract method to perform extraction
2040
+ */
2041
+ abstract extract(page: Page, context: ExtractionContext): Promise<T>;
2042
+ /**
2043
+ * Cleanup after extraction
2044
+ */
2045
+ cleanup(): Promise<void>;
2046
+ /**
2047
+ * Configure extractor options
2048
+ */
2049
+ configure(options: Record<string, unknown>): void;
2050
+ /**
2051
+ * Get default options
2052
+ */
2053
+ getDefaultOptions(): Record<string, unknown>;
2054
+ /**
2055
+ * Helper to evaluate script in page context
2056
+ */
2057
+ protected evaluate<R>(page: Page, fn: () => R): Promise<R>;
2058
+ /**
2059
+ * Helper to evaluate script with arguments in page context
2060
+ */
2061
+ protected evaluateWithArgs<R>(page: Page, fn: (arg: unknown) => R, arg: unknown): Promise<R>;
2062
+ /**
2063
+ * Helper to deduplicate items by key
2064
+ */
2065
+ protected deduplicateByKey<I>(items: I[], keyFn: (item: I) => string): I[];
2066
+ /**
2067
+ * Helper to sort by frequency (descending)
2068
+ */
2069
+ protected sortByFrequency<I extends {
2070
+ frequency: number;
2071
+ }>(items: I[]): I[];
2072
+ }
2073
+ /**
2074
+ * Extractor registry for managing all extractors
2075
+ */
2076
+ declare class ExtractorRegistry {
2077
+ private extractors;
2078
+ private logger;
2079
+ constructor(logger: Logger);
2080
+ /**
2081
+ * Register an extractor
2082
+ */
2083
+ register<T>(extractor: IExtractor<T>): void;
2084
+ /**
2085
+ * Get an extractor by name
2086
+ */
2087
+ get<T>(name: string): IExtractor<T> | undefined;
2088
+ /**
2089
+ * Get all extractors sorted by priority
2090
+ */
2091
+ getAll(): IExtractor[];
2092
+ /**
2093
+ * Check if extractor exists
2094
+ */
2095
+ has(name: string): boolean;
2096
+ /**
2097
+ * Remove an extractor
2098
+ */
2099
+ remove(name: string): boolean;
2100
+ /**
2101
+ * Clear all extractors
2102
+ */
2103
+ clear(): void;
2104
+ /**
2105
+ * Initialize all extractors
2106
+ */
2107
+ initializeAll(context: ExtractionContext): Promise<void>;
2108
+ /**
2109
+ * Run all extractors and collect results
2110
+ */
2111
+ extractAll(page: Page, context: ExtractionContext): Promise<Map<string, unknown>>;
2112
+ /**
2113
+ * Cleanup all extractors
2114
+ */
2115
+ cleanupAll(): Promise<void>;
2116
+ }
2117
+
2118
+ /**
2119
+ * Framer Motion extractor for extraktor
2120
+ * Extracts animation variants, transitions, and gesture configs
2121
+ */
2122
+
2123
+ interface FramerVariant {
2124
+ name: string;
2125
+ initial?: Record<string, unknown>;
2126
+ animate?: Record<string, unknown>;
2127
+ exit?: Record<string, unknown>;
2128
+ whileHover?: Record<string, unknown>;
2129
+ whileTap?: Record<string, unknown>;
2130
+ whileFocus?: Record<string, unknown>;
2131
+ whileInView?: Record<string, unknown>;
2132
+ transition?: FramerTransition;
2133
+ }
2134
+ interface FramerTransition {
2135
+ type?: 'spring' | 'tween' | 'inertia';
2136
+ duration?: number;
2137
+ delay?: number;
2138
+ ease?: string | number[];
2139
+ stiffness?: number;
2140
+ damping?: number;
2141
+ mass?: number;
2142
+ bounce?: number;
2143
+ }
2144
+ interface FramerGesture {
2145
+ type: 'hover' | 'tap' | 'drag' | 'focus' | 'inView';
2146
+ animation: Record<string, unknown>;
2147
+ transition?: FramerTransition;
2148
+ }
2149
+ interface ExtractedFramerMotion {
2150
+ variants: FramerVariant[];
2151
+ transitions: FramerTransition[];
2152
+ gestures: FramerGesture[];
2153
+ springConfigs: Record<string, FramerTransition>[];
2154
+ }
2155
+
2156
+ /**
2157
+ * Component Detector for extraktor
2158
+ * Identifies and extracts React/UI components from pages
2159
+ */
2160
+
2161
+ interface DetectedComponent {
2162
+ name: string;
2163
+ type: ComponentType;
2164
+ selector: string;
2165
+ html: string;
2166
+ styles: ComponentStyles;
2167
+ props: ComponentProps;
2168
+ children: DetectedComponent[];
2169
+ variants?: ComponentVariant[];
2170
+ }
2171
+ type ComponentType = 'button' | 'card' | 'hero' | 'nav' | 'footer' | 'header' | 'modal' | 'dropdown' | 'input' | 'form' | 'badge' | 'avatar' | 'list' | 'grid' | 'section' | 'cta' | 'feature' | 'testimonial' | 'pricing' | 'faq' | 'unknown';
2172
+ interface ComponentStyles {
2173
+ display?: string;
2174
+ position?: string;
2175
+ width?: string;
2176
+ height?: string;
2177
+ padding?: string;
2178
+ margin?: string;
2179
+ backgroundColor?: string;
2180
+ color?: string;
2181
+ borderRadius?: string;
2182
+ boxShadow?: string;
2183
+ fontSize?: string;
2184
+ fontWeight?: string;
2185
+ gap?: string;
2186
+ flexDirection?: string;
2187
+ alignItems?: string;
2188
+ justifyContent?: string;
2189
+ gridTemplateColumns?: string;
2190
+ transition?: string;
2191
+ transform?: string;
2192
+ }
2193
+ interface ComponentProps {
2194
+ text?: string;
2195
+ href?: string;
2196
+ src?: string;
2197
+ alt?: string;
2198
+ placeholder?: string;
2199
+ type?: string;
2200
+ role?: string;
2201
+ ariaLabel?: string;
2202
+ dataAttributes?: Record<string, string>;
2203
+ }
2204
+ interface ComponentVariant {
2205
+ name: string;
2206
+ trigger: 'hover' | 'active' | 'focus' | 'disabled';
2207
+ styles: Partial<ComponentStyles>;
2208
+ }
2209
+ interface ExtractedComponents {
2210
+ components: DetectedComponent[];
2211
+ sections: PageSection[];
2212
+ layout: LayoutInfo;
2213
+ }
2214
+ interface PageSection {
2215
+ type: 'hero' | 'features' | 'cta' | 'testimonials' | 'pricing' | 'faq' | 'footer' | 'header' | 'content';
2216
+ components: DetectedComponent[];
2217
+ order: number;
2218
+ }
2219
+ interface LayoutInfo {
2220
+ hasHeader: boolean;
2221
+ hasFooter: boolean;
2222
+ hasSidebar: boolean;
2223
+ maxWidth?: string;
2224
+ containerPadding?: string;
2225
+ }
2226
+
2227
+ /**
2228
+ * Main orchestrator for extraktor
2229
+ * Coordinates browser, analyzers, extractors, and transformers
2230
+ */
2231
+
2232
+ interface OrchestratorOptions {
2233
+ config: ExtraktorConfig;
2234
+ logger: Logger;
2235
+ }
2236
+ declare class Orchestrator {
2237
+ private config;
2238
+ private logger;
2239
+ private driver;
2240
+ private analyzer;
2241
+ private registry;
2242
+ constructor(options: OrchestratorOptions);
2243
+ private registerExtractors;
2244
+ /**
2245
+ * Full extraction pipeline
2246
+ */
2247
+ extract(url: string, outputDir: string): Promise<ExtractionResult>;
2248
+ /**
2249
+ * Extract with live page access (for genome pipeline).
2250
+ * Returns the extraction result + live Page. Caller must call close() when done.
2251
+ */
2252
+ extractWithPage(url: string, outputDir: string): Promise<{
2253
+ result: ExtractionResult;
2254
+ page: Page;
2255
+ close: () => Promise<void>;
2256
+ }>;
2257
+ /**
2258
+ * Analysis only (no output generation)
2259
+ */
2260
+ analyze(url: string): Promise<ExtractionResult>;
2261
+ private buildExtractionResult;
2262
+ private runTransformers;
2263
+ private generateTailwind;
2264
+ private generateCSSVariables;
2265
+ private generateTokens;
2266
+ private saveLayoutArchitecture;
2267
+ /**
2268
+ * Generate a complete Next.js project from extraction result
2269
+ */
2270
+ generateNextjsProject(result: ExtractionResult & {
2271
+ framerMotion?: ExtractedFramerMotion;
2272
+ detectedComponents?: ExtractedComponents;
2273
+ }, outputDir: string, projectName?: string): Promise<string>;
2274
+ /**
2275
+ * Full extraction + Next.js project generation
2276
+ */
2277
+ extractAndGenerate(url: string, outputDir: string, projectName?: string): Promise<string>;
2278
+ private getProjectNameFromUrl;
2279
+ private tailwindConfigToString;
2280
+ private extractFontWeights;
2281
+ }
2282
+
2283
+ /**
2284
+ * Playwright browser driver for extraktor
2285
+ * Handles browser automation, SPA detection, and page rendering
2286
+ */
2287
+
2288
+ interface BrowserDriverOptions {
2289
+ browserConfig: BrowserConfig;
2290
+ spaConfig: SPAConfig;
2291
+ logger: Logger;
2292
+ /** Connect to an existing Chrome via CDP instead of launching a new browser */
2293
+ cdpEndpoint?: string;
2294
+ }
2295
+ interface NavigationResult {
2296
+ success: boolean;
2297
+ url: string;
2298
+ title: string;
2299
+ spaFramework: 'react' | 'vue' | 'angular' | 'svelte' | 'none';
2300
+ loadTime: number;
2301
+ error?: string;
2302
+ }
2303
+ declare class PlaywrightDriver {
2304
+ private browser;
2305
+ private context;
2306
+ private page;
2307
+ private browserConfig;
2308
+ private spaConfig;
2309
+ private logger;
2310
+ private cdpEndpoint?;
2311
+ private isCdpConnection;
2312
+ constructor(options: BrowserDriverOptions);
2313
+ /**
2314
+ * Initialize browser instance.
2315
+ * If cdpEndpoint is set, connects to an existing Chrome session via CDP
2316
+ * (Chrome DevTools Protocol). This allows extracting from authenticated
2317
+ * pages in the user's own browser.
2318
+ */
2319
+ initialize(): Promise<void>;
2320
+ /**
2321
+ * Connect to an existing Chrome instance via Chrome DevTools Protocol.
2322
+ * The user must start Chrome with: --remote-debugging-port=9222
2323
+ *
2324
+ * This enables extraction from authenticated pages, admin dashboards,
2325
+ * and any page the user is already logged into.
2326
+ */
2327
+ private initializeCDP;
2328
+ /**
2329
+ * Navigate to URL and wait for content
2330
+ */
2331
+ navigate(url: string): Promise<NavigationResult>;
2332
+ /**
2333
+ * Detect SPA framework used on page
2334
+ */
2335
+ private detectSPAFramework;
2336
+ /**
2337
+ * Wait for SPA hydration
2338
+ */
2339
+ private waitForHydration;
2340
+ /**
2341
+ * Scroll page to trigger lazy loading
2342
+ */
2343
+ private scrollPage;
2344
+ /**
2345
+ * Execute script in page context
2346
+ */
2347
+ evaluate<T>(fn: () => T): Promise<T>;
2348
+ /**
2349
+ * Execute script with arguments in page context
2350
+ */
2351
+ evaluateWithArgs<T>(fn: (arg: unknown) => T, arg: unknown): Promise<T>;
2352
+ /**
2353
+ * Take screenshot
2354
+ */
2355
+ screenshot(options?: {
2356
+ fullPage?: boolean;
2357
+ path?: string;
2358
+ }): Promise<Buffer>;
2359
+ /**
2360
+ * Hover over element and capture state
2361
+ */
2362
+ captureHoverState(selector: string): Promise<Record<string, string> | null>;
2363
+ /**
2364
+ * Get page instance
2365
+ */
2366
+ getPage(): Page | null;
2367
+ /**
2368
+ * Get current URL
2369
+ */
2370
+ getCurrentUrl(): string;
2371
+ /**
2372
+ * Close browser
2373
+ */
2374
+ close(): Promise<void>;
2375
+ }
2376
+
2377
+ /**
2378
+ * Color extractor for extraktor
2379
+ * Extracts all colors from page elements
2380
+ */
2381
+
2382
+ declare class ColorExtractor extends BaseExtractor<ExtractedColors> {
2383
+ name: string;
2384
+ version: string;
2385
+ priority: number;
2386
+ extract(page: Page, context: ExtractionContext): Promise<ExtractedColors>;
2387
+ /**
2388
+ * Extract colors from shadow values
2389
+ */
2390
+ private extractShadowColors;
2391
+ /**
2392
+ * Check if value is a color
2393
+ */
2394
+ private isColorValue;
2395
+ /**
2396
+ * Process raw colors into categorized tokens
2397
+ */
2398
+ private processColors;
2399
+ /**
2400
+ * Convert CSS property to usage type
2401
+ */
2402
+ private propertyToUsageType;
2403
+ /**
2404
+ * Process gradients
2405
+ */
2406
+ private processGradients;
2407
+ }
2408
+
2409
+ /**
2410
+ * Typography extractor for extraktor
2411
+ * Extracts font families, sizes, weights, and text styles
2412
+ */
2413
+
2414
+ declare class TypographyExtractor extends BaseExtractor<ExtractedTypography> {
2415
+ name: string;
2416
+ version: string;
2417
+ priority: number;
2418
+ private readonly tailwindFontSizes;
2419
+ private readonly tailwindFontWeights;
2420
+ private readonly tailwindLineHeights;
2421
+ extract(page: Page, context: ExtractionContext): Promise<ExtractedTypography>;
2422
+ private parseFontFamily;
2423
+ private parseToPx;
2424
+ private parseToEm;
2425
+ private parseLineHeight;
2426
+ private isTextElement;
2427
+ private generateTextStyleKey;
2428
+ private generateTextStyleName;
2429
+ private generateFontFamilyName;
2430
+ private categorizeFontFamily;
2431
+ private detectFontSource;
2432
+ private extractFontFormat;
2433
+ private extractFontUrl;
2434
+ private getWeightName;
2435
+ private mapToTailwindFontSize;
2436
+ private mapToTailwindFontWeight;
2437
+ private mapToTailwindLineHeight;
2438
+ private mapToTailwindLetterSpacing;
2439
+ }
2440
+
2441
+ /**
2442
+ * Spacing extractor for extraktor
2443
+ * Extracts margins, paddings, and gaps
2444
+ */
2445
+
2446
+ declare class SpacingExtractor extends BaseExtractor<ExtractedSpacing> {
2447
+ name: string;
2448
+ version: string;
2449
+ priority: number;
2450
+ private readonly tailwindSpacing;
2451
+ extract(page: Page, context: ExtractionContext): Promise<ExtractedSpacing>;
2452
+ private parseToPx;
2453
+ private generateSpacingName;
2454
+ private mapToTailwindSpacing;
2455
+ }
2456
+
2457
+ /**
2458
+ * Effects extractor for extraktor
2459
+ * Extracts shadows, borders, border-radius, filters, and opacity
2460
+ */
2461
+
2462
+ declare class EffectsExtractor extends BaseExtractor<ExtractedEffects> {
2463
+ name: string;
2464
+ version: string;
2465
+ priority: number;
2466
+ private readonly tailwindShadows;
2467
+ private readonly tailwindBorderRadius;
2468
+ extract(page: Page, context: ExtractionContext): Promise<ExtractedEffects>;
2469
+ private parseShadow;
2470
+ private parseFilter;
2471
+ private parseToPx;
2472
+ private mapToTailwindShadow;
2473
+ private mapToTailwindBorder;
2474
+ private mapToTailwindRadius;
2475
+ private mapToTailwindOpacity;
2476
+ }
2477
+
2478
+ /**
2479
+ * Animation extractor for extraktor
2480
+ * Extracts keyframes, transitions, transforms, timing functions, and durations
2481
+ */
2482
+
2483
+ declare class AnimationExtractor extends BaseExtractor<ExtractedAnimations> {
2484
+ name: string;
2485
+ version: string;
2486
+ priority: number;
2487
+ private readonly tailwindDurations;
2488
+ private readonly tailwindEasing;
2489
+ extract(page: Page, context: ExtractionContext): Promise<ExtractedAnimations>;
2490
+ private parseStyleString;
2491
+ private parseTransform;
2492
+ private parseToMs;
2493
+ private classifyTimingFunction;
2494
+ private getTimingName;
2495
+ private mapToTailwindTransition;
2496
+ private mapToTailwindDuration;
2497
+ private mapToTailwindEasing;
2498
+ }
2499
+
2500
+ /**
2501
+ * Tailwind transformer for extraktor
2502
+ * Generates tailwind.config.ts from extraction results
2503
+ */
2504
+
2505
+ interface TailwindTransformerOptions {
2506
+ config: TailwindOutputConfig;
2507
+ mapping: TailwindMapping;
2508
+ logger: Logger;
2509
+ }
2510
+ interface TailwindConfig {
2511
+ darkMode: 'class' | 'media' | 'selector' | false;
2512
+ theme: {
2513
+ extend: {
2514
+ colors?: Record<string, string | Record<string, string>>;
2515
+ fontFamily?: Record<string, string[]>;
2516
+ fontSize?: Record<string, [string, {
2517
+ lineHeight?: string;
2518
+ letterSpacing?: string;
2519
+ }]>;
2520
+ spacing?: Record<string, string>;
2521
+ borderRadius?: Record<string, string>;
2522
+ boxShadow?: Record<string, string>;
2523
+ opacity?: Record<string, string>;
2524
+ transitionDuration?: Record<string, string>;
2525
+ transitionTimingFunction?: Record<string, string>;
2526
+ animation?: Record<string, string>;
2527
+ keyframes?: Record<string, Record<string, Record<string, string>>>;
2528
+ };
2529
+ };
2530
+ }
2531
+ declare class TailwindTransformer {
2532
+ private config;
2533
+ private mapping;
2534
+ private logger;
2535
+ constructor(options: TailwindTransformerOptions);
2536
+ /**
2537
+ * Transform extraction result to Tailwind config
2538
+ */
2539
+ transform(result: ExtractionResult): TailwindConfig;
2540
+ /**
2541
+ * Transform colors to Tailwind format
2542
+ */
2543
+ private transformColors;
2544
+ /**
2545
+ * Transform typography to Tailwind format
2546
+ */
2547
+ private transformTypography;
2548
+ /**
2549
+ * Transform spacing to Tailwind format
2550
+ */
2551
+ private transformSpacing;
2552
+ /**
2553
+ * Transform effects to Tailwind format
2554
+ */
2555
+ private transformEffects;
2556
+ /**
2557
+ * Transform animations to Tailwind format
2558
+ */
2559
+ private transformAnimations;
2560
+ /**
2561
+ * Sanitize key for Tailwind config
2562
+ */
2563
+ private sanitizeKey;
2564
+ /**
2565
+ * Check if value is a color
2566
+ */
2567
+ private isColorValue;
2568
+ /**
2569
+ * Write Tailwind config to file
2570
+ */
2571
+ write(config: TailwindConfig, outputDir: string): Promise<string>;
2572
+ /**
2573
+ * Generate TypeScript config
2574
+ */
2575
+ private generateTypeScriptConfig;
2576
+ /**
2577
+ * Generate ESM JavaScript config
2578
+ */
2579
+ private generateESMConfig;
2580
+ /**
2581
+ * Generate CommonJS config
2582
+ */
2583
+ private generateCJSConfig;
2584
+ }
2585
+
2586
+ /**
2587
+ * CSS Variables transformer for extraktor
2588
+ * Generates CSS custom properties from extraction results
2589
+ */
2590
+
2591
+ interface CSSVarsTransformerOptions {
2592
+ logger: Logger;
2593
+ prefix?: string;
2594
+ includeComments?: boolean;
2595
+ }
2596
+ declare class CSSVarsTransformer {
2597
+ private logger;
2598
+ private prefix;
2599
+ private includeComments;
2600
+ constructor(options: CSSVarsTransformerOptions);
2601
+ /**
2602
+ * Transform extraction result to CSS variables
2603
+ */
2604
+ transform(result: ExtractionResult): string;
2605
+ /**
2606
+ * Generate a section with optional comment
2607
+ */
2608
+ private generateSection;
2609
+ /**
2610
+ * Transform colors to CSS variables
2611
+ */
2612
+ private transformColors;
2613
+ /**
2614
+ * Transform typography to CSS variables
2615
+ */
2616
+ private transformTypography;
2617
+ /**
2618
+ * Transform spacing to CSS variables
2619
+ */
2620
+ private transformSpacing;
2621
+ /**
2622
+ * Transform effects to CSS variables
2623
+ */
2624
+ private transformEffects;
2625
+ /**
2626
+ * Transform animations to CSS variables
2627
+ */
2628
+ private transformAnimations;
2629
+ /**
2630
+ * Format original CSS variables from the page
2631
+ */
2632
+ private formatOriginalVariables;
2633
+ /**
2634
+ * Generate @keyframes rules
2635
+ */
2636
+ private generateKeyframes;
2637
+ /**
2638
+ * Format variable name with prefix
2639
+ */
2640
+ private formatVarName;
2641
+ /**
2642
+ * Write CSS variables to file
2643
+ */
2644
+ write(css: string, outputDir: string, filename?: string): Promise<string>;
2645
+ }
2646
+
2647
+ /**
2648
+ * Design Token transformer for extraktor
2649
+ * Generates Style Dictionary compatible JSON tokens
2650
+ */
2651
+
2652
+ interface TokenTransformerOptions {
2653
+ config: TokenOutputConfig;
2654
+ logger: Logger;
2655
+ }
2656
+ interface DesignToken {
2657
+ value: string | number | Record<string, unknown> | unknown[];
2658
+ type?: string;
2659
+ description?: string;
2660
+ $extensions?: Record<string, unknown>;
2661
+ }
2662
+ interface DesignTokens {
2663
+ color?: Record<string, DesignToken | Record<string, DesignToken>>;
2664
+ typography?: Record<string, DesignToken | Record<string, DesignToken>>;
2665
+ spacing?: Record<string, DesignToken>;
2666
+ borderRadius?: Record<string, DesignToken>;
2667
+ shadow?: Record<string, DesignToken>;
2668
+ opacity?: Record<string, DesignToken>;
2669
+ animation?: Record<string, DesignToken>;
2670
+ duration?: Record<string, DesignToken>;
2671
+ easing?: Record<string, DesignToken>;
2672
+ }
2673
+ declare class TokenTransformer {
2674
+ private config;
2675
+ private logger;
2676
+ constructor(options: TokenTransformerOptions);
2677
+ /**
2678
+ * Transform extraction result to design tokens
2679
+ */
2680
+ transform(result: ExtractionResult): DesignTokens;
2681
+ /**
2682
+ * Transform colors to tokens
2683
+ */
2684
+ private transformColors;
2685
+ /**
2686
+ * Transform typography to tokens
2687
+ */
2688
+ private transformTypography;
2689
+ /**
2690
+ * Transform spacing to tokens
2691
+ */
2692
+ private transformSpacing;
2693
+ /**
2694
+ * Transform border radius to tokens
2695
+ */
2696
+ private transformBorderRadius;
2697
+ /**
2698
+ * Transform shadows to tokens
2699
+ */
2700
+ private transformShadows;
2701
+ /**
2702
+ * Transform opacity to tokens
2703
+ */
2704
+ private transformOpacity;
2705
+ /**
2706
+ * Transform durations to tokens
2707
+ */
2708
+ private transformDurations;
2709
+ /**
2710
+ * Transform easing functions to tokens
2711
+ */
2712
+ private transformEasing;
2713
+ /**
2714
+ * Sanitize key name
2715
+ */
2716
+ private sanitizeKey;
2717
+ /**
2718
+ * Write tokens to file
2719
+ */
2720
+ write(tokens: DesignTokens, outputDir: string): Promise<string>;
2721
+ }
2722
+
2723
+ /**
2724
+ * Color manipulation utilities
2725
+ */
2726
+
2727
+ /**
2728
+ * Parse any CSS color to normalized format
2729
+ */
2730
+ declare function parseColor(value: string): {
2731
+ hex: string;
2732
+ rgb: {
2733
+ r: number;
2734
+ g: number;
2735
+ b: number;
2736
+ };
2737
+ hsl: {
2738
+ h: number;
2739
+ s: number;
2740
+ l: number;
2741
+ };
2742
+ alpha: number;
2743
+ format: ColorFormat;
2744
+ } | null;
2745
+ /**
2746
+ * Convert color to specific format
2747
+ */
2748
+ declare function toColorFormat(value: string, format: ColorFormat): string;
2749
+ /**
2750
+ * Check if two colors are similar within a threshold
2751
+ */
2752
+ declare function areColorsSimilar(color1: string, color2: string, threshold?: number): boolean;
2753
+ /**
2754
+ * Group similar colors together
2755
+ */
2756
+ declare function groupSimilarColors(colors: ColorToken[], threshold?: number): ColorToken[][];
2757
+ /**
2758
+ * Generate a semantic name for a color
2759
+ */
2760
+ declare function generateColorName(hex: string, existingNames: Set<string>): string;
2761
+ /**
2762
+ * Get contrast ratio between two colors
2763
+ */
2764
+ declare function getContrastRatio(foreground: string, background: string): number;
2765
+ /**
2766
+ * Extract colors from gradient string
2767
+ */
2768
+ declare function extractGradientColors(gradient: string): string[];
2769
+ /**
2770
+ * Generate color scale from base color
2771
+ */
2772
+ declare function generateColorScale(baseColor: string, steps?: number): Record<string, string>;
2773
+
2774
+ export { type AnalysisResult, AnimationExtractor, BaseExtractor, type BorderRadiusToken, type BorderToken, type BreakpointToken, type BrowserConfig, CSSVarsTransformer, type CacheConfig, ColorExtractor, type ColorToken, type ComponentDefinition, type ComponentPattern, type ComponentProp, type ComponentType$1 as ComponentType, type ComponentVariant$1 as ComponentVariant, type ContainerPattern, type DesignToken, type DesignTokens, type DurationToken, EffectsExtractor, type ElementStyles, type ExtractedAnimations, type ExtractedAssets, type ExtractedColors, type ExtractedComponents$1 as ExtractedComponents, type ExtractedEffects, type ExtractedLayout, type ExtractedSpacing, type ExtractedTypography, type ExtractionContext, type ExtractionError, type ExtractionMetadata, type ExtractionOptions, type ExtractionResult, ExtractorRegistry, type ExtraktorConfig, type FigmaOutputConfig, type FilterToken, type FlexPattern, type FontAsset, type FontFaceData, type FontFamilyToken, type FontOptimization, type FontSizeToken, type FontWeightToken, type GradientStop, type GradientToken, type GridPattern, type IExtractor, type IconAsset, type ImageAsset, type ImageOptimization, type KeyframeAnimation, type KeyframeData, type KeyframeStep, type LetterSpacingToken, type LineHeightToken, type Logger, type LoggingConfig, type MediaQueryData, type OpacityToken, type OptimizationConfig, Orchestrator, type OutputConfig, PageAnalyzer, PlaywrightDriver, type SPAConfig, type SVGAsset, type SVGOptimization, type ShadowLayer, type ShadowToken, SpacingExtractor, type SpacingToken, type SpacingUsage, type TSXOutputConfig, type TailwindConfig, type TailwindMapping, type TailwindOutputConfig, TailwindTransformer, type TextStyleToken, type ThemeConfig, type TimingFunctionToken, type TokenOutputConfig, TokenTransformer, type TransformFunction, type TransformToken, type TransitionToken, TypographyExtractor, type ZIndexToken, areColorsSimilar, createDefaultConfig, createLogger, extractGradientColors, generateColorName, generateColorScale, getContrastRatio, getDefaultConfig, groupSimilarColors, loadConfig, mergeConfig, parseColor, toColorFormat };