@xmesh/system-design 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 (175) hide show
  1. package/README.md +472 -0
  2. package/assets/brand-lockup-dark.svg +9 -0
  3. package/assets/brand-lockup-light.svg +9 -0
  4. package/assets/brand-mark.svg +9 -0
  5. package/colors_and_type.css +11 -0
  6. package/dist/lit/components/alert/index.css +201 -0
  7. package/dist/lit/components/alert/index.d.ts +25 -0
  8. package/dist/lit/components/alert/index.js +191 -0
  9. package/dist/lit/components/app-bar/index.css +80 -0
  10. package/dist/lit/components/app-bar/index.d.ts +19 -0
  11. package/dist/lit/components/app-bar/index.js +120 -0
  12. package/dist/lit/components/artifact/index.css +166 -0
  13. package/dist/lit/components/artifact/index.d.ts +37 -0
  14. package/dist/lit/components/artifact/index.js +294 -0
  15. package/dist/lit/components/autocomplete/index.css +171 -0
  16. package/dist/lit/components/autocomplete/index.d.ts +47 -0
  17. package/dist/lit/components/autocomplete/index.js +404 -0
  18. package/dist/lit/components/avatar/index.css +62 -0
  19. package/dist/lit/components/avatar/index.d.ts +19 -0
  20. package/dist/lit/components/avatar/index.js +112 -0
  21. package/dist/lit/components/avatar-group/index.css +60 -0
  22. package/dist/lit/components/avatar-group/index.d.ts +19 -0
  23. package/dist/lit/components/avatar-group/index.js +97 -0
  24. package/dist/lit/components/badge/index.css +72 -0
  25. package/dist/lit/components/badge/index.d.ts +18 -0
  26. package/dist/lit/components/badge/index.js +115 -0
  27. package/dist/lit/components/brand-mark/index.css +109 -0
  28. package/dist/lit/components/brand-mark/index.d.ts +24 -0
  29. package/dist/lit/components/brand-mark/index.js +116 -0
  30. package/dist/lit/components/breadcrumbs/index.css +91 -0
  31. package/dist/lit/components/breadcrumbs/index.d.ts +19 -0
  32. package/dist/lit/components/breadcrumbs/index.js +104 -0
  33. package/dist/lit/components/bubble/index.css +182 -0
  34. package/dist/lit/components/bubble/index.d.ts +72 -0
  35. package/dist/lit/components/bubble/index.js +617 -0
  36. package/dist/lit/components/button/index.css +342 -0
  37. package/dist/lit/components/button/index.d.ts +32 -0
  38. package/dist/lit/components/button/index.js +202 -0
  39. package/dist/lit/components/card/index.css +99 -0
  40. package/dist/lit/components/card/index.d.ts +20 -0
  41. package/dist/lit/components/card/index.js +133 -0
  42. package/dist/lit/components/chat/index.css +292 -0
  43. package/dist/lit/components/chat/index.d.ts +74 -0
  44. package/dist/lit/components/chat/index.js +589 -0
  45. package/dist/lit/components/checkbox/index.css +126 -0
  46. package/dist/lit/components/checkbox/index.d.ts +21 -0
  47. package/dist/lit/components/checkbox/index.js +138 -0
  48. package/dist/lit/components/chip/index.css +145 -0
  49. package/dist/lit/components/chip/index.d.ts +30 -0
  50. package/dist/lit/components/chip/index.js +230 -0
  51. package/dist/lit/components/chip-group/index.css +19 -0
  52. package/dist/lit/components/chip-group/index.d.ts +24 -0
  53. package/dist/lit/components/chip-group/index.js +171 -0
  54. package/dist/lit/components/code/index.css +42 -0
  55. package/dist/lit/components/code/index.d.ts +12 -0
  56. package/dist/lit/components/code/index.js +68 -0
  57. package/dist/lit/components/composer/index.css +548 -0
  58. package/dist/lit/components/composer/index.d.ts +67 -0
  59. package/dist/lit/components/composer/index.js +713 -0
  60. package/dist/lit/components/data-table/index.css +166 -0
  61. package/dist/lit/components/data-table/index.d.ts +55 -0
  62. package/dist/lit/components/data-table/index.js +390 -0
  63. package/dist/lit/components/dialog/index.css +124 -0
  64. package/dist/lit/components/dialog/index.d.ts +24 -0
  65. package/dist/lit/components/dialog/index.js +199 -0
  66. package/dist/lit/components/divider/index.css +27 -0
  67. package/dist/lit/components/divider/index.d.ts +13 -0
  68. package/dist/lit/components/divider/index.js +67 -0
  69. package/dist/lit/components/empty-state/index.css +69 -0
  70. package/dist/lit/components/empty-state/index.d.ts +21 -0
  71. package/dist/lit/components/empty-state/index.js +123 -0
  72. package/dist/lit/components/expansion-panel/index.css +120 -0
  73. package/dist/lit/components/expansion-panel/index.d.ts +22 -0
  74. package/dist/lit/components/expansion-panel/index.js +174 -0
  75. package/dist/lit/components/field/index.css +223 -0
  76. package/dist/lit/components/field/index.d.ts +106 -0
  77. package/dist/lit/components/field/index.js +388 -0
  78. package/dist/lit/components/file-input/index.css +257 -0
  79. package/dist/lit/components/file-input/index.d.ts +30 -0
  80. package/dist/lit/components/file-input/index.js +298 -0
  81. package/dist/lit/components/form/index.css +29 -0
  82. package/dist/lit/components/form/index.d.ts +38 -0
  83. package/dist/lit/components/form/index.js +192 -0
  84. package/dist/lit/components/grid/index.css +53 -0
  85. package/dist/lit/components/grid/index.d.ts +14 -0
  86. package/dist/lit/components/grid/index.js +82 -0
  87. package/dist/lit/components/kbd/index.css +35 -0
  88. package/dist/lit/components/kbd/index.d.ts +11 -0
  89. package/dist/lit/components/kbd/index.js +43 -0
  90. package/dist/lit/components/list/index.css +15 -0
  91. package/dist/lit/components/list/index.d.ts +28 -0
  92. package/dist/lit/components/list/index.js +188 -0
  93. package/dist/lit/components/list-item/index.css +119 -0
  94. package/dist/lit/components/list-item/index.d.ts +20 -0
  95. package/dist/lit/components/list-item/index.js +127 -0
  96. package/dist/lit/components/menu/index.css +94 -0
  97. package/dist/lit/components/menu/index.d.ts +47 -0
  98. package/dist/lit/components/menu/index.js +386 -0
  99. package/dist/lit/components/navigation-drawer/index.css +114 -0
  100. package/dist/lit/components/navigation-drawer/index.d.ts +29 -0
  101. package/dist/lit/components/navigation-drawer/index.js +218 -0
  102. package/dist/lit/components/overlay/index.css +171 -0
  103. package/dist/lit/components/overlay/index.d.ts +65 -0
  104. package/dist/lit/components/overlay/index.js +566 -0
  105. package/dist/lit/components/pagination/index.css +102 -0
  106. package/dist/lit/components/pagination/index.d.ts +22 -0
  107. package/dist/lit/components/pagination/index.js +184 -0
  108. package/dist/lit/components/primitives/index.css +504 -0
  109. package/dist/lit/components/primitives/index.d.ts +25 -0
  110. package/dist/lit/components/primitives/index.js +283 -0
  111. package/dist/lit/components/progress/index.css +143 -0
  112. package/dist/lit/components/progress/index.d.ts +23 -0
  113. package/dist/lit/components/progress/index.js +180 -0
  114. package/dist/lit/components/radio-group/index.css +178 -0
  115. package/dist/lit/components/radio-group/index.d.ts +35 -0
  116. package/dist/lit/components/radio-group/index.js +292 -0
  117. package/dist/lit/components/select/index.css +151 -0
  118. package/dist/lit/components/select/index.d.ts +50 -0
  119. package/dist/lit/components/select/index.js +390 -0
  120. package/dist/lit/components/sidebar-item/index.css +133 -0
  121. package/dist/lit/components/sidebar-item/index.d.ts +20 -0
  122. package/dist/lit/components/sidebar-item/index.js +105 -0
  123. package/dist/lit/components/skeleton/index.css +81 -0
  124. package/dist/lit/components/skeleton/index.d.ts +19 -0
  125. package/dist/lit/components/skeleton/index.js +119 -0
  126. package/dist/lit/components/slider/index.css +171 -0
  127. package/dist/lit/components/slider/index.d.ts +36 -0
  128. package/dist/lit/components/slider/index.js +302 -0
  129. package/dist/lit/components/snackbar/index.css +279 -0
  130. package/dist/lit/components/snackbar/index.d.ts +33 -0
  131. package/dist/lit/components/snackbar/index.js +195 -0
  132. package/dist/lit/components/stack/index.css +41 -0
  133. package/dist/lit/components/stack/index.d.ts +20 -0
  134. package/dist/lit/components/stack/index.js +103 -0
  135. package/dist/lit/components/switch/index.css +126 -0
  136. package/dist/lit/components/switch/index.d.ts +17 -0
  137. package/dist/lit/components/switch/index.js +116 -0
  138. package/dist/lit/components/table/index.css +85 -0
  139. package/dist/lit/components/table/index.d.ts +25 -0
  140. package/dist/lit/components/table/index.js +139 -0
  141. package/dist/lit/components/tabs/index.css +116 -0
  142. package/dist/lit/components/tabs/index.d.ts +49 -0
  143. package/dist/lit/components/tabs/index.js +320 -0
  144. package/dist/lit/components/text-field/index.css +90 -0
  145. package/dist/lit/components/text-field/index.d.ts +17 -0
  146. package/dist/lit/components/text-field/index.js +101 -0
  147. package/dist/lit/components/textarea/index.css +55 -0
  148. package/dist/lit/components/textarea/index.d.ts +26 -0
  149. package/dist/lit/components/textarea/index.js +124 -0
  150. package/dist/lit/components/tooltip/index.css +37 -0
  151. package/dist/lit/components/tooltip/index.d.ts +31 -0
  152. package/dist/lit/components/tooltip/index.js +196 -0
  153. package/dist/lit/components/validation/index.css +386 -0
  154. package/dist/lit/components/validation/index.d.ts +45 -0
  155. package/dist/lit/components/validation/index.js +318 -0
  156. package/dist/lit/index.d.ts +50 -0
  157. package/dist/lit/index.js +59 -0
  158. package/package.json +81 -0
  159. package/styles/README.md +346 -0
  160. package/styles/_elevation.css +24 -0
  161. package/styles/_fonts.css +6 -0
  162. package/styles/_layout.css +37 -0
  163. package/styles/_primitives.css +154 -0
  164. package/styles/_scroll.css +75 -0
  165. package/styles/_semantic.css +146 -0
  166. package/styles/_space.css +61 -0
  167. package/styles/_type.css +139 -0
  168. package/styles/_xmesh-extensions.css +232 -0
  169. package/styles/index.css +44 -0
  170. package/styles/md3/_color.css +102 -0
  171. package/styles/md3/_elevation.css +26 -0
  172. package/styles/md3/_motion.css +35 -0
  173. package/styles/md3/_shape.css +22 -0
  174. package/styles/md3/_state.css +22 -0
  175. package/styles/md3/_type.css +111 -0
