@shell-shock/plugin-theme 0.0.21 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +1 -1
  2. package/dist/index.cjs +22 -3
  3. package/dist/index.d.cts +2 -2
  4. package/dist/index.d.cts.map +1 -1
  5. package/dist/index.d.mts +2 -2
  6. package/dist/index.d.mts.map +1 -1
  7. package/dist/index.mjs +22 -3
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/style-dictionary/border-styles.cjs +259 -0
  10. package/dist/style-dictionary/border-styles.mjs +259 -0
  11. package/dist/style-dictionary/border-styles.mjs.map +1 -0
  12. package/dist/style-dictionary/{preprocessor.cjs → colors.cjs} +323 -550
  13. package/dist/style-dictionary/{preprocessor.mjs → colors.mjs} +325 -552
  14. package/dist/style-dictionary/colors.mjs.map +1 -0
  15. package/dist/style-dictionary/helpers.cjs +14 -0
  16. package/dist/style-dictionary/helpers.mjs +14 -1
  17. package/dist/style-dictionary/helpers.mjs.map +1 -1
  18. package/dist/style-dictionary/icons.cjs +133 -0
  19. package/dist/style-dictionary/icons.mjs +133 -0
  20. package/dist/style-dictionary/icons.mjs.map +1 -0
  21. package/dist/style-dictionary/labels.cjs +151 -0
  22. package/dist/style-dictionary/labels.mjs +151 -0
  23. package/dist/style-dictionary/labels.mjs.map +1 -0
  24. package/dist/style-dictionary/padding.cjs +274 -0
  25. package/dist/style-dictionary/padding.mjs +274 -0
  26. package/dist/style-dictionary/padding.mjs.map +1 -0
  27. package/dist/style-dictionary/settings.cjs +26 -0
  28. package/dist/style-dictionary/settings.mjs +26 -0
  29. package/dist/style-dictionary/settings.mjs.map +1 -0
  30. package/dist/themes/storm.cjs +50 -5
  31. package/dist/themes/storm.mjs +50 -5
  32. package/dist/themes/storm.mjs.map +1 -1
  33. package/dist/types/index.d.cts +2 -2
  34. package/dist/types/index.d.mts +2 -2
  35. package/dist/types/theme.d.cts +41 -1
  36. package/dist/types/theme.d.cts.map +1 -1
  37. package/dist/types/theme.d.mts +41 -1
  38. package/dist/types/theme.d.mts.map +1 -1
  39. package/package.json +7 -7
  40. package/dist/style-dictionary/preprocessor.mjs.map +0 -1
@@ -1,17 +1,16 @@
1
- import { resolveBorderStyle } from "./helpers.mjs";
1
+ import { mergeThemes } from "./helpers.mjs";
2
2
  import { isSetObject } from "@stryke/type-checks/is-set-object";
3
- import { isNumber } from "@stryke/type-checks/is-number";
4
3
  import { isSetString } from "@stryke/type-checks/is-set-string";
5
4
 
6
- //#region src/style-dictionary/preprocessor.ts
5
+ //#region src/style-dictionary/colors.ts
7
6
  /**
8
- * Shell Shock - Theme Preprocessor
7
+ * Shell Shock - Theme Colors Preprocessor
9
8
  *
10
9
  * @remarks
11
10
  * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.
12
11
  */
