@astryxdesign/theme-gothic 0.7.3 → 0.7.4-canary.1b56e00
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 +48 -30
- package/dist/gothic.d.ts +2 -2
- package/dist/gothic.js +40 -40
- package/dist/gothicColorMapping.test.d.ts +2 -0
- package/dist/gothicColorMapping.test.d.ts.map +1 -0
- package/dist/gothicPaletteRefs.generated.d.ts +101 -0
- package/dist/gothicPaletteRefs.generated.d.ts.map +1 -0
- package/dist/gothicPalettes.generated.d.ts +266 -0
- package/dist/gothicPalettes.generated.d.ts.map +1 -0
- package/dist/gothicPalettes.test.d.ts +2 -0
- package/dist/gothicPalettes.test.d.ts.map +1 -0
- package/dist/gothicTheme.d.ts +5 -5
- package/dist/gothicTheme.d.ts.map +1 -1
- package/dist/gothicTheme.test.d.ts +2 -0
- package/dist/gothicTheme.test.d.ts.map +1 -0
- package/dist/source.d.ts +1 -1
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +139 -152
- package/dist/source.mjs +139 -152
- package/dist/theme.css +40 -40
- package/dist/theme.css.d.ts +2 -2
- package/package.json +6 -5
- package/palette.config.json +371 -0
- package/src/gothicColorMapping.test.ts +43 -0
- package/src/gothicPaletteRefs.generated.ts +41 -0
- package/src/gothicPalettes.generated.receipt.json +979 -0
- package/src/gothicPalettes.generated.ts +271 -0
- package/src/gothicPalettes.test.ts +63 -0
- package/src/gothicTheme.test.ts +98 -0
- package/src/gothicTheme.ts +130 -160
- package/src/source.ts +1 -1
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
{
|
|
2
|
+
"recipe": "astryx-oklch-v1",
|
|
3
|
+
"vibrancy": 36,
|
|
4
|
+
"neutralProfile": "custom",
|
|
5
|
+
"modeStrategy": "dark-only",
|
|
6
|
+
"stops": [
|
|
7
|
+
0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90,
|
|
8
|
+
95, 100
|
|
9
|
+
],
|
|
10
|
+
"families": [
|
|
11
|
+
{
|
|
12
|
+
"id": "neutral",
|
|
13
|
+
"name": "Gothic Neutral",
|
|
14
|
+
"seed": "#5d646b",
|
|
15
|
+
"kind": "neutral",
|
|
16
|
+
"anchors": [
|
|
17
|
+
{
|
|
18
|
+
"mode": "dark",
|
|
19
|
+
"stop": 10,
|
|
20
|
+
"color": "#101314",
|
|
21
|
+
"policy": "exact"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"mode": "dark",
|
|
25
|
+
"stop": 20,
|
|
26
|
+
"color": "#24292d",
|
|
27
|
+
"policy": "exact"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"mode": "dark",
|
|
31
|
+
"stop": 40,
|
|
32
|
+
"color": "#495056",
|
|
33
|
+
"policy": "exact"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"mode": "dark",
|
|
37
|
+
"stop": 75,
|
|
38
|
+
"color": "#96a0ab",
|
|
39
|
+
"policy": "exact"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"mode": "dark",
|
|
43
|
+
"stop": 95,
|
|
44
|
+
"color": "#e8f1f6",
|
|
45
|
+
"policy": "exact"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "red",
|
|
51
|
+
"name": "Blood Crimson",
|
|
52
|
+
"seed": "#7d5e51",
|
|
53
|
+
"anchors": [
|
|
54
|
+
{
|
|
55
|
+
"mode": "dark",
|
|
56
|
+
"stop": 20,
|
|
57
|
+
"color": "#4a2520",
|
|
58
|
+
"policy": "exact"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"mode": "dark",
|
|
62
|
+
"stop": 30,
|
|
63
|
+
"color": "#5e3a35",
|
|
64
|
+
"policy": "exact"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"mode": "dark",
|
|
68
|
+
"stop": 60,
|
|
69
|
+
"color": "#a48581",
|
|
70
|
+
"policy": "exact"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"mode": "dark",
|
|
74
|
+
"stop": 75,
|
|
75
|
+
"color": "#c6a6a2",
|
|
76
|
+
"policy": "exact"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "orange",
|
|
82
|
+
"name": "Rust Copper",
|
|
83
|
+
"seed": "#c87a4a",
|
|
84
|
+
"anchors": [
|
|
85
|
+
{
|
|
86
|
+
"mode": "dark",
|
|
87
|
+
"stop": 20,
|
|
88
|
+
"color": "#6e3812",
|
|
89
|
+
"policy": "exact"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"mode": "dark",
|
|
93
|
+
"stop": 30,
|
|
94
|
+
"color": "#8a4818",
|
|
95
|
+
"policy": "exact"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"mode": "dark",
|
|
99
|
+
"stop": 60,
|
|
100
|
+
"color": "#b6987d",
|
|
101
|
+
"policy": "exact"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"mode": "dark",
|
|
105
|
+
"stop": 75,
|
|
106
|
+
"color": "#d3b89a",
|
|
107
|
+
"policy": "exact"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "yellow",
|
|
113
|
+
"name": "Aged Gold",
|
|
114
|
+
"seed": "#cca74c",
|
|
115
|
+
"anchors": [
|
|
116
|
+
{
|
|
117
|
+
"mode": "dark",
|
|
118
|
+
"stop": 20,
|
|
119
|
+
"color": "#6c5010",
|
|
120
|
+
"policy": "exact"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"mode": "dark",
|
|
124
|
+
"stop": 30,
|
|
125
|
+
"color": "#876515",
|
|
126
|
+
"policy": "exact"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"mode": "dark",
|
|
130
|
+
"stop": 60,
|
|
131
|
+
"color": "#b6a775",
|
|
132
|
+
"policy": "exact"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"mode": "dark",
|
|
136
|
+
"stop": 65,
|
|
137
|
+
"color": "#e6b85e",
|
|
138
|
+
"policy": "exact"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"mode": "dark",
|
|
142
|
+
"stop": 70,
|
|
143
|
+
"color": "#dec074",
|
|
144
|
+
"policy": "exact"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"mode": "dark",
|
|
148
|
+
"stop": 75,
|
|
149
|
+
"color": "#d3c490",
|
|
150
|
+
"policy": "exact"
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"id": "green",
|
|
156
|
+
"name": "Forest Moss",
|
|
157
|
+
"seed": "#779e5d",
|
|
158
|
+
"anchors": [
|
|
159
|
+
{
|
|
160
|
+
"mode": "dark",
|
|
161
|
+
"stop": 20,
|
|
162
|
+
"color": "#244023",
|
|
163
|
+
"policy": "exact"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"mode": "dark",
|
|
167
|
+
"stop": 30,
|
|
168
|
+
"color": "#3a5e2c",
|
|
169
|
+
"policy": "exact"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"mode": "dark",
|
|
173
|
+
"stop": 60,
|
|
174
|
+
"color": "#96a880",
|
|
175
|
+
"policy": "exact"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"mode": "dark",
|
|
179
|
+
"stop": 70,
|
|
180
|
+
"color": "#a3c987",
|
|
181
|
+
"policy": "exact"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"mode": "dark",
|
|
185
|
+
"stop": 75,
|
|
186
|
+
"color": "#b3c79a",
|
|
187
|
+
"policy": "exact"
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"id": "teal",
|
|
193
|
+
"name": "Verdigris",
|
|
194
|
+
"seed": "#5aa091",
|
|
195
|
+
"anchors": [
|
|
196
|
+
{
|
|
197
|
+
"mode": "dark",
|
|
198
|
+
"stop": 20,
|
|
199
|
+
"color": "#174a40",
|
|
200
|
+
"policy": "exact"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"mode": "dark",
|
|
204
|
+
"stop": 30,
|
|
205
|
+
"color": "#1f5e52",
|
|
206
|
+
"policy": "exact"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"mode": "dark",
|
|
210
|
+
"stop": 60,
|
|
211
|
+
"color": "#86a499",
|
|
212
|
+
"policy": "exact"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"mode": "dark",
|
|
216
|
+
"stop": 70,
|
|
217
|
+
"color": "#7cc5b3",
|
|
218
|
+
"policy": "exact"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"mode": "dark",
|
|
222
|
+
"stop": 75,
|
|
223
|
+
"color": "#a3c2b6",
|
|
224
|
+
"policy": "exact"
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"id": "cyan",
|
|
230
|
+
"name": "Cathedral Mist",
|
|
231
|
+
"seed": "#6a9eb1",
|
|
232
|
+
"anchors": [
|
|
233
|
+
{
|
|
234
|
+
"mode": "dark",
|
|
235
|
+
"stop": 20,
|
|
236
|
+
"color": "#204858",
|
|
237
|
+
"policy": "exact"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"mode": "dark",
|
|
241
|
+
"stop": 30,
|
|
242
|
+
"color": "#2a5e75",
|
|
243
|
+
"policy": "exact"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"mode": "dark",
|
|
247
|
+
"stop": 60,
|
|
248
|
+
"color": "#86a4b1",
|
|
249
|
+
"policy": "exact"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"mode": "dark",
|
|
253
|
+
"stop": 75,
|
|
254
|
+
"color": "#a3c2cf",
|
|
255
|
+
"policy": "exact"
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"id": "blue",
|
|
261
|
+
"name": "Midnight Indigo",
|
|
262
|
+
"seed": "#6170bf",
|
|
263
|
+
"anchors": [
|
|
264
|
+
{
|
|
265
|
+
"mode": "dark",
|
|
266
|
+
"stop": 20,
|
|
267
|
+
"color": "#1f2c54",
|
|
268
|
+
"policy": "exact"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"mode": "dark",
|
|
272
|
+
"stop": 30,
|
|
273
|
+
"color": "#2a3b6e",
|
|
274
|
+
"policy": "exact"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"mode": "dark",
|
|
278
|
+
"stop": 60,
|
|
279
|
+
"color": "#8696b8",
|
|
280
|
+
"policy": "exact"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"mode": "dark",
|
|
284
|
+
"stop": 65,
|
|
285
|
+
"color": "#8aa1d8",
|
|
286
|
+
"policy": "exact"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"mode": "dark",
|
|
290
|
+
"stop": 75,
|
|
291
|
+
"color": "#a3b5d6",
|
|
292
|
+
"policy": "exact"
|
|
293
|
+
}
|
|
294
|
+
]
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"id": "purple",
|
|
298
|
+
"name": "Cathedral Plum",
|
|
299
|
+
"seed": "#a363bd",
|
|
300
|
+
"anchors": [
|
|
301
|
+
{
|
|
302
|
+
"mode": "dark",
|
|
303
|
+
"stop": 20,
|
|
304
|
+
"color": "#481b58",
|
|
305
|
+
"policy": "exact"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"mode": "dark",
|
|
309
|
+
"stop": 30,
|
|
310
|
+
"color": "#5a2370",
|
|
311
|
+
"policy": "exact"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"mode": "dark",
|
|
315
|
+
"stop": 60,
|
|
316
|
+
"color": "#947da6",
|
|
317
|
+
"policy": "exact"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"mode": "dark",
|
|
321
|
+
"stop": 75,
|
|
322
|
+
"color": "#b29bc4",
|
|
323
|
+
"policy": "exact"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"mode": "dark",
|
|
327
|
+
"stop": 80,
|
|
328
|
+
"color": "#c39adb",
|
|
329
|
+
"policy": "exact"
|
|
330
|
+
}
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"id": "pink",
|
|
335
|
+
"name": "Rose Madder",
|
|
336
|
+
"seed": "#b15876",
|
|
337
|
+
"anchors": [
|
|
338
|
+
{
|
|
339
|
+
"mode": "dark",
|
|
340
|
+
"stop": 20,
|
|
341
|
+
"color": "#71223c",
|
|
342
|
+
"policy": "exact"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"mode": "dark",
|
|
346
|
+
"stop": 30,
|
|
347
|
+
"color": "#8d2d4c",
|
|
348
|
+
"policy": "exact"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"mode": "dark",
|
|
352
|
+
"stop": 60,
|
|
353
|
+
"color": "#aa7d8e",
|
|
354
|
+
"policy": "exact"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"mode": "dark",
|
|
358
|
+
"stop": 65,
|
|
359
|
+
"color": "#d97580",
|
|
360
|
+
"policy": "exact"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"mode": "dark",
|
|
364
|
+
"stop": 75,
|
|
365
|
+
"color": "#c89aab",
|
|
366
|
+
"policy": "exact"
|
|
367
|
+
}
|
|
368
|
+
]
|
|
369
|
+
}
|
|
370
|
+
]
|
|
371
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
import {readFileSync} from 'node:fs';
|
|
4
|
+
import {describe, expect, it} from 'vitest';
|
|
5
|
+
import {gothicTheme} from './gothicTheme';
|
|
6
|
+
|
|
7
|
+
const source = readFileSync(
|
|
8
|
+
new URL('./gothicTheme.ts', import.meta.url),
|
|
9
|
+
'utf8',
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
const maintainedThemeSource = source.slice(
|
|
13
|
+
0,
|
|
14
|
+
source.indexOf('/**\n * Frozen released compatibility palettes'),
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
describe('gothic color token mapping completeness', () => {
|
|
18
|
+
it('does not redefine the data-visualization color system', () => {
|
|
19
|
+
expect(
|
|
20
|
+
Object.keys(gothicTheme.tokens).filter(name =>
|
|
21
|
+
name.startsWith('--color-data-'),
|
|
22
|
+
),
|
|
23
|
+
).toEqual([]);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('keeps every root color value concrete', () => {
|
|
27
|
+
for (const [name, value] of Object.entries(gothicTheme.tokens)) {
|
|
28
|
+
if (!name.startsWith('--color-')) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
expect(typeof value, name).toBe('string');
|
|
32
|
+
expect(value, name).toMatch(
|
|
33
|
+
/^(?:transparent|#[0-9a-f]{6}(?:[0-9a-f]{2})?)$/i,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('uses no one-off color literals in the maintained theme source', () => {
|
|
39
|
+
expect(maintainedThemeSource).not.toMatch(
|
|
40
|
+
/#[0-9a-f]{3,8}\b|\brgba?\(|\bhsl[a]?\(|\boklch\(|\bblack\b|\bwhite\b/i,
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
// Generated from the committed full palette for the stops used by Gothic's
|
|
4
|
+
// theme source. Regenerate with `pnpm generate:gothic-palette-refs`.
|
|
5
|
+
// Keep the complete palette available for authoring and audits without
|
|
6
|
+
// making consumers pay for unused palette stops.
|
|
7
|
+
// prettier-ignore
|
|
8
|
+
export const gothicPaletteRefs = {
|
|
9
|
+
purple: {
|
|
10
|
+
dark: {20: '#481b58', 30: '#5a2370', 60: '#947da6', 75: '#b29bc4', 80: '#c39adb'},
|
|
11
|
+
},
|
|
12
|
+
green: {
|
|
13
|
+
dark: {5: '#071607', 20: '#244023', 30: '#3a5e2c', 55: '#869b72', 60: '#96a880', 70: '#a3c987', 75: '#b3c79a'},
|
|
14
|
+
},
|
|
15
|
+
neutral: {
|
|
16
|
+
dark: {0: '#000000', 10: '#101314', 15: '#191d20', 20: '#24292d', 35: '#3e454b', 40: '#495056', 50: '#5e676e', 65: '#7e8791', 75: '#96a0ab', 95: '#e8f1f6', 100: '#ffffff'},
|
|
17
|
+
},
|
|
18
|
+
yellow: {
|
|
19
|
+
dark: {15: '#573f0b', 30: '#876515', 60: '#b6a775', 65: '#e6b85e', 70: '#dec074', 75: '#d3c490'},
|
|
20
|
+
},
|
|
21
|
+
blue: {
|
|
22
|
+
dark: {20: '#1f2c54', 30: '#2a3b6e', 60: '#8696b8', 65: '#8aa1d8', 75: '#a3b5d6'},
|
|
23
|
+
},
|
|
24
|
+
pink: {
|
|
25
|
+
dark: {15: '#5c182f', 30: '#8d2d4c', 60: '#aa7d8e', 65: '#d97580', 75: '#c89aab'},
|
|
26
|
+
},
|
|
27
|
+
teal: {
|
|
28
|
+
dark: {20: '#174a40', 30: '#1f5e52', 60: '#86a499', 70: '#7cc5b3', 75: '#a3c2b6'},
|
|
29
|
+
},
|
|
30
|
+
red: {
|
|
31
|
+
dark: {5: '#220806', 20: '#4a2520', 30: '#5e3a35', 60: '#a48581', 75: '#c6a6a2'},
|
|
32
|
+
},
|
|
33
|
+
cyan: {
|
|
34
|
+
dark: {20: '#204858', 30: '#2a5e75', 60: '#86a4b1', 75: '#a3c2cf'},
|
|
35
|
+
},
|
|
36
|
+
orange: {
|
|
37
|
+
dark: {20: '#6e3812', 30: '#8a4818', 60: '#b6987d', 75: '#d3b89a'},
|
|
38
|
+
},
|
|
39
|
+
} as const;
|
|
40
|
+
|
|
41
|
+
export default gothicPaletteRefs;
|