@xenosystem/elements 0.0.9 → 0.0.11
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 +65 -65
- package/dist/elements/activity.d.ts +11 -0
- package/dist/elements/activity.js +22 -0
- package/dist/elements/alert-octagon.d.ts +13 -0
- package/dist/elements/alert-octagon.js +26 -0
- package/dist/elements/arrow-down.d.ts +10 -0
- package/dist/elements/arrow-down.js +21 -0
- package/dist/elements/arrow-left.d.ts +11 -0
- package/dist/elements/arrow-left.js +22 -0
- package/dist/elements/chevron-left.d.ts +10 -0
- package/dist/elements/chevron-left.js +21 -0
- package/dist/elements/chevrons-up-down.d.ts +11 -0
- package/dist/elements/chevrons-up-down.js +23 -0
- package/dist/elements/cloud-off.d.ts +12 -0
- package/dist/elements/cloud-off.js +24 -0
- package/dist/elements/contact.d.ts +12 -0
- package/dist/elements/contact.js +26 -0
- package/dist/elements/cpu.d.ts +13 -0
- package/dist/elements/cpu.js +29 -0
- package/dist/elements/external-link.d.ts +12 -0
- package/dist/elements/external-link.js +25 -0
- package/dist/elements/file-code.d.ts +11 -0
- package/dist/elements/file-code.js +25 -0
- package/dist/elements/file-pen.d.ts +11 -0
- package/dist/elements/file-pen.js +25 -0
- package/dist/elements/film.d.ts +11 -0
- package/dist/elements/film.js +25 -0
- package/dist/elements/flask.d.ts +12 -0
- package/dist/elements/flask.js +25 -0
- package/dist/elements/folder-plus.d.ts +11 -0
- package/dist/elements/folder-plus.js +23 -0
- package/dist/elements/git-compare.d.ts +12 -0
- package/dist/elements/git-compare.js +26 -0
- package/dist/elements/git-merge.d.ts +11 -0
- package/dist/elements/git-merge.js +25 -0
- package/dist/elements/hard-drive.d.ts +12 -0
- package/dist/elements/hard-drive.js +26 -0
- package/dist/elements/hash.d.ts +10 -0
- package/dist/elements/hash.js +22 -0
- package/dist/elements/inbox.d.ts +11 -0
- package/dist/elements/inbox.js +23 -0
- package/dist/elements/mail.d.ts +11 -0
- package/dist/elements/mail.js +23 -0
- package/dist/elements/move-to.d.ts +12 -0
- package/dist/elements/move-to.js +25 -0
- package/dist/elements/pin.d.ts +16 -0
- package/dist/elements/pin.js +42 -0
- package/dist/elements/repeat.d.ts +12 -0
- package/dist/elements/repeat.js +26 -0
- package/dist/elements/rocket.d.ts +12 -0
- package/dist/elements/rocket.js +27 -0
- package/dist/elements/server.d.ts +11 -0
- package/dist/elements/server.js +25 -0
- package/dist/elements/shield-x.d.ts +11 -0
- package/dist/elements/shield-x.js +24 -0
- package/dist/elements/shield.d.ts +11 -0
- package/dist/elements/shield.js +22 -0
- package/dist/elements/users.d.ts +12 -0
- package/dist/elements/users.js +26 -0
- package/dist/elements/webhook.d.ts +12 -0
- package/dist/elements/webhook.js +27 -0
- package/dist/tokens/dtcg.d.ts +74 -0
- package/dist/tokens/dtcg.js +136 -0
- package/dist/tokens/index.d.ts +3 -0
- package/dist/tokens/index.js +3 -0
- package/dist/tokens/oklch.d.ts +73 -0
- package/dist/tokens/oklch.js +206 -0
- package/dist/tokens/platform-theme.d.ts +71 -0
- package/dist/tokens/platform-theme.js +164 -0
- package/dist/tokens.dtcg.json +393 -0
- package/package.json +4 -2
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical XENO Platform 21-Stop Brightness Theme Engine & Mode Palette.
|
|
3
|
+
*
|
|
4
|
+
* Lifted directly from `xeno-platform`'s proven brightness line (`0` Dark → `50` Dim → `100` Light
|
|
5
|
+
* in 5% steps) into Rung 1 (`@xenosystem/elements/tokens`) so every XENO console (`compute`,
|
|
6
|
+
* `chat`, `storage`, `spawn`, `workflow`, `research`, and `xeno-platform` itself) shares ONE
|
|
7
|
+
* continuous theme engine with mathematically verified WCAG 2.2 AA contrast at every stop.
|
|
8
|
+
*/
|
|
9
|
+
/** Five-percent slider step producing 21 discrete semantic palettes (0..100). */
|
|
10
|
+
export const PLATFORM_BRIGHTNESS_STEP = 5;
|
|
11
|
+
export const PLATFORM_THEME_OPTIONS = [
|
|
12
|
+
{ id: 'dark', label: 'Dark', position: 0 },
|
|
13
|
+
{ id: 'dim', label: 'Dim', position: 50 },
|
|
14
|
+
{ id: 'light', label: 'Light', position: 100 },
|
|
15
|
+
];
|
|
16
|
+
const stop = (canvas, surface, elevated, control, controlStrong, text, muted, border, hover, overlay) => ({
|
|
17
|
+
canvas,
|
|
18
|
+
surface,
|
|
19
|
+
elevated,
|
|
20
|
+
control,
|
|
21
|
+
controlStrong,
|
|
22
|
+
text,
|
|
23
|
+
muted,
|
|
24
|
+
border,
|
|
25
|
+
hover,
|
|
26
|
+
overlay,
|
|
27
|
+
});
|
|
28
|
+
/** All 21 semantic palettes along the XENO Platform brightness line (0 = Dark, 50 = Dim, 100 = Light). */
|
|
29
|
+
export const PLATFORM_BRIGHTNESS_PALETTES = [
|
|
30
|
+
stop('#0a0a0a', '#171717', '#262626', '#1f1f1f', '#333333', '#fafafa', '#a3a3a3', '#242424', '#333333', '#171717'),
|
|
31
|
+
stop('#0c0c0d', '#19191a', '#282829', '#222224', '#38383a', '#fafafa', '#a4a4a4', '#272728', '#38383a', '#19191a'),
|
|
32
|
+
stop('#0e0e0f', '#1b1b1c', '#2a2a2b', '#252527', '#3c3c3e', '#fafafa', '#a6a6a6', '#2a2a2b', '#3c3c3e', '#1b1b1c'),
|
|
33
|
+
stop('#101011', '#1d1d1e', '#2c2c2d', '#28282a', '#404042', '#fafafa', '#a8a8a8', '#2d2d2e', '#404042', '#1d1d1e'),
|
|
34
|
+
stop('#121213', '#1f1f20', '#2e2e2f', '#2b2b2d', '#444446', '#fafafa', '#aaaaaa', '#303031', '#444446', '#1f1f20'),
|
|
35
|
+
stop('#141415', '#212122', '#303031', '#2e2e30', '#48484a', '#fafafa', '#acacac', '#333334', '#48484a', '#212122'),
|
|
36
|
+
stop('#161617', '#232324', '#323233', '#313133', '#4c4c4e', '#fafafa', '#aeaeae', '#363637', '#4c4c4e', '#232324'),
|
|
37
|
+
stop('#181819', '#252526', '#343435', '#343436', '#4e4e50', '#fafafa', '#b0b0b0', '#39393a', '#4e4e50', '#252526'),
|
|
38
|
+
stop('#1a1a1b', '#272728', '#363637', '#373739', '#505052', '#f8f8f8', '#b2b2b2', '#3c3c3d', '#505052', '#272728'),
|
|
39
|
+
stop('#1c1c1d', '#29292a', '#383839', '#3a3a3c', '#525254', '#f7f7f7', '#b4b4b4', '#3f3f40', '#525254', '#29292a'),
|
|
40
|
+
// Stop 10 (position 50) — canonical Dim
|
|
41
|
+
stop('#181a1e', '#24272c', '#30343a', '#2b2f36', '#424751', '#f4f5f7', '#aeb2b8', '#3c4047', '#424751', '#24272c'),
|
|
42
|
+
stop('#1b1d22', '#272a30', '#34383f', '#2f333b', '#474d57', '#f4f5f7', '#b2b6bd', '#41464e', '#474d57', '#272a30'),
|
|
43
|
+
stop('#1e2126', '#2b2e35', '#383c44', '#333740', '#4d535e', '#f5f6f8', '#b6bbc2', '#464b53', '#4d535e', '#2b2e35'),
|
|
44
|
+
stop('#21242a', '#2f333a', '#3c4149', '#373b44', '#525965', '#f5f6f8', '#bbc0c7', '#4b5059', '#525965', '#2f333a'),
|
|
45
|
+
stop('#25282e', '#33373f', '#41464f', '#3c414a', '#585f6b', '#f6f7f8', '#c0c5cc', '#505660', '#585f6b', '#33373f'),
|
|
46
|
+
stop('#282b31', '#383c44', '#464b55', '#414650', '#5e6672', '#f7f8fa', '#c5cad0', '#565d67', '#5e6672', '#383c44'),
|
|
47
|
+
stop('#30343b', '#41464d', '#505661', '#4a505b', '#676f7b', '#f8f9fa', '#d0d4d9', '#626a74', '#676f7b', '#41464d'),
|
|
48
|
+
stop('#3b4048', '#4b515b', '#5d6470', '#545b67', '#747c88', '#fafafa', '#e0e2e6', '#707782', '#747c88', '#4b515b'),
|
|
49
|
+
stop('#414956', '#4d5562', '#59616f', '#58606e', '#6f7988', '#fafafa', '#dfe4ec', '#59616f', '#6f7988', '#4d5562'),
|
|
50
|
+
stop('#d7d9dd', '#e1e3e6', '#eceef0', '#f1f2f3', '#f6f7f8', '#0a0a0a', '#4b4e54', '#c9ccd1', '#e8eaed', '#e1e3e6'),
|
|
51
|
+
// Stop 20 (position 100) — canonical Light
|
|
52
|
+
stop('#e9e6e1', '#f3f1ed', '#ffffff', '#f2f0ec', '#e4e1db', '#181716', '#5c5853', '#d6d2cb', '#e8e5df', '#ffffff'),
|
|
53
|
+
];
|
|
54
|
+
function relativeLuminance(hex) {
|
|
55
|
+
const channels = [1, 3, 5].map((idx) => parseInt(hex.slice(idx, idx + 2), 16) / 255);
|
|
56
|
+
const [r, g, b] = channels.map((c) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4));
|
|
57
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
58
|
+
}
|
|
59
|
+
export function platformContrastRatio(hexA, hexB) {
|
|
60
|
+
const l1 = relativeLuminance(hexA);
|
|
61
|
+
const l2 = relativeLuminance(hexB);
|
|
62
|
+
const lighter = Math.max(l1, l2);
|
|
63
|
+
const darker = Math.min(l1, l2);
|
|
64
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
65
|
+
}
|
|
66
|
+
function accessibleTextPair(ground, preferredText, preferredMuted) {
|
|
67
|
+
const light = '#fafafa';
|
|
68
|
+
const dark = '#0a0a0a';
|
|
69
|
+
const fallback = platformContrastRatio(light, ground) >= platformContrastRatio(dark, ground) ? light : dark;
|
|
70
|
+
const text = platformContrastRatio(preferredText, ground) >= 4.5 ? preferredText : fallback;
|
|
71
|
+
const muted = platformContrastRatio(preferredMuted, ground) >= 4.5 ? preferredMuted : text;
|
|
72
|
+
return { text, muted };
|
|
73
|
+
}
|
|
74
|
+
export function normalizePlatformBrightness(position) {
|
|
75
|
+
const safe = Number.isFinite(position) ? position : 0;
|
|
76
|
+
return Math.round(Math.min(100, Math.max(0, safe)) / PLATFORM_BRIGHTNESS_STEP) * PLATFORM_BRIGHTNESS_STEP;
|
|
77
|
+
}
|
|
78
|
+
export function getPlatformThemePosition(theme) {
|
|
79
|
+
return PLATFORM_THEME_OPTIONS.find((o) => o.id === theme)?.position ?? 0;
|
|
80
|
+
}
|
|
81
|
+
export function getClosestPlatformTheme(position) {
|
|
82
|
+
const norm = normalizePlatformBrightness(position);
|
|
83
|
+
return PLATFORM_THEME_OPTIONS.reduce((best, opt) => Math.abs(opt.position - norm) < Math.abs(best.position - norm) ? opt : best).id;
|
|
84
|
+
}
|
|
85
|
+
export function getPlatformThemeTokens(position) {
|
|
86
|
+
const norm = normalizePlatformBrightness(position);
|
|
87
|
+
const idx = Math.min(PLATFORM_BRIGHTNESS_PALETTES.length - 1, Math.max(0, Math.round(norm / PLATFORM_BRIGHTNESS_STEP)));
|
|
88
|
+
const base = PLATFORM_BRIGHTNESS_PALETTES[idx];
|
|
89
|
+
const isLight = relativeLuminance(base.canvas) > 0.45;
|
|
90
|
+
// Plate surface sits between canvas and rail in Dark (#111111 at stop 0) and Dim (#202328 at stop 50), crisp #ffffff at Light stop 100.
|
|
91
|
+
const plate = norm === 0 ? '#111111' : norm === 50 ? '#202328' : norm === 100 ? '#ffffff' : base.surface;
|
|
92
|
+
const { text, muted } = accessibleTextPair(plate, base.text, base.muted);
|
|
93
|
+
const surfacePair = accessibleTextPair(base.controlStrong, base.text, base.muted);
|
|
94
|
+
return {
|
|
95
|
+
...base,
|
|
96
|
+
position: norm,
|
|
97
|
+
closestTheme: getClosestPlatformTheme(norm),
|
|
98
|
+
isLight,
|
|
99
|
+
plate,
|
|
100
|
+
rail: base.surface,
|
|
101
|
+
text,
|
|
102
|
+
muted,
|
|
103
|
+
surfaceText: surfacePair.text,
|
|
104
|
+
surfaceMuted: surfacePair.muted,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Emit the complete `--xeno-*` CSS custom-property map for any position (`0..100`) on
|
|
109
|
+
* the XENO Platform brightness line. Apply directly as `style={buildPlatformThemeCssVars(brightness)}`
|
|
110
|
+
* on any `.xeno[data-layout="platform"]` container.
|
|
111
|
+
*/
|
|
112
|
+
export function buildPlatformThemeCssVars(position) {
|
|
113
|
+
const t = getPlatformThemeTokens(position);
|
|
114
|
+
return {
|
|
115
|
+
'--xeno-canvas': t.canvas,
|
|
116
|
+
'--xeno-rail-bg': t.rail,
|
|
117
|
+
'--xeno-rail-stroke': t.border,
|
|
118
|
+
'--xeno-surface': t.plate,
|
|
119
|
+
'--xeno-viewport': t.plate,
|
|
120
|
+
'--xeno-panel-header': t.plate,
|
|
121
|
+
'--xeno-elevated': t.elevated,
|
|
122
|
+
'--xeno-control': t.control,
|
|
123
|
+
'--xeno-field': t.canvas,
|
|
124
|
+
'--xeno-raised': t.elevated,
|
|
125
|
+
'--xeno-hover': t.isLight ? 'rgba(24, 23, 22, 0.05)' : 'rgba(255, 255, 255, 0.06)',
|
|
126
|
+
'--xeno-hover-strong': t.controlStrong,
|
|
127
|
+
'--xeno-border': t.border,
|
|
128
|
+
'--xeno-border-subtle': t.isLight ? 'rgba(24, 23, 22, 0.09)' : 'rgba(255, 255, 255, 0.08)',
|
|
129
|
+
'--xeno-border-strong': t.isLight ? 'rgba(24, 23, 22, 0.18)' : 'rgba(255, 255, 255, 0.15)',
|
|
130
|
+
'--xeno-plate-border': t.isLight
|
|
131
|
+
? t.border
|
|
132
|
+
: `color-mix(in srgb, ${t.text} 8.5%, ${t.canvas})`,
|
|
133
|
+
'--xeno-shell-border': t.isLight
|
|
134
|
+
? 'rgba(24, 23, 22, 0.22)'
|
|
135
|
+
: `color-mix(in srgb, ${t.text} 15%, ${t.canvas})`,
|
|
136
|
+
'--xeno-text': t.text,
|
|
137
|
+
'--xeno-muted-text': t.muted,
|
|
138
|
+
'--xeno-dim-text': t.muted,
|
|
139
|
+
'--xeno-muted': t.muted,
|
|
140
|
+
'--xeno-active': t.text,
|
|
141
|
+
'--xeno-on-accent': t.isLight ? '#ffffff' : t.canvas,
|
|
142
|
+
'--xeno-accent': t.text,
|
|
143
|
+
'--xeno-accent-text': t.isLight ? '#ffffff' : t.canvas,
|
|
144
|
+
'--xeno-accent-hover': t.isLight ? '#2f2d2a' : '#e5e5e5',
|
|
145
|
+
'--xeno-success-text': t.isLight ? '#059669' : '#34d399',
|
|
146
|
+
'--xeno-warning-text': t.isLight ? '#b45309' : '#fbbf24',
|
|
147
|
+
'--xeno-danger': t.isLight ? '#dc2626' : '#ef4444',
|
|
148
|
+
'--xeno-danger-text': t.isLight ? '#b91c1c' : '#f87171',
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
/** The 8 canonical XENO Platform modes and their locked brand accent hues. */
|
|
152
|
+
export const PLATFORM_MODES = [
|
|
153
|
+
{ id: 'xeno', name: 'XENO', color: '#E8E8E3', summary: 'All products & unified workspace', productCount: 24, shortcut: 'Alt+0' },
|
|
154
|
+
{ id: 'dev', name: 'Dev', color: '#68d36f', summary: 'Compute, Agents, Workflows, SDKs & Spawn', productCount: 13, shortcut: 'Alt+1' },
|
|
155
|
+
{ id: 'studio', name: 'Studio', color: '#e875c6', summary: 'Pixel, Motion, Sound & Creator pipelines', productCount: 6, shortcut: 'Alt+2' },
|
|
156
|
+
{ id: 'office', name: 'Office', color: '#52a9fe', summary: 'Docs, Mail, Calendar & Storage drives', productCount: 5, shortcut: 'Alt+3' },
|
|
157
|
+
{ id: 'social', name: 'Social', color: '#25cbb7', summary: 'Publishing, Community & Campaigns', productCount: 4, shortcut: 'Alt+4' },
|
|
158
|
+
{ id: 'corpo', name: 'Corpo', color: '#f8ac3d', summary: 'Workforce, Customers, Billing & Ops', productCount: 6, shortcut: 'Alt+5' },
|
|
159
|
+
{ id: 'tools', name: 'Tools', color: '#ad8dfd', summary: 'MCP, CLI utilities, Box & Extensions', productCount: 5, shortcut: 'Alt+6' },
|
|
160
|
+
{ id: 'research', name: 'Research', color: '#e3d25b', summary: 'Corpus, Notebooks & Deep Synthesis', productCount: 4, shortcut: 'Alt+7' },
|
|
161
|
+
];
|
|
162
|
+
export function getPlatformMode(id) {
|
|
163
|
+
return PLATFORM_MODES.find((m) => m.id === id) ?? PLATFORM_MODES[0];
|
|
164
|
+
}
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": {
|
|
3
|
+
"$value": "https://www.designtokens.org/tr/2025.10/format/",
|
|
4
|
+
"$type": "fontFamily",
|
|
5
|
+
"$description": "W3C DTCG 2025.10 format marker"
|
|
6
|
+
},
|
|
7
|
+
"color": {
|
|
8
|
+
"industrialDark": {
|
|
9
|
+
"canvas": {
|
|
10
|
+
"$value": "#141312",
|
|
11
|
+
"$type": "color",
|
|
12
|
+
"$description": "Industrial warm dark canvas"
|
|
13
|
+
},
|
|
14
|
+
"surface": {
|
|
15
|
+
"$value": "#1c1b19",
|
|
16
|
+
"$type": "color",
|
|
17
|
+
"$description": "Industrial warm dark surface"
|
|
18
|
+
},
|
|
19
|
+
"viewport": {
|
|
20
|
+
"$value": "#232220",
|
|
21
|
+
"$type": "color",
|
|
22
|
+
"$description": "Industrial warm dark viewport"
|
|
23
|
+
},
|
|
24
|
+
"elevated": {
|
|
25
|
+
"$value": "#282724",
|
|
26
|
+
"$type": "color",
|
|
27
|
+
"$description": "Industrial warm dark elevated"
|
|
28
|
+
},
|
|
29
|
+
"control": {
|
|
30
|
+
"$value": "#2e2d2a",
|
|
31
|
+
"$type": "color",
|
|
32
|
+
"$description": "Industrial warm dark control"
|
|
33
|
+
},
|
|
34
|
+
"border": {
|
|
35
|
+
"$value": "#33312e",
|
|
36
|
+
"$type": "color",
|
|
37
|
+
"$description": "Industrial warm dark border"
|
|
38
|
+
},
|
|
39
|
+
"borderSubtle": {
|
|
40
|
+
"$value": "#2e2c29",
|
|
41
|
+
"$type": "color",
|
|
42
|
+
"$description": "Industrial warm dark borderSubtle"
|
|
43
|
+
},
|
|
44
|
+
"text": {
|
|
45
|
+
"$value": "#edebe7",
|
|
46
|
+
"$type": "color",
|
|
47
|
+
"$description": "Industrial warm dark text"
|
|
48
|
+
},
|
|
49
|
+
"active": {
|
|
50
|
+
"$value": "#d6d2cb",
|
|
51
|
+
"$type": "color",
|
|
52
|
+
"$description": "Industrial warm dark active"
|
|
53
|
+
},
|
|
54
|
+
"mutedText": {
|
|
55
|
+
"$value": "#aaa59d",
|
|
56
|
+
"$type": "color",
|
|
57
|
+
"$description": "Industrial warm dark mutedText"
|
|
58
|
+
},
|
|
59
|
+
"muted": {
|
|
60
|
+
"$value": "#7f7a72",
|
|
61
|
+
"$type": "color",
|
|
62
|
+
"$description": "Industrial warm dark muted"
|
|
63
|
+
},
|
|
64
|
+
"onAccent": {
|
|
65
|
+
"$value": "#1c1b19",
|
|
66
|
+
"$type": "color",
|
|
67
|
+
"$description": "Industrial warm dark onAccent"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"industrialLight": {
|
|
71
|
+
"canvas": {
|
|
72
|
+
"$value": "#e9e6e1",
|
|
73
|
+
"$type": "color",
|
|
74
|
+
"$description": "Industrial warm light canvas"
|
|
75
|
+
},
|
|
76
|
+
"surface": {
|
|
77
|
+
"$value": "#f6f4f1",
|
|
78
|
+
"$type": "color",
|
|
79
|
+
"$description": "Industrial warm light surface"
|
|
80
|
+
},
|
|
81
|
+
"viewport": {
|
|
82
|
+
"$value": "#ffffff",
|
|
83
|
+
"$type": "color",
|
|
84
|
+
"$description": "Industrial warm light viewport"
|
|
85
|
+
},
|
|
86
|
+
"elevated": {
|
|
87
|
+
"$value": "#ffffff",
|
|
88
|
+
"$type": "color",
|
|
89
|
+
"$description": "Industrial warm light elevated"
|
|
90
|
+
},
|
|
91
|
+
"control": {
|
|
92
|
+
"$value": "#eae7e2",
|
|
93
|
+
"$type": "color",
|
|
94
|
+
"$description": "Industrial warm light control"
|
|
95
|
+
},
|
|
96
|
+
"border": {
|
|
97
|
+
"$value": "#dedad4",
|
|
98
|
+
"$type": "color",
|
|
99
|
+
"$description": "Industrial warm light border"
|
|
100
|
+
},
|
|
101
|
+
"borderSubtle": {
|
|
102
|
+
"$value": "#e4e0da",
|
|
103
|
+
"$type": "color",
|
|
104
|
+
"$description": "Industrial warm light borderSubtle"
|
|
105
|
+
},
|
|
106
|
+
"text": {
|
|
107
|
+
"$value": "#1f1f1f",
|
|
108
|
+
"$type": "color",
|
|
109
|
+
"$description": "Industrial warm light text"
|
|
110
|
+
},
|
|
111
|
+
"active": {
|
|
112
|
+
"$value": "#2e2c29",
|
|
113
|
+
"$type": "color",
|
|
114
|
+
"$description": "Industrial warm light active"
|
|
115
|
+
},
|
|
116
|
+
"mutedText": {
|
|
117
|
+
"$value": "#4e4a45",
|
|
118
|
+
"$type": "color",
|
|
119
|
+
"$description": "Industrial warm light mutedText"
|
|
120
|
+
},
|
|
121
|
+
"muted": {
|
|
122
|
+
"$value": "#6e6a64",
|
|
123
|
+
"$type": "color",
|
|
124
|
+
"$description": "Industrial warm light muted"
|
|
125
|
+
},
|
|
126
|
+
"onAccent": {
|
|
127
|
+
"$value": "#faf9f7",
|
|
128
|
+
"$type": "color",
|
|
129
|
+
"$description": "Industrial warm light onAccent"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"softDark": {
|
|
133
|
+
"canvas": {
|
|
134
|
+
"$value": "#08080a",
|
|
135
|
+
"$type": "color",
|
|
136
|
+
"$description": "Soft dark canvas"
|
|
137
|
+
},
|
|
138
|
+
"surface": {
|
|
139
|
+
"$value": "#161618",
|
|
140
|
+
"$type": "color",
|
|
141
|
+
"$description": "Soft dark surface"
|
|
142
|
+
},
|
|
143
|
+
"viewport": {
|
|
144
|
+
"$value": "#111111",
|
|
145
|
+
"$type": "color",
|
|
146
|
+
"$description": "Soft dark viewport"
|
|
147
|
+
},
|
|
148
|
+
"elevated": {
|
|
149
|
+
"$value": "#111115",
|
|
150
|
+
"$type": "color",
|
|
151
|
+
"$description": "Soft dark elevated"
|
|
152
|
+
},
|
|
153
|
+
"control": {
|
|
154
|
+
"$value": "#2b2b2b",
|
|
155
|
+
"$type": "color",
|
|
156
|
+
"$description": "Soft dark control"
|
|
157
|
+
},
|
|
158
|
+
"text": {
|
|
159
|
+
"$value": "#d8d8de",
|
|
160
|
+
"$type": "color",
|
|
161
|
+
"$description": "Soft dark text"
|
|
162
|
+
},
|
|
163
|
+
"mutedText": {
|
|
164
|
+
"$value": "#9a9aa1",
|
|
165
|
+
"$type": "color",
|
|
166
|
+
"$description": "Soft dark mutedText"
|
|
167
|
+
},
|
|
168
|
+
"muted": {
|
|
169
|
+
"$value": "#7f7f86",
|
|
170
|
+
"$type": "color",
|
|
171
|
+
"$description": "Soft dark muted"
|
|
172
|
+
},
|
|
173
|
+
"onAccent": {
|
|
174
|
+
"$value": "#08080a",
|
|
175
|
+
"$type": "color",
|
|
176
|
+
"$description": "Soft dark onAccent"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"status": {
|
|
180
|
+
"danger": {
|
|
181
|
+
"$value": "#ef4444",
|
|
182
|
+
"$type": "color",
|
|
183
|
+
"$description": "Semantic status danger"
|
|
184
|
+
},
|
|
185
|
+
"dangerHover": {
|
|
186
|
+
"$value": "#dc2626",
|
|
187
|
+
"$type": "color",
|
|
188
|
+
"$description": "Semantic status dangerHover"
|
|
189
|
+
},
|
|
190
|
+
"success": {
|
|
191
|
+
"$value": "#3fb950",
|
|
192
|
+
"$type": "color",
|
|
193
|
+
"$description": "Semantic status success"
|
|
194
|
+
},
|
|
195
|
+
"warning": {
|
|
196
|
+
"$value": "#d29922",
|
|
197
|
+
"$type": "color",
|
|
198
|
+
"$description": "Semantic status warning"
|
|
199
|
+
},
|
|
200
|
+
"dangerText": {
|
|
201
|
+
"$value": "#f27a7a",
|
|
202
|
+
"$type": "color",
|
|
203
|
+
"$description": "Semantic status dangerText"
|
|
204
|
+
},
|
|
205
|
+
"successText": {
|
|
206
|
+
"$value": "#6fae7f",
|
|
207
|
+
"$type": "color",
|
|
208
|
+
"$description": "Semantic status successText"
|
|
209
|
+
},
|
|
210
|
+
"warningText": {
|
|
211
|
+
"$value": "#c98d2a",
|
|
212
|
+
"$type": "color",
|
|
213
|
+
"$description": "Semantic status warningText"
|
|
214
|
+
},
|
|
215
|
+
"infoText": {
|
|
216
|
+
"$value": "#7aa2c4",
|
|
217
|
+
"$type": "color",
|
|
218
|
+
"$description": "Semantic status infoText"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"radius": {
|
|
223
|
+
"hair": {
|
|
224
|
+
"$value": "1.5px",
|
|
225
|
+
"$type": "dimension",
|
|
226
|
+
"$description": "Corner radius hair (rounded squares, never circles)"
|
|
227
|
+
},
|
|
228
|
+
"xs": {
|
|
229
|
+
"$value": "3px",
|
|
230
|
+
"$type": "dimension",
|
|
231
|
+
"$description": "Corner radius xs (rounded squares, never circles)"
|
|
232
|
+
},
|
|
233
|
+
"sm": {
|
|
234
|
+
"$value": "5px",
|
|
235
|
+
"$type": "dimension",
|
|
236
|
+
"$description": "Corner radius sm (rounded squares, never circles)"
|
|
237
|
+
},
|
|
238
|
+
"md": {
|
|
239
|
+
"$value": "6px",
|
|
240
|
+
"$type": "dimension",
|
|
241
|
+
"$description": "Corner radius md (rounded squares, never circles)"
|
|
242
|
+
},
|
|
243
|
+
"control": {
|
|
244
|
+
"$value": "8px",
|
|
245
|
+
"$type": "dimension",
|
|
246
|
+
"$description": "Corner radius control (rounded squares, never circles)"
|
|
247
|
+
},
|
|
248
|
+
"card": {
|
|
249
|
+
"$value": "12px",
|
|
250
|
+
"$type": "dimension",
|
|
251
|
+
"$description": "Corner radius card (rounded squares, never circles)"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"controlSize": {
|
|
255
|
+
"xs": {
|
|
256
|
+
"height": {
|
|
257
|
+
"$value": "24px",
|
|
258
|
+
"$type": "dimension"
|
|
259
|
+
},
|
|
260
|
+
"padX": {
|
|
261
|
+
"$value": "8px",
|
|
262
|
+
"$type": "dimension"
|
|
263
|
+
},
|
|
264
|
+
"gap": {
|
|
265
|
+
"$value": "5px",
|
|
266
|
+
"$type": "dimension"
|
|
267
|
+
},
|
|
268
|
+
"icon": {
|
|
269
|
+
"$value": "15px",
|
|
270
|
+
"$type": "dimension"
|
|
271
|
+
},
|
|
272
|
+
"font": {
|
|
273
|
+
"$value": "12px",
|
|
274
|
+
"$type": "dimension"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"sm": {
|
|
278
|
+
"height": {
|
|
279
|
+
"$value": "28px",
|
|
280
|
+
"$type": "dimension"
|
|
281
|
+
},
|
|
282
|
+
"padX": {
|
|
283
|
+
"$value": "10px",
|
|
284
|
+
"$type": "dimension"
|
|
285
|
+
},
|
|
286
|
+
"gap": {
|
|
287
|
+
"$value": "6px",
|
|
288
|
+
"$type": "dimension"
|
|
289
|
+
},
|
|
290
|
+
"icon": {
|
|
291
|
+
"$value": "16px",
|
|
292
|
+
"$type": "dimension"
|
|
293
|
+
},
|
|
294
|
+
"font": {
|
|
295
|
+
"$value": "13px",
|
|
296
|
+
"$type": "dimension"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"md": {
|
|
300
|
+
"height": {
|
|
301
|
+
"$value": "32px",
|
|
302
|
+
"$type": "dimension"
|
|
303
|
+
},
|
|
304
|
+
"padX": {
|
|
305
|
+
"$value": "12px",
|
|
306
|
+
"$type": "dimension"
|
|
307
|
+
},
|
|
308
|
+
"gap": {
|
|
309
|
+
"$value": "6px",
|
|
310
|
+
"$type": "dimension"
|
|
311
|
+
},
|
|
312
|
+
"icon": {
|
|
313
|
+
"$value": "16px",
|
|
314
|
+
"$type": "dimension"
|
|
315
|
+
},
|
|
316
|
+
"font": {
|
|
317
|
+
"$value": "14px",
|
|
318
|
+
"$type": "dimension"
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"lg": {
|
|
322
|
+
"height": {
|
|
323
|
+
"$value": "36px",
|
|
324
|
+
"$type": "dimension"
|
|
325
|
+
},
|
|
326
|
+
"padX": {
|
|
327
|
+
"$value": "14px",
|
|
328
|
+
"$type": "dimension"
|
|
329
|
+
},
|
|
330
|
+
"gap": {
|
|
331
|
+
"$value": "7px",
|
|
332
|
+
"$type": "dimension"
|
|
333
|
+
},
|
|
334
|
+
"icon": {
|
|
335
|
+
"$value": "18px",
|
|
336
|
+
"$type": "dimension"
|
|
337
|
+
},
|
|
338
|
+
"font": {
|
|
339
|
+
"$value": "14px",
|
|
340
|
+
"$type": "dimension"
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
"motion": {
|
|
345
|
+
"duration": {
|
|
346
|
+
"fast": {
|
|
347
|
+
"$value": "120ms",
|
|
348
|
+
"$type": "duration"
|
|
349
|
+
},
|
|
350
|
+
"base": {
|
|
351
|
+
"$value": "140ms",
|
|
352
|
+
"$type": "duration"
|
|
353
|
+
},
|
|
354
|
+
"entrance": {
|
|
355
|
+
"$value": "240ms",
|
|
356
|
+
"$type": "duration"
|
|
357
|
+
},
|
|
358
|
+
"modal": {
|
|
359
|
+
"$value": "420ms",
|
|
360
|
+
"$type": "duration"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"easing": {
|
|
364
|
+
"base": {
|
|
365
|
+
"$value": "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
366
|
+
"$type": "cubicBezier"
|
|
367
|
+
},
|
|
368
|
+
"stagger": {
|
|
369
|
+
"$value": "cubic-bezier(0.22, 0.7, 0.2, 1)",
|
|
370
|
+
"$type": "cubicBezier"
|
|
371
|
+
},
|
|
372
|
+
"drawer": {
|
|
373
|
+
"$value": "cubic-bezier(0.32, 0.72, 0, 1)",
|
|
374
|
+
"$type": "cubicBezier"
|
|
375
|
+
},
|
|
376
|
+
"expo": {
|
|
377
|
+
"$value": "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
378
|
+
"$type": "cubicBezier"
|
|
379
|
+
},
|
|
380
|
+
"overshoot": {
|
|
381
|
+
"$value": "cubic-bezier(0.34, 1.4, 0.5, 1)",
|
|
382
|
+
"$type": "cubicBezier"
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
"$extensions": {
|
|
387
|
+
"ai.xeno.contrast": {
|
|
388
|
+
"standard": "WCAG 2.2 AA",
|
|
389
|
+
"pairsChecked": 21,
|
|
390
|
+
"allPass": true
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenosystem/elements",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "The XENO element contract — declarations, schema, state model. Framework-free, platform-free.",
|
|
6
6
|
"author": "XENO Corporation <emilian@bnkrsys.com>",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"types": "./dist/tokens/index.d.ts",
|
|
26
26
|
"default": "./dist/tokens/index.js"
|
|
27
27
|
},
|
|
28
|
+
"./tokens.dtcg.json": "./dist/tokens.dtcg.json",
|
|
28
29
|
"./elements/*": {
|
|
29
30
|
"types": "./dist/elements/*.d.ts",
|
|
30
31
|
"default": "./dist/elements/*.js"
|
|
@@ -35,7 +36,8 @@
|
|
|
35
36
|
"LICENSE"
|
|
36
37
|
],
|
|
37
38
|
"scripts": {
|
|
38
|
-
"
|
|
39
|
+
"prepublishOnly": "node --no-warnings ../../scripts/require-githead.mjs",
|
|
40
|
+
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json && node scripts/emit-dtcg.mjs",
|
|
39
41
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
|
|
40
42
|
"test": "vitest run",
|
|
41
43
|
"import-glyphs": "node --no-warnings scripts/import-glyphs.mjs",
|