@reqvire-org/ads 0.4.0 → 0.4.2

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 (394) hide show
  1. package/README.md +105 -86
  2. package/dist/a11y.mjs +108 -29
  3. package/dist/analysis/compiler-options.mjs +13 -0
  4. package/dist/analysis/context.mjs +46 -0
  5. package/dist/analysis/file-tree.mjs +52 -0
  6. package/dist/analysis/helpers.mjs +140 -0
  7. package/dist/analysis/impact.mjs +20 -0
  8. package/dist/analysis/inputs.mjs +15 -0
  9. package/dist/analysis/native-adapter.mjs +180 -0
  10. package/dist/analysis/native-project.mjs +323 -0
  11. package/dist/analysis/queries.mjs +133 -0
  12. package/dist/analysis/service.mjs +146 -0
  13. package/dist/analysis/standalone.mjs +57 -0
  14. package/dist/analysis/syntax.mjs +164 -0
  15. package/dist/analysis/worker.mjs +182 -0
  16. package/dist/assets.mjs +5 -5
  17. package/dist/atomic-composition.mjs +191 -70
  18. package/dist/atomic-trace.mjs +120 -50
  19. package/dist/behavior-libraries.mjs +106 -37
  20. package/dist/behaviors.mjs +219 -77
  21. package/dist/boundaries.mjs +135 -38
  22. package/dist/brand-assets.mjs +219 -47
  23. package/dist/brands.mjs +86 -27
  24. package/dist/bun-compiler.mjs +28 -14
  25. package/dist/bun-worker.mjs +7 -5
  26. package/dist/capture/worker.mjs +15 -4
  27. package/dist/capture-store.mjs +4 -2
  28. package/dist/capture.mjs +17 -14
  29. package/dist/check-service.mjs +40 -57
  30. package/dist/check.mjs +749 -188
  31. package/dist/cli.mjs +200 -99
  32. package/dist/color-values.mjs +21 -21
  33. package/dist/component-contrast.mjs +2 -2
  34. package/dist/config.mjs +303 -135
  35. package/dist/construction-styles.cjs +10 -0
  36. package/dist/control-padding.mjs +45 -25
  37. package/dist/css-values.mjs +3 -2
  38. package/dist/declarative-flow.mjs +209 -109
  39. package/dist/design-values.mjs +136 -51
  40. package/dist/development-runtime.mjs +4 -6
  41. package/dist/draft-boundary.mjs +11 -6
  42. package/dist/evidence.mjs +1 -1
  43. package/dist/finding-rules.mjs +7 -5
  44. package/dist/font-rules.mjs +2 -2
  45. package/dist/fonts-generated.mjs +2 -2
  46. package/dist/foundation-views.mjs +238 -0
  47. package/dist/foundation.mjs +63 -39
  48. package/dist/generated-entries.mjs +101 -34
  49. package/dist/icons.mjs +79 -32
  50. package/dist/image-attributes.mjs +109 -36
  51. package/dist/image-size.mjs +1 -1
  52. package/dist/index.mjs +0 -2
  53. package/dist/init.mjs +122 -41
  54. package/dist/investigations.mjs +2 -2
  55. package/dist/layers.mjs +298 -129
  56. package/dist/layout-widths.mjs +180 -85
  57. package/dist/linaria/preserve-values.cjs +7 -0
  58. package/dist/linaria/spatial-inputs.cjs +56 -0
  59. package/dist/lockup-composition.mjs +44 -0
  60. package/dist/lockup-model.cjs +64 -0
  61. package/dist/mcp/THIRD_PARTY_NOTICES.md +51 -1
  62. package/dist/mcp/apps.mjs +4 -30
  63. package/dist/mcp/behavior-pages.mjs +72 -24
  64. package/dist/mcp/build-status.mjs +257 -64
  65. package/dist/mcp/catalog.mjs +90 -26
  66. package/dist/mcp/context.mjs +17 -18
  67. package/dist/mcp/draft-discovery.mjs +44 -21
  68. package/dist/mcp/drafts.mjs +901 -281
  69. package/dist/mcp/execution-coordinator.mjs +417 -167
  70. package/dist/mcp/execution-results.mjs +7 -7
  71. package/dist/mcp/mutations.mjs +670 -234
  72. package/dist/mcp/preview-watch.mjs +448 -170
  73. package/dist/mcp/preview-widget.bundle.js +44 -50
  74. package/dist/mcp/prompts.mjs +5 -5
  75. package/dist/mcp/result-pages.mjs +1 -1
  76. package/dist/mcp/sandbox-host.mjs +1 -1
  77. package/dist/mcp/server.mjs +2402 -577
  78. package/dist/mcp/showcase-host.mjs +165 -41
  79. package/dist/mcp/skills.mjs +1 -1
  80. package/dist/mcp/text-diff.mjs +29 -10
  81. package/dist/paint-contracts.mjs +174 -81
  82. package/dist/palette-generated.mjs +2 -2
  83. package/dist/preview-bun.mjs +493 -187
  84. package/dist/preview-failure.mjs +1 -1
  85. package/dist/preview-files.mjs +13 -13
  86. package/dist/preview-imports.mjs +104 -55
  87. package/dist/preview-inputs.mjs +2 -2
  88. package/dist/preview-requests.mjs +24 -0
  89. package/dist/preview-resources.mjs +288 -147
  90. package/dist/preview-scope.mjs +5 -4
  91. package/dist/program-cache.mjs +8 -34
  92. package/dist/project-documents.mjs +1 -1
  93. package/dist/public-api.mjs +69 -31
  94. package/dist/public-props.mjs +39 -22
  95. package/dist/{browser-audit → render-audit}/axe-run.mjs +3 -3
  96. package/dist/{browser-audit → render-audit}/image-shape.mjs +2 -2
  97. package/dist/{browser-audit → render-audit}/layout-overflow.mjs +86 -23
  98. package/dist/{browser-audit → render-audit}/non-text-contrast.mjs +86 -27
  99. package/dist/{browser-audit → render-audit}/render-states.mjs +208 -52
  100. package/dist/{browser-audit → render-audit}/worker.mjs +86 -30
  101. package/dist/render-audit.mjs +828 -0
  102. package/dist/render-color-probe.mjs +96 -42
  103. package/dist/resource-limits.mjs +229 -97
  104. package/dist/runtime-contracts.mjs +467 -185
  105. package/dist/scenario-groups.mjs +22 -10
  106. package/dist/scenario-inspector.mjs +6 -43
  107. package/dist/scenario-program.mjs +8 -25
  108. package/dist/scenario-registry.mjs +72 -30
  109. package/dist/scenario-selectors.mjs +161 -64
  110. package/dist/scenario-slots.mjs +149 -56
  111. package/dist/scenario-trace.mjs +215 -109
  112. package/dist/scenarios-compiler.mjs +719 -378
  113. package/dist/scenarios-vite.d.mts +1 -3
  114. package/dist/scenarios-vite.mjs +2 -81
  115. package/dist/scenarios.mjs +421 -157
  116. package/dist/selector-match.mjs +2 -2
  117. package/dist/showcase/client.bundle.js +57 -56
  118. package/dist/showcase/draft-navigation.js +18 -0
  119. package/dist/showcase/favicon.ico +0 -0
  120. package/dist/showcase/favicon.svg +1 -0
  121. package/dist/showcase/foundation-view.css +55 -0
  122. package/dist/showcase/foundation-view.mjs +252 -0
  123. package/dist/showcase/guide-controls.ads.review.mjs +32 -0
  124. package/dist/showcase/icons.js +1 -145
  125. package/dist/showcase/index.html +3 -31
  126. package/dist/showcase/preview-frame.ads.review.css +46 -0
  127. package/dist/showcase/preview-frame.ads.review.d.mts +11 -0
  128. package/dist/showcase/preview-frame.ads.review.mjs +22 -0
  129. package/dist/showcase/preview-state.js +0 -9
  130. package/dist/showcase/refresh-scheduler.js +23 -0
  131. package/dist/showcase/style.css +5 -47
  132. package/dist/showcase/ui/ui.css +1353 -0
  133. package/dist/showcase/ui/ui.js +1062 -0
  134. package/dist/showcase-coverage.mjs +58 -37
  135. package/dist/skills/README.md +24 -23
  136. package/dist/skills/ads-designer/README.md +8 -2
  137. package/dist/skills/ads-designer/SKILL.md +130 -119
  138. package/dist/skills/ads-designer/references/accessibility.md +12 -13
  139. package/dist/skills/ads-designer/references/atomic-styles.md +4 -4
  140. package/dist/skills/ads-designer/references/behaviors.md +30 -27
  141. package/dist/skills/ads-designer/references/branding.md +98 -10
  142. package/dist/skills/ads-designer/references/captures.md +25 -0
  143. package/dist/skills/ads-designer/references/cli.md +21 -24
  144. package/dist/skills/ads-designer/references/contracts.md +7 -6
  145. package/dist/skills/ads-designer/references/design-data.md +49 -52
  146. package/dist/skills/ads-designer/references/drafts.md +20 -17
  147. package/dist/skills/ads-designer/references/evidence.md +1 -5
  148. package/dist/skills/ads-designer/references/guarded-editing.md +14 -18
  149. package/dist/skills/ads-designer/references/layers.md +1 -1
  150. package/dist/skills/ads-designer/references/layout.md +347 -0
  151. package/dist/skills/ads-designer/references/mobile.md +2 -1
  152. package/dist/skills/{ads-motion/references/performance.md → ads-designer/references/motion-performance.md} +5 -1
  153. package/dist/skills/{ads-motion/references/build.md → ads-designer/references/motion.md} +73 -5
  154. package/dist/skills/ads-designer/references/review.md +37 -34
  155. package/dist/skills/ads-designer/references/runtimes.md +33 -30
  156. package/dist/skills/ads-designer/references/scenarios.md +16 -18
  157. package/dist/skills/{ads-break-ui/references/catalog.md → ads-designer/references/stress-catalog.md} +3 -1
  158. package/dist/skills/ads-designer/references/stress-test.md +68 -0
  159. package/dist/skills/ads-designer/references/validation.md +83 -75
  160. package/dist/skills/ads-designer/references/workflows.md +8 -33
  161. package/dist/skills/ads-import/SKILL.md +43 -325
  162. package/dist/skills/ads-import/references/atomic-styles.md +4 -4
  163. package/dist/skills/ads-import/references/behaviors.md +30 -27
  164. package/dist/skills/ads-import/references/branding.md +5 -5
  165. package/dist/skills/ads-import/references/captures.md +25 -0
  166. package/dist/skills/ads-import/references/cli.md +21 -24
  167. package/dist/skills/ads-import/references/compatibility.md +1 -1
  168. package/dist/skills/ads-import/references/contracts.md +7 -6
  169. package/dist/skills/ads-import/references/design-data.md +49 -52
  170. package/dist/skills/ads-import/references/drafts.md +20 -17
  171. package/dist/skills/ads-import/references/evidence.md +1 -5
  172. package/dist/skills/ads-import/references/guarded-editing.md +14 -18
  173. package/dist/skills/ads-import/references/implementation.md +2 -1
  174. package/dist/skills/ads-import/references/layers.md +1 -1
  175. package/dist/skills/ads-import/references/layout.md +347 -0
  176. package/dist/skills/ads-import/references/review.md +37 -34
  177. package/dist/skills/ads-import/references/runtimes.md +33 -30
  178. package/dist/skills/ads-import/references/scenarios.md +16 -18
  179. package/dist/skills/ads-import/references/tokens.md +3 -3
  180. package/dist/skills/ads-import/references/validation.md +83 -75
  181. package/dist/skills/ads-import/references/workflows.md +8 -33
  182. package/dist/skills/ads-migrate/SKILL.md +56 -0
  183. package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +602 -0
  184. package/dist/skills/ads-port/SKILL.md +54 -343
  185. package/dist/skills/ads-port/references/atomic-styles.md +4 -4
  186. package/dist/skills/ads-port/references/behaviors.md +30 -27
  187. package/dist/skills/ads-port/references/captures.md +25 -0
  188. package/dist/skills/ads-port/references/cli.md +21 -24
  189. package/dist/skills/ads-port/references/contracts.md +7 -6
  190. package/dist/skills/ads-port/references/design-data.md +49 -52
  191. package/dist/skills/ads-port/references/drafts.md +20 -17
  192. package/dist/skills/ads-port/references/evidence.md +1 -5
  193. package/dist/skills/ads-port/references/guarded-editing.md +14 -18
  194. package/dist/skills/ads-port/references/layers.md +1 -1
  195. package/dist/skills/ads-port/references/layout.md +347 -0
  196. package/dist/skills/ads-port/references/lint-and-docs.md +8 -11
  197. package/dist/skills/ads-port/references/native-implementation.md +2 -1
  198. package/dist/skills/ads-port/references/review.md +37 -34
  199. package/dist/skills/ads-port/references/runtimes.md +33 -30
  200. package/dist/skills/ads-port/references/scenarios.md +16 -18
  201. package/dist/skills/ads-port/references/validation.md +83 -75
  202. package/dist/skills/ads-port/references/workflows.md +8 -33
  203. package/dist/source-symbols.mjs +1 -8
  204. package/dist/source-values.mjs +266 -128
  205. package/dist/spatial-composition.mjs +322 -0
  206. package/dist/spatial-contexts.cjs +56 -0
  207. package/dist/spatial-css.cjs +351 -0
  208. package/dist/spatial-inputs.cjs +80 -0
  209. package/dist/spatial-metadata.mjs +18 -0
  210. package/dist/spatial-model.cjs +322 -0
  211. package/dist/spatial.mjs +21 -0
  212. package/dist/stage-timing.cjs +20 -0
  213. package/dist/starters/preact/design-system/patterns/Conversation/Conversation.tsx +105 -0
  214. package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +275 -0
  215. package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
  216. package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
  217. package/dist/starters/preact/design-system/showcase/mcp/main.ads.mount.tsx +8 -0
  218. package/dist/starters/preact/ds.config.json +25 -6
  219. package/dist/starters/preact/package.json +4 -8
  220. package/dist/starters/preact/tsconfig.json +4 -5
  221. package/dist/starters/preact/vite.config.ts +3 -3
  222. package/dist/starters/react/ADS.md +42 -47
  223. package/dist/starters/react/README.md +47 -49
  224. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +18 -2
  225. package/dist/starters/react/design-system/components/Actions/IconButton/README.md +3 -0
  226. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/README.md +5 -0
  227. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.fixture.ts +13 -0
  228. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.scenario.tsx +22 -0
  229. package/dist/starters/react/design-system/index.ts +2 -1
  230. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.exports.ts +1 -0
  231. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.fixture.ts +7 -0
  232. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.scenario.tsx +15 -0
  233. package/dist/starters/react/design-system/patterns/Conversation/Conversation.tsx +105 -0
  234. package/dist/starters/react/design-system/patterns/Conversation/README.md +9 -0
  235. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.fixture.ts +5 -0
  236. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.scenario.tsx +21 -0
  237. package/dist/starters/react/design-system/patterns/Shell/README.md +43 -0
  238. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.exports.ts +1 -0
  239. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.fixture.ts +5 -0
  240. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +21 -0
  241. package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +274 -0
  242. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +1 -1
  243. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
  244. package/dist/starters/react/design-system/review/index.ads.review.ts +4 -0
  245. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.exports.ts +1 -0
  246. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.review.tsx +6 -0
  247. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +1 -1
  248. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
  249. package/dist/starters/react/design-system/showcase/mcp/{main.tsx → main.ads.mount.tsx} +4 -2
  250. package/dist/starters/react/design-system/tokens/catalog.ads.json +1221 -0
  251. package/dist/starters/react/design-system/tokens/colors.css +1 -1
  252. package/dist/starters/react/design-system/tokens/spacing.css +22 -32
  253. package/dist/starters/react/design-system/tokens/spatial.ads.json +70 -0
  254. package/dist/starters/react/design-system/tokens/themes.generated.ts +1 -1
  255. package/dist/starters/react/ds.config.json +25 -6
  256. package/dist/starters/react/package.json +2 -6
  257. package/dist/starters/react/tsconfig.json +2 -3
  258. package/dist/starters/react/vite.config.ts +3 -3
  259. package/dist/style-boundaries.mjs +70 -25
  260. package/dist/task-cache.mjs +173 -72
  261. package/dist/task-worker.mjs +22 -11
  262. package/dist/test-boundaries.mjs +132 -59
  263. package/dist/themes-generated.mjs +1 -1
  264. package/dist/themes-watch.mjs +57 -22
  265. package/dist/themes.mjs +176 -73
  266. package/dist/token-export.mjs +39 -14
  267. package/dist/token-policy.mjs +6 -3
  268. package/dist/token-quality.mjs +6 -6
  269. package/dist/token-samples.mjs +16 -5
  270. package/dist/tokens.mjs +71 -26
  271. package/dist/ui-framework.mjs +16 -14
  272. package/dist/unit-contracts.mjs +251 -104
  273. package/dist/units.mjs +208 -98
  274. package/dist/usage.mjs +138 -38
  275. package/dist/validation-checks.mjs +115 -38
  276. package/dist/validation-inputs.mjs +187 -78
  277. package/dist/validation.mjs +268 -102
  278. package/dist/verification/browser.mjs +27 -5
  279. package/dist/verification.mjs +711 -187
  280. package/docs/ADS.md +90 -79
  281. package/docs/ARCHITECTURE.md +294 -136
  282. package/docs/BEHAVIORS.md +29 -25
  283. package/docs/CACHING.md +52 -17
  284. package/docs/CHANGELOG.md +309 -17
  285. package/docs/CONTRACTS.md +12 -4
  286. package/docs/DESIGN-REFERENCES.md +40 -0
  287. package/docs/GUIDE.md +270 -258
  288. package/docs/MCP.md +181 -324
  289. package/docs/SPATIAL-CHECKS.md +69 -0
  290. package/docs/benchmarks/README.md +39 -0
  291. package/package.json +42 -34
  292. package/dist/browser-audit.mjs +0 -429
  293. package/dist/create.mjs +0 -48
  294. package/dist/lint-config.mjs +0 -50
  295. package/dist/mcp/project-widget.bundle.js +0 -114
  296. package/dist/mcp/reports.mjs +0 -101
  297. package/dist/mcp/widget.bundle.js +0 -147
  298. package/dist/oxlint.mjs +0 -89
  299. package/dist/preview-builder.mjs +0 -133
  300. package/dist/preview-workers.mjs +0 -184
  301. package/dist/showcase.mjs +0 -77
  302. package/dist/skills/ads-break-ui/LICENSE.upstream +0 -21
  303. package/dist/skills/ads-break-ui/README.md +0 -16
  304. package/dist/skills/ads-break-ui/SKILL.md +0 -412
  305. package/dist/skills/ads-break-ui/agents/openai.yaml +0 -4
  306. package/dist/skills/ads-break-ui/references/atomic-styles.md +0 -293
  307. package/dist/skills/ads-break-ui/references/behaviors.md +0 -412
  308. package/dist/skills/ads-break-ui/references/captures.md +0 -135
  309. package/dist/skills/ads-break-ui/references/contracts.md +0 -317
  310. package/dist/skills/ads-break-ui/references/design-data.md +0 -354
  311. package/dist/skills/ads-break-ui/references/drafts.md +0 -194
  312. package/dist/skills/ads-break-ui/references/evidence.md +0 -128
  313. package/dist/skills/ads-break-ui/references/guarded-editing.md +0 -165
  314. package/dist/skills/ads-break-ui/references/layers.md +0 -145
  315. package/dist/skills/ads-break-ui/references/reporting.md +0 -101
  316. package/dist/skills/ads-break-ui/references/review.md +0 -97
  317. package/dist/skills/ads-break-ui/references/runtimes.md +0 -203
  318. package/dist/skills/ads-break-ui/references/scenarios.md +0 -246
  319. package/dist/skills/ads-break-ui/references/validation.md +0 -166
  320. package/dist/skills/ads-break-ui/references/verification.md +0 -58
  321. package/dist/skills/ads-break-ui/references/workflows.md +0 -90
  322. package/dist/skills/ads-designer/references/reporting.md +0 -101
  323. package/dist/skills/ads-import/references/reporting.md +0 -101
  324. package/dist/skills/ads-motion/LICENSE.upstream +0 -21
  325. package/dist/skills/ads-motion/README.md +0 -22
  326. package/dist/skills/ads-motion/SKILL.md +0 -385
  327. package/dist/skills/ads-motion/agents/openai.yaml +0 -4
  328. package/dist/skills/ads-motion/references/atomic-styles.md +0 -293
  329. package/dist/skills/ads-motion/references/audit.md +0 -44
  330. package/dist/skills/ads-motion/references/behaviors.md +0 -412
  331. package/dist/skills/ads-motion/references/captures.md +0 -135
  332. package/dist/skills/ads-motion/references/contracts.md +0 -317
  333. package/dist/skills/ads-motion/references/design-data.md +0 -354
  334. package/dist/skills/ads-motion/references/drafts.md +0 -194
  335. package/dist/skills/ads-motion/references/evidence.md +0 -128
  336. package/dist/skills/ads-motion/references/guarded-editing.md +0 -165
  337. package/dist/skills/ads-motion/references/layers.md +0 -145
  338. package/dist/skills/ads-motion/references/motion-review.md +0 -35
  339. package/dist/skills/ads-motion/references/reporting.md +0 -101
  340. package/dist/skills/ads-motion/references/review.md +0 -97
  341. package/dist/skills/ads-motion/references/runtimes.md +0 -203
  342. package/dist/skills/ads-motion/references/scenarios.md +0 -246
  343. package/dist/skills/ads-motion/references/validation.md +0 -166
  344. package/dist/skills/ads-motion/references/verification.md +0 -39
  345. package/dist/skills/ads-motion/references/workflows.md +0 -90
  346. package/dist/skills/ads-port/references/reporting.md +0 -101
  347. package/dist/starters/preact/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
  348. package/dist/starters/preact/design-system/components/Layout/Grid/Grid.tsx +0 -76
  349. package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.tsx +0 -29
  350. package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
  351. package/dist/starters/preact/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
  352. package/dist/starters/preact/design-system/review/token-preview/TokenPreview.tsx +0 -137
  353. package/dist/starters/preact/design-system/showcase/mcp/main.tsx +0 -6
  354. package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.fixture.ts +0 -7
  355. package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.scenario.tsx +0 -4
  356. package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.fixture.ts +0 -7
  357. package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.scenario.tsx +0 -4
  358. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
  359. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.exports.ts +0 -1
  360. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.fixture.ts +0 -12
  361. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.scenario.tsx +0 -17
  362. package/dist/starters/react/design-system/components/Layout/Grid/Grid.tsx +0 -75
  363. package/dist/starters/react/design-system/components/Layout/Grid/README.md +0 -21
  364. package/dist/starters/react/design-system/review/brand-preview/BrandPreview.ads.exports.ts +0 -1
  365. package/dist/starters/react/design-system/review/brand-preview/BrandPreview.tsx +0 -112
  366. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.tsx +0 -29
  367. package/dist/starters/react/design-system/review/grid-cell/GridCell.ads.exports.ts +0 -1
  368. package/dist/starters/react/design-system/review/grid-cell/GridCell.tsx +0 -18
  369. package/dist/starters/react/design-system/review/index.ts +0 -6
  370. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
  371. package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
  372. package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.exports.ts +0 -1
  373. package/dist/starters/react/design-system/review/token-preview/TokenPreview.tsx +0 -137
  374. package/dist/starters/react/design-system/showcase/mcp/index.html +0 -1
  375. package/dist/starters/react/design-system/tokens/Color.ads.fixture.ts +0 -124
  376. package/dist/starters/react/design-system/tokens/Color.ads.scenario.tsx +0 -4
  377. package/dist/starters/react/design-system/tokens/Layout.ads.fixture.ts +0 -39
  378. package/dist/starters/react/design-system/tokens/Layout.ads.scenario.tsx +0 -4
  379. package/dist/starters/react/design-system/tokens/Motion.ads.fixture.ts +0 -18
  380. package/dist/starters/react/design-system/tokens/Motion.ads.scenario.tsx +0 -4
  381. package/dist/starters/react/design-system/tokens/Shape.ads.fixture.ts +0 -30
  382. package/dist/starters/react/design-system/tokens/Shape.ads.scenario.tsx +0 -4
  383. package/dist/starters/react/design-system/tokens/Space.ads.fixture.ts +0 -37
  384. package/dist/starters/react/design-system/tokens/Space.ads.scenario.tsx +0 -4
  385. package/dist/starters/react/design-system/tokens/Type.ads.fixture.ts +0 -29
  386. package/dist/starters/react/design-system/tokens/Type.ads.scenario.tsx +0 -4
  387. package/dist/starters/react/package-lock.json +0 -4707
  388. package/dist/token-fixtures.mjs +0 -30
  389. package/docs/benchmarks/bun-previews.md +0 -91
  390. package/docs/benchmarks/preview-memory.md +0 -147
  391. package/docs/benchmarks/turbo-poc.md +0 -284
  392. package/docs/plans/execution-coordination.md +0 -57
  393. /package/dist/{browser-audit → render-audit}/first-render.mjs +0 -0
  394. /package/dist/{browser-audit → render-audit}/layout-shift.mjs +0 -0
