@shell-shock/plugin-theme 0.4.35 → 0.4.37

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 (111) hide show
  1. package/dist/ansi-utils-BBqikbV-.d.mts +80 -0
  2. package/dist/ansi-utils-BBqikbV-.d.mts.map +1 -0
  3. package/dist/ansi-utils-CY_ghxdQ.d.cts +80 -0
  4. package/dist/ansi-utils-CY_ghxdQ.d.cts.map +1 -0
  5. package/dist/constants-Bs8URqjD.d.cts +12 -0
  6. package/dist/constants-Bs8URqjD.d.cts.map +1 -0
  7. package/dist/constants-Bs8URqjD.d.mts +12 -0
  8. package/dist/constants-Bs8URqjD.d.mts.map +1 -0
  9. package/dist/contexts/theme.cjs +2 -2
  10. package/dist/contexts/theme.d.cts +2 -3
  11. package/dist/contexts/theme.d.cts.map +1 -1
  12. package/dist/contexts/theme.d.mts +2 -3
  13. package/dist/contexts/theme.mjs +1 -1
  14. package/dist/helpers/ansi-utils.d.cts +2 -81
  15. package/dist/helpers/ansi-utils.d.mts +2 -81
  16. package/dist/helpers/border-styles.cjs +10 -13
  17. package/dist/helpers/border-styles.d.cts +1 -2
  18. package/dist/helpers/border-styles.d.cts.map +1 -1
  19. package/dist/helpers/border-styles.d.mts +1 -2
  20. package/dist/helpers/border-styles.mjs +10 -12
  21. package/dist/helpers/constants.cjs +0 -1
  22. package/dist/helpers/constants.d.cts +2 -12
  23. package/dist/helpers/constants.d.mts +2 -12
  24. package/dist/helpers/index.d.cts +2 -2
  25. package/dist/helpers/index.d.mts +2 -2
  26. package/dist/helpers/merge.d.cts +2 -3
  27. package/dist/helpers/merge.d.cts.map +1 -1
  28. package/dist/helpers/merge.d.mts +2 -3
  29. package/dist/helpers/spinners.cjs +0 -1
  30. package/dist/helpers/spinners.d.cts +2 -735
  31. package/dist/helpers/spinners.d.mts +2 -735
  32. package/dist/index.cjs +2292 -51
  33. package/dist/index.d.cts +3 -3
  34. package/dist/index.d.cts.map +1 -1
  35. package/dist/index.d.mts +3 -3
  36. package/dist/index.mjs +2268 -52
  37. package/dist/plugin-D_4VGrBE.d.cts +27 -0
  38. package/dist/plugin-D_4VGrBE.d.cts.map +1 -0
  39. package/dist/plugin-liH648jU.d.mts +27 -0
  40. package/dist/plugin-liH648jU.d.mts.map +1 -0
  41. package/dist/spinners-BB6Z_PUM.d.cts +735 -0
  42. package/dist/spinners-BB6Z_PUM.d.cts.map +1 -0
  43. package/dist/spinners-BB6Z_PUM.d.mts +735 -0
  44. package/dist/spinners-BB6Z_PUM.d.mts.map +1 -0
  45. package/dist/theme-B_q1llDJ.d.mts +417 -0
  46. package/dist/theme-B_q1llDJ.d.mts.map +1 -0
  47. package/dist/theme-C68ywMEZ.d.cts +417 -0
  48. package/dist/theme-C68ywMEZ.d.cts.map +1 -0
  49. package/dist/types/index.cjs +2 -0
  50. package/dist/types/index.d.cts +2 -2
  51. package/dist/types/index.d.mts +2 -2
  52. package/dist/types/index.mjs +3 -0
  53. package/dist/types/plugin.d.cts +2 -29
  54. package/dist/types/plugin.d.mts +2 -28
  55. package/dist/types/theme.d.cts +2 -418
  56. package/dist/types/theme.d.mts +2 -418
  57. package/package.json +16 -14
  58. package/dist/_virtual/_rolldown/runtime.cjs +0 -29
  59. package/dist/_virtual/_rolldown/runtime.mjs +0 -8
  60. package/dist/core/dist/types/command.d.cts +0 -264
  61. package/dist/core/dist/types/command.d.cts.map +0 -1
  62. package/dist/core/dist/types/command.d.mts +0 -8
  63. package/dist/core/dist/types/command.d.mts.map +0 -1
  64. package/dist/core/dist/types/config.d.cts +0 -120
  65. package/dist/core/dist/types/config.d.cts.map +0 -1
  66. package/dist/core/dist/types/config.d.mts +0 -10
  67. package/dist/core/dist/types/config.d.mts.map +0 -1
  68. package/dist/core/dist/types/context.d.cts +0 -29
  69. package/dist/core/dist/types/context.d.cts.map +0 -1
  70. package/dist/core/dist/types/context.d.mts +0 -10
  71. package/dist/core/dist/types/context.d.mts.map +0 -1
  72. package/dist/core/dist/types/env.d.cts +0 -1
  73. package/dist/core/dist/types/env.d.mts +0 -8
  74. package/dist/core/dist/types/env.d.mts.map +0 -1
  75. package/dist/core/dist/types/index.d.cts +0 -3
  76. package/dist/core/dist/types/index.d.mts +0 -12
  77. package/dist/core/dist/types/index.d.mts.map +0 -1
  78. package/dist/helpers/ansi-utils.d.cts.map +0 -1
  79. package/dist/helpers/ansi-utils.d.mts.map +0 -1
  80. package/dist/helpers/constants.d.cts.map +0 -1
  81. package/dist/helpers/constants.d.mts.map +0 -1
  82. package/dist/helpers/spinners.d.cts.map +0 -1
  83. package/dist/helpers/spinners.d.mts.map +0 -1
  84. package/dist/style-dictionary/border-styles.cjs +0 -284
  85. package/dist/style-dictionary/border-styles.mjs +0 -285
  86. package/dist/style-dictionary/border-styles.mjs.map +0 -1
  87. package/dist/style-dictionary/colors.cjs +0 -1390
  88. package/dist/style-dictionary/colors.mjs +0 -1391
  89. package/dist/style-dictionary/colors.mjs.map +0 -1
  90. package/dist/style-dictionary/icons.cjs +0 -168
  91. package/dist/style-dictionary/icons.mjs +0 -169
  92. package/dist/style-dictionary/icons.mjs.map +0 -1
  93. package/dist/style-dictionary/labels.cjs +0 -150
  94. package/dist/style-dictionary/labels.mjs +0 -151
  95. package/dist/style-dictionary/labels.mjs.map +0 -1
  96. package/dist/style-dictionary/padding.cjs +0 -37
  97. package/dist/style-dictionary/padding.mjs +0 -38
  98. package/dist/style-dictionary/padding.mjs.map +0 -1
  99. package/dist/style-dictionary/settings.cjs +0 -25
  100. package/dist/style-dictionary/settings.mjs +0 -26
  101. package/dist/style-dictionary/settings.mjs.map +0 -1
  102. package/dist/style-dictionary/spinners.cjs +0 -30
  103. package/dist/style-dictionary/spinners.mjs +0 -31
  104. package/dist/style-dictionary/spinners.mjs.map +0 -1
  105. package/dist/themes/default.cjs +0 -156
  106. package/dist/themes/default.mjs +0 -156
  107. package/dist/themes/default.mjs.map +0 -1
  108. package/dist/types/plugin.d.cts.map +0 -1
  109. package/dist/types/plugin.d.mts.map +0 -1
  110. package/dist/types/theme.d.cts.map +0 -1
  111. package/dist/types/theme.d.mts.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,64 +1,2280 @@
1
- import { borderStyles } from "./style-dictionary/border-styles.mjs";
2
- import { colors } from "./style-dictionary/colors.mjs";
3
- import { icons } from "./style-dictionary/icons.mjs";
4
- import { labels } from "./style-dictionary/labels.mjs";
5
- import { padding } from "./style-dictionary/padding.mjs";
6
- import { settings } from "./style-dictionary/settings.mjs";
7
- import { spinners } from "./style-dictionary/spinners.mjs";
8
- import { theme } from "./themes/default.mjs";
9
- import styleDictionary from "@powerlines/plugin-style-dictionary";
1
+ import { resolveBorderStyle } from "./helpers/border-styles.mjs";
2
+ import { mergeThemes } from "./helpers/merge.mjs";
3
+ import { resolveSpinner } from "./helpers/spinners.mjs";
4
+ import noopOutput from "@power-plant/noop-output";
5
+ import { plugin as plugin$1 } from "@powerlines/plugin-style-dictionary";
10
6
  import { omit } from "@stryke/helpers/omit";
11
7
  import { isSetObject } from "@stryke/type-checks/is-set-object";
12
- import defu from "defu";
8
+ import { defu } from "defu";
9
+ import { isSetString } from "@stryke/type-checks/is-set-string";
10
+ import { camelCase } from "@stryke/string-format/camel-case";
11
+ import { isNumber } from "@stryke/type-checks/is-number";
13
12
 
