@shell-shock/plugin-theme 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1098 @@
1
+ import { resolveBorderStyle } from "./helpers.mjs";
2
+ import { isSetObject } from "@stryke/type-checks/is-set-object";
3
+ import { isNumber } from "@stryke/type-checks/is-number";
4
+ import { isSetString } from "@stryke/type-checks/is-set-string";
5
+
6
+ //#region src/style-dictionary/preprocessor.ts
7
+ /**
8
+ * Shell Shock - Theme Preprocessor
9
+ *
10
+ * @remarks
11
+ * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.
12
+ */
13
+ const preprocessor = (context) => ({
14
+ name: "shell-shock/preprocessor",
15
+ preprocessor: (dictionary, _options) => {
16
+ const resolvedConfig = {};
17
+ resolvedConfig.name = dictionary.$theme ?? context.config.name;
18
+ resolvedConfig.colors ??= {
19
+ text: {
20
+ banner: {},
21
+ heading: {},
22
+ body: {},
23
+ message: {
24
+ link: {},
25
+ header: {},
26
+ footer: {},
27
+ description: {}
28
+ }
29
+ },
30
+ border: {
31
+ banner: {
32
+ outline: {},
33
+ divider: {}
34
+ },
35
+ app: {
36
+ outline: {},
37
+ divider: {}
38
+ },
39
+ message: {
40
+ outline: {},
41
+ divider: {}
42
+ }
43
+ }
44
+ };
45
+ const colors = dictionary.colors;
46
+ if (isSetString(colors)) resolvedConfig.colors = {
47
+ text: {
48
+ banner: {
49
+ title: colors,
50
+ header: colors,
51
+ footer: colors,
52
+ command: colors,
53
+ description: colors
54
+ },
55
+ heading: {
56
+ primary: colors,
57
+ secondary: colors,
58
+ tertiary: colors
59
+ },
60
+ body: {
61
+ primary: colors,
62
+ secondary: colors,
63
+ tertiary: colors,
64
+ link: colors
65
+ },
66
+ message: {
67
+ link: {
68
+ help: colors,
69
+ success: colors,
70
+ info: colors,
71
+ warning: colors,
72
+ danger: colors,
73
+ error: colors
74
+ },
75
+ header: {
76
+ help: colors,
77
+ success: colors,
78
+ info: colors,
79
+ warning: colors,
80
+ danger: colors,
81
+ error: colors
82
+ },
83
+ footer: {
84
+ help: colors,
85
+ success: colors,
86
+ info: colors,
87
+ warning: colors,
88
+ danger: colors,
89
+ error: colors
90
+ },
91
+ description: {
92
+ help: colors,
93
+ success: colors,
94
+ info: colors,
95
+ warning: colors,
96
+ danger: colors,
97
+ error: colors
98
+ }
99
+ },
100
+ usage: {
101
+ bin: colors,
102
+ command: colors,
103
+ subcommand: colors,
104
+ options: colors,
105
+ params: colors,
106
+ description: colors
107
+ }
108
+ },
109
+ border: {
110
+ banner: {
111
+ outline: {
112
+ primary: colors,
113
+ secondary: colors,
114
+ tertiary: colors
115
+ },
116
+ divider: {
117
+ primary: colors,
118
+ secondary: colors,
119
+ tertiary: colors
120
+ }
121
+ },
122
+ app: {
123
+ outline: {
124
+ primary: colors,
125
+ secondary: colors,
126
+ tertiary: colors
127
+ },
128
+ divider: {
129
+ primary: colors,
130
+ secondary: colors,
131
+ tertiary: colors
132
+ }
133
+ },
134
+ message: {
135
+ outline: {
136
+ help: colors,
137
+ success: colors,
138
+ info: colors,
139
+ warning: colors,
140
+ danger: colors,
141
+ error: colors
142
+ },
143
+ divider: {
144
+ help: colors,
145
+ success: colors,
146
+ info: colors,
147
+ warning: colors,
148
+ danger: colors,
149
+ error: colors
150
+ }
151
+ }
152
+ }
153
+ };
154
+ else if (isSetObject(colors)) {
155
+ resolvedConfig.colors.text ??= {
156
+ banner: {},
157
+ heading: {},
158
+ body: {},
159
+ message: {
160
+ link: {},
161
+ header: {},
162
+ footer: {},
163
+ description: {}
164
+ }
165
+ };
166
+ const text = colors.text;
167
+ if (isSetString(text)) resolvedConfig.colors.text = {
168
+ banner: {
169
+ title: text,
170
+ header: text,
171
+ footer: text,
172
+ command: text,
173
+ description: text
174
+ },
175
+ heading: {
176
+ primary: text,
177
+ secondary: text,
178
+ tertiary: text
179
+ },
180
+ body: {
181
+ primary: text,
182
+ secondary: text,
183
+ tertiary: text,
184
+ link: text
185
+ },
186
+ message: {
187
+ link: {
188
+ help: text,
189
+ success: text,
190
+ info: text,
191
+ warning: text,
192
+ danger: text,
193
+ error: text
194
+ },
195
+ header: {
196
+ help: text,
197
+ success: text,
198
+ info: text,
199
+ warning: text,
200
+ danger: text,
201
+ error: text
202
+ },
203
+ footer: {
204
+ help: text,
205
+ success: text,
206
+ info: text,
207
+ warning: text,
208
+ danger: text,
209
+ error: text
210
+ },
211
+ description: {
212
+ help: text,
213
+ success: text,
214
+ info: text,
215
+ warning: text,
216
+ danger: text,
217
+ error: text
218
+ }
219
+ },
220
+ usage: {
221
+ bin: text,
222
+ command: text,
223
+ subcommand: text,
224
+ options: text,
225
+ params: text,
226
+ description: text
227
+ }
228
+ };
229
+ else if (isSetObject(text)) {
230
+ resolvedConfig.colors.text.banner ??= {};
231
+ const banner = text.banner;
232
+ if (isSetString(banner)) resolvedConfig.colors.text.banner = {
233
+ title: banner,
234
+ header: banner,
235
+ footer: banner,
236
+ command: banner,
237
+ description: banner
238
+ };
239
+ else if (isSetObject(text.banner)) {
240
+ if (isSetString(text.banner.title)) resolvedConfig.colors.text.banner.title = text.banner.title;
241
+ if (isSetString(text.banner.header)) resolvedConfig.colors.text.banner.header = text.banner.header;
242
+ if (isSetString(text.banner.footer)) resolvedConfig.colors.text.banner.footer = text.banner.footer;
243
+ if (isSetString(text.banner.command)) resolvedConfig.colors.text.banner.command = text.banner.command;
244
+ if (isSetString(text.banner.description)) resolvedConfig.colors.text.banner.description = text.banner.description;
245
+ }
246
+ resolvedConfig.colors.text.body ??= {};
247
+ if (isSetString(text.body)) {
248
+ const color = text.body;
249
+ resolvedConfig.colors.text.body = {
250
+ primary: color,
251
+ secondary: color,
252
+ tertiary: color,
253
+ link: color
254
+ };
255
+ } else if (isSetObject(text.body)) {
256
+ if (isSetString(text.body.primary)) resolvedConfig.colors.text.body.primary = text.body.primary;
257
+ if (isSetString(text.body.secondary)) resolvedConfig.colors.text.body.secondary = text.body.secondary;
258
+ if (isSetString(text.body.tertiary)) resolvedConfig.colors.text.body.tertiary = text.body.tertiary;
259
+ if (isSetString(text.body.link)) resolvedConfig.colors.text.body.link = text.body.link;
260
+ }
261
+ resolvedConfig.colors.text.heading ??= {};
262
+ if (isSetString(text.heading)) {
263
+ const color = text.heading;
264
+ resolvedConfig.colors.text.heading = {
265
+ primary: color,
266
+ secondary: color,
267
+ tertiary: color
268
+ };
269
+ } else if (isSetObject(text.heading)) {
270
+ if (isSetString(text.heading.primary)) resolvedConfig.colors.text.heading.primary = text.heading.primary;
271
+ if (isSetString(text.heading.secondary)) resolvedConfig.colors.text.heading.secondary = text.heading.secondary;
272
+ if (isSetString(text.heading.tertiary)) resolvedConfig.colors.text.heading.tertiary = text.heading.tertiary;
273
+ }
274
+ resolvedConfig.colors.text.usage ??= {};
275
+ if (isSetString(text.usage)) resolvedConfig.colors.text.usage = {
276
+ bin: text.usage,
277
+ command: text.usage,
278
+ subcommand: text.usage,
279
+ options: text.usage,
280
+ params: text.usage,
281
+ description: text.usage
282
+ };
283
+ else if (isSetObject(text.usage)) {
284
+ if (isSetString(text.usage.bin)) resolvedConfig.colors.text.usage.bin = text.usage.bin;
285
+ if (isSetString(text.usage.command)) resolvedConfig.colors.text.usage.command = text.usage.command;
286
+ if (isSetString(text.usage.subcommand)) resolvedConfig.colors.text.usage.subcommand = text.usage.subcommand;
287
+ if (isSetString(text.usage.options)) resolvedConfig.colors.text.usage.options = text.usage.options;
288
+ if (isSetString(text.usage.params)) resolvedConfig.colors.text.usage.params = text.usage.params;
289
+ if (isSetString(text.usage.description)) resolvedConfig.colors.text.usage.description = text.usage.description;
290
+ }
291
+ resolvedConfig.colors.text.message ??= {
292
+ link: {},
293
+ header: {},
294
+ footer: {},
295
+ description: {}
296
+ };
297
+ const message = text.message;
298
+ if (isSetString(message)) resolvedConfig.colors.text.message = {
299
+ link: {
300
+ help: message,
301
+ success: message,
302
+ info: message,
303
+ warning: message,
304
+ danger: message,
305
+ error: message
306
+ },
307
+ header: {
308
+ help: message,
309
+ success: message,
310
+ info: message,
311
+ warning: message,
312
+ danger: message,
313
+ error: message
314
+ },
315
+ footer: {
316
+ help: message,
317
+ success: message,
318
+ info: message,
319
+ warning: message,
320
+ danger: message,
321
+ error: message
322
+ },
323
+ description: {
324
+ help: message,
325
+ success: message,
326
+ info: message,
327
+ warning: message,
328
+ danger: message,
329
+ error: message
330
+ }
331
+ };
332
+ else if (isSetObject(message)) {
333
+ resolvedConfig.colors.text.message.link ??= {};
334
+ const link = message.link;
335
+ if (isSetString(link)) resolvedConfig.colors.text.message.link = {
336
+ help: link,
337
+ success: link,
338
+ info: link,
339
+ warning: link,
340
+ danger: link,
341
+ error: link
342
+ };
343
+ else if (isSetObject(link)) {
344
+ if (isSetString(link.help)) resolvedConfig.colors.text.message.link.help = link.help;
345
+ if (isSetString(link.success)) resolvedConfig.colors.text.message.link.success = link.success;
346
+ if (isSetString(link.info)) resolvedConfig.colors.text.message.link.info = link.info;
347
+ if (isSetString(link.warning)) resolvedConfig.colors.text.message.link.warning = link.warning;
348
+ if (isSetString(link.danger)) resolvedConfig.colors.text.message.link.danger = link.danger;
349
+ if (isSetString(link.error)) resolvedConfig.colors.text.message.link.error = link.error;
350
+ }
351
+ resolvedConfig.colors.text.message.description ??= {};
352
+ const description = message.description;
353
+ if (isSetString(description)) resolvedConfig.colors.text.message.description = {
354
+ help: description,
355
+ success: description,
356
+ info: description,
357
+ warning: description,
358
+ danger: description,
359
+ error: description
360
+ };
361
+ else if (isSetObject(description)) {
362
+ if (isSetString(description.help)) resolvedConfig.colors.text.message.description.help = description.help;
363
+ if (isSetString(description.success)) resolvedConfig.colors.text.message.description.success = description.success;
364
+ if (isSetString(description.info)) resolvedConfig.colors.text.message.description.info = description.info;
365
+ if (isSetString(description.warning)) resolvedConfig.colors.text.message.description.warning = description.warning;
366
+ if (isSetString(description.danger)) resolvedConfig.colors.text.message.description.danger = description.danger;
367
+ if (isSetString(description.error)) resolvedConfig.colors.text.message.description.error = description.error;
368
+ }
369
+ resolvedConfig.colors.text.message.header ??= {};
370
+ const header = message.header;
371
+ if (isSetString(header)) resolvedConfig.colors.text.message.header = {
372
+ help: header,
373
+ success: header,
374
+ info: header,
375
+ warning: header,
376
+ danger: header,
377
+ error: header
378
+ };
379
+ else if (isSetObject(header)) {
380
+ if (isSetString(header.help)) resolvedConfig.colors.text.message.header.help = header.help;
381
+ if (isSetString(header.success)) resolvedConfig.colors.text.message.header.success = header.success;
382
+ if (isSetString(header.info)) resolvedConfig.colors.text.message.header.info = header.info;
383
+ if (isSetString(header.warning)) resolvedConfig.colors.text.message.header.warning = header.warning;
384
+ if (isSetString(header.danger)) resolvedConfig.colors.text.message.header.danger = header.danger;
385
+ if (isSetString(header.error)) resolvedConfig.colors.text.message.header.error = header.error;
386
+ }
387
+ resolvedConfig.colors.text.message.footer ??= {};
388
+ const footer = message.footer;
389
+ if (isSetString(footer)) resolvedConfig.colors.text.message.footer = {
390
+ help: footer,
391
+ success: footer,
392
+ info: footer,
393
+ warning: footer,
394
+ danger: footer,
395
+ error: footer
396
+ };
397
+ else if (isSetObject(footer)) {
398
+ if (isSetString(footer.help)) resolvedConfig.colors.text.message.footer.help = footer.help;
399
+ if (isSetString(footer.success)) resolvedConfig.colors.text.message.footer.success = footer.success;
400
+ if (isSetString(footer.info)) resolvedConfig.colors.text.message.footer.info = footer.info;
401
+ if (isSetString(footer.warning)) resolvedConfig.colors.text.message.footer.warning = footer.warning;
402
+ if (isSetString(footer.danger)) resolvedConfig.colors.text.message.footer.danger = footer.danger;
403
+ if (isSetString(footer.error)) resolvedConfig.colors.text.message.footer.error = footer.error;
404
+ }
405
+ }
406
+ }
407
+ resolvedConfig.colors.border ??= {
408
+ banner: {
409
+ outline: {},
410
+ divider: {}
411
+ },
412
+ app: {
413
+ outline: {},
414
+ divider: {}
415
+ },
416
+ message: {
417
+ outline: {},
418
+ divider: {}
419
+ }
420
+ };
421
+ const border = colors.border;
422
+ if (isSetString(border)) resolvedConfig.colors.border = {
423
+ banner: {
424
+ outline: {
425
+ primary: border,
426
+ secondary: border,
427
+ tertiary: border
428
+ },
429
+ divider: {
430
+ primary: border,
431
+ secondary: border,
432
+ tertiary: border
433
+ }
434
+ },
435
+ app: {
436
+ outline: {
437
+ primary: border,
438
+ secondary: border,
439
+ tertiary: border
440
+ },
441
+ divider: {
442
+ primary: border,
443
+ secondary: border,
444
+ tertiary: border
445
+ }
446
+ },
447
+ message: {
448
+ outline: {
449
+ help: border,
450
+ success: border,
451
+ info: border,
452
+ warning: border,
453
+ danger: border,
454
+ error: border
455
+ },
456
+ divider: {
457
+ help: border,
458
+ success: border,
459
+ info: border,
460
+ warning: border,
461
+ danger: border,
462
+ error: border
463
+ }
464
+ }
465
+ };
466
+ else if (isSetObject(border)) {
467
+ resolvedConfig.colors.border.banner ??= {
468
+ outline: {},
469
+ divider: {}
470
+ };
471
+ const banner = border.banner;
472
+ if (isSetString(banner)) resolvedConfig.colors.border.banner = {
473
+ outline: {
474
+ primary: banner,
475
+ secondary: banner,
476
+ tertiary: banner
477
+ },
478
+ divider: {
479
+ primary: banner,
480
+ secondary: banner,
481
+ tertiary: banner
482
+ }
483
+ };
484
+ else if (isSetObject(banner)) if ("outline" in banner || "divider" in banner) {
485
+ resolvedConfig.colors.border.banner.outline = {};
486
+ const outline = banner.outline;
487
+ if (isSetString(outline)) resolvedConfig.colors.border.banner.outline = {
488
+ primary: outline,
489
+ secondary: outline,
490
+ tertiary: outline
491
+ };
492
+ else if (isSetObject(outline)) {
493
+ if (isSetString(outline.primary)) resolvedConfig.colors.border.banner.outline.primary = outline.primary;
494
+ if (isSetString(outline.secondary)) resolvedConfig.colors.border.banner.outline.secondary = outline.secondary;
495
+ if (isSetString(outline.tertiary)) resolvedConfig.colors.border.banner.outline.tertiary = outline.tertiary;
496
+ }
497
+ resolvedConfig.colors.border.banner.divider ??= {};
498
+ const divider = banner.divider;
499
+ if (isSetString(divider)) resolvedConfig.colors.border.banner.divider = {
500
+ primary: divider,
501
+ secondary: divider,
502
+ tertiary: divider
503
+ };
504
+ else if (isSetObject(divider)) {
505
+ if (isSetString(divider.primary)) resolvedConfig.colors.border.banner.divider.primary = divider.primary;
506
+ if (isSetString(divider.secondary)) resolvedConfig.colors.border.banner.divider.secondary = divider.secondary;
507
+ if (isSetString(divider.tertiary)) resolvedConfig.colors.border.banner.divider.tertiary = divider.tertiary;
508
+ }
509
+ } else {
510
+ resolvedConfig.colors.border.banner.outline ??= {};
511
+ resolvedConfig.colors.border.banner.divider ??= {};
512
+ const banner$1 = border.banner;
513
+ if (isSetString(banner$1.primary)) {
514
+ resolvedConfig.colors.border.banner.outline.primary = banner$1.primary;
515
+ resolvedConfig.colors.border.banner.divider.primary = banner$1.primary;
516
+ }
517
+ if (isSetString(banner$1.secondary)) {
518
+ resolvedConfig.colors.border.banner.outline.secondary = banner$1.secondary;
519
+ resolvedConfig.colors.border.banner.divider.secondary = banner$1.secondary;
520
+ }
521
+ if (isSetString(banner$1.tertiary)) {
522
+ resolvedConfig.colors.border.banner.outline.tertiary = banner$1.tertiary;
523
+ resolvedConfig.colors.border.banner.divider.tertiary = banner$1.tertiary;
524
+ }
525
+ }
526
+ resolvedConfig.colors.border.app ??= {
527
+ outline: {},
528
+ divider: {}
529
+ };
530
+ const app = border.app;
531
+ if (isSetString(app)) resolvedConfig.colors.border.app = {
532
+ outline: {
533
+ primary: app,
534
+ secondary: app,
535
+ tertiary: app
536
+ },
537
+ divider: {
538
+ primary: app,
539
+ secondary: app,
540
+ tertiary: app
541
+ }
542
+ };
543
+ else if (isSetObject(app)) {
544
+ resolvedConfig.colors.border.app ??= {};
545
+ if ("outline" in app || "divider" in app) {
546
+ if (isSetString(app.outline)) resolvedConfig.colors.border.app.outline = {
547
+ primary: app.outline,
548
+ secondary: app.outline,
549
+ tertiary: app.outline
550
+ };
551
+ else if (isSetObject(app.outline)) {
552
+ resolvedConfig.colors.border.app.outline = {};
553
+ const outline = app.outline;
554
+ if (isSetString(outline.primary)) resolvedConfig.colors.border.app.outline.primary = outline.primary;
555
+ if (isSetString(outline.secondary)) resolvedConfig.colors.border.app.outline.secondary = outline.secondary;
556
+ if (isSetString(outline.tertiary)) resolvedConfig.colors.border.app.outline.tertiary = outline.tertiary;
557
+ }
558
+ if (isSetString(app.divider)) resolvedConfig.colors.border.app.divider = {
559
+ primary: app.divider,
560
+ secondary: app.divider,
561
+ tertiary: app.divider
562
+ };
563
+ else if (isSetObject(app.divider)) {
564
+ resolvedConfig.colors.border.app.divider = {};
565
+ const divider = app.divider;
566
+ if (isSetString(divider.primary)) resolvedConfig.colors.border.app.divider.primary = divider.primary;
567
+ if (isSetString(divider.secondary)) resolvedConfig.colors.border.app.divider.secondary = divider.secondary;
568
+ if (isSetString(divider.tertiary)) resolvedConfig.colors.border.app.divider.tertiary = divider.tertiary;
569
+ }
570
+ } else {
571
+ resolvedConfig.colors.border.app.outline ??= {};
572
+ resolvedConfig.colors.border.app.divider ??= {};
573
+ const app$1 = border.app;
574
+ if (isSetString(app$1.primary)) {
575
+ resolvedConfig.colors.border.app.outline.primary = app$1.primary;
576
+ resolvedConfig.colors.border.app.divider.primary = app$1.primary;
577
+ }
578
+ if (isSetString(app$1.secondary)) {
579
+ resolvedConfig.colors.border.app.outline.secondary = app$1.secondary;
580
+ resolvedConfig.colors.border.app.divider.secondary = app$1.secondary;
581
+ }
582
+ if (isSetString(app$1.tertiary)) {
583
+ resolvedConfig.colors.border.app.outline.tertiary = app$1.tertiary;
584
+ resolvedConfig.colors.border.app.divider.tertiary = app$1.tertiary;
585
+ }
586
+ }
587
+ }
588
+ resolvedConfig.colors.border.message ??= {
589
+ outline: {},
590
+ divider: {}
591
+ };
592
+ const message = border.message;
593
+ if (isSetString(message)) resolvedConfig.colors.border.message = {
594
+ outline: {
595
+ help: message,
596
+ success: message,
597
+ info: message,
598
+ warning: message,
599
+ danger: message,
600
+ error: message
601
+ },
602
+ divider: {
603
+ help: message,
604
+ success: message,
605
+ info: message,
606
+ warning: message,
607
+ danger: message,
608
+ error: message
609
+ }
610
+ };
611
+ else if (isSetObject(message)) {
612
+ resolvedConfig.colors.border.message ??= {};
613
+ if ("outline" in message || "divider" in message) {
614
+ if (isSetString(message.outline)) resolvedConfig.colors.border.message.outline = {
615
+ help: message.outline,
616
+ success: message.outline,
617
+ info: message.outline,
618
+ warning: message.outline,
619
+ danger: message.outline,
620
+ error: message.outline
621
+ };
622
+ else if (isSetObject(message.outline)) {
623
+ resolvedConfig.colors.border.message.outline ??= {};
624
+ const outline = message.outline;
625
+ if (isSetString(outline.help)) resolvedConfig.colors.border.message.outline.help = outline.help;
626
+ if (isSetString(outline.success)) resolvedConfig.colors.border.message.outline.success = outline.success;
627
+ if (isSetString(outline.info)) resolvedConfig.colors.border.message.outline.info = outline.info;
628
+ if (isSetString(outline.warning)) resolvedConfig.colors.border.message.outline.warning = outline.warning;
629
+ if (isSetString(outline.danger)) resolvedConfig.colors.border.message.outline.danger = outline.danger;
630
+ if (isSetString(outline.error)) resolvedConfig.colors.border.message.outline.error = outline.error;
631
+ }
632
+ if (isSetString(message.divider)) resolvedConfig.colors.border.message.divider = {
633
+ help: message.divider,
634
+ success: message.divider,
635
+ info: message.divider,
636
+ warning: message.divider,
637
+ danger: message.divider,
638
+ error: message.divider
639
+ };
640
+ else if (isSetObject(message.divider)) {
641
+ resolvedConfig.colors.border.message.divider ??= {};
642
+ const divider = message.divider;
643
+ if (isSetString(divider.help)) resolvedConfig.colors.border.message.divider.help = divider.help;
644
+ if (isSetString(divider.success)) resolvedConfig.colors.border.message.divider.success = divider.success;
645
+ if (isSetString(divider.info)) resolvedConfig.colors.border.message.divider.info = divider.info;
646
+ if (isSetString(divider.warning)) resolvedConfig.colors.border.message.divider.warning = divider.warning;
647
+ if (isSetString(divider.danger)) resolvedConfig.colors.border.message.divider.danger = divider.danger;
648
+ if (isSetString(divider.error)) resolvedConfig.colors.border.message.divider.error = divider.error;
649
+ }
650
+ } else {
651
+ resolvedConfig.colors.border.message.outline ??= {};
652
+ resolvedConfig.colors.border.message.divider ??= {};
653
+ const message$1 = border.message;
654
+ if (isSetString(message$1.help)) {
655
+ resolvedConfig.colors.border.message.outline.help = message$1.help;
656
+ resolvedConfig.colors.border.message.divider.help = message$1.help;
657
+ }
658
+ if (isSetString(message$1.success)) {
659
+ resolvedConfig.colors.border.message.outline.success = message$1.success;
660
+ resolvedConfig.colors.border.message.divider.success = message$1.success;
661
+ }
662
+ if (isSetString(message$1.info)) {
663
+ resolvedConfig.colors.border.message.outline.info = message$1.info;
664
+ resolvedConfig.colors.border.message.divider.info = message$1.info;
665
+ }
666
+ if (isSetString(message$1.warning)) {
667
+ resolvedConfig.colors.border.message.outline.warning = message$1.warning;
668
+ resolvedConfig.colors.border.message.divider.warning = message$1.warning;
669
+ }
670
+ if (isSetString(message$1.danger)) {
671
+ resolvedConfig.colors.border.message.outline.danger = message$1.danger;
672
+ resolvedConfig.colors.border.message.divider.danger = message$1.danger;
673
+ }
674
+ if (isSetString(message$1.error)) {
675
+ resolvedConfig.colors.border.message.outline.error = message$1.error;
676
+ resolvedConfig.colors.border.message.divider.error = message$1.error;
677
+ }
678
+ }
679
+ }
680
+ }
681
+ }
682
+ resolvedConfig.borderStyles ??= {
683
+ banner: {
684
+ outline: {},
685
+ divider: {}
686
+ },
687
+ message: {
688
+ outline: {},
689
+ divider: {}
690
+ },
691
+ app: {
692
+ outline: {},
693
+ divider: {}
694
+ }
695
+ };
696
+ const borderStyles = dictionary.borderStyles;
697
+ if (isSetString(borderStyles)) {
698
+ const borderStyle = resolveBorderStyle(borderStyles);
699
+ resolvedConfig.borderStyles = {
700
+ banner: {
701
+ outline: {
702
+ primary: borderStyle,
703
+ secondary: borderStyle,
704
+ tertiary: borderStyle
705
+ },
706
+ divider: {
707
+ primary: borderStyle,
708
+ secondary: borderStyle,
709
+ tertiary: borderStyle
710
+ }
711
+ },
712
+ message: {
713
+ outline: {
714
+ help: borderStyle,
715
+ success: borderStyle,
716
+ info: borderStyle,
717
+ warning: borderStyle,
718
+ danger: borderStyle,
719
+ error: borderStyle
720
+ },
721
+ divider: {
722
+ help: borderStyle,
723
+ success: borderStyle,
724
+ info: borderStyle,
725
+ warning: borderStyle,
726
+ danger: borderStyle,
727
+ error: borderStyle
728
+ }
729
+ },
730
+ app: {
731
+ outline: {
732
+ primary: borderStyle,
733
+ secondary: borderStyle,
734
+ tertiary: borderStyle
735
+ },
736
+ divider: {
737
+ primary: borderStyle,
738
+ secondary: borderStyle,
739
+ tertiary: borderStyle
740
+ }
741
+ }
742
+ };
743
+ } else if (isSetObject(borderStyles)) {
744
+ resolvedConfig.borderStyles.banner ??= {
745
+ outline: {},
746
+ divider: {}
747
+ };
748
+ const banner = borderStyles.banner;
749
+ if (isSetString(banner)) {
750
+ const borderStyle = resolveBorderStyle(banner);
751
+ resolvedConfig.borderStyles.banner = {
752
+ outline: {
753
+ primary: borderStyle,
754
+ secondary: borderStyle,
755
+ tertiary: borderStyle
756
+ },
757
+ divider: {
758
+ primary: borderStyle,
759
+ secondary: borderStyle,
760
+ tertiary: borderStyle
761
+ }
762
+ };
763
+ } else if (isSetObject(banner)) {
764
+ resolvedConfig.borderStyles.banner ??= {};
765
+ const outline = banner.outline;
766
+ if (isSetString(outline)) {
767
+ const borderStyle = resolveBorderStyle(outline);
768
+ resolvedConfig.borderStyles.banner.outline = {
769
+ primary: borderStyle,
770
+ secondary: borderStyle,
771
+ tertiary: borderStyle
772
+ };
773
+ } else if (isSetObject(outline)) {
774
+ resolvedConfig.borderStyles.banner.outline = {};
775
+ if (isSetString(outline.primary)) resolvedConfig.borderStyles.banner.outline.primary = resolveBorderStyle(outline.primary);
776
+ if (isSetString(outline.secondary)) resolvedConfig.borderStyles.banner.outline.secondary = resolveBorderStyle(outline.secondary);
777
+ if (isSetString(outline.tertiary)) resolvedConfig.borderStyles.banner.outline.tertiary = resolveBorderStyle(outline.tertiary);
778
+ }
779
+ const divider = banner.divider;
780
+ if (isSetString(divider)) {
781
+ const borderStyle = resolveBorderStyle(divider);
782
+ resolvedConfig.borderStyles.banner.divider = {
783
+ primary: borderStyle,
784
+ secondary: borderStyle,
785
+ tertiary: borderStyle
786
+ };
787
+ } else if (isSetObject(divider)) {
788
+ resolvedConfig.borderStyles.banner.divider = {};
789
+ if (isSetString(divider.primary)) resolvedConfig.borderStyles.banner.divider.primary = resolveBorderStyle(divider.primary);
790
+ if (isSetString(divider.secondary)) resolvedConfig.borderStyles.banner.divider.secondary = resolveBorderStyle(divider.secondary);
791
+ if (isSetString(divider.tertiary)) resolvedConfig.borderStyles.banner.divider.tertiary = resolveBorderStyle(divider.tertiary);
792
+ }
793
+ }
794
+ resolvedConfig.borderStyles.app ??= {
795
+ outline: {},
796
+ divider: {}
797
+ };
798
+ const app = borderStyles.app;
799
+ if (isSetString(app)) {
800
+ const borderStyle = resolveBorderStyle(app);
801
+ resolvedConfig.borderStyles.app = {
802
+ outline: {
803
+ primary: borderStyle,
804
+ secondary: borderStyle,
805
+ tertiary: borderStyle
806
+ },
807
+ divider: {
808
+ primary: borderStyle,
809
+ secondary: borderStyle,
810
+ tertiary: borderStyle
811
+ }
812
+ };
813
+ } else if (isSetObject(app)) {
814
+ resolvedConfig.borderStyles.app ??= {};
815
+ const outline = app.outline;
816
+ if (isSetString(outline)) {
817
+ const borderStyle = resolveBorderStyle(outline);
818
+ resolvedConfig.borderStyles.app.outline = {
819
+ primary: borderStyle,
820
+ secondary: borderStyle,
821
+ tertiary: borderStyle
822
+ };
823
+ } else if (isSetObject(outline)) {
824
+ resolvedConfig.borderStyles.app.outline = {};
825
+ if (isSetString(outline.primary)) resolvedConfig.borderStyles.app.outline.primary = resolveBorderStyle(outline.primary);
826
+ if (isSetString(outline.secondary)) resolvedConfig.borderStyles.app.outline.secondary = resolveBorderStyle(outline.secondary);
827
+ if (isSetString(outline.tertiary)) resolvedConfig.borderStyles.app.outline.tertiary = resolveBorderStyle(outline.tertiary);
828
+ }
829
+ const divider = app.divider;
830
+ if (isSetString(divider)) {
831
+ const borderStyle = resolveBorderStyle(divider);
832
+ resolvedConfig.borderStyles.app.divider = {
833
+ primary: borderStyle,
834
+ secondary: borderStyle,
835
+ tertiary: borderStyle
836
+ };
837
+ } else if (isSetObject(divider)) {
838
+ resolvedConfig.borderStyles.app.divider = {};
839
+ if (isSetString(divider.primary)) resolvedConfig.borderStyles.app.divider.primary = resolveBorderStyle(divider.primary);
840
+ if (isSetString(divider.secondary)) resolvedConfig.borderStyles.app.divider.secondary = resolveBorderStyle(divider.secondary);
841
+ if (isSetString(divider.tertiary)) resolvedConfig.borderStyles.app.divider.tertiary = resolveBorderStyle(divider.tertiary);
842
+ }
843
+ }
844
+ resolvedConfig.borderStyles.message ??= {};
845
+ const message = borderStyles.message;
846
+ if (isSetString(message)) {
847
+ const borderStyle = resolveBorderStyle(message);
848
+ resolvedConfig.borderStyles.message = {
849
+ outline: {
850
+ help: borderStyle,
851
+ success: borderStyle,
852
+ info: borderStyle,
853
+ warning: borderStyle,
854
+ danger: borderStyle,
855
+ error: borderStyle
856
+ },
857
+ divider: {
858
+ help: borderStyle,
859
+ success: borderStyle,
860
+ info: borderStyle,
861
+ warning: borderStyle,
862
+ danger: borderStyle,
863
+ error: borderStyle
864
+ }
865
+ };
866
+ } else if (isSetObject(message)) {
867
+ const outline = message.outline;
868
+ if (isSetString(outline)) {
869
+ const borderStyle = resolveBorderStyle(outline);
870
+ resolvedConfig.borderStyles.message.outline = {
871
+ help: borderStyle,
872
+ success: borderStyle,
873
+ info: borderStyle,
874
+ warning: borderStyle,
875
+ danger: borderStyle,
876
+ error: borderStyle
877
+ };
878
+ } else if (isSetObject(outline)) {
879
+ resolvedConfig.borderStyles.message.outline = {};
880
+ if (isSetString(outline.help)) resolvedConfig.borderStyles.message.outline.help = resolveBorderStyle(outline.help);
881
+ if (isSetString(outline.success)) resolvedConfig.borderStyles.message.outline.success = resolveBorderStyle(outline.success);
882
+ if (isSetString(outline.info)) resolvedConfig.borderStyles.message.outline.info = resolveBorderStyle(outline.info);
883
+ if (isSetString(outline.warning)) resolvedConfig.borderStyles.message.outline.warning = resolveBorderStyle(outline.warning);
884
+ if (isSetString(outline.danger)) resolvedConfig.borderStyles.message.outline.danger = resolveBorderStyle(outline.danger);
885
+ if (isSetString(outline.error)) resolvedConfig.borderStyles.message.outline.error = resolveBorderStyle(outline.error);
886
+ }
887
+ resolvedConfig.borderStyles.message.divider ??= {};
888
+ const divider = message.divider;
889
+ if (isSetString(divider)) {
890
+ const borderStyle = resolveBorderStyle(divider);
891
+ resolvedConfig.borderStyles.message.divider = {
892
+ help: borderStyle,
893
+ success: borderStyle,
894
+ info: borderStyle,
895
+ warning: borderStyle,
896
+ danger: borderStyle,
897
+ error: borderStyle
898
+ };
899
+ } else if (isSetObject(divider)) {
900
+ if (isSetString(divider.help)) resolvedConfig.borderStyles.message.divider.help = resolveBorderStyle(divider.help);
901
+ if (isSetString(divider.success)) resolvedConfig.borderStyles.message.divider.success = resolveBorderStyle(divider.success);
902
+ if (isSetString(divider.info)) resolvedConfig.borderStyles.message.divider.info = resolveBorderStyle(divider.info);
903
+ if (isSetString(divider.warning)) resolvedConfig.borderStyles.message.divider.warning = resolveBorderStyle(divider.warning);
904
+ if (isSetString(divider.danger)) resolvedConfig.borderStyles.message.divider.danger = resolveBorderStyle(divider.danger);
905
+ if (isSetString(divider.error)) resolvedConfig.borderStyles.message.divider.error = resolveBorderStyle(divider.error);
906
+ }
907
+ }
908
+ }
909
+ resolvedConfig.padding ??= {};
910
+ const padding = dictionary.padding;
911
+ if (isNumber(padding)) resolvedConfig.padding = {
912
+ banner: padding,
913
+ message: padding,
914
+ app: padding
915
+ };
916
+ else if (isSetObject(padding)) {
917
+ if (isNumber(padding.banner)) resolvedConfig.padding.banner = padding.banner;
918
+ if (isNumber(padding.message)) resolvedConfig.padding.message = padding.message;
919
+ if (isNumber(padding.app)) resolvedConfig.padding.app = padding.app;
920
+ }
921
+ resolvedConfig.icons ??= {
922
+ message: { header: {} },
923
+ banner: { header: {} }
924
+ };
925
+ const icons = dictionary.icons;
926
+ if (isSetString(icons)) resolvedConfig.icons = {
927
+ message: { header: {
928
+ help: icons,
929
+ success: icons,
930
+ info: icons,
931
+ warning: icons,
932
+ danger: icons,
933
+ error: icons
934
+ } },
935
+ banner: { header: {
936
+ primary: icons,
937
+ secondary: icons,
938
+ tertiary: icons
939
+ } }
940
+ };
941
+ else if (isSetObject(icons)) {
942
+ resolvedConfig.icons.message = {};
943
+ const message = icons.message;
944
+ if (isSetString(message)) resolvedConfig.icons.message = { header: {
945
+ help: message,
946
+ success: message,
947
+ info: message,
948
+ warning: message,
949
+ danger: message,
950
+ error: message
951
+ } };
952
+ else if (isSetObject(message)) {
953
+ resolvedConfig.icons.message.header ??= {};
954
+ const header = message.header;
955
+ if (isSetString(header)) resolvedConfig.icons.message = { header: {
956
+ help: header,
957
+ success: header,
958
+ info: header,
959
+ warning: header,
960
+ danger: header,
961
+ error: header
962
+ } };
963
+ else if (isSetObject(header)) {
964
+ if (isSetString(header.help)) resolvedConfig.icons.message.header.help = header.help;
965
+ if (isSetString(header.success)) resolvedConfig.icons.message.header.success = header.success;
966
+ if (isSetString(header.info)) resolvedConfig.icons.message.header.info = header.info;
967
+ if (isSetString(header.warning)) resolvedConfig.icons.message.header.warning = header.warning;
968
+ if (isSetString(header.danger)) resolvedConfig.icons.message.header.danger = header.danger;
969
+ if (isSetString(header.error)) resolvedConfig.icons.message.header.error = header.error;
970
+ }
971
+ }
972
+ resolvedConfig.icons.banner ??= { header: {} };
973
+ const banner = icons.banner;
974
+ if (isSetString(banner)) resolvedConfig.icons.banner = { header: {
975
+ primary: banner,
976
+ secondary: banner,
977
+ tertiary: banner
978
+ } };
979
+ else if (isSetObject(banner)) {
980
+ resolvedConfig.icons.banner.header ??= {};
981
+ const header = banner.header;
982
+ if (isSetString(banner.header)) resolvedConfig.icons.banner = { header: {
983
+ primary: banner.header,
984
+ secondary: banner.header,
985
+ tertiary: banner.header
986
+ } };
987
+ else if (isSetObject(banner.header)) {
988
+ if (isSetString(header.primary)) resolvedConfig.icons.banner.header.primary = header.primary;
989
+ if (isSetString(header.secondary)) resolvedConfig.icons.banner.header.secondary = header.secondary;
990
+ if (isSetString(header.tertiary)) resolvedConfig.icons.banner.header.tertiary = header.tertiary;
991
+ }
992
+ }
993
+ }
994
+ resolvedConfig.labels ??= { message: { header: {} } };
995
+ const labels = dictionary.labels;
996
+ if (isSetString(labels)) resolvedConfig.labels = { message: { header: {
997
+ help: labels,
998
+ success: labels,
999
+ info: labels,
1000
+ warning: labels,
1001
+ danger: labels,
1002
+ error: labels
1003
+ } } };
1004
+ else if (isSetObject(labels)) {
1005
+ resolvedConfig.labels.message ??= {};
1006
+ const message = labels.message;
1007
+ if (isSetString(message)) resolvedConfig.labels = { message: { header: {
1008
+ help: message,
1009
+ success: message,
1010
+ info: message,
1011
+ warning: message,
1012
+ danger: message,
1013
+ error: message
1014
+ } } };
1015
+ else if (isSetObject(message)) {
1016
+ resolvedConfig.labels.message.header = {};
1017
+ const header = message.header;
1018
+ if (isSetString(header)) resolvedConfig.labels = { message: { header: {
1019
+ help: header,
1020
+ success: header,
1021
+ info: header,
1022
+ warning: header,
1023
+ danger: header,
1024
+ error: header
1025
+ } } };
1026
+ else if (isSetObject(header)) {
1027
+ if (isSetString(header.help)) resolvedConfig.labels.message.header.help = header.help;
1028
+ if (isSetString(header.success)) resolvedConfig.labels.message.header.success = header.success;
1029
+ if (isSetString(header.info)) resolvedConfig.labels.message.header.info = header.info;
1030
+ if (isSetString(header.warning)) resolvedConfig.labels.message.header.warning = header.warning;
1031
+ if (isSetString(header.danger)) resolvedConfig.labels.message.header.danger = header.danger;
1032
+ if (isSetString(header.error)) resolvedConfig.labels.message.header.error = header.error;
1033
+ }
1034
+ }
1035
+ }
1036
+ if (!resolvedConfig.colors.text?.body?.tertiary && resolvedConfig.colors.text?.body?.secondary) resolvedConfig.colors.text.body.tertiary = resolvedConfig.colors.text.body.secondary;
1037
+ if (!resolvedConfig.colors.text?.body?.secondary && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.body.secondary = resolvedConfig.colors.text.body.tertiary;
1038
+ if (!resolvedConfig.colors.text?.heading?.tertiary && resolvedConfig.colors.text?.heading?.secondary) resolvedConfig.colors.text.heading.tertiary = resolvedConfig.colors.text.heading.secondary;
1039
+ if (!resolvedConfig.colors.text?.heading?.secondary && resolvedConfig.colors.text?.heading?.tertiary) resolvedConfig.colors.text.heading.secondary = resolvedConfig.colors.text.heading.tertiary;
1040
+ if (!resolvedConfig.colors.text?.heading?.primary && resolvedConfig.colors.text?.banner?.title) resolvedConfig.colors.text.heading.primary = resolvedConfig.colors.text.banner.title;
1041
+ if (!resolvedConfig.colors.text?.heading?.tertiary && resolvedConfig.colors.text?.body?.secondary) resolvedConfig.colors.text.heading.tertiary = resolvedConfig.colors.text.body.secondary;
1042
+ if (!resolvedConfig.colors.text?.heading?.secondary && resolvedConfig.colors.text?.body?.primary) resolvedConfig.colors.text.heading.secondary = resolvedConfig.colors.text.body.primary;
1043
+ if (!resolvedConfig.colors.text?.usage?.bin && resolvedConfig.colors.text?.body?.primary) resolvedConfig.colors.text.usage.bin = resolvedConfig.colors.text.body.primary;
1044
+ if (!resolvedConfig.colors.text?.usage?.command && resolvedConfig.colors.text?.body?.secondary) resolvedConfig.colors.text.usage.command = resolvedConfig.colors.text.body.secondary;
1045
+ if (!resolvedConfig.colors.text?.usage?.subcommand && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.usage.subcommand = resolvedConfig.colors.text.body.tertiary;
1046
+ if (!resolvedConfig.colors.text?.usage?.options && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.usage.options = resolvedConfig.colors.text.body.tertiary;
1047
+ if (!resolvedConfig.colors.text?.usage?.params && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.usage.params = resolvedConfig.colors.text.body.tertiary;
1048
+ if (!resolvedConfig.colors.text?.usage?.description && resolvedConfig.colors.text?.body?.secondary) resolvedConfig.colors.text.usage.description = resolvedConfig.colors.text.body.secondary;
1049
+ if (!resolvedConfig.colors.text?.banner?.title && resolvedConfig.colors.text?.heading?.primary) resolvedConfig.colors.text.banner.title = resolvedConfig.colors.text.heading.primary;
1050
+ if (!resolvedConfig.colors.text?.banner?.command && (resolvedConfig.colors.text?.heading?.secondary || resolvedConfig.colors.text?.heading?.primary)) resolvedConfig.colors.text.banner.command = resolvedConfig.colors.text.heading.secondary || resolvedConfig.colors.text.heading.primary;
1051
+ if (!resolvedConfig.colors.text?.banner?.description && resolvedConfig.colors.text?.body?.primary) resolvedConfig.colors.text.banner.description = resolvedConfig.colors.text.body.primary;
1052
+ 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;
1053
+ 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;
1054
+ 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;
1055
+ if (!resolvedConfig.colors.text?.banner?.header && resolvedConfig.colors.border?.banner?.outline?.primary) resolvedConfig.colors.text.banner.header = resolvedConfig.colors.border.banner.outline.primary;
1056
+ if (!resolvedConfig.colors.text?.banner?.footer && resolvedConfig.colors.border?.banner?.outline?.primary) resolvedConfig.colors.text.banner.footer = resolvedConfig.colors.border.banner.outline.primary;
1057
+ if (!resolvedConfig.colors.border?.banner?.outline?.primary && resolvedConfig.colors.text?.banner?.title) resolvedConfig.colors.border.banner.outline.primary = resolvedConfig.colors.text.banner.title;
1058
+ 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;
1059
+ 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;
1060
+ 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;
1061
+ if (!resolvedConfig.colors.border?.app?.outline?.primary && (resolvedConfig.colors.border?.app?.outline?.secondary || resolvedConfig.colors.border?.app?.outline?.tertiary)) resolvedConfig.colors.border.app.outline.primary = resolvedConfig.colors.border.app.outline.secondary || resolvedConfig.colors.border.app.outline.tertiary;
1062
+ if (!resolvedConfig.colors.border?.app?.outline?.secondary && (resolvedConfig.colors.border?.app?.outline?.primary || resolvedConfig.colors.border?.app?.outline?.tertiary)) resolvedConfig.colors.border.app.outline.secondary = resolvedConfig.colors.border.app.outline.primary || resolvedConfig.colors.border.app.outline.tertiary;
1063
+ if (!resolvedConfig.colors.border?.app?.outline?.tertiary && (resolvedConfig.colors.border?.app?.outline?.primary || resolvedConfig.colors.border?.app?.outline?.secondary)) resolvedConfig.colors.border.app.outline.tertiary = resolvedConfig.colors.border.app.outline.primary || resolvedConfig.colors.border.app.outline.secondary;
1064
+ 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;
1065
+ 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;
1066
+ 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;
1067
+ 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;
1068
+ 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;
1069
+ 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;
1070
+ 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;
1071
+ 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;
1072
+ 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;
1073
+ 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;
1074
+ 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;
1075
+ 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;
1076
+ 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;
1077
+ 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;
1078
+ 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;
1079
+ 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;
1080
+ 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;
1081
+ 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;
1082
+ 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;
1083
+ 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;
1084
+ 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;
1085
+ 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;
1086
+ if (!resolvedConfig.colors.text.message?.link?.help && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.help = resolvedConfig.colors.text.body.link;
1087
+ if (!resolvedConfig.colors.text.message?.link?.success && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.success = resolvedConfig.colors.text.body.link;
1088
+ if (!resolvedConfig.colors.text.message?.link?.info && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.info = resolvedConfig.colors.text.body.link;
1089
+ if (!resolvedConfig.colors.text.message?.link?.warning && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.warning = resolvedConfig.colors.text.body.link;
1090
+ if (!resolvedConfig.colors.text.message?.link?.danger && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.danger = resolvedConfig.colors.text.body.link;
1091
+ if (!resolvedConfig.colors.text.message?.link?.error && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.error = resolvedConfig.colors.text.body.link;
1092
+ context.theme = resolvedConfig;
1093
+ return dictionary;
1094
+ }
1095
+ });
1096
+
1097
+ //#endregion
1098
+ export { preprocessor };