@@ -1,13 +1,15 @@
1
1
  # Starter native design system
2
2
 
3
- This private React or Preact TypeScript workspace contains semantic CSS tokens, a project-owned
4
- token review renderer, a public barrel, Linaria extraction and a preview compiler
5
- adapter, plus one example of each layer to build on: a token foundation in six groups (Color, Type, Space & sizing, Shape & elevation, Motion, Layout), Brand previews in two groups (`brand/Identity/Logo`, `brand/Icons/AppIcon`),
6
- components in four groups (`components/Actions/Button`, `components/Actions/IconButton`,
7
- `components/Content/Icon`, `components/Content/Logo`, `components/Forms/TextField`,
8
- `components/Layout/Grid`), a 24 px icon set in `assets/glyphs/` generated into
9
- `components/Content/Icon/glyphs.ts`, one pattern
10
- (`patterns/Search/SearchBar`) and one composition (`composition/Search/SearchPage`),
3
+ This private React or Preact TypeScript workspace contains semantic CSS tokens, a spatial
4
+ definition for `@ads-layout`, a generated public barrel, Linaria extraction and a preview compiler
5
+ adapter, plus examples of each layer to build on: a token foundation in six groups (Color, Type,
6
+ Space & sizing, Shape & elevation, Motion, Grid system) that ADS renders from the token sheets and
7
+ `tokens/catalog.ads.json`, components in four groups (`components/Actions/Button`,
8
+ `components/Actions/IconButton`, `components/Content/Icon`, `components/Content/Image`,
9
+ `components/Content/Logo`, `components/Forms/TextField`), a 24 px icon set in `assets/glyphs/`
10
+ generated into `components/Content/Icon/glyphs.ts`, three patterns (`patterns/Search/SearchBar`,
11
+ `patterns/Conversation`, `patterns/Shell`) and two compositions (`composition/Search/SearchPage`,
12
+ `composition/Workspace/WorkspacePage`),
11
13
  plus placeholder brand artwork in `assets/brand/` (a logo with its dark-theme
12
14
  variant, and the app icon that `assets.iconSource` names), and a shared
