@handamade/psi-tokens 0.4.1 → 0.6.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.
@@ -0,0 +1,467 @@
1
+ {
2
+ "propertyGroups": {
3
+ "text": [
4
+ "color",
5
+ "fill",
6
+ "stroke",
7
+ "caret-color",
8
+ "text-decoration-color"
9
+ ],
10
+ "surface": [
11
+ "background",
12
+ "background-color"
13
+ ],
14
+ "border": [
15
+ "border",
16
+ "border-color",
17
+ "border-top-color",
18
+ "border-right-color",
19
+ "border-bottom-color",
20
+ "border-left-color",
21
+ "outline",
22
+ "outline-color",
23
+ "box-shadow",
24
+ "border-top",
25
+ "border-right",
26
+ "border-bottom",
27
+ "border-left",
28
+ "border-inline",
29
+ "border-block"
30
+ ],
31
+ "gap": [
32
+ "gap",
33
+ "row-gap",
34
+ "column-gap",
35
+ "padding",
36
+ "padding-top",
37
+ "padding-right",
38
+ "padding-bottom",
39
+ "padding-left",
40
+ "padding-inline",
41
+ "padding-block",
42
+ "padding-inline-start",
43
+ "padding-inline-end",
44
+ "padding-block-start",
45
+ "padding-block-end",
46
+ "margin",
47
+ "margin-top",
48
+ "margin-right",
49
+ "margin-bottom",
50
+ "margin-left",
51
+ "margin-inline",
52
+ "margin-block",
53
+ "margin-inline-start",
54
+ "margin-inline-end",
55
+ "margin-block-start",
56
+ "margin-block-end",
57
+ "inset",
58
+ "top",
59
+ "right",
60
+ "bottom",
61
+ "left",
62
+ "scroll-margin",
63
+ "scroll-padding",
64
+ "translate",
65
+ "background-position",
66
+ "max-width"
67
+ ]
68
+ },
69
+ "semantic": {
70
+ "bg-primary": [
71
+ "surface"
72
+ ],
73
+ "bg-secondary": [
74
+ "surface"
75
+ ],
76
+ "fg-primary": [
77
+ "text"
78
+ ],
79
+ "fg-secondary": [
80
+ "text"
81
+ ],
82
+ "fg-tertiary": [
83
+ "text"
84
+ ],
85
+ "fg-quaternary": [
86
+ "text"
87
+ ],
88
+ "fg-primary-inverted": [
89
+ "text"
90
+ ],
91
+ "fg-static-white": [
92
+ "text"
93
+ ],
94
+ "fg-static-black": [
95
+ "text"
96
+ ],
97
+ "fg-on-accent": [
98
+ "text"
99
+ ],
100
+ "fg-accent": [
101
+ "text"
102
+ ],
103
+ "fg-success": [
104
+ "text"
105
+ ],
106
+ "fg-warning": [
107
+ "text"
108
+ ],
109
+ "fg-danger": [
110
+ "text",
111
+ "border"
112
+ ],
113
+ "fill-neutral1": [
114
+ "surface"
115
+ ],
116
+ "fill-neutral2": [
117
+ "surface"
118
+ ],
119
+ "fill-neutral3": [
120
+ "surface"
121
+ ],
122
+ "fill-neutral4": [
123
+ "surface"
124
+ ],
125
+ "fill-neutral5": [
126
+ "surface"
127
+ ],
128
+ "fill-neutral6": [
129
+ "surface"
130
+ ],
131
+ "fill-accent": [
132
+ "surface",
133
+ "border"
134
+ ],
135
+ "fill-success": [
136
+ "surface"
137
+ ],
138
+ "fill-warning": [
139
+ "surface"
140
+ ],
141
+ "fill-danger": [
142
+ "surface"
143
+ ],
144
+ "fill-tint-accent": [
145
+ "surface"
146
+ ],
147
+ "fill-tint-success": [
148
+ "surface"
149
+ ],
150
+ "fill-tint-warning": [
151
+ "surface"
152
+ ],
153
+ "fill-tint-danger": [
154
+ "surface"
155
+ ],
156
+ "fill-static-white": [
157
+ "surface"
158
+ ],
159
+ "border-faint": [
160
+ "border"
161
+ ],
162
+ "border-neutral": [
163
+ "border"
164
+ ],
165
+ "border-strong": [
166
+ "border"
167
+ ],
168
+ "border-focus": [
169
+ "border"
170
+ ],
171
+ "scrim-soft": [
172
+ "surface"
173
+ ],
174
+ "scrim-medium": [
175
+ "surface"
176
+ ],
177
+ "scrim-heavy": [
178
+ "surface"
179
+ ],
180
+ "bg-inverted": [
181
+ "surface"
182
+ ],
183
+ "fg-on-inverted": [
184
+ "text"
185
+ ]
186
+ },
187
+ "component": {
188
+ "button-accent-bg": [
189
+ "surface"
190
+ ],
191
+ "button-accent-bg-hover": [
192
+ "surface"
193
+ ],
194
+ "button-accent-bg-active": [
195
+ "surface"
196
+ ],
197
+ "button-accent-fg": [
198
+ "text"
199
+ ],
200
+ "button-accent-subtle-bg": [
201
+ "surface"
202
+ ],
203
+ "button-accent-subtle-bg-hover": [
204
+ "surface"
205
+ ],
206
+ "button-accent-subtle-bg-active": [
207
+ "surface"
208
+ ],
209
+ "button-accent-subtle-fg": [
210
+ "text"
211
+ ],
212
+ "button-neutral-bg": [
213
+ "surface"
214
+ ],
215
+ "button-neutral-bg-hover": [
216
+ "surface"
217
+ ],
218
+ "button-neutral-bg-active": [
219
+ "surface"
220
+ ],
221
+ "button-neutral-fg": [
222
+ "text"
223
+ ],
224
+ "button-neutral-subtle-bg": [
225
+ "surface"
226
+ ],
227
+ "button-neutral-subtle-bg-hover": [
228
+ "surface"
229
+ ],
230
+ "button-neutral-subtle-bg-active": [
231
+ "surface"
232
+ ],
233
+ "button-neutral-subtle-fg": [
234
+ "text"
235
+ ],
236
+ "button-ghost-bg": [
237
+ "surface"
238
+ ],
239
+ "button-ghost-bg-hover": [
240
+ "surface"
241
+ ],
242
+ "button-ghost-bg-active": [
243
+ "surface"
244
+ ],
245
+ "button-ghost-fg": [
246
+ "text"
247
+ ],
248
+ "button-danger-bg": [
249
+ "surface"
250
+ ],
251
+ "button-danger-bg-hover": [
252
+ "surface"
253
+ ],
254
+ "button-danger-bg-active": [
255
+ "surface"
256
+ ],
257
+ "button-danger-fg": [
258
+ "text"
259
+ ],
260
+ "button-danger-subtle-bg": [
261
+ "surface"
262
+ ],
263
+ "button-danger-subtle-bg-hover": [
264
+ "surface"
265
+ ],
266
+ "button-danger-subtle-bg-active": [
267
+ "surface"
268
+ ],
269
+ "button-danger-subtle-fg": [
270
+ "text"
271
+ ],
272
+ "button-outline-bg": [
273
+ "surface"
274
+ ],
275
+ "button-outline-bg-hover": [
276
+ "surface"
277
+ ],
278
+ "button-outline-bg-active": [
279
+ "surface"
280
+ ],
281
+ "button-outline-fg": [
282
+ "text"
283
+ ],
284
+ "button-outline-fg-hover": [
285
+ "text"
286
+ ],
287
+ "button-outline-border": [
288
+ "border"
289
+ ],
290
+ "card-border": [
291
+ "border"
292
+ ],
293
+ "card-bg": [
294
+ "surface"
295
+ ],
296
+ "checkbox-fg": [
297
+ "text"
298
+ ],
299
+ "checkbox-box-bg": [
300
+ "surface"
301
+ ],
302
+ "checkbox-box-border": [
303
+ "border"
304
+ ],
305
+ "checkbox-box-bg-checked": [
306
+ "surface"
307
+ ],
308
+ "checkbox-box-border-checked": [
309
+ "border"
310
+ ],
311
+ "checkbox-check-fg": [
312
+ "text"
313
+ ],
314
+ "dialog-bg": [
315
+ "surface"
316
+ ],
317
+ "dialog-border": [
318
+ "border"
319
+ ],
320
+ "dialog-fg": [
321
+ "text"
322
+ ],
323
+ "dialog-title-fg": [
324
+ "text"
325
+ ],
326
+ "field-label-fg": [
327
+ "text"
328
+ ],
329
+ "field-message-fg": [
330
+ "text"
331
+ ],
332
+ "field-error-fg": [
333
+ "text"
334
+ ],
335
+ "field-marker-fg": [
336
+ "text"
337
+ ],
338
+ "input-bg": [
339
+ "surface"
340
+ ],
341
+ "input-fg": [
342
+ "text"
343
+ ],
344
+ "input-border": [
345
+ "border"
346
+ ],
347
+ "input-border-hover": [
348
+ "border"
349
+ ],
350
+ "input-border-error": [
351
+ "border"
352
+ ],
353
+ "navbar-bg": [
354
+ "surface"
355
+ ],
356
+ "navbar-border": [
357
+ "border"
358
+ ],
359
+ "navbar-link-fg": [
360
+ "text"
361
+ ],
362
+ "navbar-link-fg-hover": [
363
+ "text"
364
+ ],
365
+ "select-bg": [
366
+ "surface"
367
+ ],
368
+ "select-fg": [
369
+ "text"
370
+ ],
371
+ "select-border": [
372
+ "border"
373
+ ],
374
+ "select-border-hover": [
375
+ "border"
376
+ ],
377
+ "select-border-error": [
378
+ "border"
379
+ ],
380
+ "select-chevron-fg": [
381
+ "text"
382
+ ],
383
+ "switch-fg": [
384
+ "text"
385
+ ],
386
+ "switch-track-bg": [
387
+ "surface"
388
+ ],
389
+ "switch-track-bg-checked": [
390
+ "surface"
391
+ ],
392
+ "switch-thumb-bg": [
393
+ "surface"
394
+ ],
395
+ "tag-neutral-bg": [
396
+ "surface"
397
+ ],
398
+ "tag-neutral-fg": [
399
+ "text"
400
+ ],
401
+ "tag-accent-bg": [
402
+ "surface"
403
+ ],
404
+ "tag-accent-fg": [
405
+ "text"
406
+ ],
407
+ "tag-success-bg": [
408
+ "surface"
409
+ ],
410
+ "tag-success-fg": [
411
+ "text"
412
+ ],
413
+ "tag-warning-bg": [
414
+ "surface"
415
+ ],
416
+ "tag-warning-fg": [
417
+ "text"
418
+ ],
419
+ "tag-danger-bg": [
420
+ "surface"
421
+ ],
422
+ "tag-danger-fg": [
423
+ "text"
424
+ ],
425
+ "tag-neutral-subtle-bg": [
426
+ "surface"
427
+ ],
428
+ "tag-neutral-subtle-fg": [
429
+ "text"
430
+ ],
431
+ "tag-accent-subtle-bg": [
432
+ "surface"
433
+ ],
434
+ "tag-accent-subtle-fg": [
435
+ "text"
436
+ ],
437
+ "tag-success-subtle-bg": [
438
+ "surface"
439
+ ],
440
+ "tag-success-subtle-fg": [
441
+ "text"
442
+ ],
443
+ "tag-warning-subtle-bg": [
444
+ "surface"
445
+ ],
446
+ "tag-warning-subtle-fg": [
447
+ "text"
448
+ ],
449
+ "tag-danger-subtle-bg": [
450
+ "surface"
451
+ ],
452
+ "tag-danger-subtle-fg": [
453
+ "text"
454
+ ],
455
+ "tooltip-bg": [
456
+ "surface"
457
+ ],
458
+ "tooltip-fg": [
459
+ "text"
460
+ ]
461
+ },
462
+ "scales": {
463
+ "space": [
464
+ "gap"
465
+ ]
466
+ }
467
+ }
@@ -1,6 +1,7 @@
1
1
  // Auto-generated by @handamade/psi-tokens build script — do not edit
