@dsai-io/tools 0.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +438 -186
  2. package/bin/dsai-tools.mjs +13 -13
  3. package/dist/cli/index.cjs +8192 -2757
  4. package/dist/cli/index.cjs.map +1 -1
  5. package/dist/cli/index.d.cts +4 -0
  6. package/dist/cli/index.d.ts +4 -0
  7. package/dist/cli/index.js +8190 -2757
  8. package/dist/cli/index.js.map +1 -1
  9. package/dist/config/index.cjs +264 -63
  10. package/dist/config/index.cjs.map +1 -1
  11. package/dist/config/index.d.cts +537 -1759
  12. package/dist/config/index.d.ts +537 -1759
  13. package/dist/config/index.js +259 -63
  14. package/dist/config/index.js.map +1 -1
  15. package/dist/icons/index.cjs +1 -1
  16. package/dist/icons/index.cjs.map +1 -1
  17. package/dist/icons/index.d.cts +1 -1
  18. package/dist/icons/index.d.ts +1 -1
  19. package/dist/icons/index.js +1 -1
  20. package/dist/icons/index.js.map +1 -1
  21. package/dist/index.cjs +8093 -3024
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +214 -5
  24. package/dist/index.d.ts +214 -5
  25. package/dist/index.js +8033 -3012
  26. package/dist/index.js.map +1 -1
  27. package/dist/tokens/index.cjs +4457 -737
  28. package/dist/tokens/index.cjs.map +1 -1
  29. package/dist/tokens/index.d.cts +1258 -17
  30. package/dist/tokens/index.d.ts +1258 -17
  31. package/dist/tokens/index.js +4368 -683
  32. package/dist/tokens/index.js.map +1 -1
  33. package/dist/{types-Idj08nad.d.cts → types-CtE9f0G0.d.cts} +293 -3
  34. package/dist/{types-Idj08nad.d.ts → types-CtE9f0G0.d.ts} +293 -3
  35. package/dist/utils/circuit-breaker.cjs +173 -0
  36. package/dist/utils/circuit-breaker.cjs.map +1 -0
  37. package/dist/utils/circuit-breaker.d.cts +123 -0
  38. package/dist/utils/circuit-breaker.d.ts +123 -0
  39. package/dist/utils/circuit-breaker.js +169 -0
  40. package/dist/utils/circuit-breaker.js.map +1 -0
  41. package/package.json +102 -97
  42. package/templates/.dsairc.json +37 -37
  43. package/templates/dsai-config.schema.json +618 -554
  44. package/templates/dsai.config.mjs +281 -221
