@xenosystem/elements-react 0.0.8 โ†’ 0.0.10

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 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenosystem/elements-react",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
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>",
@@ -42,8 +42,8 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@fontsource-variable/inter": "^5.3.0",
45
- "@xenosystem/elements": "0.0.8",
46
- "@xenosystem/generate": "0.0.8"
45
+ "@xenosystem/elements": "0.0.10",
46
+ "@xenosystem/generate": "0.0.10"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/react": "^19.0.0",
@@ -1052,6 +1052,37 @@
1052
1052
  vector-effect: var(--part-vfx, none);
1053
1053
  }
1054
1054
 
1055
+ /* ---- The third trigger: LIVE ------------------------------------------------ */
1056
+
1057
+ /* Hover and selection both answer to a GESTURE, and both play the animation ONCE. A glyph that stands for
1058
+ * something the machine is doing right now โ€” a search that is searching, a pencil that is writing, a
1059
+ * terminal with a command in it โ€” has no gesture to answer to and no single moment to mark. It is live for
1060
+ * as long as the step runs, and the motion has to run with it.
1061
+ *
1062
+ * `data-motion="live"`, on the element itself or on a host that wraps it, plays the glyph's OWN animation on
1063
+ * a loop โ€” the same keyframes hover would play, so a live pencil writes the way a hovered pencil writes, only
1064
+ * without stopping. Nothing is re-authored per glyph: the meaning of each animation was decided once, above.
1065
+ *
1066
+ * It exists because the XENO Agent transcript (`XENO AGENT PANEL - SPEC.md` D10) draws every step's
1067
+ * marker as its family's glyph, bare and breathing while the step runs, and had to reproduce the two
1068
+ * trigger lists locally to get a loop โ€” a copy of a copy, which is what this file was written to end.
1069
+ *
1070
+ * Specificity zero, like the other two, so a consumer rule still wins; and a live loop is still switched
1071
+ * off entirely under prefers-reduced-motion, by the rule at the end of this file.
1072
+ */
1073
+ :where(
1074
+ .xeno-element[data-glyph][data-motion='live'],
1075
+ [data-motion='live'] .xeno-element[data-glyph]
1076
+ ) { animation: var(--xeno-icon-anim) var(--xeno-icon-dur) var(--xeno-icon-ease) infinite; }
1077
+
1078
+ :where(
1079
+ .xeno-element[data-glyph][data-motion='live'],
1080
+ [data-motion='live'] .xeno-element[data-glyph]
1081
+ ) .xeno-part {
1082
+ animation: var(--part-anim) var(--part-dur) var(--xeno-icon-ease) infinite;
1083
+ vector-effect: var(--part-vfx, none);
1084
+ }
1085
+
1055
1086
  /* โ”€โ”€ The transport set: play / pause / stop โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
1056
1087
  One control in three states, so the three animations are one idea told three ways: play LEANS the way
1057
1088
  it is going, pause takes the weight on both feet, stop lands. Same 460ms for all three, because they
@@ -1903,6 +1934,25 @@
1903
1934
  }
1904
1935
 
1905
1936
  /* ---- Accessibility: honor reduced-motion ----------------------------------- */
1937
+ /* keyboard (parts) โ€” three keys go down one after another, left to right, and the space bar last: typing,
1938
+ as a hand does it. Part[0] is the frame and holds still; a keyboard that bounced would be a key. */
1939
+ .xeno-element[data-glyph='keyboard'] .xeno-part[data-part='1'] { --part-anim: xeno-pt-key-1; --part-dur: 640ms; }
1940
+ .xeno-element[data-glyph='keyboard'] .xeno-part[data-part='2'] { --part-anim: xeno-pt-key-2; --part-dur: 640ms; }
1941
+ .xeno-element[data-glyph='keyboard'] .xeno-part[data-part='3'] { --part-anim: xeno-pt-key-3; --part-dur: 640ms; }
1942
+ .xeno-element[data-glyph='keyboard'] .xeno-part[data-part='4'] { --part-anim: xeno-pt-key-4; --part-dur: 640ms; }
1943
+ @keyframes xeno-pt-key-1 { 0%, 10% { transform: translateY(0); } 22% { transform: translateY(0.9px); } 36%, 100% { transform: translateY(0); } }
1944
+ @keyframes xeno-pt-key-2 { 0%, 26% { transform: translateY(0); } 38% { transform: translateY(0.9px); } 52%, 100% { transform: translateY(0); } }
1945
+ @keyframes xeno-pt-key-3 { 0%, 42% { transform: translateY(0); } 54% { transform: translateY(0.9px); } 68%, 100% { transform: translateY(0); } }
1946
+ @keyframes xeno-pt-key-4 { 0%, 60% { transform: translateY(0); } 74% { transform: translateY(0.9px); } 90%, 100% { transform: translateY(0); } }
1947
+
1948
+ /* cursor-click (parts) โ€” the pointer presses (a nudge down and to the right, the way it is pointing) and the
1949
+ ticks at its tip flare once at the bottom of the press: the click is the moment the ticks appear. */
1950
+ .xeno-element[data-glyph='cursor-click'] .xeno-part[data-part='0'] { --part-anim: xeno-pt-click-press; --part-dur: 560ms; }
1951
+ .xeno-element[data-glyph='cursor-click'] .xeno-part[data-part='1'],
1952
+ .xeno-element[data-glyph='cursor-click'] .xeno-part[data-part='2'] { --part-anim: xeno-pt-click-tick; --part-dur: 560ms; transform-box: view-box; transform-origin: 8px 8px; }
1953
+ @keyframes xeno-pt-click-press { 0% { transform: translate(0, 0); } 30% { transform: translate(0.6px, 0.6px); } 60%, 100% { transform: translate(0, 0); } }
1954
+ @keyframes xeno-pt-click-tick { 0%, 24% { opacity: 0.35; transform: scale(0.6); } 40% { opacity: 1; transform: scale(1.15); } 70%, 100% { opacity: 1; transform: scale(1); } }
1955
+
1906
1956
  @media (prefers-reduced-motion: reduce) {
1907
1957
  .xeno-element[data-glyph],
1908
1958
  .xeno-element[data-glyph] .xeno-part { animation: none !important; }