@xenosystem/elements-react 0.0.3 โ 0.0.5
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 +18 -18
- package/README.md +41 -41
- package/dist/containers/Chip.js +1 -1
- package/dist/containers/Panel.js +1 -1
- package/package.json +58 -58
- package/src/chrome-separated.css +132 -132
- package/src/chrome-unified.css +72 -72
- package/src/containers/Badges.css +116 -116
- package/src/containers/avatar.css +70 -70
- package/src/containers/card.css +75 -75
- package/src/containers/chip.css +103 -103
- package/src/containers/list-row.css +132 -132
- package/src/containers/message-bubble.css +112 -112
- package/src/containers/panel.css +125 -120
- package/src/containers/table.css +102 -102
- package/src/containers/tile.css +17 -17
- package/src/content/callout.css +77 -77
- package/src/content/caret.css +30 -30
- package/src/content/code-block.css +159 -159
- package/src/content/collapsible.css +80 -80
- package/src/content/inline-code.css +14 -14
- package/src/content/model-picker.css +219 -219
- package/src/content/source-card.css +99 -99
- package/src/content/sources-disclosure.css +118 -118
- package/src/controls.css +453 -453
- package/src/fonts.css +34 -34
- package/src/forms/Checkbox.css +114 -114
- package/src/forms/RadioGroup.css +115 -115
- package/src/goo.css +97 -97
- package/src/icon-motion.css +1909 -1909
- package/src/layout/ResizablePanel.css +79 -79
- package/src/nav/sidebar.css +296 -296
- package/src/overlays/date-time-picker.css +238 -238
- package/src/overlays/menu.css +195 -195
- package/src/overlays/modal.css +167 -167
- package/src/overlays/picker-field.css +81 -81
- package/src/overlays/pill-filter.css +129 -129
- package/src/overlays/reveal.css +56 -56
- package/src/overlays/segmented-control.css +185 -185
- package/src/overlays/tabs.css +143 -143
- package/src/overlays/tooltip.css +126 -126
- package/src/scrollbar.css +184 -184
- package/src/size.css +179 -179
- package/src/status/progress-bar.css +88 -88
- package/src/status/spinner.css +33 -33
- package/src/status/statusindicator.css +65 -65
- package/src/status/steptimeline.css +137 -137
- package/src/status/thinkingcube.css +75 -75
- package/src/xeno-element.css +60 -60
- package/src/xeno-elements.css +71 -71
- package/src/xeno-theme.css +112 -99
package/LICENSE
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
Copyright (c) 2026 XENO Corporation. All rights reserved.
|
|
2
|
-
|
|
3
|
-
PROPRIETARY AND CONFIDENTIAL.
|
|
4
|
-
|
|
5
|
-
This software and its source code are the confidential and proprietary property
|
|
6
|
-
of XENO Corporation. No licence, express or implied, is granted to any person to
|
|
7
|
-
use, copy, modify, merge, publish, distribute, sublicense, or sell copies of this
|
|
8
|
-
software, in whole or in part, without the prior written permission of XENO
|
|
9
|
-
Corporation.
|
|
10
|
-
|
|
11
|
-
Unauthorised copying of this file, via any medium, is strictly prohibited.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
15
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
16
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
17
|
-
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
18
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
Copyright (c) 2026 XENO Corporation. All rights reserved.
|
|
2
|
+
|
|
3
|
+
PROPRIETARY AND CONFIDENTIAL.
|
|
4
|
+
|
|
5
|
+
This software and its source code are the confidential and proprietary property
|
|
6
|
+
of XENO Corporation. No licence, express or implied, is granted to any person to
|
|
7
|
+
use, copy, modify, merge, publish, distribute, sublicense, or sell copies of this
|
|
8
|
+
software, in whole or in part, without the prior written permission of XENO
|
|
9
|
+
Corporation.
|
|
10
|
+
|
|
11
|
+
Unauthorised copying of this file, via any medium, is strictly prohibited.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
15
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
16
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
17
|
+
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
18
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
# @xenosystem/elements-react
|
|
2
|
-
|
|
3
|
-
**Web + Electron renderer**
|
|
4
|
-
|
|
5
|
-
> Status: ๐ต **planned** โ see [`../../SPEC.md`](../../SPEC.md) ยง13 for the build order.
|
|
6
|
-
|
|
7
|
-
Interprets `@xenosystem/elements` declarations as React components and web components.
|
|
8
|
-
|
|
9
|
-
**Not built yet** โ Phase 2. The contract lands first, deliberately (`SPEC.md` ยง13).
|
|
10
|
-
|
|
11
|
-
## When it is built, it must
|
|
12
|
-
|
|
13
|
-
1. **Honour every declared axis.** Silently ignoring one produces an element that looks
|
|
14
|
-
interactive and isn't โ the worst failure in the set.
|
|
15
|
-
2. **Never invent state.** No `pressed` binding in the declaration means pressed looks like idle.
|
|
16
|
-
3. **Map input modalities** per `docs/STATE-MODEL.md` ยง3 โ including the **agent** row, or
|
|
17
|
-
agent-driven UI diverges from what a human would have seen.
|
|
18
|
-
4. **Be visually indistinguishable** from every other renderer given the same declaration. Testable, and tested.
|
|
19
|
-
5. **Add nothing.** No renderer-local colours, timings or easing.
|
|
20
|
-
|
|
21
|
-
## Hard constraints
|
|
22
|
-
|
|
23
|
-
- **CSS-first, 0 kb runtime.** Axes become `data-*` attributes; bindings become CSS custom
|
|
24
|
-
properties and transitions. This diverges from the 2026 norm (@animateicons, LivelyIcons,
|
|
25
|
-
Itshover all build on `motion/react`) because XENO elements must run inside **sandboxed
|
|
26
|
-
iframes** and survive **web export**, where a JS animation runtime is weight in every sandbox
|
|
27
|
-
and a dependency that cannot be removed later.
|
|
28
|
-
- **`motion` is an opt-in entry point only** (`/motion`), for genuinely orchestrated cases โ
|
|
29
|
-
multi-step morphs, physics. ~4.6 kb with `m` + `LazyMotion` vs 34 kb naive. **Never a
|
|
30
|
-
dependency of the base renderer.**
|
|
31
|
-
- **No barrel.** Per-element entry points, `sideEffects: false`. A single index importing
|
|
32
|
-
everything is why `lucide-react` is 2.4 MB โ and `lucide-react/dynamic` collapses to an empty
|
|
33
|
-
chunk in production builds.
|
|
34
|
-
- **Base UI is an implementation detail here**, used for composite behaviour and accessibility.
|
|
35
|
-
It is never exposed as the system's foundation. (Radix stalled after the WorkOS acquisition;
|
|
36
|
-
Base UI reached v1.0 in Dec 2025 with full-time MUI engineering.)
|
|
37
|
-
- **Components are generated**, never hand-written. Editing one to fix a glyph means the
|
|
38
|
-
declaration is wrong.
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
Part of [`xeno-elements`](../../README.md). Visual authority: [`DESIGN_SYSTEM.md`](../../DESIGN_SYSTEM.md) โ LOCKED.
|
|
1
|
+
# @xenosystem/elements-react
|
|
2
|
+
|
|
3
|
+
**Web + Electron renderer**
|
|
4
|
+
|
|
5
|
+
> Status: ๐ต **planned** โ see [`../../SPEC.md`](../../SPEC.md) ยง13 for the build order.
|
|
6
|
+
|
|
7
|
+
Interprets `@xenosystem/elements` declarations as React components and web components.
|
|
8
|
+
|
|
9
|
+
**Not built yet** โ Phase 2. The contract lands first, deliberately (`SPEC.md` ยง13).
|
|
10
|
+
|
|
11
|
+
## When it is built, it must
|
|
12
|
+
|
|
13
|
+
1. **Honour every declared axis.** Silently ignoring one produces an element that looks
|
|
14
|
+
interactive and isn't โ the worst failure in the set.
|
|
15
|
+
2. **Never invent state.** No `pressed` binding in the declaration means pressed looks like idle.
|
|
16
|
+
3. **Map input modalities** per `docs/STATE-MODEL.md` ยง3 โ including the **agent** row, or
|
|
17
|
+
agent-driven UI diverges from what a human would have seen.
|
|
18
|
+
4. **Be visually indistinguishable** from every other renderer given the same declaration. Testable, and tested.
|
|
19
|
+
5. **Add nothing.** No renderer-local colours, timings or easing.
|
|
20
|
+
|
|
21
|
+
## Hard constraints
|
|
22
|
+
|
|
23
|
+
- **CSS-first, 0 kb runtime.** Axes become `data-*` attributes; bindings become CSS custom
|
|
24
|
+
properties and transitions. This diverges from the 2026 norm (@animateicons, LivelyIcons,
|
|
25
|
+
Itshover all build on `motion/react`) because XENO elements must run inside **sandboxed
|
|
26
|
+
iframes** and survive **web export**, where a JS animation runtime is weight in every sandbox
|
|
27
|
+
and a dependency that cannot be removed later.
|
|
28
|
+
- **`motion` is an opt-in entry point only** (`/motion`), for genuinely orchestrated cases โ
|
|
29
|
+
multi-step morphs, physics. ~4.6 kb with `m` + `LazyMotion` vs 34 kb naive. **Never a
|
|
30
|
+
dependency of the base renderer.**
|
|
31
|
+
- **No barrel.** Per-element entry points, `sideEffects: false`. A single index importing
|
|
32
|
+
everything is why `lucide-react` is 2.4 MB โ and `lucide-react/dynamic` collapses to an empty
|
|
33
|
+
chunk in production builds.
|
|
34
|
+
- **Base UI is an implementation detail here**, used for composite behaviour and accessibility.
|
|
35
|
+
It is never exposed as the system's foundation. (Radix stalled after the WorkOS acquisition;
|
|
36
|
+
Base UI reached v1.0 in Dec 2025 with full-time MUI engineering.)
|
|
37
|
+
- **Components are generated**, never hand-written. Editing one to fix a glyph means the
|
|
38
|
+
declaration is wrong.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
Part of [`xeno-elements`](../../README.md). Visual authority: [`DESIGN_SYSTEM.md`](../../DESIGN_SYSTEM.md) โ LOCKED.
|
package/dist/containers/Chip.js
CHANGED
|
@@ -7,7 +7,7 @@ export function Chip({ children, leadingIcon, selected = false, onSelectedChange
|
|
|
7
7
|
const glyph = iconPx(size);
|
|
8
8
|
const selectable = onSelectedChange !== undefined;
|
|
9
9
|
const inner = (_jsxs(_Fragment, { children: [leadingIcon && _jsx(XenoElement, { decl: leadingIcon, size: glyph }), children != null && _jsx("span", { className: "xeno-chip-label", children: children })] }));
|
|
10
|
-
return (_jsxs("span", { className: cx('xeno-chip', className), "data-selection": selected ? 'on' : 'off', "data-availability": availability, "data-removable": onRemove ? 'true' : undefined, ...sizeAttr(size), ...rest, children: [selectable ? (_jsx("button", { type: "button", className: "xeno-chip-body xeno-chip-select", "aria-pressed": selected, disabled: disabled, onClick: (e) => {
|
|
10
|
+
return (_jsxs("span", { className: cx('xeno-chip', className), "data-selection": selected ? 'on' : 'off', "data-availability": availability, "data-removable": onRemove ? 'true' : undefined, "aria-disabled": disabled || undefined, ...sizeAttr(size), ...rest, children: [selectable ? (_jsx("button", { type: "button", className: "xeno-chip-body xeno-chip-select", "aria-pressed": selected, disabled: disabled, onClick: (e) => {
|
|
11
11
|
if (!e.defaultPrevented)
|
|
12
12
|
onSelectedChange?.(!selected);
|
|
13
13
|
}, children: inner })) : (_jsx("span", { className: "xeno-chip-body", children: inner })), onRemove && (_jsx("button", { type: "button", className: "xeno-chip-remove", "aria-label": removeLabel, disabled: disabled, onClick: (e) => {
|
package/dist/containers/Panel.js
CHANGED
|
@@ -2,5 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { cx } from '../controls/util.js';
|
|
3
3
|
export function Panel({ title, actions, footer, className, children, ...rest }) {
|
|
4
4
|
const hasHeader = title !== undefined || actions !== undefined;
|
|
5
|
-
return (_jsxs("div", { className: cx('xeno-panel', className), ...rest, children: [hasHeader && (_jsxs("div", { className: "xeno-panel-header", children: [title !== undefined && _jsx("div", { className: "xeno-panel-title", children: title }), actions !== undefined && _jsx("div", { className: "xeno-panel-actions", children: actions })] })), _jsx("div", { className: "xeno-panel-body", children: children }), footer !== undefined && _jsx("div", { className: "xeno-panel-footer", children: footer })] }));
|
|
5
|
+
return (_jsxs("div", { className: cx('xeno-panel', className), ...rest, children: [hasHeader && (_jsxs("div", { className: "xeno-panel-header", children: [title !== undefined && _jsx("div", { className: "xeno-panel-title", children: title }), actions !== undefined && _jsx("div", { className: "xeno-panel-actions", children: actions })] })), _jsx("div", { className: "xeno-panel-body", tabIndex: 0, role: "region", "aria-label": typeof title === 'string' ? title : 'Panel content', children: children }), footer !== undefined && _jsx("div", { className: "xeno-panel-footer", children: footer })] }));
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@xenosystem/elements-react",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"license": "UNLICENSED",
|
|
5
|
-
"description": "The XENO web renderer โ interprets element declarations as React/SVG. CSS-first, 0 kb runtime.",
|
|
6
|
-
"author": "XENO Corporation <emilian@bnkrsys.com>",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "./dist/index.js",
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"sideEffects": [
|
|
11
|
-
"*.css"
|
|
12
|
-
],
|
|
13
|
-
"exports": {
|
|
14
|
-
".": {
|
|
15
|
-
"types": "./dist/index.d.ts",
|
|
16
|
-
"default": "./dist/index.js"
|
|
17
|
-
},
|
|
18
|
-
"./xeno-element.css": "./src/xeno-element.css",
|
|
19
|
-
"./xeno-theme.css": "./src/xeno-theme.css",
|
|
20
|
-
"./controls.css": "./src/controls.css",
|
|
21
|
-
"./xeno-elements.css": "./src/xeno-elements.css",
|
|
22
|
-
"./fonts.css": "./src/fonts.css"
|
|
23
|
-
},
|
|
24
|
-
"files": [
|
|
25
|
-
"dist",
|
|
26
|
-
"src/xeno-element.css",
|
|
27
|
-
"src/xeno-theme.css",
|
|
28
|
-
"src/controls.css",
|
|
29
|
-
"src/xeno-elements.css",
|
|
30
|
-
"src/**/*.css",
|
|
31
|
-
"LICENSE"
|
|
32
|
-
],
|
|
33
|
-
"scripts": {
|
|
34
|
-
"prebuild": "npm run build -w @xenosystem/elements && npm run build -w @xenosystem/generate",
|
|
35
|
-
"build": "tsc -p tsconfig.json",
|
|
36
|
-
"pretypecheck": "npm run build -w @xenosystem/elements && npm run build -w @xenosystem/generate",
|
|
37
|
-
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
|
|
38
|
-
"test": "vitest run"
|
|
39
|
-
},
|
|
40
|
-
"peerDependencies": {
|
|
41
|
-
"react": ">=18"
|
|
42
|
-
},
|
|
43
|
-
"dependencies": {
|
|
44
|
-
"@fontsource-variable/inter": "^5.3.0",
|
|
45
|
-
"@xenosystem/elements": "0.0.
|
|
46
|
-
"@xenosystem/generate": "0.0.
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@types/react": "^19.0.0",
|
|
50
|
-
"@types/react-dom": "^19.0.0",
|
|
51
|
-
"react": "^19.0.0",
|
|
52
|
-
"react-dom": "^19.0.0",
|
|
53
|
-
"typescript": "^5.4.0"
|
|
54
|
-
},
|
|
55
|
-
"publishConfig": {
|
|
56
|
-
"access": "public"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@xenosystem/elements-react",
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"license": "UNLICENSED",
|
|
5
|
+
"description": "The XENO web renderer โ interprets element declarations as React/SVG. CSS-first, 0 kb runtime.",
|
|
6
|
+
"author": "XENO Corporation <emilian@bnkrsys.com>",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"sideEffects": [
|
|
11
|
+
"*.css"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./xeno-element.css": "./src/xeno-element.css",
|
|
19
|
+
"./xeno-theme.css": "./src/xeno-theme.css",
|
|
20
|
+
"./controls.css": "./src/controls.css",
|
|
21
|
+
"./xeno-elements.css": "./src/xeno-elements.css",
|
|
22
|
+
"./fonts.css": "./src/fonts.css"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"src/xeno-element.css",
|
|
27
|
+
"src/xeno-theme.css",
|
|
28
|
+
"src/controls.css",
|
|
29
|
+
"src/xeno-elements.css",
|
|
30
|
+
"src/**/*.css",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"prebuild": "npm run build -w @xenosystem/elements && npm run build -w @xenosystem/generate",
|
|
35
|
+
"build": "tsc -p tsconfig.json",
|
|
36
|
+
"pretypecheck": "npm run build -w @xenosystem/elements && npm run build -w @xenosystem/generate",
|
|
37
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
|
|
38
|
+
"test": "vitest run"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"react": ">=18"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@fontsource-variable/inter": "^5.3.0",
|
|
45
|
+
"@xenosystem/elements": "0.0.5",
|
|
46
|
+
"@xenosystem/generate": "0.0.5"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/react": "^19.0.0",
|
|
50
|
+
"@types/react-dom": "^19.0.0",
|
|
51
|
+
"react": "^19.0.0",
|
|
52
|
+
"react-dom": "^19.0.0",
|
|
53
|
+
"typescript": "^5.4.0"
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public"
|
|
57
|
+
}
|
|
58
|
+
}
|
package/src/chrome-separated.css
CHANGED
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
3
|
-
* OWNED FILE โ INDUSTRIAL (`separated`)
|
|
4
|
-
* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
5
|
-
*
|
|
6
|
-
* One construction, one file, one owner, so the two can be worked on in parallel without either
|
|
7
|
-
* side touching the other's values. Everything a construction decides lives HERE โ colours, box
|
|
8
|
-
* metrics, typography, radii. Nothing construction-specific belongs in a component stylesheet or
|
|
9
|
-
* in `xeno-theme.css`, because those are shared and a change there hits BOTH looks.
|
|
10
|
-
*
|
|
11
|
-
* THE CONTRACT BETWEEN THE TWO FILES, enforced by `theme.test.ts`:
|
|
12
|
-
* 1. Every token declared in `chrome-separated.css` must also be declared here, and vice versa.
|
|
13
|
-
* Adding one on your side and not telling the other side is the failure mode โ the missing
|
|
14
|
-
* one silently inherits the other construction's value and half-renders.
|
|
15
|
-
* 2. Every token must actually DIFFER between the two files. If a value is the same in both, it
|
|
16
|
-
* is not a construction decision: move it to the shared base.
|
|
17
|
-
*
|
|
18
|
-
* So adding a token is a two-file change and the suite will say so. That is deliberate: it is the
|
|
19
|
-
* cheapest possible coordination between two people editing in parallel.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/* โโ CHROME: construction, not colour โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
23
|
-
* A THIRD axis, orthogonal to `data-theme` (colour ramp) and `data-surface` (density). It needs its
|
|
24
|
-
* own attribute: `data-theme` already carries `light`, and one attribute cannot hold two orthogonal
|
|
25
|
-
* values โ you would lose "industrial + light".
|
|
26
|
-
*
|
|
27
|
-
* ๐ด DECLARED ON `:root`, NOT ON `.xeno`, and that is load-bearing rather than tidy.
|
|
28
|
-
*
|
|
29
|
-
* `.xeno` is a SCOPE MARKER โ an app nests it (a section that wants the light ramp is a `.xeno` with
|
|
30
|
-
* `data-theme`), and the playground nests seven. A custom property resolves from the NEAREST
|
|
31
|
-
* declaring ancestor, so while these lived on `.xeno` every nested scope silently re-declared them at
|
|
32
|
-
* the default and the root's `data-chrome` never reached a single component. The axis appeared to do
|
|
33
|
-
* nothing, which is exactly what it did.
|
|
34
|
-
*
|
|
35
|
-
* On `:root` the defaults are declared once. `[data-chrome=โฆ]` is attribute-only so it applies to
|
|
36
|
-
* whatever element carries it โ html, an app wrapper, or one subtree โ and wins for its descendants
|
|
37
|
-
* by proximity without needing to out-specify anything.
|
|
38
|
-
*
|
|
39
|
-
* DEFAULT = separated, because `DESIGN_SYSTEM.md` ยง"Panel Structure" requires it.
|
|
40
|
-
*/
|
|
41
|
-
:root {
|
|
42
|
-
/* โโ CHROME: construction, not colour โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
43
|
-
* A THIRD axis, orthogonal to `data-theme` (colour ramp) and `data-surface` (density). It has to
|
|
44
|
-
* be its own attribute: `data-theme` already carries `light`, and one attribute cannot hold two
|
|
45
|
-
* orthogonal values โ you would lose "industrial + light". Same lesson as RFC 0003.
|
|
46
|
-
*
|
|
47
|
-
* Every chrome-bearing element reads these instead of hardcoding. That is what lets ONE DOM render
|
|
48
|
-
* as either construction: no component knows a theme exists, and nothing is built twice.
|
|
49
|
-
*
|
|
50
|
-
* DEFAULT = separated, because `DESIGN_SYSTEM.md` ยง"Panel Structure" requires it ("They are NOT
|
|
51
|
-
* merged into a single container"). `unified` is the opt-in.
|
|
52
|
-
*/
|
|
53
|
-
/*
|
|
54
|
-
* 6 / 2 / 6 / 4, from `xeno-tools/packages/tool-kit/src/ui/Plate.tsx` โ "the canonical panel chrome,
|
|
55
|
-
* ported from xeno-motion's dialogs, the pattern the design language actually resolves to across 10
|
|
56
|
-
* of Motion's 12 dialogs."
|
|
57
|
-
*
|
|
58
|
-
* โ ๏ธ FIXED, not responsive. Motion and Pixel DO use `clamp()` โ but only in `index.css`, for the
|
|
59
|
-
* DOCKVIEW panel chrome, where a docked panel scales with the viewport. A floating dialog or a tool
|
|
60
|
-
* panel does not, and `Plate` pins 6/4/2. An earlier version of this file generalised the wrong one.
|
|
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
|
-
--xeno-chrome-body: var(--xeno-viewport);
|
|
70
|
-
/* Separation is the gap, so no divider line is drawn. */
|
|
71
|
-
--xeno-chrome-divider: none;
|
|
72
|
-
/* ยง"Modals / Overlays": "the backdrop provides the separation." */
|
|
73
|
-
--xeno-chrome-shadow: none;
|
|
74
|
-
--xeno-chrome-radius: 6px;
|
|
75
|
-
/*
|
|
76
|
-
* DERIVED, not picked from the scale โ `Plate` rounds its shell 6px and its children 4px. Two
|
|
77
|
-
* rounded rects offset by a constant stay parallel only if the inner radius drops by that offset,
|
|
78
|
-
* so this is geometry rather than taste. An earlier version chose `sm` off the radius scale because
|
|
79
|
-
* "4 is not in the scale"; the scale was never the right source for this number.
|
|
80
|
-
*/
|
|
81
|
-
--xeno-chrome-radius-plate: calc(var(--xeno-chrome-radius) - 2px);
|
|
82
|
-
/* The glass on the header plate. Both reference apps, identical values. */
|
|
83
|
-
--xeno-chrome-plate-filter: blur(14px) saturate(120%);
|
|
84
|
-
/*
|
|
85
|
-
* Button emphasis. The playbook: "Emphasis comes from surface lightness and text brightness. Never
|
|
86
|
-
* from hue." Separated follows the reference โ primary is the lightest SURFACE with bright text,
|
|
87
|
-
* not an inverted fill. On the chrome axis rather than the base so `unified` keeps the inverted
|
|
88
|
-
* treatment this set already shipped; a button is a button, but which reading of "emphasis" applies
|
|
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. */
|
|
105
|
-
--xeno-chrome-card-lift: none;
|
|
106
|
-
|
|
107
|
-
/*
|
|
108
|
-
* Typography and box metrics DIFFER between the constructions, so they belong on the axis too. An
|
|
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;
|
|
115
|
-
--xeno-chrome-panel-body-pad: 12px;
|
|
116
|
-
--xeno-chrome-title-size: 11px;
|
|
117
|
-
--xeno-chrome-title-color: var(--xeno-muted);
|
|
118
|
-
--xeno-chrome-title-transform: uppercase;
|
|
119
|
-
--xeno-chrome-title-spacing: 0.08em;
|
|
120
|
-
--xeno-chrome-dialog-header-pad: 6px 12px;
|
|
121
|
-
--xeno-chrome-dialog-title-size: 11px;
|
|
122
|
-
--xeno-chrome-dialog-title-weight: 500;
|
|
123
|
-
--xeno-chrome-dialog-body-pad: 12px;
|
|
124
|
-
--xeno-chrome-dialog-body-size: 12px;
|
|
125
|
-
--xeno-chrome-dialog-footer-pad: 6px;
|
|
126
|
-
--xeno-chrome-dialog-footer-gap: 6px;
|
|
127
|
-
--xeno-chrome-card-elevated-bg: var(--xeno-chrome-card-bg);
|
|
128
|
-
|
|
129
|
-
--xeno-chrome-btn-primary-bg: var(--xeno-control);
|
|
130
|
-
--xeno-chrome-btn-primary-fg: var(--xeno-text);
|
|
131
|
-
--xeno-chrome-btn-radius: var(--xeno-radius-xs);
|
|
132
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
3
|
+
* OWNED FILE โ INDUSTRIAL (`separated`)
|
|
4
|
+
* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
5
|
+
*
|
|
6
|
+
* One construction, one file, one owner, so the two can be worked on in parallel without either
|
|
7
|
+
* side touching the other's values. Everything a construction decides lives HERE โ colours, box
|
|
8
|
+
* metrics, typography, radii. Nothing construction-specific belongs in a component stylesheet or
|
|
9
|
+
* in `xeno-theme.css`, because those are shared and a change there hits BOTH looks.
|
|
10
|
+
*
|
|
11
|
+
* THE CONTRACT BETWEEN THE TWO FILES, enforced by `theme.test.ts`:
|
|
12
|
+
* 1. Every token declared in `chrome-separated.css` must also be declared here, and vice versa.
|
|
13
|
+
* Adding one on your side and not telling the other side is the failure mode โ the missing
|
|
14
|
+
* one silently inherits the other construction's value and half-renders.
|
|
15
|
+
* 2. Every token must actually DIFFER between the two files. If a value is the same in both, it
|
|
16
|
+
* is not a construction decision: move it to the shared base.
|
|
17
|
+
*
|
|
18
|
+
* So adding a token is a two-file change and the suite will say so. That is deliberate: it is the
|
|
19
|
+
* cheapest possible coordination between two people editing in parallel.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/* โโ CHROME: construction, not colour โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
23
|
+
* A THIRD axis, orthogonal to `data-theme` (colour ramp) and `data-surface` (density). It needs its
|
|
24
|
+
* own attribute: `data-theme` already carries `light`, and one attribute cannot hold two orthogonal
|
|
25
|
+
* values โ you would lose "industrial + light".
|
|
26
|
+
*
|
|
27
|
+
* ๐ด DECLARED ON `:root`, NOT ON `.xeno`, and that is load-bearing rather than tidy.
|
|
28
|
+
*
|
|
29
|
+
* `.xeno` is a SCOPE MARKER โ an app nests it (a section that wants the light ramp is a `.xeno` with
|
|
30
|
+
* `data-theme`), and the playground nests seven. A custom property resolves from the NEAREST
|
|
31
|
+
* declaring ancestor, so while these lived on `.xeno` every nested scope silently re-declared them at
|
|
32
|
+
* the default and the root's `data-chrome` never reached a single component. The axis appeared to do
|
|
33
|
+
* nothing, which is exactly what it did.
|
|
34
|
+
*
|
|
35
|
+
* On `:root` the defaults are declared once. `[data-chrome=โฆ]` is attribute-only so it applies to
|
|
36
|
+
* whatever element carries it โ html, an app wrapper, or one subtree โ and wins for its descendants
|
|
37
|
+
* by proximity without needing to out-specify anything.
|
|
38
|
+
*
|
|
39
|
+
* DEFAULT = separated, because `DESIGN_SYSTEM.md` ยง"Panel Structure" requires it.
|
|
40
|
+
*/
|
|
41
|
+
:root {
|
|
42
|
+
/* โโ CHROME: construction, not colour โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
43
|
+
* A THIRD axis, orthogonal to `data-theme` (colour ramp) and `data-surface` (density). It has to
|
|
44
|
+
* be its own attribute: `data-theme` already carries `light`, and one attribute cannot hold two
|
|
45
|
+
* orthogonal values โ you would lose "industrial + light". Same lesson as RFC 0003.
|
|
46
|
+
*
|
|
47
|
+
* Every chrome-bearing element reads these instead of hardcoding. That is what lets ONE DOM render
|
|
48
|
+
* as either construction: no component knows a theme exists, and nothing is built twice.
|
|
49
|
+
*
|
|
50
|
+
* DEFAULT = separated, because `DESIGN_SYSTEM.md` ยง"Panel Structure" requires it ("They are NOT
|
|
51
|
+
* merged into a single container"). `unified` is the opt-in.
|
|
52
|
+
*/
|
|
53
|
+
/*
|
|
54
|
+
* 6 / 2 / 6 / 4, from `xeno-tools/packages/tool-kit/src/ui/Plate.tsx` โ "the canonical panel chrome,
|
|
55
|
+
* ported from xeno-motion's dialogs, the pattern the design language actually resolves to across 10
|
|
56
|
+
* of Motion's 12 dialogs."
|
|
57
|
+
*
|
|
58
|
+
* โ ๏ธ FIXED, not responsive. Motion and Pixel DO use `clamp()` โ but only in `index.css`, for the
|
|
59
|
+
* DOCKVIEW panel chrome, where a docked panel scales with the viewport. A floating dialog or a tool
|
|
60
|
+
* panel does not, and `Plate` pins 6/4/2. An earlier version of this file generalised the wrong one.
|
|
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
|
+
--xeno-chrome-body: var(--xeno-viewport);
|
|
70
|
+
/* Separation is the gap, so no divider line is drawn. */
|
|
71
|
+
--xeno-chrome-divider: none;
|
|
72
|
+
/* ยง"Modals / Overlays": "the backdrop provides the separation." */
|
|
73
|
+
--xeno-chrome-shadow: none;
|
|
74
|
+
--xeno-chrome-radius: 6px;
|
|
75
|
+
/*
|
|
76
|
+
* DERIVED, not picked from the scale โ `Plate` rounds its shell 6px and its children 4px. Two
|
|
77
|
+
* rounded rects offset by a constant stay parallel only if the inner radius drops by that offset,
|
|
78
|
+
* so this is geometry rather than taste. An earlier version chose `sm` off the radius scale because
|
|
79
|
+
* "4 is not in the scale"; the scale was never the right source for this number.
|
|
80
|
+
*/
|
|
81
|
+
--xeno-chrome-radius-plate: calc(var(--xeno-chrome-radius) - 2px);
|
|
82
|
+
/* The glass on the header plate. Both reference apps, identical values. */
|
|
83
|
+
--xeno-chrome-plate-filter: blur(14px) saturate(120%);
|
|
84
|
+
/*
|
|
85
|
+
* Button emphasis. The playbook: "Emphasis comes from surface lightness and text brightness. Never
|
|
86
|
+
* from hue." Separated follows the reference โ primary is the lightest SURFACE with bright text,
|
|
87
|
+
* not an inverted fill. On the chrome axis rather than the base so `unified` keeps the inverted
|
|
88
|
+
* treatment this set already shipped; a button is a button, but which reading of "emphasis" applies
|
|
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. */
|
|
105
|
+
--xeno-chrome-card-lift: none;
|
|
106
|
+
|
|
107
|
+
/*
|
|
108
|
+
* Typography and box metrics DIFFER between the constructions, so they belong on the axis too. An
|
|
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;
|
|
115
|
+
--xeno-chrome-panel-body-pad: 12px;
|
|
116
|
+
--xeno-chrome-title-size: 11px;
|
|
117
|
+
--xeno-chrome-title-color: var(--xeno-muted-text);
|
|
118
|
+
--xeno-chrome-title-transform: uppercase;
|
|
119
|
+
--xeno-chrome-title-spacing: 0.08em;
|
|
120
|
+
--xeno-chrome-dialog-header-pad: 6px 12px;
|
|
121
|
+
--xeno-chrome-dialog-title-size: 11px;
|
|
122
|
+
--xeno-chrome-dialog-title-weight: 500;
|
|
123
|
+
--xeno-chrome-dialog-body-pad: 12px;
|
|
124
|
+
--xeno-chrome-dialog-body-size: 12px;
|
|
125
|
+
--xeno-chrome-dialog-footer-pad: 6px;
|
|
126
|
+
--xeno-chrome-dialog-footer-gap: 6px;
|
|
127
|
+
--xeno-chrome-card-elevated-bg: var(--xeno-chrome-card-bg);
|
|
128
|
+
|
|
129
|
+
--xeno-chrome-btn-primary-bg: var(--xeno-control);
|
|
130
|
+
--xeno-chrome-btn-primary-fg: var(--xeno-text);
|
|
131
|
+
--xeno-chrome-btn-radius: var(--xeno-radius-xs);
|
|
132
|
+
}
|