13
+ //#region src/style-dictionary/border-styles.ts
14
+ /**
15
+ * Shell Shock - Theme Border Styles Preprocessor
16
+ *
17
+ * @remarks
18
+ * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.
19
+ */
20
+ const borderStyles = (context) => ({
21
+ name: "shell-shock/border-styles",
22
+ preprocessor: (dictionary, _options) => {
23
+ const resolvedConfig = {};
24
+ resolvedConfig.name = dictionary.$theme ?? context.config.name;
25
+ resolvedConfig.borderStyles ??= {
26
+ banner: {
27
+ outline: {},
28
+ divider: {}
29
+ },
30
+ message: {
31
+ outline: {},
32
+ divider: {}
33
+ },
34
+ app: {
35
+ table: {},
36
+ divider: {}
37
+ }
38
+ };
39
+ const borderStyles = dictionary.borderStyles;
40
+ if (isSetString(borderStyles)) {
41
+ const borderStyle = resolveBorderStyle(borderStyles);
42
+ resolvedConfig.borderStyles = {
43
+ banner: {
44
+ outline: {
45
+ primary: borderStyle,
46
+ secondary: borderStyle,
47
+ tertiary: borderStyle
48
+ },
49
+ divider: {
50
+ primary: borderStyle,
51
+ secondary: borderStyle,
52
+ tertiary: borderStyle
53
+ }
54
+ },
55
+ message: {
56
+ outline: {
57
+ help: borderStyle,
58
+ success: borderStyle,
59
+ info: borderStyle,
60
+ debug: borderStyle,
61
+ warning: borderStyle,
62
+ danger: borderStyle,
63
+ error: borderStyle
64
+ },
65
+ divider: {
66
+ help: borderStyle,
67
+ success: borderStyle,
68
+ info: borderStyle,
69
+ debug: borderStyle,
70
+ warning: borderStyle,
71
+ danger: borderStyle,
72
+ error: borderStyle
73
+ }
74
+ },
75
+ app: {
76
+ table: {
77
+ primary: borderStyle,
78
+ secondary: borderStyle,
79
+ tertiary: borderStyle
80
+ },
81
+ divider: {
82
+ primary: borderStyle,
83
+ secondary: borderStyle,
84
+ tertiary: borderStyle
85
+ },
86
+ blockquote: {
87
+ primary: borderStyle,
88
+ secondary: borderStyle,
89
+ tertiary: borderStyle
90
+ }
91
+ }
92
+ };
93
+ } else if (isSetObject(borderStyles)) {
94
+ resolvedConfig.borderStyles.banner ??= {
95
+ outline: {},
96
+ divider: {}
97
+ };
98
+ const banner = borderStyles.banner;
99
+ if (isSetString(banner)) {
100
+ const borderStyle = resolveBorderStyle(banner);
101
+ resolvedConfig.borderStyles.banner = {
102
+ outline: {
103
+ primary: borderStyle,
104
+ secondary: borderStyle,
105
+ tertiary: borderStyle
106
+ },
107
+ divider: {
108
+ primary: borderStyle,
109
+ secondary: borderStyle,
110
+ tertiary: borderStyle
111
+ }
112
+ };
113
+ } else if (isSetObject(banner)) {
114
+ resolvedConfig.borderStyles.banner ??= {};
115
+ const outline = banner.outline;
116
+ if (isSetString(outline)) {
117
+ const borderStyle = resolveBorderStyle(outline);
118
+ resolvedConfig.borderStyles.banner.outline = {
119
+ primary: borderStyle,
120
+ secondary: borderStyle,
121
+ tertiary: borderStyle
122
+ };
123
+ } else if (isSetObject(outline)) {
124
+ resolvedConfig.borderStyles.banner.outline = {};
125
+ if (isSetString(outline.primary)) resolvedConfig.borderStyles.banner.outline.primary = resolveBorderStyle(outline.primary);
126
+ if (isSetString(outline.secondary)) resolvedConfig.borderStyles.banner.outline.secondary = resolveBorderStyle(outline.secondary);
127
+ if (isSetString(outline.tertiary)) resolvedConfig.borderStyles.banner.outline.tertiary = resolveBorderStyle(outline.tertiary);
128
+ }
129
+ const divider = banner.divider;
130
+ if (isSetString(divider)) {
131
+ const borderStyle = resolveBorderStyle(divider);
132
+ resolvedConfig.borderStyles.banner.divider = {
133
+ primary: borderStyle,
134
+ secondary: borderStyle,
135
+ tertiary: borderStyle
136
+ };
137
+ } else if (isSetObject(divider)) {
138
+ resolvedConfig.borderStyles.banner.divider = {};
139
+ if (isSetString(divider.primary)) resolvedConfig.borderStyles.banner.divider.primary = resolveBorderStyle(divider.primary);
140
+ if (isSetString(divider.secondary)) resolvedConfig.borderStyles.banner.divider.secondary = resolveBorderStyle(divider.secondary);
141
+ if (isSetString(divider.tertiary)) resolvedConfig.borderStyles.banner.divider.tertiary = resolveBorderStyle(divider.tertiary);
142
+ }
143
+ }
144
+ resolvedConfig.borderStyles.app ??= {
145
+ table: {},
146
+ divider: {},
147
+ blockquote: {}
148
+ };
149
+ const app = borderStyles.app;
150
+ if (isSetString(app)) {
151
+ const borderStyle = resolveBorderStyle(app);
152
+ resolvedConfig.borderStyles.app = {
153
+ table: {
154
+ primary: borderStyle,
155
+ secondary: borderStyle,
156
+ tertiary: borderStyle
157
+ },
158
+ divider: {
159
+ primary: borderStyle,
160
+ secondary: borderStyle,
161
+ tertiary: borderStyle
162
+ },
163
+ blockquote: {
164
+ primary: borderStyle,
165
+ secondary: borderStyle,
166
+ tertiary: borderStyle
167
+ }
168
+ };
169
+ } else if (isSetObject(app)) {
170
+ resolvedConfig.borderStyles.app ??= {};
171
+ const table = app.table;
172
+ if (isSetString(table)) {
173
+ const borderStyle = resolveBorderStyle(table);
174
+ resolvedConfig.borderStyles.app.table = {
175
+ primary: borderStyle,
176
+ secondary: borderStyle,
177
+ tertiary: borderStyle
178
+ };
179
+ } else if (isSetObject(table)) {
180
+ resolvedConfig.borderStyles.app.table = {};
181
+ if (isSetString(table.primary)) resolvedConfig.borderStyles.app.table.primary = resolveBorderStyle(table.primary);
182
+ if (isSetString(table.secondary)) resolvedConfig.borderStyles.app.table.secondary = resolveBorderStyle(table.secondary);
183
+ if (isSetString(table.tertiary)) resolvedConfig.borderStyles.app.table.tertiary = resolveBorderStyle(table.tertiary);
184
+ }
185
+ const divider = app.divider;
186
+ if (isSetString(divider)) {
187
+ const borderStyle = resolveBorderStyle(divider);
188
+ resolvedConfig.borderStyles.app.divider = {
189
+ primary: borderStyle,
190
+ secondary: borderStyle,
191
+ tertiary: borderStyle
192
+ };
193
+ } else if (isSetObject(divider)) {
194
+ resolvedConfig.borderStyles.app.divider = {};
195
+ if (isSetString(divider.primary)) resolvedConfig.borderStyles.app.divider.primary = resolveBorderStyle(divider.primary);
196
+ if (isSetString(divider.secondary)) resolvedConfig.borderStyles.app.divider.secondary = resolveBorderStyle(divider.secondary);
197
+ if (isSetString(divider.tertiary)) resolvedConfig.borderStyles.app.divider.tertiary = resolveBorderStyle(divider.tertiary);
198
+ }
199
+ const blockquote = app.blockquote;
200
+ if (isSetString(blockquote)) {
201
+ const borderStyle = resolveBorderStyle(blockquote);
202
+ resolvedConfig.borderStyles.app.blockquote = {
203
+ primary: borderStyle,
204
+ secondary: borderStyle,
205
+ tertiary: borderStyle
206
+ };
207
+ } else if (isSetObject(blockquote)) {
208
+ resolvedConfig.borderStyles.app.blockquote = {};
209
+ if (isSetString(blockquote.primary)) resolvedConfig.borderStyles.app.blockquote.primary = resolveBorderStyle(blockquote.primary);
210
+ if (isSetString(blockquote.secondary)) resolvedConfig.borderStyles.app.blockquote.secondary = resolveBorderStyle(blockquote.secondary);
211
+ if (isSetString(blockquote.tertiary)) resolvedConfig.borderStyles.app.blockquote.tertiary = resolveBorderStyle(blockquote.tertiary);
212
+ }
213
+ }
214
+ resolvedConfig.borderStyles.message ??= {};
215
+ const message = borderStyles.message;
216
+ if (isSetString(message)) {
217
+ const borderStyle = resolveBorderStyle(message);
218
+ resolvedConfig.borderStyles.message = {
219
+ outline: {
220
+ help: borderStyle,
221
+ success: borderStyle,
222
+ info: borderStyle,
223
+ debug: borderStyle,
224
+ warning: borderStyle,
225
+ danger: borderStyle,
226
+ error: borderStyle
227
+ },
228
+ divider: {
229
+ help: borderStyle,
230
+ success: borderStyle,
231
+ info: borderStyle,
232
+ debug: borderStyle,
233
+ warning: borderStyle,
234
+ danger: borderStyle,
235
+ error: borderStyle
236
+ }
237
+ };
238
+ } else if (isSetObject(message)) {
239
+ const outline = message.outline;
240
+ if (isSetString(outline)) {
241
+ const borderStyle = resolveBorderStyle(outline);
242
+ resolvedConfig.borderStyles.message.outline = {
243
+ help: borderStyle,
244
+ success: borderStyle,
245
+ info: borderStyle,
246
+ debug: borderStyle,
247
+ warning: borderStyle,
248
+ danger: borderStyle,
249
+ error: borderStyle
250
+ };
251
+ } else if (isSetObject(outline)) {
252
+ resolvedConfig.borderStyles.message.outline = {};
253
+ if (isSetString(outline.help)) resolvedConfig.borderStyles.message.outline.help = resolveBorderStyle(outline.help);
254
+ if (isSetString(outline.success)) resolvedConfig.borderStyles.message.outline.success = resolveBorderStyle(outline.success);
255
+ if (isSetString(outline.info)) resolvedConfig.borderStyles.message.outline.info = resolveBorderStyle(outline.info);
256
+ if (isSetString(outline.debug)) resolvedConfig.borderStyles.message.outline.debug = resolveBorderStyle(outline.debug);
257
+ if (isSetString(outline.warning)) resolvedConfig.borderStyles.message.outline.warning = resolveBorderStyle(outline.warning);
258
+ if (isSetString(outline.danger)) resolvedConfig.borderStyles.message.outline.danger = resolveBorderStyle(outline.danger);
259
+ if (isSetString(outline.error)) resolvedConfig.borderStyles.message.outline.error = resolveBorderStyle(outline.error);
260
+ }
261
+ resolvedConfig.borderStyles.message.divider ??= {};
262
+ const divider = message.divider;
263
+ if (isSetString(divider)) {
264
+ const borderStyle = resolveBorderStyle(divider);
265
+ resolvedConfig.borderStyles.message.divider = {
266
+ help: borderStyle,
267
+ success: borderStyle,
268
+ info: borderStyle,
269
+ debug: borderStyle,
270
+ warning: borderStyle,
271
+ danger: borderStyle,
272
+ error: borderStyle
273
+ };
274
+ } else if (isSetObject(divider)) {
275
+ if (isSetString(divider.help)) resolvedConfig.borderStyles.message.divider.help = resolveBorderStyle(divider.help);
276
+ if (isSetString(divider.success)) resolvedConfig.borderStyles.message.divider.success = resolveBorderStyle(divider.success);
277
+ if (isSetString(divider.info)) resolvedConfig.borderStyles.message.divider.info = resolveBorderStyle(divider.info);
278
+ if (isSetString(divider.debug)) resolvedConfig.borderStyles.message.divider.debug = resolveBorderStyle(divider.debug);
279
+ if (isSetString(divider.warning)) resolvedConfig.borderStyles.message.divider.warning = resolveBorderStyle(divider.warning);
280
+ if (isSetString(divider.danger)) resolvedConfig.borderStyles.message.divider.danger = resolveBorderStyle(divider.danger);
281
+ if (isSetString(divider.error)) resolvedConfig.borderStyles.message.divider.error = resolveBorderStyle(divider.error);
282
+ }
283
+ }
284
+ }
285
+ mergeThemes(context, resolvedConfig);
286
+ return dictionary;
287
+ }
288
+ });
289
+
290
+ //#endregion
291
+ //#region src/style-dictionary/colors.ts
292
+ /**
293
+ * Shell Shock - Theme Colors Preprocessor
294
+ *
295
+ * @remarks
296
+ * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.
297
+ */
298
+ const colors = (context) => ({
299
+ name: "shell-shock/colors",
300
+ preprocessor: (dictionary, _options) => {
301
+ const resolvedConfig = {};
302
+ resolvedConfig.name = dictionary.$theme ?? context.config.name;
303
+ resolvedConfig.colors ??= {
304
+ text: {
305
+ banner: {},
306
+ heading: {},
307
+ body: {},
308
+ message: {
309
+ link: {},
310
+ header: {},
311
+ footer: {},
312
+ description: {}
313
+ },
314
+ tags: { $default: "#FFFFFF" }
315
+ },
316
+ border: {
317
+ banner: {
318
+ outline: {},
319
+ divider: {}
320
+ },
321
+ app: {
322
+ table: {},
323
+ divider: {},
324
+ blockquote: {}
325
+ },
326
+ message: {
327
+ outline: {},
328
+ divider: {}
329
+ }
330
+ }
331
+ };
332
+ const colors = dictionary.colors;
333
+ if (isSetString(colors)) resolvedConfig.colors = {
334
+ text: {
335
+ banner: {
336
+ title: {
337
+ primary: colors,
338
+ secondary: colors,
339
+ tertiary: colors
340
+ },
341
+ header: {
342
+ primary: colors,
343
+ secondary: colors,
344
+ tertiary: colors
345
+ },
346
+ footer: {
347
+ primary: colors,
348
+ secondary: colors,
349
+ tertiary: colors
350
+ },
351
+ command: {
352
+ primary: colors,
353
+ secondary: colors,
354
+ tertiary: colors
355
+ },
356
+ description: {
357
+ primary: colors,
358
+ secondary: colors,
359
+ tertiary: colors
360
+ },
361
+ link: {
362
+ primary: colors,
363
+ secondary: colors,
364
+ tertiary: colors
365
+ }
366
+ },
367
+ heading: {
368
+ primary: colors,
369
+ secondary: colors,
370
+ tertiary: colors
371
+ },
372
+ body: {
373
+ primary: colors,
374
+ secondary: colors,
375
+ tertiary: colors,
376
+ link: colors
377
+ },
378
+ message: {
379
+ link: {
380
+ help: colors,
381
+ success: colors,
382
+ info: colors,
383
+ debug: colors,
384
+ warning: colors,
385
+ danger: colors,
386
+ error: colors
387
+ },
388
+ header: {
389
+ help: colors,
390
+ success: colors,
391
+ info: colors,
392
+ debug: colors,
393
+ warning: colors,
394
+ danger: colors,
395
+ error: colors
396
+ },
397
+ footer: {
398
+ help: colors,
399
+ success: colors,
400
+ info: colors,
401
+ debug: colors,
402
+ warning: colors,
403
+ danger: colors,
404
+ error: colors
405
+ },
406
+ description: {
407
+ help: colors,
408
+ success: colors,
409
+ info: colors,
410
+ debug: colors,
411
+ warning: colors,
412
+ danger: colors,
413
+ error: colors
414
+ }
415
+ },
416
+ usage: {
417
+ bin: colors,
418
+ command: colors,
419
+ dynamic: colors,
420
+ options: colors,
421
+ args: colors,
422
+ description: colors
423
+ },
424
+ prompt: {
425
+ icon: {
426
+ active: colors,
427
+ cancelled: colors,
428
+ warning: colors,
429
+ error: colors,
430
+ submitted: colors,
431
+ disabled: colors
432
+ },
433
+ message: {
434
+ active: colors,
435
+ cancelled: colors,
436
+ warning: colors,
437
+ error: colors,
438
+ submitted: colors,
439
+ disabled: colors
440
+ },
441
+ input: {
442
+ active: colors,
443
+ inactive: colors,
444
+ cancelled: colors,
445
+ warning: colors,
446
+ error: colors,
447
+ submitted: colors,
448
+ placeholder: colors,
449
+ disabled: colors
450
+ },
451
+ description: {
452
+ active: colors,
453
+ inactive: colors,
454
+ cancelled: colors,
455
+ warning: colors,
456
+ error: colors,
457
+ submitted: colors,
458
+ disabled: colors
459
+ }
460
+ },
461
+ spinner: {
462
+ icon: {
463
+ active: colors,
464
+ error: colors,
465
+ success: colors,
466
+ help: colors,
467
+ info: colors,
468
+ warning: colors
469
+ },
470
+ message: {
471
+ active: colors,
472
+ error: colors,
473
+ success: colors,
474
+ help: colors,
475
+ info: colors,
476
+ warning: colors
477
+ }
478
+ },
479
+ tags: { $default: colors }
480
+ },
481
+ border: {
482
+ banner: {
483
+ outline: {
484
+ primary: colors,
485
+ secondary: colors,
486
+ tertiary: colors
487
+ },
488
+ divider: {
489
+ primary: colors,
490
+ secondary: colors,
491
+ tertiary: colors
492
+ }
493
+ },
494
+ app: {
495
+ table: {
496
+ primary: colors,
497
+ secondary: colors,
498
+ tertiary: colors
499
+ },
500
+ divider: {
501
+ primary: colors,
502
+ secondary: colors,
503
+ tertiary: colors
504
+ },
505
+ blockquote: {
506
+ primary: colors,
507
+ secondary: colors,
508
+ tertiary: colors
509
+ }
510
+ },
511
+ message: {
512
+ outline: {
513
+ help: colors,
514
+ success: colors,
515
+ info: colors,
516
+ debug: colors,
517
+ warning: colors,
518
+ danger: colors,
519
+ error: colors
520
+ },
521
+ divider: {
522
+ help: colors,
523
+ success: colors,
524
+ info: colors,
525
+ debug: colors,
526
+ warning: colors,
527
+ danger: colors,
528
+ error: colors
529
+ }
530
+ }
531
+ }
532
+ };
533
+ else if (isSetObject(colors)) {
534
+ resolvedConfig.colors.text ??= {
535
+ banner: {},
536
+ heading: {},
537
+ body: {},
538
+ message: {
539
+ link: {},
540
+ header: {},
541
+ footer: {},
542
+ description: {}
543
+ }
544
+ };
545
+ const text = colors.text;
546
+ if (isSetString(text)) resolvedConfig.colors.text = {
547
+ banner: {
548
+ title: {
549
+ primary: text,
550
+ secondary: text,
551
+ tertiary: text
552
+ },
553
+ header: {
554
+ primary: text,
555
+ secondary: text,
556
+ tertiary: text
557
+ },
558
+ footer: {
559
+ primary: text,
560
+ secondary: text,
561
+ tertiary: text
562
+ },
563
+ command: {
564
+ primary: text,
565
+ secondary: text,
566
+ tertiary: text
567
+ },
568
+ description: {
569
+ primary: text,
570
+ secondary: text,
571
+ tertiary: text
572
+ },
573
+ link: {
574
+ primary: text,
575
+ secondary: text,
576
+ tertiary: text
577
+ }
578
+ },
579
+ heading: {
580
+ primary: text,
581
+ secondary: text,
582
+ tertiary: text
583
+ },
584
+ body: {
585
+ primary: text,
586
+ secondary: text,
587
+ tertiary: text,
588
+ link: text
589
+ },
590
+ message: {
591
+ link: {
592
+ help: text,
593
+ success: text,
594
+ info: text,
595
+ debug: text,
596
+ warning: text,
597
+ danger: text,
598
+ error: text
599
+ },
600
+ header: {
601
+ help: text,
602
+ success: text,
603
+ info: text,
604
+ debug: text,
605
+ warning: text,
606
+ danger: text,
607
+ error: text
608
+ },
609
+ footer: {
610
+ help: text,
611
+ success: text,
612
+ info: text,
613
+ debug: text,
614
+ warning: text,
615
+ danger: text,
616
+ error: text
617
+ },
618
+ description: {
619
+ help: text,
620
+ success: text,
621
+ info: text,
622
+ debug: text,
623
+ warning: text,
624
+ danger: text,
625
+ error: text
626
+ }
627
+ },
628
+ usage: {
629
+ bin: text,
630
+ command: text,
631
+ dynamic: text,
632
+ options: text,
633
+ args: text,
634
+ description: text
635
+ },
636
+ prompt: {
637
+ icon: {
638
+ active: text,
639
+ cancelled: text,
640
+ warning: text,
641
+ error: text,
642
+ submitted: text,
643
+ disabled: text
644
+ },
645
+ message: {
646
+ active: text,
647
+ cancelled: text,
648
+ warning: text,
649
+ error: text,
650
+ submitted: text,
651
+ disabled: text
652
+ },
653
+ input: {
654
+ active: text,
655
+ inactive: text,
656
+ cancelled: text,
657
+ warning: text,
658
+ error: text,
659
+ submitted: text,
660
+ placeholder: text,
661
+ disabled: text
662
+ },
663
+ description: {
664
+ active: text,
665
+ inactive: text,
666
+ cancelled: text,
667
+ warning: text,
668
+ error: text,
669
+ submitted: text,
670
+ disabled: text
671
+ }
672
+ },
673
+ spinner: {
674
+ icon: {
675
+ active: text,
676
+ error: text,
677
+ success: text,
678
+ help: text,
679
+ info: text,
680
+ warning: text
681
+ },
682
+ message: {
683
+ active: text,
684
+ error: text,
685
+ success: text,
686
+ help: text,
687
+ info: text,
688
+ warning: text
689
+ }
690
+ },
691
+ tags: { $default: text }
692
+ };
693
+ else if (isSetObject(text)) {
694
+ resolvedConfig.colors.text.banner ??= {};
695
+ const banner = text.banner;
696
+ if (isSetString(banner)) resolvedConfig.colors.text.banner = {
697
+ title: {
698
+ primary: banner,
699
+ secondary: banner,
700
+ tertiary: banner
701
+ },
702
+ header: {
703
+ primary: banner,
704
+ secondary: banner,
705
+ tertiary: banner
706
+ },
707
+ footer: {
708
+ primary: banner,
709
+ secondary: banner,
710
+ tertiary: banner
711
+ },
712
+ command: {
713
+ primary: banner,
714
+ secondary: banner,
715
+ tertiary: banner
716
+ },
717
+ description: {
718
+ primary: banner,
719
+ secondary: banner,
720
+ tertiary: banner
721
+ },
722
+ link: {
723
+ primary: banner,
724
+ secondary: banner,
725
+ tertiary: banner
726
+ }
727
+ };
728
+ else if (isSetObject(text.banner)) {
729
+ resolvedConfig.colors.text.banner.title ??= {};
730
+ const title = text.banner.title;
731
+ if (isSetString(text.banner.title)) resolvedConfig.colors.text.banner.title = {
732
+ primary: text.banner.title,
733
+ secondary: text.banner.title,
734
+ tertiary: text.banner.title
735
+ };
736
+ else if (isSetObject(title)) {
737
+ if (isSetString(title.primary)) resolvedConfig.colors.text.banner.title.primary = title.primary;
738
+ if (isSetString(title.secondary)) resolvedConfig.colors.text.banner.title.secondary = title.secondary;
739
+ if (isSetString(title.tertiary)) resolvedConfig.colors.text.banner.title.tertiary = title.tertiary;
740
+ }
741
+ resolvedConfig.colors.text.banner.header ??= {};
742
+ const header = text.banner.header;
743
+ if (isSetString(text.banner.header)) resolvedConfig.colors.text.banner.header = {
744
+ primary: text.banner.header,
745
+ secondary: text.banner.header,
746
+ tertiary: text.banner.header
747
+ };
748
+ else if (isSetObject(header)) {
749
+ if (isSetString(header.primary)) resolvedConfig.colors.text.banner.header.primary = header.primary;
750
+ if (isSetString(header.secondary)) resolvedConfig.colors.text.banner.header.secondary = header.secondary;
751
+ if (isSetString(header.tertiary)) resolvedConfig.colors.text.banner.header.tertiary = header.tertiary;
752
+ }
753
+ resolvedConfig.colors.text.banner.footer ??= {};
754
+ const footer = text.banner.footer;
755
+ if (isSetString(text.banner.footer)) resolvedConfig.colors.text.banner.footer = {
756
+ primary: text.banner.footer,
757
+ secondary: text.banner.footer,
758
+ tertiary: text.banner.footer
759
+ };
760
+ else if (isSetObject(footer)) {
761
+ if (isSetString(footer.primary)) resolvedConfig.colors.text.banner.footer.primary = footer.primary;
762
+ if (isSetString(footer.secondary)) resolvedConfig.colors.text.banner.footer.secondary = footer.secondary;
763
+ if (isSetString(footer.tertiary)) resolvedConfig.colors.text.banner.footer.tertiary = footer.tertiary;
764
+ }
765
+ resolvedConfig.colors.text.banner.command ??= {};
766
+ const command = text.banner.command;
767
+ if (isSetString(text.banner.command)) resolvedConfig.colors.text.banner.command = {
768
+ primary: text.banner.command,
769
+ secondary: text.banner.command,
770
+ tertiary: text.banner.command
771
+ };
772
+ else if (isSetObject(command)) {
773
+ if (isSetString(command.primary)) resolvedConfig.colors.text.banner.command.primary = command.primary;
774
+ if (isSetString(command.secondary)) resolvedConfig.colors.text.banner.command.secondary = command.secondary;
775
+ if (isSetString(command.tertiary)) resolvedConfig.colors.text.banner.command.tertiary = command.tertiary;
776
+ }
777
+ resolvedConfig.colors.text.banner.description ??= {};
778
+ const description = text.banner.description;
779
+ if (isSetString(text.banner.description)) resolvedConfig.colors.text.banner.description = {
780
+ primary: text.banner.description,
781
+ secondary: text.banner.description,
782
+ tertiary: text.banner.description
783
+ };
784
+ else if (isSetObject(description)) {
785
+ if (isSetString(description.primary)) resolvedConfig.colors.text.banner.description.primary = description.primary;
786
+ if (isSetString(description.secondary)) resolvedConfig.colors.text.banner.description.secondary = description.secondary;
787
+ if (isSetString(description.tertiary)) resolvedConfig.colors.text.banner.description.tertiary = description.tertiary;
788
+ }
789
+ resolvedConfig.colors.text.banner.link ??= {};
790
+ const link = text.banner.link;
791
+ if (isSetString(text.banner.link)) resolvedConfig.colors.text.banner.link = {
792
+ primary: text.banner.link,
793
+ secondary: text.banner.link,
794
+ tertiary: text.banner.link
795
+ };
796
+ else if (isSetObject(link)) {
797
+ if (isSetString(link.primary)) resolvedConfig.colors.text.banner.link.primary = link.primary;
798
+ if (isSetString(link.secondary)) resolvedConfig.colors.text.banner.link.secondary = link.secondary;
799
+ if (isSetString(link.tertiary)) resolvedConfig.colors.text.banner.link.tertiary = link.tertiary;
800
+ }
801
+ }
802
+ resolvedConfig.colors.text.body ??= {};
803
+ if (isSetString(text.body)) {
804
+ const color = text.body;
805
+ resolvedConfig.colors.text.body = {
806
+ primary: color,
807
+ secondary: color,
808
+ tertiary: color,
809
+ link: color
810
+ };
811
+ } else if (isSetObject(text.body)) {
812
+ if (isSetString(text.body.primary)) resolvedConfig.colors.text.body.primary = text.body.primary;
813
+ if (isSetString(text.body.secondary)) resolvedConfig.colors.text.body.secondary = text.body.secondary;
814
+ if (isSetString(text.body.tertiary)) resolvedConfig.colors.text.body.tertiary = text.body.tertiary;
815
+ if (isSetString(text.body.link)) resolvedConfig.colors.text.body.link = text.body.link;
816
+ }
817
+ resolvedConfig.colors.text.heading ??= {};
818
+ if (isSetString(text.heading)) {
819
+ const color = text.heading;
820
+ resolvedConfig.colors.text.heading = {
821
+ primary: color,
822
+ secondary: color,
823
+ tertiary: color
824
+ };
825
+ } else if (isSetObject(text.heading)) {
826
+ if (isSetString(text.heading.primary)) resolvedConfig.colors.text.heading.primary = text.heading.primary;
827
+ if (isSetString(text.heading.secondary)) resolvedConfig.colors.text.heading.secondary = text.heading.secondary;
828
+ if (isSetString(text.heading.tertiary)) resolvedConfig.colors.text.heading.tertiary = text.heading.tertiary;
829
+ }
830
+ resolvedConfig.colors.text.usage ??= {};
831
+ if (isSetString(text.usage)) resolvedConfig.colors.text.usage = {
832
+ bin: text.usage,
833
+ command: text.usage,
834
+ dynamic: text.usage,
835
+ options: text.usage,
836
+ args: text.usage,
837
+ description: text.usage
838
+ };
839
+ else if (isSetObject(text.usage)) {
840
+ if (isSetString(text.usage.bin)) resolvedConfig.colors.text.usage.bin = text.usage.bin;
841
+ if (isSetString(text.usage.command)) resolvedConfig.colors.text.usage.command = text.usage.command;
842
+ if (isSetString(text.usage.dynamic)) resolvedConfig.colors.text.usage.dynamic = text.usage.dynamic;
843
+ if (isSetString(text.usage.options)) resolvedConfig.colors.text.usage.options = text.usage.options;
844
+ if (isSetString(text.usage.args)) resolvedConfig.colors.text.usage.args = text.usage.args;
845
+ if (isSetString(text.usage.description)) resolvedConfig.colors.text.usage.description = text.usage.description;
846
+ }
847
+ resolvedConfig.colors.text.message ??= {
848
+ link: {},
849
+ header: {},
850
+ footer: {},
851
+ description: {}
852
+ };
853
+ const message = text.message;
854
+ if (isSetString(message)) resolvedConfig.colors.text.message = {
855
+ link: {
856
+ help: message,
857
+ success: message,
858
+ info: message,
859
+ debug: message,
860
+ warning: message,
861
+ danger: message,
862
+ error: message
863
+ },
864
+ header: {
865
+ help: message,
866
+ success: message,
867
+ info: message,
868
+ debug: message,
869
+ warning: message,
870
+ danger: message,
871
+ error: message
872
+ },
873
+ footer: {
874
+ help: message,
875
+ success: message,
876
+ info: message,
877
+ debug: message,
878
+ warning: message,
879
+ danger: message,
880
+ error: message
881
+ },
882
+ description: {
883
+ help: message,
884
+ success: message,
885
+ info: message,
886
+ debug: message,
887
+ warning: message,
888
+ danger: message,
889
+ error: message
890
+ }
891
+ };
892
+ else if (isSetObject(message)) {
893
+ resolvedConfig.colors.text.message.link ??= {};
894
+ const link = message.link;
895
+ if (isSetString(link)) resolvedConfig.colors.text.message.link = {
896
+ help: link,
897
+ success: link,
898
+ info: link,
899
+ debug: link,
900
+ warning: link,
901
+ danger: link,
902
+ error: link
903
+ };
904
+ else if (isSetObject(link)) {
905
+ if (isSetString(link.help)) resolvedConfig.colors.text.message.link.help = link.help;
906
+ if (isSetString(link.success)) resolvedConfig.colors.text.message.link.success = link.success;
907
+ if (isSetString(link.info)) resolvedConfig.colors.text.message.link.info = link.info;
908
+ if (isSetString(link.debug)) resolvedConfig.colors.text.message.link.debug = link.debug;
909
+ if (isSetString(link.warning)) resolvedConfig.colors.text.message.link.warning = link.warning;
910
+ if (isSetString(link.danger)) resolvedConfig.colors.text.message.link.danger = link.danger;
911
+ if (isSetString(link.error)) resolvedConfig.colors.text.message.link.error = link.error;
912
+ }
913
+ resolvedConfig.colors.text.message.description ??= {};
914
+ const description = message.description;
915
+ if (isSetString(description)) resolvedConfig.colors.text.message.description = {
916
+ help: description,
917
+ success: description,
918
+ info: description,
919
+ debug: description,
920
+ warning: description,
921
+ danger: description,
922
+ error: description
923
+ };
924
+ else if (isSetObject(description)) {
925
+ if (isSetString(description.help)) resolvedConfig.colors.text.message.description.help = description.help;
926
+ if (isSetString(description.success)) resolvedConfig.colors.text.message.description.success = description.success;
927
+ if (isSetString(description.info)) resolvedConfig.colors.text.message.description.info = description.info;
928
+ if (isSetString(description.debug)) resolvedConfig.colors.text.message.description.debug = description.debug;
929
+ if (isSetString(description.warning)) resolvedConfig.colors.text.message.description.warning = description.warning;
930
+ if (isSetString(description.danger)) resolvedConfig.colors.text.message.description.danger = description.danger;
931
+ if (isSetString(description.error)) resolvedConfig.colors.text.message.description.error = description.error;
932
+ }
933
+ resolvedConfig.colors.text.message.header ??= {};
934
+ const header = message.header;
935
+ if (isSetString(header)) resolvedConfig.colors.text.message.header = {
936
+ help: header,
937
+ success: header,
938
+ info: header,
939
+ debug: header,
940
+ warning: header,
941
+ danger: header,
942
+ error: header
943
+ };
944
+ else if (isSetObject(header)) {
945
+ if (isSetString(header.help)) resolvedConfig.colors.text.message.header.help = header.help;
946
+ if (isSetString(header.success)) resolvedConfig.colors.text.message.header.success = header.success;
947
+ if (isSetString(header.info)) resolvedConfig.colors.text.message.header.info = header.info;
948
+ if (isSetString(header.debug)) resolvedConfig.colors.text.message.header.debug = header.debug;
949
+ if (isSetString(header.warning)) resolvedConfig.colors.text.message.header.warning = header.warning;
950
+ if (isSetString(header.danger)) resolvedConfig.colors.text.message.header.danger = header.danger;
951
+ if (isSetString(header.error)) resolvedConfig.colors.text.message.header.error = header.error;
952
+ }
953
+ resolvedConfig.colors.text.message.footer ??= {};
954
+ const footer = message.footer;
955
+ if (isSetString(footer)) resolvedConfig.colors.text.message.footer = {
956
+ help: footer,
957
+ success: footer,
958
+ info: footer,
959
+ debug: footer,
960
+ warning: footer,
961
+ danger: footer,
962
+ error: footer
963
+ };
964
+ else if (isSetObject(footer)) {
965
+ if (isSetString(footer.help)) resolvedConfig.colors.text.message.footer.help = footer.help;
966
+ if (isSetString(footer.success)) resolvedConfig.colors.text.message.footer.success = footer.success;
967
+ if (isSetString(footer.info)) resolvedConfig.colors.text.message.footer.info = footer.info;
968
+ if (isSetString(footer.debug)) resolvedConfig.colors.text.message.footer.debug = footer.debug;
969
+ if (isSetString(footer.warning)) resolvedConfig.colors.text.message.footer.warning = footer.warning;
970
+ if (isSetString(footer.danger)) resolvedConfig.colors.text.message.footer.danger = footer.danger;
971
+ if (isSetString(footer.error)) resolvedConfig.colors.text.message.footer.error = footer.error;
972
+ }
973
+ }
974
+ resolvedConfig.colors.text.prompt ??= {
975
+ icon: {},
976
+ message: {},
977
+ input: {},
978
+ description: {}
979
+ };
980
+ const prompt = text.prompt;
981
+ if (isSetString(prompt)) resolvedConfig.colors.text.prompt = {
982
+ icon: {
983
+ active: prompt,
984
+ cancelled: prompt,
985
+ warning: prompt,
986
+ error: prompt,
987
+ submitted: prompt,
988
+ disabled: prompt
989
+ },
990
+ message: {
991
+ active: prompt,
992
+ cancelled: prompt,
993
+ warning: prompt,
994
+ error: prompt,
995
+ submitted: prompt,
996
+ disabled: prompt
997
+ },
998
+ input: {
999
+ active: prompt,
1000
+ inactive: prompt,
1001
+ cancelled: prompt,
1002
+ warning: prompt,
1003
+ error: prompt,
1004
+ submitted: prompt,
1005
+ placeholder: prompt,
1006
+ disabled: prompt
1007
+ },
1008
+ description: {
1009
+ active: prompt,
1010
+ inactive: prompt,
1011
+ cancelled: prompt,
1012
+ warning: prompt,
1013
+ error: prompt,
1014
+ submitted: prompt,
1015
+ disabled: prompt
1016
+ }
1017
+ };
1018
+ else if (isSetObject(prompt)) {
1019
+ if (isSetString(prompt.icon)) {
1020
+ const icon = prompt.icon;
1021
+ resolvedConfig.colors.text.prompt.icon = {
1022
+ active: icon,
1023
+ cancelled: icon,
1024
+ warning: icon,
1025
+ error: icon,
1026
+ submitted: icon,
1027
+ disabled: icon
1028
+ };
1029
+ } else if (isSetObject(prompt.icon)) {
1030
+ if (isSetString(prompt.icon.active)) resolvedConfig.colors.text.prompt.icon.active = prompt.icon.active;
1031
+ if (isSetString(prompt.icon.cancelled)) resolvedConfig.colors.text.prompt.icon.cancelled = prompt.icon.cancelled;
1032
+ if (isSetString(prompt.icon.warning)) resolvedConfig.colors.text.prompt.icon.warning = prompt.icon.warning;
1033
+ if (isSetString(prompt.icon.error)) resolvedConfig.colors.text.prompt.icon.error = prompt.icon.error;
1034
+ if (isSetString(prompt.icon.submitted)) resolvedConfig.colors.text.prompt.icon.submitted = prompt.icon.submitted;
1035
+ if (isSetString(prompt.icon.disabled)) resolvedConfig.colors.text.prompt.icon.disabled = prompt.icon.disabled;
1036
+ }
1037
+ if (isSetString(prompt.message)) {
1038
+ const message = prompt.message;
1039
+ resolvedConfig.colors.text.prompt.message = {
1040
+ active: message,
1041
+ cancelled: message,
1042
+ warning: message,
1043
+ error: message,
1044
+ submitted: message,
1045
+ disabled: message
1046
+ };
1047
+ } else if (isSetObject(prompt.message)) {
1048
+ if (isSetString(prompt.message.active)) resolvedConfig.colors.text.prompt.message.active = prompt.message.active;
1049
+ if (isSetString(prompt.message.cancelled)) resolvedConfig.colors.text.prompt.message.cancelled = prompt.message.cancelled;
1050
+ if (isSetString(prompt.message.warning)) resolvedConfig.colors.text.prompt.message.warning = prompt.message.warning;
1051
+ if (isSetString(prompt.message.error)) resolvedConfig.colors.text.prompt.message.error = prompt.message.error;
1052
+ if (isSetString(prompt.message.submitted)) resolvedConfig.colors.text.prompt.message.submitted = prompt.message.submitted;
1053
+ if (isSetString(prompt.message.disabled)) resolvedConfig.colors.text.prompt.message.disabled = prompt.message.disabled;
1054
+ }
1055
+ if (isSetString(prompt.input)) {
1056
+ const input = prompt.input;
1057
+ resolvedConfig.colors.text.prompt.input = {
1058
+ active: input,
1059
+ inactive: input,
1060
+ cancelled: input,
1061
+ warning: input,
1062
+ error: input,
1063
+ submitted: input,
1064
+ placeholder: input,
1065
+ disabled: input
1066
+ };
1067
+ } else if (isSetObject(prompt.input)) {
1068
+ if (isSetString(prompt.input.active)) resolvedConfig.colors.text.prompt.input.active = prompt.input.active;
1069
+ if (isSetString(prompt.input.inactive)) resolvedConfig.colors.text.prompt.input.inactive = prompt.input.inactive;
1070
+ if (isSetString(prompt.input.cancelled)) resolvedConfig.colors.text.prompt.input.cancelled = prompt.input.cancelled;
1071
+ if (isSetString(prompt.input.warning)) resolvedConfig.colors.text.prompt.input.warning = prompt.input.warning;
1072
+ if (isSetString(prompt.input.error)) resolvedConfig.colors.text.prompt.input.error = prompt.input.error;
1073
+ if (isSetString(prompt.input.submitted)) resolvedConfig.colors.text.prompt.input.submitted = prompt.input.submitted;
1074
+ if (isSetString(prompt.input.placeholder)) resolvedConfig.colors.text.prompt.input.placeholder = prompt.input.placeholder;
1075
+ if (isSetString(prompt.input.disabled)) resolvedConfig.colors.text.prompt.input.disabled = prompt.input.disabled;
1076
+ }
1077
+ if (isSetString(prompt.description)) {
1078
+ const description = prompt.description;
1079
+ resolvedConfig.colors.text.prompt.description = {
1080
+ active: description,
1081
+ inactive: description,
1082
+ cancelled: description,
1083
+ warning: description,
1084
+ error: description,
1085
+ submitted: description,
1086
+ disabled: description
1087
+ };
1088
+ } else if (isSetObject(prompt.description)) {
1089
+ if (isSetString(prompt.description.active)) resolvedConfig.colors.text.prompt.description.active = prompt.description.active;
1090
+ if (isSetString(prompt.description.inactive)) resolvedConfig.colors.text.prompt.description.inactive = prompt.description.inactive;
1091
+ if (isSetString(prompt.description.cancelled)) resolvedConfig.colors.text.prompt.description.cancelled = prompt.description.cancelled;
1092
+ if (isSetString(prompt.description.warning)) resolvedConfig.colors.text.prompt.description.warning = prompt.description.warning;
1093
+ if (isSetString(prompt.description.error)) resolvedConfig.colors.text.prompt.description.error = prompt.description.error;
1094
+ if (isSetString(prompt.description.submitted)) resolvedConfig.colors.text.prompt.description.submitted = prompt.description.submitted;
1095
+ if (isSetString(prompt.description.disabled)) resolvedConfig.colors.text.prompt.description.disabled = prompt.description.disabled;
1096
+ }
1097
+ }
1098
+ resolvedConfig.colors.text.spinner ??= {
1099
+ icon: {},
1100
+ message: {}
1101
+ };
1102
+ const spinner = text.spinner;
1103
+ if (isSetString(spinner)) resolvedConfig.colors.text.spinner = {
1104
+ icon: {
1105
+ active: spinner,
1106
+ error: spinner,
1107
+ success: spinner,
1108
+ help: spinner,
1109
+ info: spinner,
1110
+ warning: spinner
1111
+ },
1112
+ message: {
1113
+ active: spinner,
1114
+ error: spinner,
1115
+ success: spinner,
1116
+ help: spinner,
1117
+ info: spinner,
1118
+ warning: spinner
1119
+ }
1120
+ };
1121
+ else if (isSetObject(spinner)) {
1122
+ if (isSetString(spinner.icon)) {
1123
+ const icon = spinner.icon;
1124
+ resolvedConfig.colors.text.spinner.icon = {
1125
+ active: icon,
1126
+ error: icon,
1127
+ success: icon,
1128
+ help: icon,
1129
+ info: icon,
1130
+ warning: icon
1131
+ };
1132
+ } else if (isSetObject(spinner.icon)) {
1133
+ if (isSetString(spinner.icon.active)) resolvedConfig.colors.text.spinner.icon.active = spinner.icon.active;
1134
+ if (isSetString(spinner.icon.error)) resolvedConfig.colors.text.spinner.icon.error = spinner.icon.error;
1135
+ if (isSetString(spinner.icon.success)) resolvedConfig.colors.text.spinner.icon.success = spinner.icon.success;
1136
+ if (isSetString(spinner.icon.help)) resolvedConfig.colors.text.spinner.icon.help = spinner.icon.help;
1137
+ if (isSetString(spinner.icon.info)) resolvedConfig.colors.text.spinner.icon.info = spinner.icon.info;
1138
+ if (isSetString(spinner.icon.warning)) resolvedConfig.colors.text.spinner.icon.warning = spinner.icon.warning;
1139
+ }
1140
+ if (isSetString(spinner.message)) {
1141
+ const message = spinner.message;
1142
+ resolvedConfig.colors.text.spinner.message = {
1143
+ active: message,
1144
+ error: message,
1145
+ success: message,
1146
+ help: message,
1147
+ info: message,
1148
+ warning: message
1149
+ };
1150
+ } else if (isSetObject(spinner.message)) {
1151
+ if (isSetString(spinner.message.active)) resolvedConfig.colors.text.spinner.message.active = spinner.message.active;
1152
+ if (isSetString(spinner.message.error)) resolvedConfig.colors.text.spinner.message.error = spinner.message.error;
1153
+ if (isSetString(spinner.message.success)) resolvedConfig.colors.text.spinner.message.success = spinner.message.success;
1154
+ if (isSetString(spinner.message.help)) resolvedConfig.colors.text.spinner.message.help = spinner.message.help;
1155
+ if (isSetString(spinner.message.info)) resolvedConfig.colors.text.spinner.message.info = spinner.message.info;
1156
+ if (isSetString(spinner.message.warning)) resolvedConfig.colors.text.spinner.message.warning = spinner.message.warning;
1157
+ }
1158
+ }
1159
+ resolvedConfig.colors.text.tags ??= { $default: "#FFFFFF" };
1160
+ const tags = text.tags;
1161
+ if (isSetString(tags)) resolvedConfig.colors.text.tags = { $default: tags };
1162
+ else if (isSetObject(tags)) {
1163
+ for (const [tag, value] of Object.entries(tags)) if (isSetString(value)) resolvedConfig.colors.text.tags[tag === "$default" ? "$default" : camelCase(tag)] = value;
1164
+ }
1165
+ }
1166
+ resolvedConfig.colors.border ??= {
1167
+ banner: {
1168
+ outline: {},
1169
+ divider: {}
1170
+ },
1171
+ app: {
1172
+ table: {},
1173
+ divider: {},
1174
+ blockquote: {}
1175
+ },
1176
+ message: {
1177
+ outline: {},
1178
+ divider: {}
1179
+ }
1180
+ };
1181
+ const border = colors.border;
1182
+ if (isSetString(border)) resolvedConfig.colors.border = {
1183
+ banner: {
1184
+ outline: {
1185
+ primary: border,
1186
+ secondary: border,
1187
+ tertiary: border
1188
+ },
1189
+ divider: {
1190
+ primary: border,
1191
+ secondary: border,
1192
+ tertiary: border
1193
+ }
1194
+ },
1195
+ app: {
1196
+ table: {
1197
+ primary: border,
1198
+ secondary: border,
1199
+ tertiary: border
1200
+ },
1201
+ divider: {
1202
+ primary: border,
1203
+ secondary: border,
1204
+ tertiary: border
1205
+ },
1206
+ blockquote: {
1207
+ primary: border,
1208
+ secondary: border,
1209
+ tertiary: border
1210
+ }
1211
+ },
1212
+ message: {
1213
+ outline: {
1214
+ help: border,
1215
+ success: border,
1216
+ info: border,
1217
+ debug: border,
1218
+ warning: border,
1219
+ danger: border,
1220
+ error: border
1221
+ },
1222
+ divider: {
1223
+ help: border,
1224
+ success: border,
1225
+ info: border,
1226
+ debug: border,
1227
+ warning: border,
1228
+ danger: border,
1229
+ error: border
1230
+ }
1231
+ }
1232
+ };
1233
+ else if (isSetObject(border)) {
1234
+ resolvedConfig.colors.border.banner ??= {
1235
+ outline: {},
1236
+ divider: {}
1237
+ };
1238
+ const banner = border.banner;
1239
+ if (isSetString(banner)) resolvedConfig.colors.border.banner = {
1240
+ outline: {
1241
+ primary: banner,
1242
+ secondary: banner,
1243
+ tertiary: banner
1244
+ },
1245
+ divider: {
1246
+ primary: banner,
1247
+ secondary: banner,
1248
+ tertiary: banner
1249
+ }
1250
+ };
1251
+ else if (isSetObject(banner)) {
1252
+ if ("outline" in banner || "divider" in banner) {
1253
+ resolvedConfig.colors.border.banner.outline = {};
1254
+ const outline = banner.outline;
1255
+ if (isSetString(outline)) resolvedConfig.colors.border.banner.outline = {
1256
+ primary: outline,
1257
+ secondary: outline,
1258
+ tertiary: outline
1259
+ };
1260
+ else if (isSetObject(outline)) {
1261
+ if (isSetString(outline.primary)) resolvedConfig.colors.border.banner.outline.primary = outline.primary;
1262
+ if (isSetString(outline.secondary)) resolvedConfig.colors.border.banner.outline.secondary = outline.secondary;
1263
+ if (isSetString(outline.tertiary)) resolvedConfig.colors.border.banner.outline.tertiary = outline.tertiary;
1264
+ }
1265
+ resolvedConfig.colors.border.banner.divider ??= {};
1266
+ const divider = banner.divider;
1267
+ if (isSetString(divider)) resolvedConfig.colors.border.banner.divider = {
1268
+ primary: divider,
1269
+ secondary: divider,
1270
+ tertiary: divider
1271
+ };
1272
+ else if (isSetObject(divider)) {
1273
+ if (isSetString(divider.primary)) resolvedConfig.colors.border.banner.divider.primary = divider.primary;
1274
+ if (isSetString(divider.secondary)) resolvedConfig.colors.border.banner.divider.secondary = divider.secondary;
1275
+ if (isSetString(divider.tertiary)) resolvedConfig.colors.border.banner.divider.tertiary = divider.tertiary;
1276
+ }
1277
+ } else {
1278
+ resolvedConfig.colors.border.banner.outline ??= {};
1279
+ resolvedConfig.colors.border.banner.divider ??= {};
1280
+ const banner = border.banner;
1281
+ if (isSetString(banner.primary)) {
1282
+ resolvedConfig.colors.border.banner.outline.primary = banner.primary;
1283
+ resolvedConfig.colors.border.banner.divider.primary = banner.primary;
1284
+ }
1285
+ if (isSetString(banner.secondary)) {
1286
+ resolvedConfig.colors.border.banner.outline.secondary = banner.secondary;
1287
+ resolvedConfig.colors.border.banner.divider.secondary = banner.secondary;
1288
+ }
1289
+ if (isSetString(banner.tertiary)) {
1290
+ resolvedConfig.colors.border.banner.outline.tertiary = banner.tertiary;
1291
+ resolvedConfig.colors.border.banner.divider.tertiary = banner.tertiary;
1292
+ }
1293
+ }
1294
+ }
1295
+ resolvedConfig.colors.border.app ??= {
1296
+ table: {},
1297
+ divider: {}
1298
+ };
1299
+ const app = border.app;
1300
+ if (isSetString(app)) resolvedConfig.colors.border.app = {
1301
+ table: {
1302
+ primary: app,
1303
+ secondary: app,
1304
+ tertiary: app
1305
+ },
1306
+ divider: {
1307
+ primary: app,
1308
+ secondary: app,
1309
+ tertiary: app
1310
+ },
1311
+ blockquote: {
1312
+ primary: app,
1313
+ secondary: app,
1314
+ tertiary: app
1315
+ }
1316
+ };
1317
+ else if (isSetObject(app)) {
1318
+ resolvedConfig.colors.border.app ??= {};
1319
+ if ("table" in app || "divider" in app || "blockquote" in app) {
1320
+ if (isSetString(app.table)) resolvedConfig.colors.border.app.table = {
1321
+ primary: app.table,
1322
+ secondary: app.table,
1323
+ tertiary: app.table
1324
+ };
1325
+ else if (isSetObject(app.table)) {
1326
+ resolvedConfig.colors.border.app.table = {};
1327
+ const table = app.table;
1328
+ if (isSetString(table.primary)) resolvedConfig.colors.border.app.table.primary = table.primary;
1329
+ if (isSetString(table.secondary)) resolvedConfig.colors.border.app.table.secondary = table.secondary;
1330
+ if (isSetString(table.tertiary)) resolvedConfig.colors.border.app.table.tertiary = table.tertiary;
1331
+ }
1332
+ if (isSetString(app.divider)) resolvedConfig.colors.border.app.divider = {
1333
+ primary: app.divider,
1334
+ secondary: app.divider,
1335
+ tertiary: app.divider
1336
+ };
1337
+ else if (isSetObject(app.divider)) {
1338
+ resolvedConfig.colors.border.app.divider = {};
1339
+ const divider = app.divider;
1340
+ if (isSetString(divider.primary)) resolvedConfig.colors.border.app.divider.primary = divider.primary;
1341
+ if (isSetString(divider.secondary)) resolvedConfig.colors.border.app.divider.secondary = divider.secondary;
1342
+ if (isSetString(divider.tertiary)) resolvedConfig.colors.border.app.divider.tertiary = divider.tertiary;
1343
+ }
1344
+ if (isSetString(app.blockquote)) resolvedConfig.colors.border.app.blockquote = {
1345
+ primary: app.blockquote,
1346
+ secondary: app.blockquote,
1347
+ tertiary: app.blockquote
1348
+ };
1349
+ else if (isSetObject(app.blockquote)) {
1350
+ resolvedConfig.colors.border.app.blockquote = {};
1351
+ const blockquote = app.blockquote;
1352
+ if (isSetString(blockquote.primary)) resolvedConfig.colors.border.app.blockquote.primary = blockquote.primary;
1353
+ if (isSetString(blockquote.secondary)) resolvedConfig.colors.border.app.blockquote.secondary = blockquote.secondary;
1354
+ if (isSetString(blockquote.tertiary)) resolvedConfig.colors.border.app.blockquote.tertiary = blockquote.tertiary;
1355
+ }
1356
+ } else {
1357
+ resolvedConfig.colors.border.app.table ??= {};
1358
+ resolvedConfig.colors.border.app.divider ??= {};
1359
+ resolvedConfig.colors.border.app.blockquote ??= {};
1360
+ const app = border.app;
1361
+ if (isSetString(app.primary)) {
1362
+ resolvedConfig.colors.border.app.table.primary = app.primary;
1363
+ resolvedConfig.colors.border.app.divider.primary = app.primary;
1364
+ resolvedConfig.colors.border.app.blockquote.primary = app.primary;
1365
+ }
1366
+ if (isSetString(app.secondary)) {
1367
+ resolvedConfig.colors.border.app.table.secondary = app.secondary;
1368
+ resolvedConfig.colors.border.app.divider.secondary = app.secondary;
1369
+ resolvedConfig.colors.border.app.blockquote.secondary = app.secondary;
1370
+ }
1371
+ if (isSetString(app.tertiary)) {
1372
+ resolvedConfig.colors.border.app.table.tertiary = app.tertiary;
1373
+ resolvedConfig.colors.border.app.divider.tertiary = app.tertiary;
1374
+ resolvedConfig.colors.border.app.blockquote.tertiary = app.tertiary;
1375
+ }
1376
+ }
1377
+ }
1378
+ resolvedConfig.colors.border.message ??= {
1379
+ outline: {},
1380
+ divider: {}
1381
+ };
1382
+ const message = border.message;
1383
+ if (isSetString(message)) resolvedConfig.colors.border.message = {
1384
+ outline: {
1385
+ help: message,
1386
+ success: message,
1387
+ info: message,
1388
+ debug: message,
1389
+ warning: message,
1390
+ danger: message,
1391
+ error: message
1392
+ },
1393
+ divider: {
1394
+ help: message,
1395
+ success: message,
1396
+ info: message,
1397
+ debug: message,
1398
+ warning: message,
1399
+ danger: message,
1400
+ error: message
1401
+ }
1402
+ };
1403
+ else if (isSetObject(message)) {
1404
+ resolvedConfig.colors.border.message ??= {};
1405
+ if ("outline" in message || "divider" in message) {
1406
+ if (isSetString(message.outline)) resolvedConfig.colors.border.message.outline = {
1407
+ help: message.outline,
1408
+ success: message.outline,
1409
+ info: message.outline,
1410
+ debug: message.outline,
1411
+ warning: message.outline,
1412
+ danger: message.outline,
1413
+ error: message.outline
1414
+ };
1415
+ else if (isSetObject(message.outline)) {
1416
+ resolvedConfig.colors.border.message.outline ??= {};
1417
+ const outline = message.outline;
1418
+ if (isSetString(outline.help)) resolvedConfig.colors.border.message.outline.help = outline.help;
1419
+ if (isSetString(outline.success)) resolvedConfig.colors.border.message.outline.success = outline.success;
1420
+ if (isSetString(outline.info)) resolvedConfig.colors.border.message.outline.info = outline.info;
1421
+ if (isSetString(outline.debug)) resolvedConfig.colors.border.message.outline.debug = outline.debug;
1422
+ if (isSetString(outline.warning)) resolvedConfig.colors.border.message.outline.warning = outline.warning;
1423
+ if (isSetString(outline.danger)) resolvedConfig.colors.border.message.outline.danger = outline.danger;
1424
+ if (isSetString(outline.error)) resolvedConfig.colors.border.message.outline.error = outline.error;
1425
+ }
1426
+ if (isSetString(message.divider)) resolvedConfig.colors.border.message.divider = {
1427
+ help: message.divider,
1428
+ success: message.divider,
1429
+ info: message.divider,
1430
+ debug: message.divider,
1431
+ warning: message.divider,
1432
+ danger: message.divider,
1433
+ error: message.divider
1434
+ };
1435
+ else if (isSetObject(message.divider)) {
1436
+ resolvedConfig.colors.border.message.divider ??= {};
1437
+ const divider = message.divider;
1438
+ if (isSetString(divider.help)) resolvedConfig.colors.border.message.divider.help = divider.help;
1439
+ if (isSetString(divider.success)) resolvedConfig.colors.border.message.divider.success = divider.success;
1440
+ if (isSetString(divider.info)) resolvedConfig.colors.border.message.divider.info = divider.info;
1441
+ if (isSetString(divider.debug)) resolvedConfig.colors.border.message.divider.debug = divider.debug;
1442
+ if (isSetString(divider.warning)) resolvedConfig.colors.border.message.divider.warning = divider.warning;
1443
+ if (isSetString(divider.danger)) resolvedConfig.colors.border.message.divider.danger = divider.danger;
1444
+ if (isSetString(divider.error)) resolvedConfig.colors.border.message.divider.error = divider.error;
1445
+ }
1446
+ } else {
1447
+ resolvedConfig.colors.border.message.outline ??= {};
1448
+ resolvedConfig.colors.border.message.divider ??= {};
1449
+ const message = border.message;
1450
+ if (isSetString(message.help)) {
1451
+ resolvedConfig.colors.border.message.outline.help = message.help;
1452
+ resolvedConfig.colors.border.message.divider.help = message.help;
1453
+ }
1454
+ if (isSetString(message.success)) {
1455
+ resolvedConfig.colors.border.message.outline.success = message.success;
1456
+ resolvedConfig.colors.border.message.divider.success = message.success;
1457
+ }
1458
+ if (isSetString(message.info)) {
1459
+ resolvedConfig.colors.border.message.outline.info = message.info;
1460
+ resolvedConfig.colors.border.message.divider.info = message.info;
1461
+ }
1462
+ if (isSetString(message.debug)) {
1463
+ resolvedConfig.colors.border.message.outline.debug = message.debug;
1464
+ resolvedConfig.colors.border.message.divider.debug = message.debug;
1465
+ }
1466
+ if (isSetString(message.warning)) {
1467
+ resolvedConfig.colors.border.message.outline.warning = message.warning;
1468
+ resolvedConfig.colors.border.message.divider.warning = message.warning;
1469
+ }
1470
+ if (isSetString(message.danger)) {
1471
+ resolvedConfig.colors.border.message.outline.danger = message.danger;
1472
+ resolvedConfig.colors.border.message.divider.danger = message.danger;
1473
+ }
1474
+ if (isSetString(message.error)) {
1475
+ resolvedConfig.colors.border.message.outline.error = message.error;
1476
+ resolvedConfig.colors.border.message.divider.error = message.error;
1477
+ }
1478
+ }
1479
+ }
1480
+ }
1481
+ }
1482
+ if (!resolvedConfig.colors.text?.body?.tertiary && resolvedConfig.colors.text?.body?.secondary) resolvedConfig.colors.text.body.tertiary = resolvedConfig.colors.text.body.secondary;
1483
+ if (!resolvedConfig.colors.text?.body?.secondary && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.body.secondary = resolvedConfig.colors.text.body.tertiary;
1484
+ if (!resolvedConfig.colors.text?.heading?.tertiary && resolvedConfig.colors.text?.heading?.secondary) resolvedConfig.colors.text.heading.tertiary = resolvedConfig.colors.text.heading.secondary;
1485
+ if (!resolvedConfig.colors.text?.heading?.secondary && resolvedConfig.colors.text?.heading?.tertiary) resolvedConfig.colors.text.heading.secondary = resolvedConfig.colors.text.heading.tertiary;
1486
+ if (!resolvedConfig.colors.text?.heading?.primary && resolvedConfig.colors.text?.banner?.title?.primary) resolvedConfig.colors.text.heading.primary = resolvedConfig.colors.text.banner.title.primary;
1487
+ if (!resolvedConfig.colors.text?.heading?.tertiary && resolvedConfig.colors.text?.body?.secondary) resolvedConfig.colors.text.heading.tertiary = resolvedConfig.colors.text.body.secondary;
1488
+ if (!resolvedConfig.colors.text?.heading?.secondary && resolvedConfig.colors.text?.body?.primary) resolvedConfig.colors.text.heading.secondary = resolvedConfig.colors.text.body.primary;
1489
+ if (!resolvedConfig.colors.text?.usage?.bin && resolvedConfig.colors.text?.body?.primary) resolvedConfig.colors.text.usage.bin = resolvedConfig.colors.text.body.primary;
1490
+ if (!resolvedConfig.colors.text?.usage?.command && resolvedConfig.colors.text?.body?.secondary) resolvedConfig.colors.text.usage.command = resolvedConfig.colors.text.body.secondary;
1491
+ if (!resolvedConfig.colors.text?.usage?.dynamic && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.usage.dynamic = resolvedConfig.colors.text.body.tertiary;
1492
+ if (!resolvedConfig.colors.text?.usage?.options && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.usage.options = resolvedConfig.colors.text.body.tertiary;
1493
+ if (!resolvedConfig.colors.text?.usage?.args && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.usage.args = resolvedConfig.colors.text.body.tertiary;
1494
+ if (!resolvedConfig.colors.text?.usage?.description && resolvedConfig.colors.text?.body?.secondary) resolvedConfig.colors.text.usage.description = resolvedConfig.colors.text.body.secondary;
1495
+ if (!resolvedConfig.colors.text?.banner?.title?.primary && resolvedConfig.colors.text?.heading?.primary) {
1496
+ resolvedConfig.colors.text.banner.title ??= {};
1497
+ resolvedConfig.colors.text.banner.title.primary = resolvedConfig.colors.text.heading.primary;
1498
+ }
1499
+ if (!resolvedConfig.colors.text?.banner?.command?.primary && (resolvedConfig.colors.text?.heading?.secondary || resolvedConfig.colors.text?.heading?.primary)) {
1500
+ resolvedConfig.colors.text.banner.command ??= {};
1501
+ resolvedConfig.colors.text.banner.command.primary = resolvedConfig.colors.text.heading.secondary || resolvedConfig.colors.text.heading.primary;
1502
+ }
1503
+ if (!resolvedConfig.colors.text?.banner?.description?.primary && resolvedConfig.colors.text?.body?.primary) {
1504
+ resolvedConfig.colors.text.banner.description ??= {};
1505
+ resolvedConfig.colors.text.banner.description.primary = resolvedConfig.colors.text.body.primary;
1506
+ }
1507
+ if (!resolvedConfig.colors.text?.banner?.link?.primary && resolvedConfig.colors.text?.body?.link) {
1508
+ resolvedConfig.colors.text.banner.link ??= {};
1509
+ resolvedConfig.colors.text.banner.link.primary = resolvedConfig.colors.text.body.link;
1510
+ }
1511
+ if (!resolvedConfig.colors.text?.banner?.title?.secondary && resolvedConfig.colors.text?.banner?.title?.primary) {
1512
+ resolvedConfig.colors.text.banner.title ??= {};
1513
+ resolvedConfig.colors.text.banner.title.secondary = resolvedConfig.colors.text.banner.title.primary;
1514
+ }
1515
+ if (!resolvedConfig.colors.text?.banner?.command?.secondary && resolvedConfig.colors.text?.banner?.command?.primary) {
1516
+ resolvedConfig.colors.text.banner.command ??= {};
1517
+ resolvedConfig.colors.text.banner.command.secondary = resolvedConfig.colors.text.banner.command.primary;
1518
+ }
1519
+ if (!resolvedConfig.colors.text?.banner?.description?.secondary && resolvedConfig.colors.text?.banner?.description?.primary) {
1520
+ resolvedConfig.colors.text.banner.description ??= {};
1521
+ resolvedConfig.colors.text.banner.description.secondary = resolvedConfig.colors.text.banner.description.primary;
1522
+ }
1523
+ if (!resolvedConfig.colors.text?.banner?.link?.secondary && resolvedConfig.colors.text?.banner?.link?.primary) {
1524
+ resolvedConfig.colors.text.banner.link ??= {};
1525
+ resolvedConfig.colors.text.banner.link.secondary = resolvedConfig.colors.text.banner.link.primary;
1526
+ }
1527
+ if (!resolvedConfig.colors.text?.banner?.title?.tertiary && resolvedConfig.colors.text?.banner?.title?.secondary) {
1528
+ resolvedConfig.colors.text.banner.title ??= {};
1529
+ resolvedConfig.colors.text.banner.title.tertiary = resolvedConfig.colors.text.banner.title.secondary;
1530
+ }
1531
+ if (!resolvedConfig.colors.text?.banner?.command?.tertiary && resolvedConfig.colors.text?.banner?.command?.secondary) {
1532
+ resolvedConfig.colors.text.banner.command ??= {};
1533
+ resolvedConfig.colors.text.banner.command.tertiary = resolvedConfig.colors.text.banner.command.secondary;
1534
+ }
1535
+ if (!resolvedConfig.colors.text?.banner?.description?.tertiary && resolvedConfig.colors.text?.banner?.description?.secondary) {
1536
+ resolvedConfig.colors.text.banner.description ??= {};
1537
+ resolvedConfig.colors.text.banner.description.tertiary = resolvedConfig.colors.text.banner.description.secondary;
1538
+ }
1539
+ if (!resolvedConfig.colors.text?.banner?.link?.tertiary && resolvedConfig.colors.text?.banner?.link?.secondary) {
1540
+ resolvedConfig.colors.text.banner.link ??= {};
1541
+ resolvedConfig.colors.text.banner.link.tertiary = resolvedConfig.colors.text.banner.link.secondary;
1542
+ }
1543
+ if (!resolvedConfig.colors.border?.banner?.outline?.primary && (resolvedConfig.colors.border?.banner?.outline?.secondary || resolvedConfig.colors.border?.banner?.outline?.tertiary)) resolvedConfig.colors.border.banner.outline.primary = resolvedConfig.colors.border.banner.outline.secondary || resolvedConfig.colors.border.banner.outline.tertiary;
1544
+ if (!resolvedConfig.colors.border?.banner?.outline?.secondary && (resolvedConfig.colors.border?.banner?.outline?.primary || resolvedConfig.colors.border?.banner?.outline?.tertiary)) resolvedConfig.colors.border.banner.outline.secondary = resolvedConfig.colors.border.banner.outline.primary || resolvedConfig.colors.border.banner.outline.tertiary;
1545
+ if (!resolvedConfig.colors.border?.banner?.outline?.tertiary && (resolvedConfig.colors.border?.banner?.outline?.primary || resolvedConfig.colors.border?.banner?.outline?.secondary)) resolvedConfig.colors.border.banner.outline.tertiary = resolvedConfig.colors.border.banner.outline.primary || resolvedConfig.colors.border.banner.outline.secondary;
1546
+ if (!resolvedConfig.colors.text?.banner?.header?.primary && resolvedConfig.colors.border?.banner?.outline?.primary) {
1547
+ resolvedConfig.colors.text.banner.header ??= {};
1548
+ resolvedConfig.colors.text.banner.header.primary = resolvedConfig.colors.border.banner.outline.primary;
1549
+ }
1550
+ if (!resolvedConfig.colors.text?.banner?.footer?.primary && resolvedConfig.colors.border?.banner?.outline?.primary) {
1551
+ resolvedConfig.colors.text.banner.footer ??= {};
1552
+ resolvedConfig.colors.text.banner.footer.primary = resolvedConfig.colors.border.banner.outline.primary;
1553
+ }
1554
+ if (!resolvedConfig.colors.text?.banner?.header?.secondary && resolvedConfig.colors.border?.banner?.outline?.secondary) {
1555
+ resolvedConfig.colors.text.banner.header ??= {};
1556
+ resolvedConfig.colors.text.banner.header.secondary = resolvedConfig.colors.border.banner.outline.secondary;
1557
+ }
1558
+ if (!resolvedConfig.colors.text?.banner?.footer?.secondary && resolvedConfig.colors.border?.banner?.outline?.secondary) {
1559
+ resolvedConfig.colors.text.banner.footer ??= {};
1560
+ resolvedConfig.colors.text.banner.footer.secondary = resolvedConfig.colors.border.banner.outline.secondary;
1561
+ }
1562
+ if (!resolvedConfig.colors.text?.banner?.header?.tertiary && resolvedConfig.colors.border?.banner?.outline?.tertiary) {
1563
+ resolvedConfig.colors.text.banner.header ??= {};
1564
+ resolvedConfig.colors.text.banner.header.tertiary = resolvedConfig.colors.border.banner.outline.tertiary;
1565
+ }
1566
+ if (!resolvedConfig.colors.text?.banner?.footer?.tertiary && resolvedConfig.colors.border?.banner?.outline?.tertiary) {
1567
+ resolvedConfig.colors.text.banner.footer ??= {};
1568
+ resolvedConfig.colors.text.banner.footer.tertiary = resolvedConfig.colors.border.banner.outline.tertiary;
1569
+ }
1570
+ if (!resolvedConfig.colors.border?.banner?.outline?.primary && resolvedConfig.colors.text?.banner?.title?.primary) resolvedConfig.colors.border.banner.outline.primary = resolvedConfig.colors.text.banner.title.primary;
1571
+ if (!resolvedConfig.colors.border?.app?.divider?.primary && resolvedConfig.colors.border?.app?.blockquote?.primary) resolvedConfig.colors.border.app.divider.primary = resolvedConfig.colors.border.app.blockquote.primary;
1572
+ if (!resolvedConfig.colors.border?.app?.divider?.secondary && resolvedConfig.colors.border?.app?.blockquote?.secondary) resolvedConfig.colors.border.app.divider.secondary = resolvedConfig.colors.border.app.blockquote.secondary;
1573
+ if (!resolvedConfig.colors.border?.app?.divider?.tertiary && resolvedConfig.colors.border?.app?.blockquote?.tertiary) resolvedConfig.colors.border.app.divider.tertiary = resolvedConfig.colors.border.app.blockquote.tertiary;
1574
+ if (!resolvedConfig.colors.border?.app?.blockquote?.primary && resolvedConfig.colors.border?.app?.divider?.primary) resolvedConfig.colors.border.app.blockquote.primary = resolvedConfig.colors.border.app.divider.primary;
1575
+ if (!resolvedConfig.colors.border?.app?.blockquote?.secondary && resolvedConfig.colors.border?.app?.divider?.secondary) resolvedConfig.colors.border.app.blockquote.secondary = resolvedConfig.colors.border.app.divider.secondary;
1576
+ if (!resolvedConfig.colors.border?.app?.blockquote?.tertiary && resolvedConfig.colors.border?.app?.divider?.tertiary) resolvedConfig.colors.border.app.blockquote.tertiary = resolvedConfig.colors.border.app.divider.tertiary;
1577
+ if (!resolvedConfig.colors.border?.app?.divider?.primary && (resolvedConfig.colors.border?.app?.divider?.secondary || resolvedConfig.colors.border?.app?.divider?.tertiary)) resolvedConfig.colors.border.app.divider.primary = resolvedConfig.colors.border.app.divider.secondary || resolvedConfig.colors.border.app.divider.tertiary;
1578
+ if (!resolvedConfig.colors.border?.app?.divider?.secondary && (resolvedConfig.colors.border?.app?.divider?.primary || resolvedConfig.colors.border?.app?.divider?.tertiary)) resolvedConfig.colors.border.app.divider.secondary = resolvedConfig.colors.border.app.divider.primary || resolvedConfig.colors.border.app.divider.tertiary;
1579
+ if (!resolvedConfig.colors.border?.app?.divider?.tertiary && (resolvedConfig.colors.border?.app?.divider?.primary || resolvedConfig.colors.border?.app?.divider?.secondary)) resolvedConfig.colors.border.app.divider.tertiary = resolvedConfig.colors.border.app.divider.primary || resolvedConfig.colors.border.app.divider.secondary;
1580
+ if (!resolvedConfig.colors.border?.app?.blockquote?.primary && (resolvedConfig.colors.border?.app?.blockquote?.secondary || resolvedConfig.colors.border?.app?.blockquote?.tertiary)) resolvedConfig.colors.border.app.blockquote.primary = resolvedConfig.colors.border.app.blockquote.secondary || resolvedConfig.colors.border.app.blockquote.tertiary;
1581
+ if (!resolvedConfig.colors.border?.app?.blockquote?.secondary && (resolvedConfig.colors.border?.app?.blockquote?.primary || resolvedConfig.colors.border?.app?.blockquote?.tertiary)) resolvedConfig.colors.border.app.blockquote.secondary = resolvedConfig.colors.border.app.blockquote.primary || resolvedConfig.colors.border.app.blockquote.tertiary;
1582
+ if (!resolvedConfig.colors.border?.app?.blockquote?.tertiary && (resolvedConfig.colors.border?.app?.blockquote?.primary || resolvedConfig.colors.border?.app?.blockquote?.secondary)) resolvedConfig.colors.border.app.blockquote.tertiary = resolvedConfig.colors.border.app.blockquote.primary || resolvedConfig.colors.border.app.blockquote.secondary;
1583
+ if (!resolvedConfig.colors.border?.app?.table?.primary && (resolvedConfig.colors.border?.app?.table?.secondary || resolvedConfig.colors.border?.app?.table?.tertiary)) resolvedConfig.colors.border.app.table.primary = resolvedConfig.colors.border.app.table.secondary || resolvedConfig.colors.border.app.table.tertiary;
1584
+ if (!resolvedConfig.colors.border?.app?.table?.secondary && (resolvedConfig.colors.border?.app?.table?.primary || resolvedConfig.colors.border?.app?.table?.tertiary)) resolvedConfig.colors.border.app.table.secondary = resolvedConfig.colors.border.app.table.primary || resolvedConfig.colors.border.app.table.tertiary;
1585
+ if (!resolvedConfig.colors.border?.app?.table?.tertiary && (resolvedConfig.colors.border?.app?.table?.primary || resolvedConfig.colors.border?.app?.table?.secondary)) resolvedConfig.colors.border.app.table.tertiary = resolvedConfig.colors.border.app.table.primary || resolvedConfig.colors.border.app.table.secondary;
1586
+ if (!resolvedConfig.colors.border?.message?.divider?.info && resolvedConfig.colors.border?.message?.divider?.debug) resolvedConfig.colors.border.message.divider.info = resolvedConfig.colors.border.message.divider.debug;
1587
+ if (!resolvedConfig.colors.border?.message?.divider?.debug && resolvedConfig.colors.border?.message?.divider?.info) resolvedConfig.colors.border.message.divider.debug = resolvedConfig.colors.border.message.divider.info;
1588
+ if (!resolvedConfig.colors.border?.message?.outline?.info && resolvedConfig.colors.border?.message?.outline?.debug) resolvedConfig.colors.border.message.outline.info = resolvedConfig.colors.border.message.outline.debug;
1589
+ if (!resolvedConfig.colors.border?.message?.outline?.debug && resolvedConfig.colors.border?.message?.outline?.info) resolvedConfig.colors.border.message.outline.debug = resolvedConfig.colors.border.message.outline.info;
1590
+ if (!resolvedConfig.colors.border?.message?.divider?.error && resolvedConfig.colors.border?.message?.divider?.danger) resolvedConfig.colors.border.message.divider.error = resolvedConfig.colors.border.message.divider.danger;
1591
+ if (!resolvedConfig.colors.border?.message?.divider?.danger && resolvedConfig.colors.border?.message?.divider?.error) resolvedConfig.colors.border.message.divider.danger = resolvedConfig.colors.border.message.divider.error;
1592
+ if (!resolvedConfig.colors.border?.message?.outline?.error && resolvedConfig.colors.border?.message?.outline?.danger) resolvedConfig.colors.border.message.outline.error = resolvedConfig.colors.border.message.outline.danger;
1593
+ if (!resolvedConfig.colors.border?.message?.outline?.danger && resolvedConfig.colors.border?.message?.outline?.error) resolvedConfig.colors.border.message.outline.danger = resolvedConfig.colors.border.message.outline.error;
1594
+ if (!resolvedConfig.colors.border?.message?.divider?.help && resolvedConfig.colors.border?.message?.outline?.help) resolvedConfig.colors.border.message.divider.help = resolvedConfig.colors.border.message.outline.help;
1595
+ if (!resolvedConfig.colors.border?.message?.divider?.success && resolvedConfig.colors.border?.message?.outline?.success) resolvedConfig.colors.border.message.divider.success = resolvedConfig.colors.border.message.outline.success;
1596
+ if (!resolvedConfig.colors.border?.message?.divider?.info && resolvedConfig.colors.border?.message?.outline?.info) resolvedConfig.colors.border.message.divider.info = resolvedConfig.colors.border.message.outline.info;
1597
+ if (!resolvedConfig.colors.border?.message?.divider?.debug && resolvedConfig.colors.border?.message?.outline?.debug) resolvedConfig.colors.border.message.divider.debug = resolvedConfig.colors.border.message.outline.debug;
1598
+ if (!resolvedConfig.colors.border?.message?.divider?.warning && resolvedConfig.colors.border?.message?.outline?.warning) resolvedConfig.colors.border.message.divider.warning = resolvedConfig.colors.border.message.outline.warning;
1599
+ if (!resolvedConfig.colors.border?.message?.divider?.danger && resolvedConfig.colors.border?.message?.outline?.danger) resolvedConfig.colors.border.message.divider.danger = resolvedConfig.colors.border.message.outline.danger;
1600
+ if (!resolvedConfig.colors.border?.message?.divider?.error && resolvedConfig.colors.border?.message?.outline?.error) resolvedConfig.colors.border.message.divider.error = resolvedConfig.colors.border.message.outline.error;
1601
+ if (!resolvedConfig.colors.text.message?.header?.help && resolvedConfig.colors.border?.message?.outline?.help) resolvedConfig.colors.text.message.header.help = resolvedConfig.colors.border.message.outline.help;
1602
+ if (!resolvedConfig.colors.text.message?.footer?.help && resolvedConfig.colors.border?.message?.outline?.help) resolvedConfig.colors.text.message.footer.help = resolvedConfig.colors.border.message.outline.help;
1603
+ if (!resolvedConfig.colors.text.message?.header?.success && resolvedConfig.colors.border?.message?.outline?.success) resolvedConfig.colors.text.message.header.success = resolvedConfig.colors.border.message.outline.success;
1604
+ if (!resolvedConfig.colors.text.message.footer.success && resolvedConfig.colors.border?.message?.outline?.success) resolvedConfig.colors.text.message.footer.success = resolvedConfig.colors.border.message.outline.success;
1605
+ if (!resolvedConfig.colors.text.message?.header?.info && resolvedConfig.colors.border?.message?.outline?.info) resolvedConfig.colors.text.message.header.info = resolvedConfig.colors.border.message.outline.info;
1606
+ if (!resolvedConfig.colors.text.message?.footer?.info && resolvedConfig.colors.border?.message?.outline?.info) resolvedConfig.colors.text.message.footer.info = resolvedConfig.colors.border.message.outline.info;
1607
+ if (!resolvedConfig.colors.text.message?.header?.debug && resolvedConfig.colors.border?.message?.outline?.debug) resolvedConfig.colors.text.message.header.debug = resolvedConfig.colors.border.message.outline.debug;
1608
+ if (!resolvedConfig.colors.text.message?.footer?.debug && resolvedConfig.colors.border?.message?.outline?.debug) resolvedConfig.colors.text.message.footer.debug = resolvedConfig.colors.border.message.outline.debug;
1609
+ if (!resolvedConfig.colors.text.message?.header?.warning && resolvedConfig.colors.border?.message?.outline?.warning) resolvedConfig.colors.text.message.header.warning = resolvedConfig.colors.border.message.outline.warning;
1610
+ if (!resolvedConfig.colors.text.message?.footer?.warning && resolvedConfig.colors.border?.message?.outline?.warning) resolvedConfig.colors.text.message.footer.warning = resolvedConfig.colors.border.message.outline.warning;
1611
+ if (!resolvedConfig.colors.text.message?.header?.danger && resolvedConfig.colors.border?.message?.outline?.danger) resolvedConfig.colors.text.message.header.danger = resolvedConfig.colors.border.message.outline.danger;
1612
+ if (!resolvedConfig.colors.text.message?.footer?.danger && resolvedConfig.colors.border?.message?.outline?.danger) resolvedConfig.colors.text.message.footer.danger = resolvedConfig.colors.border.message.outline.danger;
1613
+ if (!resolvedConfig.colors.text.message?.header?.error && resolvedConfig.colors.border?.message?.outline?.error) resolvedConfig.colors.text.message.header.error = resolvedConfig.colors.border.message.outline.error;
1614
+ if (!resolvedConfig.colors.text.message?.footer?.error && resolvedConfig.colors.border?.message?.outline?.error) resolvedConfig.colors.text.message.footer.error = resolvedConfig.colors.border.message.outline.error;
1615
+ if (!resolvedConfig.colors.text.message?.header?.debug && resolvedConfig.colors.text.message?.header?.info) resolvedConfig.colors.text.message.header.debug = resolvedConfig.colors.text.message.header.info;
1616
+ if (!resolvedConfig.colors.text.message?.footer?.debug && resolvedConfig.colors.text.message?.footer?.info) resolvedConfig.colors.text.message.footer.debug = resolvedConfig.colors.text.message.footer.info;
1617
+ if (!resolvedConfig.colors.text.message?.link?.help && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.help = resolvedConfig.colors.text.body.link;
1618
+ if (!resolvedConfig.colors.text.message?.link?.success && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.success = resolvedConfig.colors.text.body.link;
1619
+ if (!resolvedConfig.colors.text.message?.link?.info && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.info = resolvedConfig.colors.text.body.link;
1620
+ if (!resolvedConfig.colors.text.message?.link?.debug && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.debug = resolvedConfig.colors.text.body.link;
1621
+ if (!resolvedConfig.colors.text.message?.link?.warning && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.warning = resolvedConfig.colors.text.body.link;
1622
+ if (!resolvedConfig.colors.text.message?.link?.danger && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.danger = resolvedConfig.colors.text.body.link;
1623
+ if (!resolvedConfig.colors.text.message?.link?.error && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.error = resolvedConfig.colors.text.body.link;
1624
+ if (!resolvedConfig.colors.text.prompt.icon?.active && resolvedConfig.colors.text?.banner?.title?.primary) resolvedConfig.colors.text.prompt.icon.active = resolvedConfig.colors.text.banner.title.primary;
1625
+ if (!resolvedConfig.colors.text.prompt.icon?.submitted && resolvedConfig.colors.text?.message?.header?.success) resolvedConfig.colors.text.prompt.icon.submitted = resolvedConfig.colors.text.message.header.success;
1626
+ if (!resolvedConfig.colors.text.prompt.icon?.warning && resolvedConfig.colors.text?.message?.header?.warning) resolvedConfig.colors.text.prompt.icon.warning = resolvedConfig.colors.text.message.header.warning;
1627
+ if (!resolvedConfig.colors.text.prompt.icon?.error && resolvedConfig.colors.text?.message?.header?.error) resolvedConfig.colors.text.prompt.icon.error = resolvedConfig.colors.text.message.header.error;
1628
+ if (!resolvedConfig.colors.text.prompt.icon?.disabled && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.prompt.icon.disabled = resolvedConfig.colors.text.body.tertiary;
1629
+ if (!resolvedConfig.colors.text.prompt.icon?.cancelled && resolvedConfig.colors.text.prompt.icon?.disabled) resolvedConfig.colors.text.prompt.icon.cancelled = resolvedConfig.colors.text.prompt.icon.disabled;
1630
+ if (!resolvedConfig.colors.text.prompt.message?.active && resolvedConfig.colors.text?.body?.primary) resolvedConfig.colors.text.prompt.message.active = resolvedConfig.colors.text.body.primary;
1631
+ if (!resolvedConfig.colors.text.prompt.message?.submitted && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.prompt.message.submitted = resolvedConfig.colors.text.body.tertiary;
1632
+ if (!resolvedConfig.colors.text.prompt.message?.warning && resolvedConfig.colors.text.prompt.message?.active) resolvedConfig.colors.text.prompt.message.warning = resolvedConfig.colors.text.prompt.message.active;
1633
+ if (!resolvedConfig.colors.text.prompt.message?.error && resolvedConfig.colors.text.prompt.message?.active) resolvedConfig.colors.text.prompt.message.error = resolvedConfig.colors.text.prompt.message.active;
1634
+ if (!resolvedConfig.colors.text.prompt.message?.disabled && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.prompt.message.disabled = resolvedConfig.colors.text.body.tertiary;
1635
+ if (!resolvedConfig.colors.text.prompt.message?.cancelled && resolvedConfig.colors.text.prompt.message?.disabled) resolvedConfig.colors.text.prompt.message.cancelled = resolvedConfig.colors.text.prompt.message.disabled;
1636
+ if (!resolvedConfig.colors.text.prompt.input?.active && resolvedConfig.colors.text?.heading?.primary) resolvedConfig.colors.text.prompt.input.active = resolvedConfig.colors.text.heading.primary;
1637
+ if (!resolvedConfig.colors.text.prompt.input?.inactive && resolvedConfig.colors.text?.heading?.secondary) resolvedConfig.colors.text.prompt.input.inactive = resolvedConfig.colors.text.heading.secondary;
1638
+ if (!resolvedConfig.colors.text.prompt.input?.submitted && resolvedConfig.colors.text?.heading?.tertiary) resolvedConfig.colors.text.prompt.message.submitted = resolvedConfig.colors.text.heading.tertiary;
1639
+ if (!resolvedConfig.colors.text.prompt.message?.warning && resolvedConfig.colors.text.prompt.message?.active) resolvedConfig.colors.text.prompt.message.warning = resolvedConfig.colors.text.prompt.message.active;
1640
+ if (!resolvedConfig.colors.text.prompt.message?.error && resolvedConfig.colors.text.prompt.message?.active) resolvedConfig.colors.text.prompt.message.error = resolvedConfig.colors.text.prompt.message.active;
1641
+ if (!resolvedConfig.colors.text.prompt.message?.disabled && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.prompt.message.disabled = resolvedConfig.colors.text.body.tertiary;
1642
+ if (!resolvedConfig.colors.text.prompt.message?.cancelled && resolvedConfig.colors.text.prompt.message?.disabled) resolvedConfig.colors.text.prompt.message.cancelled = resolvedConfig.colors.text.prompt.message.disabled;
1643
+ if (!resolvedConfig.colors.text.prompt.description?.active && resolvedConfig.colors.text?.heading?.primary) resolvedConfig.colors.text.prompt.description.active = resolvedConfig.colors.text.heading.primary;
1644
+ if (!resolvedConfig.colors.text.prompt.description?.inactive && resolvedConfig.colors.text?.heading?.secondary) resolvedConfig.colors.text.prompt.description.inactive = resolvedConfig.colors.text.heading.secondary;
1645
+ if (!resolvedConfig.colors.text.prompt.description?.submitted && resolvedConfig.colors.text?.heading?.tertiary) resolvedConfig.colors.text.prompt.description.submitted = resolvedConfig.colors.text.heading.tertiary;
1646
+ if (!resolvedConfig.colors.text.prompt.description?.warning && resolvedConfig.colors.text?.body?.secondary) resolvedConfig.colors.text.prompt.description.warning = resolvedConfig.colors.text.body.secondary;
1647
+ if (!resolvedConfig.colors.text.prompt.description?.error && resolvedConfig.colors.text.prompt.icon?.error) resolvedConfig.colors.text.prompt.description.error = resolvedConfig.colors.text.prompt.icon.error;
1648
+ if (!resolvedConfig.colors.text.prompt.description?.disabled && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.prompt.description.disabled = resolvedConfig.colors.text.body.tertiary;
1649
+ if (!resolvedConfig.colors.text.prompt.description?.cancelled && resolvedConfig.colors.text.prompt.description?.disabled) resolvedConfig.colors.text.prompt.description.cancelled = resolvedConfig.colors.text.prompt.description.disabled;
1650
+ if (!resolvedConfig.colors.text.prompt.input?.cancelled && resolvedConfig.colors.text.prompt.input?.disabled) resolvedConfig.colors.text.prompt.input.cancelled = resolvedConfig.colors.text.prompt.input.disabled;
1651
+ if (!resolvedConfig.colors.text.prompt.input?.placeholder && resolvedConfig.colors.text.prompt.input?.disabled) resolvedConfig.colors.text.prompt.input.placeholder = resolvedConfig.colors.text.prompt.input.disabled;
1652
+ if (!resolvedConfig.colors.text.prompt.input?.disabled && resolvedConfig.colors.text.prompt.input?.placeholder) resolvedConfig.colors.text.prompt.input.disabled = resolvedConfig.colors.text.prompt.input.placeholder;
1653
+ if (!resolvedConfig.colors.text.spinner.icon?.active && resolvedConfig.colors.text.spinner.message?.active) resolvedConfig.colors.text.spinner.icon.active = resolvedConfig.colors.text.spinner.message.active;
1654
+ if (!resolvedConfig.colors.text.spinner.icon?.success && resolvedConfig.colors.text.spinner.message?.success) resolvedConfig.colors.text.spinner.icon.success = resolvedConfig.colors.text.spinner.message.success;
1655
+ if (!resolvedConfig.colors.text.spinner.icon?.error && resolvedConfig.colors.text?.spinner?.message?.error) resolvedConfig.colors.text.spinner.icon.error = resolvedConfig.colors.text.spinner.message.error;
1656
+ if (!resolvedConfig.colors.text.spinner.icon?.help && resolvedConfig.colors.text.spinner.message?.help) resolvedConfig.colors.text.spinner.icon.help = resolvedConfig.colors.text.spinner.message.help;
1657
+ if (!resolvedConfig.colors.text.spinner.icon?.info && resolvedConfig.colors.text.spinner.message?.info) resolvedConfig.colors.text.spinner.icon.info = resolvedConfig.colors.text.spinner.message.info;
1658
+ if (!resolvedConfig.colors.text.spinner.icon?.warning && resolvedConfig.colors.text.spinner.message?.warning) resolvedConfig.colors.text.spinner.icon.warning = resolvedConfig.colors.text.spinner.message.warning;
1659
+ if (!resolvedConfig.colors.text.spinner.icon?.active && resolvedConfig.colors.text?.banner?.title?.primary) resolvedConfig.colors.text.spinner.icon.active = resolvedConfig.colors.text.banner.title.primary;
1660
+ if (!resolvedConfig.colors.text.spinner.icon?.success && resolvedConfig.colors.text?.message?.header?.success) resolvedConfig.colors.text.spinner.icon.success = resolvedConfig.colors.text.message.header.success;
1661
+ if (!resolvedConfig.colors.text.spinner.icon?.error && resolvedConfig.colors.text?.message?.header?.error) resolvedConfig.colors.text.spinner.icon.error = resolvedConfig.colors.text.message.header.error;
1662
+ if (!resolvedConfig.colors.text.spinner.icon?.help && resolvedConfig.colors.text?.message?.header?.help) resolvedConfig.colors.text.spinner.icon.help = resolvedConfig.colors.text.message.header.help;
1663
+ if (!resolvedConfig.colors.text.spinner.icon?.info && resolvedConfig.colors.text?.message?.header?.info) resolvedConfig.colors.text.spinner.icon.info = resolvedConfig.colors.text.message.header.info;
1664
+ if (!resolvedConfig.colors.text.spinner.icon?.warning && resolvedConfig.colors.text?.message?.header?.warning) resolvedConfig.colors.text.spinner.icon.warning = resolvedConfig.colors.text.message.header.warning;
1665
+ if (!resolvedConfig.colors.text.spinner.message?.active && resolvedConfig.colors.text?.spinner?.icon?.active) resolvedConfig.colors.text.spinner.message.active = resolvedConfig.colors.text.spinner.icon.active;
1666
+ if (!resolvedConfig.colors.text.spinner.message?.success && resolvedConfig.colors.text?.spinner?.icon?.success) resolvedConfig.colors.text.spinner.message.success = resolvedConfig.colors.text.spinner.icon.success;
1667
+ if (!resolvedConfig.colors.text.spinner.message?.error && resolvedConfig.colors.text?.spinner?.icon?.error) resolvedConfig.colors.text.spinner.message.error = resolvedConfig.colors.text.spinner.icon.error;
1668
+ if (!resolvedConfig.colors.text.spinner.message?.help && resolvedConfig.colors.text?.spinner?.icon?.help) resolvedConfig.colors.text.spinner.message.help = resolvedConfig.colors.text.spinner.icon.help;
1669
+ if (!resolvedConfig.colors.text.spinner.message?.info && resolvedConfig.colors.text?.spinner?.icon?.info) resolvedConfig.colors.text.spinner.message.info = resolvedConfig.colors.text.spinner.icon.info;
1670
+ if (!resolvedConfig.colors.text.spinner.message?.warning && resolvedConfig.colors.text?.spinner?.icon?.warning) resolvedConfig.colors.text.spinner.message.warning = resolvedConfig.colors.text.spinner.icon.warning;
1671
+ mergeThemes(context, resolvedConfig);
1672
+ return dictionary;
1673
+ }
1674
+ });
1675
+
1676
+ //#endregion
1677
+ //#region src/style-dictionary/icons.ts
1678
+ /**
1679
+ * Shell Shock - Theme Icons Preprocessor
1680
+ *
1681
+ * @remarks
1682
+ * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.
1683
+ */
1684
+ const icons = (context) => ({
1685
+ name: "shell-shock/icons",
1686
+ preprocessor: (dictionary, _options) => {
1687
+ const resolvedConfig = {};
1688
+ resolvedConfig.name = dictionary.$theme ?? context.config.name;
1689
+ resolvedConfig.icons ??= {
1690
+ link: {},
1691
+ message: { header: {} },
1692
+ banner: { header: {} },
1693
+ prompt: {}
1694
+ };
1695
+ const icons = dictionary.icons;
1696
+ if (isSetString(icons)) resolvedConfig.icons = {
1697
+ link: { external: icons },
1698
+ message: { header: {
1699
+ help: icons,
1700
+ success: icons,
1701
+ info: icons,
1702
+ debug: icons,
1703
+ warning: icons,
1704
+ danger: icons,
1705
+ error: icons
1706
+ } },
1707
+ banner: { header: {
1708
+ primary: icons,
1709
+ secondary: icons,
1710
+ tertiary: icons
1711
+ } },
1712
+ prompt: {
1713
+ active: icons,
1714
+ cancelled: icons,
1715
+ warning: icons,
1716
+ error: icons,
1717
+ submitted: icons,
1718
+ disabled: icons
1719
+ },
1720
+ spinner: {
1721
+ help: icons,
1722
+ success: icons,
1723
+ info: icons,
1724
+ warning: icons,
1725
+ error: icons
1726
+ }
1727
+ };
1728
+ else if (isSetObject(icons)) {
1729
+ resolvedConfig.icons.link ??= {};
1730
+ const app = icons.link;
1731
+ if (isSetString(app)) resolvedConfig.icons.link = { external: app };
1732
+ else if (isSetObject(app)) {
1733
+ if (isSetString(app.external)) resolvedConfig.icons.link.external = app.external;
1734
+ }
1735
+ resolvedConfig.icons.message = {};
1736
+ const message = icons.message;
1737
+ if (isSetString(message)) resolvedConfig.icons.message = { header: {
1738
+ help: message,
1739
+ success: message,
1740
+ info: message,
1741
+ debug: message,
1742
+ warning: message,
1743
+ danger: message,
1744
+ error: message
1745
+ } };
1746
+ else if (isSetObject(message)) {
1747
+ resolvedConfig.icons.message.header ??= {};
1748
+ const header = message.header;
1749
+ if (isSetString(header)) resolvedConfig.icons.message = { header: {
1750
+ help: header,
1751
+ success: header,
1752
+ info: header,
1753
+ debug: header,
1754
+ warning: header,
1755
+ danger: header,
1756
+ error: header
1757
+ } };
1758
+ else if (isSetObject(header)) {
1759
+ if (isSetString(header.help)) resolvedConfig.icons.message.header.help = header.help;
1760
+ if (isSetString(header.success)) resolvedConfig.icons.message.header.success = header.success;
1761
+ if (isSetString(header.info)) resolvedConfig.icons.message.header.info = header.info;
1762
+ if (isSetString(header.debug)) resolvedConfig.icons.message.header.debug = header.debug;
1763
+ if (isSetString(header.warning)) resolvedConfig.icons.message.header.warning = header.warning;
1764
+ if (isSetString(header.danger)) resolvedConfig.icons.message.header.danger = header.danger;
1765
+ if (isSetString(header.error)) resolvedConfig.icons.message.header.error = header.error;
1766
+ }
1767
+ }
1768
+ resolvedConfig.icons.banner ??= { header: {} };
1769
+ const banner = icons.banner;
1770
+ if (isSetString(banner)) resolvedConfig.icons.banner = { header: {
1771
+ primary: banner,
1772
+ secondary: banner,
1773
+ tertiary: banner
1774
+ } };
1775
+ else if (isSetObject(banner)) {
1776
+ resolvedConfig.icons.banner.header ??= {};
1777
+ const header = banner.header;
1778
+ if (isSetString(banner.header)) resolvedConfig.icons.banner = { header: {
1779
+ primary: banner.header,
1780
+ secondary: banner.header,
1781
+ tertiary: banner.header
1782
+ } };
1783
+ else if (isSetObject(banner.header)) {
1784
+ if (isSetString(header.primary)) resolvedConfig.icons.banner.header.primary = header.primary;
1785
+ if (isSetString(header.secondary)) resolvedConfig.icons.banner.header.secondary = header.secondary;
1786
+ if (isSetString(header.tertiary)) resolvedConfig.icons.banner.header.tertiary = header.tertiary;
1787
+ }
1788
+ }
1789
+ resolvedConfig.icons.prompt ??= {};
1790
+ const prompt = icons.prompt;
1791
+ if (isSetString(prompt)) resolvedConfig.icons.prompt = {
1792
+ active: prompt,
1793
+ cancelled: prompt,
1794
+ error: prompt,
1795
+ warning: prompt,
1796
+ submitted: prompt,
1797
+ disabled: prompt
1798
+ };
1799
+ else if (isSetObject(prompt)) {
1800
+ if (isSetString(prompt.active)) resolvedConfig.icons.prompt.active = prompt.active;
1801
+ if (isSetString(prompt.cancelled)) resolvedConfig.icons.prompt.cancelled = prompt.cancelled;
1802
+ if (isSetString(prompt.error)) resolvedConfig.icons.prompt.error = prompt.error;
1803
+ if (isSetString(prompt.warning)) resolvedConfig.icons.prompt.warning = prompt.warning;
1804
+ if (isSetString(prompt.submitted)) resolvedConfig.icons.prompt.submitted = prompt.submitted;
1805
+ if (isSetString(prompt.disabled)) resolvedConfig.icons.prompt.disabled = prompt.disabled;
1806
+ }
1807
+ resolvedConfig.icons.spinner ??= {};
1808
+ const spinner = icons.spinner;
1809
+ if (isSetString(spinner)) resolvedConfig.icons.spinner = {
1810
+ help: spinner,
1811
+ success: spinner,
1812
+ info: spinner,
1813
+ warning: spinner,
1814
+ error: spinner
1815
+ };
1816
+ else if (isSetObject(spinner)) {
1817
+ if (isSetString(spinner.help)) resolvedConfig.icons.spinner.help = spinner.help;
1818
+ if (isSetString(spinner.success)) resolvedConfig.icons.spinner.success = spinner.success;
1819
+ if (isSetString(spinner.info)) resolvedConfig.icons.spinner.info = spinner.info;
1820
+ if (isSetString(spinner.warning)) resolvedConfig.icons.spinner.warning = spinner.warning;
1821
+ if (isSetString(spinner.error)) resolvedConfig.icons.spinner.error = spinner.error;
1822
+ }
1823
+ }
1824
+ if (!resolvedConfig.icons.prompt?.active && resolvedConfig.icons?.banner?.header?.primary) resolvedConfig.icons.prompt.active = resolvedConfig.icons.banner.header.primary;
1825
+ if (!resolvedConfig.icons.prompt?.submitted && resolvedConfig.icons.message?.header?.success) resolvedConfig.icons.prompt.submitted = resolvedConfig.icons.message.header.success;
1826
+ if (!resolvedConfig.icons.prompt?.warning && resolvedConfig.icons.message?.header?.warning) resolvedConfig.icons.prompt.warning = resolvedConfig.icons.message.header.warning;
1827
+ if (!resolvedConfig.icons.prompt?.error && resolvedConfig.icons.message?.header?.error) resolvedConfig.icons.prompt.error = resolvedConfig.icons.message.header.error;
1828
+ if (!resolvedConfig.icons.prompt?.cancelled && resolvedConfig.icons.message?.header?.error) resolvedConfig.icons.prompt.cancelled = resolvedConfig.icons.message.header.error;
1829
+ if (!resolvedConfig.icons.spinner?.success && resolvedConfig.icons.message?.header?.success) resolvedConfig.icons.spinner.success = resolvedConfig.icons.message.header.success;
1830
+ if (!resolvedConfig.icons.spinner?.warning && resolvedConfig.icons.message?.header?.warning) resolvedConfig.icons.spinner.warning = resolvedConfig.icons.message.header.warning;
1831
+ if (!resolvedConfig.icons.spinner?.error && resolvedConfig.icons.message?.header?.error) resolvedConfig.icons.spinner.error = resolvedConfig.icons.message.header.error;
1832
+ if (!resolvedConfig.icons.spinner?.info && resolvedConfig.icons.message?.header?.info) resolvedConfig.icons.spinner.info = resolvedConfig.icons.message.header.info;
1833
+ if (!resolvedConfig.icons.spinner?.help && resolvedConfig.icons.message?.header?.help) resolvedConfig.icons.spinner.help = resolvedConfig.icons.message.header.help;
1834
+ mergeThemes(context, resolvedConfig);
1835
+ return dictionary;
1836
+ }
1837
+ });
1838
+
1839
+ //#endregion
1840
+ //#region src/style-dictionary/labels.ts
1841
+ /**
1842
+ * Shell Shock - Theme Labels Preprocessor
1843
+ *
1844
+ * @remarks
1845
+ * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.
1846
+ */
1847
+ const labels = (context) => ({
1848
+ name: "shell-shock/labels",
1849
+ preprocessor: (dictionary, _options) => {
1850
+ const resolvedConfig = {};
1851
+ resolvedConfig.name = dictionary.$theme ?? context.config.name;
1852
+ resolvedConfig.labels ??= {
1853
+ message: {
1854
+ header: {},
1855
+ footer: {}
1856
+ },
1857
+ banner: {
1858
+ header: {},
1859
+ footer: {}
1860
+ }
1861
+ };
1862
+ const labels = dictionary.labels;
1863
+ if (isSetString(labels)) resolvedConfig.labels = {
1864
+ message: {
1865
+ header: {
1866
+ help: labels,
1867
+ success: labels,
1868
+ info: labels,
1869
+ debug: labels,
1870
+ warning: labels,
1871
+ danger: labels,
1872
+ error: labels
1873
+ },
1874
+ footer: {}
1875
+ },
1876
+ banner: {
1877
+ header: {
1878
+ primary: labels,
1879
+ secondary: labels,
1880
+ tertiary: labels
1881
+ },
1882
+ footer: {}
1883
+ }
1884
+ };
1885
+ else if (isSetObject(labels)) {
1886
+ resolvedConfig.labels.message ??= {};
1887
+ const message = labels?.message;
1888
+ if (isSetString(message)) resolvedConfig.labels.message = {
1889
+ header: {
1890
+ help: message,
1891
+ success: message,
1892
+ info: message,
1893
+ debug: message,
1894
+ warning: message,
1895
+ danger: message,
1896
+ error: message
1897
+ },
1898
+ footer: {}
1899
+ };
1900
+ else if (isSetObject(message)) {
1901
+ resolvedConfig.labels.message.header = {};
1902
+ resolvedConfig.labels.message.footer = {};
1903
+ const header = message.header;
1904
+ const footer = message.footer;
1905
+ if (isSetString(header)) resolvedConfig.labels.message.header = {
1906
+ help: header,
1907
+ success: header,
1908
+ info: header,
1909
+ debug: header,
1910
+ warning: header,
1911
+ danger: header,
1912
+ error: header
1913
+ };
1914
+ else if (isSetObject(header)) {
1915
+ if (isSetString(header.help)) resolvedConfig.labels.message.header.help = header.help;
1916
+ if (isSetString(header.success)) resolvedConfig.labels.message.header.success = header.success;
1917
+ if (isSetString(header.info)) resolvedConfig.labels.message.header.info = header.info;
1918
+ if (isSetString(header.debug)) resolvedConfig.labels.message.header.debug = header.debug;
1919
+ if (isSetString(header.warning)) resolvedConfig.labels.message.header.warning = header.warning;
1920
+ if (isSetString(header.danger)) resolvedConfig.labels.message.header.danger = header.danger;
1921
+ if (isSetString(header.error)) resolvedConfig.labels.message.header.error = header.error;
1922
+ }
1923
+ if (isSetString(footer)) resolvedConfig.labels.message.footer = {
1924
+ help: footer,
1925
+ success: footer,
1926
+ info: footer,
1927
+ debug: footer,
1928
+ warning: footer,
1929
+ danger: footer,
1930
+ error: footer
1931
+ };
1932
+ else if (isSetObject(footer)) {
1933
+ if (isSetString(footer.help)) resolvedConfig.labels.message.footer.help = footer.help;
1934
+ if (isSetString(footer.success)) resolvedConfig.labels.message.footer.success = footer.success;
1935
+ if (isSetString(footer.info)) resolvedConfig.labels.message.footer.info = footer.info;
1936
+ if (isSetString(footer.debug)) resolvedConfig.labels.message.footer.debug = footer.debug;
1937
+ if (isSetString(footer.warning)) resolvedConfig.labels.message.footer.warning = footer.warning;
1938
+ if (isSetString(footer.danger)) resolvedConfig.labels.message.footer.danger = footer.danger;
1939
+ if (isSetString(footer.error)) resolvedConfig.labels.message.footer.error = footer.error;
1940
+ }
1941
+ resolvedConfig.labels.banner ??= {};
1942
+ const banner = labels?.banner;
1943
+ if (isSetString(banner)) resolvedConfig.labels.banner = {
1944
+ header: {
1945
+ primary: banner,
1946
+ secondary: banner,
1947
+ tertiary: banner
1948
+ },
1949
+ footer: {}
1950
+ };
1951
+ else if (isSetObject(banner)) {
1952
+ resolvedConfig.labels.banner.header = {};
1953
+ resolvedConfig.labels.banner.footer = {};
1954
+ const header = banner.header;
1955
+ const footer = banner.footer;
1956
+ if (isSetString(header)) resolvedConfig.labels.banner.header = {
1957
+ primary: header,
1958
+ secondary: header,
1959
+ tertiary: header
1960
+ };
1961
+ else if (isSetObject(header)) {
1962
+ if (isSetString(header.primary)) resolvedConfig.labels.banner.header.primary = header.primary;
1963
+ if (isSetString(header.secondary)) resolvedConfig.labels.banner.header.secondary = header.secondary;
1964
+ if (isSetString(header.tertiary)) resolvedConfig.labels.banner.header.tertiary = header.tertiary;
1965
+ }
1966
+ if (isSetString(footer)) resolvedConfig.labels.banner.footer = {
1967
+ primary: footer,
1968
+ secondary: footer,
1969
+ tertiary: footer
1970
+ };
1971
+ else if (isSetObject(footer)) {
1972
+ if (isSetString(footer.primary)) resolvedConfig.labels.banner.footer.primary = footer.primary;
1973
+ if (isSetString(footer.secondary)) resolvedConfig.labels.banner.footer.secondary = footer.secondary;
1974
+ if (isSetString(footer.tertiary)) resolvedConfig.labels.banner.footer.tertiary = footer.tertiary;
1975
+ }
1976
+ }
1977
+ }
1978
+ }
1979
+ mergeThemes(context, resolvedConfig);
1980
+ return dictionary;
1981
+ }
1982
+ });
1983
+
1984
+ //#endregion
1985
+ //#region src/style-dictionary/padding.ts
1986
+ /**
1987
+ * Shell Shock - Theme Padding Preprocessor
1988
+ *
1989
+ * @remarks
1990
+ * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.
1991
+ */
1992
+ const padding = (context) => ({
1993
+ name: "shell-shock/padding",
1994
+ preprocessor: (dictionary, _options) => {
1995
+ const resolvedConfig = {};
1996
+ resolvedConfig.name = dictionary.$theme ?? context.config.name;
1997
+ resolvedConfig.padding ??= {};
1998
+ const padding = dictionary.padding;
1999
+ if (isNumber(padding)) resolvedConfig.padding = {
2000
+ banner: padding,
2001
+ message: padding,
2002
+ app: padding,
2003
+ table: padding
2004
+ };
2005
+ else if (isSetObject(padding)) {
2006
+ if (isNumber(padding.banner)) resolvedConfig.padding.banner = padding.banner;
2007
+ if (isNumber(padding.message)) resolvedConfig.padding.message = padding.message;
2008
+ if (isNumber(padding.app)) resolvedConfig.padding.app = padding.app;
2009
+ if (isNumber(padding.table)) resolvedConfig.padding.table = padding.table;
2010
+ }
2011
+ mergeThemes(context, resolvedConfig);
2012
+ return dictionary;
2013
+ }
2014
+ });
2015
+
2016
+ //#endregion
2017
+ //#region src/style-dictionary/settings.ts
2018
+ /**
2019
+ * Shell Shock - Theme Settings Preprocessor
2020
+ *
2021
+ * @remarks
2022
+ * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.
2023
+ */
2024
+ const settings = (context) => ({
2025
+ name: "shell-shock/settings",
2026
+ preprocessor: (dictionary, _options) => {
2027
+ const resolvedConfig = {};
2028
+ resolvedConfig.name = dictionary.$theme ?? context.config.name;
2029
+ resolvedConfig.settings ??= {};
2030
+ const settings = dictionary.settings;
2031
+ if (isSetObject(settings)) resolvedConfig.settings = { ...settings };
2032
+ mergeThemes(context, resolvedConfig);
2033
+ return dictionary;
2034
+ }
2035
+ });
2036
+
2037
+ //#endregion
2038
+ //#region src/style-dictionary/spinners.ts
2039
+ /**
2040
+ * Shell Shock - Theme Spinners Preprocessor
2041
+ *
2042
+ * @remarks
2043
+ * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.
2044
+ */
2045
+ const spinners = (context) => ({
2046
+ name: "shell-shock/spinners",
2047
+ preprocessor: (dictionary, _options) => {
2048
+ const resolvedConfig = {};
2049
+ resolvedConfig.name = dictionary.$theme ?? context.config.name;
2050
+ const spinner = dictionary.spinner;
2051
+ if (isSetString(spinner)) resolvedConfig.spinner = resolveSpinner(spinner);
2052
+ else if (isSetObject(spinner)) resolvedConfig.spinner = {
2053
+ interval: 80,
2054
+ ...spinner
2055
+ };
2056
+ mergeThemes(context, resolvedConfig);
2057
+ return dictionary;
2058
+ }
2059
+ });
2060
+
2061
+ //#endregion
2062
+ //#region src/themes/default.ts
2063
+ const theme = {
2064
+ $theme: "default",
2065
+ colors: {
2066
+ text: {
2067
+ banner: {
2068
+ title: "#ffffff",
2069
+ command: "#e3e7e8",
2070
+ description: "#9ca8ab"
2071
+ },
2072
+ heading: {
2073
+ primary: "#ffffff",
2074
+ secondary: "#e3e7e8",
2075
+ tertiary: "#9ca8ab"
2076
+ },
2077
+ body: {
2078
+ primary: "#9ca8ab",
2079
+ secondary: "#9ca8ab",
2080
+ tertiary: "#67787c",
2081
+ link: "#3fa6ff"
2082
+ },
2083
+ message: { description: "#e3e7e8" },
2084
+ usage: {
2085
+ bin: "#67787c",
2086
+ command: "#e3e7e8",
2087
+ dynamic: "#e3e7e8",
2088
+ options: "#67787c",
2089
+ args: "#67787c",
2090
+ description: "#67787c"
2091
+ },
2092
+ prompt: {
2093
+ icon: {
2094
+ active: "#3b82f6",
2095
+ warning: "#f3d371",
2096
+ error: "#d8314a",
2097
+ submitted: "#45b27e",
2098
+ cancelled: "#d8314a",
2099
+ disabled: "#4b585b"
2100
+ },
2101
+ message: {
2102
+ active: "#e3e7e8",
2103
+ warning: "#e3e7e8",
2104
+ error: "#e3e7e8",
2105
+ submitted: "#67787c",
2106
+ cancelled: "#67787c",
2107
+ disabled: "#4b585b"
2108
+ },
2109
+ input: {
2110
+ active: "#3b82f6",
2111
+ inactive: "#9ca8ab",
2112
+ warning: "#f3d371",
2113
+ error: "#d8314a",
2114
+ submitted: "#e3e7e8",
2115
+ cancelled: "#d8314a",
2116
+ placeholder: "#4b585b",
2117
+ disabled: "#4b585b"
2118
+ },
2119
+ description: {
2120
+ active: "#67787c",
2121
+ inactive: "#4b585b",
2122
+ warning: "#f3d371",
2123
+ error: "#d8314a",
2124
+ submitted: "#67787c",
2125
+ cancelled: "#d8314a",
2126
+ disabled: "#4b585b"
2127
+ }
2128
+ },
2129
+ spinner: {
2130
+ icon: {
2131
+ active: "#3b82f6",
2132
+ error: "#d8314a",
2133
+ success: "#45b27e",
2134
+ help: "#818cf8",
2135
+ info: "#38bdf8",
2136
+ warning: "#f3d371"
2137
+ },
2138
+ message: {
2139
+ active: "#e3e7e8",
2140
+ error: "#d8314a",
2141
+ success: "#67787c",
2142
+ help: "#67787c",
2143
+ info: "#67787c",
2144
+ warning: "#67787c"
2145
+ }
2146
+ },
2147
+ tags: {
2148
+ utility: "#94a3b8",
2149
+ deprecated: "#f87171",
2150
+ experimental: "#818cf8",
2151
+ $default: "#e3e7e8"
2152
+ }
2153
+ },
2154
+ border: {
2155
+ app: {
2156
+ primary: "#e3e7e8",
2157
+ secondary: "#67787c",
2158
+ tertiary: "#4b585b"
2159
+ },
2160
+ banner: "#ffffff",
2161
+ message: {
2162
+ help: "#818cf8",
2163
+ success: "#45b27e",
2164
+ info: "#38bdf8",
2165
+ debug: "#8afafc",
2166
+ warning: "#f3d371",
2167
+ danger: "#d8314a"
2168
+ }
2169
+ }
2170
+ },
2171
+ borderStyles: {
2172
+ app: "single",
2173
+ banner: "bold",
2174
+ message: "round"
2175
+ },
2176
+ padding: {
2177
+ app: 0,
2178
+ banner: 14,
2179
+ message: 8,
2180
+ table: 1
2181
+ },
2182
+ icons: {
2183
+ link: { external: "↗" },
2184
+ message: { header: {
2185
+ help: "✱",
2186
+ success: "✔",
2187
+ info: "🛈",
2188
+ debug: "🛠",
2189
+ warning: "🛆",
2190
+ danger: "🛇",
2191
+ error: "✘"
2192
+ } },
2193
+ banner: { header: "⏺" },
2194
+ prompt: {
2195
+ active: "✱",
2196
+ error: "✘",
2197
+ warning: "🛆",
2198
+ submitted: "✔",
2199
+ cancelled: "🛇",
2200
+ disabled: "🛇"
2201
+ }
2202
+ },
2203
+ labels: { message: { header: {
2204
+ help: "Useful Tip",
2205
+ success: "Success",
2206
+ info: "Info",
2207
+ debug: "Debug",
2208
+ warning: "Warning",
2209
+ danger: "Danger",
2210
+ error: "Error"
2211
+ } } },
2212
+ spinner: "dots"
2213
+ };
2214
+
2215
+ //#endregion
14
2216
  //#region src/index.ts
15
2217
  /**
16
2218
  * The Style Dictionary - Shell Shock plugin to use Style Dictionary tokens to select theme colors to Shell Shock projects.
17
2219
  */
18
2220
  const plugin = (options = {}) => {
19
- return [styleDictionary(defu({ skipBuild: false }, omit(options, ["theme"]))), {
20
- name: "shell-shock/theme",
21
- config() {
22
- this.debug("Providing default configuration for the Shell Shock `theme` plugin.");
23
- return {
24
- theme: options.theme,
25
- styleDictionary: { customPreprocessors: (context) => ({
26
- "shell-shock/colors": colors(context),
27
- "shell-shock/border-styles": borderStyles(context),
28
- "shell-shock/padding": padding(context),
29
- "shell-shock/icons": icons(context),
30
- "shell-shock/labels": labels(context),
31
- "shell-shock/spinners": spinners(context),
32
- "shell-shock/settings": settings(context)
33
- }) }
34
- };
2221
+ return [
2222
+ ...plugin$1(defu({ skipBuild: false }, omit(options, ["theme"]))),
2223
+ {
2224
+ name: "shell-shock/theme",
2225
+ config() {
2226
+ this.debug("Providing default configuration for the Shell Shock `theme` plugin.");
2227
+ return {
2228
+ theme: options.theme,
2229
+ styleDictionary: { customPreprocessors: (context) => ({
2230
+ "shell-shock/colors": colors(context),
2231
+ "shell-shock/border-styles": borderStyles(context),
2232
+ "shell-shock/padding": padding(context),
2233
+ "shell-shock/icons": icons(context),
2234
+ "shell-shock/labels": labels(context),
2235
+ "shell-shock/spinners": spinners(context),
2236
+ "shell-shock/settings": settings(context)
2237
+ }) }
2238
+ };
2239
+ },
2240
+ configResolved: {
2241
+ order: "pre",
2242
+ async handler() {
2243
+ this.debug("Shell Shock `theme` plugin configuration resolved.");
2244
+ this.config.styleDictionary = defu(this.config.styleDictionary, {
2245
+ tokens: isSetObject(this.config.theme) ? defu(this.config.theme, theme) : theme,
2246
+ platforms: { js: {
2247
+ preprocessors: [
2248
+ "shell-shock/colors",
2249
+ "shell-shock/border-styles",
2250
+ "shell-shock/padding",
2251
+ "shell-shock/icons",
2252
+ "shell-shock/labels",
2253
+ "shell-shock/spinners",
2254
+ "shell-shock/settings"
2255
+ ],
2256
+ transformGroup: "js",
2257
+ transforms: ["name/camel"],
2258
+ fileHeader: "powerlines/file-header",
2259
+ buildPath: this.config.output.path,
2260
+ files: []
2261
+ } }
2262
+ });
2263
+ }
2264
+ }
35
2265
  },
36
- configResolved: {
37
- order: "pre",
38
- async handler() {
39
- this.debug("Shell Shock `theme` plugin configuration resolved.");
40
- this.config.styleDictionary = defu(this.config.styleDictionary, {
41
- tokens: isSetObject(this.config.theme) ? defu(this.config.theme, theme) : theme,
42
- platforms: { js: {
43
- preprocessors: [
44
- "shell-shock/colors",
45
- "shell-shock/border-styles",
46
- "shell-shock/padding",
47
- "shell-shock/icons",
48
- "shell-shock/labels",
49
- "shell-shock/spinners",
50
- "shell-shock/settings"
51
- ],
52
- transformGroup: "js",
53
- transforms: ["name/camel"],
54
- fileHeader: "powerlines/file-header",
55
- buildPath: this.config.output.path,
56
- files: []
57
- } }
58
- });
59
- }
60
- }
61
- }];
2266
+ {
2267
+ name: "shell-shock/theme:power-plant-output",
2268
+ configResolved: {
2269
+ order: "post",
2270
+ async handler() {
2271
+ const powerplant = this.config.powerplant;
2272
+ if (!powerplant || powerplant.output) return;
2273
+ powerplant.output = noopOutput;
2274
+ }
2275
+ }
2276
+ }
2277
+ ];
62
2278
  };
63
2279
 
64
2280
  //#endregion