@xenosystem/elements-react 0.0.7 → 0.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenosystem/elements-react",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
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>",
@@ -32,7 +32,7 @@
32
32
  ],
33
33
  "scripts": {
34
34
  "prebuild": "npm run build -w @xenosystem/elements && npm run build -w @xenosystem/generate",
35
- "build": "tsc -p tsconfig.json",
35
+ "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json",
36
36
  "pretypecheck": "npm run build -w @xenosystem/elements && npm run build -w @xenosystem/generate",
37
37
  "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
38
38
  "test": "vitest run"
@@ -42,8 +42,8 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@fontsource-variable/inter": "^5.3.0",
45
- "@xenosystem/elements": "0.0.7",
46
- "@xenosystem/generate": "0.0.7"
45
+ "@xenosystem/elements": "0.0.9",
46
+ "@xenosystem/generate": "0.0.9"
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; }