@sugarcube-org/core 0.0.1-alpha.6 → 0.0.1-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,95 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ /**
4
+ * Directional variants for utility properties
5
+ */
6
+ type DirectionalVariant = "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all";
7
+ /**
8
+ * Properties-first utility configuration
9
+ * This is the approach where users configure utilities by CSS property
10
+ * Made it separate in case we want other types of configs later
11
+ */
12
+ type PropertyUtilityConfig = {
13
+ source: string;
14
+ directions?: DirectionalVariant | DirectionalVariant[];
15
+ prefix?: string;
16
+ stripDuplicates?: boolean;
17
+ collection?: string;
18
+ };
19
+
20
+ type ColorFallbackStrategy = "native" | "polyfill";
21
+ type FluidConfig = {
22
+ min: number;
23
+ max: number;
24
+ };
25
+ type TokenCollection = {
26
+ source: string[];
27
+ themes?: Record<string, string[]>;
28
+ };
29
+ /**
30
+ * Multiple named collections of tokens.
31
+ * Each key is a collection name (e.g., "base", "ui", "marketing").
32
+ */
33
+ type TokenCollections = Record<string, TokenCollection>;
34
+ type UserTransformsConfig = {
35
+ fluid?: FluidConfig;
36
+ colorFallbackStrategy?: ColorFallbackStrategy;
37
+ };
38
+ /**
39
+ * Configuration for transforms applied to tokens during processing (internal config)
40
+ */
41
+ type TransformsConfig = {
42
+ fluid: FluidConfig;
43
+ colorFallbackStrategy: ColorFallbackStrategy;
44
+ };
45
+ /**
46
+ * Configuration for output directories (user config - optional fields)
47
+ */
48
+ type UserOutputConfig = {
49
+ css?: string;
50
+ components?: string;
51
+ separate?: boolean;
52
+ };
53
+ /**
54
+ * Configuration for output directories (internal config - required fields)
55
+ */
56
+ type OutputConfig = {
57
+ css: string;
58
+ components?: string;
59
+ separate: boolean;
60
+ };
61
+ /**
62
+ * Utilities configuration
63
+ * This is the approach where users configure utilities by CSS property
64
+ * Can be a single configuration or an array of configurations
65
+ */
66
+ type UtilitiesConfig = Record<string, PropertyUtilityConfig | PropertyUtilityConfig[]>;
67
+ interface UserConfig {
68
+ tokens?: TokenCollection | TokenCollections;
69
+ transforms?: UserTransformsConfig;
70
+ output?: UserOutputConfig;
71
+ utilities?: UtilitiesConfig;
72
+ }
73
+ /**
74
+ * Internal configuration type - what code uses (complete, required fields)
75
+ */
76
+ interface InternalConfig {
77
+ tokens?: TokenCollection | TokenCollections;
78
+ transforms: TransformsConfig;
79
+ output: OutputConfig;
80
+ utilities?: UtilitiesConfig;
81
+ }
82
+
83
+ /**
84
+ * Base error type that all other error types extend from.
85
+ * Used as the foundation for all error types in the system.
86
+ * Provides a consistent structure for error messages across the codebase.
87
+ */
88
+ type BaseError = {
89
+ /** A human-readable error message describing what went wrong */
90
+ message: string;
91
+ };
92
+
3
93
  /**
4
94
  * A token value that can either be a raw value or a reference.
5
95
  * This is the base type for all token values in the W3C Design Token Format.
@@ -97,9 +187,20 @@ type StructuralCompositeType = "strokeStyle";
97
187
  type CompositeTokenValue<T extends CompositeTokenType = CompositeTokenType> = T extends "typography" ? Typography : T extends "border" ? Border : T extends "shadow" ? Shadow : T extends "gradient" ? Gradient : T extends "transition" ? Transition : T extends "strokeStyle" ? StrokeStyle : never;
98
188
  /**
99
189
  * A color value in any valid CSS color format.
100
- * This can be any string that is valid in CSS color contexts.
101
- */
102
- type Color = string;
190
+ * This can be either:
191
+ * - A string that is valid in CSS color contexts (legacy format)
192
+ * - A W3C color object with colorSpace, components, and optional alpha/hex
193
+ */
194
+ type Color = string | {
195
+ /** The color space - supports "oklch" and "display-p3" */
196
+ colorSpace: "oklch" | "display-p3";
197
+ /** Array of 3 numbers representing the color components */
198
+ components: [number, number, number];
199
+ /** Optional alpha value between 0 and 1 (defaults to 1 if omitted) */
200
+ alpha?: number;
201
+ /** Optional hex fallback value for compatibility */
202
+ hex?: string;
203
+ };
103
204
  /**
104
205
  * A dimensional value with a numeric value and unit.
105
206
  * Used for measurements like width, height, spacing, etc.
@@ -255,157 +356,6 @@ type GradientStop = {
255
356
  */
256
357
  type Gradient = GradientStop[];
257
358
 
258
- /**
259
- * Directional variants for utility properties
260
- */
261
- type DirectionalVariant = "top" | "right" | "bottom" | "left" | "x" | "y" | "full";
262
- /**
263
- * Configuration for utility generation
264
- */
265
- type UtilityConfig = {
266
- properties?: string[];
267
- typeMap?: Partial<Record<TokenType, string[]>>;
268
- custom?: Record<string, string>;
269
- prefix?: string;
270
- stripLevels?: number;
271
- directions?: DirectionalVariant | DirectionalVariant[];
272
- };
273
- /**
274
- * Definition of a generated utility class
275
- */
276
- type UtilityDefinition = {
277
- className: string;
278
- property: string;
279
- value: string;
280
- tokenPath: string[];
281
- };
282
-
283
- /**
284
- * Supported color formats for CSS output
285
- */
286
- type ColorFormat = "hex" | "rgb" | "rgba" | "hsl" | "hsla" | "oklch" | "p3";
287
- /**
288
- * Configuration for fluid (responsive) values
289
- */
290
- type FluidConfig = {
291
- /** Minimum viewport width in pixels */
292
- min: number;
293
- /** Maximum viewport width in pixels */
294
- max: number;
295
- };
296
- /**
297
- * A collection of token files with shared namespace.
298
- * Represents either a starter kit or custom token collection.
299
- */
300
- type TokenCollection = {
301
- /** Array of source file paths for this collection */
302
- source: string[];
303
- /** Optional theme-specific source files */
304
- themes?: Record<string, string[]>;
305
- };
306
- /**
307
- * Multiple named collections of tokens.
308
- * Each key is a collection name (e.g., "base", "ui", "marketing").
309
- */
310
- type TokenCollections = Record<string, TokenCollection>;
311
- /**
312
- * Configuration for transforms applied to tokens during processing
313
- */
314
- type TransformsConfig = {
315
- /** Configuration for fluid (responsive) values */
316
- fluid?: FluidConfig;
317
- /** Default color format for all color tokens */
318
- colorFormat?: ColorFormat;
319
- /** Prefix to add to all CSS variable names */
320
- prefix?: string;
321
- };
322
- /**
323
- * Configuration for output directories (user config - optional fields)
324
- */
325
- type UserOutputConfig = {
326
- /** Directory where CSS files will be written */
327
- css?: string;
328
- /** Directory containing token source files */
329
- tokens?: string;
330
- /** Directory for component files */
331
- components?: string;
332
- /** Whether to generate separate CSS files by token type (default: false) */
333
- separate?: boolean;
334
- };
335
- /**
336
- * Configuration for output directories (internal config - required fields)
337
- */
338
- type OutputConfig = {
339
- /** Directory where CSS files will be written */
340
- css: string;
341
- /** Directory containing token source files */
342
- tokens: string;
343
- /** Directory for component files */
344
- components?: string;
345
- /** Whether to generate separate CSS files by token type */
346
- separate: boolean;
347
- };
348
- /**
349
- * Configuration for utility class generation
350
- */
351
- type UtilitiesConfig = {
352
- /** Include core utilities (static, always-available utilities) */
353
- core?: boolean;
354
- } & Record<string, UtilityConfig | UtilityConfig[]>;
355
- /**
356
- * Configuration for component framework integration
357
- */
358
- type ComponentsConfig = {
359
- /** The component framework to use */
360
- framework?: "react" | "astro";
361
- /** List of installed component names */
362
- installed?: string[];
363
- };
364
- /**
365
- * User configuration type - what users write (minimal, optional fields)
366
- */
367
- interface UserConfig {
368
- /** Token source configuration, either a single collection or multiple named collections */
369
- tokens: TokenCollection | TokenCollections;
370
- /** Optional transforms applied during token processing */
371
- transforms?: TransformsConfig;
372
- /** Optional output configuration for generated files */
373
- output?: UserOutputConfig;
374
- /** Configuration for utility class generation */
375
- utilities?: UtilitiesConfig;
376
- /** Configuration for component framework integration */
377
- components?: ComponentsConfig;
378
- /** List of plugin names to load */
379
- plugins?: string[];
380
- }
381
- /**
382
- * Internal configuration type - what code uses (complete, required fields)
383
- */
384
- interface SugarcubeConfig {
385
- /** Token source configuration, either a single collection or multiple named collections */
386
- tokens: TokenCollection | TokenCollections;
387
- /** Optional transforms applied during token processing */
388
- transforms?: TransformsConfig;
389
- /** Required output configuration for generated files */
390
- output: OutputConfig;
391
- /** Configuration for utility class generation */
392
- utilities?: UtilitiesConfig;
393
- /** Configuration for component framework integration */
394
- components?: ComponentsConfig;
395
- /** List of plugin names to load */
396
- plugins?: string[];
397
- }
398
-
399
- /**
400
- * Base error type that all other error types extend from.
401
- * Used as the foundation for all error types in the system.
402
- * Provides a consistent structure for error messages across the codebase.
403
- */
404
- type BaseError = {
405
- /** A human-readable error message describing what went wrong */
406
- message: string;
407
- };
408
-
409
359
  /**
410
360
  * Source information for a token, tracking its collection and theme.
411
361
  * This metadata helps with error reporting and token organization.
@@ -433,53 +383,6 @@ type TokenTree = {
433
383
  sourcePath: string;
434
384
  };
435
385
 
436
- /**
437
- * An error that occurred during token flattening.
438
- * Extends the base error type with flattening-specific information.
439
- */
440
- type FlattenError = BaseError & {
441
- /** The path to the token that failed flattening */
442
- path: string;
443
- /** Source information about where the token was loaded from */
444
- source: TokenSource;
445
- };
446
-
447
- /**
448
- * Represents a single CSS file output with its path and content
449
- */
450
- type CSSFile = {
451
- /** The path where the CSS file will be written */
452
- path: string;
453
- /** The CSS content to write to the file */
454
- css: string;
455
- };
456
- /**
457
- * Represents multiple CSS file outputs from generateSeparateFiles or generateSingleFile
458
- */
459
- type CSSFileOutput = CSSFile[];
460
-
461
- /**
462
- * Data structure for loading tokens from memory.
463
- * Maps file paths to their token content and metadata.
464
- * Used for programmatic token loading.
465
- */
466
- type TokenMemoryData = Record<string, {
467
- /** The collection name this token belongs to */
468
- collection: string;
469
- /** Optional theme name for themed tokens */
470
- theme?: string;
471
- /** The raw token content as a string */
472
- content: string;
473
- }>;
474
- /**
475
- * An error that occurred during token loading.
476
- * Extends the base error type with file-specific information.
477
- */
478
- type LoadError = BaseError & {
479
- /** The file path where the error occurred */
480
- file: string;
481
- };
482
-
483
386
  /**
484
387
  * A resolved token with its final value.
485
388
  * Contains both the original token data and its resolved value after reference resolution.
@@ -529,230 +432,325 @@ type ResolutionError = BaseError & {
529
432
  };
530
433
 
531
434
  /**
532
- * An error that occurred during token validation.
533
- * Extends the base error type with token-specific information.
435
+ * A token that has been converted to CSS properties.
436
+ * Extends ResolvedToken with CSS-specific properties.
437
+ * @template T The type of token
534
438
  */
