@xenosystem/elements-react 0.0.10 → 0.0.12
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/dist/containers/Avatar.d.ts +8 -1
- package/dist/containers/Avatar.js +3 -3
- package/dist/containers/BulkActionBar.d.ts +20 -0
- package/dist/containers/BulkActionBar.js +8 -0
- package/dist/containers/DataTable.d.ts +50 -6
- package/dist/containers/DataTable.js +185 -11
- package/dist/containers/Table.d.ts +2 -2
- package/dist/containers/Table.js +4 -3
- package/dist/content/Kbd.d.ts +16 -0
- package/dist/content/Kbd.js +8 -0
- package/dist/forms/FormField.d.ts +32 -0
- package/dist/forms/FormField.js +26 -0
- package/dist/forms/NumberInput.d.ts +27 -0
- package/dist/forms/NumberInput.js +69 -0
- package/dist/forms/Select.d.ts +84 -0
- package/dist/forms/Select.js +243 -0
- package/dist/forms/Slider.d.ts +38 -0
- package/dist/forms/Slider.js +31 -0
- package/dist/index.d.ts +20 -1
- package/dist/index.js +20 -1
- package/dist/nav/Breadcrumb.d.ts +22 -0
- package/dist/nav/Breadcrumb.js +10 -0
- package/dist/nav/Pagination.d.ts +22 -0
- package/dist/nav/Pagination.js +35 -0
- package/dist/overlays/CommandPalette.d.ts +43 -0
- package/dist/overlays/CommandPalette.js +96 -0
- package/dist/overlays/Drawer.d.ts +30 -0
- package/dist/overlays/Drawer.js +41 -0
- package/dist/overlays/Popover.d.ts +27 -12
- package/dist/overlays/Popover.js +104 -7
- package/dist/overlays/ShortcutsSheet.d.ts +21 -0
- package/dist/overlays/ShortcutsSheet.js +7 -0
- package/dist/overlays/Tooltip.d.ts +21 -10
- package/dist/overlays/Tooltip.js +93 -9
- package/dist/shortcuts.d.ts +45 -0
- package/dist/shortcuts.js +164 -0
- package/dist/status/Banner.d.ts +23 -0
- package/dist/status/Banner.js +8 -0
- package/dist/status/EmptyState.d.ts +20 -0
- package/dist/status/EmptyState.js +9 -0
- package/dist/status/Skeleton.d.ts +36 -0
- package/dist/status/Skeleton.js +31 -0
- package/dist/status/Toast.d.ts +28 -0
- package/dist/status/Toast.js +11 -0
- package/dist/uiTree.d.ts +53 -0
- package/dist/uiTree.js +197 -0
- package/dist/useDialog.d.ts +3 -1
- package/dist/useDialog.js +37 -1
- package/dist/useMenu.js +31 -1
- package/dist/useToastQueue.d.ts +29 -0
- package/dist/useToastQueue.js +73 -0
- package/package.json +9 -3
- package/src/chrome-separated.css +133 -72
- package/src/chrome-unified.css +48 -16
- package/src/containers/Badges.css +52 -28
- package/src/containers/avatar.css +7 -2
- package/src/containers/bulk-action-bar.css +45 -0
- package/src/containers/card.css +14 -13
- package/src/containers/chip.css +1 -1
- package/src/containers/panel.css +16 -53
- package/src/containers/table.css +107 -1
- package/src/content/kbd.css +33 -0
- package/src/content/model-picker.css +2 -1
- package/src/controls.css +25 -11
- package/src/fonts.css +8 -2
- package/src/forced-colors.css +41 -0
- package/src/forms/form-field.css +78 -0
- package/src/forms/number-input.css +86 -0
- package/src/forms/select.css +210 -0
- package/src/forms/slider.css +145 -0
- package/src/layout-platform.css +495 -0
- package/src/mcp-app-platform.css +1019 -0
- package/src/nav/breadcrumb.css +84 -0
- package/src/nav/pagination.css +61 -0
- package/src/overlays/command-palette.css +157 -0
- package/src/overlays/drawer.css +79 -0
- package/src/overlays/menu.css +25 -16
- package/src/overlays/modal.css +9 -27
- package/src/overlays/onboarding.css +1305 -0
- package/src/overlays/segmented-control.css +6 -3
- package/src/overlays/shortcuts-sheet.css +55 -0
- package/src/overlays/tooltip.css +22 -4
- package/src/size.css +40 -0
- package/src/status/banner.css +83 -0
- package/src/status/empty-state.css +56 -0
- package/src/status/skeleton.css +70 -0
- package/src/status/toast.css +95 -0
- package/src/xeno-elements.css +71 -44
- package/src/xeno-theme.css +75 -31
package/dist/useDialog.js
CHANGED
|
@@ -23,7 +23,35 @@ const unlockPageScroll = () => {
|
|
|
23
23
|
if (scrollLocks === 0)
|
|
24
24
|
document.body.style.overflow = scrollPrevious;
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
/** Refcounted `inert` locks per element so stacked dialogs never clear each other's background guard. */
|
|
27
|
+
const inertCounts = new WeakMap();
|
|
28
|
+
const inertOriginal = new WeakMap();
|
|
29
|
+
function acquireInert(panel) {
|
|
30
|
+
const locked = [];
|
|
31
|
+
for (const child of Array.from(document.body.children)) {
|
|
32
|
+
if (!(child instanceof HTMLElement))
|
|
33
|
+
continue;
|
|
34
|
+
if (child.contains(panel))
|
|
35
|
+
continue;
|
|
36
|
+
const prev = inertCounts.get(child) ?? 0;
|
|
37
|
+
if (prev === 0) {
|
|
38
|
+
inertOriginal.set(child, child.hasAttribute('inert'));
|
|
39
|
+
child.setAttribute('inert', '');
|
|
40
|
+
}
|
|
41
|
+
inertCounts.set(child, prev + 1);
|
|
42
|
+
locked.push(child);
|
|
43
|
+
}
|
|
44
|
+
return () => {
|
|
45
|
+
for (const child of locked) {
|
|
46
|
+
const next = Math.max(0, (inertCounts.get(child) ?? 1) - 1);
|
|
47
|
+
inertCounts.set(child, next);
|
|
48
|
+
if (next === 0 && !inertOriginal.get(child)) {
|
|
49
|
+
child.removeAttribute('inert');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export function useDialog({ open, onClose, panelRef: providedRef, lockScroll = true, inertBackground = true, }) {
|
|
27
55
|
const ownRef = useRef(null);
|
|
28
56
|
const panelRef = providedRef ?? ownRef;
|
|
29
57
|
const restoreFocus = useRef(null);
|
|
@@ -51,6 +79,14 @@ export function useDialog({ open, onClose, panelRef: providedRef, lockScroll = t
|
|
|
51
79
|
lockPageScroll();
|
|
52
80
|
return unlockPageScroll;
|
|
53
81
|
}, [open, lockScroll]);
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
if (!open || !inertBackground)
|
|
84
|
+
return;
|
|
85
|
+
const panel = panelRef.current;
|
|
86
|
+
if (!panel || typeof document === 'undefined')
|
|
87
|
+
return;
|
|
88
|
+
return acquireInert(panel);
|
|
89
|
+
}, [open, inertBackground, panelRef]);
|
|
54
90
|
/**
|
|
55
91
|
* Focus in when the panel APPEARS, not when `open` turns true.
|
|
56
92
|
*
|
package/dist/useMenu.js
CHANGED
|
@@ -5,6 +5,14 @@ export function useMenu({ open, onClose, menuRef: providedRef, itemSelector = DE
|
|
|
5
5
|
const menuRef = providedRef ?? ownRef;
|
|
6
6
|
const openRef = useRef(open);
|
|
7
7
|
openRef.current = open;
|
|
8
|
+
const typeaheadBuf = useRef('');
|
|
9
|
+
const typeaheadTimer = useRef(null);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
return () => {
|
|
12
|
+
if (typeaheadTimer.current !== null)
|
|
13
|
+
clearTimeout(typeaheadTimer.current);
|
|
14
|
+
};
|
|
15
|
+
}, []);
|
|
8
16
|
const items = useCallback(() => {
|
|
9
17
|
const root = menuRef.current;
|
|
10
18
|
if (!root)
|
|
@@ -86,8 +94,30 @@ export function useMenu({ open, onClose, menuRef: providedRef, itemSelector = DE
|
|
|
86
94
|
e.preventDefault();
|
|
87
95
|
onClose?.();
|
|
88
96
|
break;
|
|
89
|
-
default:
|
|
97
|
+
default: {
|
|
98
|
+
// WAI-ARIA APG 1.2 character type-ahead: printable keys jump to the next matching enabled item.
|
|
99
|
+
if (e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && e.key !== ' ') {
|
|
100
|
+
if (typeaheadTimer.current !== null)
|
|
101
|
+
clearTimeout(typeaheadTimer.current);
|
|
102
|
+
typeaheadBuf.current += e.key.toLowerCase();
|
|
103
|
+
typeaheadTimer.current = setTimeout(() => {
|
|
104
|
+
typeaheadBuf.current = '';
|
|
105
|
+
typeaheadTimer.current = null;
|
|
106
|
+
}, 500);
|
|
107
|
+
const prefix = typeaheadBuf.current;
|
|
108
|
+
const start = current >= 0 ? current : -1;
|
|
109
|
+
for (let offset = 1; offset <= list.length; offset += 1) {
|
|
110
|
+
const idx = (start + offset) % list.length;
|
|
111
|
+
const label = (list[idx]?.textContent ?? '').trim().toLowerCase();
|
|
112
|
+
if (label.startsWith(prefix)) {
|
|
113
|
+
e.preventDefault();
|
|
114
|
+
list[idx]?.focus();
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
90
119
|
break;
|
|
120
|
+
}
|
|
91
121
|
}
|
|
92
122
|
}, [items, focusAt, onClose]);
|
|
93
123
|
const onClick = useCallback((e) => {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ToastTone } from './status/Toast.js';
|
|
2
|
+
/**
|
|
3
|
+
* Managed Toast Queue with auto-dismiss, hover-to-pause, bounded stack size, and first-class
|
|
4
|
+
* optimistic `undo()` callbacks — ready to render directly into `<ToastStack>`.
|
|
5
|
+
*/
|
|
6
|
+
export interface QueuedToast {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly title: string;
|
|
9
|
+
readonly description?: string;
|
|
10
|
+
readonly tone?: ToastTone;
|
|
11
|
+
readonly durationMs?: number;
|
|
12
|
+
readonly undoLabel?: string;
|
|
13
|
+
readonly onUndo?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface PushToastInput extends Omit<QueuedToast, 'id'> {
|
|
16
|
+
readonly id?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface UseToastQueueResult {
|
|
19
|
+
readonly toasts: readonly QueuedToast[];
|
|
20
|
+
readonly push: (toast: PushToastInput) => string;
|
|
21
|
+
readonly dismiss: (id: string) => void;
|
|
22
|
+
readonly pause: (id: string) => void;
|
|
23
|
+
readonly resume: (id: string) => void;
|
|
24
|
+
readonly clear: () => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function useToastQueue(options?: {
|
|
27
|
+
readonly maxVisible?: number;
|
|
28
|
+
readonly defaultDurationMs?: number;
|
|
29
|
+
}): UseToastQueueResult;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
let seq = 0;
|
|
3
|
+
export function useToastQueue(options = {}) {
|
|
4
|
+
const maxVisible = options.maxVisible ?? 4;
|
|
5
|
+
const defaultDurationMs = options.defaultDurationMs ?? 4500;
|
|
6
|
+
const [toasts, setToasts] = useState([]);
|
|
7
|
+
const timers = useRef(new Map());
|
|
8
|
+
const clearTimer = useCallback((id) => {
|
|
9
|
+
const entry = timers.current.get(id);
|
|
10
|
+
if (entry) {
|
|
11
|
+
clearTimeout(entry.handle);
|
|
12
|
+
timers.current.delete(id);
|
|
13
|
+
}
|
|
14
|
+
}, []);
|
|
15
|
+
const dismiss = useCallback((id) => {
|
|
16
|
+
clearTimer(id);
|
|
17
|
+
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
18
|
+
}, [clearTimer]);
|
|
19
|
+
const schedule = useCallback((id, ms) => {
|
|
20
|
+
clearTimer(id);
|
|
21
|
+
if (ms <= 0)
|
|
22
|
+
return;
|
|
23
|
+
const startedAt = Date.now();
|
|
24
|
+
const handle = setTimeout(() => {
|
|
25
|
+
timers.current.delete(id);
|
|
26
|
+
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
27
|
+
}, ms);
|
|
28
|
+
timers.current.set(id, { handle, remaining: ms, startedAt });
|
|
29
|
+
}, [clearTimer]);
|
|
30
|
+
const push = useCallback((input) => {
|
|
31
|
+
const id = input.id ?? `xeno-toast-${++seq}`;
|
|
32
|
+
const durationMs = input.durationMs ?? defaultDurationMs;
|
|
33
|
+
const item = { ...input, id, durationMs };
|
|
34
|
+
setToasts((prev) => {
|
|
35
|
+
const next = [...prev.filter((t) => t.id !== id), item];
|
|
36
|
+
if (next.length > maxVisible) {
|
|
37
|
+
const dropped = next.slice(0, next.length - maxVisible);
|
|
38
|
+
for (const d of dropped)
|
|
39
|
+
clearTimer(d.id);
|
|
40
|
+
return next.slice(-maxVisible);
|
|
41
|
+
}
|
|
42
|
+
return next;
|
|
43
|
+
});
|
|
44
|
+
schedule(id, durationMs);
|
|
45
|
+
return id;
|
|
46
|
+
}, [clearTimer, defaultDurationMs, maxVisible, schedule]);
|
|
47
|
+
const pause = useCallback((id) => {
|
|
48
|
+
const entry = timers.current.get(id);
|
|
49
|
+
if (!entry)
|
|
50
|
+
return;
|
|
51
|
+
clearTimeout(entry.handle);
|
|
52
|
+
const elapsed = Date.now() - entry.startedAt;
|
|
53
|
+
const remaining = Math.max(250, entry.remaining - elapsed);
|
|
54
|
+
timers.current.set(id, { handle: entry.handle, remaining, startedAt: 0 });
|
|
55
|
+
}, []);
|
|
56
|
+
const resume = useCallback((id) => {
|
|
57
|
+
const entry = timers.current.get(id);
|
|
58
|
+
if (!entry || entry.startedAt !== 0)
|
|
59
|
+
return;
|
|
60
|
+
schedule(id, entry.remaining);
|
|
61
|
+
}, [schedule]);
|
|
62
|
+
const clear = useCallback(() => {
|
|
63
|
+
for (const id of Array.from(timers.current.keys()))
|
|
64
|
+
clearTimer(id);
|
|
65
|
+
setToasts([]);
|
|
66
|
+
}, [clearTimer]);
|
|
67
|
+
useEffect(() => () => {
|
|
68
|
+
for (const entry of timers.current.values())
|
|
69
|
+
clearTimeout(entry.handle);
|
|
70
|
+
timers.current.clear();
|
|
71
|
+
}, []);
|
|
72
|
+
return { toasts, push, dismiss, pause, resume, clear };
|
|
73
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenosystem/elements-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "The XENO web renderer — interprets element declarations as React/SVG. CSS-first, 0 kb runtime.",
|
|
6
6
|
"author": "XENO Corporation <emilian@bnkrsys.com>",
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
"./xeno-theme.css": "./src/xeno-theme.css",
|
|
20
20
|
"./controls.css": "./src/controls.css",
|
|
21
21
|
"./xeno-elements.css": "./src/xeno-elements.css",
|
|
22
|
+
"./layout-platform.css": "./src/layout-platform.css",
|
|
23
|
+
"./mcp-app-platform.css": "./src/mcp-app-platform.css",
|
|
22
24
|
"./fonts.css": "./src/fonts.css"
|
|
23
25
|
},
|
|
24
26
|
"files": [
|
|
@@ -31,6 +33,7 @@
|
|
|
31
33
|
"LICENSE"
|
|
32
34
|
],
|
|
33
35
|
"scripts": {
|
|
36
|
+
"prepublishOnly": "node --no-warnings ../../scripts/require-githead.mjs",
|
|
34
37
|
"prebuild": "npm run build -w @xenosystem/elements && npm run build -w @xenosystem/generate",
|
|
35
38
|
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json",
|
|
36
39
|
"pretypecheck": "npm run build -w @xenosystem/elements && npm run build -w @xenosystem/generate",
|
|
@@ -38,11 +41,14 @@
|
|
|
38
41
|
"test": "vitest run"
|
|
39
42
|
},
|
|
40
43
|
"peerDependencies": {
|
|
41
|
-
"react": ">=18"
|
|
44
|
+
"react": ">=18",
|
|
45
|
+
"react-dom": ">=18"
|
|
42
46
|
},
|
|
43
47
|
"dependencies": {
|
|
48
|
+
"@fontsource-variable/dm-sans": "^5.3.0",
|
|
44
49
|
"@fontsource-variable/inter": "^5.3.0",
|
|
45
|
-
"@
|
|
50
|
+
"@fontsource/dm-mono": "^5.3.0",
|
|
51
|
+
"@xenosystem/elements": "0.0.12",
|
|
46
52
|
"@xenosystem/generate": "0.0.10"
|
|
47
53
|
},
|
|
48
54
|
"devDependencies": {
|
package/src/chrome-separated.css
CHANGED
|
@@ -37,8 +37,24 @@
|
|
|
37
37
|
* by proximity without needing to out-specify anything.
|
|
38
38
|
*
|
|
39
39
|
* DEFAULT = separated, because `DESIGN_SYSTEM.md` §"Panel Structure" requires it.
|
|
40
|
+
*
|
|
41
|
+
* 🔴 AND RE-DECLARED ON EVERY THEMED SCOPE (`.xeno[data-theme]`), which is the same lesson from the
|
|
42
|
+
* other side. Most tokens below are `var(--xeno-…)` references, and a custom property's `var()` is
|
|
43
|
+
* substituted WHERE IT IS DECLARED. Declared on `:root` only, `--xeno-chrome-body` was computed from
|
|
44
|
+
* the root's dark `--xeno-viewport` and inherited as that finished colour, so a light section
|
|
45
|
+
* (`.xeno[data-theme='light']`) drew every Panel, Modal and Card dark with light-theme ink on it
|
|
46
|
+
* (found 2026-11-09 rebuilding the reference screens: the Motion inspector rendered black on a light
|
|
47
|
+
* page, its row titles unreadable). Re-declaring on the themed scope makes the references resolve
|
|
48
|
+
* against that scope's ramp. The values are untouched, so this adds no construction decision; the
|
|
49
|
+
* unified file carries the matching selectors, and `[data-chrome='unified'] .xeno[data-theme]` out-
|
|
50
|
+
* specifies the bare `.xeno[data-theme]` here so a themed scope inside Soft stays Soft.
|
|
51
|
+
* Known limit: CSS cannot express PROXIMITY between two `data-chrome` ancestors, so a separated
|
|
52
|
+
* subtree nested inside a unified one resolves by source order (unified loads last).
|
|
40
53
|
*/
|
|
41
|
-
:root
|
|
54
|
+
:root,
|
|
55
|
+
.xeno[data-theme],
|
|
56
|
+
[data-chrome='separated'] .xeno[data-theme],
|
|
57
|
+
[data-chrome='separated'].xeno[data-theme] {
|
|
42
58
|
/* ── CHROME: construction, not colour ──────────────────────────────────────────────────────
|
|
43
59
|
* A THIRD axis, orthogonal to `data-theme` (colour ramp) and `data-surface` (density). It has to
|
|
44
60
|
* be its own attribute: `data-theme` already carries `light`, and one attribute cannot hold two
|
|
@@ -50,83 +66,128 @@
|
|
|
50
66
|
* DEFAULT = separated, because `DESIGN_SYSTEM.md` §"Panel Structure" requires it ("They are NOT
|
|
51
67
|
* merged into a single container"). `unified` is the opt-in.
|
|
52
68
|
*/
|
|
53
|
-
/*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
*/
|
|
62
|
-
--xeno-chrome-gap: 2px;
|
|
63
|
-
--xeno-chrome-inset: 6px;
|
|
64
|
-
/* What the SHELL paints. Separated: the page shows between plates. */
|
|
65
|
-
--xeno-chrome-shell: var(--xeno-canvas);
|
|
66
|
-
/* What a header/footer PLATE paints. */
|
|
67
|
-
--xeno-chrome-plate: var(--xeno-panel-header);
|
|
68
|
-
/* What the BODY plate paints. */
|
|
69
|
+
/* ── NEW REFERENCE PANEL & CARD CHROME (2026-12-04, owner ruling) ──────────────────────────
|
|
70
|
+
* Supersedes the pre-reference `Plate.tsx` double-framed tray (`6px` outer canvas inset + `2px`
|
|
71
|
+
* gaps + frosted blur). Matches all five owner references (Motion v12, Corpus v9, Creator v3,
|
|
72
|
+
* Workshop v3, Desktop Shell): flush single clipped 6px container with 1px `--xeno-border`,
|
|
73
|
+
* `--xeno-surface` header/footer strips separated by 1px hairlines, and crisp `--xeno-viewport`
|
|
74
|
+
* body/card surfaces carrying the subtle 1px `--xeno-shadow` in light mode (`none` in dark). */
|
|
75
|
+
--xeno-chrome-shell: var(--xeno-viewport);
|
|
76
|
+
--xeno-chrome-plate: var(--xeno-surface);
|
|
69
77
|
--xeno-chrome-body: var(--xeno-viewport);
|
|
70
|
-
/*
|
|
71
|
-
--xeno-chrome-
|
|
72
|
-
|
|
73
|
-
--xeno-chrome-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/*
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
* is part of the construction.
|
|
90
|
-
*/
|
|
91
|
-
/*
|
|
92
|
-
* The readout / detail block — `PlateDetail` in the reference: "raised back to plate colour against
|
|
93
|
-
* the recessed body. This is Motion's readout group and is where label-value pairs belong."
|
|
94
|
-
*
|
|
95
|
-
* So in `separated` a card is NOT a soft surface with a big radius and a shadow. It is a plate-
|
|
96
|
-
* coloured block, 4px, borderless, flat. `xeno-tools/DESIGN_SYSTEM.md` bans the alternative
|
|
97
|
-
* outright: "❌ Gradients in chrome, drop shadows for depth".
|
|
98
|
-
*/
|
|
99
|
-
--xeno-chrome-card-bg: var(--xeno-panel-header);
|
|
100
|
-
--xeno-chrome-card-border: none;
|
|
101
|
-
--xeno-chrome-card-radius: var(--xeno-chrome-radius-plate);
|
|
102
|
-
--xeno-chrome-card-pad: 12px;
|
|
103
|
-
--xeno-chrome-card-shadow: none;
|
|
104
|
-
/* Hover "lifts alpha, never bounces or scales dramatically" — tools DESIGN_SYSTEM, Motion. */
|
|
78
|
+
/* Dialogs, menus and popovers take clean POP depth without duplicate wire rings. */
|
|
79
|
+
--xeno-chrome-shadow: var(--xeno-pop);
|
|
80
|
+
--xeno-chrome-pop: var(--xeno-pop);
|
|
81
|
+
--xeno-chrome-dialog-radius: var(--xeno-radius-control);
|
|
82
|
+
/* Buttons, measured against the references' Agent / Options / Open / Share (2026-11-22). */
|
|
83
|
+
--xeno-chrome-btn-weight: 400;
|
|
84
|
+
--xeno-chrome-btn-outline-bg: var(--xeno-raised);
|
|
85
|
+
/* The references' typeface (4 of 5): DM Sans for UI, DM Mono for numbers, ids and meta (2026-11-22). */
|
|
86
|
+
--xeno-chrome-font-sans: 'DM Sans Variable', 'DM Sans', -apple-system, 'Segoe UI', system-ui, sans-serif;
|
|
87
|
+
--xeno-chrome-font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
88
|
+
--xeno-chrome-radius: var(--xeno-radius-md);
|
|
89
|
+
|
|
90
|
+
/* Reference Card (Creator KPI/Run/Calendar cards, Corpus claim cards, Workshop project cards):
|
|
91
|
+
* crisp page surface (`#FFFFFF` light / `#232220` dark), 6px radius, 1px hairline border, subtle
|
|
92
|
+
* `--xeno-shadow` at rest in light (`none` in dark). */
|
|
93
|
+
--xeno-chrome-card-bg: var(--xeno-viewport);
|
|
94
|
+
--xeno-chrome-card-radius: var(--xeno-radius-md);
|
|
95
|
+
--xeno-chrome-card-pad: 12px 14px;
|
|
96
|
+
--xeno-chrome-card-shadow: var(--xeno-shadow);
|
|
105
97
|
--xeno-chrome-card-lift: none;
|
|
106
98
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
* earlier version of this pass changed them in the BASE, which silently altered `unified` — the one
|
|
110
|
-
* thing this axis exists to prevent. Everything a construction decides lives here or it leaks.
|
|
111
|
-
*/
|
|
112
|
-
--xeno-chrome-border: var(--xeno-border-subtle);
|
|
113
|
-
--xeno-chrome-panel-header-pad: 7px 12px;
|
|
114
|
-
--xeno-chrome-panel-header-min-h: 34px;
|
|
99
|
+
--xeno-chrome-panel-header-pad: 0 12px;
|
|
100
|
+
--xeno-chrome-panel-header-min-h: 36px;
|
|
115
101
|
--xeno-chrome-panel-body-pad: 12px;
|
|
116
102
|
--xeno-chrome-title-size: 11px;
|
|
117
103
|
--xeno-chrome-title-color: var(--xeno-muted-text);
|
|
118
104
|
--xeno-chrome-title-transform: uppercase;
|
|
119
|
-
--xeno-chrome-title-spacing: 0.
|
|
120
|
-
--xeno-chrome-dialog-header-pad:
|
|
121
|
-
--xeno-chrome-dialog-title-size:
|
|
122
|
-
--xeno-chrome-dialog-
|
|
123
|
-
--xeno-chrome-dialog-body-
|
|
124
|
-
--xeno-chrome-dialog-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
--xeno-chrome-
|
|
105
|
+
--xeno-chrome-title-spacing: 0.06em;
|
|
106
|
+
--xeno-chrome-dialog-header-pad: 12px 16px;
|
|
107
|
+
--xeno-chrome-dialog-title-size: 14px;
|
|
108
|
+
--xeno-chrome-dialog-body-pad: 16px;
|
|
109
|
+
--xeno-chrome-dialog-body-size: 13px;
|
|
110
|
+
--xeno-chrome-dialog-footer-pad: 10px 16px;
|
|
111
|
+
|
|
112
|
+
/* 5px, measured off the references' 28px controls (Share, Export, Run gate, every input). */
|
|
113
|
+
--xeno-chrome-btn-radius: var(--xeno-radius-sm);
|
|
114
|
+
|
|
115
|
+
/* Chips: 4px corner from the references. */
|
|
116
|
+
--xeno-chrome-chip-radius: 4px;
|
|
117
|
+
/* Text area: a field corner (6px), not the 12px card corner. */
|
|
118
|
+
--xeno-chrome-textarea-radius: var(--xeno-radius-md);
|
|
119
|
+
|
|
120
|
+
/* Badge / StatusPill / CountBadge — the references' gate chips ("9 differ", "136 no baseline",
|
|
121
|
+
"not gated"): 15px, 2px corner, mono 9.5px, lowercase, NO border, the tone as a tinted fill with
|
|
122
|
+
the tone's readable ink on it. */
|
|
123
|
+
--xeno-chrome-badge-h: 15px;
|
|
124
|
+
--xeno-chrome-badge-pad: 5px;
|
|
125
|
+
--xeno-chrome-badge-radius: 2px;
|
|
126
|
+
--xeno-chrome-badge-family: var(--xeno-font-mono);
|
|
127
|
+
--xeno-chrome-badge-size: 9.5px;
|
|
128
|
+
--xeno-chrome-badge-weight: 400;
|
|
129
|
+
--xeno-chrome-badge-transform: none;
|
|
130
|
+
--xeno-chrome-badge-spacing: 0;
|
|
131
|
+
--xeno-chrome-badge-border-w: 0px;
|
|
132
|
+
--xeno-chrome-badge-bg: var(--xeno-control);
|
|
133
|
+
/* Tone fill strength over a clear ground: red .10 / amber .18 in the references; 14% sits between. */
|
|
134
|
+
--xeno-chrome-badge-tint: 14%;
|
|
135
|
+
--xeno-chrome-badge-tone-ground: transparent;
|
|
136
|
+
/* 100% = the tone's TEXT token (AA on the tint); Soft keeps 0% = the fill hue it ships. */
|
|
137
|
+
--xeno-chrome-badge-ink: 100%;
|
|
138
|
+
/* The status square: 7px in every reference (rows, chips, gate counts). */
|
|
139
|
+
--xeno-chrome-badge-dot: 7px;
|
|
140
|
+
|
|
141
|
+
/* Segmented control — a well with a raised plate. The track is a hover-tinted well with no outline;
|
|
142
|
+
the chosen option is the raised surface (white in light) with the references' 1px SHADOW under
|
|
143
|
+
it (decided 2026-11-22). */
|
|
144
|
+
--xeno-chrome-seg-track: var(--xeno-hover);
|
|
145
|
+
--xeno-chrome-seg-track-border: transparent;
|
|
146
|
+
--xeno-chrome-seg-thumb: var(--xeno-raised);
|
|
147
|
+
--xeno-chrome-seg-thumb-shadow: var(--xeno-shadow);
|
|
148
|
+
|
|
149
|
+
/* Table header: 11px / 600 uppercase, .06em tracking, on the bar surface (the references' projects
|
|
150
|
+
and gate tables). */
|
|
151
|
+
--xeno-chrome-th-size: 11px;
|
|
152
|
+
--xeno-chrome-th-transform: uppercase;
|
|
153
|
+
--xeno-chrome-th-spacing: 0.06em;
|
|
154
|
+
--xeno-chrome-th-bg: var(--xeno-surface);
|
|
155
|
+
}
|
|
128
156
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
157
|
+
/* ── INDUSTRIAL WARM DARK RAMP ─────────────────────────────────────────────────────────────────
|
|
158
|
+
* All five owner references (Corpus v9, Creator v3, Motion v12, Workshop v3, Desktop Shell) share
|
|
159
|
+
* one warm dark surface and ink ramp (`#141312` frame, `#1C1B19` toolbar/surface, `#232220` page,
|
|
160
|
+
* `#282724` menu, `#2E2D2A` field, `#33312E` line, `#EDEBE7` ink, `#AAA59D` ink2, `#7F7A72` ink3).
|
|
161
|
+
* Applied to Industrial dark scopes ONLY — Soft (`[data-chrome='unified']`) stays on the cool base
|
|
162
|
+
* `.xeno` ramp untouched. Selectors stay flat (no nested complex `:not()`). */
|
|
163
|
+
:root:not([data-chrome='unified']).xeno:not([data-theme='light']),
|
|
164
|
+
:root:not([data-chrome='unified']) .xeno:not([data-theme='light']):not([data-chrome='unified']),
|
|
165
|
+
[data-chrome='separated'].xeno:not([data-theme='light']),
|
|
166
|
+
[data-chrome='separated'] .xeno:not([data-theme='light']) {
|
|
167
|
+
--xeno-canvas: #141312;
|
|
168
|
+
--xeno-surface: #1c1b19;
|
|
169
|
+
--xeno-panel-header: #1c1b19;
|
|
170
|
+
--xeno-viewport: #232220;
|
|
171
|
+
--xeno-elevated: #282724;
|
|
172
|
+
--xeno-control: #2e2d2a;
|
|
173
|
+
--xeno-field: #2e2d2a;
|
|
174
|
+
--xeno-raised: #2e2d2a;
|
|
175
|
+
--xeno-border: #33312e;
|
|
176
|
+
--xeno-border-subtle: #2e2c29;
|
|
177
|
+
--xeno-hover: rgba(237, 235, 231, 0.07);
|
|
178
|
+
--xeno-text: #edebe7;
|
|
179
|
+
--xeno-active: #d6d2cb;
|
|
180
|
+
--xeno-muted-text: #aaa59d;
|
|
181
|
+
--xeno-muted: #7f7a72;
|
|
182
|
+
--xeno-on-accent: #1c1b19;
|
|
183
|
+
--xeno-danger: oklch(0.64 0.15 25);
|
|
184
|
+
--xeno-danger-hover: oklch(0.58 0.15 25);
|
|
185
|
+
--xeno-danger-text: oklch(0.76 0.13 25);
|
|
186
|
+
--xeno-success-text: oklch(0.78 0.11 145);
|
|
187
|
+
--xeno-warning-text: oklch(0.8 0.11 75);
|
|
188
|
+
--xeno-info-text: oklch(0.78 0.11 250);
|
|
189
|
+
--xeno-scroll-rail: rgba(237, 235, 231, 0.06);
|
|
190
|
+
--xeno-scroll-thumb: rgba(237, 235, 231, 0.18);
|
|
191
|
+
--xeno-scroll-thumb-hover: rgba(237, 235, 231, 0.3);
|
|
192
|
+
--xeno-scroll-thumb-active: rgba(237, 235, 231, 0.44);
|
|
132
193
|
}
|
package/src/chrome-unified.css
CHANGED
|
@@ -26,30 +26,38 @@
|
|
|
26
26
|
* It is expressed ENTIRELY as values. Collapsing the gap to 0, painting the shell with the surface
|
|
27
27
|
* colour and making the plates transparent reproduces a single card exactly — same DOM, same
|
|
28
28
|
* components, no second implementation. That is the whole test for whether something may be a theme.
|
|
29
|
+
*
|
|
30
|
+
* The two extra selectors re-declare the same values on a THEMED scope inside Soft. A `var()` in a
|
|
31
|
+
* custom property is substituted where it is declared, so without them a light section inside a
|
|
32
|
+
* unified page inherited colours already computed from the root's dark ramp. Same fix, same reason,
|
|
33
|
+
* as the selector note in `chrome-separated.css`; no value here changed.
|
|
29
34
|
*/
|
|
30
|
-
[data-chrome='unified']
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
[data-chrome='unified'],
|
|
36
|
+
[data-chrome='unified'] .xeno[data-theme],
|
|
37
|
+
[data-chrome='unified'].xeno[data-theme] {
|
|
33
38
|
--xeno-chrome-shell: var(--xeno-surface);
|
|
34
39
|
--xeno-chrome-plate: transparent;
|
|
35
40
|
--xeno-chrome-body: transparent;
|
|
36
|
-
--xeno-chrome-divider: 1px solid var(--xeno-border);
|
|
37
41
|
--xeno-chrome-shadow: 0 12px 48px -16px rgba(0, 0, 0, 0.55);
|
|
42
|
+
/* Declared so Soft does NOT move (2026-11-22): `initial` makes each menu/picker use its own
|
|
43
|
+
fallback, i.e. exactly the shadow it drew before the token existed. */
|
|
44
|
+
--xeno-chrome-pop: initial;
|
|
45
|
+
--xeno-chrome-dialog-radius: var(--xeno-radius-card);
|
|
46
|
+
/* Soft keeps its buttons: weight 500 throughout, transparent outline. */
|
|
47
|
+
--xeno-chrome-btn-weight: 500;
|
|
48
|
+
--xeno-chrome-btn-outline-bg: transparent;
|
|
49
|
+
/* Soft keeps Inter and the system mono: `initial` falls through to fonts.css's own fallback. */
|
|
50
|
+
--xeno-chrome-font-sans: initial;
|
|
51
|
+
--xeno-chrome-font-mono: initial;
|
|
38
52
|
--xeno-chrome-radius: var(--xeno-radius-card);
|
|
39
|
-
|
|
40
|
-
/* No glass: a single clipped surface has nothing behind a plate to blur. */
|
|
41
|
-
--xeno-chrome-plate-filter: none;
|
|
42
|
-
/* The inverted primary this set already shipped — preserved, not corrected. */
|
|
43
|
-
/* The soft card this set shipped — surface, big radius, hairline, and a real shadow. */
|
|
53
|
+
/* The soft card this set shipped — surface, big radius, hairline, and a real shadow on elevated. */
|
|
44
54
|
--xeno-chrome-card-bg: var(--xeno-surface);
|
|
45
|
-
--xeno-chrome-card-border: 1px solid var(--xeno-border);
|
|
46
55
|
--xeno-chrome-card-radius: var(--xeno-radius-card);
|
|
47
56
|
--xeno-chrome-card-pad: 13px 15px;
|
|
48
57
|
--xeno-chrome-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
|
|
49
58
|
--xeno-chrome-card-lift: 0 8px 24px -10px rgba(0, 0, 0, 0.45);
|
|
50
59
|
|
|
51
60
|
/* Restores every pre-axis value exactly. Verified against the baseline, not eyeballed. */
|
|
52
|
-
--xeno-chrome-border: var(--xeno-border);
|
|
53
61
|
--xeno-chrome-panel-header-pad: 11px 15px;
|
|
54
62
|
--xeno-chrome-panel-header-min-h: auto;
|
|
55
63
|
--xeno-chrome-panel-body-pad: 15px;
|
|
@@ -59,14 +67,38 @@
|
|
|
59
67
|
--xeno-chrome-title-spacing: normal;
|
|
60
68
|
--xeno-chrome-dialog-header-pad: 16px 16px 12px 20px;
|
|
61
69
|
--xeno-chrome-dialog-title-size: 16px;
|
|
62
|
-
--xeno-chrome-dialog-title-weight: 600;
|
|
63
70
|
--xeno-chrome-dialog-body-pad: 4px 20px 20px;
|
|
64
71
|
--xeno-chrome-dialog-body-size: 14px;
|
|
65
72
|
--xeno-chrome-dialog-footer-pad: 12px 20px;
|
|
66
|
-
--xeno-chrome-dialog-footer-gap: 8px;
|
|
67
|
-
--xeno-chrome-card-elevated-bg: var(--xeno-elevated);
|
|
68
73
|
|
|
69
|
-
--xeno-chrome-btn-primary-bg: var(--xeno-text);
|
|
70
|
-
--xeno-chrome-btn-primary-fg: var(--xeno-on-accent);
|
|
71
74
|
--xeno-chrome-btn-radius: var(--xeno-radius-control);
|
|
75
|
+
|
|
76
|
+
/* 2026-11-09: Industrial took element details from the owner's design references. Each value below
|
|
77
|
+
is what Soft ALREADY rendered (read off the shared stylesheets before the change), so Soft looks
|
|
78
|
+
exactly as it did. Change them only if Soft wants the new look too. */
|
|
79
|
+
--xeno-chrome-chip-radius: var(--xeno-radius-control);
|
|
80
|
+
--xeno-chrome-textarea-radius: var(--xeno-radius-card);
|
|
81
|
+
--xeno-chrome-badge-h: 16px;
|
|
82
|
+
--xeno-chrome-badge-pad: 6px;
|
|
83
|
+
--xeno-chrome-badge-radius: var(--xeno-radius-sm);
|
|
84
|
+
--xeno-chrome-badge-family: inherit;
|
|
85
|
+
--xeno-chrome-badge-size: 10px;
|
|
86
|
+
--xeno-chrome-badge-weight: 600;
|
|
87
|
+
--xeno-chrome-badge-transform: uppercase;
|
|
88
|
+
--xeno-chrome-badge-spacing: 0.05em;
|
|
89
|
+
--xeno-chrome-badge-border-w: 1px;
|
|
90
|
+
--xeno-chrome-badge-bg: var(--xeno-surface);
|
|
91
|
+
--xeno-chrome-badge-tint: 0%;
|
|
92
|
+
--xeno-chrome-badge-tone-ground: var(--xeno-surface);
|
|
93
|
+
--xeno-chrome-badge-ink: 0%;
|
|
94
|
+
--xeno-chrome-badge-dot: 5px;
|
|
95
|
+
--xeno-chrome-seg-track: var(--xeno-surface);
|
|
96
|
+
--xeno-chrome-seg-track-border: var(--xeno-border);
|
|
97
|
+
--xeno-chrome-seg-thumb: var(--xeno-control);
|
|
98
|
+
/* Soft's chosen segment had no shadow; declared so it stays that way (2026-11-22). */
|
|
99
|
+
--xeno-chrome-seg-thumb-shadow: none;
|
|
100
|
+
--xeno-chrome-th-size: 0.85em;
|
|
101
|
+
--xeno-chrome-th-transform: none;
|
|
102
|
+
--xeno-chrome-th-spacing: normal;
|
|
103
|
+
--xeno-chrome-th-bg: transparent;
|
|
72
104
|
}
|