@@ -0,0 +1,146 @@
1
+ /* ============================================================
2
+ xmesh DS · _semantic.css — LEGACY ALIAS LAYER.
3
+
4
+ This file used to define `--c-*` role tokens directly. After the
5
+ MD3 migration, every `--c-*` token is a one-line alias of either
6
+ a canonical `--md-sys-*` token or an `--xm-*` extension. Components
7
+ should reference `--md-sys-*` / `--xm-*` directly; the aliases
8
+ below remain only so unmigrated components keep working during the
9
+ per-component rollout (Phase 7).
10
+
11
+ This file deletes in Phase 10 once every component has migrated.
12
+ ============================================================ */
13
+
14
+ /* ---------- Surfaces ---------- */
15
+ :root {
16
+ --c-canvas: var(--md-sys-color-surface);
17
+ --c-canvas-deep: var(--md-sys-color-surface-container-lowest);
18
+ --c-canvas-raised: var(--md-sys-color-surface-container-low);
19
+ --c-card: var(--md-sys-color-inverse-surface);
20
+ --c-card-soft: var(--md-sys-color-surface-container-high);
21
+ --c-input: var(--md-sys-color-inverse-surface);
22
+ --c-overlay: oklch(0 0 0 / 0.5);
23
+ --c-paper: var(--xm-color-paper);
24
+
25
+ --c-photo-overlay: var(--xm-photo-overlay);
26
+ --c-photo-overlay-ink: var(--xm-photo-overlay-ink);
27
+
28
+ --c-sidebar-hover: var(--md-sys-color-surface-container-lowest);
29
+ --c-sidebar-active: var(--md-sys-color-surface-container-lowest);
30
+
31
+ --c-bubble-user: var(--md-sys-color-surface-container-lowest);
32
+ --c-bubble-bot: var(--md-sys-color-surface-container-low);
33
+
34
+ --c-composer-surface: var(--md-sys-color-surface-container-high);
35
+ --c-composer-surface-hi: var(--md-sys-color-surface-container);
36
+ --c-composer-border: var(--md-sys-color-outline);
37
+ --c-composer-border-active: var(--md-sys-color-outline);
38
+ }
39
+
40
+ :root[data-theme="light"] {
41
+ --c-card: var(--md-sys-color-inverse-surface);
42
+ --c-card-soft: var(--md-sys-color-surface-container);
43
+ --c-input: var(--md-sys-color-inverse-surface);
44
+
45
+ --c-sidebar-hover: var(--md-sys-color-surface-container);
46
+ --c-sidebar-active: var(--md-sys-color-surface-container-high);
47
+
48
+ --c-bubble-user: var(--md-sys-color-surface-container-high);
49
+ --c-bubble-bot: var(--md-sys-color-inverse-surface);
50
+
51
+ --c-composer-surface: var(--md-sys-color-inverse-surface);
52
+ --c-composer-surface-hi: var(--md-sys-color-surface-container-low);
53
+ --c-composer-border: var(--md-sys-color-outline-variant);
54
+ --c-composer-border-active: var(--md-sys-color-outline-variant);
55
+ }
56
+
57
+ /* ---------- Borders ---------- */
58
+ :root {
59
+ --c-border: var(--md-sys-color-outline-variant);
60
+ --c-border-strong: var(--md-sys-color-outline);
61
+ --c-border-subtle: var(--md-sys-color-outline-variant);
62
+ --c-border-canvas: var(--md-sys-color-outline);
63
+ --c-border-bubble: var(--xm-color-bubble-outline);
64
+ --c-border-focus: var(--md-sys-color-primary);
65
+ }
66
+
67
+ /* ---------- Text ---------- */
68
+ :root {
69
+ --c-text: var(--md-sys-color-inverse-on-surface);
70
+ --c-text-body: var(--md-sys-color-inverse-on-surface);
71
+ --c-text-muted: var(--xm-color-inverse-on-surface-muted);
72
+ --c-text-hint: var(--xm-color-inverse-on-surface-muted);
73
+
74
+ --c-text-canvas: var(--md-sys-color-on-surface);
75
+ --c-text-canvas-strong: var(--md-sys-color-on-surface);
76
+ --c-text-canvas-muted: var(--md-sys-color-on-surface-variant);
77
+ --c-text-canvas-soft: var(--xm-color-on-surface-soft);
78
+
79
+ --c-text-on-bubble-user: var(--md-sys-color-on-surface);
80
+ }
81
+
82
+ /* ---------- Accent / brand ---------- */
83
+ :root {
84
+ --c-accent: var(--md-sys-color-primary);
85
+ --c-accent-strong: var(--xm-color-primary-pressed);
86
+ --c-accent-soft: var(--md-sys-color-primary-container);
87
+ --c-accent-ink: var(--md-sys-color-on-primary);
88
+ --c-accent-on: var(--md-sys-color-on-primary);
89
+ --c-accent-disabled: var(--md-sys-color-surface-container-high);
90
+
91
+ --c-primary: var(--md-sys-color-primary);
92
+ --c-primary-strong: var(--xm-color-primary-pressed);
93
+ --c-primary-soft: var(--md-sys-color-primary-container);
94
+ --c-primary-ink: var(--md-sys-color-on-primary);
95
+ --c-primary-disabled: var(--md-sys-color-surface-container-high);
96
+
97
+ --c-secondary: var(--md-sys-color-secondary);
98
+ --c-secondary-strong: var(--md-sys-color-secondary);
99
+ --c-secondary-soft: var(--md-sys-color-secondary-container);
100
+ --c-secondary-ink: var(--md-sys-color-on-secondary);
101
+ }
102
+
103
+ /* ---------- Snackbar overlay scrim ---------- */
104
+ :root {
105
+ --c-snk-overlay-strong: var(--xm-snackbar-scrim-strong);
106
+ --c-snk-overlay: var(--xm-snackbar-scrim);
107
+ --c-snk-overlay-soft: var(--xm-snackbar-scrim-soft);
108
+ }
109
+
110
+ /* ---------- Badge groups: HTTP methods + file extensions ---------- */
111
+ :root {
112
+ --c-method-get-bg: var(--xm-method-get-bg); --c-method-get-ink: var(--xm-method-get-ink);
113
+ --c-method-post-bg: var(--xm-method-post-bg); --c-method-post-ink: var(--xm-method-post-ink);
114
+ --c-method-put-bg: var(--xm-method-put-bg); --c-method-put-ink: var(--xm-method-put-ink);
115
+ --c-method-delete-bg: var(--xm-method-delete-bg); --c-method-delete-ink: var(--xm-method-delete-ink);
116
+ --c-method-patch-bg: var(--xm-method-patch-bg); --c-method-patch-ink: var(--xm-method-patch-ink);
117
+
118
+ --c-ext-yml-bg: var(--xm-ext-yml-bg); --c-ext-yml-ink: var(--xm-ext-yml-ink);
119
+ --c-ext-json-bg: var(--xm-ext-json-bg); --c-ext-json-ink: var(--xm-ext-json-ink);
120
+ }
121
+
122
+ /* ---------- Documentation-only scales ----------
123
+ Kept so the colors preview can render canvas + surface ramps
124
+ without referencing primitives directly. Removed in Phase 8 when
125
+ colors.html is rewritten to teach the MD3 vocabulary instead. */
126
+ :root {
127
+ --c-canvas-0: var(--x-canvas-0);
128
+ --c-canvas-1: var(--x-canvas-1);
129
+ --c-canvas-2: var(--x-canvas-2);
130
+ --c-canvas-3: var(--x-canvas-3);
131
+ --c-canvas-4: var(--x-canvas-4);
132
+ --c-canvas-5: var(--x-canvas-5);
133
+ --c-canvas-6: var(--x-canvas-6);
134
+ --c-canvas-7: var(--x-canvas-7);
135
+ --c-canvas-8: var(--x-canvas-8);
136
+
137
+ --c-surface-0: var(--x-surface-0);
138
+ --c-surface-1: var(--x-surface-1);
139
+ --c-surface-2: var(--x-surface-2);
140
+ --c-surface-3: var(--x-surface-3);
141
+ --c-surface-4: var(--x-surface-4);
142
+ --c-surface-5: var(--x-surface-5);
143
+ --c-surface-6: var(--x-surface-6);
144
+ --c-surface-7: var(--x-surface-7);
145
+ --c-surface-8: var(--x-surface-8);
146
+ }
@@ -0,0 +1,61 @@
1
+ /* ============================================================
2
+ xmesh DS · _space.css — radii, spacing, motion (alias layer).
3
+
4
+ Radii alias `--md-sys-shape-corner-*`; motion aliases
5
+ `--md-sys-motion-*`. Spacing tokens (`--s-N`) stay primitive — MD3
6
+ has no canonical spacing scale, and the 4px-base xmesh ladder is
7
+ the system primitive that components reference directly.
8
+
9
+ Naming: `--s-N` = N×4px (the 4px ladder). `--s-N-5` = N×4+2px (the 2px
10
+ optical grid — half-steps for dense chrome). Every spacing value in a
11
+ component must come from this ladder; `scripts/check-spacing.mjs` enforces
12
+ it (see docs/adr/0003). Genuine sub-grid exceptions (1px hairlines, button
13
+ tight-chrome, documented clearance paddings) live in
14
+ scripts/spacing-allowlist.json, not here.
15
+ ============================================================ */
16
+
17
+ /* ---------- Radii (alias to MD3 shape corners) ---------- */
18
+ :root {
19
+ --r-pill: var(--md-sys-shape-corner-full);
20
+ --r-composer: var(--md-sys-shape-corner-extra-large);
21
+ --r-bubble: var(--md-sys-shape-corner-large);
22
+ --r-card: var(--md-sys-shape-corner-medium);
23
+ --r-field: var(--md-sys-shape-corner-button);
24
+ --r-btn: var(--md-sys-shape-corner-button);
25
+ --r-chip: var(--md-sys-shape-corner-small);
26
+ --r-icon: var(--md-sys-shape-corner-extra-small);
27
+ }
28
+
29
+ /* ---------- Spacing — 4px base + 2px half-steps (xmesh primitive scale) ---------- */
30
+ :root {
31
+ /* 4px ladder — --s-N = N×4px */
32
+ --s-1: 4px;
33
+ --s-2: 8px;
34
+ --s-3: 12px;
35
+ --s-4: 16px;
36
+ --s-5: 20px;
37
+ --s-6: 24px;
38
+ --s-7: 28px;
39
+ --s-8: 32px;
40
+ --s-9: 36px;
41
+ --s-10: 40px;
42
+ --s-11: 44px;
43
+ --s-12: 48px;
44
+
45
+ /* 2px half-steps — --s-N-5 = N×4+2px (the optical grid for dense chrome) */
46
+ --s-0-5: 2px;
47
+ --s-1-5: 6px;
48
+ --s-2-5: 10px;
49
+ --s-3-5: 14px;
50
+ --s-4-5: 18px;
51
+ --s-5-5: 22px;
52
+ }
53
+
54
+ /* ---------- Motion (alias to MD3 motion tokens) ---------- */
55
+ :root {
56
+ --m-fast: var(--md-sys-motion-duration-short3);
57
+ --m-base: var(--md-sys-motion-duration-short4);
58
+ --m-slow: var(--md-sys-motion-duration-medium1);
59
+ --m-ease: var(--md-sys-motion-easing-standard);
60
+ --m-ease-out: var(--md-sys-motion-easing-emphasized-decelerate);
61
+ }
@@ -0,0 +1,139 @@
1
+ /* ============================================================
2
+ xmesh DS · _type.css — type role shorthands + helper classes.
3
+
4
+ The actual MD3 typescale lives in `md3/_type.css`. This file
5
+ composes the MD3 sub-tokens into `font:`-shorthand role aliases
6
+ (`--t-h1`, `--t-body`, …) and renders the `.x-*` helper classes
7
+ that previews use. The shorthands let component CSS write
8
+ `font: var(--t-body);` in one line — there's no MD3 equivalent,
9
+ so the composition lives here.
10
+
11
+ Family + raw-size tokens stay defined for the few callsites that
12
+ reference them directly; component CSS should prefer the role
13
+ shorthands or the MD3 sub-tokens.
14
+ ============================================================ */
15
+
16
+ /* ---------- Families, weights, raw scale ---------- */
17
+ :root {
18
+ --t-family-display: "Source Serif 4", "Newsreader", "Cormorant Garamond", "EB Garamond", "Tiempos Headline", Georgia, serif;
19
+ --t-family-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
20
+ --t-family-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
21
+
22
+ --t-weight-regular: 400;
23
+ --t-weight-medium: 500;
24
+ --t-weight-semibold: 600;
25
+ --t-weight-bold: 700;
26
+
27
+ --t-size-xs: 11px;
28
+ --t-size-sm: 12px;
29
+ --t-size-base: 13px;
30
+ --t-size-md: 15px;
31
+ --t-size-lg: 16px;
32
+ --t-size-xl: 18px;
33
+ --t-size-2xl: 18px;
34
+ --t-size-3xl: 22px;
35
+ --t-size-4xl: 28px;
36
+ --t-size-5xl: 34px;
37
+
38
+ --t-leading-tight: 1.2;
39
+ --t-leading-snug: 1.35;
40
+ --t-leading-normal: 1.5;
41
+ --t-leading-loose: 1.7;
42
+
43
+ --t-tracking-tight: -0.02em;
44
+ --t-tracking-snug: -0.01em;
45
+ --t-tracking-normal: 0;
46
+ --t-tracking-wide: 0.04em;
47
+
48
+ --t-features: "ss01", "cv11";
49
+ }
50
+
51
+ /* ---------- Role shorthand — composes MD3 typescale sub-tokens ----------
52
+ `font:` order is `weight size/line-height family`. Each role binds to
53
+ the matching MD3 role (display-small, body-large, etc.) so the values
54
+ flow from md3/_type.css. */
55
+ :root {
56
+ --t-h1:
57
+ var(--md-sys-typescale-display-small-weight)
58
+ var(--md-sys-typescale-display-small-size) /
59
+ var(--md-sys-typescale-display-small-line-height)
60
+ var(--md-sys-typescale-display-small-font);
61
+
62
+ --t-h2:
63
+ var(--md-sys-typescale-headline-large-weight)
64
+ var(--md-sys-typescale-headline-large-size) /
65
+ var(--md-sys-typescale-headline-large-line-height)
66
+ var(--md-sys-typescale-headline-large-font);
67
+
68
+ --t-h3:
69
+ var(--md-sys-typescale-headline-medium-weight)
70
+ var(--md-sys-typescale-headline-medium-size) /
71
+ var(--md-sys-typescale-headline-medium-line-height)
72
+ var(--md-sys-typescale-headline-medium-font);
73
+
74
+ --t-h4:
75
+ var(--md-sys-typescale-title-large-weight)
76
+ var(--md-sys-typescale-title-large-size) /
77
+ var(--md-sys-typescale-title-large-line-height)
78
+ var(--md-sys-typescale-title-large-font);
79
+
80
+ --t-display:
81
+ var(--md-sys-typescale-headline-medium-weight)
82
+ var(--md-sys-typescale-headline-medium-size) /
83
+ var(--md-sys-typescale-headline-medium-line-height)
84
+ var(--md-sys-typescale-headline-medium-font);
85
+
86
+ --t-wordmark:
87
+ var(--xm-typescale-wordmark-weight)
88
+ var(--xm-typescale-wordmark-size) /
89
+ var(--xm-typescale-wordmark-line-height)
90
+ var(--xm-typescale-wordmark-font);
91
+
92
+ --t-eyebrow:
93
+ var(--md-sys-typescale-label-small-weight)
94
+ var(--md-sys-typescale-label-small-size) /
95
+ var(--md-sys-typescale-label-small-line-height)
96
+ var(--md-sys-typescale-label-small-font);
97
+
98
+ --t-body:
99
+ var(--md-sys-typescale-body-large-weight)
100
+ var(--md-sys-typescale-body-large-size) /
101
+ var(--md-sys-typescale-body-large-line-height)
102
+ var(--md-sys-typescale-body-large-font);
103
+
104
+ --t-body-strong:
105
+ var(--md-sys-typescale-title-medium-weight)
106
+ var(--md-sys-typescale-body-large-size) /
107
+ var(--md-sys-typescale-body-large-line-height)
108
+ var(--md-sys-typescale-body-large-font);
109
+
110
+ --t-small:
111
+ var(--md-sys-typescale-body-small-weight)
112
+ var(--md-sys-typescale-body-small-size) /
113
+ var(--md-sys-typescale-body-small-line-height)
114
+ var(--md-sys-typescale-body-small-font);
115
+
116
+ --t-button:
117
+ var(--md-sys-typescale-label-large-weight)
118
+ var(--md-sys-typescale-label-large-size) /
119
+ var(--md-sys-typescale-label-large-line-height)
120
+ var(--md-sys-typescale-label-large-font);
121
+
122
+ --t-mono:
123
+ var(--xm-typescale-mono-weight)
124
+ var(--xm-typescale-mono-size) /
125
+ var(--xm-typescale-mono-line-height)
126
+ var(--xm-typescale-mono-font);
127
+ }
128
+
129
+ /* ---------- Helper classes ---------- */
130
+ .x-h1 { font: var(--t-h1); color: var(--c-text); letter-spacing: var(--t-tracking-tight); margin: 0; }
131
+ .x-h2 { font: var(--t-h2); color: var(--c-text); letter-spacing: var(--t-tracking-tight); margin: 0; }
132
+ .x-h3 { font: var(--t-h3); color: var(--c-text); letter-spacing: var(--t-tracking-snug); margin: 0; }
133
+ .x-h4 { font: var(--t-h4); color: var(--c-text); letter-spacing: var(--t-tracking-snug); margin: 0; }
134
+ .x-display { font: var(--t-display); color: var(--c-text); letter-spacing: var(--t-tracking-snug); margin: 0; }
135
+ .x-wordmark { font: var(--t-wordmark); color: var(--c-text); letter-spacing: var(--t-tracking-snug); margin: 0; }
136
+ .x-body { font: var(--t-body); color: var(--c-text-body); margin: 0; }
137
+ .x-small { font: var(--t-small); color: var(--c-text-muted); margin: 0; }
138
+ .x-eyebrow { font: var(--t-eyebrow); color: var(--c-text-muted); text-transform: uppercase; letter-spacing: var(--t-tracking-wide); margin: 0; }
139
+ .x-mono { font: var(--t-mono); color: var(--c-text-body); }
@@ -0,0 +1,232 @@
1
+ /* ============================================================
2
+ xmesh DS · _xmesh-extensions.css — non-MD3 tokens.
3
+
4
+ Anything that has no canonical MD3 home but is needed to keep
5
+ xmesh's voice intact lives here under the `--xm-*` namespace.
6
+ Components may reference these alongside `--md-sys-*` tokens.
7
+ ============================================================ */
8
+
9
+ :root {
10
+ /* Categorical badges — HTTP method + file extension.
11
+ These signal *category*, not severity. Not an MD3 concept. */
12
+ --xm-method-get-bg: oklch(0.32 0.08 220);
13
+ --xm-method-get-ink: oklch(0.86 0.10 220);
14
+ --xm-method-post-bg: oklch(0.32 0.08 145);
15
+ --xm-method-post-ink: oklch(0.86 0.10 145);
16
+ --xm-method-put-bg: oklch(0.32 0.08 70);
17
+ --xm-method-put-ink: oklch(0.86 0.10 70);
18
+ --xm-method-delete-bg: oklch(0.32 0.10 25);
19
+ --xm-method-delete-ink: oklch(0.86 0.12 25);
20
+ --xm-method-patch-bg: oklch(0.32 0.07 290);
21
+ --xm-method-patch-ink: oklch(0.86 0.10 290);
22
+
23
+ --xm-ext-yml-bg: oklch(0.32 0.08 70);
24
+ --xm-ext-yml-ink: oklch(0.86 0.10 70);
25
+ --xm-ext-json-bg: oklch(0.32 0.08 145);
26
+ --xm-ext-json-ink: oklch(0.86 0.12 145);
27
+
28
+ /* Snackbar scrim — neutral gradient, not an MD3 concept. */
29
+ --xm-snackbar-scrim-strong: oklch(0 0 0 / 0.42);
30
+ --xm-snackbar-scrim: oklch(0 0 0 / 0.32);
31
+ --xm-snackbar-scrim-soft: oklch(0 0 0 / 0.18);
32
+
33
+ /* Alert severity palette — categorical exception to the "no hue for
34
+ severity" rule. The original rule (POLICIES.md 3a) assumed icon +
35
+ copy alone could carry severity, but inline alerts also need to be
36
+ scannable at a glance in long content surfaces, so we tint the bg /
37
+ border / ink per severity. Hues align with --xm-method-* (blue 220
38
+ / green 145 / amber 70 / red 25) so the categorical palettes stay
39
+ coherent. Chroma stays low so the surface still reads as chrome,
40
+ not as content. Dark-theme values use a dim, desaturated tint;
41
+ light-theme values use a pale wash on the cream canvas. */
42
+ --xm-alert-info-bg: oklch(0.27 0.05 235);
43
+ --xm-alert-info-border: oklch(0.42 0.08 235);
44
+ --xm-alert-info-ink: oklch(0.92 0.06 235);
45
+ --xm-alert-info-chip: oklch(0.42 0.10 235);
46
+
47
+ --xm-alert-success-bg: oklch(0.27 0.05 150);
48
+ --xm-alert-success-border: oklch(0.42 0.08 150);
49
+ --xm-alert-success-ink: oklch(0.92 0.08 150);
50
+ --xm-alert-success-chip: oklch(0.42 0.10 150);
51
+
52
+ --xm-alert-warning-bg: oklch(0.28 0.06 75);
53
+ --xm-alert-warning-border: oklch(0.46 0.10 75);
54
+ --xm-alert-warning-ink: oklch(0.94 0.10 90);
55
+ --xm-alert-warning-chip: oklch(0.46 0.12 75);
56
+
57
+ --xm-alert-critical-bg: oklch(0.28 0.07 25);
58
+ --xm-alert-critical-border: oklch(0.48 0.13 25);
59
+ --xm-alert-critical-ink: oklch(0.94 0.08 30);
60
+ --xm-alert-critical-chip: oklch(0.48 0.16 25);
61
+
62
+ /* Photo overlay (image artifact backdrop) */
63
+ --xm-photo-overlay: oklch(0 0 0 / 0.5);
64
+ --xm-photo-overlay-ink: var(--x-ink-canvas-0);
65
+
66
+ /* Paper artboard — warm cream sheet for previews */
67
+ --xm-color-paper: var(--x-paper);
68
+
69
+ /* On-surface fourth tier — MD3 only ships on-surface + variant.
70
+ xmesh's old --c-text-canvas-soft (very faint metadata) lives
71
+ here as the third soft tier. */
72
+ --xm-color-on-surface-soft: var(--x-ink-canvas-3);
73
+
74
+ /* Inverse on-surface third tier (muted metadata on the card stack).
75
+ The card stack is theme-following (ADR 0006): in dark theme the card
76
+ is dark, so this muted tier is a LIGHT ink; light theme keeps the
77
+ dark muted ink (overridden in the light block below). */
78
+ --xm-color-inverse-on-surface-muted: var(--x-ink-canvas-2);
79
+
80
+ /* Pressed-primary tint — MD3 prescribes a state-layer overlay,
81
+ but a few callsites need a specific darker primary value. */
82
+ --xm-color-primary-pressed: var(--x-accent-strong);
83
+
84
+ /* Primary FILL — the resting coral background for filled CTAs.
85
+ --md-sys-color-primary (L~0.64) doubles as accent *text* on the dark
86
+ canvas, where it must stay light enough to read; as a button *fill*
87
+ behind white ink that same tone only reaches 3.5:1. This token splits
88
+ the fill role off at a darker tone so white-on-fill clears WCAG AA
89
+ (5.1:1) without darkening accent-as-text. AA-validated by
90
+ scripts/check-contrast.mjs. */
91
+ --xm-color-primary-fill: oklch(0.55 0.115 40);
92
+
93
+ /* Disabled inks — MD3 has no disabled-text role; it prescribes an opacity
94
+ overlay, which dims ink AND surface together and crushes contrast below
95
+ AA (the foot-gun these replace). These are pre-darkened/lightened so the
96
+ disabled label still clears 4.5:1 on its host family. Components set
97
+ `color:` to one of these instead of `opacity:` on the whole control.
98
+ *-on-surface-disabled → on the dark canvas / surface family
99
+ *-inverse-on-surface-disabled → on the card stack (inverse-surface);
100
+ a light dimmed ink in dark theme (dark card), dark in light. */
101
+ --xm-color-on-surface-disabled: oklch(0.66 0.01 60);
102
+ --xm-color-inverse-on-surface-disabled: oklch(0.72 0.01 60);
103
+
104
+ /* Disabled filled-container fill — for filled controls (primary button,
105
+ filled chips) so the whole element no longer gets dimmed by opacity.
106
+ A muted neutral the disabled ink above is validated against (canvas-1
107
+ gives the on-surface-disabled ink ~5.1:1 of headroom). */
108
+ --xm-state-disabled-container: var(--x-canvas-1);
109
+
110
+ /* Bubble border — outline-variant doesn't quite read on the
111
+ bubble surface; this is a slightly stronger hairline. */
112
+ --xm-color-bubble-outline: oklch(0.34 0.006 60);
113
+
114
+ /* Mono typescale — JetBrains Mono. Not an MD3 concept. */
115
+ --xm-typescale-mono-font: var(--t-family-mono);
116
+ --xm-typescale-mono-size: 13px;
117
+ --xm-typescale-mono-line-height: 1.5;
118
+ --xm-typescale-mono-tracking: 0;
119
+ --xm-typescale-mono-weight: 400;
120
+
121
+ /* Wordmark — display family at button size, weight 500, lh 1 */
122
+ --xm-typescale-wordmark-font: var(--t-family-display);
123
+ --xm-typescale-wordmark-size: 18px;
124
+ --xm-typescale-wordmark-line-height: 1;
125
+ --xm-typescale-wordmark-tracking: -0.01em;
126
+ --xm-typescale-wordmark-weight: 500;
127
+
128
+ /* Drawer directional shadow — has no MD3 home (MD3 elevation
129
+ levels are non-directional). */
130
+ --xm-elevation-drawer: -16px 0 40px oklch(0 0 0 / 0.35);
131
+
132
+ /* Snackbar inner highlight rim + composite shadow */
133
+ --xm-elevation-snackbar:
134
+ 0 1px 0 oklch(1 0 0 / 0.04) inset,
135
+ 0 18px 40px oklch(0 0 0 / 0.32),
136
+ 0 4px 10px oklch(0 0 0 / 0.18);
137
+
138
+ /* Pressed inset (button :active feel — kept as canonical xmesh) */
139
+ --xm-elevation-pressed: inset 0 1px 0 oklch(0 0 0 / 0.10);
140
+ --xm-elevation-pressed-soft: inset 0 1px 0 oklch(0 0 0 / 0.08);
141
+
142
+ /* Focus ring — MD3 doesn't standardise the box-shadow form */
143
+ --xm-state-focus-ring: 0 0 0 3px var(--md-sys-color-primary-container);
144
+
145
+ /* Switch (xm-switch) — MD3 ships no switch role tokens, so the off-track fill
146
+ and the thumb shadow live here (AD-10). On-track is the coral primary role;
147
+ the off-track is a muted neutral that reads on the inverse-surface card and
148
+ gives the (dark, off-state) thumb something to sit on. The thumb itself
149
+ uses MD3 roles directly: outline ink when off (on the off-track), on-primary
150
+ when on (on the coral track). */
151
+ --xm-switch-track-off: var(--x-surface-5);
152
+ --xm-switch-thumb-shadow: 0 1px 2px oklch(0 0 0 / 0.3);
153
+
154
+ /* Slider (xm-slider) — MD3 ships no slider role tokens. The active fill +
155
+ thumb are the coral primary role; these are the sub-values with no MD3 home
156
+ (AD-10): the inactive (unfilled) track color, plus the track height and
157
+ thumb size geometry. The slider rides the inverse-surface card tier, so the
158
+ inactive track is a muted neutral that reads on the card. */
159
+ --xm-slider-track-inactive: var(--x-surface-5);
160
+ --xm-slider-track-height: 4px;
161
+ --xm-slider-thumb-size: 16px;
162
+ --xm-slider-thumb-shadow: 0 1px 2px oklch(0 0 0 / 0.3);
163
+
164
+ /* Overlay stacking tier (AD-5a) — fixed order, not open-order luck:
165
+ tooltip < menu/select-listbox < dialog. The native top layer already
166
+ gives last-opened-wins within one primitive class; these z-index values
167
+ order the NON-modal popovers among themselves (a menu sits above a
168
+ tooltip). Modal <dialog>s ride the native top layer above every popover
169
+ by spec, which matches `dialog` being the highest tier. A Floating-UI-
170
+ positioned escape-hatch overlay reuses these values — it must NOT invent
171
+ its own z-index. */
172
+ --xm-overlay-z-tooltip: 1000;
173
+ --xm-overlay-z-menu: 1100;
174
+ --xm-overlay-z-dialog: 1200;
175
+ }
176
+
177
+ :root[data-theme="light"] {
178
+ /* Categorical badges in cream theme */
179
+ --xm-method-get-bg: oklch(0.94 0.07 220); --xm-method-get-ink: oklch(0.36 0.10 220);
180
+ --xm-method-post-bg: oklch(0.94 0.07 145); --xm-method-post-ink: oklch(0.36 0.10 145);
181
+ --xm-method-put-bg: oklch(0.94 0.07 70); --xm-method-put-ink: oklch(0.36 0.10 70);
182
+ --xm-method-delete-bg: oklch(0.94 0.07 25); --xm-method-delete-ink: oklch(0.40 0.12 25);
183
+ --xm-method-patch-bg: oklch(0.94 0.06 290); --xm-method-patch-ink: oklch(0.38 0.10 290);
184
+
185
+ --xm-ext-yml-bg: oklch(0.92 0.08 70); --xm-ext-yml-ink: oklch(0.40 0.10 70);
186
+ --xm-ext-json-bg: oklch(0.92 0.08 145); --xm-ext-json-ink: oklch(0.38 0.12 145);
187
+
188
+ --xm-snackbar-scrim-strong: oklch(0.40 0.01 60 / 0.28);
189
+ --xm-snackbar-scrim: oklch(0.40 0.01 60 / 0.18);
190
+ --xm-snackbar-scrim-soft: oklch(0.40 0.01 60 / 0.08);
191
+
192
+ /* Alert palette — cream-theme washes. Backgrounds sit slightly
193
+ above the cream canvas; ink is the deep version of the hue so it
194
+ reads on the pale tint. */
195
+ --xm-alert-info-bg: oklch(0.94 0.04 235);
196
+ --xm-alert-info-border: oklch(0.82 0.07 235);
197
+ --xm-alert-info-ink: oklch(0.34 0.10 235);
198
+ --xm-alert-info-chip: oklch(0.78 0.08 235);
199
+
200
+ --xm-alert-success-bg: oklch(0.94 0.05 150);
201
+ --xm-alert-success-border: oklch(0.80 0.09 150);
202
+ --xm-alert-success-ink: oklch(0.34 0.10 150);
203
+ --xm-alert-success-chip: oklch(0.78 0.10 150);
204
+
205
+ --xm-alert-warning-bg: oklch(0.95 0.06 85);
206
+ --xm-alert-warning-border: oklch(0.80 0.10 75);
207
+ --xm-alert-warning-ink: oklch(0.36 0.10 60);
208
+ --xm-alert-warning-chip: oklch(0.78 0.12 75);
209
+
210
+ --xm-alert-critical-bg: oklch(0.95 0.04 25);
211
+ --xm-alert-critical-border: oklch(0.80 0.10 25);
212
+ --xm-alert-critical-ink: oklch(0.38 0.14 25);
213
+ --xm-alert-critical-chip: oklch(0.78 0.13 25);
214
+
215
+ --xm-photo-overlay: oklch(1 0 0 / 0.7);
216
+ --xm-photo-overlay-ink: oklch(0.22 0.01 60);
217
+
218
+ --xm-color-bubble-outline: oklch(0.86 0.014 85);
219
+
220
+ /* Card stack stays white in light theme — muted metadata is a dark ink. */
221
+ --xm-color-inverse-on-surface-muted: var(--x-ink-3);
222
+
223
+ /* Primary fill — light theme accent is already deep (L0.62); the fill role
224
+ drops to the strong tone so white ink clears AA on the cream canvas. */
225
+ --xm-color-primary-fill: oklch(0.50 0.115 38);
226
+
227
+ /* Disabled inks — dark ink on the cream canvas / white card. */
228
+ --xm-color-on-surface-disabled: oklch(0.45 0.01 60);
229
+ --xm-color-inverse-on-surface-disabled: oklch(0.46 0.01 60);
230
+
231
+ --xm-state-disabled-container: var(--x-canvas-3);
232
+ }
@@ -0,0 +1,44 @@
1
+ /* ============================================================
2
+ xmesh Design System — index.css
3
+
4
+ Single entry point. Components reference `--md-sys-*` (canonical
5
+ Material Design 3 system tokens) and `--xm-*` (xmesh extensions
6
+ for non-MD3 concepts). `--x-*` are primitives — never reference
7
+ from components.
8
+
9
+ Import order matters: MD3 layer must load before the legacy
10
+ `_semantic.css` alias layer (which maps `--c-*` → `--md-sys-*`
11
+ for back-compat during the migration).
12
+
13
+ Layered files, by responsibility:
14
+ _fonts.css Google Fonts import
15
+ _primitives.css raw `--x-*` literals (palette source)
16
+ md3/_color.css `--md-sys-color-*` roles
17
+ md3/_type.css `--md-sys-typescale-*` roles
18
+ md3/_shape.css `--md-sys-shape-corner-*` tokens
19
+ md3/_elevation.css `--md-sys-elevation-level*` tokens
20
+ md3/_motion.css `--md-sys-motion-*` tokens
21
+ md3/_state.css `--md-sys-state-*` opacities
22
+ _xmesh-extensions.css `--xm-*` non-MD3 tokens
23
+ _layout.css `--xm-breakpoint-*` / `--xm-container-max` / `--xm-gutter-*`
24
+ _semantic.css legacy `--c-*` aliases (deletes in Phase 10)
25
+ _type.css type role shorthands + .x-* helpers
26
+ _space.css `--r-*` / `--s-N` / `--m-*` aliases
27
+ _elevation.css `--e-*` aliases
28
+ _scroll.css `.scroll-canvas` / `.scroll-hidden`
29
+ ============================================================ */
30
+ @import url("./_fonts.css");
31
+ @import url("./_primitives.css");
32
+ @import url("./md3/_color.css");
33
+ @import url("./md3/_type.css");
34
+ @import url("./md3/_shape.css");
35
+ @import url("./md3/_elevation.css");
36
+ @import url("./md3/_motion.css");
37
+ @import url("./md3/_state.css");
38
+ @import url("./_xmesh-extensions.css");
39
+ @import url("./_layout.css");
40
+ @import url("./_semantic.css");
41
+ @import url("./_type.css");
42
+ @import url("./_space.css");
43
+ @import url("./_elevation.css");
44
+ @import url("./_scroll.css");