2
2
 
3
3
  export type TokenName =
4
+ | "bgInverted"
4
5
  | "bgPrimary"
5
6
  | "bgSecondary"
6
7
  | "borderFaint"
@@ -10,6 +11,7 @@ export type TokenName =
10
11
  | "fgAccent"
11
12
  | "fgDanger"
12
13
  | "fgOnAccent"
14
+ | "fgOnInverted"
13
15
  | "fgPrimary"
14
16
  | "fgPrimaryInverted"
15
17
  | "fgQuaternary"
@@ -27,6 +29,7 @@ export type TokenName =
27
29
  | "fillNeutral4"
28
30
  | "fillNeutral5"
29
31
  | "fillNeutral6"
32
+ | "fillStaticWhite"
30
33
  | "fillSuccess"
31
34
  | "fillTintAccent"
32
35
  | "fillTintDanger"
package/llms.txt CHANGED
@@ -7,12 +7,14 @@ OKLCH formula-based design tokens. Code is the source of truth; all artifacts ge
7
7
  - dist/guidance.json: variant intent, usage rules, state derivation, typography defaults, motion/layout/fonts notes, recipes
8
8
  - dist/dtcg/{theme}.json: W3C DTCG format export
9
9
  - dist/components/{name}.vars.css: component-token declarations (--psi-{component}-*)
