@xenosystem/elements 0.0.1

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.
Files changed (223) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +65 -0
  3. package/dist/elements/alert.d.ts +7 -0
  4. package/dist/elements/alert.js +20 -0
  5. package/dist/elements/app-window.d.ts +12 -0
  6. package/dist/elements/app-window.js +26 -0
  7. package/dist/elements/archive.d.ts +22 -0
  8. package/dist/elements/archive.js +40 -0
  9. package/dist/elements/arrow-left-right.d.ts +13 -0
  10. package/dist/elements/arrow-left-right.js +25 -0
  11. package/dist/elements/arrow-right.d.ts +7 -0
  12. package/dist/elements/arrow-right.js +18 -0
  13. package/dist/elements/arrow-up-right.d.ts +15 -0
  14. package/dist/elements/arrow-up-right.js +27 -0
  15. package/dist/elements/arrow-up.d.ts +7 -0
  16. package/dist/elements/arrow-up.js +18 -0
  17. package/dist/elements/attach.d.ts +7 -0
  18. package/dist/elements/attach.js +18 -0
  19. package/dist/elements/bell.d.ts +7 -0
  20. package/dist/elements/bell.js +19 -0
  21. package/dist/elements/bookmark.d.ts +14 -0
  22. package/dist/elements/bookmark.js +28 -0
  23. package/dist/elements/bot.d.ts +20 -0
  24. package/dist/elements/bot.js +35 -0
  25. package/dist/elements/brain-circuit.d.ts +24 -0
  26. package/dist/elements/brain-circuit.js +43 -0
  27. package/dist/elements/brain.d.ts +23 -0
  28. package/dist/elements/brain.js +38 -0
  29. package/dist/elements/briefcase.d.ts +14 -0
  30. package/dist/elements/briefcase.js +27 -0
  31. package/dist/elements/building.d.ts +15 -0
  32. package/dist/elements/building.js +34 -0
  33. package/dist/elements/calendar.d.ts +11 -0
  34. package/dist/elements/calendar.js +25 -0
  35. package/dist/elements/check-square.d.ts +13 -0
  36. package/dist/elements/check-square.js +25 -0
  37. package/dist/elements/check.d.ts +7 -0
  38. package/dist/elements/check.js +18 -0
  39. package/dist/elements/chevron-down.d.ts +7 -0
  40. package/dist/elements/chevron-down.js +18 -0
  41. package/dist/elements/chevron-right.d.ts +7 -0
  42. package/dist/elements/chevron-right.js +18 -0
  43. package/dist/elements/clock.d.ts +7 -0
  44. package/dist/elements/clock.js +19 -0
  45. package/dist/elements/code.d.ts +7 -0
  46. package/dist/elements/code.js +20 -0
  47. package/dist/elements/contrast.d.ts +22 -0
  48. package/dist/elements/contrast.js +41 -0
  49. package/dist/elements/copy.d.ts +7 -0
  50. package/dist/elements/copy.js +19 -0
  51. package/dist/elements/download.d.ts +7 -0
  52. package/dist/elements/download.js +21 -0
  53. package/dist/elements/edit.d.ts +7 -0
  54. package/dist/elements/edit.js +21 -0
  55. package/dist/elements/eye-off.d.ts +15 -0
  56. package/dist/elements/eye-off.js +28 -0
  57. package/dist/elements/eye.d.ts +7 -0
  58. package/dist/elements/eye.js +19 -0
  59. package/dist/elements/feather.d.ts +12 -0
  60. package/dist/elements/feather.js +25 -0
  61. package/dist/elements/file-clock.d.ts +20 -0
  62. package/dist/elements/file-clock.js +34 -0
  63. package/dist/elements/file-out.d.ts +13 -0
  64. package/dist/elements/file-out.js +27 -0
  65. package/dist/elements/file-x.d.ts +16 -0
  66. package/dist/elements/file-x.js +30 -0
  67. package/dist/elements/file.d.ts +7 -0
  68. package/dist/elements/file.js +23 -0
  69. package/dist/elements/filter.d.ts +7 -0
  70. package/dist/elements/filter.js +18 -0
  71. package/dist/elements/folder-up.d.ts +12 -0
  72. package/dist/elements/folder-up.js +25 -0
  73. package/dist/elements/folder.d.ts +7 -0
  74. package/dist/elements/folder.js +26 -0
  75. package/dist/elements/gear.d.ts +7 -0
  76. package/dist/elements/gear.js +20 -0
  77. package/dist/elements/globe.d.ts +7 -0
  78. package/dist/elements/globe.js +38 -0
  79. package/dist/elements/grid.d.ts +7 -0
  80. package/dist/elements/grid.js +21 -0
  81. package/dist/elements/hand.d.ts +13 -0
  82. package/dist/elements/hand.js +29 -0
  83. package/dist/elements/heart.d.ts +7 -0
  84. package/dist/elements/heart.js +20 -0
  85. package/dist/elements/help.d.ts +7 -0
  86. package/dist/elements/help.js +20 -0
  87. package/dist/elements/home.d.ts +7 -0
  88. package/dist/elements/home.js +21 -0
  89. package/dist/elements/image.d.ts +7 -0
  90. package/dist/elements/image.js +20 -0
  91. package/dist/elements/info.d.ts +7 -0
  92. package/dist/elements/info.js +20 -0
  93. package/dist/elements/layers.d.ts +7 -0
  94. package/dist/elements/layers.js +19 -0
  95. package/dist/elements/library.d.ts +15 -0
  96. package/dist/elements/library.js +28 -0
  97. package/dist/elements/lightbulb.d.ts +15 -0
  98. package/dist/elements/lightbulb.js +28 -0
  99. package/dist/elements/link.d.ts +7 -0
  100. package/dist/elements/link.js +20 -0
  101. package/dist/elements/list.d.ts +7 -0
  102. package/dist/elements/list.js +23 -0
  103. package/dist/elements/lock.d.ts +7 -0
  104. package/dist/elements/lock.js +21 -0
  105. package/dist/elements/maximize.d.ts +15 -0
  106. package/dist/elements/maximize.js +29 -0
  107. package/dist/elements/menu.d.ts +7 -0
  108. package/dist/elements/menu.js +20 -0
  109. package/dist/elements/message-plus.d.ts +12 -0
  110. package/dist/elements/message-plus.js +25 -0
  111. package/dist/elements/message-x.d.ts +12 -0
  112. package/dist/elements/message-x.js +25 -0
  113. package/dist/elements/message.d.ts +7 -0
  114. package/dist/elements/message.js +19 -0
  115. package/dist/elements/mic-off.d.ts +11 -0
  116. package/dist/elements/mic-off.js +25 -0
  117. package/dist/elements/mic.d.ts +7 -0
  118. package/dist/elements/mic.js +20 -0
  119. package/dist/elements/minimize.d.ts +13 -0
  120. package/dist/elements/minimize.js +27 -0
  121. package/dist/elements/minus.d.ts +7 -0
  122. package/dist/elements/minus.js +18 -0
  123. package/dist/elements/monitor.d.ts +12 -0
  124. package/dist/elements/monitor.js +25 -0
  125. package/dist/elements/more.d.ts +7 -0
  126. package/dist/elements/more.js +20 -0
  127. package/dist/elements/navigation.d.ts +11 -0
  128. package/dist/elements/navigation.js +22 -0
  129. package/dist/elements/next-dismiss.d.ts +30 -0
  130. package/dist/elements/next-dismiss.js +56 -0
  131. package/dist/elements/panel-left-close.d.ts +10 -0
  132. package/dist/elements/panel-left-close.js +24 -0
  133. package/dist/elements/panel-left.d.ts +13 -0
  134. package/dist/elements/panel-left.js +27 -0
  135. package/dist/elements/panel-right-close.d.ts +8 -0
  136. package/dist/elements/panel-right-close.js +21 -0
  137. package/dist/elements/panel-right.d.ts +11 -0
  138. package/dist/elements/panel-right.js +24 -0
  139. package/dist/elements/pause.d.ts +12 -0
  140. package/dist/elements/pause.js +24 -0
  141. package/dist/elements/play.d.ts +13 -0
  142. package/dist/elements/play.js +22 -0
  143. package/dist/elements/plus.d.ts +7 -0
  144. package/dist/elements/plus.js +19 -0
  145. package/dist/elements/quote.d.ts +15 -0
  146. package/dist/elements/quote.js +27 -0
  147. package/dist/elements/refresh.d.ts +7 -0
  148. package/dist/elements/refresh.js +21 -0
  149. package/dist/elements/save.d.ts +12 -0
  150. package/dist/elements/save.js +25 -0
  151. package/dist/elements/scan-eye.d.ts +16 -0
  152. package/dist/elements/scan-eye.js +32 -0
  153. package/dist/elements/search.d.ts +7 -0
  154. package/dist/elements/search.js +18 -0
  155. package/dist/elements/send.d.ts +7 -0
  156. package/dist/elements/send.js +19 -0
  157. package/dist/elements/shapes.d.ts +15 -0
  158. package/dist/elements/shapes.js +27 -0
  159. package/dist/elements/share.d.ts +7 -0
  160. package/dist/elements/share.js +21 -0
  161. package/dist/elements/sliders.d.ts +7 -0
  162. package/dist/elements/sliders.js +23 -0
  163. package/dist/elements/smile.d.ts +19 -0
  164. package/dist/elements/smile.js +33 -0
  165. package/dist/elements/sparkles.d.ts +21 -0
  166. package/dist/elements/sparkles.js +33 -0
  167. package/dist/elements/star.d.ts +14 -0
  168. package/dist/elements/star.js +28 -0
  169. package/dist/elements/stop.d.ts +12 -0
  170. package/dist/elements/stop.js +21 -0
  171. package/dist/elements/store.d.ts +12 -0
  172. package/dist/elements/store.js +25 -0
  173. package/dist/elements/sun.d.ts +7 -0
  174. package/dist/elements/sun.js +19 -0
  175. package/dist/elements/target.d.ts +22 -0
  176. package/dist/elements/target.js +35 -0
  177. package/dist/elements/terminal.d.ts +7 -0
  178. package/dist/elements/terminal.js +22 -0
  179. package/dist/elements/thumbs-down.d.ts +12 -0
  180. package/dist/elements/thumbs-down.js +24 -0
  181. package/dist/elements/thumbs-up.d.ts +21 -0
  182. package/dist/elements/thumbs-up.js +33 -0
  183. package/dist/elements/timer-off.d.ts +12 -0
  184. package/dist/elements/timer-off.js +31 -0
  185. package/dist/elements/trash.d.ts +7 -0
  186. package/dist/elements/trash.js +20 -0
  187. package/dist/elements/trending-up.d.ts +15 -0
  188. package/dist/elements/trending-up.js +27 -0
  189. package/dist/elements/upload.d.ts +7 -0
  190. package/dist/elements/upload.js +19 -0
  191. package/dist/elements/user-x.d.ts +16 -0
  192. package/dist/elements/user-x.js +30 -0
  193. package/dist/elements/user.d.ts +7 -0
  194. package/dist/elements/user.js +19 -0
  195. package/dist/elements/wand-sparkles.d.ts +21 -0
  196. package/dist/elements/wand-sparkles.js +34 -0
  197. package/dist/elements/waves.d.ts +11 -0
  198. package/dist/elements/waves.js +24 -0
  199. package/dist/elements/wrap-text.d.ts +12 -0
  200. package/dist/elements/wrap-text.js +25 -0
  201. package/dist/elements/x.d.ts +7 -0
  202. package/dist/elements/x.js +18 -0
  203. package/dist/elements/zap.d.ts +9 -0
  204. package/dist/elements/zap.js +20 -0
  205. package/dist/index.d.ts +14 -0
  206. package/dist/index.js +14 -0
  207. package/dist/schema.d.ts +240 -0
  208. package/dist/schema.js +101 -0
  209. package/dist/tokens/index.d.ts +17 -0
  210. package/dist/tokens/index.js +17 -0
  211. package/dist/tokens/interactive.d.ts +29 -0
  212. package/dist/tokens/interactive.js +26 -0
  213. package/dist/tokens/motion.d.ts +33 -0
  214. package/dist/tokens/motion.js +31 -0
  215. package/dist/tokens/radius.d.ts +22 -0
  216. package/dist/tokens/radius.js +21 -0
  217. package/dist/tokens/size.d.ts +98 -0
  218. package/dist/tokens/size.js +30 -0
  219. package/dist/tokens/status.d.ts +14 -0
  220. package/dist/tokens/status.js +13 -0
  221. package/dist/tokens/surfaces.d.ts +18 -0
  222. package/dist/tokens/surfaces.js +17 -0
  223. package/package.json +46 -0
