@cascivo/tokens 0.3.5 → 0.3.8
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/LICENSE +1 -1
- package/package.json +1 -1
- package/src/index.css +28 -8
- package/src/tokens.d.ts +2 -0
- package/tokens.json +17 -10
package/LICENSE
CHANGED
package/package.json
CHANGED
package/src/index.css
CHANGED
|
@@ -249,21 +249,25 @@
|
|
|
249
249
|
--cascivo-editor-selection: var(--cascivo-color-accent-muted, oklch(0.882 0.095 250));
|
|
250
250
|
--cascivo-editor-border: var(--cascivo-color-border, oklch(0.928 0.006 264));
|
|
251
251
|
|
|
252
|
-
/* Syntax palette — one token per TokenKind
|
|
252
|
+
/* Syntax palette — one token per TokenKind. String/number/type/property (and
|
|
253
|
+
their aliases regexp/attr/boolean) are pinned to text-safe darker values
|
|
254
|
+
instead of the raw chart hues, which are tuned for 3:1 fills and fall below
|
|
255
|
+
WCAG AA 4.5:1 as code text on the light editor surface. Dark-surface themes
|
|
256
|
+
restore the brighter chart hues below (they clear 4.5:1 on a dark bg). */
|
|
253
257
|
--cascivo-editor-syntax-keyword: var(--cascivo-color-accent, oklch(0.52 0.2 250));
|
|
254
|
-
--cascivo-editor-syntax-string:
|
|
255
|
-
--cascivo-editor-syntax-number:
|
|
258
|
+
--cascivo-editor-syntax-string: oklch(0.53 0.13 135);
|
|
259
|
+
--cascivo-editor-syntax-number: oklch(0.54 0.15 40);
|
|
256
260
|
--cascivo-editor-syntax-comment: var(--cascivo-color-foreground-muted, oklch(0.55 0.018 264));
|
|
257
261
|
--cascivo-editor-syntax-function: var(--cascivo-chart-5, oklch(0.5 0.16 265));
|
|
258
|
-
--cascivo-editor-syntax-type:
|
|
262
|
+
--cascivo-editor-syntax-type: oklch(0.54 0.12 350);
|
|
259
263
|
--cascivo-editor-syntax-operator: var(--cascivo-color-foreground-muted, oklch(0.5 0.04 264));
|
|
260
264
|
--cascivo-editor-syntax-punctuation: var(--cascivo-color-text-subtle, oklch(0.446 0.018 264));
|
|
261
265
|
--cascivo-editor-syntax-variable: var(--cascivo-editor-fg);
|
|
262
266
|
--cascivo-editor-syntax-tag: var(--cascivo-color-accent, oklch(0.52 0.2 250));
|
|
263
|
-
--cascivo-editor-syntax-attr:
|
|
264
|
-
--cascivo-editor-syntax-regexp:
|
|
265
|
-
--cascivo-editor-syntax-boolean:
|
|
266
|
-
--cascivo-editor-syntax-property:
|
|
267
|
+
--cascivo-editor-syntax-attr: oklch(0.54 0.15 40);
|
|
268
|
+
--cascivo-editor-syntax-regexp: oklch(0.53 0.13 135);
|
|
269
|
+
--cascivo-editor-syntax-boolean: oklch(0.54 0.15 40);
|
|
270
|
+
--cascivo-editor-syntax-property: oklch(0.53 0.12 240);
|
|
267
271
|
|
|
268
272
|
/* ── Brand (apps/logo/OG only — never used in component CSS) ── */
|
|
269
273
|
--cascivo-brand-primary: oklch(
|
|
@@ -313,6 +317,22 @@
|
|
|
313
317
|
--cascivo-target-min-coarse: 2.75rem; /* 44px — Apple HIG comfortable touch target */
|
|
314
318
|
}
|
|
315
319
|
|
|
320
|
+
/* Dark-surface themes: restore the brighter chart hues for editor syntax, which
|
|
321
|
+
clear WCAG AA 4.5:1 on a dark editor background (the light-theme darkened
|
|
322
|
+
literals above would be too low-contrast there). */
|
|
323
|
+
[data-theme='dark'],
|
|
324
|
+
[data-theme='midnight'],
|
|
325
|
+
[data-theme='terminal'],
|
|
326
|
+
[data-theme='cyberpunk'] {
|
|
327
|
+
--cascivo-editor-syntax-string: var(--cascivo-chart-3);
|
|
328
|
+
--cascivo-editor-syntax-regexp: var(--cascivo-chart-3);
|
|
329
|
+
--cascivo-editor-syntax-number: var(--cascivo-chart-6);
|
|
330
|
+
--cascivo-editor-syntax-attr: var(--cascivo-chart-6);
|
|
331
|
+
--cascivo-editor-syntax-boolean: var(--cascivo-chart-6);
|
|
332
|
+
--cascivo-editor-syntax-type: var(--cascivo-chart-7);
|
|
333
|
+
--cascivo-editor-syntax-property: var(--cascivo-chart-2);
|
|
334
|
+
}
|
|
335
|
+
|
|
316
336
|
/* All cascade motion derives from the duration tokens, so collapsing them
|
|
317
337
|
disables every transition/animation library-wide. Continuous progress
|
|
318
338
|
indicators (Spinner) use literal durations and opt out deliberately. */
|
package/src/tokens.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export type CascivoToken =
|
|
|
58
58
|
| '--cascivo-color-foreground-muted'
|
|
59
59
|
| '--cascivo-color-info'
|
|
60
60
|
| '--cascivo-color-info-content'
|
|
61
|
+
| '--cascivo-color-info-foreground'
|
|
61
62
|
| '--cascivo-color-info-subtle'
|
|
62
63
|
| '--cascivo-color-primary'
|
|
63
64
|
| '--cascivo-color-primary-active'
|
|
@@ -322,6 +323,7 @@ export type CascivoColorToken =
|
|
|
322
323
|
| '--cascivo-color-foreground-muted'
|
|
323
324
|
| '--cascivo-color-info'
|
|
324
325
|
| '--cascivo-color-info-content'
|
|
326
|
+
| '--cascivo-color-info-foreground'
|
|
325
327
|
| '--cascivo-color-info-subtle'
|
|
326
328
|
| '--cascivo-color-primary'
|
|
327
329
|
| '--cascivo-color-primary-active'
|
package/tokens.json
CHANGED
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
"name": "--cascivo-chart-axis",
|
|
228
228
|
"category": "color",
|
|
229
229
|
"role": "chart-axis",
|
|
230
|
-
"value": "
|
|
230
|
+
"value": "oklch(0.5 0.016 264)",
|
|
231
231
|
"canonical": true
|
|
232
232
|
},
|
|
233
233
|
{
|
|
@@ -399,7 +399,7 @@
|
|
|
399
399
|
"name": "--cascivo-color-foreground-muted",
|
|
400
400
|
"category": "color",
|
|
401
401
|
"role": "color-foreground-muted",
|
|
402
|
-
"value": "oklch(0.
|
|
402
|
+
"value": "oklch(0.5 0.018 264)",
|
|
403
403
|
"canonical": false,
|
|
404
404
|
"aliasOf": "--cascivo-color-text-muted"
|
|
405
405
|
},
|
|
@@ -417,6 +417,13 @@
|
|
|
417
417
|
"value": "oklch(1 0 0)",
|
|
418
418
|
"canonical": true
|
|
419
419
|
},
|
|
420
|
+
{
|
|
421
|
+
"name": "--cascivo-color-info-foreground",
|
|
422
|
+
"category": "color",
|
|
423
|
+
"role": "color-info-foreground",
|
|
424
|
+
"value": "oklch(0.45 0.19 250)",
|
|
425
|
+
"canonical": true
|
|
426
|
+
},
|
|
420
427
|
{
|
|
421
428
|
"name": "--cascivo-color-info-subtle",
|
|
422
429
|
"category": "color",
|
|
@@ -557,7 +564,7 @@
|
|
|
557
564
|
"name": "--cascivo-color-text-muted",
|
|
558
565
|
"category": "color",
|
|
559
566
|
"role": "color-text-muted",
|
|
560
|
-
"value": "
|
|
567
|
+
"value": "oklch(0.5 0.016 264)",
|
|
561
568
|
"canonical": true
|
|
562
569
|
},
|
|
563
570
|
{
|
|
@@ -1132,14 +1139,14 @@
|
|
|
1132
1139
|
"name": "--cascivo-editor-syntax-attr",
|
|
1133
1140
|
"category": "other",
|
|
1134
1141
|
"role": "editor-syntax-attr",
|
|
1135
|
-
"value": "
|
|
1142
|
+
"value": "oklch(0.54 0.15 40)",
|
|
1136
1143
|
"canonical": true
|
|
1137
1144
|
},
|
|
1138
1145
|
{
|
|
1139
1146
|
"name": "--cascivo-editor-syntax-boolean",
|
|
1140
1147
|
"category": "other",
|
|
1141
1148
|
"role": "editor-syntax-boolean",
|
|
1142
|
-
"value": "
|
|
1149
|
+
"value": "oklch(0.54 0.15 40)",
|
|
1143
1150
|
"canonical": true
|
|
1144
1151
|
},
|
|
1145
1152
|
{
|
|
@@ -1167,7 +1174,7 @@
|
|
|
1167
1174
|
"name": "--cascivo-editor-syntax-number",
|
|
1168
1175
|
"category": "other",
|
|
1169
1176
|
"role": "editor-syntax-number",
|
|
1170
|
-
"value": "
|
|
1177
|
+
"value": "oklch(0.54 0.15 40)",
|
|
1171
1178
|
"canonical": true
|
|
1172
1179
|
},
|
|
1173
1180
|
{
|
|
@@ -1181,7 +1188,7 @@
|
|
|
1181
1188
|
"name": "--cascivo-editor-syntax-property",
|
|
1182
1189
|
"category": "other",
|
|
1183
1190
|
"role": "editor-syntax-property",
|
|
1184
|
-
"value": "
|
|
1191
|
+
"value": "oklch(0.53 0.12 240)",
|
|
1185
1192
|
"canonical": true
|
|
1186
1193
|
},
|
|
1187
1194
|
{
|
|
@@ -1195,14 +1202,14 @@
|
|
|
1195
1202
|
"name": "--cascivo-editor-syntax-regexp",
|
|
1196
1203
|
"category": "other",
|
|
1197
1204
|
"role": "editor-syntax-regexp",
|
|
1198
|
-
"value": "
|
|
1205
|
+
"value": "oklch(0.53 0.13 135)",
|
|
1199
1206
|
"canonical": true
|
|
1200
1207
|
},
|
|
1201
1208
|
{
|
|
1202
1209
|
"name": "--cascivo-editor-syntax-string",
|
|
1203
1210
|
"category": "other",
|
|
1204
1211
|
"role": "editor-syntax-string",
|
|
1205
|
-
"value": "
|
|
1212
|
+
"value": "oklch(0.53 0.13 135)",
|
|
1206
1213
|
"canonical": true
|
|
1207
1214
|
},
|
|
1208
1215
|
{
|
|
@@ -1216,7 +1223,7 @@
|
|
|
1216
1223
|
"name": "--cascivo-editor-syntax-type",
|
|
1217
1224
|
"category": "other",
|
|
1218
1225
|
"role": "editor-syntax-type",
|
|
1219
|
-
"value": "
|
|
1226
|
+
"value": "oklch(0.54 0.12 350)",
|
|
1220
1227
|
"canonical": true
|
|
1221
1228
|
},
|
|
1222
1229
|
{
|