10
+ - dist/scope-map.json: D46 token scopes — property groups, per-token scopes (semantic + component), scale-family scopes
10
11
 
11
12
  ## Rules for generated code
12
13
  - Use semantic tokens (--psi-bg-*, --psi-fg-*, --psi-fill-*, --psi-border-*) in app CSS.
13
14
  - Override --psi-{component}-* tokens for one-off component theming; never fork semantic tokens.
14
15
  - Scales are pixel-true: --psi-space-8 is 8px (0.5rem). Typography: --psi-text-{size}-{lh}-{weight}.
15
16
  - Themes: import base.css + {theme}.css + components.css + utilities.css; set data-psi-theme="{name}" ({light,dark,acme,ember}).
17
+ - Scoped tokens bind only their declared property groups (D46): fg* → text properties, bg*/fill*/scrim* → surfaces, border* → borders, --psi-space-* → gaps/padding/margin. Cross-family bindings that are design decisions carry both scopes (fgDanger: text+border for error borders; fillAccent: surface+border for selected controls). The token build enforces component bindings; stylelint (psi/token-scopes) enforces consumer CSS.
16
18
 
17
19
  ## Motion (--psi-duration-*, --psi-ease-*)
18
20
  - Durations: 150/200/350/450/600ms. Easings: --psi-ease-standard, --psi-ease-in-out, --psi-ease-soft.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@handamade/psi-tokens",
3
- "version": "0.4.1",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./*.css": "./dist/*.css",