@interstellarforge/matter-css 0.0.0-stage → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Interstellarforge
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.
@@ -0,0 +1 @@
1
+ export declare const themeInitScript: string;
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export const themeInitScript = "(function(){try{var e=document.documentElement,s=localStorage;['theme','color-mode','density'].forEach(function(k){var v=s.getItem('matter-'+k);if(v)e.setAttribute('data-'+k,v)})}catch(_){}})();";
@@ -0,0 +1,1071 @@
1
+ /* Generated by @interstellarforge/matter-tokens. Do not edit. */
2
+ @layer matter.reset, matter.tokens, matter.base, matter.components;
3
+ @layer matter.tokens {
4
+ :root {
5
+ --m-duration-base: 0.15s;
6
+ --m-duration-fast: 0.12s;
7
+ --m-duration-slow: 0.22s;
8
+ --m-ease: cubic-bezier(0.2, 0.7, 0.25, 1);
9
+ --m-font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
10
+ --m-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
11
+ --m-fs-2xl: 28px;
12
+ --m-fs-base: 15px;
13
+ --m-fs-lg: 17px;
14
+ --m-fs-md: 14px;
15
+ --m-fs-sm: 12px;
16
+ --m-fs-xl: 22px;
17
+ --m-fs-xs: 11px;
18
+ --m-fw-bold: 700;
19
+ --m-fw-medium: 500;
20
+ --m-fw-regular: 400;
21
+ --m-fw-semibold: 600;
22
+ --m-lh-normal: 1.45;
23
+ --m-lh-relaxed: 1.6;
24
+ --m-lh-tight: 1.2;
25
+ --m-radius-lg: 16px;
26
+ --m-radius-md: 12px;
27
+ --m-radius-pill: 9999px;
28
+ --m-radius-sm: 8px;
29
+ --m-radius-xl: 22px;
30
+ --m-radius-xs: 5px;
31
+ --m-space-0: 0px;
32
+ --m-space-1: 4px;
33
+ --m-space-10: 40px;
34
+ --m-space-12: 48px;
35
+ --m-space-2: 8px;
36
+ --m-space-3: 12px;
37
+ --m-space-4: 16px;
38
+ --m-space-5: 20px;
39
+ --m-space-6: 24px;
40
+ --m-space-8: 32px;
41
+ }
42
+ :root,
43
+ [data-density="comfortable"] {
44
+ --m-control-fs: 14px;
45
+ --m-control-gap: 12px;
46
+ --m-control-h: 36px;
47
+ --m-control-pad-x: 14px;
48
+ --m-row-h: 48px;
49
+ }
50
+ [data-density="compact"] {
51
+ --m-control-fs: 12px;
52
+ --m-control-gap: 8px;
53
+ --m-control-h: 28px;
54
+ --m-control-pad-x: 10px;
55
+ --m-row-h: 36px;
56
+ }
57
+ [data-density="touch"] {
58
+ --m-control-fs: 17px;
59
+ --m-control-gap: 16px;
60
+ --m-control-h: 48px;
61
+ --m-control-pad-x: 20px;
62
+ --m-row-h: 64px;
63
+ }
64
+ :root[data-theme="deep-space"],
65
+ :root:not([data-theme]) {
66
+ color-scheme: light;
67
+ --m-control-radius: 8px;
68
+ --m-accent: #165dba;
69
+ --m-accent-hover: #0e4e9e;
70
+ --m-accent-on: #ffffff;
71
+ --m-accent-soft: #e1edff;
72
+ --m-accent-soft-on: #164c9c;
73
+ --m-bg: #f3f6fb;
74
+ --m-border: #cdd9e8;
75
+ --m-border-strong: #98acc4;
76
+ --m-danger: #b22342;
77
+ --m-danger-soft: #fce8ed;
78
+ --m-focus: #165dba;
79
+ --m-focus-halo: #ffffff;
80
+ --m-info: #155bad;
81
+ --m-info-soft: #e2efff;
82
+ --m-overlay: rgba(7, 16, 32, 0.54);
83
+ --m-placeholder: #62758f;
84
+ --m-primary: #165dba;
85
+ --m-primary-hover: #0e4e9e;
86
+ --m-primary-on: #ffffff;
87
+ --m-shadow-lg: 0px 24px 64px 0px rgb(3.53% 9.41% 20% / 0.18);
88
+ --m-shadow-md: 0px 8px 28px 0px rgb(5.49% 14.51% 29.41% / 0.1);
89
+ --m-shadow-sm: 0px 1px 3px 0px rgb(4.31% 12.94% 25.1% / 0.07);
90
+ --m-sidebar: #ffffff;
91
+ --m-success: #086f50;
92
+ --m-success-soft: #ddf6eb;
93
+ --m-surface: #ffffff;
94
+ --m-surface-disabled: #ebeff6;
95
+ --m-surface-hover: #e3edf9;
96
+ --m-surface-raised: #ffffff;
97
+ --m-surface-soft: #eaf1fa;
98
+ --m-text: #11243e;
99
+ --m-text-muted: #435b78;
100
+ --m-text-subtle: #536b87;
101
+ --m-warning: #865200;
102
+ --m-warning-soft: #fff0d6;
103
+ }
104
+ @media (prefers-color-scheme: dark) {
105
+ :root[data-theme="deep-space"]:not([data-color-mode="light"]),
106
+ :root:not([data-theme]):not([data-color-mode="light"]) {
107
+ color-scheme: dark;
108
+ --m-accent: #5aa9ff;
109
+ --m-accent-hover: #82bbff;
110
+ --m-accent-on: #04152b;
111
+ --m-accent-soft: #12335c;
112
+ --m-accent-soft-on: #cfe4ff;
113
+ --m-bg: #060e1d;
114
+ --m-border: #2a4662;
115
+ --m-border-strong: #4c6a8b;
116
+ --m-danger: #ff8da0;
117
+ --m-danger-soft: #4a1d2c;
118
+ --m-focus: #8fc4ff;
119
+ --m-focus-halo: #060e1d;
120
+ --m-info: #8fc4ff;
121
+ --m-info-soft: #12335c;
122
+ --m-overlay: rgba(0, 5, 13, 0.72);
123
+ --m-placeholder: #9fb3ca;
124
+ --m-primary: #1b6fd9;
125
+ --m-primary-hover: #2a82f0;
126
+ --m-primary-on: #ffffff;
127
+ --m-shadow-lg: 0px 24px 66px 0px rgb(0% 0% 0% / 0.55);
128
+ --m-shadow-md: 0px 12px 32px 0px rgb(0% 0% 0% / 0.32);
129
+ --m-shadow-sm: 0px 1px 2px 0px rgb(0% 0% 0% / 0.3);
130
+ --m-sidebar: #071322;
131
+ --m-success: #3fe0b0;
132
+ --m-success-soft: #0f3a35;
133
+ --m-surface: #0d1c30;
134
+ --m-surface-disabled: #14233a;
135
+ --m-surface-hover: #17304d;
136
+ --m-surface-raised: #13263d;
137
+ --m-surface-soft: #112238;
138
+ --m-text: #f4f7fc;
139
+ --m-text-muted: #b7c7d9;
140
+ --m-text-subtle: #9fb3ca;
141
+ --m-warning: #ffa24d;
142
+ --m-warning-soft: #3a2812;
143
+ }
144
+ }
145
+ :root[data-theme="deep-space"][data-color-mode="light"],
146
+ :root:not([data-theme])[data-color-mode="light"] {
147
+ color-scheme: light;
148
+ --m-accent: #165dba;
149
+ --m-accent-hover: #0e4e9e;
150
+ --m-accent-on: #ffffff;
151
+ --m-accent-soft: #e1edff;
152
+ --m-accent-soft-on: #164c9c;
153
+ --m-bg: #f3f6fb;
154
+ --m-border: #cdd9e8;
155
+ --m-border-strong: #98acc4;
156
+ --m-danger: #b22342;
157
+ --m-danger-soft: #fce8ed;
158
+ --m-focus: #165dba;
159
+ --m-focus-halo: #ffffff;
160
+ --m-info: #155bad;
161
+ --m-info-soft: #e2efff;
162
+ --m-overlay: rgba(7, 16, 32, 0.54);
163
+ --m-placeholder: #62758f;
164
+ --m-primary: #165dba;
165
+ --m-primary-hover: #0e4e9e;
166
+ --m-primary-on: #ffffff;
167
+ --m-shadow-lg: 0px 24px 64px 0px rgb(3.53% 9.41% 20% / 0.18);
168
+ --m-shadow-md: 0px 8px 28px 0px rgb(5.49% 14.51% 29.41% / 0.1);
169
+ --m-shadow-sm: 0px 1px 3px 0px rgb(4.31% 12.94% 25.1% / 0.07);
170
+ --m-sidebar: #ffffff;
171
+ --m-success: #086f50;
172
+ --m-success-soft: #ddf6eb;
173
+ --m-surface: #ffffff;
174
+ --m-surface-disabled: #ebeff6;
175
+ --m-surface-hover: #e3edf9;
176
+ --m-surface-raised: #ffffff;
177
+ --m-surface-soft: #eaf1fa;
178
+ --m-text: #11243e;
179
+ --m-text-muted: #435b78;
180
+ --m-text-subtle: #536b87;
181
+ --m-warning: #865200;
182
+ --m-warning-soft: #fff0d6;
183
+ }
184
+ :root[data-theme="deep-space"][data-color-mode="dark"],
185
+ :root:not([data-theme])[data-color-mode="dark"] {
186
+ color-scheme: dark;
187
+ --m-accent: #5aa9ff;
188
+ --m-accent-hover: #82bbff;
189
+ --m-accent-on: #04152b;
190
+ --m-accent-soft: #12335c;
191
+ --m-accent-soft-on: #cfe4ff;
192
+ --m-bg: #060e1d;
193
+ --m-border: #2a4662;
194
+ --m-border-strong: #4c6a8b;
195
+ --m-danger: #ff8da0;
196
+ --m-danger-soft: #4a1d2c;
197
+ --m-focus: #8fc4ff;
198
+ --m-focus-halo: #060e1d;
199
+ --m-info: #8fc4ff;
200
+ --m-info-soft: #12335c;
201
+ --m-overlay: rgba(0, 5, 13, 0.72);
202
+ --m-placeholder: #9fb3ca;
203
+ --m-primary: #1b6fd9;
204
+ --m-primary-hover: #2a82f0;
205
+ --m-primary-on: #ffffff;
206
+ --m-shadow-lg: 0px 24px 66px 0px rgb(0% 0% 0% / 0.55);
207
+ --m-shadow-md: 0px 12px 32px 0px rgb(0% 0% 0% / 0.32);
208
+ --m-shadow-sm: 0px 1px 2px 0px rgb(0% 0% 0% / 0.3);
209
+ --m-sidebar: #071322;
210
+ --m-success: #3fe0b0;
211
+ --m-success-soft: #0f3a35;
212
+ --m-surface: #0d1c30;
213
+ --m-surface-disabled: #14233a;
214
+ --m-surface-hover: #17304d;
215
+ --m-surface-raised: #13263d;
216
+ --m-surface-soft: #112238;
217
+ --m-text: #f4f7fc;
218
+ --m-text-muted: #b7c7d9;
219
+ --m-text-subtle: #9fb3ca;
220
+ --m-warning: #ffa24d;
221
+ --m-warning-soft: #3a2812;
222
+ }
223
+ :root[data-theme="professional"] {
224
+ color-scheme: light;
225
+ --m-control-radius: 12px;
226
+ --m-accent: #165dba;
227
+ --m-accent-hover: #0e4e9e;
228
+ --m-accent-on: #ffffff;
229
+ --m-accent-soft: #e1edff;
230
+ --m-accent-soft-on: #164c9c;
231
+ --m-bg: #f3f6fb;
232
+ --m-border: #cdd9e8;
233
+ --m-border-strong: #98acc4;
234
+ --m-danger: #b22342;
235
+ --m-danger-soft: #fce8ed;
236
+ --m-focus: #165dba;
237
+ --m-focus-halo: #ffffff;
238
+ --m-info: #155bad;
239
+ --m-info-soft: #e2efff;
240
+ --m-overlay: rgba(7, 16, 32, 0.54);
241
+ --m-placeholder: #62758f;
242
+ --m-primary: #165dba;
243
+ --m-primary-hover: #0e4e9e;
244
+ --m-primary-on: #ffffff;
245
+ --m-shadow-lg: 0px 24px 64px 0px rgb(3.53% 9.41% 20% / 0.18);
246
+ --m-shadow-md: 0px 8px 28px 0px rgb(5.49% 14.51% 29.41% / 0.1);
247
+ --m-shadow-sm: 0px 1px 3px 0px rgb(4.31% 12.94% 25.1% / 0.07);
248
+ --m-sidebar: #ffffff;
249
+ --m-success: #086f50;
250
+ --m-success-soft: #ddf6eb;
251
+ --m-surface: #ffffff;
252
+ --m-surface-disabled: #ebeff6;
253
+ --m-surface-hover: #e3edf9;
254
+ --m-surface-raised: #ffffff;
255
+ --m-surface-soft: #eaf1fa;
256
+ --m-text: #11243e;
257
+ --m-text-muted: #435b78;
258
+ --m-text-subtle: #536b87;
259
+ --m-warning: #865200;
260
+ --m-warning-soft: #fff0d6;
261
+ }
262
+ @media (prefers-color-scheme: dark) {
263
+ :root[data-theme="professional"]:not([data-color-mode="light"]) {
264
+ color-scheme: dark;
265
+ --m-accent: #5aa9ff;
266
+ --m-accent-hover: #82bbff;
267
+ --m-accent-on: #04152b;
268
+ --m-accent-soft: #12335c;
269
+ --m-accent-soft-on: #cfe4ff;
270
+ --m-bg: #060e1d;
271
+ --m-border: #2a4662;
272
+ --m-border-strong: #4c6a8b;
273
+ --m-danger: #ff8da0;
274
+ --m-danger-soft: #4a1d2c;
275
+ --m-focus: #8fc4ff;
276
+ --m-focus-halo: #060e1d;
277
+ --m-info: #8fc4ff;
278
+ --m-info-soft: #12335c;
279
+ --m-overlay: rgba(0, 5, 13, 0.72);
280
+ --m-placeholder: #9fb3ca;
281
+ --m-primary: #1b6fd9;
282
+ --m-primary-hover: #2a82f0;
283
+ --m-primary-on: #ffffff;
284
+ --m-shadow-lg: 0px 24px 66px 0px rgb(0% 0% 0% / 0.55);
285
+ --m-shadow-md: 0px 12px 32px 0px rgb(0% 0% 0% / 0.32);
286
+ --m-shadow-sm: 0px 1px 2px 0px rgb(0% 0% 0% / 0.3);
287
+ --m-sidebar: #071322;
288
+ --m-success: #3fe0b0;
289
+ --m-success-soft: #0f3a35;
290
+ --m-surface: #0d1c30;
291
+ --m-surface-disabled: #14233a;
292
+ --m-surface-hover: #17304d;
293
+ --m-surface-raised: #13263d;
294
+ --m-surface-soft: #112238;
295
+ --m-text: #f4f7fc;
296
+ --m-text-muted: #b7c7d9;
297
+ --m-text-subtle: #9fb3ca;
298
+ --m-warning: #ffa24d;
299
+ --m-warning-soft: #3a2812;
300
+ }
301
+ }
302
+ :root[data-theme="professional"][data-color-mode="light"] {
303
+ color-scheme: light;
304
+ --m-accent: #165dba;
305
+ --m-accent-hover: #0e4e9e;
306
+ --m-accent-on: #ffffff;
307
+ --m-accent-soft: #e1edff;
308
+ --m-accent-soft-on: #164c9c;
309
+ --m-bg: #f3f6fb;
310
+ --m-border: #cdd9e8;
311
+ --m-border-strong: #98acc4;
312
+ --m-danger: #b22342;
313
+ --m-danger-soft: #fce8ed;
314
+ --m-focus: #165dba;
315
+ --m-focus-halo: #ffffff;
316
+ --m-info: #155bad;
317
+ --m-info-soft: #e2efff;
318
+ --m-overlay: rgba(7, 16, 32, 0.54);
319
+ --m-placeholder: #62758f;
320
+ --m-primary: #165dba;
321
+ --m-primary-hover: #0e4e9e;
322
+ --m-primary-on: #ffffff;
323
+ --m-shadow-lg: 0px 24px 64px 0px rgb(3.53% 9.41% 20% / 0.18);
324
+ --m-shadow-md: 0px 8px 28px 0px rgb(5.49% 14.51% 29.41% / 0.1);
325
+ --m-shadow-sm: 0px 1px 3px 0px rgb(4.31% 12.94% 25.1% / 0.07);
326
+ --m-sidebar: #ffffff;
327
+ --m-success: #086f50;
328
+ --m-success-soft: #ddf6eb;
329
+ --m-surface: #ffffff;
330
+ --m-surface-disabled: #ebeff6;
331
+ --m-surface-hover: #e3edf9;
332
+ --m-surface-raised: #ffffff;
333
+ --m-surface-soft: #eaf1fa;
334
+ --m-text: #11243e;
335
+ --m-text-muted: #435b78;
336
+ --m-text-subtle: #536b87;
337
+ --m-warning: #865200;
338
+ --m-warning-soft: #fff0d6;
339
+ }
340
+ :root[data-theme="professional"][data-color-mode="dark"] {
341
+ color-scheme: dark;
342
+ --m-accent: #5aa9ff;
343
+ --m-accent-hover: #82bbff;
344
+ --m-accent-on: #04152b;
345
+ --m-accent-soft: #12335c;
346
+ --m-accent-soft-on: #cfe4ff;
347
+ --m-bg: #060e1d;
348
+ --m-border: #2a4662;
349
+ --m-border-strong: #4c6a8b;
350
+ --m-danger: #ff8da0;
351
+ --m-danger-soft: #4a1d2c;
352
+ --m-focus: #8fc4ff;
353
+ --m-focus-halo: #060e1d;
354
+ --m-info: #8fc4ff;
355
+ --m-info-soft: #12335c;
356
+ --m-overlay: rgba(0, 5, 13, 0.72);
357
+ --m-placeholder: #9fb3ca;
358
+ --m-primary: #1b6fd9;
359
+ --m-primary-hover: #2a82f0;
360
+ --m-primary-on: #ffffff;
361
+ --m-shadow-lg: 0px 24px 66px 0px rgb(0% 0% 0% / 0.55);
362
+ --m-shadow-md: 0px 12px 32px 0px rgb(0% 0% 0% / 0.32);
363
+ --m-shadow-sm: 0px 1px 2px 0px rgb(0% 0% 0% / 0.3);
364
+ --m-sidebar: #071322;
365
+ --m-success: #3fe0b0;
366
+ --m-success-soft: #0f3a35;
367
+ --m-surface: #0d1c30;
368
+ --m-surface-disabled: #14233a;
369
+ --m-surface-hover: #17304d;
370
+ --m-surface-raised: #13263d;
371
+ --m-surface-soft: #112238;
372
+ --m-text: #f4f7fc;
373
+ --m-text-muted: #b7c7d9;
374
+ --m-text-subtle: #9fb3ca;
375
+ --m-warning: #ffa24d;
376
+ --m-warning-soft: #3a2812;
377
+ }
378
+ :root[data-theme="pulsar"] {
379
+ color-scheme: light;
380
+ --m-control-radius: 12px;
381
+ --m-accent: #613ce3;
382
+ --m-accent-hover: #4f2cc8;
383
+ --m-accent-on: #ffffff;
384
+ --m-accent-soft: #ece8fc;
385
+ --m-accent-soft-on: #4a28b4;
386
+ --m-bg: #f8f8fc;
387
+ --m-border: #ddd9ee;
388
+ --m-border-strong: #8f85b8;
389
+ --m-danger: #b22342;
390
+ --m-danger-soft: #fce8ed;
391
+ --m-focus: #613ce3;
392
+ --m-focus-halo: #ffffff;
393
+ --m-info: #155bad;
394
+ --m-info-soft: #e2efff;
395
+ --m-overlay: rgba(26, 24, 53, 0.54);
396
+ --m-placeholder: #766d92;
397
+ --m-primary: #613ce3;
398
+ --m-primary-hover: #4f2cc8;
399
+ --m-primary-on: #ffffff;
400
+ --m-shadow-lg: 0px 24px 64px 0px rgb(10.2% 9.41% 20.78% / 0.18);
401
+ --m-shadow-md: 0px 8px 28px 0px rgb(10.2% 9.41% 20.78% / 0.1);
402
+ --m-shadow-sm: 0px 1px 3px 0px rgb(10.2% 9.41% 20.78% / 0.07);
403
+ --m-sidebar: #fcfcfd;
404
+ --m-success: #086f50;
405
+ --m-success-soft: #ddf6eb;
406
+ --m-surface: #fcfcfd;
407
+ --m-surface-disabled: #eeedf5;
408
+ --m-surface-hover: #e8e5f7;
409
+ --m-surface-raised: #ffffff;
410
+ --m-surface-soft: #f1f0f9;
411
+ --m-text: #1a1835;
412
+ --m-text-muted: #574e71;
413
+ --m-text-subtle: #625a7d;
414
+ --m-warning: #865200;
415
+ --m-warning-soft: #fff0d6;
416
+ }
417
+ @media (prefers-color-scheme: dark) {
418
+ :root[data-theme="pulsar"]:not([data-color-mode="light"]) {
419
+ color-scheme: dark;
420
+ --m-accent: #5aa9ff;
421
+ --m-accent-hover: #82bbff;
422
+ --m-accent-on: #04152b;
423
+ --m-accent-soft: #12335c;
424
+ --m-accent-soft-on: #cfe4ff;
425
+ --m-bg: #060e1d;
426
+ --m-border: #2a4662;
427
+ --m-border-strong: #4c6a8b;
428
+ --m-danger: #ff8da0;
429
+ --m-danger-soft: #4a1d2c;
430
+ --m-focus: #8fc4ff;
431
+ --m-focus-halo: #060e1d;
432
+ --m-info: #8fc4ff;
433
+ --m-info-soft: #12335c;
434
+ --m-overlay: rgba(0, 5, 13, 0.72);
435
+ --m-placeholder: #9fb3ca;
436
+ --m-primary: #1b6fd9;
437
+ --m-primary-hover: #2a82f0;
438
+ --m-primary-on: #ffffff;
439
+ --m-shadow-lg: 0px 24px 66px 0px rgb(0% 0% 0% / 0.55);
440
+ --m-shadow-md: 0px 12px 32px 0px rgb(0% 0% 0% / 0.32);
441
+ --m-shadow-sm: 0px 1px 2px 0px rgb(0% 0% 0% / 0.3);
442
+ --m-sidebar: #071322;
443
+ --m-success: #3fe0b0;
444
+ --m-success-soft: #0f3a35;
445
+ --m-surface: #0d1c30;
446
+ --m-surface-disabled: #14233a;
447
+ --m-surface-hover: #17304d;
448
+ --m-surface-raised: #13263d;
449
+ --m-surface-soft: #112238;
450
+ --m-text: #f4f7fc;
451
+ --m-text-muted: #b7c7d9;
452
+ --m-text-subtle: #9fb3ca;
453
+ --m-warning: #ffa24d;
454
+ --m-warning-soft: #3a2812;
455
+ }
456
+ }
457
+ :root[data-theme="pulsar"][data-color-mode="light"] {
458
+ color-scheme: light;
459
+ --m-accent: #613ce3;
460
+ --m-accent-hover: #4f2cc8;
461
+ --m-accent-on: #ffffff;
462
+ --m-accent-soft: #ece8fc;
463
+ --m-accent-soft-on: #4a28b4;
464
+ --m-bg: #f8f8fc;
465
+ --m-border: #ddd9ee;
466
+ --m-border-strong: #8f85b8;
467
+ --m-danger: #b22342;
468
+ --m-danger-soft: #fce8ed;
469
+ --m-focus: #613ce3;
470
+ --m-focus-halo: #ffffff;
471
+ --m-info: #155bad;
472
+ --m-info-soft: #e2efff;
473
+ --m-overlay: rgba(26, 24, 53, 0.54);
474
+ --m-placeholder: #766d92;
475
+ --m-primary: #613ce3;
476
+ --m-primary-hover: #4f2cc8;
477
+ --m-primary-on: #ffffff;
478
+ --m-shadow-lg: 0px 24px 64px 0px rgb(10.2% 9.41% 20.78% / 0.18);
479
+ --m-shadow-md: 0px 8px 28px 0px rgb(10.2% 9.41% 20.78% / 0.1);
480
+ --m-shadow-sm: 0px 1px 3px 0px rgb(10.2% 9.41% 20.78% / 0.07);
481
+ --m-sidebar: #fcfcfd;
482
+ --m-success: #086f50;
483
+ --m-success-soft: #ddf6eb;
484
+ --m-surface: #fcfcfd;
485
+ --m-surface-disabled: #eeedf5;
486
+ --m-surface-hover: #e8e5f7;
487
+ --m-surface-raised: #ffffff;
488
+ --m-surface-soft: #f1f0f9;
489
+ --m-text: #1a1835;
490
+ --m-text-muted: #574e71;
491
+ --m-text-subtle: #625a7d;
492
+ --m-warning: #865200;
493
+ --m-warning-soft: #fff0d6;
494
+ }
495
+ :root[data-theme="pulsar"][data-color-mode="dark"] {
496
+ color-scheme: dark;
497
+ --m-accent: #5aa9ff;
498
+ --m-accent-hover: #82bbff;
499
+ --m-accent-on: #04152b;
500
+ --m-accent-soft: #12335c;
501
+ --m-accent-soft-on: #cfe4ff;
502
+ --m-bg: #060e1d;
503
+ --m-border: #2a4662;
504
+ --m-border-strong: #4c6a8b;
505
+ --m-danger: #ff8da0;
506
+ --m-danger-soft: #4a1d2c;
507
+ --m-focus: #8fc4ff;
508
+ --m-focus-halo: #060e1d;
509
+ --m-info: #8fc4ff;
510
+ --m-info-soft: #12335c;
511
+ --m-overlay: rgba(0, 5, 13, 0.72);
512
+ --m-placeholder: #9fb3ca;
513
+ --m-primary: #1b6fd9;
514
+ --m-primary-hover: #2a82f0;
515
+ --m-primary-on: #ffffff;
516
+ --m-shadow-lg: 0px 24px 66px 0px rgb(0% 0% 0% / 0.55);
517
+ --m-shadow-md: 0px 12px 32px 0px rgb(0% 0% 0% / 0.32);
518
+ --m-shadow-sm: 0px 1px 2px 0px rgb(0% 0% 0% / 0.3);
519
+ --m-sidebar: #071322;
520
+ --m-success: #3fe0b0;
521
+ --m-success-soft: #0f3a35;
522
+ --m-surface: #0d1c30;
523
+ --m-surface-disabled: #14233a;
524
+ --m-surface-hover: #17304d;
525
+ --m-surface-raised: #13263d;
526
+ --m-surface-soft: #112238;
527
+ --m-text: #f4f7fc;
528
+ --m-text-muted: #b7c7d9;
529
+ --m-text-subtle: #9fb3ca;
530
+ --m-warning: #ffa24d;
531
+ --m-warning-soft: #3a2812;
532
+ }
533
+ }
534
+ @layer matter.components {
535
+ .m-button,
536
+ .m-input {
537
+ box-sizing: border-box;
538
+ min-height: var(--m-control-h);
539
+ border-radius: var(--m-control-radius);
540
+ font: inherit;
541
+ font-size: var(--m-control-fs);
542
+ }
543
+
544
+ /* Button */
545
+ .m-button {
546
+ display: inline-flex;
547
+ align-items: center;
548
+ justify-content: center;
549
+ gap: var(--m-control-gap);
550
+ padding: 0 var(--m-control-pad-x);
551
+ border: 1px solid var(--m-border-strong);
552
+ background: var(--m-surface-raised);
553
+ color: var(--m-text);
554
+ font-weight: var(--m-fw-semibold);
555
+ cursor: pointer;
556
+ transition:
557
+ background var(--m-duration-fast) var(--m-ease),
558
+ border-color var(--m-duration-fast) var(--m-ease);
559
+ }
560
+ .m-button:hover {
561
+ background: var(--m-surface-hover);
562
+ }
563
+ .m-button[data-variant="primary"] {
564
+ background: var(--m-primary);
565
+ border-color: transparent;
566
+ color: var(--m-primary-on);
567
+ }
568
+ .m-button[data-variant="primary"]:hover {
569
+ background: var(--m-primary-hover);
570
+ }
571
+ .m-button[data-variant="ghost"] {
572
+ background: transparent;
573
+ border-color: transparent;
574
+ color: var(--m-accent);
575
+ }
576
+ .m-button[data-variant="ghost"]:hover {
577
+ background: var(--m-accent-soft);
578
+ }
579
+ .m-button[data-variant="danger"] {
580
+ background: transparent;
581
+ border-color: var(--m-danger);
582
+ color: var(--m-danger);
583
+ }
584
+ .m-button[data-variant="danger"]:hover {
585
+ background: var(--m-danger-soft);
586
+ }
587
+ .m-button[data-size="sm"] {
588
+ min-height: calc(var(--m-control-h) - 8px);
589
+ }
590
+ .m-button[data-size="lg"] {
591
+ min-height: calc(var(--m-control-h) + 8px);
592
+ }
593
+ .m-button[data-icon-only] {
594
+ padding: 0;
595
+ min-width: var(--m-control-h);
596
+ }
597
+ .m-button:disabled,
598
+ .m-button[aria-disabled="true"] {
599
+ background: var(--m-surface-disabled);
600
+ border-color: var(--m-border);
601
+ color: var(--m-text-subtle);
602
+ cursor: not-allowed;
603
+ }
604
+ .m-button[aria-busy="true"] {
605
+ cursor: progress;
606
+ }
607
+
608
+ /* Input, Textarea, Select */
609
+ .m-input {
610
+ width: 100%;
611
+ padding: 0 var(--m-control-pad-x);
612
+ border: 1px solid var(--m-border-strong);
613
+ background: var(--m-surface);
614
+ color: var(--m-text);
615
+ }
616
+ .m-input::placeholder {
617
+ color: var(--m-placeholder);
618
+ }
619
+ .m-input:disabled {
620
+ background: var(--m-surface-disabled);
621
+ color: var(--m-text-subtle);
622
+ cursor: not-allowed;
623
+ }
624
+ .m-input[aria-invalid="true"] {
625
+ border-color: var(--m-danger);
626
+ }
627
+ /* Native select: own chevron so padding matches Input; the picker is styled where base-select is supported. */
628
+ .m-select {
629
+ appearance: none;
630
+ padding-inline-end: calc(var(--m-control-pad-x) * 2 + 8px);
631
+ background-image:
632
+ linear-gradient(45deg, transparent 50%, var(--m-text-muted) 50%),
633
+ linear-gradient(135deg, var(--m-text-muted) 50%, transparent 50%);
634
+ background-position:
635
+ calc(100% - var(--m-control-pad-x) - 5px) 50%,
636
+ calc(100% - var(--m-control-pad-x)) 50%;
637
+ background-size:
638
+ 5px 5px,
639
+ 5px 5px;
640
+ background-repeat: no-repeat;
641
+ cursor: pointer;
642
+ }
643
+ .m-select:disabled {
644
+ cursor: not-allowed;
645
+ }
646
+ @supports (appearance: base-select) {
647
+ .m-select,
648
+ .m-select::picker(select) {
649
+ appearance: base-select;
650
+ }
651
+ .m-select {
652
+ align-items: center;
653
+ }
654
+ .m-select::picker-icon {
655
+ display: none;
656
+ }
657
+ .m-select::picker(select) {
658
+ margin-block: var(--m-space-1);
659
+ padding: var(--m-space-1);
660
+ border: 1px solid var(--m-border);
661
+ border-radius: var(--m-radius-md);
662
+ background: var(--m-surface-raised);
663
+ box-shadow: var(--m-shadow-md);
664
+ }
665
+ .m-select option {
666
+ padding: var(--m-space-2) var(--m-control-pad-x);
667
+ border-radius: var(--m-radius-sm);
668
+ color: var(--m-text);
669
+ }
670
+ .m-select option:hover,
671
+ .m-select option:focus-visible {
672
+ background: var(--m-surface-hover);
673
+ }
674
+ .m-select option:checked {
675
+ background: var(--m-accent-soft);
676
+ color: var(--m-accent-soft-on);
677
+ }
678
+ .m-select option::checkmark {
679
+ display: none;
680
+ }
681
+ }
682
+ .m-textarea {
683
+ min-height: calc(var(--m-control-h) * 2.5);
684
+ padding-block: var(--m-space-2);
685
+ resize: vertical;
686
+ }
687
+
688
+ /* Checkbox */
689
+ .m-checkbox {
690
+ display: inline-flex;
691
+ align-items: center;
692
+ gap: var(--m-control-gap);
693
+ min-height: var(--m-control-h);
694
+ font-size: var(--m-control-fs);
695
+ color: var(--m-text);
696
+ }
697
+ .m-checkbox input {
698
+ inline-size: 1.15em;
699
+ block-size: 1.15em;
700
+ margin: 0;
701
+ accent-color: var(--m-accent);
702
+ }
703
+
704
+ /* Switch */
705
+ .m-switch {
706
+ position: relative;
707
+ flex: none;
708
+ inline-size: 2.75rem;
709
+ block-size: 1.5rem;
710
+ padding: 0;
711
+ border: 1px solid var(--m-border-strong);
712
+ border-radius: var(--m-radius-pill);
713
+ background: var(--m-surface-soft);
714
+ cursor: pointer;
715
+ transition: background var(--m-duration-fast) var(--m-ease);
716
+ }
717
+ .m-switch::after {
718
+ content: "";
719
+ position: absolute;
720
+ inset-block-start: 50%;
721
+ inset-inline-start: 3px;
722
+ inline-size: 1.05rem;
723
+ block-size: 1.05rem;
724
+ border-radius: 50%;
725
+ background: var(--m-text-muted);
726
+ transform: translateY(-50%);
727
+ transition: transform var(--m-duration-fast) var(--m-ease);
728
+ }
729
+ .m-switch[aria-checked="true"] {
730
+ background: var(--m-accent);
731
+ border-color: transparent;
732
+ }
733
+ .m-switch[aria-checked="true"]::after {
734
+ background: var(--m-accent-on);
735
+ transform: translate(1.25rem, -50%);
736
+ }
737
+ .m-switch:disabled {
738
+ background: var(--m-surface-disabled);
739
+ cursor: not-allowed;
740
+ }
741
+
742
+ /* Badge */
743
+ .m-badge {
744
+ display: inline-flex;
745
+ align-items: center;
746
+ padding: 0 var(--m-space-2);
747
+ min-height: 1.5em;
748
+ border-radius: var(--m-radius-pill);
749
+ background: var(--m-surface-soft);
750
+ color: var(--m-text-muted);
751
+ font-size: var(--m-fs-sm);
752
+ font-weight: var(--m-fw-semibold);
753
+ }
754
+ .m-badge[data-tone="accent"] {
755
+ background: var(--m-accent-soft);
756
+ color: var(--m-accent-soft-on);
757
+ }
758
+ .m-badge[data-tone="info"] {
759
+ background: var(--m-info-soft);
760
+ color: var(--m-info);
761
+ }
762
+ .m-badge[data-tone="success"] {
763
+ background: var(--m-success-soft);
764
+ color: var(--m-success);
765
+ }
766
+ .m-badge[data-tone="warning"] {
767
+ background: var(--m-warning-soft);
768
+ color: var(--m-warning);
769
+ }
770
+ .m-badge[data-tone="danger"] {
771
+ background: var(--m-danger-soft);
772
+ color: var(--m-danger);
773
+ }
774
+
775
+ /* Input with leading icon */
776
+ .m-input-icon {
777
+ position: relative;
778
+ display: block;
779
+ color: var(--m-text-subtle);
780
+ }
781
+ .m-input-icon > .m-icon {
782
+ position: absolute;
783
+ inset-block: 0;
784
+ inset-inline-start: var(--m-control-pad-x);
785
+ margin-block: auto;
786
+ pointer-events: none;
787
+ }
788
+ .m-input-icon > .m-input {
789
+ padding-inline-start: calc(
790
+ var(--m-control-pad-x) + 18px + var(--m-space-2)
791
+ );
792
+ }
793
+
794
+ /* Avatar */
795
+ .m-avatar {
796
+ --m-avatar-size: 2rem;
797
+ display: inline-flex;
798
+ flex: none;
799
+ align-items: center;
800
+ justify-content: center;
801
+ box-sizing: border-box;
802
+ inline-size: var(--m-avatar-size);
803
+ block-size: var(--m-avatar-size);
804
+ overflow: hidden;
805
+ border-radius: var(--m-radius-pill);
806
+ background: var(--m-accent-soft);
807
+ color: var(--m-accent-soft-on);
808
+ font-size: calc(var(--m-avatar-size) * 0.4);
809
+ font-weight: var(--m-fw-semibold);
810
+ text-transform: uppercase;
811
+ }
812
+ .m-avatar[data-size="sm"] {
813
+ --m-avatar-size: 1.5rem;
814
+ }
815
+ .m-avatar[data-size="lg"] {
816
+ --m-avatar-size: 3rem;
817
+ }
818
+ .m-avatar > img {
819
+ inline-size: 100%;
820
+ block-size: 100%;
821
+ object-fit: cover;
822
+ }
823
+
824
+ /* Banner */
825
+ .m-banner {
826
+ display: grid;
827
+ gap: var(--m-space-1);
828
+ padding: var(--m-space-3) var(--m-space-4);
829
+ border: 1px solid var(--m-border);
830
+ border-inline-start-width: 4px;
831
+ border-radius: var(--m-control-radius);
832
+ background: var(--m-surface-soft);
833
+ color: var(--m-text);
834
+ }
835
+ .m-banner__title {
836
+ font-weight: var(--m-fw-semibold);
837
+ }
838
+ .m-banner[data-tone="info"] {
839
+ border-color: var(--m-info);
840
+ background: var(--m-info-soft);
841
+ }
842
+ .m-banner[data-tone="success"] {
843
+ border-color: var(--m-success);
844
+ background: var(--m-success-soft);
845
+ }
846
+ .m-banner[data-tone="warning"] {
847
+ border-color: var(--m-warning);
848
+ background: var(--m-warning-soft);
849
+ }
850
+ .m-banner[data-tone="danger"] {
851
+ border-color: var(--m-danger);
852
+ background: var(--m-danger-soft);
853
+ }
854
+
855
+ /* Progress */
856
+ .m-progress {
857
+ inline-size: 100%;
858
+ block-size: 0.5rem;
859
+ overflow: hidden;
860
+ border-radius: var(--m-radius-pill);
861
+ background: var(--m-surface-soft);
862
+ }
863
+ .m-progress__bar {
864
+ block-size: 100%;
865
+ inline-size: var(--m-progress, 40%);
866
+ border-radius: inherit;
867
+ background: var(--m-accent);
868
+ transition: inline-size var(--m-duration-fast) var(--m-ease);
869
+ }
870
+ .m-progress:not([aria-valuenow]) .m-progress__bar {
871
+ animation: m-progress-indeterminate 1.4s var(--m-ease) infinite;
872
+ }
873
+ @keyframes m-progress-indeterminate {
874
+ from {
875
+ transform: translateX(-100%);
876
+ }
877
+ to {
878
+ transform: translateX(250%);
879
+ }
880
+ }
881
+
882
+ /* Empty state */
883
+ .m-empty {
884
+ display: grid;
885
+ justify-items: center;
886
+ gap: var(--m-space-2);
887
+ padding: var(--m-space-6);
888
+ text-align: center;
889
+ color: var(--m-text-muted);
890
+ }
891
+ .m-empty__title {
892
+ color: var(--m-text);
893
+ font-weight: var(--m-fw-semibold);
894
+ }
895
+
896
+ /* Card */
897
+ .m-card {
898
+ box-sizing: border-box;
899
+ border: 1px solid var(--m-border);
900
+ border-radius: calc(var(--m-control-radius) + 4px);
901
+ background: var(--m-surface);
902
+ color: var(--m-text);
903
+ box-shadow: var(--m-shadow-sm);
904
+ }
905
+ .m-card[data-padded] {
906
+ padding: var(--m-space-4);
907
+ }
908
+
909
+ /* Tabs */
910
+ .m-tablist {
911
+ display: flex;
912
+ gap: var(--m-space-1);
913
+ border-bottom: 1px solid var(--m-border);
914
+ }
915
+ .m-tab {
916
+ min-height: var(--m-control-h);
917
+ padding: 0 var(--m-control-pad-x);
918
+ border: 0;
919
+ border-bottom: 2px solid transparent;
920
+ background: transparent;
921
+ color: var(--m-text-muted);
922
+ font: inherit;
923
+ font-size: var(--m-control-fs);
924
+ cursor: pointer;
925
+ }
926
+ .m-tab[aria-selected="true"] {
927
+ border-bottom-color: var(--m-accent);
928
+ color: var(--m-text);
929
+ font-weight: var(--m-fw-semibold);
930
+ }
931
+ .m-tab:disabled {
932
+ color: var(--m-text-subtle);
933
+ cursor: not-allowed;
934
+ }
935
+ .m-tabpanel {
936
+ padding-block: var(--m-space-4);
937
+ }
938
+
939
+ /* Dialog */
940
+ .m-dialog {
941
+ inline-size: min(32rem, calc(100vw - 2rem));
942
+ padding: 0;
943
+ border: 1px solid var(--m-border);
944
+ border-radius: var(--m-radius-lg);
945
+ background: var(--m-surface-raised);
946
+ color: var(--m-text);
947
+ box-shadow: var(--m-shadow-lg);
948
+ }
949
+ .m-dialog::backdrop {
950
+ background: var(--m-overlay);
951
+ }
952
+ .m-dialog__header {
953
+ display: flex;
954
+ align-items: center;
955
+ justify-content: space-between;
956
+ gap: var(--m-space-4);
957
+ padding: var(--m-space-4) var(--m-space-4) 0 var(--m-space-5);
958
+ }
959
+ .m-dialog__title {
960
+ flex: 1;
961
+ margin: 0;
962
+ font-size: var(--m-fs-lg);
963
+ }
964
+ .m-dialog__body {
965
+ padding: var(--m-space-4) var(--m-space-5);
966
+ color: var(--m-text-muted);
967
+ }
968
+ .m-dialog__footer {
969
+ display: flex;
970
+ justify-content: flex-end;
971
+ gap: var(--m-space-2);
972
+ padding: 0 var(--m-space-5) var(--m-space-5);
973
+ }
974
+
975
+ /* Tooltip */
976
+ .m-tooltip-wrap {
977
+ position: relative;
978
+ display: inline-flex;
979
+ }
980
+ .m-tooltip {
981
+ position: absolute;
982
+ inset-block-end: calc(100% + 6px);
983
+ inset-inline-start: 50%;
984
+ z-index: 10;
985
+ padding: var(--m-space-1) var(--m-space-2);
986
+ border-radius: var(--m-radius-sm);
987
+ background: var(--m-text);
988
+ color: var(--m-bg);
989
+ font-size: var(--m-fs-sm);
990
+ white-space: nowrap;
991
+ transform: translateX(-50%);
992
+ }
993
+ .m-tooltip[hidden] {
994
+ display: none;
995
+ }
996
+
997
+ /* Menu */
998
+ .m-menu-wrap {
999
+ position: relative;
1000
+ display: inline-flex;
1001
+ }
1002
+ .m-menu {
1003
+ position: absolute;
1004
+ inset-block-start: calc(100% + 4px);
1005
+ inset-inline-start: 0;
1006
+ z-index: 10;
1007
+ display: flex;
1008
+ flex-direction: column;
1009
+ min-inline-size: 10rem;
1010
+ padding: var(--m-space-1);
1011
+ border: 1px solid var(--m-border);
1012
+ border-radius: var(--m-control-radius);
1013
+ background: var(--m-surface-raised);
1014
+ box-shadow: var(--m-shadow-md);
1015
+ }
1016
+ .m-menu[hidden] {
1017
+ display: none;
1018
+ }
1019
+ .m-menu__item {
1020
+ min-height: var(--m-control-h);
1021
+ padding: 0 var(--m-control-pad-x);
1022
+ border: 0;
1023
+ border-radius: var(--m-radius-xs);
1024
+ background: transparent;
1025
+ color: var(--m-text);
1026
+ font: inherit;
1027
+ font-size: var(--m-control-fs);
1028
+ text-align: start;
1029
+ cursor: pointer;
1030
+ }
1031
+ .m-menu__item:hover,
1032
+ .m-menu__item:focus-visible {
1033
+ background: var(--m-surface-hover);
1034
+ }
1035
+ .m-menu__item:disabled {
1036
+ color: var(--m-text-subtle);
1037
+ cursor: not-allowed;
1038
+ }
1039
+
1040
+ /* Icon */
1041
+ .m-icon {
1042
+ display: block;
1043
+ flex: none;
1044
+ }
1045
+
1046
+ /* Shared focus ring */
1047
+ :is(
1048
+ .m-button,
1049
+ .m-input,
1050
+ .m-checkbox input,
1051
+ .m-switch,
1052
+ .m-tab,
1053
+ .m-menu__item,
1054
+ .m-dialog
1055
+ ):focus-visible {
1056
+ outline: 2px solid var(--m-focus);
1057
+ outline-offset: 2px;
1058
+ }
1059
+
1060
+ @media (prefers-reduced-motion: reduce) {
1061
+ .m-progress__bar {
1062
+ transition: none;
1063
+ animation: none !important;
1064
+ }
1065
+ .m-button,
1066
+ .m-switch,
1067
+ .m-switch::after {
1068
+ transition: none;
1069
+ }
1070
+ }
1071
+ }
@@ -0,0 +1 @@
1
+ (function(){try{var e=document.documentElement,s=localStorage;['theme','color-mode','density'].forEach(function(k){var v=s.getItem('matter-'+k);if(v)e.setAttribute('data-'+k,v)})}catch(_){}})();
package/package.json CHANGED
@@ -1,6 +1,38 @@
1
1
  {
2
2
  "name": "@interstellarforge/matter-css",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "license": "MIT",
5
+ "description": "Matter CSS distribution: token stylesheet and the no-flash theme init script. Framework-agnostic.",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/interstellarforge/matter.git",
9
+ "directory": "packages/css"
10
+ },
11
+ "type": "module",
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "default": "./dist/index.js"
19
+ },
20
+ "./matter.css": "./dist/matter.css",
21
+ "./theme-init.js": "./dist/theme-init.js"
22
+ },
23
+ "publishConfig": {
24
+ "registry": "https://registry.npmjs.org/",
25
+ "access": "public",
26
+ "provenance": true
27
+ },
28
+ "dependencies": {
29
+ "@interstellarforge/matter-tokens": "0.2.0"
30
+ },
31
+ "devDependencies": {
32
+ "vitest": "4.1.6"
33
+ },
34
+ "scripts": {
35
+ "build": "node src/build.ts",
36
+ "test": "vitest run"
37
+ }
6
38
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.