@sxl-studio/token-transformer 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/README.en.md +77 -608
  2. package/README.md +77 -685
  3. package/config/sxl-transform.config.yaml +120 -0
  4. package/dist/cli.d.ts +1 -1
  5. package/dist/cli.js +411 -141
  6. package/dist/cli.js.map +1 -1
  7. package/dist/config/loader.d.ts +6 -0
  8. package/dist/config/loader.js +160 -0
  9. package/dist/config/loader.js.map +1 -0
  10. package/dist/config/schema.d.ts +847 -0
  11. package/dist/config/schema.js +123 -0
  12. package/dist/config/schema.js.map +1 -0
  13. package/dist/core/color-modifiers.d.ts +31 -0
  14. package/dist/core/color-modifiers.js +289 -0
  15. package/dist/core/color-modifiers.js.map +1 -0
  16. package/dist/core/color-parser.d.ts +24 -0
  17. package/dist/core/color-parser.js +281 -0
  18. package/dist/core/color-parser.js.map +1 -0
  19. package/dist/core/debug-report.d.ts +11 -0
  20. package/dist/core/debug-report.js +161 -0
  21. package/dist/core/debug-report.js.map +1 -0
  22. package/dist/core/incremental.d.ts +18 -0
  23. package/dist/core/incremental.js +105 -0
  24. package/dist/core/incremental.js.map +1 -0
  25. package/dist/core/math.d.ts +3 -0
  26. package/dist/core/math.js +261 -0
  27. package/dist/core/math.js.map +1 -0
  28. package/dist/core/parser.d.ts +4 -3
  29. package/dist/core/parser.js +68 -172
  30. package/dist/core/parser.js.map +1 -1
  31. package/dist/core/resolver.d.ts +26 -0
  32. package/dist/core/resolver.js +431 -0
  33. package/dist/core/resolver.js.map +1 -0
  34. package/dist/core/token-loader.d.ts +11 -0
  35. package/dist/core/token-loader.js +380 -0
  36. package/dist/core/token-loader.js.map +1 -0
  37. package/dist/core/token-parser.d.ts +9 -0
  38. package/dist/core/token-parser.js +138 -0
  39. package/dist/core/token-parser.js.map +1 -0
  40. package/dist/core/token-types.d.ts +7 -0
  41. package/dist/core/token-types.js +132 -0
  42. package/dist/core/token-types.js.map +1 -0
  43. package/dist/core/types.d.ts +154 -63
  44. package/dist/core/writer.d.ts +18 -5
  45. package/dist/core/writer.js +545 -91
  46. package/dist/core/writer.js.map +1 -1
  47. package/dist/emit/css.d.ts +2 -0
  48. package/dist/emit/css.js +538 -0
  49. package/dist/emit/css.js.map +1 -0
  50. package/dist/emit/kotlin.d.ts +2 -0
  51. package/dist/emit/kotlin.js +406 -0
  52. package/dist/emit/kotlin.js.map +1 -0
  53. package/dist/emit/shared.d.ts +13 -0
  54. package/dist/emit/shared.js +127 -0
  55. package/dist/emit/shared.js.map +1 -0
  56. package/dist/emit/swift.d.ts +2 -0
  57. package/dist/emit/swift.js +432 -0
  58. package/dist/emit/swift.js.map +1 -0
  59. package/dist/emit/typography.d.ts +17 -0
  60. package/dist/emit/typography.js +132 -0
  61. package/dist/emit/typography.js.map +1 -0
  62. package/dist/emit/xml.d.ts +2 -0
  63. package/dist/emit/xml.js +311 -0
  64. package/dist/emit/xml.js.map +1 -0
  65. package/dist/index.d.ts +15 -6
  66. package/dist/index.js +13 -5
  67. package/dist/index.js.map +1 -1
  68. package/dist/transformers/css.d.ts +1 -1
  69. package/dist/transformers/css.js +13 -482
  70. package/dist/transformers/css.js.map +1 -1
  71. package/dist/transformers/kotlin.d.ts +2 -2
  72. package/dist/transformers/kotlin.js +14 -442
  73. package/dist/transformers/kotlin.js.map +1 -1
  74. package/dist/transformers/swiftui.d.ts +2 -2
  75. package/dist/transformers/swiftui.js +14 -433
  76. package/dist/transformers/swiftui.js.map +1 -1
  77. package/dist/utils/color.d.ts +7 -5
  78. package/dist/utils/color.js +90 -86
  79. package/dist/utils/color.js.map +1 -1
  80. package/dist/utils/dimension.d.ts +8 -5
  81. package/dist/utils/dimension.js +54 -52
  82. package/dist/utils/dimension.js.map +1 -1
  83. package/dist/utils/naming.d.ts +10 -12
  84. package/dist/utils/naming.js +102 -44
  85. package/dist/utils/naming.js.map +1 -1
  86. package/package.json +30 -10
  87. package/config.example.json +0 -45
  88. package/dist/core/loader.d.ts +0 -8
  89. package/dist/core/loader.js +0 -105
  90. package/dist/core/loader.js.map +0 -1
  91. package/dist/transformers/vue3.d.ts +0 -28
  92. package/dist/transformers/vue3.js +0 -534
  93. package/dist/transformers/vue3.js.map +0 -1
