@phcdevworks/spectre-tokens 2.1.1 → 2.1.2

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.
package/README.md CHANGED
@@ -18,8 +18,8 @@ translate those contracts for specific frameworks and runtimes.
18
18
  ## Key capabilities
19
19
 
20
20
  - Uses `tokens/` as the source of truth for design-token data
21
- - Generates JavaScript, TypeScript, Tailwind, and CSS outputs from shared token
22
- sources
21
+ - Generates JavaScript, TypeScript, CSS, and Tailwind theme exports from shared
22
+ token sources
23
23
  - Defines semantic token contracts for surfaces, text, components, buttons,
24
24
  forms, and modes
25
25
  - Exposes primitives and semantic roles for downstream packages and compatible
@@ -80,8 +80,8 @@ access is appropriate.
80
80
 
81
81
  - Visual language expressed as token data in `tokens/`
82
82
  - Semantic roles and token contracts consumed downstream
83
- - Generated token outputs for JavaScript, TypeScript, Tailwind, and CSS
84
- variables
83
+ - Generated token outputs for JavaScript, TypeScript, CSS variables, and
84
+ Tailwind theme exports
85
85
  - Theme and mode definitions used by downstream consumers
86
86
 
87
87
  ### Token model
@@ -181,7 +181,7 @@ Regenerate package outputs:
181
181
  npm run build
182
182
  ```
183
183
 
184
- Run validation checks:
184
+ Run the full validation and release gate:
185
185
 
186
186
  ```bash
187
187
  npm run check
@@ -195,6 +195,10 @@ Key source areas:
195
195
  - `scripts/` for build and validation scripts
196
196
  - `example/` for usage examples
197
197
 
198
+ The files in `example/` are illustrative token demos only. They help explain
199
+ the token contract, but they are not the package contract itself and should not
200
+ be treated as downstream UI primitives.
201
+
198
202
  ## Contributing
199
203
 
200
204
  PHCDevworks maintains this package as part of the Spectre system.
@@ -204,7 +208,9 @@ When contributing:
204
208
  - treat `tokens/` as the source of truth
205
209
  - keep generated outputs derived from source data
206
210
  - avoid breaking token contracts without an intentional major-version change
207
- - run `npm run build` and `npm run check` before opening a pull request
211
+ - run `npm run build` to regenerate outputs when sources change
212
+ - run `npm run check` as the full validation gate before opening a pull request
213
+ - do not modify locked semantic color families without explicit approval
208
214
 
209
215
  See [CONTRIBUTING.md](CONTRIBUTING.md) for the full workflow.
210
216
 