535
- type ValidationError = BaseError & {
536
- /** The path to the token that failed validation */
537
- path: string;
538
- /** Source information about where the token was loaded from */
539
- source: TokenSource;
439
+ type ConvertedToken<T extends TokenType = TokenType> = ResolvedToken<T> & {
440
+ /** The CSS properties generated from the token */
441
+ $cssProperties: CSSProperties<T>;
540
442
  };
541
-
542
443
  /**
543
- * Result of running any pipeline.
544
- * Contains the generated output, token trees, and any errors.
444
+ * A collection of converted tokens.
445
+ * Maps token paths to their converted values or metadata nodes.
545
446
  */
546
- type PipelineResult = {
547
- /** The generated output (e.g. CSS files) */
548
- output: CSSFileOutput;
549
- /** The loaded token trees */
550
- trees: TokenTree[];
551
- /** Any errors that occurred during pipeline execution */
552
- errors: PipelineErrors;
447
+ type ConvertedTokens = {
448
+ [lookupKey: string]: ConvertedToken | NodeMetadata;
553
449
  };
554
450
  /**
555
- * Common error types that can occur during pipeline execution.
556
- * Organizes errors by the pipeline stage where they occurred.
451
+ * A collection of converted tokens organized by theme.
452
+ * Each theme contains its own set of converted tokens.
557
453
  */
558
- type PipelineErrors = {
559
- /** Errors that occurred during token loading */
560
- load: LoadError[];
561
- /** Errors that occurred during token flattening */
562
- flatten: FlattenError[];
563
- /** Errors that occurred during token validation */
564
- validation: ValidationError[];
565
- /** Errors that occurred during token resolution */
566
- resolution: ResolutionError[];
454
+ type ConvertedThemeTokenSet = {
455
+ /** The default theme's tokens */
456
+ default: ConvertedTokens;
457
+ /** Additional theme-specific tokens */
458
+ [theme: string]: ConvertedTokens;
567
459
  };
568
460
  /**
569
- * Defines how tokens should be loaded and processed.
570
- * Either from files using a config, or from memory with token data.
461
+ * A collection of converted tokens organized by collection and theme.
462
+ * The top-level structure for all converted tokens.
571
463
  */
572
- type TokenPipelineSource = {
573
- type: "files";
574
- config: SugarcubeConfig;
575
- } | {
576
- type: "memory";
577
- data: Record<string, {
578
- collection: string;
579
- content: string;
464
+ type NormalizedConvertedTokens = {
465
+ [collection: string]: ConvertedThemeTokenSet;
466
+ };
467
+ /**
468
+ * CSS property types for different token types.
469
+ * Maps token types to their corresponding CSS property structures.
470
+ * @template T The type of token
471
+ */
472
+ type CSSProperties<T extends TokenType> = T extends SimpleTokenType ? SimpleCSSProperties : T extends AlwaysDecomposedType ? AlwaysDecomposedProperties : T extends "border" ? CSSBorderProperties : T extends "shadow" ? CSSShadowProperties : T extends "gradient" ? CSSGradientProperties : T extends "transition" ? CSSTransitionProperties : T extends StructuralCompositeType ? SimpleCSSProperties : never;
473
+ /**
474
+ * Simple CSS properties with a single value.
475
+ * Used for tokens that map to a single CSS property.
476
+ */
477
+ type SimpleCSSProperties = {
478
+ /** The CSS value */
479
+ value: string | number;
480
+ /** Optional feature queries for responsive values */
481
+ featureValues?: Array<{
482
+ query: string;
483
+ value: string;
580
484
  }>;
581
- config: SugarcubeConfig;
582
485
  };
583
486
  /**
584
- * Options for loading tokens in the pipeline.
585
- * Specifies whether to load tokens from files or memory.
487
+ * CSS properties that are always broken down into multiple properties.
488
+ * Currently only used for typography tokens.
586
489
  */
587
- type TokenLoader = {
588
- type: "files";
589
- paths: SugarcubeConfig;
590
- } | {
591
- type: "memory";
592
- data: TokenMemoryData;
490
+ type AlwaysDecomposedProperties = CSSTypographyProperties;
491
+ /**
492
+ * CSS properties specific to typography tokens.
493
+ * Maps typography tokens to their corresponding CSS properties.
494
+ */
495
+ type CSSTypographyProperties = {
496
+ /** The font family to use */
497
+ "font-family": string;
498
+ /** The font size */
499
+ "font-size": string;
500
+ /** The font weight */
501
+ "font-weight"?: number | string;
502
+ /** The letter spacing */
503
+ "letter-spacing"?: string;
504
+ /** The line height */
505
+ "line-height"?: number | string;
593
506
  };
594
-
595
507
  /**
596
- * Core token processing pipeline that handles loading, validation, and resolution of tokens.
597
- * This is the foundation for all other token processing operations.
598
- *
599
- * This pipeline:
600
- * 1. Loads token trees from config or memory
601
- * 2. Flattens trees into a single structure
602
- * 3. Validates tokens for correctness
603
- * 4. Resolves all token references
604
- *
605
- * Each stage can produce errors which are collected and returned in the result.
606
- *
607
- * @param source - The source of tokens to process, either from memory or config
608
- * @returns An object containing the processed trees, resolved tokens, and any errors
609
- *
610
- * @example
611
- * const result = await tokenProcessingPipeline({ type: "config", config });
612
- * if (result.errors.validation.length > 0) {
613
- * console.error("Validation failed:", result.errors.validation);
614
- * }
508
+ * CSS properties for specific token types.
509
+ * These types represent tokens that map to single CSS properties.
615
510
  */
616
- declare function tokenProcessingPipeline(source: TokenPipelineSource): Promise<{
617
- trees: TokenTree[];
618
- resolved: ResolvedTokens;
619
- errors: PipelineResult["errors"];
620
- }>;
511
+ /**
512
+ * CSS properties for border tokens.
513
+ */
514
+ type CSSBorderProperties = {
515
+ /** The border value */
516
+ value: string;
517
+ };
518
+ /**
519
+ * CSS properties for shadow tokens.
520
+ */
521
+ type CSSShadowProperties = {
522
+ /** The shadow value */
523
+ value: string;
524
+ };
525
+ /**
526
+ * CSS properties for gradient tokens.
527
+ */
528
+ type CSSGradientProperties = {
529
+ /** The gradient value */
530
+ value: string;
531
+ };
532
+ /**
533
+ * CSS properties for transition tokens.
534
+ */
535
+ type CSSTransitionProperties = {
536
+ /** The transition value */
537
+ value: string;
538
+ };
539
+
540
+ /**
541
+ * Represents a single CSS file output with its path and content
542
+ */
543
+ type CSSFile = {
544
+ /** The path where the CSS file will be written */
545
+ path: string;
546
+ /** The CSS content to write to the file */
547
+ css: string;
548
+ /** The collection name (e.g., "default", "base", "ui", "marketing") */
549
+ collection: string;
550
+ };
551
+ /**
552
+ * Represents multiple CSS file outputs from generateSeparateFiles or generateSingleFile
553
+ */
554
+ type CSSFileOutput = CSSFile[];
555
+
556
+ declare function generateCSSVariables(convertedTokens: NormalizedConvertedTokens, config: InternalConfig): Promise<CSSFileOutput>;
557
+
558
+ /**
559
+ * An error that occurred during token flattening.
560
+ * Extends the base error type with flattening-specific information.
561
+ */
562
+ type FlattenError = BaseError & {
563
+ /** The path to the token that failed flattening */
564
+ path: string;
565
+ /** Source information about where the token was loaded from */
566
+ source: TokenSource;
567
+ };
621
568
 
622
569
  /**
623
570
  * Result of loading a Sugarcube configuration file
624
571
  */
625
- type LoadConfigResult = {
572
+ type LoadedConfig = {
626
573
  /** The validated configuration */
627
- config: SugarcubeConfig;
574
+ config: InternalConfig;
628
575
  /** The path to the config file that was loaded */
629
576
  configPath: string;
630
577
  };
631
578
  /**
632
- * Loads and validates the sugarcube configuration file from disk.
633
- *
634
- * This function:
635
- * 1. Reads the config file from the specified path
636
- * 2. Parses and validates the configuration
637
- * 3. Returns the validated configuration object and the path used
638
- *
639
- * @param configPath - Path to the config file (default: "sugarcube.config.json")
640
- * @returns A promise that resolves to the validated configuration and config path
641
- * @throws Error if the config file is not found or invalid
642
- *
643
- * @example
644
- * // Load default config file
645
- * const { config, configPath } = await loadConfig();
646
- *
647
- * // Load custom config file
648
- * const { config, configPath } = await loadConfig("./config/sugarcube.json");
579
+ * Data structure for loading tokens from memory.
580
+ * Maps file paths to their token content and metadata.
581
+ * Used for programmatic token loading.
649
582
  */
650
- declare function loadConfig(configPath?: string): Promise<LoadConfigResult>;
651
-
583
+ type TokenMemoryData = Record<string, {
584
+ /** The collection name this token belongs to */
585
+ collection: string;
586
+ /** Optional theme name for themed tokens */
587
+ theme?: string;
588
+ /** The raw token content as a string */
589
+ content: string;
590
+ }>;
652
591
  /**
653
- * Validates a user configuration object against the schema and normalizes it.
654
- *
655
- * This function:
656
- * 1. Validates the configuration structure using the user schema
657
- * 2. Normalizes the configuration by filling in defaults
658
- * 3. Validates the complete configuration using the internal schema
659
- * 4. Checks for duplicate filenames across collections
660
- * 5. Returns the validated and normalized configuration
661
- *
662
- * @param config - The user configuration object to validate
663
- * @returns The validated and normalized configuration
664
- * @throws Error if the configuration is invalid or contains duplicate filenames
665
- *
666
- * @example
667
- * const config = {
668
- * tokens: {
669
- * source: ["tokens.json"]
670
- * }
671
- * };
672
- * const validatedConfig = validateConfig(config);
673
- * // validatedConfig.output.css === "src/styles" (default filled in)
592
+ * An error that occurred during token loading.
593
+ * Extends the base error type with file-specific information.
674
594
  */
675
- declare function validateConfig(config: Partial<UserConfig>): SugarcubeConfig;
595
+ type LoadError = BaseError & {
596
+ /** The file path where the error occurred */
597
+ file: string;
598
+ };
599
+
676
600
  /**
677
- * Parses and validates a JSON configuration string.
678
- *
679
- * This function:
680
- * 1. Parses the JSON string into a configuration object
681
- * 2. Validates and normalizes the configuration using validateConfig
682
- * 3. Returns the validated and normalized configuration
683
- *
684
- * @param configString - The JSON configuration string to parse and validate
685
- * @returns The validated and normalized configuration
686
- * @throws Error if the JSON is invalid or the configuration is invalid
687
- *
688
- * @example
689
- * const configString = `{
690
- * "tokens": {
691
- * "source": ["tokens.json"]
692
- * }
693
- * }`;
694
- * const config = parseAndValidateConfig(configString);
695
- * // config.output.css === "src/styles" (default filled in)
601
+ * An error that occurred during token validation.
602
+ * Extends the base error type with token-specific information.
696
603
  */
697
- declare function parseAndValidateConfig(configString: string): SugarcubeConfig;
604
+ type ValidationError = BaseError & {
605
+ /** The path to the token that failed validation */
606
+ path: string;
607
+ /** Source information about where the token was loaded from */
608
+ source: TokenSource;
609
+ };
698
610
 
699
611
  /**
700
- * Default configuration values
612
+ * Result of running any pipeline.
613
+ * Contains the generated output, token trees, and any errors.
701
614
  */
702
- declare const DEFAULT_CONFIG: {
703
- readonly output: {
704
- readonly css: "src/styles";
705
- readonly tokens: "src/design-tokens";
706
- readonly components: "src/ui/components";
707
- readonly separate: false;
708
- };
615
+ type PipelineResult = {
616
+ /** The generated output (e.g. CSS files) */
617
+ output: CSSFileOutput;
618
+ /** The loaded token trees */
619
+ trees: TokenTree[];
620
+ /** Any errors that occurred during pipeline execution */
621
+ errors: PipelineErrors;
622
+ };
623
+ /**
624
+ * Common error types that can occur during pipeline execution.
625
+ * Organizes errors by the pipeline stage where they occurred.
626
+ */
627
+ type PipelineErrors = {
628
+ /** Errors that occurred during token loading */
629
+ load: LoadError[];
630
+ /** Errors that occurred during token flattening */
631
+ flatten: FlattenError[];
632
+ /** Errors that occurred during token validation */
633
+ validation: ValidationError[];
634
+ /** Errors that occurred during token resolution */
635
+ resolution: ResolutionError[];
709
636
  };
710
637
  /**
711
- * Normalizes a user configuration by filling in default values.
638
+ * Defines how tokens should be loaded and processed.
639
+ * Either from files using a config, or from memory with token data.
640
+ */
641
+ type TokenPipelineSource = {
642
+ type: "files";
643
+ config: InternalConfig;
644
+ } | {
645
+ type: "memory";
646
+ data: Record<string, {
647
+ collection: string;
648
+ content: string;
649
+ }>;
650
+ config: InternalConfig;
651
+ };
652
+ /**
653
+ * Options for loading tokens in the pipeline.
654
+ * Specifies whether to load tokens from files or memory.
655
+ */
656
+ type TokenLoader = {
657
+ type: "files";
658
+ paths: InternalConfig;
659
+ } | {
660
+ type: "memory";
661
+ data: TokenMemoryData;
662
+ };
663
+
664
+ /**
665
+ * Core token processing pipeline that handles loading, validation, and resolution of tokens.
666
+ * This is the foundation for all other token processing operations.
667
+ *
668
+ * This pipeline:
669
+ * 1. Loads token trees from config or memory
670
+ * 2. Flattens trees into a single structure
671
+ * 3. Validates tokens for correctness
672
+ * 4. Resolves all token references
712
673
  *
713
- * This function takes a minimal user config (with optional fields) and
714
- * returns a complete internal config (with all required fields).
674
+ * Each stage can produce errors which are collected and returned in the result.
715
675
  *
716
- * @param userConfig - The user configuration with optional fields
717
- * @returns A complete configuration with all defaults filled in
676
+ * @param source - The source of tokens to process, either from memory or config
677
+ * @returns An object containing the processed trees, resolved tokens, and any errors
718
678
  *
719
679
  * @example
720
- * const userConfig = {
721
- * tokens: { source: ["tokens/*.json"] }
722
- * };
723
- * const completeConfig = normalizeConfig(userConfig);
724
- * // completeConfig.output.css === "src/styles"
725
- * // completeConfig.output.tokens === "src/design-tokens"
726
- * // completeConfig.output.components === "src/ui/components"
727
- * // completeConfig.output.separate === false
680
+ * const result = await loadAndResolveTokens({ type: "config", config });
681
+ * if (result.errors.validation.length > 0) {
682
+ * console.error("Validation failed:", result.errors.validation);
683
+ * }
728
684
  */
729
- declare function normalizeConfig(userConfig: UserConfig): SugarcubeConfig;
685
+ declare function loadAndResolveTokens(source: TokenPipelineSource): Promise<{
686
+ trees: TokenTree[];
687
+ resolved: ResolvedTokens;
688
+ errors: PipelineResult["errors"];
689
+ }>;
690
+
691
+ type NamedUtilityValue = {
692
+ kind: "named";
693
+ value: string;
694
+ fraction: string | null;
695
+ };
696
+ type ArbitraryUtilityValue = {
697
+ kind: "arbitrary";
698
+ value: string;
699
+ };
700
+ type UtilityValue = NamedUtilityValue | ArbitraryUtilityValue;
701
+ type StaticVariant = {
702
+ kind: "static";
703
+ root: string;
704
+ };
705
+ type FunctionalVariant = {
706
+ kind: "functional";
707
+ root: string;
708
+ value: UtilityValue;
709
+ };
710
+ type Variant = StaticVariant | FunctionalVariant;
711
+ type StaticCandidate = {
712
+ kind: "static";
713
+ root: string;
714
+ variants: Variant[];
715
+ raw: string;
716
+ };
717
+ type FunctionalCandidate = {
718
+ kind: "functional";
719
+ root: string;
720
+ value: UtilityValue | null;
721
+ variants: Variant[];
722
+ raw: string;
723
+ };
724
+ type Candidate = StaticCandidate | FunctionalCandidate;
725
+ interface StaticUtilityPattern {
726
+ properties: string[];
727
+ validator: (candidate: Candidate) => boolean;
728
+ generator: (candidate: Candidate) => string;
729
+ }
730
730
 
731
731
  /**
732
- * Gets all token source file paths from the configuration.
732
+ * Processes and converts token trees into CSS-ready format.
733
+ * This pipeline:
734
+ * 1. Processes trees with resolved tokens to create a unified structure
735
+ * 2. Normalizes tokens into a collection-theme organization
736
+ * 3. Converts tokens to their CSS representations with properties
733
737
  *
734
- * This function handles both single and multiple collection configurations:
735
- * - Single collection: Returns the source array directly
736
- * - Multiple collections: Flattens and returns all source paths from all collections
737
738
  *
739
+ * @param trees - The token trees to process
740
+ * @param resolved - The resolved tokens for processing
738
741
  * @param config - The sugarcube configuration
739
- * @returns An array of all token source file paths
742
+ * @param validationErrors - Optional array of validation errors. Tokens with validation errors will be filtered out before conversion.
743
+ * @returns The processed and converted tokens ready for CSS generation
740
744
  *
741
745
  * @example
742
- * // Single collection
743
- * getTokenPathsFromConfig({ tokens: { source: ["tokens.json"] } })
744
- * // Returns: ["tokens.json"]
745
- *
746
- * // Multiple collections
747
- * getTokenPathsFromConfig({
748
- * tokens: {
749
- * base: { source: ["base.json"] },
750
- * ui: { source: ["ui.json"] }
751
- * }
752
- * })
753
- * // Returns: ["base.json", "ui.json"]
746
+ * const convertedTokens = await processAndConvertTokens(trees, resolved, config);
747
+ * // convertedTokens = { collection: { theme: { "token.path": { $cssProperties: {...} } } } }
754
748
  */
755
- declare function getTokenPathsFromConfig(config: SugarcubeConfig): string[];
749
+ declare function processAndConvertTokens(trees: TokenTree[], resolved: ResolvedTokens, config: InternalConfig, validationErrors?: ValidationError[]): Promise<NormalizedConvertedTokens>;
750
+
751
+ declare function generateIndex(stylesDir: string, config: InternalConfig): Promise<string>;
752
+ declare function shouldRegenerateIndex(stylesDir: string, config: InternalConfig): Promise<boolean>;
753
+
756
754
  /**
757
755
  * Writes CSS files to disk, creating directories as needed.
758
756
  *
@@ -793,79 +791,107 @@ declare function writeCSSVariablesToDisk(output: CSSFileOutput): Promise<CSSFile
793
791
  */
794
792
  declare function writeCSSUtilitiesToDisk(output: CSSFileOutput): Promise<CSSFileOutput>;
795
793
 
794
+ declare function findConfigFile(basePath?: string): string | null;
795
+ declare function configFileExists(basePath?: string): boolean;
796
+ declare function loadTSConfig(configPath: string): Promise<unknown>;
797
+ declare function loadUserConfig(configPath?: string): Promise<{
798
+ config: UserConfig;
799
+ configPath: string;
800
+ }>;
801
+ declare function loadInternalConfig(configPath?: string): Promise<LoadedConfig>;
802
+
803
+ /**
804
+ * Validates a user configuration object against the user schema.
805
+ *
806
+ * @param config - The user configuration object to validate
807
+ * @returns The validated user configuration
808
+ * @throws Error if the configuration is invalid
809
+ */
810
+ declare function validateUserConfig(config: Partial<UserConfig>): UserConfig;
796
811
  /**
797
- * Generates utility CSS classes from resolved tokens based on utility configuration.
798
- * This function creates CSS utility classes that map token values to CSS properties.
812
+ * Validates an internal configuration object against the internal schema and checks for duplicate filenames.
799
813
  *
800
- * The generation process:
801
- * 1. Iterates through all resolved tokens
802
- * 2. Matches tokens against utility configurations
803
- * 3. Generates CSS rules for each matching token and property
804
- * 4. Handles directional variants (e.g., padding-top, margin-right) if configured
805
- * 5. Formats and returns the final CSS string
814
+ * @param config - The internal configuration object to validate
815
+ * @returns The validated internal configuration
816
+ * @throws Error if the configuration is invalid or contains duplicate filenames
817
+ */
818
+ declare function validateInternalConfig(config: InternalConfig): InternalConfig;
819
+ /**
820
+ * Validates a user configuration object against the schema and fills in defaults.
806
821
  *
807
- * The generated CSS uses CSS custom properties (variables) to reference token values,
808
- * maintaining the connection between tokens and their usage in utilities.
822
+ * This function:
823
+ * 1. Validates the configuration structure using the user schema
824
+ * 2. Fills in default values
825
+ * 3. Validates the complete configuration using the internal schema
826
+ * 4. Checks for duplicate filenames across collections
827
+ * 5. Returns the validated configuration with defaults filled in
809
828
  *
810
- * @param tokens - The resolved tokens to generate utilities from
811
- * @param config - The sugarcube configuration containing utility settings
812
- * @returns An object containing the generated CSS, errors, and warnings
829
+ * @param config - The user configuration object to validate
830
+ * @returns The validated configuration with defaults filled in
831
+ * @throws Error if the configuration is invalid or contains duplicate filenames
813
832
  *
814
833
  * @example
815
- * const { css } = generateUtilityCSS(resolvedTokens, config);
816
- * // css = ".u-p-4 { padding: var(--spacing-4); }\n.u-mt-2 { margin-top: var(--spacing-2); }"
834
+ * const config = {
835
+ * tokens: {
836
+ * source: ["tokens.json"]
837
+ * }
838
+ * };
839
+ * const validatedConfig = validateConfig(config);
840
+ * // validatedConfig.output.css === "src/styles" (default filled in)
817
841
  */
818
- declare function generateCSSUtilityClasses(tokens: ResolvedTokens, config: SugarcubeConfig): {
819
- output: CSSFileOutput;
820
- errors: Error[];
821
- };
822
-
842
+ declare function validateConfig(config: Partial<UserConfig>): InternalConfig;
823
843
  /**
824
- * Generates CSS variables from processed token trees and resolved tokens.
825
- * This pipeline handles the conversion of tokens into CSS variable format.
844
+ * Parses and validates a JSON configuration string.
826
845
  *
827
- * This pipeline:
828
- * 1. Processes trees with resolved tokens
829
- * 2. Normalizes tokens into a collection-theme structure
830
- * 3. Converts tokens to CSS-ready format
831
- * 4. Generates final CSS output
846
+ * This function:
847
+ * 1. Parses the JSON string into a configuration object
848
+ * 2. Validates and normalizes the configuration using validateConfig
849
+ * 3. Returns the validated and normalized configuration
832
850
  *
833
- * @param trees - The processed token trees
834
- * @param resolved - The resolved tokens
835
- * @param config - The sugarcube configuration
836
- * @returns An object containing the generated CSS output
851
+ * @param configString - The JSON configuration string to parse and validate
852
+ * @returns The validated and normalized configuration
853
+ * @throws Error if the JSON is invalid or the configuration is invalid
837
854
  *
838
855
  * @example
839
- * const { output } = await cssVariablesPipeline(trees, resolved, config);
840
- * // output = [{ path: "path/to/output.css", css: ":root { ... }" }]
856
+ * const configString = `{
857
+ * "tokens": {
858
+ * "source": ["tokens.json"]
859
+ * }
860
+ * }`;
861
+ * const config = parseAndValidateConfig(configString);
862
+ * // config.output.css === "src/styles" (default filled in)
841
863
  */
842
- declare function generateCSSVariables(trees: TokenTree[], resolved: ResolvedTokens, config: SugarcubeConfig): Promise<{
843
- output: CSSFileOutput;
844
- }>;
864
+ declare function parseAndValidateConfig(configString: string): InternalConfig;
845
865
 
846
- declare function generateIndex(stylesDir: string, config: SugarcubeConfig): Promise<string>;
847
- declare function shouldRegenerateIndex(stylesDir: string, config: SugarcubeConfig): Promise<boolean>;
866
+ /**
867
+ * Fills in default values for any omitted fields in a user configuration.
868
+ *
869
+ * This function takes a user config (with optional fields) and
870
+ * returns a complete internal config (with all required fields filled in).
871
+ *
872
+ * @param userConfig - The user configuration with optional fields
873
+ * @returns A complete configuration with all defaults filled in
874
+ *
875
+ * @example
876
+ * const userConfig = {
877
+ * tokens: { source: ["tokens/*.json"] }
878
+ * };
879
+ * const completeConfig = fillDefaults(userConfig);
880
+ * // completeConfig.output.css === "src/styles"
881
+ * // completeConfig.output.components === "src/ui/components"
882
+ * // completeConfig.output.separate === false
883
+ */
884
+ declare function fillDefaults(userConfig: UserConfig): InternalConfig;
848
885
 
849
886
  interface CSSImport {
850
887
  path: string;
851
888
  layer: string;
852
889
  relativePath: string;
853
890
  }
854
- declare function discoverAllFiles(stylesDir: string, config: SugarcubeConfig): Promise<CSSImport[]>;
891
+ declare function discoverAllFiles(stylesDir: string, config: InternalConfig): Promise<CSSImport[]>;
855
892
 
856
893
  declare function generateIndexContent(files: CSSImport[]): string;
857
894
 
858
- declare const SUGARCUBE_FILE = "_sugarcube.css";
859
- declare const GLOBAL_DIR = "global";
860
- declare const UTILITIES_DIR = "utilities";
861
- declare const VARIABLES_FILE_SUFFIX = ".variables.css";
862
- declare const TOKENS_FILE_SUFFIX = ".tokens.json";
863
- declare const DEFAULT_VARIABLES_FILENAME = "tokens";
864
- declare const DEFAULT_UTILITIES_FILENAME = "utilities.css";
865
- declare const DEFAULT_STYLES_PATH = "src/styles";
866
- declare const DEFAULT_DESIGN_TOKENS_PATH = "src/design-tokens";
867
- declare const SUGARCUBE_CONFIG_FILE = "sugarcube.config.json";
868
-
869
895
  declare class Instrumentation implements Disposable {
870
896
  #private;
871
897
  private defaultFlush;
@@ -877,361 +903,120 @@ declare class Instrumentation implements Disposable {
877
903
  [Symbol.dispose](): void;
878
904
  }
879
905
 
880
- declare const userConfigSchema: z.ZodObject<{
881
- tokens: z.ZodUnion<[z.ZodObject<{
882
- source: z.ZodArray<z.ZodString, "many">;
883
- themes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
884
- }, "strip", z.ZodTypeAny, {
885
- source: string[];
886
- themes?: Record<string, string[]> | undefined;
887
- }, {
888
- source: string[];
889
- themes?: Record<string, string[]> | undefined;
890
- }>, z.ZodRecord<z.ZodString, z.ZodObject<{
891
- source: z.ZodArray<z.ZodString, "many">;
892
- themes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
893
- }, "strip", z.ZodTypeAny, {
894
- source: string[];
895
- themes?: Record<string, string[]> | undefined;
896
- }, {
897
- source: string[];
898
- themes?: Record<string, string[]> | undefined;
899
- }>>]>;
900
- transforms: z.ZodOptional<z.ZodObject<{
901
- fluid: z.ZodOptional<z.ZodObject<{
902
- min: z.ZodNumber;
903
- max: z.ZodNumber;
904
- }, "strip", z.ZodTypeAny, {
905
- min: number;
906
- max: number;
907
- }, {
908
- min: number;
909
- max: number;
910
- }>>;
911
- colorFormat: z.ZodOptional<z.ZodEnum<["hex", "rgb", "rgba", "hsl", "hsla", "oklch", "p3"]>>;
912
- prefix: z.ZodOptional<z.ZodString>;
913
- }, "strip", z.ZodTypeAny, {
914
- prefix?: string | undefined;
915
- fluid?: {
916
- min: number;
917
- max: number;
918
- } | undefined;
919
- colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | "hsla" | "oklch" | "p3" | undefined;
920
- }, {
921
- prefix?: string | undefined;
922
- fluid?: {
923
- min: number;
924
- max: number;
925
- } | undefined;
926
- colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | "hsla" | "oklch" | "p3" | undefined;
927
- }>>;
928
- output: z.ZodOptional<z.ZodObject<{
929
- css: z.ZodOptional<z.ZodString>;
930
- tokens: z.ZodOptional<z.ZodString>;
931
- components: z.ZodOptional<z.ZodString>;
932
- separate: z.ZodOptional<z.ZodBoolean>;
933
- }, "strip", z.ZodTypeAny, {
934
- tokens?: string | undefined;
935
- css?: string | undefined;
936
- components?: string | undefined;
937
- separate?: boolean | undefined;
938
- }, {
939
- tokens?: string | undefined;
940
- css?: string | undefined;
941
- components?: string | undefined;
942
- separate?: boolean | undefined;
943
- }>>;
944
- utilities: z.ZodOptional<z.ZodObject<{
945
- core: z.ZodOptional<z.ZodBoolean>;
946
- }, "strip", z.ZodUnion<[z.ZodObject<{
947
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
948
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
949
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
950
- prefix: z.ZodOptional<z.ZodString>;
951
- stripLevels: z.ZodOptional<z.ZodNumber>;
952
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
953
- }, "strip", z.ZodTypeAny, {
954
- properties?: string[] | undefined;
955
- custom?: Record<string, string> | undefined;
956
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
957
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
958
- prefix?: string | undefined;
959
- stripLevels?: number | undefined;
960
- }, {
961
- properties?: string[] | undefined;
962
- custom?: Record<string, string> | undefined;
963
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
964
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
965
- prefix?: string | undefined;
966
- stripLevels?: number | undefined;
967
- }>, z.ZodArray<z.ZodObject<{
968
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
969
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
970
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
971
- prefix: z.ZodOptional<z.ZodString>;
972
- stripLevels: z.ZodOptional<z.ZodNumber>;
973
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
974
- }, "strip", z.ZodTypeAny, {
975
- properties?: string[] | undefined;
976
- custom?: Record<string, string> | undefined;
977
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
978
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
979
- prefix?: string | undefined;
980
- stripLevels?: number | undefined;
981
- }, {
982
- properties?: string[] | undefined;
983
- custom?: Record<string, string> | undefined;
984
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
985
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
986
- prefix?: string | undefined;
987
- stripLevels?: number | undefined;
988
- }>, "many">]>, z.objectOutputType<{
989
- core: z.ZodOptional<z.ZodBoolean>;
990
- }, z.ZodUnion<[z.ZodObject<{
991
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
992
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
993
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
994
- prefix: z.ZodOptional<z.ZodString>;
995
- stripLevels: z.ZodOptional<z.ZodNumber>;
996
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
997
- }, "strip", z.ZodTypeAny, {
998
- properties?: string[] | undefined;
999
- custom?: Record<string, string> | undefined;
1000
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1001
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1002
- prefix?: string | undefined;
1003
- stripLevels?: number | undefined;
1004
- }, {
1005
- properties?: string[] | undefined;
1006
- custom?: Record<string, string> | undefined;
1007
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1008
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1009
- prefix?: string | undefined;
1010
- stripLevels?: number | undefined;
1011
- }>, z.ZodArray<z.ZodObject<{
1012
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1013
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1014
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1015
- prefix: z.ZodOptional<z.ZodString>;
1016
- stripLevels: z.ZodOptional<z.ZodNumber>;
1017
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1018
- }, "strip", z.ZodTypeAny, {
1019
- properties?: string[] | undefined;
1020
- custom?: Record<string, string> | undefined;
1021
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1022
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1023
- prefix?: string | undefined;
1024
- stripLevels?: number | undefined;
1025
- }, {
1026
- properties?: string[] | undefined;
1027
- custom?: Record<string, string> | undefined;
1028
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1029
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1030
- prefix?: string | undefined;
1031
- stripLevels?: number | undefined;
1032
- }>, "many">]>, "strip">, z.objectInputType<{
1033
- core: z.ZodOptional<z.ZodBoolean>;
1034
- }, z.ZodUnion<[z.ZodObject<{
1035
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1036
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1037
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1038
- prefix: z.ZodOptional<z.ZodString>;
1039
- stripLevels: z.ZodOptional<z.ZodNumber>;
1040
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1041
- }, "strip", z.ZodTypeAny, {
1042
- properties?: string[] | undefined;
1043
- custom?: Record<string, string> | undefined;
1044
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1045
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1046
- prefix?: string | undefined;
1047
- stripLevels?: number | undefined;
1048
- }, {
1049
- properties?: string[] | undefined;
1050
- custom?: Record<string, string> | undefined;
1051
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1052
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1053
- prefix?: string | undefined;
1054
- stripLevels?: number | undefined;
1055
- }>, z.ZodArray<z.ZodObject<{
1056
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1057
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1058
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1059
- prefix: z.ZodOptional<z.ZodString>;
1060
- stripLevels: z.ZodOptional<z.ZodNumber>;
1061
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1062
- }, "strip", z.ZodTypeAny, {
1063
- properties?: string[] | undefined;
1064
- custom?: Record<string, string> | undefined;
1065
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1066
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1067
- prefix?: string | undefined;
1068
- stripLevels?: number | undefined;
1069
- }, {
1070
- properties?: string[] | undefined;
1071
- custom?: Record<string, string> | undefined;
1072
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1073
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1074
- prefix?: string | undefined;
1075
- stripLevels?: number | undefined;
1076
- }>, "many">]>, "strip">>>;
1077
- components: z.ZodOptional<z.ZodObject<{
1078
- framework: z.ZodOptional<z.ZodEnum<["react", "astro"]>>;
1079
- installed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1080
- }, "strip", z.ZodTypeAny, {
1081
- framework?: "react" | "astro" | undefined;
1082
- installed?: string[] | undefined;
1083
- }, {
1084
- framework?: "react" | "astro" | undefined;
1085
- installed?: string[] | undefined;
1086
- }>>;
1087
- plugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1088
- }, "strip", z.ZodTypeAny, {
1089
- tokens: {
1090
- source: string[];
1091
- themes?: Record<string, string[]> | undefined;
1092
- } | Record<string, {
1093
- source: string[];
1094
- themes?: Record<string, string[]> | undefined;
1095
- }>;
1096
- utilities?: z.objectOutputType<{
1097
- core: z.ZodOptional<z.ZodBoolean>;
1098
- }, z.ZodUnion<[z.ZodObject<{
1099
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1100
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1101
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1102
- prefix: z.ZodOptional<z.ZodString>;
1103
- stripLevels: z.ZodOptional<z.ZodNumber>;
1104
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1105
- }, "strip", z.ZodTypeAny, {
1106
- properties?: string[] | undefined;
1107
- custom?: Record<string, string> | undefined;
1108
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1109
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1110
- prefix?: string | undefined;
1111
- stripLevels?: number | undefined;
1112
- }, {
1113
- properties?: string[] | undefined;
1114
- custom?: Record<string, string> | undefined;
1115
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1116
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1117
- prefix?: string | undefined;
1118
- stripLevels?: number | undefined;
1119
- }>, z.ZodArray<z.ZodObject<{
1120
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1121
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1122
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1123
- prefix: z.ZodOptional<z.ZodString>;
1124
- stripLevels: z.ZodOptional<z.ZodNumber>;
1125
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1126
- }, "strip", z.ZodTypeAny, {
1127
- properties?: string[] | undefined;
1128
- custom?: Record<string, string> | undefined;
1129
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1130
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1131
- prefix?: string | undefined;
1132
- stripLevels?: number | undefined;
1133
- }, {
1134
- properties?: string[] | undefined;
1135
- custom?: Record<string, string> | undefined;
1136
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1137
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1138
- prefix?: string | undefined;
1139
- stripLevels?: number | undefined;
1140
- }>, "many">]>, "strip"> | undefined;
1141
- output?: {
1142
- tokens?: string | undefined;
1143
- css?: string | undefined;
1144
- components?: string | undefined;
1145
- separate?: boolean | undefined;
1146
- } | undefined;
1147
- transforms?: {
1148
- prefix?: string | undefined;
1149
- fluid?: {
1150
- min: number;
1151
- max: number;
1152
- } | undefined;
1153
- colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | "hsla" | "oklch" | "p3" | undefined;
1154
- } | undefined;
1155
- components?: {
1156
- framework?: "react" | "astro" | undefined;
1157
- installed?: string[] | undefined;
1158
- } | undefined;
1159
- plugins?: string[] | undefined;
1160
- }, {
1161
- tokens: {
1162
- source: string[];
1163
- themes?: Record<string, string[]> | undefined;
1164
- } | Record<string, {
1165
- source: string[];
1166
- themes?: Record<string, string[]> | undefined;
1167
- }>;
1168
- utilities?: z.objectInputType<{
1169
- core: z.ZodOptional<z.ZodBoolean>;
1170
- }, z.ZodUnion<[z.ZodObject<{
1171
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1172
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1173
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1174
- prefix: z.ZodOptional<z.ZodString>;
1175
- stripLevels: z.ZodOptional<z.ZodNumber>;
1176
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1177
- }, "strip", z.ZodTypeAny, {
1178
- properties?: string[] | undefined;
1179
- custom?: Record<string, string> | undefined;
1180
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1181
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1182
- prefix?: string | undefined;
1183
- stripLevels?: number | undefined;
1184
- }, {
1185
- properties?: string[] | undefined;
1186
- custom?: Record<string, string> | undefined;
1187
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1188
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1189
- prefix?: string | undefined;
1190
- stripLevels?: number | undefined;
1191
- }>, z.ZodArray<z.ZodObject<{
1192
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1193
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1194
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1195
- prefix: z.ZodOptional<z.ZodString>;
1196
- stripLevels: z.ZodOptional<z.ZodNumber>;
1197
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1198
- }, "strip", z.ZodTypeAny, {
1199
- properties?: string[] | undefined;
1200
- custom?: Record<string, string> | undefined;
1201
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1202
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1203
- prefix?: string | undefined;
1204
- stripLevels?: number | undefined;
1205
- }, {
1206
- properties?: string[] | undefined;
1207
- custom?: Record<string, string> | undefined;
1208
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1209
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1210
- prefix?: string | undefined;
1211
- stripLevels?: number | undefined;
1212
- }>, "many">]>, "strip"> | undefined;
1213
- output?: {
1214
- tokens?: string | undefined;
1215
- css?: string | undefined;
1216
- components?: string | undefined;
1217
- separate?: boolean | undefined;
1218
- } | undefined;
1219
- transforms?: {
1220
- prefix?: string | undefined;
1221
- fluid?: {
1222
- min: number;
1223
- max: number;
1224
- } | undefined;
1225
- colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | "hsla" | "oklch" | "p3" | undefined;
1226
- } | undefined;
1227
- components?: {
1228
- framework?: "react" | "astro" | undefined;
1229
- installed?: string[] | undefined;
1230
- } | undefined;
1231
- plugins?: string[] | undefined;
1232
- }>;
1233
- declare const internalConfigSchema: z.ZodObject<{
1234
- tokens: z.ZodUnion<[z.ZodObject<{
906
+ type CSSObject = Record<string, string | number | undefined>;
907
+ declare function convertConfigToUnoRules(utilitiesConfig: UtilitiesConfig, tokens: NormalizedConvertedTokens): Array<[RegExp, (m: RegExpMatchArray) => CSSObject]>;
908
+
909
+ declare const SUGARCUBE_FILE = "_sugarcube.css";
910
+ declare const GLOBAL_DIR = "global";
911
+ declare const UTILITIES_DIR = "utilities";
912
+ declare const VARIABLES_FILE_SUFFIX = ".variables.gen.css";
913
+ declare const DEFAULT_VARIABLES_FILENAME = "tokens";
914
+ declare const DEFAULT_UTILITIES_FILENAME = "utilities.gen.css";
915
+ declare const DEFAULT_STYLES_PATH = "src/styles";
916
+ declare const DEFAULT_DESIGN_TOKENS_PATH = "src/design-tokens";
917
+ declare const SUGARCUBE_CONFIG_FILE = "sugarcube.config.ts";
918
+
919
+ declare const DEFAULT_CONFIG: {
920
+ readonly output: {
921
+ readonly css: "src/styles";
922
+ readonly components: "src/components/ui";
923
+ readonly separate: false;
924
+ };
925
+ readonly transforms: {
926
+ readonly fluid: {
927
+ readonly min: 320;
928
+ readonly max: 1200;
929
+ };
930
+ readonly colorFallbackStrategy: "native";
931
+ };
932
+ };
933
+
934
+ declare const DEFAULT_COLLECTION = "default";
935
+ declare const DEFAULT_THEME = "default";
936
+
937
+ declare const ErrorMessages: {
938
+ readonly LOAD: {
939
+ readonly NO_FILES_FOUND: (pattern: string) => string;
940
+ readonly INVALID_JSON: (path: string, message: string) => string;
941
+ readonly GLOB_ERROR: (pattern: string, error: string) => string;
942
+ };
943
+ readonly FLATTEN: {
944
+ readonly INVALID_TOKEN_NAME: (name: string) => string;
945
+ readonly MISSING_DOLLAR_PREFIX: (path: string) => string;
946
+ readonly INVALID_TOKEN_NESTING: (path: string) => string;
947
+ readonly COMPOSITE_TOKEN_MISSING_TYPE: (path: string) => string;
948
+ readonly CONFLICT_TOKEN_VS_GROUP: (path: string) => string;
949
+ readonly CONFLICT_INCOMPATIBLE_TYPES: (expected: string, received: string, path: string) => string;
950
+ };
951
+ readonly METADATA: {
952
+ readonly COLLECTION_ERROR: (message: string) => string;
953
+ readonly INVALID_EXTENSIONS: (path: string) => string;
954
+ readonly INVALID_DESCRIPTION: (path: string) => string;
955
+ };
956
+ readonly VALIDATE: {
957
+ readonly MISSING_TYPE: (path: string) => string;
958
+ readonly UNKNOWN_TOKEN_TYPE: (type: string, path: string) => string;
959
+ readonly INVALID_COLOR: (value: unknown, path: string) => string;
960
+ readonly INVALID_DIMENSION: (value: unknown, path: string) => string;
961
+ readonly INVALID_DIMENSION_UNIT: (unit: unknown, path: string) => string;
962
+ readonly INVALID_FONT_FAMILY: (value: unknown, path: string) => string;
963
+ readonly INVALID_FONT_WEIGHT: (value: unknown, path: string) => string;
964
+ readonly INVALID_DURATION: (value: unknown, path: string) => string;
965
+ readonly INVALID_DURATION_UNIT: (unit: unknown, path: string) => string;
966
+ readonly INVALID_CUBIC_BEZIER: (value: unknown, path: string) => string;
967
+ readonly INVALID_STROKE_STYLE: (value: unknown, path: string) => string;
968
+ readonly INVALID_STROKE_LINE_CAP: (value: unknown, path: string) => string;
969
+ readonly INVALID_BORDER: (value: unknown, path: string) => string;
970
+ readonly INVALID_SHADOW: (value: unknown, path: string) => string;
971
+ readonly INVALID_SHADOW_INSET: (value: unknown, path: string) => string;
972
+ readonly INVALID_TRANSITION: (value: unknown, path: string) => string;
973
+ readonly INVALID_GRADIENT: (value: unknown, path: string) => string;
974
+ readonly INVALID_GRADIENT_STOP_POSITION: (value: unknown, path: string) => string;
975
+ readonly INVALID_TYPOGRAPHY: (value: unknown, path: string) => string;
976
+ readonly MISSING_REQUIRED_PROPERTY: (prop: string, path: string) => string;
977
+ readonly INVALID_NUMBER: (value: unknown, path: string) => string;
978
+ readonly INVALID_ARRAY: (value: unknown, path: string) => string;
979
+ readonly MISSING_FLUID_CONFIG: (path: string) => string;
980
+ readonly INVALID_FLUID_DIMENSION: (value: unknown, path: string) => string;
981
+ readonly INVALID_VIEWPORT_CONFIG: (value: unknown, path: string) => string;
982
+ readonly MISMATCHED_UNITS: (unit1: unknown, unit2: unknown, path: string) => string;
983
+ readonly INVALID_FLUID_VALUE_RANGE: (path: string) => string;
984
+ readonly INVALID_TOKEN_TYPE: (expected: string, received: string, path: string) => string;
985
+ readonly INVALID_TYPE: (expected: string, value: unknown, path: string) => string;
986
+ readonly INVALID_ENUM_VALUE: (enumValues: unknown[], value: unknown, path: string) => string;
987
+ };
988
+ readonly RESOLVE: {
989
+ readonly CIRCULAR_REFERENCE: (path: string, ref: string) => string;
990
+ readonly REFERENCE_NOT_FOUND: (ref: string, path: string) => string;
991
+ readonly TYPE_MISMATCH: (path: string) => string;
992
+ };
993
+ readonly GENERATE: {
994
+ readonly INVALID_CSS_VALUE: (key: string, value: unknown) => string;
995
+ readonly INVALID_VARIABLE_NAME: (path: string, name: string) => string;
996
+ };
997
+ readonly CONFIG: {
998
+ readonly INVALID_JSON: (error: string) => string;
999
+ readonly INVALID_CONFIG: (path: string, message: string) => string;
1000
+ readonly DUPLICATE_FILENAMES: (collection: string, filename: string, paths: string[]) => string;
1001
+ readonly FILE_NOT_FOUND: (path: string) => string;
1002
+ };
1003
+ readonly UTILITIES: {
1004
+ readonly RESERVED_PREFIX: (prefix: string, tokenType: string) => string;
1005
+ readonly DUPLICATE_CLASS_NAME: (className: string, paths: string[]) => string;
1006
+ readonly INVALID_PROPERTY_MAPPING: (tokenType: string) => string;
1007
+ readonly DUPLICATE_PREFIX: (prefix: string, tokenType: string) => string;
1008
+ readonly INVALID_COLLECTION: (property: string, collection: string, availableCollections: string[]) => string;
1009
+ readonly TOKEN_PATH_CONFLICT: (tokenPath: string, collections: string) => string;
1010
+ readonly MISSING_SOURCE: (property: string) => string;
1011
+ readonly INVALID_SOURCE_PATTERN: (property: string, source: string) => string;
1012
+ readonly INVALID_DIRECTIONS: (property: string) => string;
1013
+ readonly INVALID_CONFIG_OBJECT: "utilitiesConfig must be an object";
1014
+ readonly INVALID_TOKENS_OBJECT: "tokens must be an object";
1015
+ };
1016
+ };
1017
+
1018
+ declare const userConfigSchema: z.ZodObject<{
1019
+ tokens: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
1235
1020
  source: z.ZodArray<z.ZodString, "many">;
1236
1021
  themes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
1237
1022
  }, "strip", z.ZodTypeAny, {
@@ -1240,7 +1025,7 @@ declare const internalConfigSchema: z.ZodObject<{
1240
1025
  }, {
1241
1026
  source: string[];
1242
1027
  themes?: Record<string, string[]> | undefined;
1243
- }>, z.ZodRecord<z.ZodString, z.ZodObject<{
1028
+ }>>, z.ZodObject<{
1244
1029
  source: z.ZodArray<z.ZodString, "many">;
1245
1030
  themes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
1246
1031
  }, "strip", z.ZodTypeAny, {
@@ -1249,7 +1034,7 @@ declare const internalConfigSchema: z.ZodObject<{
1249
1034
  }, {
1250
1035
  source: string[];
1251
1036
  themes?: Record<string, string[]> | undefined;
1252
- }>>]>;
1037
+ }>]>>;
1253
1038
  transforms: z.ZodOptional<z.ZodObject<{
1254
1039
  fluid: z.ZodOptional<z.ZodObject<{
1255
1040
  min: z.ZodNumber;
@@ -1261,330 +1046,139 @@ declare const internalConfigSchema: z.ZodObject<{
1261
1046
  min: number;
1262
1047
  max: number;
1263
1048
  }>>;
1264
- colorFormat: z.ZodOptional<z.ZodEnum<["hex", "rgb", "rgba", "hsl", "hsla", "oklch", "p3"]>>;
1265
- prefix: z.ZodOptional<z.ZodString>;
1049
+ colorFallbackStrategy: z.ZodOptional<z.ZodEnum<["native", "polyfill"]>>;
1266
1050
  }, "strip", z.ZodTypeAny, {
1267
- prefix?: string | undefined;
1268
1051
  fluid?: {
1269
1052
  min: number;
1270
1053
  max: number;
1271
1054
  } | undefined;
1272
- colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | "hsla" | "oklch" | "p3" | undefined;
1055
+ colorFallbackStrategy?: "native" | "polyfill" | undefined;
1273
1056
  }, {
1274
- prefix?: string | undefined;
1275
1057
  fluid?: {
1276
1058
  min: number;
1277
1059
  max: number;
1278
1060
  } | undefined;
1279
- colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | "hsla" | "oklch" | "p3" | undefined;
1061
+ colorFallbackStrategy?: "native" | "polyfill" | undefined;
1280
1062
  }>>;
1281
- output: z.ZodObject<{
1282
- css: z.ZodString;
1283
- tokens: z.ZodString;
1284
- components: z.ZodString;
1285
- separate: z.ZodBoolean;
1286
- }, "strip", z.ZodTypeAny, {
1287
- tokens: string;
1288
- css: string;
1289
- components: string;
1290
- separate: boolean;
1291
- }, {
1292
- tokens: string;
1293
- css: string;
1294
- components: string;
1295
- separate: boolean;
1296
- }>;
1297
- utilities: z.ZodOptional<z.ZodObject<{
1298
- core: z.ZodOptional<z.ZodBoolean>;
1299
- }, "strip", z.ZodUnion<[z.ZodObject<{
1300
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1301
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1302
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1303
- prefix: z.ZodOptional<z.ZodString>;
1304
- stripLevels: z.ZodOptional<z.ZodNumber>;
1305
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1306
- }, "strip", z.ZodTypeAny, {
1307
- properties?: string[] | undefined;
1308
- custom?: Record<string, string> | undefined;
1309
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1310
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1311
- prefix?: string | undefined;
1312
- stripLevels?: number | undefined;
1313
- }, {
1314
- properties?: string[] | undefined;
1315
- custom?: Record<string, string> | undefined;
1316
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1317
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1318
- prefix?: string | undefined;
1319
- stripLevels?: number | undefined;
1320
- }>, z.ZodArray<z.ZodObject<{
1321
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1322
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1323
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1324
- prefix: z.ZodOptional<z.ZodString>;
1325
- stripLevels: z.ZodOptional<z.ZodNumber>;
1326
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1327
- }, "strip", z.ZodTypeAny, {
1328
- properties?: string[] | undefined;
1329
- custom?: Record<string, string> | undefined;
1330
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1331
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1332
- prefix?: string | undefined;
1333
- stripLevels?: number | undefined;
1334
- }, {
1335
- properties?: string[] | undefined;
1336
- custom?: Record<string, string> | undefined;
1337
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1338
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1339
- prefix?: string | undefined;
1340
- stripLevels?: number | undefined;
1341
- }>, "many">]>, z.objectOutputType<{
1342
- core: z.ZodOptional<z.ZodBoolean>;
1343
- }, z.ZodUnion<[z.ZodObject<{
1344
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1345
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1346
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1347
- prefix: z.ZodOptional<z.ZodString>;
1348
- stripLevels: z.ZodOptional<z.ZodNumber>;
1349
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1350
- }, "strip", z.ZodTypeAny, {
1351
- properties?: string[] | undefined;
1352
- custom?: Record<string, string> | undefined;
1353
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1354
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1355
- prefix?: string | undefined;
1356
- stripLevels?: number | undefined;
1357
- }, {
1358
- properties?: string[] | undefined;
1359
- custom?: Record<string, string> | undefined;
1360
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1361
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1362
- prefix?: string | undefined;
1363
- stripLevels?: number | undefined;
1364
- }>, z.ZodArray<z.ZodObject<{
1365
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1366
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1367
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1368
- prefix: z.ZodOptional<z.ZodString>;
1369
- stripLevels: z.ZodOptional<z.ZodNumber>;
1370
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1063
+ output: z.ZodOptional<z.ZodObject<{
1064
+ css: z.ZodOptional<z.ZodString>;
1065
+ components: z.ZodOptional<z.ZodString>;
1066
+ separate: z.ZodOptional<z.ZodBoolean>;
1371
1067
  }, "strip", z.ZodTypeAny, {
1372
- properties?: string[] | undefined;
1373
- custom?: Record<string, string> | undefined;
1374
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1375
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1376
- prefix?: string | undefined;
1377
- stripLevels?: number | undefined;
1068
+ css?: string | undefined;
1069
+ components?: string | undefined;
1070
+ separate?: boolean | undefined;
1378
1071
  }, {
1379
- properties?: string[] | undefined;
1380
- custom?: Record<string, string> | undefined;
1381
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1382
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1383
- prefix?: string | undefined;
1384
- stripLevels?: number | undefined;
1385
- }>, "many">]>, "strip">, z.objectInputType<{
1386
- core: z.ZodOptional<z.ZodBoolean>;
1387
- }, z.ZodUnion<[z.ZodObject<{
1388
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1389
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1390
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1072
+ css?: string | undefined;
1073
+ components?: string | undefined;
1074
+ separate?: boolean | undefined;
1075
+ }>>;
1076
+ utilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1077
+ source: z.ZodString;
1078
+ directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full", "all"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full", "all"]>, "many">]>>;
1391
1079
  prefix: z.ZodOptional<z.ZodString>;
1392
- stripLevels: z.ZodOptional<z.ZodNumber>;
1393
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1080
+ stripDuplicates: z.ZodOptional<z.ZodBoolean>;
1081
+ collection: z.ZodOptional<z.ZodString>;
1394
1082
  }, "strip", z.ZodTypeAny, {
1395
- properties?: string[] | undefined;
1396
- custom?: Record<string, string> | undefined;
1397
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1398
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1083
+ source: string;
1084
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1399
1085
  prefix?: string | undefined;
1400
- stripLevels?: number | undefined;
1086
+ stripDuplicates?: boolean | undefined;
1087
+ collection?: string | undefined;
1401
1088
  }, {
1402
- properties?: string[] | undefined;
1403
- custom?: Record<string, string> | undefined;
1404
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1405
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1089
+ source: string;
1090
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1406
1091
  prefix?: string | undefined;
1407
- stripLevels?: number | undefined;
1092
+ stripDuplicates?: boolean | undefined;
1093
+ collection?: string | undefined;
1408
1094
  }>, z.ZodArray<z.ZodObject<{
1409
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1410
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1411
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1095
+ source: z.ZodString;
1096
+ directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full", "all"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full", "all"]>, "many">]>>;
1412
1097
  prefix: z.ZodOptional<z.ZodString>;
1413
- stripLevels: z.ZodOptional<z.ZodNumber>;
1414
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1098
+ stripDuplicates: z.ZodOptional<z.ZodBoolean>;
1099
+ collection: z.ZodOptional<z.ZodString>;
1415
1100
  }, "strip", z.ZodTypeAny, {
1416
- properties?: string[] | undefined;
1417
- custom?: Record<string, string> | undefined;
1418
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1419
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1101
+ source: string;
1102
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1420
1103
  prefix?: string | undefined;
1421
- stripLevels?: number | undefined;
1104
+ stripDuplicates?: boolean | undefined;
1105
+ collection?: string | undefined;
1422
1106
  }, {
1423
- properties?: string[] | undefined;
1424
- custom?: Record<string, string> | undefined;
1425
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1426
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1107
+ source: string;
1108
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1427
1109
  prefix?: string | undefined;
1428
- stripLevels?: number | undefined;
1429
- }>, "many">]>, "strip">>>;
1430
- components: z.ZodOptional<z.ZodObject<{
1431
- framework: z.ZodOptional<z.ZodEnum<["react", "astro"]>>;
1432
- installed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1433
- }, "strip", z.ZodTypeAny, {
1434
- framework?: "react" | "astro" | undefined;
1435
- installed?: string[] | undefined;
1436
- }, {
1437
- framework?: "react" | "astro" | undefined;
1438
- installed?: string[] | undefined;
1439
- }>>;
1440
- plugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1110
+ stripDuplicates?: boolean | undefined;
1111
+ collection?: string | undefined;
1112
+ }>, "many">]>>>;
1441
1113
  }, "strip", z.ZodTypeAny, {
1442
- tokens: {
1114
+ tokens?: {
1443
1115
  source: string[];
1444
1116
  themes?: Record<string, string[]> | undefined;
1445
1117
  } | Record<string, {
1446
1118
  source: string[];
1447
1119
  themes?: Record<string, string[]> | undefined;
1448
- }>;
1449
- output: {
1450
- tokens: string;
1451
- css: string;
1452
- components: string;
1453
- separate: boolean;
1454
- };
1455
- utilities?: z.objectOutputType<{
1456
- core: z.ZodOptional<z.ZodBoolean>;
1457
- }, z.ZodUnion<[z.ZodObject<{
1458
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1459
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1460
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1461
- prefix: z.ZodOptional<z.ZodString>;
1462
- stripLevels: z.ZodOptional<z.ZodNumber>;
1463
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1464
- }, "strip", z.ZodTypeAny, {
1465
- properties?: string[] | undefined;
1466
- custom?: Record<string, string> | undefined;
1467
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1468
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1469
- prefix?: string | undefined;
1470
- stripLevels?: number | undefined;
1471
- }, {
1472
- properties?: string[] | undefined;
1473
- custom?: Record<string, string> | undefined;
1474
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1475
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1476
- prefix?: string | undefined;
1477
- stripLevels?: number | undefined;
1478
- }>, z.ZodArray<z.ZodObject<{
1479
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1480
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1481
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1482
- prefix: z.ZodOptional<z.ZodString>;
1483
- stripLevels: z.ZodOptional<z.ZodNumber>;
1484
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1485
- }, "strip", z.ZodTypeAny, {
1486
- properties?: string[] | undefined;
1487
- custom?: Record<string, string> | undefined;
1488
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1489
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1490
- prefix?: string | undefined;
1491
- stripLevels?: number | undefined;
1492
- }, {
1493
- properties?: string[] | undefined;
1494
- custom?: Record<string, string> | undefined;
1495
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1496
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1497
- prefix?: string | undefined;
1498
- stripLevels?: number | undefined;
1499
- }>, "many">]>, "strip"> | undefined;
1120
+ }> | undefined;
1500
1121
  transforms?: {
1501
- prefix?: string | undefined;
1502
1122
  fluid?: {
1503
1123
  min: number;
1504
1124
  max: number;
1505
1125
  } | undefined;
1506
- colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | "hsla" | "oklch" | "p3" | undefined;
1126
+ colorFallbackStrategy?: "native" | "polyfill" | undefined;
1507
1127
  } | undefined;
1508
- components?: {
1509
- framework?: "react" | "astro" | undefined;
1510
- installed?: string[] | undefined;
1128
+ output?: {
1129
+ css?: string | undefined;
1130
+ components?: string | undefined;
1131
+ separate?: boolean | undefined;
1511
1132
  } | undefined;
1512
- plugins?: string[] | undefined;
1133
+ utilities?: Record<string, {
1134
+ source: string;
1135
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1136
+ prefix?: string | undefined;
1137
+ stripDuplicates?: boolean | undefined;
1138
+ collection?: string | undefined;
1139
+ } | {
1140
+ source: string;
1141
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1142
+ prefix?: string | undefined;
1143
+ stripDuplicates?: boolean | undefined;
1144
+ collection?: string | undefined;
1145
+ }[]> | undefined;
1513
1146
  }, {
1514
- tokens: {
1147
+ tokens?: {
1515
1148
  source: string[];
1516
1149
  themes?: Record<string, string[]> | undefined;
1517
1150
  } | Record<string, {
1518
1151
  source: string[];
1519
1152
  themes?: Record<string, string[]> | undefined;
1520
- }>;
1521
- output: {
1522
- tokens: string;
1523
- css: string;
1524
- components: string;
1525
- separate: boolean;
1526
- };
1527
- utilities?: z.objectInputType<{
1528
- core: z.ZodOptional<z.ZodBoolean>;
1529
- }, z.ZodUnion<[z.ZodObject<{
1530
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1531
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1532
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1533
- prefix: z.ZodOptional<z.ZodString>;
1534
- stripLevels: z.ZodOptional<z.ZodNumber>;
1535
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1536
- }, "strip", z.ZodTypeAny, {
1537
- properties?: string[] | undefined;
1538
- custom?: Record<string, string> | undefined;
1539
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1540
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1541
- prefix?: string | undefined;
1542
- stripLevels?: number | undefined;
1543
- }, {
1544
- properties?: string[] | undefined;
1545
- custom?: Record<string, string> | undefined;
1546
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1547
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1548
- prefix?: string | undefined;
1549
- stripLevels?: number | undefined;
1550
- }>, z.ZodArray<z.ZodObject<{
1551
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1552
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1553
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1554
- prefix: z.ZodOptional<z.ZodString>;
1555
- stripLevels: z.ZodOptional<z.ZodNumber>;
1556
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1557
- }, "strip", z.ZodTypeAny, {
1558
- properties?: string[] | undefined;
1559
- custom?: Record<string, string> | undefined;
1560
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1561
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1562
- prefix?: string | undefined;
1563
- stripLevels?: number | undefined;
1564
- }, {
1565
- properties?: string[] | undefined;
1566
- custom?: Record<string, string> | undefined;
1567
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1568
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1569
- prefix?: string | undefined;
1570
- stripLevels?: number | undefined;
1571
- }>, "many">]>, "strip"> | undefined;
1153
+ }> | undefined;
1572
1154
  transforms?: {
1573
- prefix?: string | undefined;
1574
1155
  fluid?: {
1575
1156
  min: number;
1576
1157
  max: number;
1577
1158
  } | undefined;
1578
- colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | "hsla" | "oklch" | "p3" | undefined;
1159
+ colorFallbackStrategy?: "native" | "polyfill" | undefined;
1579
1160
  } | undefined;
1580
- components?: {
1581
- framework?: "react" | "astro" | undefined;
1582
- installed?: string[] | undefined;
1161
+ output?: {
1162
+ css?: string | undefined;
1163
+ components?: string | undefined;
1164
+ separate?: boolean | undefined;
1583
1165
  } | undefined;
1584
- plugins?: string[] | undefined;
1166
+ utilities?: Record<string, {
1167
+ source: string;
1168
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1169
+ prefix?: string | undefined;
1170
+ stripDuplicates?: boolean | undefined;
1171
+ collection?: string | undefined;
1172
+ } | {
1173
+ source: string;
1174
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1175
+ prefix?: string | undefined;
1176
+ stripDuplicates?: boolean | undefined;
1177
+ collection?: string | undefined;
1178
+ }[]> | undefined;
1585
1179
  }>;
1586
- declare const configSchema: z.ZodObject<{
1587
- tokens: z.ZodUnion<[z.ZodObject<{
1180
+ declare const internalConfigSchema: z.ZodObject<{
1181
+ tokens: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
1588
1182
  source: z.ZodArray<z.ZodString, "many">;
1589
1183
  themes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
1590
1184
  }, "strip", z.ZodTypeAny, {
@@ -1593,7 +1187,7 @@ declare const configSchema: z.ZodObject<{
1593
1187
  }, {
1594
1188
  source: string[];
1595
1189
  themes?: Record<string, string[]> | undefined;
1596
- }>, z.ZodRecord<z.ZodString, z.ZodObject<{
1190
+ }>>, z.ZodObject<{
1597
1191
  source: z.ZodArray<z.ZodString, "many">;
1598
1192
  themes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
1599
1193
  }, "strip", z.ZodTypeAny, {
@@ -1602,9 +1196,9 @@ declare const configSchema: z.ZodObject<{
1602
1196
  }, {
1603
1197
  source: string[];
1604
1198
  themes?: Record<string, string[]> | undefined;
1605
- }>>]>;
1606
- transforms: z.ZodOptional<z.ZodObject<{
1607
- fluid: z.ZodOptional<z.ZodObject<{
1199
+ }>]>>;
1200
+ transforms: z.ZodObject<{
1201
+ fluid: z.ZodObject<{
1608
1202
  min: z.ZodNumber;
1609
1203
  max: z.ZodNumber;
1610
1204
  }, "strip", z.ZodTypeAny, {
@@ -1613,328 +1207,159 @@ declare const configSchema: z.ZodObject<{
1613
1207
  }, {
1614
1208
  min: number;
1615
1209
  max: number;
1616
- }>>;
1617
- colorFormat: z.ZodOptional<z.ZodEnum<["hex", "rgb", "rgba", "hsl", "hsla", "oklch", "p3"]>>;
1618
- prefix: z.ZodOptional<z.ZodString>;
1210
+ }>;
1211
+ colorFallbackStrategy: z.ZodEnum<["native", "polyfill"]>;
1619
1212
  }, "strip", z.ZodTypeAny, {
1620
- prefix?: string | undefined;
1621
- fluid?: {
1213
+ fluid: {
1622
1214
  min: number;
1623
1215
  max: number;
1624
- } | undefined;
1625
- colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | "hsla" | "oklch" | "p3" | undefined;
1216
+ };
1217
+ colorFallbackStrategy: "native" | "polyfill";
1626
1218
  }, {
1627
- prefix?: string | undefined;
1628
- fluid?: {
1219
+ fluid: {
1629
1220
  min: number;
1630
1221
  max: number;
1631
- } | undefined;
1632
- colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | "hsla" | "oklch" | "p3" | undefined;
1633
- }>>;
1634
- output: z.ZodOptional<z.ZodObject<{
1635
- css: z.ZodOptional<z.ZodString>;
1636
- tokens: z.ZodOptional<z.ZodString>;
1637
- components: z.ZodOptional<z.ZodString>;
1638
- separate: z.ZodOptional<z.ZodBoolean>;
1639
- }, "strip", z.ZodTypeAny, {
1640
- tokens?: string | undefined;
1641
- css?: string | undefined;
1642
- components?: string | undefined;
1643
- separate?: boolean | undefined;
1644
- }, {
1645
- tokens?: string | undefined;
1646
- css?: string | undefined;
1647
- components?: string | undefined;
1648
- separate?: boolean | undefined;
1649
- }>>;
1650
- utilities: z.ZodOptional<z.ZodObject<{
1651
- core: z.ZodOptional<z.ZodBoolean>;
1652
- }, "strip", z.ZodUnion<[z.ZodObject<{
1653
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1654
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1655
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1656
- prefix: z.ZodOptional<z.ZodString>;
1657
- stripLevels: z.ZodOptional<z.ZodNumber>;
1658
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1659
- }, "strip", z.ZodTypeAny, {
1660
- properties?: string[] | undefined;
1661
- custom?: Record<string, string> | undefined;
1662
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1663
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1664
- prefix?: string | undefined;
1665
- stripLevels?: number | undefined;
1666
- }, {
1667
- properties?: string[] | undefined;
1668
- custom?: Record<string, string> | undefined;
1669
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1670
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1671
- prefix?: string | undefined;
1672
- stripLevels?: number | undefined;
1673
- }>, z.ZodArray<z.ZodObject<{
1674
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1675
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1676
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1677
- prefix: z.ZodOptional<z.ZodString>;
1678
- stripLevels: z.ZodOptional<z.ZodNumber>;
1679
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1680
- }, "strip", z.ZodTypeAny, {
1681
- properties?: string[] | undefined;
1682
- custom?: Record<string, string> | undefined;
1683
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1684
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1685
- prefix?: string | undefined;
1686
- stripLevels?: number | undefined;
1687
- }, {
1688
- properties?: string[] | undefined;
1689
- custom?: Record<string, string> | undefined;
1690
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1691
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1692
- prefix?: string | undefined;
1693
- stripLevels?: number | undefined;
1694
- }>, "many">]>, z.objectOutputType<{
1695
- core: z.ZodOptional<z.ZodBoolean>;
1696
- }, z.ZodUnion<[z.ZodObject<{
1697
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1698
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1699
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1700
- prefix: z.ZodOptional<z.ZodString>;
1701
- stripLevels: z.ZodOptional<z.ZodNumber>;
1702
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1703
- }, "strip", z.ZodTypeAny, {
1704
- properties?: string[] | undefined;
1705
- custom?: Record<string, string> | undefined;
1706
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1707
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1708
- prefix?: string | undefined;
1709
- stripLevels?: number | undefined;
1710
- }, {
1711
- properties?: string[] | undefined;
1712
- custom?: Record<string, string> | undefined;
1713
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1714
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1715
- prefix?: string | undefined;
1716
- stripLevels?: number | undefined;
1717
- }>, z.ZodArray<z.ZodObject<{
1718
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1719
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1720
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1721
- prefix: z.ZodOptional<z.ZodString>;
1722
- stripLevels: z.ZodOptional<z.ZodNumber>;
1723
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1222
+ };
1223
+ colorFallbackStrategy: "native" | "polyfill";
1224
+ }>;
1225
+ output: z.ZodObject<{
1226
+ css: z.ZodString;
1227
+ components: z.ZodString;
1228
+ separate: z.ZodBoolean;
1724
1229
  }, "strip", z.ZodTypeAny, {
1725
- properties?: string[] | undefined;
1726
- custom?: Record<string, string> | undefined;
1727
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1728
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1729
- prefix?: string | undefined;
1730
- stripLevels?: number | undefined;
1230
+ components: string;
1231
+ css: string;
1232
+ separate: boolean;
1731
1233
  }, {
1732
- properties?: string[] | undefined;
1733
- custom?: Record<string, string> | undefined;
1734
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1735
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1736
- prefix?: string | undefined;
1737
- stripLevels?: number | undefined;
1738
- }>, "many">]>, "strip">, z.objectInputType<{
1739
- core: z.ZodOptional<z.ZodBoolean>;
1740
- }, z.ZodUnion<[z.ZodObject<{
1741
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1742
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1743
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1234
+ components: string;
1235
+ css: string;
1236
+ separate: boolean;
1237
+ }>;
1238
+ utilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1239
+ source: z.ZodString;
1240
+ directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full", "all"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full", "all"]>, "many">]>>;
1744
1241
  prefix: z.ZodOptional<z.ZodString>;
1745
- stripLevels: z.ZodOptional<z.ZodNumber>;
1746
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1242
+ stripDuplicates: z.ZodOptional<z.ZodBoolean>;
1243
+ collection: z.ZodOptional<z.ZodString>;
1747
1244
  }, "strip", z.ZodTypeAny, {
1748
- properties?: string[] | undefined;
1749
- custom?: Record<string, string> | undefined;
1750
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1751
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1245
+ source: string;
1246
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1752
1247
  prefix?: string | undefined;
1753
- stripLevels?: number | undefined;
1248
+ stripDuplicates?: boolean | undefined;
1249
+ collection?: string | undefined;
1754
1250
  }, {
1755
- properties?: string[] | undefined;
1756
- custom?: Record<string, string> | undefined;
1757
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1758
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1251
+ source: string;
1252
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1759
1253
  prefix?: string | undefined;
1760
- stripLevels?: number | undefined;
1254
+ stripDuplicates?: boolean | undefined;
1255
+ collection?: string | undefined;
1761
1256
  }>, z.ZodArray<z.ZodObject<{
1762
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1763
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1764
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1257
+ source: z.ZodString;
1258
+ directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full", "all"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full", "all"]>, "many">]>>;
1765
1259
  prefix: z.ZodOptional<z.ZodString>;
1766
- stripLevels: z.ZodOptional<z.ZodNumber>;
1767
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1260
+ stripDuplicates: z.ZodOptional<z.ZodBoolean>;
1261
+ collection: z.ZodOptional<z.ZodString>;
1768
1262
  }, "strip", z.ZodTypeAny, {
1769
- properties?: string[] | undefined;
1770
- custom?: Record<string, string> | undefined;
1771
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1772
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1263
+ source: string;
1264
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1773
1265
  prefix?: string | undefined;
1774
- stripLevels?: number | undefined;
1266
+ stripDuplicates?: boolean | undefined;
1267
+ collection?: string | undefined;
1775
1268
  }, {
1776
- properties?: string[] | undefined;
1777
- custom?: Record<string, string> | undefined;
1778
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1779
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1269
+ source: string;
1270
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1780
1271
  prefix?: string | undefined;
1781
- stripLevels?: number | undefined;
1782
- }>, "many">]>, "strip">>>;
1783
- components: z.ZodOptional<z.ZodObject<{
1784
- framework: z.ZodOptional<z.ZodEnum<["react", "astro"]>>;
1785
- installed: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1786
- }, "strip", z.ZodTypeAny, {
1787
- framework?: "react" | "astro" | undefined;
1788
- installed?: string[] | undefined;
1789
- }, {
1790
- framework?: "react" | "astro" | undefined;
1791
- installed?: string[] | undefined;
1792
- }>>;
1793
- plugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1272
+ stripDuplicates?: boolean | undefined;
1273
+ collection?: string | undefined;
1274
+ }>, "many">]>>>;
1794
1275
  }, "strip", z.ZodTypeAny, {
1795
- tokens: {
1276
+ output: {
1277
+ components: string;
1278
+ css: string;
1279
+ separate: boolean;
1280
+ };
1281
+ transforms: {
1282
+ fluid: {
1283
+ min: number;
1284
+ max: number;
1285
+ };
1286
+ colorFallbackStrategy: "native" | "polyfill";
1287
+ };
1288
+ tokens?: {
1796
1289
  source: string[];
1797
1290
  themes?: Record<string, string[]> | undefined;
1798
1291
  } | Record<string, {
1799
1292
  source: string[];
1800
1293
  themes?: Record<string, string[]> | undefined;
1801
- }>;
1802
- utilities?: z.objectOutputType<{
1803
- core: z.ZodOptional<z.ZodBoolean>;
1804
- }, z.ZodUnion<[z.ZodObject<{
1805
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1806
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1807
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1808
- prefix: z.ZodOptional<z.ZodString>;
1809
- stripLevels: z.ZodOptional<z.ZodNumber>;
1810
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1811
- }, "strip", z.ZodTypeAny, {
1812
- properties?: string[] | undefined;
1813
- custom?: Record<string, string> | undefined;
1814
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1815
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1816
- prefix?: string | undefined;
1817
- stripLevels?: number | undefined;
1818
- }, {
1819
- properties?: string[] | undefined;
1820
- custom?: Record<string, string> | undefined;
1821
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1822
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1823
- prefix?: string | undefined;
1824
- stripLevels?: number | undefined;
1825
- }>, z.ZodArray<z.ZodObject<{
1826
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1827
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1828
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1829
- prefix: z.ZodOptional<z.ZodString>;
1830
- stripLevels: z.ZodOptional<z.ZodNumber>;
1831
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1832
- }, "strip", z.ZodTypeAny, {
1833
- properties?: string[] | undefined;
1834
- custom?: Record<string, string> | undefined;
1835
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1836
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1837
- prefix?: string | undefined;
1838
- stripLevels?: number | undefined;
1839
- }, {
1840
- properties?: string[] | undefined;
1841
- custom?: Record<string, string> | undefined;
1842
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1843
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1844
- prefix?: string | undefined;
1845
- stripLevels?: number | undefined;
1846
- }>, "many">]>, "strip"> | undefined;
1847
- output?: {
1848
- tokens?: string | undefined;
1849
- css?: string | undefined;
1850
- components?: string | undefined;
1851
- separate?: boolean | undefined;
1852
- } | undefined;
1853
- transforms?: {
1854
- prefix?: string | undefined;
1855
- fluid?: {
1294
+ }> | undefined;
1295
+ utilities?: Record<string, {
1296
+ source: string;
1297
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1298
+ prefix?: string | undefined;
1299
+ stripDuplicates?: boolean | undefined;
1300
+ collection?: string | undefined;
1301
+ } | {
1302
+ source: string;
1303
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1304
+ prefix?: string | undefined;
1305
+ stripDuplicates?: boolean | undefined;
1306
+ collection?: string | undefined;
1307
+ }[]> | undefined;
1308
+ }, {
1309
+ output: {
1310
+ components: string;
1311
+ css: string;
1312
+ separate: boolean;
1313
+ };
1314
+ transforms: {
1315
+ fluid: {
1856
1316
  min: number;
1857
1317
  max: number;
1858
- } | undefined;
1859
- colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | "hsla" | "oklch" | "p3" | undefined;
1860
- } | undefined;
1861
- components?: {
1862
- framework?: "react" | "astro" | undefined;
1863
- installed?: string[] | undefined;
1864
- } | undefined;
1865
- plugins?: string[] | undefined;
1866
- }, {
1867
- tokens: {
1318
+ };
1319
+ colorFallbackStrategy: "native" | "polyfill";
1320
+ };
1321
+ tokens?: {
1868
1322
  source: string[];
1869
1323
  themes?: Record<string, string[]> | undefined;
1870
1324
  } | Record<string, {
1871
1325
  source: string[];
1872
1326
  themes?: Record<string, string[]> | undefined;
1873
- }>;
1874
- utilities?: z.objectInputType<{
1875
- core: z.ZodOptional<z.ZodBoolean>;
1876
- }, z.ZodUnion<[z.ZodObject<{
1877
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1878
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1879
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1880
- prefix: z.ZodOptional<z.ZodString>;
1881
- stripLevels: z.ZodOptional<z.ZodNumber>;
1882
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1883
- }, "strip", z.ZodTypeAny, {
1884
- properties?: string[] | undefined;
1885
- custom?: Record<string, string> | undefined;
1886
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1887
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1888
- prefix?: string | undefined;
1889
- stripLevels?: number | undefined;
1890
- }, {
1891
- properties?: string[] | undefined;
1892
- custom?: Record<string, string> | undefined;
1893
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1894
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1895
- prefix?: string | undefined;
1896
- stripLevels?: number | undefined;
1897
- }>, z.ZodArray<z.ZodObject<{
1898
- typeMap: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "dimension", "fluidDimension", "duration", "cubicBezier", "fontFamily", "fontWeight", "number", "border", "shadow", "gradient", "transition", "strokeStyle"]>, z.ZodArray<z.ZodString, "many">>>;
1899
- directions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, z.ZodArray<z.ZodEnum<["top", "right", "bottom", "left", "x", "y", "full"]>, "many">]>>;
1900
- properties: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1901
- prefix: z.ZodOptional<z.ZodString>;
1902
- stripLevels: z.ZodOptional<z.ZodNumber>;
1903
- custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1904
- }, "strip", z.ZodTypeAny, {
1905
- properties?: string[] | undefined;
1906
- custom?: Record<string, string> | undefined;
1907
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1908
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1909
- prefix?: string | undefined;
1910
- stripLevels?: number | undefined;
1911
- }, {
1912
- properties?: string[] | undefined;
1913
- custom?: Record<string, string> | undefined;
1914
- typeMap?: Partial<Record<"number" | "color" | "dimension" | "fluidDimension" | "duration" | "cubicBezier" | "fontFamily" | "fontWeight" | "border" | "shadow" | "gradient" | "transition" | "strokeStyle", string[]>> | undefined;
1915
- directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full")[] | undefined;
1916
- prefix?: string | undefined;
1917
- stripLevels?: number | undefined;
1918
- }>, "many">]>, "strip"> | undefined;
1919
- output?: {
1920
- tokens?: string | undefined;
1921
- css?: string | undefined;
1922
- components?: string | undefined;
1923
- separate?: boolean | undefined;
1924
- } | undefined;
1925
- transforms?: {
1926
- prefix?: string | undefined;
1927
- fluid?: {
1928
- min: number;
1929
- max: number;
1930
- } | undefined;
1931
- colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | "hsla" | "oklch" | "p3" | undefined;
1932
- } | undefined;
1933
- components?: {
1934
- framework?: "react" | "astro" | undefined;
1935
- installed?: string[] | undefined;
1936
- } | undefined;
1937
- plugins?: string[] | undefined;
1327
+ }> | undefined;
1328
+ utilities?: Record<string, {
1329
+ source: string;
1330
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1331
+ prefix?: string | undefined;
1332
+ stripDuplicates?: boolean | undefined;
1333
+ collection?: string | undefined;
1334
+ } | {
1335
+ source: string;
1336
+ directions?: "top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all" | ("top" | "right" | "bottom" | "left" | "x" | "y" | "full" | "all")[] | undefined;
1337
+ prefix?: string | undefined;
1338
+ stripDuplicates?: boolean | undefined;
1339
+ collection?: string | undefined;
1340
+ }[]> | undefined;
1938
1341
  }>;
1939
1342
 
1940
- export { type CSSFileOutput, DEFAULT_CONFIG, DEFAULT_DESIGN_TOKENS_PATH, DEFAULT_STYLES_PATH, DEFAULT_UTILITIES_FILENAME, DEFAULT_VARIABLES_FILENAME, GLOBAL_DIR, Instrumentation, type LoadConfigResult, type OutputConfig, type PipelineResult, type ResolvedToken, type ResolvedTokens, SUGARCUBE_CONFIG_FILE, SUGARCUBE_FILE, type SugarcubeConfig, TOKENS_FILE_SUFFIX, type TokenCollection, type TokenCollections, type TokenLoader, type TokenPipelineSource, type TokenTree, UTILITIES_DIR, type UserConfig, type UserOutputConfig, type UtilitiesConfig, type UtilityDefinition, VARIABLES_FILE_SUFFIX, configSchema, discoverAllFiles, generateCSSUtilityClasses, generateCSSVariables, generateIndex, generateIndexContent, getTokenPathsFromConfig, internalConfigSchema, loadConfig, normalizeConfig, parseAndValidateConfig, shouldRegenerateIndex, tokenProcessingPipeline, userConfigSchema, validateConfig, writeCSSUtilitiesToDisk, writeCSSVariablesToDisk };
1343
+ /**
1344
+ * Type guards for configuration objects.
1345
+ * Functions to check the structure and type of configuration data.
1346
+ */
1347
+ /**
1348
+ * Type guard to check if tokens is a single collection.
1349
+ *
1350
+ * @param tokens - The tokens configuration to check
1351
+ * @returns True if tokens is a single collection, false if it's multiple collections
1352
+ *
1353
+ * @example
1354
+ * if (isSingleCollection(config.tokens)) {
1355
+ * // config.tokens is TokenCollection
1356
+ * } else {
1357
+ * // config.tokens is TokenCollections
1358
+ * }
1359
+ */
1360
+ declare function isSingleCollection(tokens: TokenCollection | TokenCollections): tokens is TokenCollection;
1361
+
1362
+ declare function isResolvedToken(token: unknown): token is ResolvedToken;
1363
+ declare function isResolvedTokenOfType<T extends TokenType>(token: unknown, type: T): token is ResolvedToken<T>;
1364
+
1365
+ export { type ArbitraryUtilityValue, type CSSFileOutput, type Candidate, DEFAULT_COLLECTION, DEFAULT_CONFIG, DEFAULT_DESIGN_TOKENS_PATH, DEFAULT_STYLES_PATH, DEFAULT_THEME, DEFAULT_UTILITIES_FILENAME, DEFAULT_VARIABLES_FILENAME, ErrorMessages, type FunctionalCandidate, type FunctionalVariant, GLOBAL_DIR, Instrumentation, type InternalConfig, type LoadedConfig, type NamedUtilityValue, type NormalizedConvertedTokens, type OutputConfig, type PipelineResult, type ResolvedToken, type ResolvedTokens, SUGARCUBE_CONFIG_FILE, SUGARCUBE_FILE, type StaticCandidate, type StaticUtilityPattern, type StaticVariant, type TokenCollection, type TokenCollections, type TokenLoader, type TokenPipelineSource, type TokenTree, UTILITIES_DIR, type UserConfig, type UserOutputConfig, type UtilitiesConfig, type UtilityValue, VARIABLES_FILE_SUFFIX, type Variant, configFileExists, convertConfigToUnoRules, discoverAllFiles, fillDefaults, findConfigFile, generateCSSVariables, generateIndex, generateIndexContent, internalConfigSchema, isResolvedToken, isResolvedTokenOfType, isSingleCollection, loadAndResolveTokens, loadInternalConfig, loadTSConfig, loadUserConfig, parseAndValidateConfig, processAndConvertTokens, shouldRegenerateIndex, userConfigSchema, validateConfig, validateInternalConfig, validateUserConfig, writeCSSUtilitiesToDisk, writeCSSVariablesToDisk };