13
15
  `controllers/Palette` that gives Canvas, WebGL and SVG renderers their colors. Rename,
@@ -20,30 +22,29 @@ Read the local [contract](ADS.md) and the
20
22
 
21
23
  ## Start
22
24
 
23
- This project was created by `ads create`, which copied the starter shipped in that
24
- ADS version (the React starter, with the framework's files applied for Preact),
25
- named the package and ran `ads init`. Install Bun 1.4.1+ for ADS tooling and
26
- previews. The application can keep its Node/npm build pipeline.
25
+ This design system was added by `ads init --include-starter`, which copied the starter
26
+ shipped in that ADS version, generated for the selected native framework from one
27
+ shared design source, where the project had nothing, and set ADS up. The project's `package.json`
28
+ declares its package manager (`"packageManager"`, or its lockfile). Install Bun 1.4.1+ for
29
+ ADS tooling and previews. The application can keep its Node/npm build pipeline.
27
30
 
28
31
  ```sh
29
- npx @reqvire-org/ads create my-design-system --framework react # or preact
30
- cd my-design-system
31
- npm install
32
- npx playwright install chromium # browser for the accessibility audit in ads validate
33
- npm run build
32
+ npx @reqvire-org/ads init --framework react --include-starter # or preact; Bun: bunx
33
+ npm install # bun install
34
+ npx playwright install chromium # browser for the render audit in ads validate and draft acceptance
35
+ npm run build # bun --bun run build
34
36
  npm run dev:showcase
35
37
  ```
36
38
 
37
- For unreleased tooling, create from the real local package:
39
+ For unreleased tooling, initialize from the real local package:
38
40
 
39
41
  ```sh
40
- ads_tool_package="/absolute/path/to/reqvire-org-ads-0.3.47.tgz"
41
- npx --yes --package "$ads_tool_package" ads create my-design-system --framework react --tool-package "$ads_tool_package"
42
+ ads_tool_package="/absolute/path/to/reqvire-org-ads-<version>.tgz"
43
+ npx --yes --package "$ads_tool_package" ads init --framework react --include-starter --tool-package "$ads_tool_package"
42
44
  ```
43
45
 
44
- For Bun, add `--package-manager bun`: scripts use `bun run` and no npm lockfile is
45
- kept. Use `bun install`, `bunx playwright install chromium` and `bun --bun run build`/`bun --bun run dev:showcase`. Node is unnecessary with Bun
46
- 1.4.1+. ADS supplies its Bun preview compiler independently of the project build.
46
+ In a Bun project the scripts use `bun run`. Node is unnecessary with Bun 1.4.1+. ADS
47
+ supplies its Bun preview compiler independently of the project build.
47
48
 
48
49
  For an existing application, merge only the ADS source and required extraction,
49
50
  aliases and preview adapter. Preserve its framework, entry points and build.
@@ -100,22 +101,22 @@ The foundation meets WCAG 2.2 AA:
100
101
  - **Motion** (`elevation.css`): durations 70/110/150/240/400/700 ms, easing for moving between
101
102
  places (standard), entering and leaving, each with a `-strong` variant for rare important
102
103
  moments; all durations are 0 under reduced motion.
103
- - **Layout**: a column grid (`--grid-columns-sm/md/lg` = 4/8/16 columns from 0,
104
- 768 and 1024 px of container width; gutters 32/16/1 px for wide, narrow and condensed;
105
- margins 0/16/24 px), `--content-max` (72ch), container widths `--container-*`, header,
106
- side pane and rail. Breakpoints cannot be CSS variables: use 640, 768, 1024 and 1280 px
107
- in media queries, or container queries as `components/Layout/Grid` does.
104
+ - **Grid system** (`spatial.ads.json` over the `--grid-*` roles): an 8 px mini unit, breakpoints at
105
+ 320/672/1056/1312/1584 px with 4/8/16 columns and margins of 0/16/24 px, wide, narrow and
106
+ condensed gutter modes, ratios, `--content-max` (72ch), container widths `--container-*`,
107
+ header height, side pane and rail.
108
108
 
109
- `components/Layout/Grid` (`Grid`, `GridItem`) lays content on that grid by container width,
110
- so it fits any pane. The showcase's grid button draws the project's grid over every
111
- preview to check alignment.
109
+ Layouts are written with `@ads-layout` in owned styles; ADS validates them against
110
+ `spatial.ads.json` and compiles them to plain CSS, with no layout component. `patterns/Shell`
111
+ (application regions and panels) and `patterns/Conversation` (fourteen local tracks) are worked
112
+ examples. The showcase's layout-guides button inspects the actual rendered tracks, gutters,
113
+ padding and margins.
112
114
 
113
115
  `components/Content/Image` loads lazily and reserves its space; give `priority` to the view's main
114
116
  visible image only. If you add fonts in `tokens/fonts.css`, `ads assets` writes
115
- `tokens/fonts.preload.generated.ts`: call its `preloadFonts()` in the app entry.
117
+ `tokens/fonts.preload.generated.ts`; call `preloadFonts()` from the public entry in the app entry.
116
118
 
117
- Widths are fluid on the grid: set a `--grid-span-N` token (N of 16 columns) in a container
118
- query, or use `%` or `fr`. Small parts use plain sizes up to 96 px, and a panel takes
119
+ Outside `@ads-layout`, widths stay fluid: use `%` or `fr`. Small parts use plain sizes up to 96 px, and a panel takes
119
120
  `min(100%, 280px)`. `layout.widthTokens` in `ds.config.json` names widths that stay fixed, and
120
121
  `layout.fixedWidthUnits` the owners whose widths are not checked, such as overlays. `ads check`
121
122
  lists both for review.
@@ -123,20 +124,15 @@ lists both for review.
123
124
  `ads check` fails when a text or control pair falls below WCAG AA in any theme or brand
124
125
  (`token-contrast`, `component-contrast`), when a spacing step leaves the 2 px rhythm
125
126
  (`token-rhythm`) and on fixed widths (`layout-fixed-width`). `ads audit` fails horizontal
126
- overflow at 390, 768 and 1280 px, and a set width that overflows a 240 px container
127
- (`layout-overflow`).
127
+ overflow at 390, 768 and 1280 px (`layout-overflow`) and lists a set width that overflows a
128
+ 240 px container for review (`layout-overflow-narrow`).
128
129
  `ads tokens --format dtcg` exports the tokens as W3C Design Tokens JSON for design tools.
129
130
 
130
- The six token scenarios (`tokens/Color`, `Type`, `Space`, `Shape`, `Motion`, `Layout`)
131
- and their colocated fixtures visually demonstrate every token value, one tile per token
132
- with its current value. The fixture owns `{ token, property, probe }` bindings;
133
- the development-only `TokenPreview` renderer, exported through `@ds/review`, owns their presentation and applies the real CSS
134
- variables. Add/remove samples alongside token definitions. `ads check` rejects
135
- missing coverage and invented names; the App verifies the declared CSS bindings
136
- in the browser. Extend or replace the project-owned review renderer as your tokens evolve.
137
- `ads_prepare_token_samples` can prepare a fixture patch from explicit project
138
- property/probe bindings. It preserves existing samples and reports unmapped tokens;
139
- it does not guess how a new value should look. Design values belong in the shared
131
+ ADS renders the Tokens section from the token sheets and `tokens/catalog.ads.json`, which
132
+ groups the tokens and gives each its `{ token, property, probe }` sample binding. Each group is
133
+ a sidebar group with one page per kind of token, such as Typography → Line heights. Add a token's
134
+ catalogue entry alongside its definition; the view verifies the declared CSS bindings in the
135
+ browser, and `ads check` reports invalid entries (`foundation-catalog`). Design values belong in the shared
140
136
  foundation. Component/pattern variables map shared roles; they do not define
141
137
  independent token catalogues. See [ADS.md](ADS.md).
142
138
 
@@ -152,7 +148,7 @@ styles, fixtures and assets. The App loads the selected dependency closure and
152
148
  reuses unchanged runtime/CSS/font resources across selections. The MCP client
153
149
  refreshes successful revisions inside that App; failures show diagnostics and
154
150
  stale retained output. Changing a selected view's dependency closure unmounts its previous state;
155
- background warming retains unchanged mounted views. `showcase/mcp/main.tsx` exports `mountScenario(Scenario, container)` and
151
+ background warming retains unchanged mounted views. `showcase/mcp/main.ads.mount.tsx` exports `mountScenario(Scenario, container)` and
156
152
  returns an unmount callback; it is not the shell. Keep the saved `framework`,
157
153
  compiler and mount adapter consistent.
158
154
  Managed sessions own their graph output; standalone prebuilds cannot replace it.
@@ -182,5 +178,7 @@ build or delivered HTML alone does not establish those behaviors.
182
178
  Opt-in MCP editing goes through drafts: `ads_create_draft` opens a draft of one or
183
179
  more owners, `ads_update_draft` patches it, `ads_show_draft` renders it beside the
184
180
  accepted version, and `ads_accept` validates and applies the exact revision you
185
- reviewed (`dryRun` runs every check without writing). Drafts change no live source
186
- until accepted; one open draft holds each owner.
181
+ reviewed (`dryRun` runs every check without writing): `ads check`, `acceptance.scripts`,
182
+ and the draft owners' own behavior tests and render audit. Drafts change no live source
183
+ until accepted; one open draft holds each owner. After a series of accepted drafts,
184
+ `ads_validate({scope:"changed"})` checks everything they reach.
@@ -7,6 +7,12 @@ export interface IconButtonProps {
7
7
  label: string;
8
8
  size?: "sm" | "md" | "lg";
9
9
  disabled?: boolean;
10
+ /** Element id, for example so a panel can return focus to its toggle. */
11
+ id?: string;
12
+ /** For a disclosure toggle: whether the controlled region is open (`aria-expanded`). */
13
+ expanded?: boolean;
14
+ /** For a disclosure toggle: the id of the region it opens (`aria-controls`). */
15
+ controls?: string;
10
16
  onClick?: () => void;
11
17
  }
12
18
 
@@ -35,9 +41,19 @@ const sizes = {
35
41
  };
36
42
 
37
43
  /** An action shown as an icon, named for assistive technology and in its tooltip. */
38
- export function IconButton({ icon, label, size = "md", disabled, onClick }: IconButtonProps) {
44
+ export function IconButton({ icon, label, size = "md", disabled, id, expanded, controls, onClick }: IconButtonProps) {
39
45
  return (
40
- <button type="button" className={cx("ds-icon-button", base, sizes[size])} aria-label={label} title={label} disabled={disabled} onClick={onClick}>
46
+ <button
47
+ type="button"
48
+ id={id}
49
+ className={cx("ds-icon-button", base, sizes[size])}
50
+ aria-label={label}
51
+ aria-expanded={expanded}
52
+ aria-controls={controls}
53
+ title={label}
54
+ disabled={disabled}
55
+ onClick={onClick}
56
+ >
41
57
  <Icon name={icon} size={size === "lg" ? "md" : "sm"} />
42
58
  </button>
43
59
  );
@@ -11,4 +11,7 @@ pressed, disabled); the icon keeps the text color.
11
11
  | `label` | `string` | — |
12
12
  | `size` | `"sm" \| "md" \| "lg"` | `"md"` |
13
13
  | `disabled` | `boolean` | `false` |
14
+ | `id` | `string` | — |
15
+ | `expanded` | `boolean` | — (sets `aria-expanded` when given, for disclosure toggles) |
16
+ | `controls` | `string` | — (id of the region the toggle opens, as `aria-controls`) |
14
17
  | `onClick` | `() => void` | — |
@@ -0,0 +1,5 @@
1
+ # Workspace page
2
+
3
+ A review-only screen: the `Shell` pattern with `SearchBar` and `Conversation` in its main region. The Conversation uses
4
+ `context: container`, so expanding or collapsing the Shell's pushing panels changes its placement while covering panels
5
+ do not. Compositions show how public components and patterns fit together; they are not exported from `@ds`.
@@ -0,0 +1,13 @@
1
+ export const fixture = {
2
+ title: "Workspace page",
3
+ id: "workspace-page",
4
+ heading: "Support inbox",
5
+ navigation: ["Inbox", "Assigned to me", "Archive", "Settings"],
6
+ aside: "Customer: Ari · Plan: Team · Opened 2 days ago",
7
+ search: { id: "workspace-page-search", label: "Search conversations", placeholder: "Name or message…" },
8
+ messages: [
9
+ { id: "a", name: "Ari", text: "The conversation follows the main region's width. Open the details panel on a wide screen and my reply's indent stays; your prompt moves to full width once the region is narrower than the large breakpoint." },
10
+ { id: "b", name: "You", text: "And a covering panel on a small screen leaves the layout underneath unchanged?", fromUser: true },
11
+ { id: "c", name: "Ari", text: "Yes. Only pushing panels change the region's tracks." },
12
+ ],
13
+ } as const;
@@ -0,0 +1,22 @@
1
+ import { Button, Conversation, IconButton, SearchBar, Shell } from "@ds";
2
+ import { fixture } from "./WorkspacePage.ads.fixture";
3
+
4
+ // A screen composed from public parts, for review only: it is not exported from @ds.
5
+ // The Conversation uses container context, so the Shell's panels change its placement.
6
+ export const scenario = { title: fixture.title, covers: ["Shell", "Conversation", "SearchBar", "Button", "IconButton"] };
7
+ export default function Scenario() {
8
+ return (
9
+ <Shell
10
+ id={fixture.id}
11
+ header={<strong>{fixture.heading}</strong>}
12
+ navigation={fixture.navigation.map((item) => <Button key={item} label={item} variant="secondary" />)}
13
+ rail={<IconButton icon="search" label="Search" />}
14
+ aside={<p>{fixture.aside}</p>}
15
+ defaultNavigationExpanded
16
+ defaultAsideOpen
17
+ >
18
+ <SearchBar {...fixture.search} />
19
+ <Conversation messages={fixture.messages} composer="Reply" />
20
+ </Shell>
21
+ );
22
+ }
@@ -6,6 +6,7 @@ export { Icon, iconNames, type IconName, type IconProps } from "./components/Con
6
6
  export { Image, type ImageProps } from "./components/Content/Image/Image";
7
7
  export { Logo, type LogoProps } from "./components/Content/Logo/Logo";
8
8
  export { TextField, type TextFieldProps } from "./components/Forms/TextField/TextField";
9
- export { Grid, GridItem, type GridProps, type GridItemProps } from "./components/Layout/Grid/Grid";
10
9
  export { observePalette, paletteContext, paletteFor, resolveColor, type ColorToken, type Palette, type PaletteColor, type PaletteContext } from "./controllers/Palette/Palette";
10
+ export { Conversation, type ConversationProps } from "./patterns/Conversation/Conversation";
11
11
  export { SearchBar, type SearchBarProps } from "./patterns/Search/SearchBar/SearchBar";
12
+ export { Shell, type ShellAsideMode, type ShellProps } from "./patterns/Shell/Shell";
@@ -0,0 +1 @@
1
+ export { Conversation, type ConversationProps } from "./Conversation";
@@ -0,0 +1,7 @@
1
+ export const fixture = {
2
+ messages: [
3
+ { id: "a", name: "Ari", text: "The avatar occupies one master track. Its glyph keeps the same size as the track grows." },
4
+ { id: "b", name: "You", text: "Can the reading indent stay fixed?", fromUser: true },
5
+ { id: "c", name: "Ari", text: "Yes. The second example fixes the first track and lets the remaining thirteen tracks share the available space." },
6
+ ],
7
+ } as const;
@@ -0,0 +1,15 @@
1
+ import { Conversation } from "@ds";
2
+ import { previewFrameClasses as frame } from "@reqvire-org/ads/preview";
3
+ import { fixture } from "./Conversation.ads.fixture";
4
+ export const scenario = { title: "Conversation · fixed and fluid avatar track", covers: ["Conversation"] };
5
+ // Each example sits in a region container: placement follows the region, not the window.
6
+ export default function Scenario() {
7
+ return <div className={frame("page-wide", "column")}>
8
+ <h2 className={frame("heading")}>Fixed avatar track (default)</h2>
9
+ <div className={frame("region")}><Conversation messages={fixture.messages} composer="Composer spans the whole region" /></div>
10
+ <h2 className={frame("heading")}>Fluid avatar track</h2>
11
+ <div className={frame("region")}><Conversation messages={fixture.messages} fixedIndent={false} composer="Composer spans the whole region" /></div>
12
+ <h2 className={frame("heading")}>Narrow region</h2>
13
+ <div className={frame("region", "width-large")}><Conversation messages={fixture.messages} composer="Prompts take the full width in a narrow region" /></div>
14
+ </div>;
15
+ }
@@ -0,0 +1,105 @@
1
+ import { css, cx } from "@linaria/atomic";
2
+ import type { ReactNode } from "react";
3
+
4
+ export interface ConversationProps {
5
+ messages: readonly { id: string; name: string; text: string; fromUser?: boolean }[];
6
+ composer?: ReactNode;
7
+ /** The leading avatar track is fixed (default), so text starts right after the avatar; false makes it one fluid column. */
8
+ fixedIndent?: boolean;
9
+ }
10
+
11
+ const cells = `
12
+ @ads-cell .ux-conversation-message {
13
+ span: full;
14
+ @ads-layout inherited {
15
+ gutter: none;
16
+ @ads-cell .ux-conversation-avatar { span: 1; }
17
+ @ads-cell .ux-conversation-content { start: 2; span: 11; }
18
+ }
19
+ }
20
+ @ads-cell .ux-conversation-prompt {
21
+ span: full;
22
+ @ads-at lg { start: 6; span: 9; }
23
+ }
24
+ @ads-cell .ux-conversation-composer { span: full; }
25
+ `;
26
+ const fluid = css`
27
+ @ads-layout fluid {
28
+ context: container;
29
+ columns: 14;
30
+ gutter: none;
31
+ margin: --space-0;
32
+ row-gap: --space-12;
33
+ ${cells}
34
+ }
35
+ `;
36
+ const hybrid = css`
37
+ @ads-layout hybrid {
38
+ context: container;
39
+ columns: 14;
40
+ fixed-start: --space-16;
41
+ gutter: none;
42
+ margin: --space-0;
43
+ row-gap: --space-12;
44
+ ${cells}
45
+ }
46
+ `;
47
+ // The conversation owns the region its tracks respond to: a container query measures an
48
+ // ancestor, never the grid element itself.
49
+ const region = css`
50
+ container-type: inline-size;
51
+ container-name: ads-region;
52
+ min-inline-size: 0;
53
+ `;
54
+ const avatar = css`
55
+ inline-size: var(--icon-lg);
56
+ max-inline-size: 100%;
57
+ aspect-ratio: 1;
58
+ border-radius: var(--radius-full);
59
+ background: var(--accent);
60
+ color: var(--accent-fg);
61
+ display: flex;
62
+ align-items: center;
63
+ justify-content: center;
64
+ font-size: var(--text-xs);
65
+ font-weight: var(--weight-semibold);
66
+ `;
67
+ const content = css`
68
+ display: flex;
69
+ flex-direction: column;
70
+ gap: var(--space-2);
71
+ overflow-wrap: anywhere;
72
+ color: var(--text-body);
73
+ font-size: var(--text-base);
74
+ line-height: var(--leading-normal);
75
+ `;
76
+ const name = css`font-weight: var(--weight-semibold); color: var(--text-strong);`;
77
+ const text = css`margin: 0;`;
78
+ const prompt = css`
79
+ padding: var(--space-8);
80
+ background: var(--bg-surface);
81
+ border-radius: var(--radius-lg);
82
+ `;
83
+
84
+ /** A locally defined fourteen-track conversation that responds to its region's width; no layout wrapper components. */
85
+ export function Conversation({ messages, composer, fixedIndent = true }: ConversationProps) {
86
+ return (
87
+ <section aria-label="Conversation" className={region}>
88
+ <div className={fixedIndent ? hybrid : fluid}>
89
+ {messages.map(message => message.fromUser ? (
90
+ <article key={message.id} className={cx("ux-conversation-prompt", prompt, content)}>
91
+ <strong className={name}>{message.name}</strong><p className={text}>{message.text}</p>
92
+ </article>
93
+ ) : (
94
+ <article key={message.id} className="ux-conversation-message">
95
+ <span aria-hidden="true" className={cx("ux-conversation-avatar", avatar)}>{message.name.slice(0, 1)}</span>
96
+ <div className={cx("ux-conversation-content", content)}>
97
+ <strong className={name}>{message.name}</strong><p className={text}>{message.text}</p>
98
+ </div>
99
+ </article>
100
+ ))}
101
+ <div className="ux-conversation-composer">{composer}</div>
102
+ </div>
103
+ </section>
104
+ );
105
+ }
@@ -0,0 +1,9 @@
1
+ # Conversation
2
+
3
+ A fourteen-track local region using the shared spatial definition. Assistant rows inherit the parent tracks through native CSS subgrid. The avatar occupies track 1, content occupies tracks 2–12, user prompts occupy tracks 6–14 when the region reaches the large breakpoint, and the composer spans the region. Narrow user prompts take the full width.
4
+
5
+ By default the layout is hybrid: track 1 is a fixed `--space-16` (32px) track holding the 24px avatar, so the text starts one mini unit after it. `fixedIndent={false}` makes track 1 one fluid column instead, which widens the gap with the region. The avatar glyph stays at the shared icon size in both variants. Content remains naturally sized vertically. Place a product composer in the `composer` slot.
6
+
7
+ The layout uses `context: container`, and the conversation owns that container: its outer element is the region its tracks respond to, so placement follows the space the conversation actually has. Opening a side panel narrows it and can move prompts back to full width.
8
+
9
+ Placement is compiled into the initial CSS. There are no placement effects, runtime layout validation or layout wrapper components.
@@ -0,0 +1,5 @@
1
+ export const fixture = {
2
+ id: "shell-floating",
3
+ // Layout scenarios show where each region goes; Composition → Workspace page shows real content.
4
+ regions: { header: "Header", navigation: "Navigation", rail: "Rail", main: "Main", aside: "Aside" },
5
+ } as const;
@@ -0,0 +1,21 @@
1
+ import { Shell } from "@ds";
2
+ import { RegionBlock } from "@ds/review";
3
+ import { fixture } from "./Floating.ads.fixture";
4
+
5
+ // A floating aside always covers the main region.
6
+ export const scenario = { title: "Shell · floating aside", covers: ["Shell"] };
7
+ export default function Scenario() {
8
+ return (
9
+ <Shell
10
+ id={fixture.id}
11
+ header={<RegionBlock label={fixture.regions.header} tone="blue" />}
12
+ navigation={<RegionBlock label={fixture.regions.navigation} tone="mint" />}
13
+ rail={<RegionBlock label={fixture.regions.rail} tone="mint" />}
14
+ aside={<RegionBlock label={fixture.regions.aside} tone="warm" />}
15
+ defaultAsideOpen
16
+ asideMode="floating"
17
+ >
18
+ <RegionBlock label={fixture.regions.main} tone="lavender" />
19
+ </Shell>
20
+ );
21
+ }
@@ -0,0 +1,43 @@
1
+ # Shell
2
+
3
+ Application regions: a header, a navigation panel at the inline start, the main region and an optional aside at the inline end. The geometry is one validated `@ads-layout hybrid` construction per state; there are no placement effects or layout wrapper components.
4
+
5
+ | State | Below `lg` | From `lg` |
6
+ | --- | --- | --- |
7
+ | Navigation collapsed | Rail track (`--navigation-rail-width`) | Rail track |
8
+ | Navigation expanded | Rail track stays; the panel **covers** the main region from the start edge | Panel track (`--side-pane-width`) **pushes** the main region |
9
+ | Aside closed | Empty end track | Empty end track |
10
+ | Aside open, `asideMode="docked"` | Covers the main region from the end edge | Panel track pushes the main region |
11
+ | Aside open, `asideMode="floating"` | Covers | Covers; the main region's tracks are unchanged |
12
+
13
+ Rows are `auto fill`: the header keeps its content height and the panels and main region fill the rest. The header continues the column tracks (an inherited layout), so the navigation toggle stays over the navigation track and the header bar starts on the same keyline as the main region's content. Covering panels keep to the body row, so the header stays reachable.
14
+
15
+ A backdrop (`--bg-overlay`) appears wherever a panel covers the main region: below `lg` for an expanded navigation or a docked aside, and at every size for a floating aside. It is hidden with per-breakpoint `visible: false`, so no script decides when it shows.
16
+
17
+ The compiler checks every state at every breakpoint: placements stay within the three tracks and the fixed tracks always leave fluid space for the main region (at `lg`, 1056 − 280 − 280 px).
18
+
19
+ The main region declares `container: region`. Layouts inside it that use `context: container`, such as Conversation, respond to the main region's width, so opening a pushing panel can change their placement while a covering panel does not.
20
+
21
+ ## Behaviour
22
+
23
+ - The header's navigation toggle and the aside toggle are `IconButton`s with `aria-expanded` and `aria-controls`.
24
+ - A panel that opens over the content takes focus. Escape closes a covering panel and focus returns to its toggle; a press on the backdrop closes it too. A pushing navigation panel stays open on Escape; the aside's close button and Escape always close it.
25
+ - Navigation content renders only while expanded; `rail` renders while collapsed.
26
+
27
+ ## Props
28
+
29
+ | Prop | Type | Default |
30
+ | --- | --- | --- |
31
+ | `id` | `string` | — (prefix for region and toggle ids) |
32
+ | `header` | `ReactNode` | — |
33
+ | `navigation` | `ReactNode` | — |
34
+ | `rail` | `ReactNode` | — |
35
+ | `navigationLabel` | `string` | `"Navigation"` |
36
+ | `navigationExpanded` / `defaultNavigationExpanded` / `onNavigationExpandedChange` | controlled or uncontrolled | `false` |
37
+ | `aside` | `ReactNode` | — (no aside or aside toggle) |
38
+ | `asideLabel` | `string` | `"Details"` |
39
+ | `asideMode` | `"docked" \| "floating"` | `"docked"` |
40
+ | `asideOpen` / `defaultAsideOpen` / `onAsideOpenChange` | controlled or uncontrolled | `false` |
41
+ | `children` | `ReactNode` | — (main region content) |
42
+
43
+ The Shell fills its parent's block size; give the application root a height (for example `100dvh`). The main region scrolls.
@@ -0,0 +1 @@
1
+ export { Shell, type ShellAsideMode, type ShellProps } from "./Shell";
@@ -0,0 +1,5 @@
1
+ export const fixture = {
2
+ id: "shell-shell",
3
+ // Layout scenarios show where each region goes; Composition → Workspace page shows real content.
4
+ regions: { header: "Header", navigation: "Navigation", rail: "Rail", main: "Main", aside: "Aside" },
5
+ } as const;
@@ -0,0 +1,21 @@
1
+ import { Shell } from "@ds";
2
+ import { RegionBlock } from "@ds/review";
3
+ import { fixture } from "./Shell.ads.fixture";
4
+
5
+ // From the large breakpoint both panels push the main region; below it they cover it.
6
+ export const scenario = { title: "Shell · expanded navigation, docked aside", covers: ["Shell"] };
7
+ export default function Scenario() {
8
+ return (
9
+ <Shell
10
+ id={fixture.id}
11
+ header={<RegionBlock label={fixture.regions.header} tone="blue" />}
12
+ navigation={<RegionBlock label={fixture.regions.navigation} tone="mint" />}
13
+ rail={<RegionBlock label={fixture.regions.rail} tone="mint" />}
14
+ aside={<RegionBlock label={fixture.regions.aside} tone="warm" />}
15
+ defaultNavigationExpanded
16
+ defaultAsideOpen
17
+ >
18
+ <RegionBlock label={fixture.regions.main} tone="lavender" />
19
+ </Shell>
20
+ );
21
+ }