package/dist/index.cjs CHANGED
@@ -33,18 +33,30 @@ var coreTokens = {
33
33
  "component": {
34
34
  "card": {
35
35
  "text": {
36
- "value": "{colors.neutral.900}"
36
+ "value": "{colors.neutral.900}",
37
+ "metadata": {
38
+ "pair": "surface.card"
39
+ }
37
40
  },
38
41
  "textMuted": {
39
- "value": "{colors.neutral.500}"
42
+ "value": "{colors.neutral.500}",
43
+ "metadata": {
44
+ "pair": "surface.card"
45
+ }
40
46
  }
41
47
  },
42
48
  "input": {
43
49
  "text": {
44
- "value": "{colors.neutral.900}"
50
+ "value": "{colors.neutral.900}",
51
+ "metadata": {
52
+ "pair": "surface.input"
53
+ }
45
54
  },
46
55
  "placeholder": {
47
- "value": "{colors.neutral.400}"
56
+ "value": "{colors.neutral.500}",
57
+ "metadata": {
58
+ "pair": "forms.default.bg"
59
+ }
48
60
  }
49
61
  },
50
62
  "button": {
@@ -134,13 +146,19 @@ var coreTokens = {
134
146
  },
135
147
  "iconBox": {
136
148
  "bg": {
137
- "value": "{colors.white}"
149
+ "value": "{colors.white}",
150
+ "metadata": {
151
+ "pair": "component.iconBox.iconDefault"
152
+ }
138
153
  },
139
154
  "border": {
140
155
  "value": "{colors.neutral.200}"
141
156
  },
142
157
  "iconDefault": {
143
- "value": "{colors.info.600}"
158
+ "value": "{colors.info.600}",
159
+ "metadata": {
160
+ "pair": "component.iconBox.bg"
161
+ }
144
162
  },
145
163
  "iconSuccess": {
146
164
  "value": "{colors.success.600}"
@@ -154,19 +172,31 @@ var coreTokens = {
154
172
  },
155
173
  "testimonial": {
156
174
  "bg": {
157
- "value": "{colors.white}"
175
+ "value": "{colors.white}",
176
+ "metadata": {
177
+ "pair": "component.testimonial.text"
178
+ }
158
179
  },
159
180
  "border": {
160
181
  "value": "{colors.neutral.200}"
161
182
  },
162
183
  "text": {
163
- "value": "{colors.neutral.700}"
184
+ "value": "{colors.neutral.700}",
185
+ "metadata": {
186
+ "pair": "component.testimonial.bg"
187
+ }
164
188
  },
165
189
  "authorName": {
166
- "value": "{colors.neutral.900}"
190
+ "value": "{colors.neutral.900}",
191
+ "metadata": {
192
+ "pair": "component.testimonial.bg"
193
+ }
167
194
  },
168
195
  "authorTitle": {
169
- "value": "{colors.neutral.500}"
196
+ "value": "{colors.neutral.500}",
197
+ "metadata": {
198
+ "pair": "component.testimonial.bg"
199
+ }
170
200
  },
171
201
  "quoteMark": {
172
202
  "value": "{colors.neutral.300}"
@@ -175,7 +205,9 @@ var coreTokens = {
175
205
  "pricingCard": {
176
206
  "bg": {
177
207
  "value": "{colors.white}",
178
- "metadata": {}
208
+ "metadata": {
209
+ "pair": "component.pricingCard.price"
210
+ }
179
211
  },
180
212
  "border": {
181
213
  "value": "{colors.neutral.200}",
@@ -203,11 +235,15 @@ var coreTokens = {
203
235
  },
204
236
  "price": {
205
237
  "value": "{colors.neutral.900}",
206
- "metadata": {}
238
+ "metadata": {
239
+ "pair": "component.pricingCard.bg"
240
+ }
207
241
  },
208
242
  "priceDescription": {
209
243
  "value": "{colors.neutral.500}",
210
- "metadata": {}
244
+ "metadata": {
245
+ "pair": "component.pricingCard.bg"
246
+ }
211
247
  }
212
248
  },
213
249
  "rating": {
@@ -218,7 +254,10 @@ var coreTokens = {
218
254
  "value": "{colors.neutral.200}"
219
255
  },
220
256
  "text": {
221
- "value": "{colors.neutral.500}"
257
+ "value": "{colors.neutral.500}",
258
+ "metadata": {
259
+ "pair": "surface.card"
260
+ }
222
261
  }
223
262
  }
224
263
  },
@@ -466,7 +505,10 @@ var coreTokens = {
466
505
  "value": "{colors.neutral.900}"
467
506
  },
468
507
  "placeholder": {
469
- "value": "{colors.neutral.400}"
508
+ "value": "{colors.neutral.500}",
509
+ "metadata": {
510
+ "pair": "forms.default.bg"
511
+ }
470
512
  }
471
513
  },
472
514
  "hover": {
@@ -625,18 +667,30 @@ var coreTokens = {
625
667
  "component": {
626
668
  "card": {
627
669
  "text": {
628
- "value": "{colors.neutral.900}"
670
+ "value": "{colors.neutral.900}",
671
+ "metadata": {
672
+ "pair": "modes.default.surface.card"
673
+ }
629
674
  },
630
675
  "textMuted": {
631
- "value": "{colors.neutral.500}"
676
+ "value": "{colors.neutral.500}",
677
+ "metadata": {
678
+ "pair": "modes.default.surface.card"
679
+ }
632
680
  }
633
681
  },
634
682
  "input": {
635
683
  "text": {
636
- "value": "{colors.neutral.900}"
684
+ "value": "{colors.neutral.900}",
685
+ "metadata": {
686
+ "pair": "modes.default.surface.input"
687
+ }
637
688
  },
638
689
  "placeholder": {
639
- "value": "{colors.neutral.400}"
690
+ "value": "{colors.neutral.500}",
691
+ "metadata": {
692
+ "pair": "modes.default.surface.input"
693
+ }
640
694
  }
641
695
  },
642
696
  "button": {
@@ -654,6 +708,12 @@ var coreTokens = {
654
708
  "pair": "modes.default.component.badge.neutralText"
655
709
  }
656
710
  },
711
+ "neutralBgHover": {
712
+ "value": "{colors.neutral.200}",
713
+ "metadata": {
714
+ "pair": "modes.default.component.badge.neutralText"
715
+ }
716
+ },
657
717
  "neutralText": {
658
718
  "value": "{colors.neutral.700}",
659
719
  "metadata": {}
@@ -664,6 +724,12 @@ var coreTokens = {
664
724
  "pair": "modes.default.component.badge.infoText"
665
725
  }
666
726
  },
727
+ "infoBgHover": {
728
+ "value": "{colors.info.200}",
729
+ "metadata": {
730
+ "pair": "modes.default.component.badge.infoText"
731
+ }
732
+ },
667
733
  "infoText": {
668
734
  "value": "{colors.info.700}",
669
735
  "metadata": {}
@@ -702,7 +768,9 @@ var coreTokens = {
702
768
  "iconBox": {
703
769
  "bg": {
704
770
  "value": "{colors.white}",
705
- "metadata": {}
771
+ "metadata": {
772
+ "pair": "modes.default.component.iconBox.iconDefault"
773
+ }
706
774
  },
707
775
  "border": {
708
776
  "value": "{colors.neutral.200}",
@@ -710,7 +778,9 @@ var coreTokens = {
710
778
  },
711
779
  "iconDefault": {
712
780
  "value": "{colors.info.600}",
713
- "metadata": {}
781
+ "metadata": {
782
+ "pair": "modes.default.component.iconBox.bg"
783
+ }
714
784
  },
715
785
  "iconSuccess": {
716
786
  "value": "{colors.success.600}",
@@ -722,7 +792,9 @@ var coreTokens = {
722
792
  },
723
793
  "iconDanger": {
724
794
  "value": "{colors.error.600}",
725
- "metadata": {}
795
+ "metadata": {
796
+ "pair": "modes.default.component.iconBox.bg"
797
+ }
726
798
  }
727
799
  },
728
800
  "testimonial": {
@@ -814,7 +886,9 @@ var coreTokens = {
814
886
  },
815
887
  "text": {
816
888
  "value": "{colors.neutral.500}",
817
- "metadata": {}
889
+ "metadata": {
890
+ "pair": "modes.default.surface.card"
891
+ }
818
892
  }
819
893
  }
820
894
  }
@@ -861,19 +935,19 @@ var coreTokens = {
861
935
  }
862
936
  },
863
937
  "muted": {
864
- "value": "{colors.neutral.200}",
938
+ "value": "{colors.neutral.300}",
865
939
  "metadata": {
866
940
  "pair": "modes.dark.surface.page"
867
941
  }
868
942
  },
869
943
  "subtle": {
870
- "value": "{colors.neutral.300}",
944
+ "value": "{colors.neutral.400}",
871
945
  "metadata": {
872
946
  "pair": "modes.dark.surface.page"
873
947
  }
874
948
  },
875
949
  "meta": {
876
- "value": "{colors.neutral.300}",
950
+ "value": "{colors.neutral.400}",
877
951
  "metadata": {
878
952
  "pair": "modes.dark.surface.page"
879
953
  }
@@ -893,19 +967,19 @@ var coreTokens = {
893
967
  }
894
968
  },
895
969
  "muted": {
896
- "value": "{colors.neutral.200}",
970
+ "value": "{colors.neutral.300}",
897
971
  "metadata": {
898
972
  "pair": "modes.dark.surface.card"
899
973
  }
900
974
  },
901
975
  "subtle": {
902
- "value": "{colors.neutral.300}",
976
+ "value": "{colors.neutral.400}",
903
977
  "metadata": {
904
978
  "pair": "modes.dark.surface.card"
905
979
  }
906
980
  },
907
981
  "meta": {
908
- "value": "{colors.neutral.300}",
982
+ "value": "{colors.neutral.400}",
909
983
  "metadata": {
910
984
  "pair": "modes.dark.surface.card"
911
985
  }
@@ -927,7 +1001,7 @@ var coreTokens = {
927
1001
  }
928
1002
  },
929
1003
  "textMuted": {
930
- "value": "{colors.neutral.200}",
1004
+ "value": "{colors.neutral.300}",
931
1005
  "metadata": {
932
1006
  "pair": "modes.dark.surface.card"
933
1007
  }
@@ -935,10 +1009,16 @@ var coreTokens = {
935
1009
  },
936
1010
  "input": {
937
1011
  "text": {
938
- "value": "{colors.neutral.100}"
1012
+ "value": "{colors.neutral.100}",
1013
+ "metadata": {
1014
+ "pair": "modes.dark.surface.input"
1015
+ }
939
1016
  },
940
1017
  "placeholder": {
941
- "value": "{colors.neutral.400}"
1018
+ "value": "{colors.neutral.300}",
1019
+ "metadata": {
1020
+ "pair": "modes.dark.surface.input"
1021
+ }
942
1022
  }
943
1023
  },
944
1024
  "button": {
@@ -967,7 +1047,7 @@ var coreTokens = {
967
1047
  "metadata": {}
968
1048
  },
969
1049
  "infoBg": {
970
- "value": "{colors.info.900}",
1050
+ "value": "{colors.info.800}",
971
1051
  "metadata": {
972
1052
  "pair": "modes.dark.component.badge.infoText"
973
1053
  }
@@ -1034,7 +1114,9 @@ var coreTokens = {
1034
1114
  "iconBox": {
1035
1115
  "bg": {
1036
1116
  "value": "{colors.neutral.800}",
1037
- "metadata": {}
1117
+ "metadata": {
1118
+ "pair": "modes.dark.component.iconBox.iconDefault"
1119
+ }
1038
1120
  },
1039
1121
  "border": {
1040
1122
  "value": "{colors.neutral.700}",
@@ -1042,19 +1124,27 @@ var coreTokens = {
1042
1124
  },
1043
1125
  "iconDefault": {
1044
1126
  "value": "{colors.info.300}",
1045
- "metadata": {}
1127
+ "metadata": {
1128
+ "pair": "modes.dark.component.iconBox.bg"
1129
+ }
1046
1130
  },
1047
1131
  "iconSuccess": {
1048
1132
  "value": "{colors.success.400}",
1049
- "metadata": {}
1133
+ "metadata": {
1134
+ "pair": "modes.dark.component.iconBox.bg"
1135
+ }
1050
1136
  },
1051
1137
  "iconWarning": {
1052
1138
  "value": "{colors.warning.400}",
1053
- "metadata": {}
1139
+ "metadata": {
1140
+ "pair": "modes.dark.component.iconBox.bg"
1141
+ }
1054
1142
  },
1055
1143
  "iconDanger": {
1056
1144
  "value": "{colors.error.400}",
1057
- "metadata": {}
1145
+ "metadata": {
1146
+ "pair": "modes.dark.component.iconBox.bg"
1147
+ }
1058
1148
  }
1059
1149
  },
1060
1150
  "testimonial": {
@@ -1081,7 +1171,7 @@ var coreTokens = {
1081
1171
  }
1082
1172
  },
1083
1173
  "authorTitle": {
1084
- "value": "{colors.neutral.300}",
1174
+ "value": "{colors.neutral.400}",
1085
1175
  "metadata": {
1086
1176
  "pair": "modes.dark.component.testimonial.bg"
1087
1177
  }
@@ -1129,7 +1219,7 @@ var coreTokens = {
1129
1219
  }
1130
1220
  },
1131
1221
  "priceDescription": {
1132
- "value": "{colors.neutral.300}",
1222
+ "value": "{colors.neutral.400}",
1133
1223
  "metadata": {
1134
1224
  "pair": "modes.dark.component.pricingCard.bg"
1135
1225
  }
@@ -1146,7 +1236,9 @@ var coreTokens = {
1146
1236
  },
1147
1237
  "text": {
1148
1238
  "value": "{colors.neutral.400}",
1149
- "metadata": {}
1239
+ "metadata": {
1240
+ "pair": "modes.dark.surface.card"
1241
+ }
1150
1242
  }
1151
1243
  }
1152
1244
  }