13
- const preprocessor = (context) => ({
14
- name: "shell-shock/preprocessor",
12
+ const colors = (context) => ({
13
+ name: "shell-shock/colors",
15
14
  preprocessor: (dictionary, _options) => {
16
15
  const resolvedConfig = {};
17
16
  resolvedConfig.name = dictionary.$theme ?? context.config.name;
@@ -42,147 +41,184 @@ const preprocessor = (context) => ({
42
41
  }
43
42
  }
44
43
  };
45
- const colors = dictionary.colors;
46
- if (isSetString(colors)) resolvedConfig.colors = {
44
+ const colors$1 = dictionary.colors;
45
+ if (isSetString(colors$1)) resolvedConfig.colors = {
47
46
  text: {
48
47
  banner: {
49
48
  title: {
50
- primary: colors,
51
- secondary: colors,
52
- tertiary: colors
49
+ primary: colors$1,
50
+ secondary: colors$1,
51
+ tertiary: colors$1
53
52
  },
54
53
  header: {
55
- primary: colors,
56
- secondary: colors,
57
- tertiary: colors
54
+ primary: colors$1,
55
+ secondary: colors$1,
56
+ tertiary: colors$1
58
57
  },
59
58
  footer: {
60
- primary: colors,
61
- secondary: colors,
62
- tertiary: colors
59
+ primary: colors$1,
60
+ secondary: colors$1,
61
+ tertiary: colors$1
63
62
  },
64
63
  command: {
65
- primary: colors,
66
- secondary: colors,
67
- tertiary: colors
64
+ primary: colors$1,
65
+ secondary: colors$1,
66
+ tertiary: colors$1
68
67
  },
69
68
  description: {
70
- primary: colors,
71
- secondary: colors,
72
- tertiary: colors
69
+ primary: colors$1,
70
+ secondary: colors$1,
71
+ tertiary: colors$1
73
72
  },
74
73
  link: {
75
- primary: colors,
76
- secondary: colors,
77
- tertiary: colors
74
+ primary: colors$1,
75
+ secondary: colors$1,
76
+ tertiary: colors$1
78
77
  }
79
78
  },
80
79
  heading: {
81
- primary: colors,
82
- secondary: colors,
83
- tertiary: colors
80
+ primary: colors$1,
81
+ secondary: colors$1,
82
+ tertiary: colors$1
84
83
  },
85
84
  body: {
86
- primary: colors,
87
- secondary: colors,
88
- tertiary: colors,
89
- link: colors
85
+ primary: colors$1,
86
+ secondary: colors$1,
87
+ tertiary: colors$1,
88
+ link: colors$1
90
89
  },
91
90
  message: {
92
91
  link: {
93
- help: colors,
94
- success: colors,
95
- info: colors,
96
- debug: colors,
97
- warning: colors,
98
- danger: colors,
99
- error: colors
92
+ help: colors$1,
93
+ success: colors$1,
94
+ info: colors$1,
95
+ debug: colors$1,
96
+ warning: colors$1,
97
+ danger: colors$1,
98
+ error: colors$1
100
99
  },
101
100
  header: {
102
- help: colors,
103
- success: colors,
104
- info: colors,
105
- debug: colors,
106
- warning: colors,
107
- danger: colors,
108
- error: colors
101
+ help: colors$1,
102
+ success: colors$1,
103
+ info: colors$1,
104
+ debug: colors$1,
105
+ warning: colors$1,
106
+ danger: colors$1,
107
+ error: colors$1
109
108
  },
110
109
  footer: {
111
- help: colors,
112
- success: colors,
113
- info: colors,
114
- debug: colors,
115
- warning: colors,
116
- danger: colors,
117
- error: colors
110
+ help: colors$1,
111
+ success: colors$1,
112
+ info: colors$1,
113
+ debug: colors$1,
114
+ warning: colors$1,
115
+ danger: colors$1,
116
+ error: colors$1
118
117
  },
119
118
  description: {
120
- help: colors,
121
- success: colors,
122
- info: colors,
123
- debug: colors,
124
- warning: colors,
125
- danger: colors,
126
- error: colors
119
+ help: colors$1,
120
+ success: colors$1,
121
+ info: colors$1,
122
+ debug: colors$1,
123
+ warning: colors$1,
124
+ danger: colors$1,
125
+ error: colors$1
127
126
  }
128
127
  },
129
128
  usage: {
130
- bin: colors,
131
- command: colors,
132
- dynamic: colors,
133
- options: colors,
134
- arguments: colors,
135
- description: colors
129
+ bin: colors$1,
130
+ command: colors$1,
131
+ dynamic: colors$1,
132
+ options: colors$1,
133
+ arguments: colors$1,
134
+ description: colors$1
135
+ },
136
+ prompt: {
137
+ icon: {
138
+ active: colors$1,
139
+ cancelled: colors$1,
140
+ warning: colors$1,
141
+ error: colors$1,
142
+ submitted: colors$1,
143
+ disabled: colors$1
144
+ },
145
+ message: {
146
+ active: colors$1,
147
+ cancelled: colors$1,
148
+ warning: colors$1,
149
+ error: colors$1,
150
+ submitted: colors$1,
151
+ disabled: colors$1
152
+ },
153
+ input: {
154
+ active: colors$1,
155
+ inactive: colors$1,
156
+ cancelled: colors$1,
157
+ warning: colors$1,
158
+ error: colors$1,
159
+ submitted: colors$1,
160
+ placeholder: colors$1,
161
+ disabled: colors$1
162
+ },
163
+ description: {
164
+ active: colors$1,
165
+ inactive: colors$1,
166
+ cancelled: colors$1,
167
+ warning: colors$1,
168
+ error: colors$1,
169
+ submitted: colors$1,
170
+ disabled: colors$1
171
+ }
136
172
  }
137
173
  },
138
174
  border: {
139
175
  banner: {
140
176
  outline: {
141
- primary: colors,
142
- secondary: colors,
143
- tertiary: colors
177
+ primary: colors$1,
178
+ secondary: colors$1,
179
+ tertiary: colors$1
144
180
  },
145
181
  divider: {
146
- primary: colors,
147
- secondary: colors,
148
- tertiary: colors
182
+ primary: colors$1,
183
+ secondary: colors$1,
184
+ tertiary: colors$1
149
185
  }
150
186
  },
151
187
  app: {
152
188
  table: {
153
- primary: colors,
154
- secondary: colors,
155
- tertiary: colors
189
+ primary: colors$1,
190
+ secondary: colors$1,
191
+ tertiary: colors$1
156
192
  },
157
193
  divider: {
158
- primary: colors,
159
- secondary: colors,
160
- tertiary: colors
194
+ primary: colors$1,
195
+ secondary: colors$1,
196
+ tertiary: colors$1
161
197
  }
162
198
  },
163
199
  message: {
164
200
  outline: {
165
- help: colors,
166
- success: colors,
167
- info: colors,
168
- debug: colors,
169
- warning: colors,
170
- danger: colors,
171
- error: colors
201
+ help: colors$1,
202
+ success: colors$1,
203
+ info: colors$1,
204
+ debug: colors$1,
205
+ warning: colors$1,
206
+ danger: colors$1,
207
+ error: colors$1
172
208
  },
173
209
  divider: {
174
- help: colors,
175
- success: colors,
176
- info: colors,
177
- debug: colors,
178
- warning: colors,
179
- danger: colors,
180
- error: colors
210
+ help: colors$1,
211
+ success: colors$1,
212
+ info: colors$1,
213
+ debug: colors$1,
214
+ warning: colors$1,
215
+ danger: colors$1,
216
+ error: colors$1
181
217
  }
182
218
  }
183
219
  }
184
220
  };
185
- else if (isSetObject(colors)) {
221
+ else if (isSetObject(colors$1)) {
186
222
  resolvedConfig.colors.text ??= {
187
223
  banner: {},
188
224
  heading: {},
@@ -194,7 +230,7 @@ const preprocessor = (context) => ({
194
230
  description: {}
195
231
  }
196
232
  };
197
- const text = colors.text;
233
+ const text = colors$1.text;
198
234
  if (isSetString(text)) resolvedConfig.colors.text = {
199
235
  banner: {
200
236
  title: {
@@ -284,6 +320,43 @@ const preprocessor = (context) => ({
284
320
  options: text,
285
321
  arguments: text,
286
322
  description: text
323
+ },
324
+ prompt: {
325
+ icon: {
326
+ active: text,
327
+ cancelled: text,
328
+ warning: text,
329
+ error: text,
330
+ submitted: text,
331
+ disabled: text
332
+ },
333
+ message: {
334
+ active: text,
335
+ cancelled: text,
336
+ warning: text,
337
+ error: text,
338
+ submitted: text,
339
+ disabled: text
340
+ },
341
+ input: {
342
+ active: text,
343
+ inactive: text,
344
+ cancelled: text,
345
+ warning: text,
346
+ error: text,
347
+ submitted: text,
348
+ placeholder: text,
349
+ disabled: text
350
+ },
351
+ description: {
352
+ active: text,
353
+ inactive: text,
354
+ cancelled: text,
355
+ warning: text,
356
+ error: text,
357
+ submitted: text,
358
+ disabled: text
359
+ }
287
360
  }
288
361
  };
289
362
  else if (isSetObject(text)) {
@@ -567,6 +640,130 @@ const preprocessor = (context) => ({
567
640
  if (isSetString(footer.error)) resolvedConfig.colors.text.message.footer.error = footer.error;
568
641
  }
569
642
  }
643
+ resolvedConfig.colors.text.prompt ??= {
644
+ icon: {},
645
+ message: {},
646
+ input: {},
647
+ description: {}
648
+ };
649
+ const prompt = text.prompt;
650
+ if (isSetString(prompt)) resolvedConfig.colors.text.prompt = {
651
+ icon: {
652
+ active: prompt,
653
+ cancelled: prompt,
654
+ warning: prompt,
655
+ error: prompt,
656
+ submitted: prompt,
657
+ disabled: prompt
658
+ },
659
+ message: {
660
+ active: prompt,
661
+ cancelled: prompt,
662
+ warning: prompt,
663
+ error: prompt,
664
+ submitted: prompt,
665
+ disabled: prompt
666
+ },
667
+ input: {
668
+ active: prompt,
669
+ inactive: prompt,
670
+ cancelled: prompt,
671
+ warning: prompt,
672
+ error: prompt,
673
+ submitted: prompt,
674
+ placeholder: prompt,
675
+ disabled: prompt
676
+ },
677
+ description: {
678
+ active: prompt,
679
+ inactive: prompt,
680
+ cancelled: prompt,
681
+ warning: prompt,
682
+ error: prompt,
683
+ submitted: prompt,
684
+ disabled: prompt
685
+ }
686
+ };
687
+ else if (isSetObject(prompt)) {
688
+ if (isSetString(prompt.icon)) {
689
+ const icon = prompt.icon;
690
+ resolvedConfig.colors.text.prompt.icon = {
691
+ active: icon,
692
+ cancelled: icon,
693
+ warning: icon,
694
+ error: icon,
695
+ submitted: icon,
696
+ disabled: icon
697
+ };
698
+ } else if (isSetObject(prompt.icon)) {
699
+ if (isSetString(prompt.icon.active)) resolvedConfig.colors.text.prompt.icon.active = prompt.icon.active;
700
+ if (isSetString(prompt.icon.cancelled)) resolvedConfig.colors.text.prompt.icon.cancelled = prompt.icon.cancelled;
701
+ if (isSetString(prompt.icon.warning)) resolvedConfig.colors.text.prompt.icon.warning = prompt.icon.warning;
702
+ if (isSetString(prompt.icon.error)) resolvedConfig.colors.text.prompt.icon.error = prompt.icon.error;
703
+ if (isSetString(prompt.icon.submitted)) resolvedConfig.colors.text.prompt.icon.submitted = prompt.icon.submitted;
704
+ if (isSetString(prompt.icon.disabled)) resolvedConfig.colors.text.prompt.icon.disabled = prompt.icon.disabled;
705
+ }
706
+ if (isSetString(prompt.message)) {
707
+ const message$1 = prompt.message;
708
+ resolvedConfig.colors.text.prompt.message = {
709
+ active: message$1,
710
+ cancelled: message$1,
711
+ warning: message$1,
712
+ error: message$1,
713
+ submitted: message$1,
714
+ disabled: message$1
715
+ };
716
+ } else if (isSetObject(prompt.message)) {
717
+ if (isSetString(prompt.message.active)) resolvedConfig.colors.text.prompt.message.active = prompt.message.active;
718
+ if (isSetString(prompt.message.cancelled)) resolvedConfig.colors.text.prompt.message.cancelled = prompt.message.cancelled;
719
+ if (isSetString(prompt.message.warning)) resolvedConfig.colors.text.prompt.message.warning = prompt.message.warning;
720
+ if (isSetString(prompt.message.error)) resolvedConfig.colors.text.prompt.message.error = prompt.message.error;
721
+ if (isSetString(prompt.message.submitted)) resolvedConfig.colors.text.prompt.message.submitted = prompt.message.submitted;
722
+ if (isSetString(prompt.message.disabled)) resolvedConfig.colors.text.prompt.message.disabled = prompt.message.disabled;
723
+ }
724
+ if (isSetString(prompt.input)) {
725
+ const input = prompt.input;
726
+ resolvedConfig.colors.text.prompt.input = {
727
+ active: input,
728
+ inactive: input,
729
+ cancelled: input,
730
+ warning: input,
731
+ error: input,
732
+ submitted: input,
733
+ placeholder: input,
734
+ disabled: input
735
+ };
736
+ } else if (isSetObject(prompt.input)) {
737
+ if (isSetString(prompt.input.active)) resolvedConfig.colors.text.prompt.input.active = prompt.input.active;
738
+ if (isSetString(prompt.input.inactive)) resolvedConfig.colors.text.prompt.input.inactive = prompt.input.inactive;
739
+ if (isSetString(prompt.input.cancelled)) resolvedConfig.colors.text.prompt.input.cancelled = prompt.input.cancelled;
740
+ if (isSetString(prompt.input.warning)) resolvedConfig.colors.text.prompt.input.warning = prompt.input.warning;
741
+ if (isSetString(prompt.input.error)) resolvedConfig.colors.text.prompt.input.error = prompt.input.error;
742
+ if (isSetString(prompt.input.submitted)) resolvedConfig.colors.text.prompt.input.submitted = prompt.input.submitted;
743
+ if (isSetString(prompt.input.placeholder)) resolvedConfig.colors.text.prompt.input.placeholder = prompt.input.placeholder;
744
+ if (isSetString(prompt.input.disabled)) resolvedConfig.colors.text.prompt.input.disabled = prompt.input.disabled;
745
+ }
746
+ if (isSetString(prompt.description)) {
747
+ const description = prompt.description;
748
+ resolvedConfig.colors.text.prompt.description = {
749
+ active: description,
750
+ inactive: description,
751
+ cancelled: description,
752
+ warning: description,
753
+ error: description,
754
+ submitted: description,
755
+ disabled: description
756
+ };
757
+ } else if (isSetObject(prompt.description)) {
758
+ if (isSetString(prompt.description.active)) resolvedConfig.colors.text.prompt.description.active = prompt.description.active;
759
+ if (isSetString(prompt.description.inactive)) resolvedConfig.colors.text.prompt.description.inactive = prompt.description.inactive;
760
+ if (isSetString(prompt.description.cancelled)) resolvedConfig.colors.text.prompt.description.cancelled = prompt.description.cancelled;
761
+ if (isSetString(prompt.description.warning)) resolvedConfig.colors.text.prompt.description.warning = prompt.description.warning;
762
+ if (isSetString(prompt.description.error)) resolvedConfig.colors.text.prompt.description.error = prompt.description.error;
763
+ if (isSetString(prompt.description.submitted)) resolvedConfig.colors.text.prompt.description.submitted = prompt.description.submitted;
764
+ if (isSetString(prompt.description.disabled)) resolvedConfig.colors.text.prompt.description.disabled = prompt.description.disabled;
765
+ }
766
+ }
570
767
  }
571
768
  resolvedConfig.colors.border ??= {
572
769
  banner: {
@@ -582,7 +779,7 @@ const preprocessor = (context) => ({
582
779
  divider: {}
583
780
  }
584
781
  };
585
- const border = colors.border;
782
+ const border = colors$1.border;
586
783
  if (isSetString(border)) resolvedConfig.colors.border = {
587
784
  banner: {
588
785
  outline: {
@@ -855,459 +1052,6 @@ const preprocessor = (context) => ({
855
1052
  }
856
1053
  }
857
1054
  }
858
- resolvedConfig.borderStyles ??= {
859
- banner: {
860
- outline: {},
861
- divider: {}
862
- },
863
- message: {
864
- outline: {},
865
- divider: {}
866
- },
867
- app: {
868
- table: {},
869
- divider: {}
870
- }
871
- };
872
- const borderStyles = dictionary.borderStyles;
873
- if (isSetString(borderStyles)) {
874
- const borderStyle = resolveBorderStyle(borderStyles);
875
- resolvedConfig.borderStyles = {
876
- banner: {
877
- outline: {
878
- primary: borderStyle,
879
- secondary: borderStyle,
880
- tertiary: borderStyle
881
- },
882
- divider: {
883
- primary: borderStyle,
884
- secondary: borderStyle,
885
- tertiary: borderStyle
886
- }
887
- },
888
- message: {
889
- outline: {
890
- help: borderStyle,
891
- success: borderStyle,
892
- info: borderStyle,
893
- debug: borderStyle,
894
- warning: borderStyle,
895
- danger: borderStyle,
896
- error: borderStyle
897
- },
898
- divider: {
899
- help: borderStyle,
900
- success: borderStyle,
901
- info: borderStyle,
902
- debug: borderStyle,
903
- warning: borderStyle,
904
- danger: borderStyle,
905
- error: borderStyle
906
- }
907
- },
908
- app: {
909
- table: {
910
- primary: borderStyle,
911
- secondary: borderStyle,
912
- tertiary: borderStyle
913
- },
914
- divider: {
915
- primary: borderStyle,
916
- secondary: borderStyle,
917
- tertiary: borderStyle
918
- }
919
- }
920
- };
921
- } else if (isSetObject(borderStyles)) {
922
- resolvedConfig.borderStyles.banner ??= {
923
- outline: {},
924
- divider: {}
925
- };
926
- const banner = borderStyles.banner;
927
- if (isSetString(banner)) {
928
- const borderStyle = resolveBorderStyle(banner);
929
- resolvedConfig.borderStyles.banner = {
930
- outline: {
931
- primary: borderStyle,
932
- secondary: borderStyle,
933
- tertiary: borderStyle
934
- },
935
- divider: {
936
- primary: borderStyle,
937
- secondary: borderStyle,
938
- tertiary: borderStyle
939
- }
940
- };
941
- } else if (isSetObject(banner)) {
942
- resolvedConfig.borderStyles.banner ??= {};
943
- const outline = banner.outline;
944
- if (isSetString(outline)) {
945
- const borderStyle = resolveBorderStyle(outline);
946
- resolvedConfig.borderStyles.banner.outline = {
947
- primary: borderStyle,
948
- secondary: borderStyle,
949
- tertiary: borderStyle
950
- };
951
- } else if (isSetObject(outline)) {
952
- resolvedConfig.borderStyles.banner.outline = {};
953
- if (isSetString(outline.primary)) resolvedConfig.borderStyles.banner.outline.primary = resolveBorderStyle(outline.primary);
954
- if (isSetString(outline.secondary)) resolvedConfig.borderStyles.banner.outline.secondary = resolveBorderStyle(outline.secondary);
955
- if (isSetString(outline.tertiary)) resolvedConfig.borderStyles.banner.outline.tertiary = resolveBorderStyle(outline.tertiary);
956
- }
957
- const divider = banner.divider;
958
- if (isSetString(divider)) {
959
- const borderStyle = resolveBorderStyle(divider);
960
- resolvedConfig.borderStyles.banner.divider = {
961
- primary: borderStyle,
962
- secondary: borderStyle,
963
- tertiary: borderStyle
964
- };
965
- } else if (isSetObject(divider)) {
966
- resolvedConfig.borderStyles.banner.divider = {};
967
- if (isSetString(divider.primary)) resolvedConfig.borderStyles.banner.divider.primary = resolveBorderStyle(divider.primary);
968
- if (isSetString(divider.secondary)) resolvedConfig.borderStyles.banner.divider.secondary = resolveBorderStyle(divider.secondary);
969
- if (isSetString(divider.tertiary)) resolvedConfig.borderStyles.banner.divider.tertiary = resolveBorderStyle(divider.tertiary);
970
- }
971
- }
972
- resolvedConfig.borderStyles.app ??= {
973
- table: {},
974
- divider: {}
975
- };
976
- const app = borderStyles.app;
977
- if (isSetString(app)) {
978
- const borderStyle = resolveBorderStyle(app);
979
- resolvedConfig.borderStyles.app = {
980
- table: {
981
- primary: borderStyle,
982
- secondary: borderStyle,
983
- tertiary: borderStyle
984
- },
985
- divider: {
986
- primary: borderStyle,
987
- secondary: borderStyle,
988
- tertiary: borderStyle
989
- }
990
- };
991
- } else if (isSetObject(app)) {
992
- resolvedConfig.borderStyles.app ??= {};
993
- const table = app.table;
994
- if (isSetString(table)) {
995
- const borderStyle = resolveBorderStyle(table);
996
- resolvedConfig.borderStyles.app.table = {
997
- primary: borderStyle,
998
- secondary: borderStyle,
999
- tertiary: borderStyle
1000
- };
1001
- } else if (isSetObject(table)) {
1002
- resolvedConfig.borderStyles.app.table = {};
1003
- if (isSetString(table.primary)) resolvedConfig.borderStyles.app.table.primary = resolveBorderStyle(table.primary);
1004
- if (isSetString(table.secondary)) resolvedConfig.borderStyles.app.table.secondary = resolveBorderStyle(table.secondary);
1005
- if (isSetString(table.tertiary)) resolvedConfig.borderStyles.app.table.tertiary = resolveBorderStyle(table.tertiary);
1006
- }
1007
- const divider = app.divider;
1008
- if (isSetString(divider)) {
1009
- const borderStyle = resolveBorderStyle(divider);
1010
- resolvedConfig.borderStyles.app.divider = {
1011
- primary: borderStyle,
1012
- secondary: borderStyle,
1013
- tertiary: borderStyle
1014
- };
1015
- } else if (isSetObject(divider)) {
1016
- resolvedConfig.borderStyles.app.divider = {};
1017
- if (isSetString(divider.primary)) resolvedConfig.borderStyles.app.divider.primary = resolveBorderStyle(divider.primary);
1018
- if (isSetString(divider.secondary)) resolvedConfig.borderStyles.app.divider.secondary = resolveBorderStyle(divider.secondary);
1019
- if (isSetString(divider.tertiary)) resolvedConfig.borderStyles.app.divider.tertiary = resolveBorderStyle(divider.tertiary);
1020
- }
1021
- }
1022
- resolvedConfig.borderStyles.message ??= {};
1023
- const message = borderStyles.message;
1024
- if (isSetString(message)) {
1025
- const borderStyle = resolveBorderStyle(message);
1026
- resolvedConfig.borderStyles.message = {
1027
- outline: {
1028
- help: borderStyle,
1029
- success: borderStyle,
1030
- info: borderStyle,
1031
- debug: borderStyle,
1032
- warning: borderStyle,
1033
- danger: borderStyle,
1034
- error: borderStyle
1035
- },
1036
- divider: {
1037
- help: borderStyle,
1038
- success: borderStyle,
1039
- info: borderStyle,
1040
- debug: borderStyle,
1041
- warning: borderStyle,
1042
- danger: borderStyle,
1043
- error: borderStyle
1044
- }
1045
- };
1046
- } else if (isSetObject(message)) {
1047
- const outline = message.outline;
1048
- if (isSetString(outline)) {
1049
- const borderStyle = resolveBorderStyle(outline);
1050
- resolvedConfig.borderStyles.message.outline = {
1051
- help: borderStyle,
1052
- success: borderStyle,
1053
- info: borderStyle,
1054
- debug: borderStyle,
1055
- warning: borderStyle,
1056
- danger: borderStyle,
1057
- error: borderStyle
1058
- };
1059
- } else if (isSetObject(outline)) {
1060
- resolvedConfig.borderStyles.message.outline = {};
1061
- if (isSetString(outline.help)) resolvedConfig.borderStyles.message.outline.help = resolveBorderStyle(outline.help);
1062
- if (isSetString(outline.success)) resolvedConfig.borderStyles.message.outline.success = resolveBorderStyle(outline.success);
1063
- if (isSetString(outline.info)) resolvedConfig.borderStyles.message.outline.info = resolveBorderStyle(outline.info);
1064
- if (isSetString(outline.debug)) resolvedConfig.borderStyles.message.outline.debug = resolveBorderStyle(outline.debug);
1065
- if (isSetString(outline.warning)) resolvedConfig.borderStyles.message.outline.warning = resolveBorderStyle(outline.warning);
1066
- if (isSetString(outline.danger)) resolvedConfig.borderStyles.message.outline.danger = resolveBorderStyle(outline.danger);
1067
- if (isSetString(outline.error)) resolvedConfig.borderStyles.message.outline.error = resolveBorderStyle(outline.error);
1068
- }
1069
- resolvedConfig.borderStyles.message.divider ??= {};
1070
- const divider = message.divider;
1071
- if (isSetString(divider)) {
1072
- const borderStyle = resolveBorderStyle(divider);
1073
- resolvedConfig.borderStyles.message.divider = {
1074
- help: borderStyle,
1075
- success: borderStyle,
1076
- info: borderStyle,
1077
- debug: borderStyle,
1078
- warning: borderStyle,
1079
- danger: borderStyle,
1080
- error: borderStyle
1081
- };
1082
- } else if (isSetObject(divider)) {
1083
- if (isSetString(divider.help)) resolvedConfig.borderStyles.message.divider.help = resolveBorderStyle(divider.help);
1084
- if (isSetString(divider.success)) resolvedConfig.borderStyles.message.divider.success = resolveBorderStyle(divider.success);
1085
- if (isSetString(divider.info)) resolvedConfig.borderStyles.message.divider.info = resolveBorderStyle(divider.info);
1086
- if (isSetString(divider.debug)) resolvedConfig.borderStyles.message.divider.debug = resolveBorderStyle(divider.debug);
1087
- if (isSetString(divider.warning)) resolvedConfig.borderStyles.message.divider.warning = resolveBorderStyle(divider.warning);
1088
- if (isSetString(divider.danger)) resolvedConfig.borderStyles.message.divider.danger = resolveBorderStyle(divider.danger);
1089
- if (isSetString(divider.error)) resolvedConfig.borderStyles.message.divider.error = resolveBorderStyle(divider.error);
1090
- }
1091
- }
1092
- }
1093
- resolvedConfig.padding ??= {};
1094
- const padding = dictionary.padding;
1095
- if (isNumber(padding)) resolvedConfig.padding = {
1096
- banner: padding,
1097
- message: padding,
1098
- app: padding,
1099
- table: padding
1100
- };
1101
- else if (isSetObject(padding)) {
1102
- if (isNumber(padding.banner)) resolvedConfig.padding.banner = padding.banner;
1103
- if (isNumber(padding.message)) resolvedConfig.padding.message = padding.message;
1104
- if (isNumber(padding.app)) resolvedConfig.padding.app = padding.app;
1105
- if (isNumber(padding.table)) resolvedConfig.padding.table = padding.table;
1106
- }
1107
- resolvedConfig.icons ??= {
1108
- message: { header: {} },
1109
- banner: { header: {} }
1110
- };
1111
- const icons = dictionary.icons;
1112
- if (isSetString(icons)) resolvedConfig.icons = {
1113
- message: { header: {
1114
- help: icons,
1115
- success: icons,
1116
- info: icons,
1117
- debug: icons,
1118
- warning: icons,
1119
- danger: icons,
1120
- error: icons
1121
- } },
1122
- banner: { header: {
1123
- primary: icons,
1124
- secondary: icons,
1125
- tertiary: icons
1126
- } }
1127
- };
1128
- else if (isSetObject(icons)) {
1129
- resolvedConfig.icons.message = {};
1130
- const message = icons.message;
1131
- if (isSetString(message)) resolvedConfig.icons.message = { header: {
1132
- help: message,
1133
- success: message,
1134
- info: message,
1135
- debug: message,
1136
- warning: message,
1137
- danger: message,
1138
- error: message
1139
- } };
1140
- else if (isSetObject(message)) {
1141
- resolvedConfig.icons.message.header ??= {};
1142
- const header = message.header;
1143
- if (isSetString(header)) resolvedConfig.icons.message = { header: {
1144
- help: header,
1145
- success: header,
1146
- info: header,
1147
- debug: header,
1148
- warning: header,
1149
- danger: header,
1150
- error: header
1151
- } };
1152
- else if (isSetObject(header)) {
1153
- if (isSetString(header.help)) resolvedConfig.icons.message.header.help = header.help;
1154
- if (isSetString(header.success)) resolvedConfig.icons.message.header.success = header.success;
1155
- if (isSetString(header.info)) resolvedConfig.icons.message.header.info = header.info;
1156
- if (isSetString(header.debug)) resolvedConfig.icons.message.header.debug = header.debug;
1157
- if (isSetString(header.warning)) resolvedConfig.icons.message.header.warning = header.warning;
1158
- if (isSetString(header.danger)) resolvedConfig.icons.message.header.danger = header.danger;
1159
- if (isSetString(header.error)) resolvedConfig.icons.message.header.error = header.error;
1160
- }
1161
- }
1162
- resolvedConfig.icons.banner ??= { header: {} };
1163
- const banner = icons.banner;
1164
- if (isSetString(banner)) resolvedConfig.icons.banner = { header: {
1165
- primary: banner,
1166
- secondary: banner,
1167
- tertiary: banner
1168
- } };
1169
- else if (isSetObject(banner)) {
1170
- resolvedConfig.icons.banner.header ??= {};
1171
- const header = banner.header;
1172
- if (isSetString(banner.header)) resolvedConfig.icons.banner = { header: {
1173
- primary: banner.header,
1174
- secondary: banner.header,
1175
- tertiary: banner.header
1176
- } };
1177
- else if (isSetObject(banner.header)) {
1178
- if (isSetString(header.primary)) resolvedConfig.icons.banner.header.primary = header.primary;
1179
- if (isSetString(header.secondary)) resolvedConfig.icons.banner.header.secondary = header.secondary;
1180
- if (isSetString(header.tertiary)) resolvedConfig.icons.banner.header.tertiary = header.tertiary;
1181
- }
1182
- }
1183
- }
1184
- resolvedConfig.labels ??= {
1185
- message: {
1186
- header: {},
1187
- footer: {}
1188
- },
1189
- banner: {
1190
- header: {},
1191
- footer: {}
1192
- }
1193
- };
1194
- const labels = dictionary.labels;
1195
- if (isSetString(labels)) resolvedConfig.labels = {
1196
- message: {
1197
- header: {
1198
- help: labels,
1199
- success: labels,
1200
- info: labels,
1201
- debug: labels,
1202
- warning: labels,
1203
- danger: labels,
1204
- error: labels
1205
- },
1206
- footer: {}
1207
- },
1208
- banner: {
1209
- header: {
1210
- primary: labels,
1211
- secondary: labels,
1212
- tertiary: labels
1213
- },
1214
- footer: {}
1215
- }
1216
- };
1217
- else if (isSetObject(labels)) {
1218
- resolvedConfig.labels.message ??= {};
1219
- const message = labels?.message;
1220
- if (isSetString(message)) resolvedConfig.labels.message = {
1221
- header: {
1222
- help: message,
1223
- success: message,
1224
- info: message,
1225
- debug: message,
1226
- warning: message,
1227
- danger: message,
1228
- error: message
1229
- },
1230
- footer: {}
1231
- };
1232
- else if (isSetObject(message)) {
1233
- resolvedConfig.labels.message.header = {};
1234
- resolvedConfig.labels.message.footer = {};
1235
- const header = message.header;
1236
- const footer = message.footer;
1237
- if (isSetString(header)) resolvedConfig.labels.message.header = {
1238
- help: header,
1239
- success: header,
1240
- info: header,
1241
- debug: header,
1242
- warning: header,
1243
- danger: header,
1244
- error: header
1245
- };
1246
- else if (isSetObject(header)) {
1247
- if (isSetString(header.help)) resolvedConfig.labels.message.header.help = header.help;
1248
- if (isSetString(header.success)) resolvedConfig.labels.message.header.success = header.success;
1249
- if (isSetString(header.info)) resolvedConfig.labels.message.header.info = header.info;
1250
- if (isSetString(header.debug)) resolvedConfig.labels.message.header.debug = header.debug;
1251
- if (isSetString(header.warning)) resolvedConfig.labels.message.header.warning = header.warning;
1252
- if (isSetString(header.danger)) resolvedConfig.labels.message.header.danger = header.danger;
1253
- if (isSetString(header.error)) resolvedConfig.labels.message.header.error = header.error;
1254
- }
1255
- if (isSetString(footer)) resolvedConfig.labels.message.footer = {
1256
- help: footer,
1257
- success: footer,
1258
- info: footer,
1259
- debug: footer,
1260
- warning: footer,
1261
- danger: footer,
1262
- error: footer
1263
- };
1264
- else if (isSetObject(footer)) {
1265
- if (isSetString(footer.help)) resolvedConfig.labels.message.footer.help = footer.help;
1266
- if (isSetString(footer.success)) resolvedConfig.labels.message.footer.success = footer.success;
1267
- if (isSetString(footer.info)) resolvedConfig.labels.message.footer.info = footer.info;
1268
- if (isSetString(footer.debug)) resolvedConfig.labels.message.footer.debug = footer.debug;
1269
- if (isSetString(footer.warning)) resolvedConfig.labels.message.footer.warning = footer.warning;
1270
- if (isSetString(footer.danger)) resolvedConfig.labels.message.footer.danger = footer.danger;
1271
- if (isSetString(footer.error)) resolvedConfig.labels.message.footer.error = footer.error;
1272
- }
1273
- resolvedConfig.labels.banner ??= {};
1274
- const banner = labels?.banner;
1275
- if (isSetString(banner)) resolvedConfig.labels.banner = {
1276
- header: {
1277
- primary: banner,
1278
- secondary: banner,
1279
- tertiary: banner
1280
- },
1281
- footer: {}
1282
- };
1283
- else if (isSetObject(banner)) {
1284
- resolvedConfig.labels.banner.header = {};
1285
- resolvedConfig.labels.banner.footer = {};
1286
- const header$1 = banner.header;
1287
- const footer$1 = banner.footer;
1288
- if (isSetString(header$1)) resolvedConfig.labels.banner.header = {
1289
- primary: header$1,
1290
- secondary: header$1,
1291
- tertiary: header$1
1292
- };
1293
- else if (isSetObject(header$1)) {
1294
- if (isSetString(header$1.primary)) resolvedConfig.labels.banner.header.primary = header$1.primary;
1295
- if (isSetString(header$1.secondary)) resolvedConfig.labels.banner.header.secondary = header$1.secondary;
1296
- if (isSetString(header$1.tertiary)) resolvedConfig.labels.banner.header.tertiary = header$1.tertiary;
1297
- }
1298
- if (isSetString(footer$1)) resolvedConfig.labels.banner.footer = {
1299
- primary: footer$1,
1300
- secondary: footer$1,
1301
- tertiary: footer$1
1302
- };
1303
- else if (isSetObject(footer$1)) {
1304
- if (isSetString(footer$1.primary)) resolvedConfig.labels.banner.footer.primary = footer$1.primary;
1305
- if (isSetString(footer$1.secondary)) resolvedConfig.labels.banner.footer.secondary = footer$1.secondary;
1306
- if (isSetString(footer$1.tertiary)) resolvedConfig.labels.banner.footer.tertiary = footer$1.tertiary;
1307
- }
1308
- }
1309
- }
1310
- }
1311
1055
  if (!resolvedConfig.colors.text?.body?.tertiary && resolvedConfig.colors.text?.body?.secondary) resolvedConfig.colors.text.body.tertiary = resolvedConfig.colors.text.body.secondary;
1312
1056
  if (!resolvedConfig.colors.text?.body?.secondary && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.body.secondary = resolvedConfig.colors.text.body.tertiary;
1313
1057
  if (!resolvedConfig.colors.text?.heading?.tertiary && resolvedConfig.colors.text?.heading?.secondary) resolvedConfig.colors.text.heading.tertiary = resolvedConfig.colors.text.heading.secondary;
@@ -1441,11 +1185,40 @@ const preprocessor = (context) => ({
1441
1185
  if (!resolvedConfig.colors.text.message?.link?.warning && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.warning = resolvedConfig.colors.text.body.link;
1442
1186
  if (!resolvedConfig.colors.text.message?.link?.danger && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.danger = resolvedConfig.colors.text.body.link;
1443
1187
  if (!resolvedConfig.colors.text.message?.link?.error && resolvedConfig.colors.text?.body?.link) resolvedConfig.colors.text.message.link.error = resolvedConfig.colors.text.body.link;
1444
- context.theme = resolvedConfig;
1188
+ 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;
1189
+ 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;
1190
+ 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;
1191
+ 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;
1192
+ if (!resolvedConfig.colors.text.prompt.icon?.disabled && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.prompt.icon.disabled = resolvedConfig.colors.text.body.tertiary;
1193
+ 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;
1194
+ if (!resolvedConfig.colors.text.prompt.message?.active && resolvedConfig.colors.text?.body?.primary) resolvedConfig.colors.text.prompt.message.active = resolvedConfig.colors.text.body.primary;
1195
+ if (!resolvedConfig.colors.text.prompt.message?.submitted && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.prompt.message.submitted = resolvedConfig.colors.text.body.tertiary;
1196
+ 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;
1197
+ 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;
1198
+ if (!resolvedConfig.colors.text.prompt.message?.disabled && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.prompt.message.disabled = resolvedConfig.colors.text.body.tertiary;
1199
+ 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;
1200
+ if (!resolvedConfig.colors.text.prompt.input?.active && resolvedConfig.colors.text?.heading?.primary) resolvedConfig.colors.text.prompt.input.active = resolvedConfig.colors.text.heading.primary;
1201
+ if (!resolvedConfig.colors.text.prompt.input?.inactive && resolvedConfig.colors.text?.heading?.secondary) resolvedConfig.colors.text.prompt.input.inactive = resolvedConfig.colors.text.heading.secondary;
1202
+ if (!resolvedConfig.colors.text.prompt.input?.submitted && resolvedConfig.colors.text?.heading?.tertiary) resolvedConfig.colors.text.prompt.message.submitted = resolvedConfig.colors.text.heading.tertiary;
1203
+ 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;
1204
+ 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;
1205
+ if (!resolvedConfig.colors.text.prompt.message?.disabled && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.prompt.message.disabled = resolvedConfig.colors.text.body.tertiary;
1206
+ 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;
1207
+ if (!resolvedConfig.colors.text.prompt.description?.active && resolvedConfig.colors.text?.heading?.primary) resolvedConfig.colors.text.prompt.description.active = resolvedConfig.colors.text.heading.primary;
1208
+ if (!resolvedConfig.colors.text.prompt.description?.inactive && resolvedConfig.colors.text?.heading?.secondary) resolvedConfig.colors.text.prompt.description.inactive = resolvedConfig.colors.text.heading.secondary;
1209
+ if (!resolvedConfig.colors.text.prompt.description?.submitted && resolvedConfig.colors.text?.heading?.tertiary) resolvedConfig.colors.text.prompt.description.submitted = resolvedConfig.colors.text.heading.tertiary;
1210
+ if (!resolvedConfig.colors.text.prompt.description?.warning && resolvedConfig.colors.text?.body?.secondary) resolvedConfig.colors.text.prompt.description.warning = resolvedConfig.colors.text.body.secondary;
1211
+ 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;
1212
+ if (!resolvedConfig.colors.text.prompt.description?.disabled && resolvedConfig.colors.text?.body?.tertiary) resolvedConfig.colors.text.prompt.description.disabled = resolvedConfig.colors.text.body.tertiary;
1213
+ 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;
1214
+ 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;
1215
+ 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;
1216
+ 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;
1217
+ mergeThemes(context, resolvedConfig);
1445
1218
  return dictionary;
1446
1219
  }
1447
1220
  });
1448
1221
 
1449
1222
  //#endregion
1450
- export { preprocessor };
1451
- //# sourceMappingURL=preprocessor.mjs.map
1223
+ export { colors };
1224
+ //# sourceMappingURL=colors.mjs.map