@astryxdesign/theme-matcha 0.7.17-canary.gffd1fc0 → 0.7.17
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 +6 -10
- package/dist/matcha.js +50 -15
- package/dist/matchaPaletteRefs.generated.d.ts +7 -4
- package/dist/matchaPaletteRefs.generated.d.ts.map +1 -1
- package/dist/matchaTheme.d.cts +2 -0
- package/dist/matchaTheme.d.ts +2 -0
- package/dist/matchaTheme.d.ts.map +1 -1
- package/dist/source.cjs +66 -22
- package/dist/source.d.cts +1 -1
- package/dist/source.d.ts +1 -1
- package/dist/source.d.ts.map +1 -1
- package/dist/source.mjs +65 -22
- package/dist/theme.css +84 -15
- package/fonts/dm-sans-latin-400-normal.woff2 +0 -0
- package/fonts/dm-sans-latin-500-normal.woff2 +0 -0
- package/fonts/dm-sans-latin-600-normal.woff2 +0 -0
- package/fonts/dm-sans-latin-700-normal.woff2 +0 -0
- package/fonts/dm-sans-latin-ext-400-normal.woff2 +0 -0
- package/fonts/dm-sans-latin-ext-500-normal.woff2 +0 -0
- package/fonts/dm-sans-latin-ext-600-normal.woff2 +0 -0
- package/fonts/dm-sans-latin-ext-700-normal.woff2 +0 -0
- package/fonts/dm-sans.LICENSE.txt +93 -0
- package/fonts/jetbrains-mono-cyrillic-400-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-cyrillic-500-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-cyrillic-600-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-cyrillic-700-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-cyrillic-ext-400-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-cyrillic-ext-500-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-cyrillic-ext-600-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-cyrillic-ext-700-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-greek-400-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-greek-500-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-greek-600-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-greek-700-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-latin-500-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-latin-600-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-latin-700-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-latin-ext-400-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-latin-ext-500-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-latin-ext-600-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-latin-ext-700-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-vietnamese-400-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-vietnamese-500-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-vietnamese-600-normal.woff2 +0 -0
- package/fonts/jetbrains-mono-vietnamese-700-normal.woff2 +0 -0
- package/fonts/jetbrains-mono.LICENSE.txt +93 -0
- package/fonts/playwrite-us-trad-latin-400-normal.woff2 +0 -0
- package/fonts/playwrite-us-trad.LICENSE.txt +93 -0
- package/fonts.css +382 -1
- package/package.json +4 -3
- package/src/matchaPaletteRefs.generated.ts +8 -8
- package/src/matchaTheme.ts +58 -14
- package/src/source.ts +1 -1
- package/LICENSE +0 -21
package/src/matchaTheme.ts
CHANGED
|
@@ -22,16 +22,16 @@ const matchaSyntax = defineSyntaxTheme({
|
|
|
22
22
|
tokens: {
|
|
23
23
|
keyword: [neutral.light[30], neutral.dark[70]],
|
|
24
24
|
string: [teal.light[50], teal.dark[75]],
|
|
25
|
-
comment: [neutral.light[
|
|
25
|
+
comment: [neutral.light[30], neutral.dark[45]],
|
|
26
26
|
number: [yellow.light[45], yellow.dark[75]],
|
|
27
27
|
function: [blue.light[50], blue.dark[70]],
|
|
28
28
|
type: [purple.light[50], purple.dark[70]],
|
|
29
29
|
variable: [neutral.light[20], neutral.dark[75]],
|
|
30
|
-
operator: [neutral.light[
|
|
30
|
+
operator: [neutral.light[30], neutral.dark[60]],
|
|
31
31
|
constant: [yellow.light[45], yellow.dark[75]],
|
|
32
32
|
tag: [pink.light[30], pink.dark[65]],
|
|
33
33
|
attribute: [orange.light[30], yellow.dark[70]],
|
|
34
|
-
property: [teal.light[
|
|
34
|
+
property: [teal.light[50], teal.dark[75]],
|
|
35
35
|
// Punctuation uses dedicated neutral stops that maintain WCAG AA against
|
|
36
36
|
// the syntax background in both modes (issue 5386).
|
|
37
37
|
punctuation: [neutral.light[30], neutral.dark[65]],
|
|
@@ -39,6 +39,9 @@ const matchaSyntax = defineSyntaxTheme({
|
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
+
/** The color modes matcha draws: light and dark. */
|
|
43
|
+
export const colorModes = ['light', 'dark'] as const;
|
|
44
|
+
|
|
42
45
|
export const matchaTheme = defineTheme({
|
|
43
46
|
name: 'matcha',
|
|
44
47
|
|
|
@@ -93,11 +96,14 @@ export const matchaTheme = defineTheme({
|
|
|
93
96
|
withAlpha(neutral.light[20], '1a'),
|
|
94
97
|
withAlpha(neutral.dark[75], '1a'),
|
|
95
98
|
],
|
|
96
|
-
'
|
|
99
|
+
// Matcha's dark ramp is a deep gray neutral up to stop 15 and olive from
|
|
100
|
+
// stop 20, so dark surfaces stay at or under 15: the muted fill sits with
|
|
101
|
+
// the page, as it does in light mode.
|
|
102
|
+
'--color-background-muted': [neutral.light[95], neutral.dark[5]],
|
|
97
103
|
|
|
98
104
|
// Text
|
|
99
105
|
'--color-text-primary': [neutral.light[20], neutral.dark[75]],
|
|
100
|
-
'--color-text-secondary': [neutral.light[30], neutral.dark[
|
|
106
|
+
'--color-text-secondary': [neutral.light[30], neutral.dark[70]],
|
|
101
107
|
'--color-text-disabled': [neutral.light[75], neutral.dark[30]],
|
|
102
108
|
'--color-text-accent': [neutral.light[20], neutral.dark[75]],
|
|
103
109
|
'--color-on-dark': neutral.light[100],
|
|
@@ -116,9 +122,9 @@ export const matchaTheme = defineTheme({
|
|
|
116
122
|
'--color-text-warning': [yellow.light[45], yellow.dark[90]],
|
|
117
123
|
'--color-text-error': [red.light[35], red.dark[75]],
|
|
118
124
|
'--color-on-info-muted': [blue.light[35], blue.dark[75]],
|
|
119
|
-
'--color-on-success-muted': [green.light[
|
|
120
|
-
'--color-on-warning-muted': [yellow.light[
|
|
121
|
-
'--color-on-error-muted': [red.light[
|
|
125
|
+
'--color-on-success-muted': [green.light[30], green.dark[75]],
|
|
126
|
+
'--color-on-warning-muted': [yellow.light[40], yellow.dark[90]],
|
|
127
|
+
'--color-on-error-muted': [red.light[30], red.dark[75]],
|
|
122
128
|
|
|
123
129
|
// Icon
|
|
124
130
|
'--color-icon-accent': [neutral.light[20], neutral.dark[75]],
|
|
@@ -128,7 +134,7 @@ export const matchaTheme = defineTheme({
|
|
|
128
134
|
|
|
129
135
|
// Surface variants
|
|
130
136
|
'--color-background-card': [neutral.light[100], neutral.dark[15]],
|
|
131
|
-
'--color-background-popover': [neutral.light[100], neutral.dark[
|
|
137
|
+
'--color-background-popover': [neutral.light[100], neutral.dark[15]],
|
|
132
138
|
'--color-background-inverted': [neutral.light[20], neutral.dark[75]],
|
|
133
139
|
|
|
134
140
|
// Status / Sentiment
|
|
@@ -195,7 +201,7 @@ export const matchaTheme = defineTheme({
|
|
|
195
201
|
],
|
|
196
202
|
'--color-border-green': [green.light[50], green.dark[70]],
|
|
197
203
|
'--color-icon-green': [green.light[50], green.dark[70]],
|
|
198
|
-
'--color-text-green': [green.light[
|
|
204
|
+
'--color-text-green': [green.light[30], green.dark[75]],
|
|
199
205
|
|
|
200
206
|
// Categorical — Orange
|
|
201
207
|
'--color-background-orange': [
|
|
@@ -204,7 +210,7 @@ export const matchaTheme = defineTheme({
|
|
|
204
210
|
],
|
|
205
211
|
'--color-border-orange': [orange.light[50], orange.dark[70]],
|
|
206
212
|
'--color-icon-orange': [orange.light[50], orange.dark[70]],
|
|
207
|
-
'--color-text-orange': [orange.light[
|
|
213
|
+
'--color-text-orange': [orange.light[25], orange.dark[75]],
|
|
208
214
|
|
|
209
215
|
// Categorical — Pink
|
|
210
216
|
'--color-background-pink': [
|
|
@@ -213,7 +219,7 @@ export const matchaTheme = defineTheme({
|
|
|
213
219
|
],
|
|
214
220
|
'--color-border-pink': [pink.light[50], pink.dark[70]],
|
|
215
221
|
'--color-icon-pink': [pink.light[50], pink.dark[70]],
|
|
216
|
-
'--color-text-pink': [pink.light[
|
|
222
|
+
'--color-text-pink': [pink.light[30], pink.dark[75]],
|
|
217
223
|
|
|
218
224
|
// Categorical — Purple
|
|
219
225
|
'--color-background-purple': [
|
|
@@ -231,7 +237,7 @@ export const matchaTheme = defineTheme({
|
|
|
231
237
|
],
|
|
232
238
|
'--color-border-red': [red.light[50], red.dark[70]],
|
|
233
239
|
'--color-icon-red': [red.light[50], red.dark[70]],
|
|
234
|
-
'--color-text-red': [red.light[
|
|
240
|
+
'--color-text-red': [red.light[30], red.dark[75]],
|
|
235
241
|
|
|
236
242
|
// Categorical — Teal
|
|
237
243
|
'--color-background-teal': [
|
|
@@ -249,7 +255,7 @@ export const matchaTheme = defineTheme({
|
|
|
249
255
|
],
|
|
250
256
|
'--color-border-yellow': [yellow.light[80], yellow.dark[85]],
|
|
251
257
|
'--color-icon-yellow': [yellow.light[80], yellow.dark[85]],
|
|
252
|
-
'--color-text-yellow': [yellow.light[
|
|
258
|
+
'--color-text-yellow': [yellow.light[40], yellow.dark[90]],
|
|
253
259
|
|
|
254
260
|
// =========================================================================
|
|
255
261
|
// Spacing
|
|
@@ -276,6 +282,8 @@ export const matchaTheme = defineTheme({
|
|
|
276
282
|
'--radius-element': '12px',
|
|
277
283
|
'--radius-container': '18px',
|
|
278
284
|
'--radius-page': '42px',
|
|
285
|
+
// Chat surfaces stay rounder than cards.
|
|
286
|
+
'--radius-chat': '28px',
|
|
279
287
|
|
|
280
288
|
// No explicit --font-size-* overrides — font sizes come from
|
|
281
289
|
// typography.scale above, keeping the scale the single source of truth.
|
|
@@ -306,11 +314,47 @@ export const matchaTheme = defineTheme({
|
|
|
306
314
|
borderRadius: 'var(--radius-full)',
|
|
307
315
|
},
|
|
308
316
|
},
|
|
317
|
+
// Secondary text on a coloured or muted card steps to the nearest neutral
|
|
318
|
+
// stop that reads at 4.5:1 on that fill.
|
|
309
319
|
card: {
|
|
310
320
|
base: {
|
|
311
321
|
borderRadius: 'var(--radius-page)',
|
|
312
322
|
padding: 'var(--spacing-3)',
|
|
313
323
|
},
|
|
324
|
+
'variant:blue': {
|
|
325
|
+
'--color-text-secondary': `light-dark(${neutral.light[20]}, ${neutral.dark[70]})`,
|
|
326
|
+
},
|
|
327
|
+
'variant:cyan': {
|
|
328
|
+
'--color-text-secondary': `light-dark(${neutral.light[25]}, ${neutral.dark[70]})`,
|
|
329
|
+
},
|
|
330
|
+
'variant:gray': {
|
|
331
|
+
'--color-text-secondary': `light-dark(${neutral.light[25]}, ${neutral.dark[70]})`,
|
|
332
|
+
},
|
|
333
|
+
'variant:green': {
|
|
334
|
+
'--color-text-secondary': `light-dark(${neutral.light[25]}, ${neutral.dark[75]})`,
|
|
335
|
+
},
|
|
336
|
+
'variant:orange': {
|
|
337
|
+
'--color-text-secondary': `light-dark(${neutral.light[25]}, ${neutral.dark[70]})`,
|
|
338
|
+
},
|
|
339
|
+
'variant:pink': {
|
|
340
|
+
'--color-text-secondary': `light-dark(${neutral.light[25]}, ${neutral.dark[70]})`,
|
|
341
|
+
},
|
|
342
|
+
'variant:purple': {
|
|
343
|
+
'--color-text-secondary': `light-dark(${neutral.light[20]}, ${neutral.dark[70]})`,
|
|
344
|
+
},
|
|
345
|
+
'variant:red': {
|
|
346
|
+
'--color-text-secondary': `light-dark(${neutral.light[20]}, ${neutral.dark[70]})`,
|
|
347
|
+
},
|
|
348
|
+
'variant:teal': {
|
|
349
|
+
'--color-text-secondary': `light-dark(${neutral.light[20]}, ${neutral.dark[75]})`,
|
|
350
|
+
},
|
|
351
|
+
'variant:yellow': {
|
|
352
|
+
'--color-text-secondary': `light-dark(${neutral.light[25]}, ${neutral.dark[75]})`,
|
|
353
|
+
},
|
|
354
|
+
'variant:muted': {
|
|
355
|
+
'--color-text-primary': `light-dark(${neutral.light[20]}, ${neutral.dark[80]})`,
|
|
356
|
+
'--color-text-secondary': `light-dark(${neutral.light[30]}, ${neutral.dark[80]})`,
|
|
357
|
+
},
|
|
314
358
|
},
|
|
315
359
|
section: {
|
|
316
360
|
base: {
|
package/src/source.ts
CHANGED
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Meta Platforms, Inc.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|