@interstellarforge/matter-tokens 0.0.0-stage → 0.1.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.
package/README.md CHANGED
@@ -1,3 +1,37 @@
1
- # Temporary Holding Version
1
+ # @interstellarforge/matter-tokens
2
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.
3
+ Framework-agnostic design tokens for Matter. Source: [DTCG Format Module 2025.10](https://www.designtokens.org/tr/2025.10/format/) (Final Community Group Report), built with Style Dictionary 5.
4
+
5
+ ## Layers
6
+
7
+ | Layer | Where | Notes |
8
+ | --------- | ------------------------------------------ | -------------------------------------------------------------- |
9
+ | Primitive | `tokens/core.json` | space, radius, type scale, weights, line-height, fonts, motion |
10
+ | Semantic | `tokens/themes/<theme>/<light\|dark>.json` | colour roles and shadows; one file per theme and colour mode |
11
+ | Theme | `tokens/themes/<theme>/theme.json` | theme-wide values, e.g. `control-radius` |
12
+ | Density | `tokens/density/<name>.json` | control height, padding, gap, font size, row height |
13
+
14
+ Colour primitives are not a separate layer yet: themes hold their palette directly (ADR-006: simplicity before abstraction). Component tokens only when proven necessary.
15
+
16
+ ## Naming
17
+
18
+ CSS custom property: `--m-<path>`; the leading `color` group is dropped. `color.surface.raised` becomes `--m-surface-raised`, `space.4` becomes `--m-space-4`.
19
+
20
+ ## Switching
21
+
22
+ Attributes on `<html>`:
23
+
24
+ - `data-theme="deep-space|professional"` (default: `deep-space`)
25
+ - `data-color-mode="light|dark"` (default: OS preference; a theme without light mode uses its only mode)
26
+ - `data-density="compact|comfortable|touch"` (default: `comfortable`; may be set on any element)
27
+
28
+ Use `themeInitScript` from `@interstellarforge/matter-css` in `<head>` to apply stored values before first paint.
29
+
30
+ ## Adding a theme
31
+
32
+ 1. Create `tokens/themes/<name>/theme.json` plus at least one mode file with the same token names as the others.
33
+ 2. `pnpm build` fails when token sets differ or text contrast is below 4.5:1.
34
+
35
+ ## Scripts
36
+
37
+ `pnpm build` writes `dist/` (CSS, `index.js`/`index.d.ts`, `tokens.index.json`); `pnpm test` runs Vitest.
@@ -0,0 +1,12 @@
1
+ export type ThemeName = 'deep-space' | 'professional';
2
+ export type ColorMode = 'light' | 'dark';
3
+ export type Density = 'comfortable' | 'compact' | 'touch';
4
+ export type TokenName = 'accent' | 'accent-hover' | 'accent-on' | 'accent-soft' | 'accent-soft-on' | 'bg' | 'border' | 'border-strong' | 'control-fs' | 'control-gap' | 'control-h' | 'control-pad-x' | 'control-radius' | 'danger' | 'danger-soft' | 'duration-base' | 'duration-fast' | 'duration-slow' | 'ease' | 'focus' | 'focus-halo' | 'font-mono' | 'font-sans' | 'fs-2xl' | 'fs-base' | 'fs-lg' | 'fs-md' | 'fs-sm' | 'fs-xl' | 'fs-xs' | 'fw-bold' | 'fw-medium' | 'fw-regular' | 'fw-semibold' | 'info' | 'info-soft' | 'lh-normal' | 'lh-relaxed' | 'lh-tight' | 'overlay' | 'placeholder' | 'primary' | 'primary-hover' | 'primary-on' | 'radius-lg' | 'radius-md' | 'radius-pill' | 'radius-sm' | 'radius-xl' | 'radius-xs' | 'row-h' | 'shadow-lg' | 'shadow-md' | 'shadow-sm' | 'sidebar' | 'space-0' | 'space-1' | 'space-10' | 'space-12' | 'space-2' | 'space-3' | 'space-4' | 'space-5' | 'space-6' | 'space-8' | 'success' | 'success-soft' | 'surface' | 'surface-disabled' | 'surface-hover' | 'surface-raised' | 'surface-soft' | 'text' | 'text-muted' | 'text-subtle' | 'warning' | 'warning-soft';
5
+ export declare const themes: readonly ThemeName[];
6
+ export declare const colorModes: readonly ColorMode[];
7
+ export declare const densities: readonly Density[];
8
+ export declare const defaultTheme: ThemeName;
9
+ export declare const defaultDensity: Density;
10
+ export declare const modesByTheme: Readonly<Record<ThemeName, readonly ColorMode[]>>;
11
+ export declare const tokenNames: readonly TokenName[];
12
+ export declare function cssVar(name: TokenName): string;
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ export const themes = ['deep-space', 'professional'];
2
+ export const colorModes = ['light', 'dark'];
3
+ export const densities = ['comfortable', 'compact', 'touch'];
4
+ export const defaultTheme = 'deep-space';
5
+ export const defaultDensity = 'comfortable';
6
+ export const modesByTheme = {"deep-space":["light","dark"],"professional":["light","dark"]};
7
+ export const tokenNames = ['accent', 'accent-hover', 'accent-on', 'accent-soft', 'accent-soft-on', 'bg', 'border', 'border-strong', 'control-fs', 'control-gap', 'control-h', 'control-pad-x', 'control-radius', 'danger', 'danger-soft', 'duration-base', 'duration-fast', 'duration-slow', 'ease', 'focus', 'focus-halo', 'font-mono', 'font-sans', 'fs-2xl', 'fs-base', 'fs-lg', 'fs-md', 'fs-sm', 'fs-xl', 'fs-xs', 'fw-bold', 'fw-medium', 'fw-regular', 'fw-semibold', 'info', 'info-soft', 'lh-normal', 'lh-relaxed', 'lh-tight', 'overlay', 'placeholder', 'primary', 'primary-hover', 'primary-on', 'radius-lg', 'radius-md', 'radius-pill', 'radius-sm', 'radius-xl', 'radius-xs', 'row-h', 'shadow-lg', 'shadow-md', 'shadow-sm', 'sidebar', 'space-0', 'space-1', 'space-10', 'space-12', 'space-2', 'space-3', 'space-4', 'space-5', 'space-6', 'space-8', 'success', 'success-soft', 'surface', 'surface-disabled', 'surface-hover', 'surface-raised', 'surface-soft', 'text', 'text-muted', 'text-subtle', 'warning', 'warning-soft'];
8
+ export const cssVar = (name) => `var(--m-${name})`;
@@ -0,0 +1,378 @@
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
+ }
@@ -0,0 +1,103 @@
1
+ {
2
+ "prefix": "m",
3
+ "themes": [
4
+ "deep-space",
5
+ "professional"
6
+ ],
7
+ "modesByTheme": {
8
+ "deep-space": [
9
+ "light",
10
+ "dark"
11
+ ],
12
+ "professional": [
13
+ "light",
14
+ "dark"
15
+ ]
16
+ },
17
+ "densities": [
18
+ "comfortable",
19
+ "compact",
20
+ "touch"
21
+ ],
22
+ "defaultTheme": "deep-space",
23
+ "defaultDensity": "comfortable",
24
+ "tokenNames": [
25
+ "accent",
26
+ "accent-hover",
27
+ "accent-on",
28
+ "accent-soft",
29
+ "accent-soft-on",
30
+ "bg",
31
+ "border",
32
+ "border-strong",
33
+ "control-fs",
34
+ "control-gap",
35
+ "control-h",
36
+ "control-pad-x",
37
+ "control-radius",
38
+ "danger",
39
+ "danger-soft",
40
+ "duration-base",
41
+ "duration-fast",
42
+ "duration-slow",
43
+ "ease",
44
+ "focus",
45
+ "focus-halo",
46
+ "font-mono",
47
+ "font-sans",
48
+ "fs-2xl",
49
+ "fs-base",
50
+ "fs-lg",
51
+ "fs-md",
52
+ "fs-sm",
53
+ "fs-xl",
54
+ "fs-xs",
55
+ "fw-bold",
56
+ "fw-medium",
57
+ "fw-regular",
58
+ "fw-semibold",
59
+ "info",
60
+ "info-soft",
61
+ "lh-normal",
62
+ "lh-relaxed",
63
+ "lh-tight",
64
+ "overlay",
65
+ "placeholder",
66
+ "primary",
67
+ "primary-hover",
68
+ "primary-on",
69
+ "radius-lg",
70
+ "radius-md",
71
+ "radius-pill",
72
+ "radius-sm",
73
+ "radius-xl",
74
+ "radius-xs",
75
+ "row-h",
76
+ "shadow-lg",
77
+ "shadow-md",
78
+ "shadow-sm",
79
+ "sidebar",
80
+ "space-0",
81
+ "space-1",
82
+ "space-10",
83
+ "space-12",
84
+ "space-2",
85
+ "space-3",
86
+ "space-4",
87
+ "space-5",
88
+ "space-6",
89
+ "space-8",
90
+ "success",
91
+ "success-soft",
92
+ "surface",
93
+ "surface-disabled",
94
+ "surface-hover",
95
+ "surface-raised",
96
+ "surface-soft",
97
+ "text",
98
+ "text-muted",
99
+ "text-subtle",
100
+ "warning",
101
+ "warning-soft"
102
+ ]
103
+ }
package/package.json CHANGED
@@ -1,6 +1,38 @@
1
1
  {
2
2
  "name": "@interstellarforge/matter-tokens",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "description": "Matter design tokens (DTCG source, CSS and TypeScript output). Framework-agnostic.",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/interstellarforge/matter.git",
9
+ "directory": "packages/tokens"
10
+ },
11
+ "type": "module",
12
+ "files": [
13
+ "dist",
14
+ "tokens"
15
+ ],
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.js"
20
+ },
21
+ "./css": "./dist/matter-tokens.css",
22
+ "./index.json": "./dist/tokens.index.json",
23
+ "./tokens/*": "./tokens/*"
24
+ },
25
+ "publishConfig": {
26
+ "registry": "https://registry.npmjs.org/",
27
+ "access": "public",
28
+ "provenance": true
29
+ },
30
+ "devDependencies": {
31
+ "style-dictionary": "5.7.1",
32
+ "vitest": "4.1.6"
33
+ },
34
+ "scripts": {
35
+ "build": "node src/build.ts",
36
+ "test": "vitest run"
37
+ }
6
38
  }