@@ -0,0 +1,847 @@
1
+ import { z } from "zod";
2
+ export declare const PlatformSchema: z.ZodEnum<["css", "swift", "kotlin", "xml"]>;
3
+ export declare const CollisionStrategySchema: z.ZodEnum<["error", "suffix", "namespace-by-file", "namespace-by-mode"]>;
4
+ export declare const UnsupportedTypeActionSchema: z.ZodEnum<["skip", "warn", "error"]>;
5
+ export declare const UnresolvedAliasActionSchema: z.ZodEnum<["error", "warn", "ignore"]>;
6
+ export declare const SourceSchema: z.ZodObject<{
7
+ tokenDir: z.ZodString;
8
+ configFile: z.ZodDefault<z.ZodString>;
9
+ include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
10
+ exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
11
+ }, "strict", z.ZodTypeAny, {
12
+ tokenDir: string;
13
+ configFile: string;
14
+ include: string[];
15
+ exclude: string[];
16
+ }, {
17
+ tokenDir: string;
18
+ configFile?: string | undefined;
19
+ include?: string[] | undefined;
20
+ exclude?: string[] | undefined;
21
+ }>;
22
+ export declare const TokenSetSelectorSchema: z.ZodEffects<z.ZodObject<{
23
+ collection: z.ZodOptional<z.ZodString>;
24
+ mode: z.ZodOptional<z.ZodString>;
25
+ files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
26
+ include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
27
+ exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
28
+ includeRefs: z.ZodDefault<z.ZodBoolean>;
29
+ refModeMap: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
30
+ }, "strict", z.ZodTypeAny, {
31
+ exclude: string[];
32
+ includeRefs: boolean;
33
+ refModeMap: Record<string, string>;
34
+ include?: string[] | undefined;
35
+ collection?: string | undefined;
36
+ mode?: string | undefined;
37
+ files?: string[] | undefined;
38
+ }, {
39
+ include?: string[] | undefined;
40
+ exclude?: string[] | undefined;
41
+ collection?: string | undefined;
42
+ mode?: string | undefined;
43
+ files?: string[] | undefined;
44
+ includeRefs?: boolean | undefined;
45
+ refModeMap?: Record<string, string> | undefined;
46
+ }>, {
47
+ exclude: string[];
48
+ includeRefs: boolean;
49
+ refModeMap: Record<string, string>;
50
+ include?: string[] | undefined;
51
+ collection?: string | undefined;
52
+ mode?: string | undefined;
53
+ files?: string[] | undefined;
54
+ }, {
55
+ include?: string[] | undefined;
56
+ exclude?: string[] | undefined;
57
+ collection?: string | undefined;
58
+ mode?: string | undefined;
59
+ files?: string[] | undefined;
60
+ includeRefs?: boolean | undefined;
61
+ refModeMap?: Record<string, string> | undefined;
62
+ }>;
63
+ export declare const TokenSetSchema: z.ZodObject<{
64
+ id: z.ZodString;
65
+ selectors: z.ZodArray<z.ZodEffects<z.ZodObject<{
66
+ collection: z.ZodOptional<z.ZodString>;
67
+ mode: z.ZodOptional<z.ZodString>;
68
+ files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
69
+ include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
70
+ exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
71
+ includeRefs: z.ZodDefault<z.ZodBoolean>;
72
+ refModeMap: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
73
+ }, "strict", z.ZodTypeAny, {
74
+ exclude: string[];
75
+ includeRefs: boolean;
76
+ refModeMap: Record<string, string>;
77
+ include?: string[] | undefined;
78
+ collection?: string | undefined;
79
+ mode?: string | undefined;
80
+ files?: string[] | undefined;
81
+ }, {
82
+ include?: string[] | undefined;
83
+ exclude?: string[] | undefined;
84
+ collection?: string | undefined;
85
+ mode?: string | undefined;
86
+ files?: string[] | undefined;
87
+ includeRefs?: boolean | undefined;
88
+ refModeMap?: Record<string, string> | undefined;
89
+ }>, {
90
+ exclude: string[];
91
+ includeRefs: boolean;
92
+ refModeMap: Record<string, string>;
93
+ include?: string[] | undefined;
94
+ collection?: string | undefined;
95
+ mode?: string | undefined;
96
+ files?: string[] | undefined;
97
+ }, {
98
+ include?: string[] | undefined;
99
+ exclude?: string[] | undefined;
100
+ collection?: string | undefined;
101
+ mode?: string | undefined;
102
+ files?: string[] | undefined;
103
+ includeRefs?: boolean | undefined;
104
+ refModeMap?: Record<string, string> | undefined;
105
+ }>, "many">;
106
+ unresolvedAliases: z.ZodDefault<z.ZodEnum<["error", "warn", "ignore"]>>;
107
+ }, "strict", z.ZodTypeAny, {
108
+ id: string;
109
+ selectors: {
110
+ exclude: string[];
111
+ includeRefs: boolean;
112
+ refModeMap: Record<string, string>;
113
+ include?: string[] | undefined;
114
+ collection?: string | undefined;
115
+ mode?: string | undefined;
116
+ files?: string[] | undefined;
117
+ }[];
118
+ unresolvedAliases: "error" | "warn" | "ignore";
119
+ }, {
120
+ id: string;
121
+ selectors: {
122
+ include?: string[] | undefined;
123
+ exclude?: string[] | undefined;
124
+ collection?: string | undefined;
125
+ mode?: string | undefined;
126
+ files?: string[] | undefined;
127
+ includeRefs?: boolean | undefined;
128
+ refModeMap?: Record<string, string> | undefined;
129
+ }[];
130
+ unresolvedAliases?: "error" | "warn" | "ignore" | undefined;
131
+ }>;
132
+ export declare const TokenFilterSchema: z.ZodObject<{
133
+ types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
134
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
135
+ excludePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
136
+ }, "strict", z.ZodTypeAny, {
137
+ types?: string[] | undefined;
138
+ paths?: string[] | undefined;
139
+ excludePaths?: string[] | undefined;
140
+ }, {
141
+ types?: string[] | undefined;
142
+ paths?: string[] | undefined;
143
+ excludePaths?: string[] | undefined;
144
+ }>;
145
+ export declare const SplitBySourceFileSchema: z.ZodObject<{
146
+ include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
147
+ exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
148
+ outputPattern: z.ZodString;
149
+ prefixPattern: z.ZodOptional<z.ZodString>;
150
+ }, "strict", z.ZodTypeAny, {
151
+ include: string[];
152
+ exclude: string[];
153
+ outputPattern: string;
154
+ prefixPattern?: string | undefined;
155
+ }, {
156
+ outputPattern: string;
157
+ include?: string[] | undefined;
158
+ exclude?: string[] | undefined;
159
+ prefixPattern?: string | undefined;
160
+ }>;
161
+ export declare const OutputFileSchema: z.ZodEffects<z.ZodObject<{
162
+ tokenSet: z.ZodString;
163
+ output: z.ZodOptional<z.ZodString>;
164
+ prefix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
165
+ filter: z.ZodOptional<z.ZodObject<{
166
+ types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
167
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
168
+ excludePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
169
+ }, "strict", z.ZodTypeAny, {
170
+ types?: string[] | undefined;
171
+ paths?: string[] | undefined;
172
+ excludePaths?: string[] | undefined;
173
+ }, {
174
+ types?: string[] | undefined;
175
+ paths?: string[] | undefined;
176
+ excludePaths?: string[] | undefined;
177
+ }>>;
178
+ splitBySourceFile: z.ZodOptional<z.ZodObject<{
179
+ include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
180
+ exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
181
+ outputPattern: z.ZodString;
182
+ prefixPattern: z.ZodOptional<z.ZodString>;
183
+ }, "strict", z.ZodTypeAny, {
184
+ include: string[];
185
+ exclude: string[];
186
+ outputPattern: string;
187
+ prefixPattern?: string | undefined;
188
+ }, {
189
+ outputPattern: string;
190
+ include?: string[] | undefined;
191
+ exclude?: string[] | undefined;
192
+ prefixPattern?: string | undefined;
193
+ }>>;
194
+ }, "strict", z.ZodTypeAny, {
195
+ tokenSet: string;
196
+ filter?: {
197
+ types?: string[] | undefined;
198
+ paths?: string[] | undefined;
199
+ excludePaths?: string[] | undefined;
200
+ } | undefined;
201
+ output?: string | undefined;
202
+ prefix?: string | null | undefined;
203
+ splitBySourceFile?: {
204
+ include: string[];
205
+ exclude: string[];
206
+ outputPattern: string;
207
+ prefixPattern?: string | undefined;
208
+ } | undefined;
209
+ }, {
210
+ tokenSet: string;
211
+ filter?: {
212
+ types?: string[] | undefined;
213
+ paths?: string[] | undefined;
214
+ excludePaths?: string[] | undefined;
215
+ } | undefined;
216
+ output?: string | undefined;
217
+ prefix?: string | null | undefined;
218
+ splitBySourceFile?: {
219
+ outputPattern: string;
220
+ include?: string[] | undefined;
221
+ exclude?: string[] | undefined;
222
+ prefixPattern?: string | undefined;
223
+ } | undefined;
224
+ }>, {
225
+ tokenSet: string;
226
+ filter?: {
227
+ types?: string[] | undefined;
228
+ paths?: string[] | undefined;
229
+ excludePaths?: string[] | undefined;
230
+ } | undefined;
231
+ output?: string | undefined;
232
+ prefix?: string | null | undefined;
233
+ splitBySourceFile?: {
234
+ include: string[];
235
+ exclude: string[];
236
+ outputPattern: string;
237
+ prefixPattern?: string | undefined;
238
+ } | undefined;
239
+ }, {
240
+ tokenSet: string;
241
+ filter?: {
242
+ types?: string[] | undefined;
243
+ paths?: string[] | undefined;
244
+ excludePaths?: string[] | undefined;
245
+ } | undefined;
246
+ output?: string | undefined;
247
+ prefix?: string | null | undefined;
248
+ splitBySourceFile?: {
249
+ outputPattern: string;
250
+ include?: string[] | undefined;
251
+ exclude?: string[] | undefined;
252
+ prefixPattern?: string | undefined;
253
+ } | undefined;
254
+ }>;
255
+ export declare const OutputSchema: z.ZodObject<{
256
+ id: z.ZodString;
257
+ platform: z.ZodEnum<["css", "swift", "kotlin", "xml"]>;
258
+ outputDir: z.ZodString;
259
+ prefix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
260
+ resolveAliases: z.ZodOptional<z.ZodBoolean>;
261
+ splitEffects: z.ZodOptional<z.ZodBoolean>;
262
+ showDescriptions: z.ZodOptional<z.ZodBoolean>;
263
+ files: z.ZodArray<z.ZodEffects<z.ZodObject<{
264
+ tokenSet: z.ZodString;
265
+ output: z.ZodOptional<z.ZodString>;
266
+ prefix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
267
+ filter: z.ZodOptional<z.ZodObject<{
268
+ types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
269
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
270
+ excludePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
271
+ }, "strict", z.ZodTypeAny, {
272
+ types?: string[] | undefined;
273
+ paths?: string[] | undefined;
274
+ excludePaths?: string[] | undefined;
275
+ }, {
276
+ types?: string[] | undefined;
277
+ paths?: string[] | undefined;
278
+ excludePaths?: string[] | undefined;
279
+ }>>;
280
+ splitBySourceFile: z.ZodOptional<z.ZodObject<{
281
+ include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
282
+ exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
283
+ outputPattern: z.ZodString;
284
+ prefixPattern: z.ZodOptional<z.ZodString>;
285
+ }, "strict", z.ZodTypeAny, {
286
+ include: string[];
287
+ exclude: string[];
288
+ outputPattern: string;
289
+ prefixPattern?: string | undefined;
290
+ }, {
291
+ outputPattern: string;
292
+ include?: string[] | undefined;
293
+ exclude?: string[] | undefined;
294
+ prefixPattern?: string | undefined;
295
+ }>>;
296
+ }, "strict", z.ZodTypeAny, {
297
+ tokenSet: string;
298
+ filter?: {
299
+ types?: string[] | undefined;
300
+ paths?: string[] | undefined;
301
+ excludePaths?: string[] | undefined;
302
+ } | undefined;
303
+ output?: string | undefined;
304
+ prefix?: string | null | undefined;
305
+ splitBySourceFile?: {
306
+ include: string[];
307
+ exclude: string[];
308
+ outputPattern: string;
309
+ prefixPattern?: string | undefined;
310
+ } | undefined;
311
+ }, {
312
+ tokenSet: string;
313
+ filter?: {
314
+ types?: string[] | undefined;
315
+ paths?: string[] | undefined;
316
+ excludePaths?: string[] | undefined;
317
+ } | undefined;
318
+ output?: string | undefined;
319
+ prefix?: string | null | undefined;
320
+ splitBySourceFile?: {
321
+ outputPattern: string;
322
+ include?: string[] | undefined;
323
+ exclude?: string[] | undefined;
324
+ prefixPattern?: string | undefined;
325
+ } | undefined;
326
+ }>, {
327
+ tokenSet: string;
328
+ filter?: {
329
+ types?: string[] | undefined;
330
+ paths?: string[] | undefined;
331
+ excludePaths?: string[] | undefined;
332
+ } | undefined;
333
+ output?: string | undefined;
334
+ prefix?: string | null | undefined;
335
+ splitBySourceFile?: {
336
+ include: string[];
337
+ exclude: string[];
338
+ outputPattern: string;
339
+ prefixPattern?: string | undefined;
340
+ } | undefined;
341
+ }, {
342
+ tokenSet: string;
343
+ filter?: {
344
+ types?: string[] | undefined;
345
+ paths?: string[] | undefined;
346
+ excludePaths?: string[] | undefined;
347
+ } | undefined;
348
+ output?: string | undefined;
349
+ prefix?: string | null | undefined;
350
+ splitBySourceFile?: {
351
+ outputPattern: string;
352
+ include?: string[] | undefined;
353
+ exclude?: string[] | undefined;
354
+ prefixPattern?: string | undefined;
355
+ } | undefined;
356
+ }>, "many">;
357
+ options: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
358
+ }, "strict", z.ZodTypeAny, {
359
+ options: Record<string, unknown>;
360
+ files: {
361
+ tokenSet: string;
362
+ filter?: {
363
+ types?: string[] | undefined;
364
+ paths?: string[] | undefined;
365
+ excludePaths?: string[] | undefined;
366
+ } | undefined;
367
+ output?: string | undefined;
368
+ prefix?: string | null | undefined;
369
+ splitBySourceFile?: {
370
+ include: string[];
371
+ exclude: string[];
372
+ outputPattern: string;
373
+ prefixPattern?: string | undefined;
374
+ } | undefined;
375
+ }[];
376
+ id: string;
377
+ platform: "css" | "swift" | "kotlin" | "xml";
378
+ outputDir: string;
379
+ prefix?: string | null | undefined;
380
+ resolveAliases?: boolean | undefined;
381
+ splitEffects?: boolean | undefined;
382
+ showDescriptions?: boolean | undefined;
383
+ }, {
384
+ files: {
385
+ tokenSet: string;
386
+ filter?: {
387
+ types?: string[] | undefined;
388
+ paths?: string[] | undefined;
389
+ excludePaths?: string[] | undefined;
390
+ } | undefined;
391
+ output?: string | undefined;
392
+ prefix?: string | null | undefined;
393
+ splitBySourceFile?: {
394
+ outputPattern: string;
395
+ include?: string[] | undefined;
396
+ exclude?: string[] | undefined;
397
+ prefixPattern?: string | undefined;
398
+ } | undefined;
399
+ }[];
400
+ id: string;
401
+ platform: "css" | "swift" | "kotlin" | "xml";
402
+ outputDir: string;
403
+ options?: Record<string, unknown> | undefined;
404
+ prefix?: string | null | undefined;
405
+ resolveAliases?: boolean | undefined;
406
+ splitEffects?: boolean | undefined;
407
+ showDescriptions?: boolean | undefined;
408
+ }>;
409
+ export declare const UnsupportedTypesSchema: z.ZodObject<{
410
+ default: z.ZodDefault<z.ZodEnum<["skip", "warn", "error"]>>;
411
+ types: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEnum<["skip", "warn", "error"]>>>;
412
+ }, "strict", z.ZodTypeAny, {
413
+ types: Record<string, "error" | "skip" | "warn">;
414
+ default: "error" | "skip" | "warn";
415
+ }, {
416
+ types?: Record<string, "error" | "skip" | "warn"> | undefined;
417
+ default?: "error" | "skip" | "warn" | undefined;
418
+ }>;
419
+ export declare const OptionsSchema: z.ZodObject<{
420
+ remBase: z.ZodDefault<z.ZodNumber>;
421
+ collisionStrategy: z.ZodDefault<z.ZodEnum<["error", "suffix", "namespace-by-file", "namespace-by-mode"]>>;
422
+ unsupportedTypes: z.ZodDefault<z.ZodObject<{
423
+ default: z.ZodDefault<z.ZodEnum<["skip", "warn", "error"]>>;
424
+ types: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEnum<["skip", "warn", "error"]>>>;
425
+ }, "strict", z.ZodTypeAny, {
426
+ types: Record<string, "error" | "skip" | "warn">;
427
+ default: "error" | "skip" | "warn";
428
+ }, {
429
+ types?: Record<string, "error" | "skip" | "warn"> | undefined;
430
+ default?: "error" | "skip" | "warn" | undefined;
431
+ }>>;
432
+ maxAliasDepth: z.ZodDefault<z.ZodNumber>;
433
+ }, "strict", z.ZodTypeAny, {
434
+ remBase: number;
435
+ collisionStrategy: "error" | "suffix" | "namespace-by-file" | "namespace-by-mode";
436
+ unsupportedTypes: {
437
+ types: Record<string, "error" | "skip" | "warn">;
438
+ default: "error" | "skip" | "warn";
439
+ };
440
+ maxAliasDepth: number;
441
+ }, {
442
+ remBase?: number | undefined;
443
+ collisionStrategy?: "error" | "suffix" | "namespace-by-file" | "namespace-by-mode" | undefined;
444
+ unsupportedTypes?: {
445
+ types?: Record<string, "error" | "skip" | "warn"> | undefined;
446
+ default?: "error" | "skip" | "warn" | undefined;
447
+ } | undefined;
448
+ maxAliasDepth?: number | undefined;
449
+ }>;
450
+ export declare const TransformerConfigSchema: z.ZodObject<{
451
+ version: z.ZodLiteral<1>;
452
+ source: z.ZodObject<{
453
+ tokenDir: z.ZodString;
454
+ configFile: z.ZodDefault<z.ZodString>;
455
+ include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
456
+ exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
457
+ }, "strict", z.ZodTypeAny, {
458
+ tokenDir: string;
459
+ configFile: string;
460
+ include: string[];
461
+ exclude: string[];
462
+ }, {
463
+ tokenDir: string;
464
+ configFile?: string | undefined;
465
+ include?: string[] | undefined;
466
+ exclude?: string[] | undefined;
467
+ }>;
468
+ options: z.ZodDefault<z.ZodObject<{
469
+ remBase: z.ZodDefault<z.ZodNumber>;
470
+ collisionStrategy: z.ZodDefault<z.ZodEnum<["error", "suffix", "namespace-by-file", "namespace-by-mode"]>>;
471
+ unsupportedTypes: z.ZodDefault<z.ZodObject<{
472
+ default: z.ZodDefault<z.ZodEnum<["skip", "warn", "error"]>>;
473
+ types: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEnum<["skip", "warn", "error"]>>>;
474
+ }, "strict", z.ZodTypeAny, {
475
+ types: Record<string, "error" | "skip" | "warn">;
476
+ default: "error" | "skip" | "warn";
477
+ }, {
478
+ types?: Record<string, "error" | "skip" | "warn"> | undefined;
479
+ default?: "error" | "skip" | "warn" | undefined;
480
+ }>>;
481
+ maxAliasDepth: z.ZodDefault<z.ZodNumber>;
482
+ }, "strict", z.ZodTypeAny, {
483
+ remBase: number;
484
+ collisionStrategy: "error" | "suffix" | "namespace-by-file" | "namespace-by-mode";
485
+ unsupportedTypes: {
486
+ types: Record<string, "error" | "skip" | "warn">;
487
+ default: "error" | "skip" | "warn";
488
+ };
489
+ maxAliasDepth: number;
490
+ }, {
491
+ remBase?: number | undefined;
492
+ collisionStrategy?: "error" | "suffix" | "namespace-by-file" | "namespace-by-mode" | undefined;
493
+ unsupportedTypes?: {
494
+ types?: Record<string, "error" | "skip" | "warn"> | undefined;
495
+ default?: "error" | "skip" | "warn" | undefined;
496
+ } | undefined;
497
+ maxAliasDepth?: number | undefined;
498
+ }>>;
499
+ tokenSets: z.ZodArray<z.ZodObject<{
500
+ id: z.ZodString;
501
+ selectors: z.ZodArray<z.ZodEffects<z.ZodObject<{
502
+ collection: z.ZodOptional<z.ZodString>;
503
+ mode: z.ZodOptional<z.ZodString>;
504
+ files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
505
+ include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
506
+ exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
507
+ includeRefs: z.ZodDefault<z.ZodBoolean>;
508
+ refModeMap: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
509
+ }, "strict", z.ZodTypeAny, {
510
+ exclude: string[];
511
+ includeRefs: boolean;
512
+ refModeMap: Record<string, string>;
513
+ include?: string[] | undefined;
514
+ collection?: string | undefined;
515
+ mode?: string | undefined;
516
+ files?: string[] | undefined;
517
+ }, {
518
+ include?: string[] | undefined;
519
+ exclude?: string[] | undefined;
520
+ collection?: string | undefined;
521
+ mode?: string | undefined;
522
+ files?: string[] | undefined;
523
+ includeRefs?: boolean | undefined;
524
+ refModeMap?: Record<string, string> | undefined;
525
+ }>, {
526
+ exclude: string[];
527
+ includeRefs: boolean;
528
+ refModeMap: Record<string, string>;
529
+ include?: string[] | undefined;
530
+ collection?: string | undefined;
531
+ mode?: string | undefined;
532
+ files?: string[] | undefined;
533
+ }, {
534
+ include?: string[] | undefined;
535
+ exclude?: string[] | undefined;
536
+ collection?: string | undefined;
537
+ mode?: string | undefined;
538
+ files?: string[] | undefined;
539
+ includeRefs?: boolean | undefined;
540
+ refModeMap?: Record<string, string> | undefined;
541
+ }>, "many">;
542
+ unresolvedAliases: z.ZodDefault<z.ZodEnum<["error", "warn", "ignore"]>>;
543
+ }, "strict", z.ZodTypeAny, {
544
+ id: string;
545
+ selectors: {
546
+ exclude: string[];
547
+ includeRefs: boolean;
548
+ refModeMap: Record<string, string>;
549
+ include?: string[] | undefined;
550
+ collection?: string | undefined;
551
+ mode?: string | undefined;
552
+ files?: string[] | undefined;
553
+ }[];
554
+ unresolvedAliases: "error" | "warn" | "ignore";
555
+ }, {
556
+ id: string;
557
+ selectors: {
558
+ include?: string[] | undefined;
559
+ exclude?: string[] | undefined;
560
+ collection?: string | undefined;
561
+ mode?: string | undefined;
562
+ files?: string[] | undefined;
563
+ includeRefs?: boolean | undefined;
564
+ refModeMap?: Record<string, string> | undefined;
565
+ }[];
566
+ unresolvedAliases?: "error" | "warn" | "ignore" | undefined;
567
+ }>, "many">;
568
+ outputs: z.ZodArray<z.ZodObject<{
569
+ id: z.ZodString;
570
+ platform: z.ZodEnum<["css", "swift", "kotlin", "xml"]>;
571
+ outputDir: z.ZodString;
572
+ prefix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
573
+ resolveAliases: z.ZodOptional<z.ZodBoolean>;
574
+ splitEffects: z.ZodOptional<z.ZodBoolean>;
575
+ showDescriptions: z.ZodOptional<z.ZodBoolean>;
576
+ files: z.ZodArray<z.ZodEffects<z.ZodObject<{
577
+ tokenSet: z.ZodString;
578
+ output: z.ZodOptional<z.ZodString>;
579
+ prefix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
580
+ filter: z.ZodOptional<z.ZodObject<{
581
+ types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
582
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
583
+ excludePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
584
+ }, "strict", z.ZodTypeAny, {
585
+ types?: string[] | undefined;
586
+ paths?: string[] | undefined;
587
+ excludePaths?: string[] | undefined;
588
+ }, {
589
+ types?: string[] | undefined;
590
+ paths?: string[] | undefined;
591
+ excludePaths?: string[] | undefined;
592
+ }>>;
593
+ splitBySourceFile: z.ZodOptional<z.ZodObject<{
594
+ include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
595
+ exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
596
+ outputPattern: z.ZodString;
597
+ prefixPattern: z.ZodOptional<z.ZodString>;
598
+ }, "strict", z.ZodTypeAny, {
599
+ include: string[];
600
+ exclude: string[];
601
+ outputPattern: string;
602
+ prefixPattern?: string | undefined;
603
+ }, {
604
+ outputPattern: string;
605
+ include?: string[] | undefined;
606
+ exclude?: string[] | undefined;
607
+ prefixPattern?: string | undefined;
608
+ }>>;
609
+ }, "strict", z.ZodTypeAny, {
610
+ tokenSet: string;
611
+ filter?: {
612
+ types?: string[] | undefined;
613
+ paths?: string[] | undefined;
614
+ excludePaths?: string[] | undefined;
615
+ } | undefined;
616
+ output?: string | undefined;
617
+ prefix?: string | null | undefined;
618
+ splitBySourceFile?: {
619
+ include: string[];
620
+ exclude: string[];
621
+ outputPattern: string;
622
+ prefixPattern?: string | undefined;
623
+ } | undefined;
624
+ }, {
625
+ tokenSet: string;
626
+ filter?: {
627
+ types?: string[] | undefined;
628
+ paths?: string[] | undefined;
629
+ excludePaths?: string[] | undefined;
630
+ } | undefined;
631
+ output?: string | undefined;
632
+ prefix?: string | null | undefined;
633
+ splitBySourceFile?: {
634
+ outputPattern: string;
635
+ include?: string[] | undefined;
636
+ exclude?: string[] | undefined;
637
+ prefixPattern?: string | undefined;
638
+ } | undefined;
639
+ }>, {
640
+ tokenSet: string;
641
+ filter?: {
642
+ types?: string[] | undefined;
643
+ paths?: string[] | undefined;
644
+ excludePaths?: string[] | undefined;
645
+ } | undefined;
646
+ output?: string | undefined;
647
+ prefix?: string | null | undefined;
648
+ splitBySourceFile?: {
649
+ include: string[];
650
+ exclude: string[];
651
+ outputPattern: string;
652
+ prefixPattern?: string | undefined;
653
+ } | undefined;
654
+ }, {
655
+ tokenSet: string;
656
+ filter?: {
657
+ types?: string[] | undefined;
658
+ paths?: string[] | undefined;
659
+ excludePaths?: string[] | undefined;
660
+ } | undefined;
661
+ output?: string | undefined;
662
+ prefix?: string | null | undefined;
663
+ splitBySourceFile?: {
664
+ outputPattern: string;
665
+ include?: string[] | undefined;
666
+ exclude?: string[] | undefined;
667
+ prefixPattern?: string | undefined;
668
+ } | undefined;
669
+ }>, "many">;
670
+ options: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
671
+ }, "strict", z.ZodTypeAny, {
672
+ options: Record<string, unknown>;
673
+ files: {
674
+ tokenSet: string;
675
+ filter?: {
676
+ types?: string[] | undefined;
677
+ paths?: string[] | undefined;
678
+ excludePaths?: string[] | undefined;
679
+ } | undefined;
680
+ output?: string | undefined;
681
+ prefix?: string | null | undefined;
682
+ splitBySourceFile?: {
683
+ include: string[];
684
+ exclude: string[];
685
+ outputPattern: string;
686
+ prefixPattern?: string | undefined;
687
+ } | undefined;
688
+ }[];
689
+ id: string;
690
+ platform: "css" | "swift" | "kotlin" | "xml";
691
+ outputDir: string;
692
+ prefix?: string | null | undefined;
693
+ resolveAliases?: boolean | undefined;
694
+ splitEffects?: boolean | undefined;
695
+ showDescriptions?: boolean | undefined;
696
+ }, {
697
+ files: {
698
+ tokenSet: string;
699
+ filter?: {
700
+ types?: string[] | undefined;
701
+ paths?: string[] | undefined;
702
+ excludePaths?: string[] | undefined;
703
+ } | undefined;
704
+ output?: string | undefined;
705
+ prefix?: string | null | undefined;
706
+ splitBySourceFile?: {
707
+ outputPattern: string;
708
+ include?: string[] | undefined;
709
+ exclude?: string[] | undefined;
710
+ prefixPattern?: string | undefined;
711
+ } | undefined;
712
+ }[];
713
+ id: string;
714
+ platform: "css" | "swift" | "kotlin" | "xml";
715
+ outputDir: string;
716
+ options?: Record<string, unknown> | undefined;
717
+ prefix?: string | null | undefined;
718
+ resolveAliases?: boolean | undefined;
719
+ splitEffects?: boolean | undefined;
720
+ showDescriptions?: boolean | undefined;
721
+ }>, "many">;
722
+ }, "strict", z.ZodTypeAny, {
723
+ options: {
724
+ remBase: number;
725
+ collisionStrategy: "error" | "suffix" | "namespace-by-file" | "namespace-by-mode";
726
+ unsupportedTypes: {
727
+ types: Record<string, "error" | "skip" | "warn">;
728
+ default: "error" | "skip" | "warn";
729
+ };
730
+ maxAliasDepth: number;
731
+ };
732
+ version: 1;
733
+ source: {
734
+ tokenDir: string;
735
+ configFile: string;
736
+ include: string[];
737
+ exclude: string[];
738
+ };
739
+ tokenSets: {
740
+ id: string;
741
+ selectors: {
742
+ exclude: string[];
743
+ includeRefs: boolean;
744
+ refModeMap: Record<string, string>;
745
+ include?: string[] | undefined;
746
+ collection?: string | undefined;
747
+ mode?: string | undefined;
748
+ files?: string[] | undefined;
749
+ }[];
750
+ unresolvedAliases: "error" | "warn" | "ignore";
751
+ }[];
752
+ outputs: {
753
+ options: Record<string, unknown>;
754
+ files: {
755
+ tokenSet: string;
756
+ filter?: {
757
+ types?: string[] | undefined;
758
+ paths?: string[] | undefined;
759
+ excludePaths?: string[] | undefined;
760
+ } | undefined;
761
+ output?: string | undefined;
762
+ prefix?: string | null | undefined;
763
+ splitBySourceFile?: {
764
+ include: string[];
765
+ exclude: string[];
766
+ outputPattern: string;
767
+ prefixPattern?: string | undefined;
768
+ } | undefined;
769
+ }[];
770
+ id: string;
771
+ platform: "css" | "swift" | "kotlin" | "xml";
772
+ outputDir: string;
773
+ prefix?: string | null | undefined;
774
+ resolveAliases?: boolean | undefined;
775
+ splitEffects?: boolean | undefined;
776
+ showDescriptions?: boolean | undefined;
777
+ }[];
778
+ }, {
779
+ version: 1;
780
+ source: {
781
+ tokenDir: string;
782
+ configFile?: string | undefined;
783
+ include?: string[] | undefined;
784
+ exclude?: string[] | undefined;
785
+ };
786
+ tokenSets: {
787
+ id: string;
788
+ selectors: {
789
+ include?: string[] | undefined;
790
+ exclude?: string[] | undefined;
791
+ collection?: string | undefined;
792
+ mode?: string | undefined;
793
+ files?: string[] | undefined;
794
+ includeRefs?: boolean | undefined;
795
+ refModeMap?: Record<string, string> | undefined;
796
+ }[];
797
+ unresolvedAliases?: "error" | "warn" | "ignore" | undefined;
798
+ }[];
799
+ outputs: {
800
+ files: {
801
+ tokenSet: string;
802
+ filter?: {
803
+ types?: string[] | undefined;
804
+ paths?: string[] | undefined;
805
+ excludePaths?: string[] | undefined;
806
+ } | undefined;
807
+ output?: string | undefined;
808
+ prefix?: string | null | undefined;
809
+ splitBySourceFile?: {
810
+ outputPattern: string;
811
+ include?: string[] | undefined;
812
+ exclude?: string[] | undefined;
813
+ prefixPattern?: string | undefined;
814
+ } | undefined;
815
+ }[];
816
+ id: string;
817
+ platform: "css" | "swift" | "kotlin" | "xml";
818
+ outputDir: string;
819
+ options?: Record<string, unknown> | undefined;
820
+ prefix?: string | null | undefined;
821
+ resolveAliases?: boolean | undefined;
822
+ splitEffects?: boolean | undefined;
823
+ showDescriptions?: boolean | undefined;
824
+ }[];
825
+ options?: {
826
+ remBase?: number | undefined;
827
+ collisionStrategy?: "error" | "suffix" | "namespace-by-file" | "namespace-by-mode" | undefined;
828
+ unsupportedTypes?: {
829
+ types?: Record<string, "error" | "skip" | "warn"> | undefined;
830
+ default?: "error" | "skip" | "warn" | undefined;
831
+ } | undefined;
832
+ maxAliasDepth?: number | undefined;
833
+ } | undefined;
834
+ }>;
835
+ export type Platform = z.infer<typeof PlatformSchema>;
836
+ export type CollisionStrategy = z.infer<typeof CollisionStrategySchema>;
837
+ export type UnsupportedTypeAction = z.infer<typeof UnsupportedTypeActionSchema>;
838
+ export type UnresolvedAliasAction = z.infer<typeof UnresolvedAliasActionSchema>;
839
+ export type SourceConfig = z.infer<typeof SourceSchema>;
840
+ export type TokenSetSelectorConfig = z.infer<typeof TokenSetSelectorSchema>;
841
+ export type TokenSetConfig = z.infer<typeof TokenSetSchema>;
842
+ export type TokenFilterConfig = z.infer<typeof TokenFilterSchema>;
843
+ export type OutputFileConfig = z.infer<typeof OutputFileSchema>;
844
+ export type SplitBySourceFileConfig = z.infer<typeof SplitBySourceFileSchema>;
845
+ export type OutputConfig = z.infer<typeof OutputSchema>;
846
+ export type OptionsConfig = z.infer<typeof OptionsSchema>;
847
+ export type TransformerConfig = z.infer<typeof TransformerConfigSchema>;