@crewlethq/tokens 0.81.1 → 0.82.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.
- package/README.md +27 -1
- package/dist/color.d.ts +12 -0
- package/dist/color.js +20 -0
- package/dist/css/brand-scope.css +70 -0
- package/dist/css/themes/abyss.css +115 -0
- package/dist/css/themes/all.css +1035 -0
- package/dist/css/themes/dusk.css +115 -0
- package/dist/css/themes/high-contrast.css +115 -0
- package/dist/css/themes/iris.css +115 -0
- package/dist/css/themes/ledger.css +115 -0
- package/dist/css/themes/nightshade.css +115 -0
- package/dist/css/themes/nocturne.css +115 -0
- package/dist/css/themes/origin.css +115 -0
- package/dist/css/themes/violet.css +115 -0
- package/dist/css/themes.css +117 -0
- package/dist/css/tokens.css +48 -1
- package/dist/index.d.ts +43 -0
- package/dist/index.js +45 -2
- package/dist/palettes.d.ts +78 -0
- package/dist/palettes.js +84 -6
- package/package.json +1 -1
- package/test/color.mjs +3 -1
- package/test/palette.d.mts +2 -0
- package/test/palette.mjs +14 -0
package/dist/palettes.js
CHANGED
|
@@ -124,11 +124,49 @@ export const themes = {
|
|
|
124
124
|
"brand": "#8f3884",
|
|
125
125
|
"brandInk": "#74246a",
|
|
126
126
|
"brandFill": "rgba(143, 56, 132, 0.12)",
|
|
127
|
-
"brandLine": "rgba(143, 56, 132, 0.38)"
|
|
127
|
+
"brandLine": "rgba(143, 56, 132, 0.38)",
|
|
128
|
+
"docGround": "#bcd3ff",
|
|
129
|
+
"docGroundStrong": "#b2cdff",
|
|
130
|
+
"docGroundEnd": "#cfdfff",
|
|
131
|
+
"docGlow": "rgba(64, 98, 167, 0.46)",
|
|
132
|
+
"slidesGround": "#fac895",
|
|
133
|
+
"slidesGroundStrong": "#f3c28f",
|
|
134
|
+
"slidesGroundEnd": "#fbd8b5",
|
|
135
|
+
"slidesGlow": "rgba(134, 90, 40, 0.46)",
|
|
136
|
+
"designGround": "#d7caff",
|
|
137
|
+
"designGroundStrong": "#d2c2ff",
|
|
138
|
+
"designGroundEnd": "#e2d9ff",
|
|
139
|
+
"designGlow": "rgba(113, 80, 179, 0.46)",
|
|
140
|
+
"dashboardGround": "#92dff6",
|
|
141
|
+
"dashboardGroundStrong": "#8cd8ef",
|
|
142
|
+
"dashboardGroundEnd": "#b4e8f8",
|
|
143
|
+
"dashboardGlow": "rgba(22, 107, 128, 0.46)",
|
|
144
|
+
"htmlGround": "#ffc0c5",
|
|
145
|
+
"htmlGroundStrong": "#ffb6bd",
|
|
146
|
+
"htmlGroundEnd": "#ffd2d5",
|
|
147
|
+
"htmlGlow": "rgba(152, 74, 85, 0.46)",
|
|
148
|
+
"sheetGround": "#9fe4b4",
|
|
149
|
+
"sheetGroundStrong": "#99deae",
|
|
150
|
+
"sheetGroundEnd": "#bcecca",
|
|
151
|
+
"sheetGlow": "rgba(44, 112, 70, 0.46)",
|
|
152
|
+
"brandGround": "#ffb5f2",
|
|
153
|
+
"brandGroundStrong": "#ffa9f1",
|
|
154
|
+
"brandGroundEnd": "#ffcbf5",
|
|
155
|
+
"brandGlow": "rgba(143, 56, 132, 0.46)"
|
|
128
156
|
}
|
|
129
157
|
},
|
|
130
158
|
"scrollbar": "rgba(7, 8, 13, 0.2)",
|
|
131
|
-
"scrollbarHover": "rgba(7, 8, 13, 0.32)"
|
|
159
|
+
"scrollbarHover": "rgba(7, 8, 13, 0.32)",
|
|
160
|
+
"edge": {
|
|
161
|
+
"hairline": "rgba(18, 22, 37, 0.13)",
|
|
162
|
+
"soft": "rgba(119, 122, 131, 0.3)",
|
|
163
|
+
"medium": "rgba(119, 122, 131, 0.5)",
|
|
164
|
+
"strong": "#777a83"
|
|
165
|
+
},
|
|
166
|
+
"fill": {
|
|
167
|
+
"row": "rgba(18, 22, 37, 0.04)",
|
|
168
|
+
"soft": "rgba(18, 22, 37, 0.06)"
|
|
169
|
+
}
|
|
132
170
|
},
|
|
133
171
|
"shadow": {
|
|
134
172
|
"xs": "0 1px 2px rgba(7, 8, 13, 0.06)",
|
|
@@ -143,7 +181,8 @@ export const themes = {
|
|
|
143
181
|
"hairline": "none",
|
|
144
182
|
"focus": "0 0 0 2px var(--color-surface-background), 0 0 0 4px var(--color-focus)",
|
|
145
183
|
"selection": "inset 0 0 0 2px var(--color-brand-accent)",
|
|
146
|
-
"glow": "0 4px 24px rgba(var(--color-brand-accent-rgb), 0.22)"
|
|
184
|
+
"glow": "0 4px 24px rgba(var(--color-brand-accent-rgb), 0.22)",
|
|
185
|
+
"sheetStart": "16px 0 40px rgba(7, 8, 13, 0.16), 2px 0 8px rgba(7, 8, 13, 0.08)"
|
|
147
186
|
}
|
|
148
187
|
},
|
|
149
188
|
"dark": {
|
|
@@ -258,11 +297,49 @@ export const themes = {
|
|
|
258
297
|
"brand": "#cc7bd1",
|
|
259
298
|
"brandInk": "#dabcdb",
|
|
260
299
|
"brandFill": "rgba(204, 123, 209, 0.12)",
|
|
261
|
-
"brandLine": "rgba(204, 123, 209, 0.38)"
|
|
300
|
+
"brandLine": "rgba(204, 123, 209, 0.38)",
|
|
301
|
+
"docGround": "#0b2767",
|
|
302
|
+
"docGroundStrong": "#0f2c6c",
|
|
303
|
+
"docGroundEnd": "#0f234d",
|
|
304
|
+
"docGlow": "rgba(91, 127, 199, 0.46)",
|
|
305
|
+
"slidesGround": "#4d2c00",
|
|
306
|
+
"slidesGroundStrong": "#543100",
|
|
307
|
+
"slidesGroundEnd": "#3b250c",
|
|
308
|
+
"slidesGlow": "rgba(200, 152, 102, 0.46)",
|
|
309
|
+
"designGround": "#390b6f",
|
|
310
|
+
"designGroundStrong": "#3d1274",
|
|
311
|
+
"designGroundEnd": "#2d1553",
|
|
312
|
+
"designGlow": "rgba(142, 110, 212, 0.46)",
|
|
313
|
+
"dashboardGround": "#003a47",
|
|
314
|
+
"dashboardGroundStrong": "#00404e",
|
|
315
|
+
"dashboardGroundEnd": "#0e2e37",
|
|
316
|
+
"dashboardGlow": "rgba(92, 168, 190, 0.46)",
|
|
317
|
+
"htmlGround": "#5a1122",
|
|
318
|
+
"htmlGroundStrong": "#601726",
|
|
319
|
+
"htmlGroundEnd": "#45161e",
|
|
320
|
+
"htmlGlow": "rgba(200, 117, 127, 0.46)",
|
|
321
|
+
"sheetGround": "#003d1d",
|
|
322
|
+
"sheetGroundStrong": "#004221",
|
|
323
|
+
"sheetGroundEnd": "#0e301b",
|
|
324
|
+
"sheetGlow": "rgba(98, 165, 120, 0.46)",
|
|
325
|
+
"brandGround": "#56025c",
|
|
326
|
+
"brandGroundStrong": "#5c0b62",
|
|
327
|
+
"brandGroundEnd": "#421145",
|
|
328
|
+
"brandGlow": "rgba(204, 123, 209, 0.46)"
|
|
262
329
|
}
|
|
263
330
|
},
|
|
264
331
|
"scrollbar": "rgba(255, 255, 255, 0.16)",
|
|
265
|
-
"scrollbarHover": "rgba(255, 255, 255, 0.26)"
|
|
332
|
+
"scrollbarHover": "rgba(255, 255, 255, 0.26)",
|
|
333
|
+
"edge": {
|
|
334
|
+
"hairline": "rgba(231, 234, 243, 0.13)",
|
|
335
|
+
"soft": "rgba(127, 135, 156, 0.3)",
|
|
336
|
+
"medium": "rgba(127, 135, 156, 0.5)",
|
|
337
|
+
"strong": "#7f879c"
|
|
338
|
+
},
|
|
339
|
+
"fill": {
|
|
340
|
+
"row": "rgba(231, 234, 243, 0.04)",
|
|
341
|
+
"soft": "rgba(231, 234, 243, 0.06)"
|
|
342
|
+
}
|
|
266
343
|
},
|
|
267
344
|
"shadow": {
|
|
268
345
|
"xs": "0 1px 2px rgba(0, 0, 0, 0.2)",
|
|
@@ -277,7 +354,8 @@ export const themes = {
|
|
|
277
354
|
"hairline": "inset 0 1px 0 rgba(255, 255, 255, 0.04)",
|
|
278
355
|
"focus": "0 0 0 2px var(--color-surface-background), 0 0 0 4px var(--color-focus)",
|
|
279
356
|
"selection": "inset 0 0 0 2px var(--color-brand-accent)",
|
|
280
|
-
"glow": "0 4px 24px rgba(var(--color-brand-accent-rgb), 0.3)"
|
|
357
|
+
"glow": "0 4px 24px rgba(var(--color-brand-accent-rgb), 0.3)",
|
|
358
|
+
"sheetStart": "8px 0 32px rgba(0, 0, 0, 0.4)"
|
|
281
359
|
}
|
|
282
360
|
}
|
|
283
361
|
};
|
package/package.json
CHANGED
package/test/color.mjs
CHANGED
|
@@ -22,12 +22,14 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import {
|
|
25
|
+
atLightness,
|
|
25
26
|
contrast,
|
|
26
27
|
formatHex,
|
|
27
28
|
fromLinear,
|
|
28
29
|
fromOklab,
|
|
29
30
|
linearChannel,
|
|
30
31
|
luminance,
|
|
32
|
+
oklabHex,
|
|
31
33
|
oklabToLinear,
|
|
32
34
|
parseHex,
|
|
33
35
|
parseRgba,
|
|
@@ -35,7 +37,7 @@ import {
|
|
|
35
37
|
withAlpha,
|
|
36
38
|
} from '../dist/color.js';
|
|
37
39
|
|
|
38
|
-
export { contrast, fromOklab, luminance, oklabToLinear, parseHex, parseRgba, toOklab, withAlpha };
|
|
40
|
+
export { atLightness, contrast, fromOklab, luminance, oklabHex, oklabToLinear, parseHex, parseRgba, toOklab, withAlpha };
|
|
39
41
|
export { formatHex as hex };
|
|
40
42
|
|
|
41
43
|
/** @typedef {{ r: number, g: number, b: number }} RGB */
|
package/test/palette.d.mts
CHANGED
|
@@ -220,3 +220,5 @@ export const ARTIFACT_KIND_HUES: readonly string[];
|
|
|
220
220
|
export const ARTIFACT_KIND_FILL_ALPHA: number;
|
|
221
221
|
/** How far apart, in OKLab dE under normal vision, any two kind hues sit. */
|
|
222
222
|
export const ARTIFACT_KIND_DE: number;
|
|
223
|
+
/** The kind ground steps the primary text is held to 4.5:1 on, over the card rung (`ground`, `ground-strong`). */
|
|
224
|
+
export const ARTIFACT_KIND_GROUNDS: readonly string[];
|
package/test/palette.mjs
CHANGED
|
@@ -371,6 +371,13 @@ export const ARTIFACT_KIND_HUES = ARTIFACT_KINDS.map((kind) => `--color-artifact
|
|
|
371
371
|
export const ARTIFACT_KIND_FILL_ALPHA = 0.12;
|
|
372
372
|
/** How far apart, in OKLab dE under normal vision, any two kind hues sit. */
|
|
373
373
|
export const ARTIFACT_KIND_DE = 8;
|
|
374
|
+
/**
|
|
375
|
+
* The steps a card drawn ON a kind's hue reads its words on: its ground at
|
|
376
|
+
* rest and under the pointer (`-ground`, `-ground-strong`), each laid on the
|
|
377
|
+
* card rung it stands on. The primary text clears 4.5:1 on both, in every
|
|
378
|
+
* palette, because the card's title is set in it.
|
|
379
|
+
*/
|
|
380
|
+
export const ARTIFACT_KIND_GROUNDS = ['ground', 'ground-strong'];
|
|
374
381
|
|
|
375
382
|
// ---------------------------------------------------------------------------
|
|
376
383
|
// The rail
|
|
@@ -1001,6 +1008,13 @@ function checkState(state, values, profile, push, theme = { tint: null, contrast
|
|
|
1001
1008
|
ink.ratio,
|
|
1002
1009
|
`${ink.ratio.toFixed(2)}:1 (worst on ${ink.name})`,
|
|
1003
1010
|
);
|
|
1011
|
+
// See ARTIFACT_KIND_GROUNDS. Laid on the card rung, where a card on a
|
|
1012
|
+
// kind's hue stands.
|
|
1013
|
+
const card = flatten(values.get('--color-surface-subtle'), ground);
|
|
1014
|
+
for (const step of ARTIFACT_KIND_GROUNDS) {
|
|
1015
|
+
const ratio = contrast(colour('--color-text-primary'), flatten(values.get(`${name}-${step}`), card));
|
|
1016
|
+
say('the primary text clears 4.5:1 on a kind ground', ratio >= 4.5, `--color-text-primary on ${name}-${step}`, ratio, `${ratio.toFixed(2)}:1`);
|
|
1017
|
+
}
|
|
1004
1018
|
}
|
|
1005
1019
|
if (profile === 'full') {
|
|
1006
1020
|
for (let i = 0; i < kinds.length; i += 1) {
|