@@ -0,0 +1,17 @@
1
+ /**
2
+ * `@xenosystem/elements/tokens` — `DESIGN_SYSTEM.md §2` resolved into pure data.
3
+ *
4
+ * A SMALL, bounded set — not the per-element barrel the no-barrel rule forbids. Re-exporting the token
5
+ * groups is fine and tree-shakes cleanly. Values implement the LOCKED design system verbatim; where the
6
+ * doc gives a role without a concrete value, that value is PROPOSED in the PR, not silently locked here.
7
+ *
8
+ * Scope so far: §2 surfaces + interactive/text/glass, plus the radius scale, control size scale and
9
+ * status vocabulary (landed for Tier-1 controls, values from the locked chat lab / DESIGN_SYSTEM). Motion
10
+ * durations and the cursor map are the remaining ROADMAP tokens.
11
+ */
12
+ export * from './surfaces.js';
13
+ export * from './interactive.js';
14
+ export * from './radius.js';
15
+ export * from './size.js';
16
+ export * from './status.js';
17
+ export * from './motion.js';
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Interactive + text tokens — `DESIGN_SYSTEM.md §2`.
3
+ *
4
+ * Monochrome by decision: interactive feedback is **white at varying opacity** — the only accent.
5
+ * Green/red/amber are semantic STATUS only and are not brand/interactive colour. A binding's `fill`/
6
+ * `stroke` may reference these tokens by name; it may never carry a literal colour.
7
+ */
8
+ /** Brand accent — white at opacity (§2 Brand Accent). */
9
+ export declare const accent: {
10
+ readonly base: "rgba(255, 255, 255, 0.15)";
11
+ readonly hover: "rgba(255, 255, 255, 0.25)";
12
+ readonly secondary: "rgba(255, 255, 255, 0.10)";
13
+ readonly secondaryHover: "rgba(255, 255, 255, 0.20)";
14
+ };
15
+ /** Interactive text — menu items, buttons (§2 Interactive text). */
16
+ export declare const text: {
17
+ readonly idle: "#7f7f86";
18
+ readonly hover: "#d8d8de";
19
+ readonly active: "#acacb4";
20
+ readonly hoverBg: "rgba(169, 169, 177, 0.08)";
21
+ };
22
+ /** Glassmorphism surfaces (§2). */
23
+ export declare const glass: {
24
+ readonly bg: "rgba(255, 255, 255, 0.05)";
25
+ readonly border: "rgba(255, 255, 255, 0.1)";
26
+ };
27
+ export type AccentToken = keyof typeof accent;
28
+ export type TextToken = keyof typeof text;
29
+ export type GlassToken = keyof typeof glass;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Interactive + text tokens — `DESIGN_SYSTEM.md §2`.
3
+ *
4
+ * Monochrome by decision: interactive feedback is **white at varying opacity** — the only accent.
5
+ * Green/red/amber are semantic STATUS only and are not brand/interactive colour. A binding's `fill`/
6
+ * `stroke` may reference these tokens by name; it may never carry a literal colour.
7
+ */
8
+ /** Brand accent — white at opacity (§2 Brand Accent). */
9
+ export const accent = {
10
+ base: 'rgba(255, 255, 255, 0.15)',
11
+ hover: 'rgba(255, 255, 255, 0.25)',
12
+ secondary: 'rgba(255, 255, 255, 0.10)',
13
+ secondaryHover: 'rgba(255, 255, 255, 0.20)',
14
+ };
15
+ /** Interactive text — menu items, buttons (§2 Interactive text). */
16
+ export const text = {
17
+ idle: '#7f7f86',
18
+ hover: '#d8d8de',
19
+ active: '#acacb4',
20
+ hoverBg: 'rgba(169, 169, 177, 0.08)',
21
+ };
22
+ /** Glassmorphism surfaces (§2). */
23
+ export const glass = {
24
+ bg: 'rgba(255, 255, 255, 0.05)',
25
+ border: 'rgba(255, 255, 255, 0.1)',
26
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Motion tokens — the chat's LOCKED motion language distilled to data (audit of the XENO chat UI).
3
+ *
4
+ * Rules the renderers already enforce: animate `transform`/`opacity` only (never layout), and honour
5
+ * `prefers-reduced-motion` everywhere. These tokens are the vocabulary of curves, durations and the
6
+ * per-item stagger those animations use — resolved to CSS custom properties in `xeno-theme.css`.
7
+ */
8
+ /** Easing curves, by role. `base` is the design-system E1; the rest are the chat lab's E2–E5. */
9
+ export declare const easing: {
10
+ /** E1 — reveal / grow. The default (`--xeno-ease`). */
11
+ readonly base: "cubic-bezier(0.22, 1, 0.36, 1)";
12
+ /** E2 — staggered list items, interaction feedback. */
13
+ readonly stagger: "cubic-bezier(0.22, 0.7, 0.2, 1)";
14
+ /** E3 — drawers, collapses. */
15
+ readonly drawer: "cubic-bezier(0.32, 0.72, 0, 1)";
16
+ /** E4 — ease-out-expo, slide-in panels + switches. */
17
+ readonly expo: "cubic-bezier(0.16, 1, 0.3, 1)";
18
+ /** E5 — overshoot spring, opt-in (the answer-cube pop). */
19
+ readonly overshoot: "cubic-bezier(0.34, 1.4, 0.5, 1)";
20
+ };
21
+ /** Duration ladder, ms. `base` is the micro default (`--xeno-dur`). */
22
+ export declare const duration: {
23
+ readonly fast: 120;
24
+ readonly base: 140;
25
+ /** Reveals + staggered items land here. */
26
+ readonly entrance: 240;
27
+ /** Grow-from-trigger card modals. */
28
+ readonly modal: 420;
29
+ };
30
+ /** Per-item stagger delay, ms — a component multiplies it by the item index. */
31
+ export declare const stagger = 40;
32
+ export type EasingToken = keyof typeof easing;
33
+ export type DurationToken = keyof typeof duration;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Motion tokens — the chat's LOCKED motion language distilled to data (audit of the XENO chat UI).
3
+ *
4
+ * Rules the renderers already enforce: animate `transform`/`opacity` only (never layout), and honour
5
+ * `prefers-reduced-motion` everywhere. These tokens are the vocabulary of curves, durations and the
6
+ * per-item stagger those animations use — resolved to CSS custom properties in `xeno-theme.css`.
7
+ */
8
+ /** Easing curves, by role. `base` is the design-system E1; the rest are the chat lab's E2–E5. */
9
+ export const easing = {
10
+ /** E1 — reveal / grow. The default (`--xeno-ease`). */
11
+ base: 'cubic-bezier(0.22, 1, 0.36, 1)',
12
+ /** E2 — staggered list items, interaction feedback. */
13
+ stagger: 'cubic-bezier(0.22, 0.7, 0.2, 1)',
14
+ /** E3 — drawers, collapses. */
15
+ drawer: 'cubic-bezier(0.32, 0.72, 0, 1)',
16
+ /** E4 — ease-out-expo, slide-in panels + switches. */
17
+ expo: 'cubic-bezier(0.16, 1, 0.3, 1)',
18
+ /** E5 — overshoot spring, opt-in (the answer-cube pop). */
19
+ overshoot: 'cubic-bezier(0.34, 1.4, 0.5, 1)',
20
+ };
21
+ /** Duration ladder, ms. `base` is the micro default (`--xeno-dur`). */
22
+ export const duration = {
23
+ fast: 120,
24
+ base: 140,
25
+ /** Reveals + staggered items land here. */
26
+ entrance: 240,
27
+ /** Grow-from-trigger card modals. */
28
+ modal: 420,
29
+ };
30
+ /** Per-item stagger delay, ms — a component multiplies it by the item index. */
31
+ export const stagger = 40;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Radius scale (px) — the LOCKED XENO grammar: rounded squares, never circles. Values are verbatim
3
+ * from the approved chat design-lab (`xeno-response-lab.html`), see `docs/chat-inventory.md`.
4
+ *
5
+ * DATA: a renderer resolves a radius *role* to these px. The 6/7/8/9 "controls" cluster in the lab is
6
+ * collapsed here to a single `control = 8` (proposal — revise if the finer steps prove necessary).
7
+ */
8
+ export declare const radius: {
9
+ /** list bullets, diagram dots — drawn as tiny squares */
10
+ readonly hair: 1.5;
11
+ /** avatar / thinking cube */
12
+ readonly xs: 3;
13
+ /** badge, checkbox / checklist box, source favicon */
14
+ readonly sm: 5;
15
+ /** overlay chrome ("6px throughout"), code-tool button, inline code */
16
+ readonly md: 6;
17
+ /** buttons, chips, icon buttons, segmented, action-bar */
18
+ readonly control: 8;
19
+ /** cards: code / diagram / artifact / embed / generated-image / preview / attachment */
20
+ readonly card: 12;
21
+ };
22
+ export type RadiusToken = keyof typeof radius;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Radius scale (px) — the LOCKED XENO grammar: rounded squares, never circles. Values are verbatim
3
+ * from the approved chat design-lab (`xeno-response-lab.html`), see `docs/chat-inventory.md`.
4
+ *
5
+ * DATA: a renderer resolves a radius *role* to these px. The 6/7/8/9 "controls" cluster in the lab is
6
+ * collapsed here to a single `control = 8` (proposal — revise if the finer steps prove necessary).
7
+ */
8
+ export const radius = {
9
+ /** list bullets, diagram dots — drawn as tiny squares */
10
+ hair: 1.5,
11
+ /** avatar / thinking cube */
12
+ xs: 3,
13
+ /** badge, checkbox / checklist box, source favicon */
14
+ sm: 5,
15
+ /** overlay chrome ("6px throughout"), code-tool button, inline code */
16
+ md: 6,
17
+ /** buttons, chips, icon buttons, segmented, action-bar */
18
+ control: 8,
19
+ /** cards: code / diagram / artifact / embed / generated-image / preview / attachment */
20
+ card: 12,
21
+ };
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Control size scale — the box metrics a `control`/`composite` resolves per size. Heights are the px
3
+ * the chat actually locked (h-6/7/8/9 = 24/28/32/36); Send sits one step below its mic, which the
4
+ * renderer expresses by picking the smaller size, not by a special case.
5
+ *
6
+ * DATA: no CSS here, just the numbers a renderer maps to height/padding/gap/glyph/label.
7
+ */
8
+ export interface ControlMetrics {
9
+ /** Box height, px. */
10
+ readonly height: number;
11
+ /** Horizontal padding for label buttons, px (icon-only buttons are square, so padX is unused). */
12
+ readonly padX: number;
13
+ /** Gap between a leading/trailing glyph and the label, px. */
14
+ readonly gap: number;
15
+ /** Glyph size, px. */
16
+ readonly icon: number;
17
+ /** Label size, px. */
18
+ readonly font: number;
19
+ }
20
+ export declare const controlSize: {
21
+ readonly xs: {
22
+ readonly height: 24;
23
+ readonly padX: 8;
24
+ readonly gap: 5;
25
+ readonly icon: 15;
26
+ readonly font: 12;
27
+ };
28
+ readonly sm: {
29
+ readonly height: 28;
30
+ readonly padX: 10;
31
+ readonly gap: 6;
32
+ readonly icon: 16;
33
+ readonly font: 13;
34
+ };
35
+ readonly md: {
36
+ readonly height: 32;
37
+ readonly padX: 12;
38
+ readonly gap: 6;
39
+ readonly icon: 16;
40
+ readonly font: 14;
41
+ };
42
+ readonly lg: {
43
+ readonly height: 36;
44
+ readonly padX: 14;
45
+ readonly gap: 7;
46
+ readonly icon: 18;
47
+ readonly font: 14;
48
+ };
49
+ };
50
+ export type ControlSizeToken = keyof typeof controlSize;
51
+ /**
52
+ * The guaranteed tappable square, px. 44 is Apple's HIG minimum and WCAG 2.1 AAA (2.5.5); Material
53
+ * asks 48. WCAG 2.2's AA floor is only 24, which is a compliance minimum rather than a design target.
54
+ *
55
+ * This is the HIT area, not the visual size — the two are deliberately different. Material's own icon
56
+ * buttons are 24dp of ink inside a 48dp target, and the same separation is what lets a dense interface
57
+ * stay dense under a finger instead of turning into a row of slabs.
58
+ */
59
+ export declare const touchTarget = 44;
60
+ /**
61
+ * The same scale for a touch surface. Not simply `desktop + 12`: the steps grow where growth buys
62
+ * something and stay put where it does not.
63
+ *
64
+ * `font` at `md` is 16 for a reason that is not taste — iOS Safari ZOOMS the page when a focused input
65
+ * has a font smaller than 16px, so any text field below that makes the whole layout jump the moment it
66
+ * is tapped. `xs` stays in the vocabulary (a dense badge or inline control is still legible on a
67
+ * phone), but at 28px it is well under the 44px target and depends entirely on the hit extension.
68
+ */
69
+ export declare const controlSizeTouch: {
70
+ readonly xs: {
71
+ readonly height: 28;
72
+ readonly padX: 10;
73
+ readonly gap: 6;
74
+ readonly icon: 16;
75
+ readonly font: 13;
76
+ };
77
+ readonly sm: {
78
+ readonly height: 32;
79
+ readonly padX: 12;
80
+ readonly gap: 7;
81
+ readonly icon: 17;
82
+ readonly font: 14;
83
+ };
84
+ readonly md: {
85
+ readonly height: 40;
86
+ readonly padX: 16;
87
+ readonly gap: 8;
88
+ readonly icon: 20;
89
+ readonly font: 16;
90
+ };
91
+ readonly lg: {
92
+ readonly height: 48;
93
+ readonly padX: 18;
94
+ readonly gap: 9;
95
+ readonly icon: 22;
96
+ readonly font: 16;
97
+ };
98
+ };
@@ -0,0 +1,30 @@
1
+ export const controlSize = {
2
+ xs: { height: 24, padX: 8, gap: 5, icon: 15, font: 12 },
3
+ sm: { height: 28, padX: 10, gap: 6, icon: 16, font: 13 },
4
+ md: { height: 32, padX: 12, gap: 6, icon: 16, font: 14 },
5
+ lg: { height: 36, padX: 14, gap: 7, icon: 18, font: 14 },
6
+ };
7
+ /**
8
+ * The guaranteed tappable square, px. 44 is Apple's HIG minimum and WCAG 2.1 AAA (2.5.5); Material
9
+ * asks 48. WCAG 2.2's AA floor is only 24, which is a compliance minimum rather than a design target.
10
+ *
11
+ * This is the HIT area, not the visual size — the two are deliberately different. Material's own icon
12
+ * buttons are 24dp of ink inside a 48dp target, and the same separation is what lets a dense interface
13
+ * stay dense under a finger instead of turning into a row of slabs.
14
+ */
15
+ export const touchTarget = 44;
16
+ /**
17
+ * The same scale for a touch surface. Not simply `desktop + 12`: the steps grow where growth buys
18
+ * something and stay put where it does not.
19
+ *
20
+ * `font` at `md` is 16 for a reason that is not taste — iOS Safari ZOOMS the page when a focused input
21
+ * has a font smaller than 16px, so any text field below that makes the whole layout jump the moment it
22
+ * is tapped. `xs` stays in the vocabulary (a dense badge or inline control is still legible on a
23
+ * phone), but at 28px it is well under the 44px target and depends entirely on the hit extension.
24
+ */
25
+ export const controlSizeTouch = {
26
+ xs: { height: 28, padX: 10, gap: 6, icon: 16, font: 13 },
27
+ sm: { height: 32, padX: 12, gap: 7, icon: 17, font: 14 },
28
+ md: { height: 40, padX: 16, gap: 8, icon: 20, font: 16 },
29
+ lg: { height: 48, padX: 18, gap: 9, icon: 22, font: 16 },
30
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Semantic STATUS colours — `DESIGN_SYSTEM.md` status vocabulary (the ROADMAP token that was pending).
3
+ *
4
+ * These are the ONE exception to the monochrome shell: danger/success/warning carry hue because they
5
+ * mean something a greyscale cannot. They are NOT brand or interactive colour (that stays white-at-
6
+ * opacity, see `./interactive.ts`). A `danger` button variant resolves its hover to `status.danger`.
7
+ */
8
+ export declare const status: {
9
+ readonly danger: "#ef4444";
10
+ readonly dangerHover: "#dc2626";
11
+ readonly success: "#3fb950";
12
+ readonly warning: "#d29922";
13
+ };
14
+ export type StatusToken = keyof typeof status;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Semantic STATUS colours — `DESIGN_SYSTEM.md` status vocabulary (the ROADMAP token that was pending).
3
+ *
4
+ * These are the ONE exception to the monochrome shell: danger/success/warning carry hue because they
5
+ * mean something a greyscale cannot. They are NOT brand or interactive colour (that stays white-at-
6
+ * opacity, see `./interactive.ts`). A `danger` button variant resolves its hover to `status.danger`.
7
+ */
8
+ export const status = {
9
+ danger: '#ef4444',
10
+ dangerHover: '#dc2626',
11
+ success: '#3fb950',
12
+ warning: '#d29922',
13
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Surface tokens — `DESIGN_SYSTEM.md §2` (canonical). Opaque hex, dark-first.
3
+ *
4
+ * These are DATA: the value a renderer resolves a surface *role* to. A declaration never carries a
5
+ * literal colour — it references a token; this is the resolution. Implement the locked design system
6
+ * verbatim; never invent a surface value here.
7
+ */
8
+ export declare const surface: {
9
+ readonly page: "#08080a";
10
+ readonly canvas: "#111111";
11
+ readonly panelBody: "#161618";
12
+ readonly panelHeader: "#1a1a1a";
13
+ readonly tabBar: "#272727";
14
+ readonly input: "#2b2b2b";
15
+ readonly dialog: "#111115";
16
+ readonly dropdown: "#101011";
17
+ };
18
+ export type SurfaceToken = keyof typeof surface;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Surface tokens — `DESIGN_SYSTEM.md §2` (canonical). Opaque hex, dark-first.
3
+ *
4
+ * These are DATA: the value a renderer resolves a surface *role* to. A declaration never carries a
5
+ * literal colour — it references a token; this is the resolution. Implement the locked design system
6
+ * verbatim; never invent a surface value here.
7
+ */
8
+ export const surface = {
9
+ page: '#08080a',
10
+ canvas: '#111111',
11
+ panelBody: '#161618',
12
+ panelHeader: '#1a1a1a',
13
+ tabBar: '#272727',
14
+ input: '#2b2b2b',
15
+ dialog: '#111115',
16
+ dropdown: '#101011',
17
+ };
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@xenosystem/elements",
3
+ "version": "0.0.1",
4
+ "license": "UNLICENSED",
5
+ "description": "The XENO element contract \u2014 declarations, schema, state model. Framework-free, platform-free.",
6
+ "author": "XENO Corporation <emilian@bnkrsys.com>",
7
+ "type": "module",
8
+ "main": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "sideEffects": false,
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.js"
15
+ },
16
+ "./schema": {
17
+ "types": "./dist/schema.d.ts",
18
+ "default": "./dist/schema.js"
19
+ },
20
+ "./tokens": {
21
+ "types": "./dist/tokens/index.d.ts",
22
+ "default": "./dist/tokens/index.js"
23
+ },
24
+ "./elements/*": {
25
+ "types": "./dist/elements/*.d.ts",
26
+ "default": "./dist/elements/*.js"
27
+ }
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "LICENSE"
32
+ ],
33
+ "scripts": {
34
+ "build": "tsc -p tsconfig.json",
35
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
36
+ "test": "vitest run",
37
+ "import-glyphs": "node --no-warnings scripts/import-glyphs.mjs"
38
+ },
39
+ "devDependencies": {
40
+ "svgpath": "^2.6.0",
41
+ "typescript": "^5.4.0"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public"
45
+ }
46
+ }