@@ -1,554 +1,618 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://dsai.dev/schemas/dsai-config.schema.json",
4
- "title": "DSAI Configuration",
5
- "description": "Configuration schema for @dsai-io/tools - Design System AI toolkit",
6
- "type": "object",
7
- "properties": {
8
- "$schema": {
9
- "type": "string",
10
- "description": "JSON Schema reference"
11
- },
12
- "extends": {
13
- "anyOf": [
14
- {
15
- "type": "string"
16
- },
17
- {
18
- "type": "array",
19
- "items": {
20
- "type": "string"
21
- }
22
- }
23
- ]
24
- },
25
- "global": {
26
- "type": "object",
27
- "properties": {
28
- "logLevel": {
29
- "type": "string",
30
- "enum": ["silent", "error", "warn", "info", "debug", "verbose"],
31
- "default": "info"
32
- },
33
- "colors": {
34
- "type": "boolean",
35
- "default": true
36
- },
37
- "ci": {
38
- "type": "boolean",
39
- "default": false
40
- },
41
- "dryRun": {
42
- "type": "boolean",
43
- "default": false
44
- },
45
- "cwd": {
46
- "type": "string"
47
- },
48
- "configPath": {
49
- "type": "string"
50
- },
51
- "framework": {
52
- "type": "string",
53
- "enum": ["react", "vue", "angular", "svelte", "vanilla"]
54
- },
55
- "build": {
56
- "type": "object",
57
- "properties": {
58
- "outDir": {
59
- "type": "string",
60
- "default": "dist"
61
- },
62
- "clean": {
63
- "type": "boolean",
64
- "default": true
65
- },
66
- "sourcemap": {
67
- "type": "boolean",
68
- "default": false
69
- },
70
- "minify": {
71
- "type": "boolean",
72
- "default": true
73
- },
74
- "parallel": {
75
- "type": "boolean",
76
- "default": true
77
- },
78
- "maxConcurrency": {
79
- "type": "number",
80
- "default": 4
81
- }
82
- },
83
- "additionalProperties": false
84
- }
85
- },
86
- "additionalProperties": false
87
- },
88
- "tokens": {
89
- "type": "object",
90
- "properties": {
91
- "enabled": {
92
- "type": "boolean",
93
- "default": true
94
- },
95
- "sourcePatterns": {
96
- "type": "array",
97
- "items": {
98
- "type": "string"
99
- },
100
- "default": ["src/tokens/**/*.json", "src/tokens/**/*.yaml"]
101
- },
102
- "outputDirs": {
103
- "type": "object",
104
- "properties": {
105
- "css": {
106
- "type": "string",
107
- "default": "dist/css"
108
- },
109
- "scss": {
110
- "type": "string",
111
- "default": "dist/scss"
112
- },
113
- "less": {
114
- "type": "string",
115
- "default": "dist/less"
116
- },
117
- "js": {
118
- "type": "string",
119
- "default": "dist/js"
120
- },
121
- "ts": {
122
- "type": "string",
123
- "default": "dist/ts"
124
- },
125
- "json": {
126
- "type": "string",
127
- "default": "dist/json"
128
- }
129
- },
130
- "additionalProperties": false
131
- },
132
- "additionalScssDirectories": {
133
- "type": "array",
134
- "items": {
135
- "type": "string"
136
- },
137
- "default": []
138
- },
139
- "outputFileNames": {
140
- "type": "object",
141
- "properties": {
142
- "variables": {
143
- "type": "string",
144
- "default": "variables"
145
- },
146
- "utilities": {
147
- "type": "string",
148
- "default": "utilities"
149
- },
150
- "mixins": {
151
- "type": "string",
152
- "default": "mixins"
153
- },
154
- "tokens": {
155
- "type": "string",
156
- "default": "tokens"
157
- }
158
- },
159
- "additionalProperties": false
160
- },
161
- "prefix": {
162
- "type": "string",
163
- "default": "dsai"
164
- },
165
- "mergeOrder": {
166
- "type": "array",
167
- "items": {
168
- "type": "string"
169
- },
170
- "default": ["base", "semantic", "component"]
171
- },
172
- "createBundle": {
173
- "type": "boolean",
174
- "default": true
175
- },
176
- "bundleFileName": {
177
- "type": "string",
178
- "default": "bundle"
179
- },
180
- "formats": {
181
- "type": "array",
182
- "items": {
183
- "type": "string",
184
- "enum": ["css", "scss", "less", "json", "js", "ts", "esm", "cjs"]
185
- },
186
- "default": ["css", "scss", "json"]
187
- },
188
- "platforms": {
189
- "type": "object",
190
- "additionalProperties": {
191
- "type": "object",
192
- "properties": {
193
- "format": {
194
- "type": "string",
195
- "enum": ["css", "scss", "less", "json", "js", "ts", "esm", "cjs"]
196
- },
197
- "outputDir": {
198
- "type": "string"
199
- },
200
- "outputFileName": {
201
- "type": "string"
202
- },
203
- "fileExtension": {
204
- "type": "string"
205
- },
206
- "prefix": {
207
- "type": "string"
208
- },
209
- "useVariables": {
210
- "type": "boolean"
211
- },
212
- "selector": {
213
- "type": "string"
214
- },
215
- "transforms": {
216
- "type": "array",
217
- "items": {
218
- "type": "string"
219
- }
220
- },
221
- "customTransforms": {
222
- "type": "array",
223
- "items": {
224
- "type": "object",
225
- "properties": {
226
- "name": {
227
- "type": "string",
228
- "minLength": 1,
229
- "errorMessage": {
230
- "minLength": "Transform name is required"
231
- }
232
- },
233
- "description": {
234
- "type": "string"
235
- },
236
- "type": {
237
- "type": "string",
238
- "enum": ["value", "attribute", "name"],
239
- "default": "value"
240
- }
241
- },
242
- "required": ["name"],
243
- "additionalProperties": false
244
- }
245
- },
246
- "header": {
247
- "type": "string"
248
- },
249
- "footer": {
250
- "type": "string"
251
- }
252
- },
253
- "required": ["format"],
254
- "additionalProperties": false
255
- }
256
- },
257
- "transforms": {
258
- "type": "array",
259
- "items": {
260
- "type": "string"
261
- },
262
- "default": []
263
- },
264
- "customTransforms": {
265
- "type": "array",
266
- "items": {
267
- "type": "object",
268
- "properties": {
269
- "name": {
270
- "type": "string",
271
- "minLength": 1,
272
- "errorMessage": {
273
- "minLength": "Transform name is required"
274
- }
275
- },
276
- "description": {
277
- "type": "string"
278
- },
279
- "type": {
280
- "type": "string",
281
- "enum": ["value", "attribute", "name"],
282
- "default": "value"
283
- }
284
- },
285
- "required": ["name"],
286
- "additionalProperties": false
287
- },
288
- "default": []
289
- },
290
- "customFormats": {
291
- "type": "array",
292
- "items": {
293
- "type": "object",
294
- "properties": {
295
- "name": {
296
- "type": "string",
297
- "minLength": 1,
298
- "errorMessage": {
299
- "minLength": "Format name is required"
300
- }
301
- },
302
- "description": {
303
- "type": "string"
304
- },
305
- "extension": {
306
- "type": "string",
307
- "minLength": 1
308
- }
309
- },
310
- "required": ["name"],
311
- "additionalProperties": false
312
- },
313
- "default": []
314
- },
315
- "hooks": {
316
- "type": "object",
317
- "properties": {},
318
- "additionalProperties": false
319
- },
320
- "cache": {
321
- "type": "object",
322
- "properties": {
323
- "enabled": {
324
- "type": "boolean",
325
- "default": true
326
- },
327
- "directory": {
328
- "type": "string",
329
- "default": ".cache"
330
- },
331
- "hashType": {
332
- "type": "string",
333
- "enum": ["content", "timestamp", "version", "none"],
334
- "default": "content"
335
- },
336
- "maxAge": {
337
- "type": "number",
338
- "default": 86400000
339
- }
340
- },
341
- "additionalProperties": false
342
- },
343
- "watch": {
344
- "type": "object",
345
- "properties": {
346
- "enabled": {
347
- "type": "boolean",
348
- "default": false
349
- },
350
- "debounce": {
351
- "type": "number",
352
- "default": 300
353
- },
354
- "clearScreen": {
355
- "type": "boolean",
356
- "default": true
357
- },
358
- "ignorePatterns": {
359
- "type": "array",
360
- "items": {
361
- "type": "string"
362
- },
363
- "default": []
364
- }
365
- },
366
- "additionalProperties": false
367
- },
368
- "verbose": {
369
- "type": "boolean",
370
- "default": false
371
- }
372
- },
373
- "additionalProperties": false
374
- },
375
- "themes": {
376
- "type": "object",
377
- "properties": {
378
- "enabled": {
379
- "type": "boolean",
380
- "default": true
381
- },
382
- "defaultMode": {
383
- "type": "string",
384
- "enum": ["light", "dark", "system"],
385
- "default": "light"
386
- },
387
- "modes": {
388
- "type": "object",
389
- "additionalProperties": {
390
- "type": "object",
391
- "properties": {
392
- "selector": {
393
- "type": "string",
394
- "minLength": 1,
395
- "errorMessage": {
396
- "minLength": "Theme selector is required"
397
- }
398
- },
399
- "mediaQuery": {
400
- "type": "string"
401
- },
402
- "dataAttribute": {
403
- "type": "string"
404
- },
405
- "cssVariables": {
406
- "type": "boolean",
407
- "default": true
408
- },
409
- "generateSeparateFiles": {
410
- "type": "boolean",
411
- "default": false
412
- },
413
- "prefix": {
414
- "type": "string"
415
- }
416
- },
417
- "required": ["selector"],
418
- "additionalProperties": false
419
- },
420
- "default": {
421
- "light": {
422
- "selector": ":root",
423
- "cssVariables": true,
424
- "generateSeparateFiles": false
425
- },
426
- "dark": {
427
- "selector": "[data-theme=\"dark\"]",
428
- "mediaQuery": "(prefers-color-scheme: dark)",
429
- "cssVariables": true,
430
- "generateSeparateFiles": false
431
- }
432
- }
433
- },
434
- "outputFileName": {
435
- "type": "string",
436
- "default": "themes"
437
- },
438
- "colorScheme": {
439
- "type": "object",
440
- "properties": {
441
- "light": {
442
- "type": "string"
443
- },
444
- "dark": {
445
- "type": "string"
446
- }
447
- },
448
- "additionalProperties": false
449
- }
450
- },
451
- "additionalProperties": false
452
- },
453
- "icons": {
454
- "type": "object",
455
- "properties": {
456
- "enabled": {
457
- "type": "boolean",
458
- "default": true
459
- },
460
- "sourceDir": {
461
- "type": "string",
462
- "default": "assets/icons"
463
- },
464
- "outputDir": {
465
- "type": "string",
466
- "default": "dist/icons"
467
- },
468
- "formats": {
469
- "type": "array",
470
- "items": {
471
- "type": "string",
472
- "enum": ["svg", "react", "vue", "sprite", "font"]
473
- },
474
- "default": ["svg"]
475
- },
476
- "optimization": {
477
- "type": "object",
478
- "properties": {
479
- "enabled": {
480
- "type": "boolean",
481
- "default": true
482
- },
483
- "removeComments": {
484
- "type": "boolean",
485
- "default": true
486
- },
487
- "removeDimensions": {
488
- "type": "boolean",
489
- "default": false
490
- },
491
- "removeViewBox": {
492
- "type": "boolean",
493
- "default": false
494
- },
495
- "removeXMLNS": {
496
- "type": "boolean",
497
- "default": true
498
- },
499
- "cleanupIds": {
500
- "type": "boolean",
501
- "default": true
502
- },
503
- "minify": {
504
- "type": "boolean",
505
- "default": true
506
- }
507
- },
508
- "additionalProperties": false
509
- },
510
- "sprite": {
511
- "type": "object",
512
- "properties": {
513
- "enabled": {
514
- "type": "boolean",
515
- "default": true
516
- },
517
- "fileName": {
518
- "type": "string",
519
- "default": "icons"
520
- },
521
- "format": {
522
- "type": "string",
523
- "enum": ["symbol", "stack", "css"],
524
- "default": "symbol"
525
- },
526
- "prefix": {
527
- "type": "string",
528
- "default": "icon-"
529
- }
530
- },
531
- "additionalProperties": false
532
- },
533
- "componentPrefix": {
534
- "type": "string",
535
- "default": "Icon"
536
- },
537
- "componentSuffix": {
538
- "type": "string",
539
- "default": ""
540
- },
541
- "generateIndex": {
542
- "type": "boolean",
543
- "default": true
544
- },
545
- "generateTypes": {
546
- "type": "boolean",
547
- "default": true
548
- }
549
- },
550
- "additionalProperties": false
551
- }
552
- },
553
- "additionalProperties": false
554
- }
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://dsai.dev/schemas/dsai-config.schema.json",
4
+ "title": "DSAI Configuration",
5
+ "description": "Configuration schema for @dsai-io/tools - Design System AI toolkit",
6
+ "type": "object",
7
+ "properties": {
8
+ "$schema": {
9
+ "type": "string",
10
+ "description": "JSON Schema reference"
11
+ },
12
+ "extends": {
13
+ "anyOf": [
14
+ {
15
+ "type": "string"
16
+ },
17
+ {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "string"
21
+ }
22
+ }
23
+ ]
24
+ },
25
+ "global": {
26
+ "type": "object",
27
+ "properties": {
28
+ "logLevel": {
29
+ "type": "string",
30
+ "enum": ["silent", "error", "warn", "info", "debug", "verbose"],
31
+ "default": "info"
32
+ },
33
+ "colors": {
34
+ "type": "boolean",
35
+ "default": true
36
+ },
37
+ "ci": {
38
+ "type": "boolean",
39
+ "default": false
40
+ },
41
+ "dryRun": {
42
+ "type": "boolean",
43
+ "default": false
44
+ },
45
+ "cwd": {
46
+ "type": "string"
47
+ },
48
+ "configPath": {
49
+ "type": "string"
50
+ },
51
+ "framework": {
52
+ "type": "string",
53
+ "enum": ["react", "vue", "angular", "svelte", "vanilla"]
54
+ },
55
+ "build": {
56
+ "type": "object",
57
+ "properties": {
58
+ "outDir": {
59
+ "type": "string",
60
+ "default": "dist"
61
+ },
62
+ "clean": {
63
+ "type": "boolean",
64
+ "default": true
65
+ },
66
+ "sourcemap": {
67
+ "type": "boolean",
68
+ "default": false
69
+ },
70
+ "minify": {
71
+ "type": "boolean",
72
+ "default": true
73
+ },
74
+ "parallel": {
75
+ "type": "boolean",
76
+ "default": true
77
+ },
78
+ "maxConcurrency": {
79
+ "type": "number",
80
+ "default": 4
81
+ }
82
+ },
83
+ "additionalProperties": false
84
+ }
85
+ },
86
+ "additionalProperties": false
87
+ },
88
+ "tokens": {
89
+ "type": "object",
90
+ "properties": {
91
+ "enabled": {
92
+ "type": "boolean",
93
+ "default": true
94
+ },
95
+ "sourcePatterns": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "string"
99
+ },
100
+ "default": ["src/tokens/**/*.json", "src/tokens/**/*.yaml"]
101
+ },
102
+ "outputDirs": {
103
+ "type": "object",
104
+ "properties": {
105
+ "css": {
106
+ "type": "string",
107
+ "default": "dist/css"
108
+ },
109
+ "scss": {
110
+ "type": "string",
111
+ "default": "dist/scss"
112
+ },
113
+ "less": {
114
+ "type": "string",
115
+ "default": "dist/less"
116
+ },
117
+ "js": {
118
+ "type": "string",
119
+ "default": "dist/js"
120
+ },
121
+ "ts": {
122
+ "type": "string",
123
+ "default": "dist/ts"
124
+ },
125
+ "json": {
126
+ "type": "string",
127
+ "default": "dist/json"
128
+ }
129
+ },
130
+ "additionalProperties": false
131
+ },
132
+ "additionalScssDirectories": {
133
+ "type": "array",
134
+ "items": {
135
+ "type": "string"
136
+ },
137
+ "default": []
138
+ },
139
+ "outputFileNames": {
140
+ "type": "object",
141
+ "properties": {
142
+ "variables": {
143
+ "type": "string",
144
+ "default": "variables"
145
+ },
146
+ "utilities": {
147
+ "type": "string",
148
+ "default": "utilities"
149
+ },
150
+ "mixins": {
151
+ "type": "string",
152
+ "default": "mixins"
153
+ },
154
+ "tokens": {
155
+ "type": "string",
156
+ "default": "tokens"
157
+ }
158
+ },
159
+ "additionalProperties": false
160
+ },
161
+ "prefix": {
162
+ "type": "string",
163
+ "default": "dsai"
164
+ },
165
+ "mergeOrder": {
166
+ "type": "array",
167
+ "items": {
168
+ "type": "string"
169
+ },
170
+ "default": ["base", "semantic", "component"]
171
+ },
172
+ "createBundle": {
173
+ "type": "boolean",
174
+ "default": true
175
+ },
176
+ "bundleFileName": {
177
+ "type": "string",
178
+ "default": "bundle"
179
+ },
180
+ "formats": {
181
+ "type": "array",
182
+ "items": {
183
+ "type": "string",
184
+ "enum": ["css", "scss", "less", "json", "js", "ts", "esm", "cjs"]
185
+ },
186
+ "default": ["css", "scss", "json"]
187
+ },
188
+ "platforms": {
189
+ "type": "object",
190
+ "additionalProperties": {
191
+ "type": "object",
192
+ "properties": {
193
+ "format": {
194
+ "type": "string",
195
+ "enum": ["css", "scss", "less", "json", "js", "ts", "esm", "cjs"]
196
+ },
197
+ "outputDir": {
198
+ "type": "string"
199
+ },
200
+ "outputFileName": {
201
+ "type": "string"
202
+ },
203
+ "fileExtension": {
204
+ "type": "string"
205
+ },
206
+ "prefix": {
207
+ "type": "string"
208
+ },
209
+ "useVariables": {
210
+ "type": "boolean"
211
+ },
212
+ "selector": {
213
+ "type": "string"
214
+ },
215
+ "transforms": {
216
+ "type": "array",
217
+ "items": {
218
+ "type": "string"
219
+ }
220
+ },
221
+ "customTransforms": {
222
+ "type": "array",
223
+ "items": {
224
+ "type": "object",
225
+ "properties": {
226
+ "name": {
227
+ "type": "string",
228
+ "minLength": 1,
229
+ "errorMessage": {
230
+ "minLength": "Transform name is required"
231
+ }
232
+ },
233
+ "description": {
234
+ "type": "string"
235
+ },
236
+ "type": {
237
+ "type": "string",
238
+ "enum": ["value", "attribute", "name"],
239
+ "default": "value"
240
+ }
241
+ },
242
+ "required": ["name"],
243
+ "additionalProperties": false
244
+ }
245
+ },
246
+ "header": {
247
+ "type": "string"
248
+ },
249
+ "footer": {
250
+ "type": "string"
251
+ }
252
+ },
253
+ "required": ["format"],
254
+ "additionalProperties": false
255
+ }
256
+ },
257
+ "transforms": {
258
+ "type": "array",
259
+ "items": {
260
+ "type": "string"
261
+ },
262
+ "default": []
263
+ },
264
+ "customTransforms": {
265
+ "type": "array",
266
+ "items": {
267
+ "type": "object",
268
+ "properties": {
269
+ "name": {
270
+ "type": "string",
271
+ "minLength": 1,
272
+ "errorMessage": {
273
+ "minLength": "Transform name is required"
274
+ }
275
+ },
276
+ "description": {
277
+ "type": "string"
278
+ },
279
+ "type": {
280
+ "type": "string",
281
+ "enum": ["value", "attribute", "name"],
282
+ "default": "value"
283
+ }
284
+ },
285
+ "required": ["name"],
286
+ "additionalProperties": false
287
+ },
288
+ "default": []
289
+ },
290
+ "customFormats": {
291
+ "type": "array",
292
+ "items": {
293
+ "type": "object",
294
+ "properties": {
295
+ "name": {
296
+ "type": "string",
297
+ "minLength": 1,
298
+ "errorMessage": {
299
+ "minLength": "Format name is required"
300
+ }
301
+ },
302
+ "description": {
303
+ "type": "string"
304
+ },
305
+ "extension": {
306
+ "type": "string",
307
+ "minLength": 1
308
+ }
309
+ },
310
+ "required": ["name"],
311
+ "additionalProperties": false
312
+ },
313
+ "default": []
314
+ },
315
+ "hooks": {
316
+ "type": "object",
317
+ "properties": {},
318
+ "additionalProperties": false
319
+ },
320
+ "cache": {
321
+ "type": "object",
322
+ "properties": {
323
+ "enabled": {
324
+ "type": "boolean",
325
+ "default": true
326
+ },
327
+ "directory": {
328
+ "type": "string",
329
+ "default": ".cache"
330
+ },
331
+ "hashType": {
332
+ "type": "string",
333
+ "enum": ["content", "timestamp", "version", "none"],
334
+ "default": "content"
335
+ },
336
+ "maxAge": {
337
+ "type": "number",
338
+ "default": 86400000
339
+ }
340
+ },
341
+ "additionalProperties": false
342
+ },
343
+ "watch": {
344
+ "type": "object",
345
+ "properties": {
346
+ "enabled": {
347
+ "type": "boolean",
348
+ "default": false
349
+ },
350
+ "debounce": {
351
+ "type": "number",
352
+ "default": 300
353
+ },
354
+ "clearScreen": {
355
+ "type": "boolean",
356
+ "default": true
357
+ },
358
+ "ignorePatterns": {
359
+ "type": "array",
360
+ "items": {
361
+ "type": "string"
362
+ },
363
+ "default": []
364
+ }
365
+ },
366
+ "additionalProperties": false
367
+ },
368
+ "verbose": {
369
+ "type": "boolean",
370
+ "default": false
371
+ }
372
+ },
373
+ "additionalProperties": false
374
+ },
375
+ "themes": {
376
+ "type": "object",
377
+ "properties": {
378
+ "enabled": {
379
+ "type": "boolean",
380
+ "default": true
381
+ },
382
+ "defaultMode": {
383
+ "type": "string",
384
+ "enum": ["light", "dark", "system"],
385
+ "default": "light"
386
+ },
387
+ "modes": {
388
+ "type": "object",
389
+ "additionalProperties": {
390
+ "type": "object",
391
+ "properties": {
392
+ "selector": {
393
+ "type": "string",
394
+ "minLength": 1,
395
+ "errorMessage": {
396
+ "minLength": "Theme selector is required"
397
+ }
398
+ },
399
+ "mediaQuery": {
400
+ "type": "string"
401
+ },
402
+ "dataAttribute": {
403
+ "type": "string"
404
+ },
405
+ "cssVariables": {
406
+ "type": "boolean",
407
+ "default": true
408
+ },
409
+ "generateSeparateFiles": {
410
+ "type": "boolean",
411
+ "default": false
412
+ },
413
+ "prefix": {
414
+ "type": "string"
415
+ }
416
+ },
417
+ "required": ["selector"],
418
+ "additionalProperties": false
419
+ },
420
+ "default": {
421
+ "light": {
422
+ "selector": ":root",
423
+ "cssVariables": true,
424
+ "generateSeparateFiles": false
425
+ },
426
+ "dark": {
427
+ "selector": "[data-theme=\"dark\"]",
428
+ "mediaQuery": "(prefers-color-scheme: dark)",
429
+ "cssVariables": true,
430
+ "generateSeparateFiles": false
431
+ }
432
+ }
433
+ },
434
+ "outputFileName": {
435
+ "type": "string",
436
+ "default": "themes"
437
+ },
438
+ "colorScheme": {
439
+ "type": "object",
440
+ "properties": {
441
+ "light": {
442
+ "type": "string"
443
+ },
444
+ "dark": {
445
+ "type": "string"
446
+ }
447
+ },
448
+ "additionalProperties": false
449
+ }
450
+ },
451
+ "additionalProperties": false
452
+ },
453
+ "icons": {
454
+ "type": "object",
455
+ "properties": {
456
+ "enabled": {
457
+ "type": "boolean",
458
+ "default": true
459
+ },
460
+ "sourceDir": {
461
+ "type": "string",
462
+ "default": "assets/icons"
463
+ },
464
+ "outputDir": {
465
+ "type": "string",
466
+ "default": "dist/icons"
467
+ },
468
+ "formats": {
469
+ "type": "array",
470
+ "items": {
471
+ "type": "string",
472
+ "enum": ["svg", "react", "vue", "sprite", "font"]
473
+ },
474
+ "default": ["svg"]
475
+ },
476
+ "optimization": {
477
+ "type": "object",
478
+ "properties": {
479
+ "enabled": {
480
+ "type": "boolean",
481
+ "default": true
482
+ },
483
+ "removeComments": {
484
+ "type": "boolean",
485
+ "default": true
486
+ },
487
+ "removeDimensions": {
488
+ "type": "boolean",
489
+ "default": false
490
+ },
491
+ "removeViewBox": {
492
+ "type": "boolean",
493
+ "default": false
494
+ },
495
+ "removeXMLNS": {
496
+ "type": "boolean",
497
+ "default": true
498
+ },
499
+ "cleanupIds": {
500
+ "type": "boolean",
501
+ "default": true
502
+ },
503
+ "minify": {
504
+ "type": "boolean",
505
+ "default": true
506
+ }
507
+ },
508
+ "additionalProperties": false
509
+ },
510
+ "sprite": {
511
+ "type": "object",
512
+ "properties": {
513
+ "enabled": {
514
+ "type": "boolean",
515
+ "default": true
516
+ },
517
+ "fileName": {
518
+ "type": "string",
519
+ "default": "icons"
520
+ },
521
+ "format": {
522
+ "type": "string",
523
+ "enum": ["symbol", "stack", "css"],
524
+ "default": "symbol"
525
+ },
526
+ "prefix": {
527
+ "type": "string",
528
+ "default": "icon-"
529
+ }
530
+ },
531
+ "additionalProperties": false
532
+ },
533
+ "componentPrefix": {
534
+ "type": "string",
535
+ "default": "Icon"
536
+ },
537
+ "componentSuffix": {
538
+ "type": "string",
539
+ "default": ""
540
+ },
541
+ "generateIndex": {
542
+ "type": "boolean",
543
+ "default": true
544
+ },
545
+ "generateTypes": {
546
+ "type": "boolean",
547
+ "default": true
548
+ }
549
+ },
550
+ "additionalProperties": false
551
+ },
552
+ "aliases": {
553
+ "type": "object",
554
+ "description": "Path aliases for component installation. Controls where `dsai add` writes files.",
555
+ "properties": {
556
+ "importAlias": {
557
+ "type": "string",
558
+ "default": "@/",
559
+ "description": "Import alias prefix used in tsconfig paths (e.g., \"@/\", \"~/\", \"@dsai/\")"
560
+ },
561
+ "ui": {
562
+ "type": "string",
563
+ "default": "src/components/ui",
564
+ "description": "Where UI components are installed"
565
+ },
566
+ "hooks": {
567
+ "type": "string",
568
+ "default": "src/hooks",
569
+ "description": "Where shared hooks are installed"
570
+ },
571
+ "utils": {
572
+ "type": "string",
573
+ "default": "src/lib/utils",
574
+ "description": "Where utility functions are installed"
575
+ },
576
+ "components": {
577
+ "type": "string",
578
+ "default": "src/components",
579
+ "description": "Where higher-level composed components go"
580
+ },
581
+ "lib": {
582
+ "type": "string",
583
+ "default": "src/lib",
584
+ "description": "Where lib files go"
585
+ }
586
+ },
587
+ "additionalProperties": false
588
+ },
589
+ "components": {
590
+ "type": "object",
591
+ "description": "Configuration for component distribution (shadcn-style).",
592
+ "properties": {
593
+ "enabled": {
594
+ "type": "boolean",
595
+ "default": true,
596
+ "description": "Enable component distribution features"
597
+ },
598
+ "registryUrl": {
599
+ "type": "string",
600
+ "default": "https://registry.dsai.dev",
601
+ "description": "Registry URL or local path for component resolution"
602
+ },
603
+ "tsx": {
604
+ "type": "boolean",
605
+ "default": true,
606
+ "description": "Whether to use TypeScript (.tsx) or JavaScript (.jsx)"
607
+ },
608
+ "overwrite": {
609
+ "type": "boolean",
610
+ "default": false,
611
+ "description": "Overwrite existing files when adding components"
612
+ }
613
+ },
614
+ "additionalProperties": false
615
+ }
616
+ },
617
+ "additionalProperties": false
618
+ }