@reqvire-org/ads 0.3.53 → 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 (401) hide show
  1. package/README.md +114 -94
  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 +6 -6
  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 +222 -79
  21. package/dist/boundaries.mjs +137 -40
  22. package/dist/brand-assets.mjs +219 -47
  23. package/dist/brands.mjs +86 -27
  24. package/dist/bun-compiler.mjs +34 -13
  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 +66 -0
  30. package/dist/check.mjs +756 -196
  31. package/dist/cli.mjs +203 -100
  32. package/dist/color-values.mjs +21 -21
  33. package/dist/component-contrast.mjs +2 -2
  34. package/dist/config.mjs +308 -163
  35. package/dist/construction-styles.cjs +10 -0
  36. package/dist/contracts.d.mts +9 -0
  37. package/dist/control-padding.mjs +45 -25
  38. package/dist/css-values.mjs +3 -2
  39. package/dist/declarative-flow.mjs +209 -109
  40. package/dist/design-values.mjs +136 -51
  41. package/dist/development-runtime.mjs +4 -6
  42. package/dist/draft-boundary.mjs +11 -6
  43. package/dist/evidence.mjs +1 -1
  44. package/dist/finding-rules.mjs +7 -5
  45. package/dist/font-rules.mjs +2 -2
  46. package/dist/fonts-generated.mjs +4 -2
  47. package/dist/foundation-views.mjs +238 -0
  48. package/dist/foundation.mjs +63 -39
  49. package/dist/generated-entries.mjs +198 -0
  50. package/dist/icons.mjs +80 -33
  51. package/dist/image-attributes.mjs +109 -36
  52. package/dist/image-size.mjs +1 -1
  53. package/dist/index.mjs +0 -2
  54. package/dist/init.mjs +128 -68
  55. package/dist/investigations.mjs +2 -2
  56. package/dist/layers.mjs +300 -127
  57. package/dist/layout-widths.mjs +180 -85
  58. package/dist/linaria/preserve-values.cjs +7 -0
  59. package/dist/linaria/spatial-inputs.cjs +56 -0
  60. package/dist/lockup-composition.mjs +44 -0
  61. package/dist/lockup-model.cjs +64 -0
  62. package/dist/mcp/THIRD_PARTY_NOTICES.md +51 -1
  63. package/dist/mcp/apps.mjs +4 -30
  64. package/dist/mcp/behavior-pages.mjs +72 -24
  65. package/dist/mcp/build-status.mjs +257 -64
  66. package/dist/mcp/catalog.mjs +91 -26
  67. package/dist/mcp/context.mjs +17 -18
  68. package/dist/mcp/draft-discovery.mjs +44 -21
  69. package/dist/mcp/drafts.mjs +978 -343
  70. package/dist/mcp/execution-coordinator.mjs +417 -167
  71. package/dist/mcp/execution-results.mjs +7 -7
  72. package/dist/mcp/mutations.mjs +701 -219
  73. package/dist/mcp/preview-watch.mjs +465 -161
  74. package/dist/mcp/preview-widget.bundle.js +44 -50
  75. package/dist/mcp/prompts.mjs +6 -6
  76. package/dist/mcp/result-pages.mjs +1 -1
  77. package/dist/mcp/sandbox-host.mjs +1 -1
  78. package/dist/mcp/server.mjs +2436 -570
  79. package/dist/mcp/showcase-host.mjs +176 -39
  80. package/dist/mcp/skills.mjs +1 -1
  81. package/dist/mcp/text-diff.mjs +29 -10
  82. package/dist/paint-contracts.mjs +174 -81
  83. package/dist/palette-generated.mjs +2 -2
  84. package/dist/preview-bun.mjs +493 -187
  85. package/dist/preview-failure.mjs +1 -1
  86. package/dist/preview-files.mjs +13 -13
  87. package/dist/preview-imports.mjs +104 -55
  88. package/dist/preview-inputs.mjs +2 -2
  89. package/dist/preview-requests.mjs +24 -0
  90. package/dist/preview-resources.mjs +288 -147
  91. package/dist/preview-scope.mjs +5 -4
  92. package/dist/program-cache.mjs +10 -0
  93. package/dist/project-documents.mjs +1 -1
  94. package/dist/public-api.mjs +70 -31
  95. package/dist/public-props.mjs +39 -22
  96. package/dist/{browser-audit → render-audit}/axe-run.mjs +3 -3
  97. package/dist/{browser-audit → render-audit}/image-shape.mjs +2 -2
  98. package/dist/{browser-audit → render-audit}/layout-overflow.mjs +86 -23
  99. package/dist/{browser-audit → render-audit}/non-text-contrast.mjs +86 -27
  100. package/dist/{browser-audit → render-audit}/render-states.mjs +208 -52
  101. package/dist/{browser-audit → render-audit}/worker.mjs +86 -30
  102. package/dist/render-audit.mjs +828 -0
  103. package/dist/render-color-probe.mjs +96 -42
  104. package/dist/resource-limits.mjs +229 -97
  105. package/dist/runtime-contracts.mjs +467 -185
  106. package/dist/scenario-groups.mjs +22 -10
  107. package/dist/scenario-inspector.mjs +6 -43
  108. package/dist/scenario-program.mjs +8 -25
  109. package/dist/scenario-registry.mjs +72 -30
  110. package/dist/scenario-selectors.mjs +161 -64
  111. package/dist/scenario-slots.mjs +149 -56
  112. package/dist/scenario-trace.mjs +215 -109
  113. package/dist/scenarios-compiler.mjs +768 -359
  114. package/dist/scenarios-vite.d.mts +1 -3
  115. package/dist/scenarios-vite.mjs +2 -81
  116. package/dist/scenarios.mjs +424 -159
  117. package/dist/selector-match.mjs +2 -2
  118. package/dist/showcase/client.bundle.js +57 -56
  119. package/dist/showcase/draft-navigation.js +18 -0
  120. package/dist/showcase/favicon.ico +0 -0
  121. package/dist/showcase/favicon.svg +1 -0
  122. package/dist/showcase/foundation-view.css +55 -0
  123. package/dist/showcase/foundation-view.mjs +252 -0
  124. package/dist/showcase/guide-controls.ads.review.mjs +32 -0
  125. package/dist/showcase/icons.js +1 -145
  126. package/dist/showcase/index.html +3 -31
  127. package/dist/showcase/preview-frame.ads.review.css +46 -0
  128. package/dist/showcase/preview-frame.ads.review.d.mts +11 -0
  129. package/dist/showcase/preview-frame.ads.review.mjs +22 -0
  130. package/dist/showcase/preview-state.js +0 -9
  131. package/dist/showcase/refresh-scheduler.js +23 -0
  132. package/dist/showcase/style.css +5 -47
  133. package/dist/showcase/ui/ui.css +1353 -0
  134. package/dist/showcase/ui/ui.js +1062 -0
  135. package/dist/showcase-coverage.mjs +58 -37
  136. package/dist/skills/README.md +24 -23
  137. package/dist/skills/ads-designer/README.md +8 -2
  138. package/dist/skills/ads-designer/SKILL.md +152 -144
  139. package/dist/skills/ads-designer/references/accessibility.md +14 -11
  140. package/dist/skills/ads-designer/references/atomic-styles.md +4 -4
  141. package/dist/skills/ads-designer/references/behaviors.md +34 -30
  142. package/dist/skills/ads-designer/references/branding.md +98 -10
  143. package/dist/skills/ads-designer/references/captures.md +31 -31
  144. package/dist/skills/ads-designer/references/cli.md +21 -20
  145. package/dist/skills/ads-designer/references/contracts.md +63 -29
  146. package/dist/skills/ads-designer/references/design-data.md +49 -52
  147. package/dist/skills/ads-designer/references/drafts.md +71 -52
  148. package/dist/skills/ads-designer/references/evidence.md +1 -5
  149. package/dist/skills/ads-designer/references/guarded-editing.md +58 -51
  150. package/dist/skills/ads-designer/references/layers.md +1 -1
  151. package/dist/skills/ads-designer/references/layout.md +347 -0
  152. package/dist/skills/ads-designer/references/mobile.md +2 -1
  153. package/dist/skills/{ads-motion/references/performance.md → ads-designer/references/motion-performance.md} +5 -1
  154. package/dist/skills/{ads-motion/references/build.md → ads-designer/references/motion.md} +73 -5
  155. package/dist/skills/ads-designer/references/performance.md +3 -2
  156. package/dist/skills/ads-designer/references/review.md +42 -38
  157. package/dist/skills/ads-designer/references/runtimes.md +33 -30
  158. package/dist/skills/ads-designer/references/scenarios.md +17 -19
  159. package/dist/skills/{ads-break-ui/references/catalog.md → ads-designer/references/stress-catalog.md} +3 -1
  160. package/dist/skills/ads-designer/references/stress-test.md +68 -0
  161. package/dist/skills/ads-designer/references/validation.md +83 -71
  162. package/dist/skills/ads-designer/references/workflows.md +19 -37
  163. package/dist/skills/ads-import/SKILL.md +43 -328
  164. package/dist/skills/ads-import/references/atomic-styles.md +4 -4
  165. package/dist/skills/ads-import/references/behaviors.md +34 -30
  166. package/dist/skills/ads-import/references/branding.md +5 -5
  167. package/dist/skills/ads-import/references/captures.md +31 -31
  168. package/dist/skills/ads-import/references/cli.md +21 -20
  169. package/dist/skills/ads-import/references/compatibility.md +1 -1
  170. package/dist/skills/ads-import/references/contracts.md +63 -29
  171. package/dist/skills/ads-import/references/design-data.md +49 -52
  172. package/dist/skills/ads-import/references/drafts.md +71 -52
  173. package/dist/skills/ads-import/references/evidence.md +1 -5
  174. package/dist/skills/ads-import/references/guarded-editing.md +58 -51
  175. package/dist/skills/ads-import/references/implementation.md +2 -1
  176. package/dist/skills/ads-import/references/layers.md +1 -1
  177. package/dist/skills/ads-import/references/layout.md +347 -0
  178. package/dist/skills/ads-import/references/review.md +42 -38
  179. package/dist/skills/ads-import/references/runtimes.md +33 -30
  180. package/dist/skills/ads-import/references/scenarios.md +17 -19
  181. package/dist/skills/ads-import/references/tokens.md +3 -3
  182. package/dist/skills/ads-import/references/validation.md +83 -71
  183. package/dist/skills/ads-import/references/workflows.md +19 -37
  184. package/dist/skills/ads-migrate/SKILL.md +56 -0
  185. package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +602 -0
  186. package/dist/skills/ads-port/SKILL.md +54 -346
  187. package/dist/skills/ads-port/references/atomic-styles.md +4 -4
  188. package/dist/skills/ads-port/references/behaviors.md +34 -30
  189. package/dist/skills/ads-port/references/captures.md +31 -31
  190. package/dist/skills/ads-port/references/cli.md +21 -20
  191. package/dist/skills/ads-port/references/contracts.md +63 -29
  192. package/dist/skills/ads-port/references/design-data.md +49 -52
  193. package/dist/skills/ads-port/references/drafts.md +71 -52
  194. package/dist/skills/ads-port/references/evidence.md +1 -5
  195. package/dist/skills/ads-port/references/guarded-editing.md +58 -51
  196. package/dist/skills/ads-port/references/layers.md +1 -1
  197. package/dist/skills/ads-port/references/layout.md +347 -0
  198. package/dist/skills/ads-port/references/lint-and-docs.md +8 -11
  199. package/dist/skills/ads-port/references/native-implementation.md +8 -7
  200. package/dist/skills/ads-port/references/review.md +42 -38
  201. package/dist/skills/ads-port/references/runtimes.md +33 -30
  202. package/dist/skills/ads-port/references/scenarios.md +17 -19
  203. package/dist/skills/ads-port/references/validation.md +83 -71
  204. package/dist/skills/ads-port/references/workflows.md +19 -37
  205. package/dist/source-symbols.mjs +1 -8
  206. package/dist/source-values.mjs +266 -128
  207. package/dist/spatial-composition.mjs +322 -0
  208. package/dist/spatial-contexts.cjs +56 -0
  209. package/dist/spatial-css.cjs +351 -0
  210. package/dist/spatial-inputs.cjs +80 -0
  211. package/dist/spatial-metadata.mjs +18 -0
  212. package/dist/spatial-model.cjs +322 -0
  213. package/dist/spatial.mjs +21 -0
  214. package/dist/stage-timing.cjs +20 -0
  215. package/dist/starters/preact/design-system/patterns/Conversation/Conversation.tsx +105 -0
  216. package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +275 -0
  217. package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
  218. package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
  219. package/dist/starters/preact/design-system/showcase/mcp/main.ads.mount.tsx +8 -0
  220. package/dist/starters/preact/ds.config.json +24 -19
  221. package/dist/starters/preact/package.json +4 -8
  222. package/dist/starters/preact/tsconfig.json +4 -5
  223. package/dist/starters/preact/vite.config.ts +3 -3
  224. package/dist/starters/react/ADS.md +42 -47
  225. package/dist/starters/react/README.md +54 -52
  226. package/dist/starters/react/design-system/components/Actions/Button/Button.ads.exports.ts +1 -0
  227. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.exports.ts +1 -0
  228. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +18 -2
  229. package/dist/starters/react/design-system/components/Actions/IconButton/README.md +3 -0
  230. package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.exports.ts +1 -0
  231. package/dist/starters/react/design-system/components/Content/Image/Image.ads.exports.ts +1 -0
  232. package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.exports.ts +1 -0
  233. package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.exports.ts +1 -0
  234. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/README.md +5 -0
  235. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.fixture.ts +13 -0
  236. package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.scenario.tsx +22 -0
  237. package/dist/starters/react/design-system/controllers/Palette/Palette.ads.exports.ts +1 -0
  238. package/dist/starters/react/design-system/index.ts +5 -8
  239. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.exports.ts +1 -0
  240. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.fixture.ts +7 -0
  241. package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.scenario.tsx +15 -0
  242. package/dist/starters/react/design-system/patterns/Conversation/Conversation.tsx +105 -0
  243. package/dist/starters/react/design-system/patterns/Conversation/README.md +9 -0
  244. package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.exports.ts +1 -0
  245. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.fixture.ts +5 -0
  246. package/dist/starters/react/design-system/patterns/Shell/Floating.ads.scenario.tsx +21 -0
  247. package/dist/starters/react/design-system/patterns/Shell/README.md +43 -0
  248. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.exports.ts +1 -0
  249. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.fixture.ts +5 -0
  250. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +21 -0
  251. package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +274 -0
  252. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +1 -0
  253. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
  254. package/dist/starters/react/design-system/review/index.ads.review.ts +4 -0
  255. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.exports.ts +1 -0
  256. package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.review.tsx +6 -0
  257. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +1 -0
  258. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
  259. package/dist/starters/react/design-system/showcase/mcp/{main.tsx → main.ads.mount.tsx} +4 -2
  260. package/dist/starters/react/design-system/styles.css +1 -0
  261. package/dist/starters/react/design-system/tokens/catalog.ads.json +1221 -0
  262. package/dist/starters/react/design-system/tokens/colors.css +1 -1
  263. package/dist/starters/react/design-system/tokens/spacing.css +22 -32
  264. package/dist/starters/react/design-system/tokens/spatial.ads.json +70 -0
  265. package/dist/starters/react/design-system/tokens/themes.generated.ts +1 -1
  266. package/dist/starters/react/ds.config.json +24 -19
  267. package/dist/starters/react/package.json +2 -6
  268. package/dist/starters/react/tsconfig.json +2 -3
  269. package/dist/starters/react/vite.config.ts +3 -3
  270. package/dist/style-boundaries.mjs +73 -27
  271. package/dist/task-cache.mjs +173 -72
  272. package/dist/task-worker.mjs +22 -11
  273. package/dist/test-boundaries.mjs +133 -60
  274. package/dist/themes-generated.mjs +1 -1
  275. package/dist/themes-watch.mjs +60 -19
  276. package/dist/themes.mjs +176 -73
  277. package/dist/token-export.mjs +39 -14
  278. package/dist/token-policy.mjs +6 -3
  279. package/dist/token-quality.mjs +6 -6
  280. package/dist/token-samples.mjs +16 -5
  281. package/dist/tokens.mjs +71 -26
  282. package/dist/ui-framework.mjs +16 -14
  283. package/dist/unit-contracts.mjs +270 -89
  284. package/dist/units.mjs +215 -180
  285. package/dist/usage.mjs +138 -38
  286. package/dist/validation-checks.mjs +121 -38
  287. package/dist/validation-inputs.mjs +187 -78
  288. package/dist/validation.mjs +268 -102
  289. package/dist/verification/browser.mjs +27 -5
  290. package/dist/verification.mjs +711 -187
  291. package/docs/ADS.md +100 -89
  292. package/docs/ARCHITECTURE.md +353 -159
  293. package/docs/BEHAVIORS.md +33 -28
  294. package/docs/CACHING.md +55 -11
  295. package/docs/CHANGELOG.md +358 -17
  296. package/docs/COMPARISON.md +1 -1
  297. package/docs/CONTRACTS.md +22 -29
  298. package/docs/DESIGN-REFERENCES.md +40 -0
  299. package/docs/GUIDE.md +313 -292
  300. package/docs/MCP.md +261 -439
  301. package/docs/SPATIAL-CHECKS.md +69 -0
  302. package/docs/benchmarks/README.md +39 -0
  303. package/package.json +42 -34
  304. package/dist/browser-audit.mjs +0 -424
  305. package/dist/contract-migration.mjs +0 -110
  306. package/dist/create.mjs +0 -48
  307. package/dist/lint-config.mjs +0 -48
  308. package/dist/mcp/draft-exports.mjs +0 -40
  309. package/dist/mcp/edit-preparation.mjs +0 -115
  310. package/dist/mcp/project-widget.bundle.js +0 -114
  311. package/dist/mcp/reports.mjs +0 -101
  312. package/dist/mcp/widget.bundle.js +0 -147
  313. package/dist/oxlint.mjs +0 -88
  314. package/dist/preview-builder.mjs +0 -133
  315. package/dist/preview-workers.mjs +0 -184
  316. package/dist/showcase.mjs +0 -77
  317. package/dist/skills/ads-break-ui/LICENSE.upstream +0 -21
  318. package/dist/skills/ads-break-ui/README.md +0 -16
  319. package/dist/skills/ads-break-ui/SKILL.md +0 -415
  320. package/dist/skills/ads-break-ui/agents/openai.yaml +0 -4
  321. package/dist/skills/ads-break-ui/references/atomic-styles.md +0 -293
  322. package/dist/skills/ads-break-ui/references/behaviors.md +0 -411
  323. package/dist/skills/ads-break-ui/references/captures.md +0 -160
  324. package/dist/skills/ads-break-ui/references/contracts.md +0 -284
  325. package/dist/skills/ads-break-ui/references/design-data.md +0 -354
  326. package/dist/skills/ads-break-ui/references/drafts.md +0 -178
  327. package/dist/skills/ads-break-ui/references/evidence.md +0 -128
  328. package/dist/skills/ads-break-ui/references/guarded-editing.md +0 -154
  329. package/dist/skills/ads-break-ui/references/layers.md +0 -145
  330. package/dist/skills/ads-break-ui/references/reporting.md +0 -101
  331. package/dist/skills/ads-break-ui/references/review.md +0 -96
  332. package/dist/skills/ads-break-ui/references/runtimes.md +0 -203
  333. package/dist/skills/ads-break-ui/references/scenarios.md +0 -246
  334. package/dist/skills/ads-break-ui/references/validation.md +0 -162
  335. package/dist/skills/ads-break-ui/references/verification.md +0 -58
  336. package/dist/skills/ads-break-ui/references/workflows.md +0 -83
  337. package/dist/skills/ads-designer/references/reporting.md +0 -101
  338. package/dist/skills/ads-import/references/reporting.md +0 -101
  339. package/dist/skills/ads-motion/LICENSE.upstream +0 -21
  340. package/dist/skills/ads-motion/README.md +0 -22
  341. package/dist/skills/ads-motion/SKILL.md +0 -388
  342. package/dist/skills/ads-motion/agents/openai.yaml +0 -4
  343. package/dist/skills/ads-motion/references/atomic-styles.md +0 -293
  344. package/dist/skills/ads-motion/references/audit.md +0 -44
  345. package/dist/skills/ads-motion/references/behaviors.md +0 -411
  346. package/dist/skills/ads-motion/references/captures.md +0 -160
  347. package/dist/skills/ads-motion/references/contracts.md +0 -284
  348. package/dist/skills/ads-motion/references/design-data.md +0 -354
  349. package/dist/skills/ads-motion/references/drafts.md +0 -178
  350. package/dist/skills/ads-motion/references/evidence.md +0 -128
  351. package/dist/skills/ads-motion/references/guarded-editing.md +0 -154
  352. package/dist/skills/ads-motion/references/layers.md +0 -145
  353. package/dist/skills/ads-motion/references/motion-review.md +0 -35
  354. package/dist/skills/ads-motion/references/reporting.md +0 -101
  355. package/dist/skills/ads-motion/references/review.md +0 -96
  356. package/dist/skills/ads-motion/references/runtimes.md +0 -203
  357. package/dist/skills/ads-motion/references/scenarios.md +0 -246
  358. package/dist/skills/ads-motion/references/validation.md +0 -162
  359. package/dist/skills/ads-motion/references/verification.md +0 -39
  360. package/dist/skills/ads-motion/references/workflows.md +0 -83
  361. package/dist/skills/ads-port/references/reporting.md +0 -101
  362. package/dist/starters/preact/design-system/components/Layout/Grid/Grid.tsx +0 -76
  363. package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.tsx +0 -29
  364. package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
  365. package/dist/starters/preact/design-system/review/token-preview/TokenPreview.tsx +0 -137
  366. package/dist/starters/preact/design-system/showcase/mcp/main.tsx +0 -6
  367. package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.fixture.ts +0 -7
  368. package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.scenario.tsx +0 -4
  369. package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.fixture.ts +0 -7
  370. package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.scenario.tsx +0 -4
  371. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.fixture.ts +0 -12
  372. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.scenario.tsx +0 -17
  373. package/dist/starters/react/design-system/components/Layout/Grid/Grid.tsx +0 -75
  374. package/dist/starters/react/design-system/components/Layout/Grid/README.md +0 -21
  375. package/dist/starters/react/design-system/review/brand-preview/BrandPreview.tsx +0 -112
  376. package/dist/starters/react/design-system/review/demo-frame/DemoFrame.tsx +0 -29
  377. package/dist/starters/react/design-system/review/grid-cell/GridCell.tsx +0 -18
  378. package/dist/starters/react/design-system/review/index.ts +0 -5
  379. package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
  380. package/dist/starters/react/design-system/review/token-preview/TokenPreview.tsx +0 -137
  381. package/dist/starters/react/design-system/showcase/mcp/index.html +0 -1
  382. package/dist/starters/react/design-system/tokens/Color.ads.fixture.ts +0 -124
  383. package/dist/starters/react/design-system/tokens/Color.ads.scenario.tsx +0 -4
  384. package/dist/starters/react/design-system/tokens/Layout.ads.fixture.ts +0 -39
  385. package/dist/starters/react/design-system/tokens/Layout.ads.scenario.tsx +0 -4
  386. package/dist/starters/react/design-system/tokens/Motion.ads.fixture.ts +0 -18
  387. package/dist/starters/react/design-system/tokens/Motion.ads.scenario.tsx +0 -4
  388. package/dist/starters/react/design-system/tokens/Shape.ads.fixture.ts +0 -30
  389. package/dist/starters/react/design-system/tokens/Shape.ads.scenario.tsx +0 -4
  390. package/dist/starters/react/design-system/tokens/Space.ads.fixture.ts +0 -37
  391. package/dist/starters/react/design-system/tokens/Space.ads.scenario.tsx +0 -4
  392. package/dist/starters/react/design-system/tokens/Type.ads.fixture.ts +0 -29
  393. package/dist/starters/react/design-system/tokens/Type.ads.scenario.tsx +0 -4
  394. package/dist/starters/react/package-lock.json +0 -4707
  395. package/dist/token-fixtures.mjs +0 -30
  396. package/docs/benchmarks/bun-previews.md +0 -91
  397. package/docs/benchmarks/preview-memory.md +0 -147
  398. package/docs/benchmarks/turbo-poc.md +0 -284
  399. package/docs/plans/execution-coordination.md +0 -57
  400. /package/dist/{browser-audit → render-audit}/first-render.mjs +0 -0
  401. /package/dist/{browser-audit → render-audit}/layout-shift.mjs +0 -0
@@ -39,3 +39,21 @@ export function withDraftEntries(scenarios, categories, drafts, previews = new M
39
39
  }
40
40
  return { scenarios: [...entries.values()], categories: [...entries.values()].filter(item => item.kind === "tokens") };
41
41
  }
42
+
43
+ const draftCategory = unit => unit === "assets/glyphs" || unit === "assets/logos" ? "icons" : unit === "assets/brand" ? "brand" : unit === "foundation" ? "tokens" : ["brand","tokens","icons","components","patterns","composition"].includes(unit.split("/")[0]) ? unit.split("/")[0] : "other";
44
+ export const draftCategoryLabels = {brand:"Brand",icons:"Icons",tokens:"Tokens",components:"Components",patterns:"Patterns",composition:"Compositions",other:"Other"};
45
+ /** Every active proposal remains visible, even before it has a previewable scenario. */
46
+ export function draftNavigationEntries(scenarios, drafts) {
47
+ const result=[];
48
+ for(const draft of drafts){
49
+ const owned=scenarios.filter(item=>item.drafts?.some(value=>value.id===draft.id));
50
+ for(const item of owned)result.push({...item,id:`drafts/${encodeURIComponent(draft.id)}/${encodeURIComponent(item.id)}`,previewId:item.id,title:`${draft.title||draft.id} · ${item.title}`,group:draftCategoryLabels[item.kind]??"Other",drafts:[draft]});
51
+ for(const unit of draft.units??[]){
52
+ if(owned.some(item=>unit==="tokens"&&item.kind==="tokens"||item.unit===unit||!item.unit&&ownsScenario(unit,item.id)))continue;
53
+ const kind=draftCategory(unit);
54
+ result.push({id:`drafts/${encodeURIComponent(draft.id)}/${encodeURIComponent(unit)}`,unit,kind,title:`${draft.title||draft.id} · ${unit.split("/").at(-1)}`,group:draftCategoryLabels[kind],drafts:[draft]});
55
+ }
56
+ if(!owned.length&&!draft.units?.length)result.push({id:`drafts/${encodeURIComponent(draft.id)}`,kind:"other",title:draft.title||draft.id,group:"Other",drafts:[draft]});
57
+ }
58
+ return result;
59
+ }
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="#222222"><title>ADS — Eye in the grid</title><path d="M10 10h12v12h-12zM26 10h12v12h-12zM42 10h12v12h-12zM10 26h12v12h-12zM42 26h12v12h-12zM10 42h12v12h-12zM26 42h12v12h-12zM42 42h12v12h-12z"/><path d="M26 26h12v12h-12z" fill="#36bba5"/><path d="M30 30h4v4h-4z" fill="#222222"/></svg>
@@ -0,0 +1,55 @@
1
+ /* Specimen geometry only. Labels and layout come from the internal ADS UI. */
2
+ .ads-foundation{padding:0;overflow:auto;height:100%}
3
+ .ads-token-stage{display:flex;align-items:flex-start;min-width:0;overflow:auto}
4
+ .ads-token-sample{flex:none;inline-size:32px;block-size:32px;background:light-dark(#ddd,#444);color:var(--text-body);border:0 solid light-dark(#777,#999)}
5
+ .ads-token-type{inline-size:auto;block-size:auto;max-inline-size:100%;background:none;white-space:pre-wrap;font-family:var(--font-sans);font-size:var(--text-base);line-height:var(--leading-normal)}
6
+ [data-kind="shape"] .ads-token-stage{overflow:visible}
7
+ [data-kind="motion"] .ads-token-stage{height:48px;width:min(100%,192px);position:relative;overflow:visible;align-items:center;background:linear-gradient(var(--ads-ui-border-chrome),var(--ads-ui-border-chrome)) center/100% 1px no-repeat}
8
+ .ads-token-motion{position:relative;left:0;inline-size:16px;block-size:16px;border-radius:50%;background:var(--ads-ui-text-chrome);animation:ads-token-travel 1s ease-in-out infinite alternate}
9
+ @keyframes ads-token-travel{to{left:calc(100% - 16px)}}
10
+ @media(prefers-reduced-motion:reduce){.ads-token-motion{animation:none!important;transition:none!important}}
11
+ .ads-brand-clean{display:flex;max-width:100%}.ads-brand-master{display:block;height:96px;width:auto;max-width:100%;object-fit:contain}
12
+ .ads-brand-inspection{margin:0;min-width:0;max-width:100%;text-align:start}
13
+ .ads-brand-stage{position:relative;max-width:100%;width:128px;margin:0}
14
+ .ads-brand-art{display:block;width:100%;height:auto;max-height:none}
15
+ .ads-brand-grid-caption{margin-top:16px;color:var(--ads-ui-text-muted);font:12px/1.5 var(--ads-ui-font-mono);overflow-wrap:anywhere}
16
+ .ads-brand-sizes{display:flex;flex-wrap:wrap;gap:24px 16px;align-items:end;padding:8px}
17
+ /* Labels clear the 8px subject stage around each icon. */
18
+ .ads-brand-sizes figure{margin:0;flex:none;display:flex;flex-direction:column;align-items:center;gap:16px}.ads-brand-sizes img{display:block;width:auto;max-width:none;max-height:none;object-fit:contain}
19
+ .ads-brand-sizes figcaption{font:12px/1.5 var(--ads-ui-font-sans);color:var(--ads-ui-text-muted)}
20
+ .ux-brand-specimen .ads-foundation-note{font-size:12px;color:var(--ads-ui-text-muted)}
21
+ .ads-foundation-breakpoints{width:100%;border-collapse:collapse;margin:16px 0;font:inherit;font-size:14px;text-align:start}
22
+ .ads-foundation-breakpoints th,.ads-foundation-breakpoints td{text-align:start;padding:8px;border-bottom:1px solid light-dark(#ddd,#444)}
23
+ .ads-grid-example{margin-block:16px 32px}
24
+ .ux-spatial-cell{min-height:var(--space-24);padding:var(--grid-mini-unit);color:inherit;font:14px/1.5 system-ui}
25
+ .ads-grid-example-nested>.a{padding:0}
26
+ .ads-foundation-ratios{display:flex;gap:16px;flex-wrap:wrap;align-items:start;margin-bottom:32px}.ads-foundation-ratios>div{width:96px;min-height:0}
27
+
28
+ .ads-token-stage-length{overflow:hidden;position:relative;min-height:64px;align-items:flex-start;flex-direction:column;justify-content:center;gap:12px}
29
+ .ads-token-length{height:16px;min-height:16px;max-width:100%;background:var(--ads-ui-color-example-measure)}
30
+ .ads-token-length[data-zero="true"]{border-inline-start:1px dashed var(--ads-ui-text-muted)}
31
+ .ads-token-measure{position:absolute;visibility:hidden;pointer-events:none;height:0}
32
+ .ads-token-scale{order:1;font:12px/1.5 system-ui;color:var(--ads-ui-text-muted)}
33
+ .ads-token-stage-height{height:64px;overflow:auto;align-items:flex-end}
34
+ .ads-token-height{inline-size:96px;max-width:none;background:var(--ads-ui-bg-example)}
35
+ .ads-token-text{display:grid;place-items:center;inline-size:32px;block-size:32px;background:none;font:22px/1 var(--font-sans)}
36
+ .ads-token-color,.ads-token-text:empty{outline:1px solid var(--ads-ui-border-chrome);outline-offset:-1px}
37
+ .ads-token-stage-shadow{padding:16px;overflow:visible}
38
+ .ads-token-shadow{inline-size:96px;block-size:48px;background:var(--ads-ui-bg-surface)}
39
+ .ads-token-shape{inline-size:48px;block-size:48px;background:var(--ads-ui-bg-example)}
40
+ .ads-token-columns{inline-size:100%;block-size:48px;background:repeating-linear-gradient(to right,var(--ads-ui-bg-example) 0 calc((100% + 4px) / var(--ads-sample-columns) - 4px),transparent 0 calc((100% + 4px) / var(--ads-sample-columns)))}
41
+ .ads-token-columns[data-ads-property="grid-template-columns"]{display:grid;gap:4px;background:none}.ads-token-columns>span{background:var(--ads-ui-bg-example)}
42
+ .ads-token-stage-layer{isolation:isolate;position:relative;min-height:48px;overflow:hidden}
43
+ .ads-token-layer-reference{position:absolute;left:0;top:0;width:48px;height:32px;background:var(--ads-ui-bg-example);z-index:0}
44
+ .ads-token-layer{position:relative;margin:12px 0 0 16px;inline-size:48px;block-size:32px;background:var(--ads-ui-text-muted);color:var(--ads-ui-bg-surface);font:12px/32px system-ui;text-align:center}
45
+ .ads-token-effect{inline-size:64px;block-size:48px;font:24px/48px system-ui;text-align:center}
46
+ /* Units and scale: each bar is the token's real width; the label carries the measured value. */
47
+ .ads-grid-units{display:flex;flex-direction:column;gap:8px;margin-bottom:32px}
48
+ .ads-grid-unit{display:grid;grid-template-columns:var(--ads-grid-unit-track,96px) minmax(0,1fr);align-items:center;gap:12px;min-width:0}
49
+ .ads-grid-unit-bar{flex:none;display:block;min-width:1px;background:var(--ads-ui-bg-example,#dfeaf8)}
50
+ .ads-grid-unit-label,.ads-grid-chain{font:12px/1.5 var(--ads-ui-font-mono,ui-monospace,monospace);color:var(--ads-ui-text-muted,inherit);overflow-wrap:anywhere}
51
+ .ads-grid-roles{margin-bottom:8px}
52
+ .ads-grid-probe{position:absolute;visibility:hidden;height:0;pointer-events:none}
53
+ .ads-grid-link{padding:0;border:0;background:none;font:inherit;color:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
54
+ .ads-grid-link:focus-visible{outline:2px solid currentColor;outline-offset:2px}
55
+ .ux-token-record[data-ads-focus]{outline:2px solid var(--ads-ui-border-focus,#2f6fd1);outline-offset:4px}
@@ -0,0 +1,252 @@
1
+ import { createPreviewRoot } from "./preview-frame.ads.review.mjs";
2
+ import { specimenPage, specimenSection, specimenList, tokenRecord, brandSpecimen, artworkGrid } from "./ui/ui.js";
3
+ import "./ui/ui.css";
4
+ import "./foundation-view.css";
5
+
6
+ /** Framework-independent, tool-owned foundation presentation. */
7
+ export function mountFoundation(container, data) {
8
+ const root = createPreviewRoot(container), doc = root.ownerDocument;
9
+ root.classList.add("ads-foundation");
10
+ root.setAttribute("aria-label", data.title);
11
+ const element = (tag, className, text) => {
12
+ const node = doc.createElement(tag);
13
+ if (className) node.className = className;
14
+ if (text !== undefined) node.textContent = text;
15
+ return node;
16
+ };
17
+ const page=specimenPage({title:data.title,onSearch:data.tokens?query=>{const normalized=query.trim().toLowerCase();for(const record of root.querySelectorAll(".ux-token-record"))record.hidden=!record.textContent.toLowerCase().includes(normalized);}:undefined,description:data.tokens?.some(token=>/^(animation|transition)-/.test(token.property??""))?"Duration previews play at ⅛ speed. Easing previews use a one-second travel. Reduced-motion preferences are respected.":undefined});
18
+ const content=page.querySelector('[data-slot="content"]');
19
+ root.append(page);
20
+ const addSection=(title,children)=>{const section=specimenSection({title});section.querySelector('[data-slot="content"]').append(...children);content.append(section);};
21
+ const readouts = [], measurements = [];
22
+ const unitBars=[], roleValues=[];
23
+ // A token chain where each token links to the page that shows it; the host opens that page and highlights it.
24
+ const chainNodes=(chain,links,parent)=>chain.forEach((name,index)=>{
25
+ if(index)parent.append(" → ");
26
+ const target=links?.[name];
27
+ if(!target){parent.append(name);return;}
28
+ const link=element("button","ads-grid-link",name);link.type="button";link.title=`Open ${name}`;
29
+ link.addEventListener("click",()=>doc.dispatchEvent(new CustomEvent("ads-preview-navigate",{detail:{target,token:name}})));
30
+ parent.append(link);
31
+ });
32
+ let spatialReference;
33
+ if (data.spatial) {
34
+ spatialReference=specimenSection({title:"Grid reference"});
35
+ const referenceContent=spatialReference.querySelector('[data-slot="content"]');
36
+ const intro=element("p","ads-foundation-note","Fixed units size details. Fluid tracks organize space. Cell gutters, content padding and outer margins have separate responsibilities.");
37
+ referenceContent.append(intro);
38
+ const table=element("table","ads-foundation-breakpoints"), header=element("tr","");
39
+ for(const title of ["Breakpoint","From","Columns","Outer margin"])header.append(element("th","",title));
40
+ table.append(header);
41
+ // Margins belong to breakpoints: each margin cell carries its value and its token chain once.
42
+ const marginRole=name=>(data.spatial.roles??[]).find(role=>role.role===`Outer margin · ${name}`);
43
+ for(const point of data.spatial.breakpoints){
44
+ const row=element("tr","");
45
+ for(const value of [point.name,`${point.fromPx}px / ${point.fromPx/16}rem`,point.count])row.append(element("td","",String(value)));
46
+ const margin=element("td","",`${point.marginPx}px`),role=marginRole(point.name);
47
+ if(role){const chain=element("span","ads-grid-chain"," · ");chainNodes(role.chain,role.links,chain);margin.append(chain);}
48
+ row.append(margin);table.append(row);
49
+ }
50
+ referenceContent.append(table,element("p","ads-foundation-note","Resize the preview to inspect responsive tracks. The smallest tier also supplies the base fallback."));
51
+ // Units and scale: the fine and mini unit, then each scale step at its real width,
52
+ // measured live in mini units.
53
+ const units=element("div","ads-grid-units");
54
+ const unitSample=(token,label)=>{const row=element("div","ads-grid-unit"),bar=element("span","ads-grid-unit-bar"),text=element("span","ads-grid-unit-label");bar.style.width=`var(${token})`;bar.style.height=`var(${data.spatial.miniUnit})`;row.append(bar,text);unitBars.push({bar,text,token,label});return row;};
55
+
56
+ units.append(unitSample(data.spatial.fineUnit,"Fine unit"),unitSample(data.spatial.miniUnit,"Mini unit"),...data.spatial.scale.map(token=>unitSample(token,"")));
57
+ // The bar column is as wide as the largest scale step, so every label starts on one line.
58
+ units.style.setProperty("--ads-grid-unit-track",`var(${data.spatial.scale.at(-1)})`);
59
+ addSection("Units and scale",[units]);
60
+ // Each grid role, followed to the primitive it uses, with its live value.
61
+ if(data.spatial.roles?.length){
62
+ const roles=element("table","ads-foundation-breakpoints ads-grid-roles"),head=element("tr","");
63
+ for(const title of ["Role","Token → primitive","Value"])head.append(element("th","",title));
64
+ roles.append(head);
65
+ // Outer margins are listed with their breakpoints above, not repeated here.
66
+ for(const role of data.spatial.roles.filter(item=>!item.role.startsWith("Outer margin"))){
67
+ const row=element("tr",""),value=element("td","");
68
+ // A probe takes the token as its width, so any valid expression (calc(), a chain) reads as pixels.
69
+ const probe=element("span","ads-grid-probe");probe.style.width=`var(${role.token})`;
70
+ const chain=element("td","ads-grid-chain");
71
+ chainNodes(role.chain,role.links,chain);
72
+ chain.append(probe);
73
+ row.append(element("td","",role.role),chain,value);
74
+ roleValues.push({value,probe});roles.append(row);
75
+ }
76
+ addSection("Grid roles",[roles,element("p","ads-foundation-note","Roles come from the spatial definition; values are measured in this preview.")]);
77
+ }
78
+ for(const example of data.spatial.examples){
79
+
80
+ const style=element("style", "", example.css), region=element("section",`ads-grid-example ads-grid-example-${example.id}`);
81
+ region.setAttribute("aria-label",example.title);
82
+ region.dataset.adsSource=`tokens/spatial.ads.json#${example.id}`;
83
+ const makeCell=(className,text)=>element("div",`ux-spatial-cell ${className}`,text);
84
+ if(example.id==="hybrid")region.append(makeCell("a","Fixed"),makeCell("b","Fluid tracks fill the rest"));
85
+ else if(example.id==="push"||example.id==="cover")region.append(makeCell("a","Navigation"),makeCell("b","Main region"),makeCell("c",example.id==="push"?"Docked panel":"Floating panel"));
86
+ else if(example.id==="nested"){const cell=makeCell("a");cell.dataset.nested="true";cell.append(makeCell("b","1"),makeCell("c","Inherited content"));region.append(cell);}
87
+ else if(example.id==="fixed")for(let i=0;i<8;i++)region.append(makeCell("",String(i+1)));
88
+ else region.append(makeCell("a","Full region"),makeCell("b","1"),makeCell("c","Content keeps its natural height. Track width changes with the available space."));
89
+ addSection(example.title,[style,region]);
90
+ }
91
+ const ratios=element("div","ads-foundation-ratios");
92
+ for(const ratio of data.spatial.ratios){const sample=element("div","ux-spatial-cell",ratio);sample.style.aspectRatio=ratio.replace(":","/");ratios.append(sample);}
93
+ addSection("Proportions",[ratios]);
94
+ }
95
+ const list = specimenList({kind:"brand"});
96
+ if(data.kind==="brand")content.append(list);
97
+ const tokenLists=new Map();
98
+ // The server classifies each token (sample kind and section); one rule for every caller.
99
+ // A page of one section shows no section heading; the page title already names it.
100
+ const single=new Set((data.tokens??[]).map(token=>token.section?.key)).size<2;
101
+ const tokenSection=section=>{
102
+ const key=section?.key??"value";
103
+ if(!tokenLists.has(key)){
104
+ const items=specimenList();
105
+ if(single)content.append(items);
106
+ else{const container=specimenSection({title:section?.title??"Values"});container.querySelector('[data-slot="content"]').append(items);content.append(container);}
107
+ tokenLists.set(key,items);
108
+ }
109
+ return tokenLists.get(key);
110
+ };
111
+
112
+ for (const token of [...data.tokens??[]].sort((a,b)=>(a.section?.order??0)-(b.section?.order??0)||a.name.localeCompare(b.name,undefined,{numeric:true}))) {
113
+ const property=token.property??"";
114
+ const kind=token.sampleKind??"value";
115
+ const type=kind==="type", text=kind==="text", color=kind==="color"||text, motion=kind==="motion", length=kind==="length";
116
+ const columns=kind==="columns", layer=kind==="layer", effect=kind==="effect";
117
+ const card=tokenRecord({name:token.name,meaning:token.meaning,kind});
118
+ if(kind!=="value"){
119
+ const stage=element("div",`ads-token-stage ads-token-stage-${kind}`),sample=element("div",`ads-token-sample ads-token-${kind}`);
120
+ sample.dataset.adsToken=token.name;sample.dataset.adsProperty=property;
121
+ if(!length)sample.style.setProperty(property,`var(${token.name})`);
122
+ if(text){
123
+ sample.textContent="Aa";
124
+ // Known shared role pairings, rather than arbitrary light/dark probe surfaces.
125
+ const backgrounds={"--accent-fg":"--accent","--success-fg":"--success","--warning-fg":"--warning","--danger-fg":"--danger","--info-fg":"--info","--success-text":"--success-bg","--warning-text":"--warning-bg","--danger-text":"--danger-bg","--info-text":"--info-bg"};
126
+ const background=backgrounds[token.name];
127
+ if(background&&data.tokens.some(item=>item.name===background)){
128
+ sample.style.backgroundColor=`var(${background})`;sample.title=`${token.name} on ${background}`;
129
+ }else if(token.name==="--text-inverse"){
130
+ // Without a declared paired fill, show the color itself instead of invisible type.
131
+ sample.textContent="";sample.style.backgroundColor=`var(${token.name})`;
132
+ }
133
+ }
134
+ else if(color)sample.style.backgroundColor=`var(${token.name})`;
135
+ else if(type)sample.textContent=property==="line-height"?"The quick brown fox\njumps over the lazy dog.":"Aa The quick brown fox 0123456789";
136
+ else if(motion){
137
+ sample.style.animationDuration=property.endsWith("duration")?`calc(var(${token.name}) * 8)`:"1s";
138
+ if(property.endsWith("timing-function"))sample.style.animationTimingFunction=`var(${token.name})`;
139
+ }else if(length){
140
+ const measure=element("span","ads-token-measure"), scale=element("small","ads-token-scale");
141
+ measure.style.width=`var(${token.name})`;stage.append(measure,scale);measurements.push({measure,sample,scale});
142
+ }
143
+ else if(columns){
144
+ sample.style.setProperty("--ads-sample-columns",`var(${token.name})`);
145
+ if(property==="grid-template-columns")for(let i=0;i<4;i++)sample.append(element("span","",String(i+1)));
146
+ }else if(layer){stage.append(element("span","ads-token-layer-reference","0"));sample.textContent="Layer";}
147
+ else if(effect)sample.textContent="Aa";
148
+ stage.append(sample);card.querySelector('[data-slot="sample"]').append(stage);
149
+ }
150
+ const value=card.querySelector('[data-slot="value"]');
151
+ readouts.push([value, token.name]);
152
+ tokenSection(token.section).append(card);
153
+ }
154
+ const artwork = data.artwork ?? [];
155
+ const brandImages=[];
156
+ // Reuse supplied bytes; never insert project SVG markup into the document.
157
+ const artworkCoordinates=new Map();
158
+ function coordinates(asset,img) {
159
+ if(!artworkCoordinates.has(asset.src)) {
160
+ let result=null;
161
+ if(asset.src.startsWith("data:image/svg+xml;base64,"))try {
162
+ const text=new TextDecoder().decode(Uint8Array.from(atob(asset.src.split(",")[1]),c=>c.charCodeAt(0)));
163
+ const svg=new doc.defaultView.DOMParser().parseFromString(text,"image/svg+xml").documentElement;
164
+ const values=svg.localName==="svg"?svg.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number):null;
165
+ if(values?.length===4&&values.every(Number.isFinite)&&values[2]>0&&values[3]>0)result={box:{x:values[0],y:values[1],width:values[2],height:values[3]},preserveAspectRatio:svg.getAttribute("preserveAspectRatio")||"xMidYMid meet",unit:"source units"};
166
+ }catch { /* Invalid artwork still gets its normal image/error presentation. */ }
167
+ artworkCoordinates.set(asset.src,result);
168
+ }
169
+ return artworkCoordinates.get(asset.src)??(img.naturalWidth&&img.naturalHeight?{box:{x:0,y:0,width:img.naturalWidth,height:img.naturalHeight},unit:"source pixels"}:null);
170
+ }
171
+ function updateGrid(item) {
172
+ if(!item.stage)return;
173
+ item.stage.querySelector(".ds-artwork-grid")?.remove();
174
+ if(!item.img.complete||!item.img.naturalWidth)return;
175
+ const current=coordinates(item.active,item.img);
176
+ if(!current){item.caption.textContent="Construction grid unavailable";return;}
177
+ const scale=Math.min(128/item.img.naturalHeight,280/item.img.naturalWidth);
178
+ item.stage.style.width=`${item.img.naturalWidth*scale}px`;
179
+ const grid=artworkGrid({...current,axes:false,overlay:true});
180
+ item.stage.append(grid);
181
+ const {box,unit}=current;
182
+ item.caption.textContent=`${box.width} × ${box.height} ${unit} · ${grid.dataset.step} per division`;
183
+ }
184
+ for (const asset of artwork.filter(item => !/\.dark\.[^.]+$/.test(item.name) || !artwork.some(base => base.name === item.name.replace(".dark.", ".")))) {
185
+ const card=brandSpecimen({name:asset.name});
186
+ card.dataset.artwork=asset.name;
187
+ const dark=artwork.find(item=>item.name===asset.name.replace(/(\.[^.]+)$/, ".dark$1"));
188
+ // The master shows clean first; its construction grid is a separate, secondary figure.
189
+ const clean=element("div","ads-brand-clean"),art=element("img","ads-brand-master");
190
+ art.alt=asset.name;art.src=asset.src;art.height=96;clean.append(art);
191
+ brandImages.push({img:art,asset,dark,active:asset});
192
+ const inspection=element("figure","ads-brand-inspection"),stage=element("div","ads-brand-stage"),img=element("img","ads-brand-art");
193
+ const caption=element("figcaption","ads-brand-grid-caption","Construction grid");
194
+ const item={img,asset,dark,active:asset,stage,caption};
195
+ img.onload=()=>updateGrid(item);
196
+ img.onerror=()=>{stage.querySelector(".ds-artwork-grid")?.remove();caption.textContent="Artwork could not be loaded";};
197
+ img.alt="";img.src=asset.src;
198
+ stage.append(img);inspection.append(stage,caption);card.querySelector('[data-slot="artwork"]').append(clean);card.querySelector('[data-slot="construction"]').append(inspection);
199
+ const info=card.querySelector('[data-slot="sizes"]');
200
+ brandImages.push(item);
201
+ const sizes=element("div","ads-brand-sizes");
202
+ // Clean actual-size samples stay separate from the enlarged construction grid.
203
+ for(const size of asset.appIcon?[16,32,48,64]:[16,32,64]) {
204
+ const figure=element("figure",""),sample=element("img","");
205
+ sample.src=asset.src;sample.alt="";sample.height=size;
206
+ if(asset.appIcon)sample.width=size;
207
+ brandImages.push({img:sample,asset,dark,active:asset});
208
+ figure.append(sample,element("figcaption","",`${size}px high`));sizes.append(figure);
209
+ }
210
+ info.append(element("p","ads-foundation-note","Actual sizes"),sizes);
211
+ if(asset.appIcon)info.append(element("p","ads-foundation-note","Home-screen icons (180, 192 and 512 px) use the same master."));
212
+ list.append(card);
213
+ }
214
+ if(spatialReference)content.append(spatialReference);
215
+ let pending;
216
+ const update = () => {
217
+ cancelAnimationFrame(pending);
218
+ pending = requestAnimationFrame(() => {
219
+ const style = doc.defaultView.getComputedStyle(root);
220
+ for (const [node, name] of readouts) node.textContent = style.getPropertyValue(name).trim() || "Not defined in this context";
221
+ for(const {measure,sample,scale} of measurements){
222
+ const pixels=parseFloat(doc.defaultView.getComputedStyle(measure).width)||0;
223
+ const factor=pixels>192?1/2**Math.ceil(Math.log2(pixels/192)):pixels>0&&pixels<8?8:1;
224
+ sample.style.width=`${pixels*factor}px`;
225
+ sample.dataset.zero=String(pixels===0);
226
+ scale.textContent=pixels===0?"Zero space":factor>1?`${factor}× enlarged`:factor<1?`1:${1/factor} scale`:"Actual size";
227
+ }
228
+ const mini=parseFloat(doc.defaultView.getComputedStyle(unitBars[1]?.bar??root).width)||0;
229
+ for(const {bar,text,token,label} of unitBars){
230
+ const pixels=parseFloat(doc.defaultView.getComputedStyle(bar).width)||0;
231
+ text.textContent=`${label?label+" · ":""}${token} · ${pixels}px${mini&&label!=="Fine unit"&&label!=="Mini unit"?` · ${+(pixels/mini).toFixed(2)} × mini`:""}`;
232
+ }
233
+ for(const {value,probe} of roleValues)value.textContent=`${+(parseFloat(doc.defaultView.getComputedStyle(probe).width)||0).toFixed(2)}px`;
234
+ const darkTheme=style.colorScheme==="dark";
235
+ for(const item of brandImages){const active=darkTheme&&item.dark?item.dark:item.asset;item.active=active;if(item.img.getAttribute("src")!==active.src)item.img.src=active.src;updateGrid(item);}
236
+ });
237
+ };
238
+ const observer = new MutationObserver(update);
239
+ // Theme/brand context is inherited from the App host; no polling or product observers.
240
+ for (let parent = root; parent; parent = parent.parentElement) observer.observe(parent, { attributes: true, attributeFilter: ["data-theme", "data-brand", "style"] });
241
+ update();
242
+ // A link from another view asks to show one token: scroll to its record and mark it briefly.
243
+ const focus=event=>{
244
+ const record=[...root.querySelectorAll(".ux-token-record")].find(item=>item.getAttribute("aria-label")===event.detail?.token);
245
+ if(!record)return;
246
+ record.scrollIntoView({block:"center"});
247
+ record.dataset.adsFocus="true";
248
+ setTimeout(()=>{delete record.dataset.adsFocus;},2400);
249
+ };
250
+ doc.addEventListener("ads-preview-focus",focus);
251
+ return () => { doc.removeEventListener("ads-preview-focus",focus); observer.disconnect(); cancelAnimationFrame(pending);for(const {img} of brandImages){img.onload=null;img.onerror=null;}root.remove(); };
252
+ }
@@ -0,0 +1,32 @@
1
+ /** Development-only controls for the existing preview guide overlay.
2
+ * A choice is a mode (where guides show) plus layers (what they draw):
3
+ * off shows nothing, hover shows the element under the pointer or focus,
4
+ * always shows every element. Layer choices are kept in every mode. */
5
+ export const guideOptionsEvent = "ads-preview-guide-options";
6
+ export const guideStateEvent = "ads-preview-guide-state";
7
+ export const guideModes = ["off", "hover", "always"];
8
+ export const guideLayers = ["bounds", "tracks", "gaps", "padding", "margins", "mini"];
9
+ export const defaultGuideOptions = Object.freeze({ mode: "off", bounds: true, tracks: false, gaps: false, padding: true, margins: true, mini: false });
10
+
11
+ export function normalizeGuideOptions(value) {
12
+ const mode = guideModes.includes(value?.mode) ? value.mode : value?.all === true ? "always" : "off";
13
+ return { mode, ...Object.fromEntries(guideLayers.map((layer) => [layer, value?.[layer] === true])) };
14
+ }
15
+ /** What the overlay draws: `all` means every element, the layers say which geometry. */
16
+ export function overlayGuides(options) {
17
+ const { mode, ...layers } = normalizeGuideOptions(options);
18
+ return { all: mode === "always", ...layers };
19
+ }
20
+ export function guidesVisible(options) {
21
+ const { mode, ...layers } = normalizeGuideOptions(options);
22
+ return mode !== "off" && Object.values(layers).some(Boolean);
23
+ }
24
+ export function setPreviewGuides(options) {
25
+ document.dispatchEvent(new CustomEvent(guideOptionsEvent, { detail: normalizeGuideOptions(options) }));
26
+ }
27
+ export function observePreviewGuides(listener) {
28
+ const receive = (event) => listener(normalizeGuideOptions(event.detail));
29
+ document.addEventListener(guideStateEvent, receive);
30
+ document.dispatchEvent(new CustomEvent(guideOptionsEvent));
31
+ return () => document.removeEventListener(guideStateEvent, receive);
32
+ }
@@ -1,146 +1,2 @@
1
- // The Icons view: ADS renders the project's glyph folder itself, in showcase chrome colours.
1
+ export { iconsMounted, renderIcons, unmountIcons } from "./ui/ui.js";
2
2
  export const ICONS_URI = "ads://project/icons";
3
- const SVG = "http://www.w3.org/2000/svg";
4
-
5
- function element(tag, props = {}, ...children) {
6
- const node = Object.assign(document.createElement(tag), props);
7
- node.append(...children.filter(child => child !== null && child !== undefined && child !== false));
8
- return node;
9
- }
10
-
11
- const paint = { fill: "black", stroke: "none", "stroke-width": "1", "stroke-linecap": "butt", "stroke-linejoin": "miter", "stroke-miterlimit": "4", "stroke-dasharray": "none", "fill-opacity": "1", "stroke-opacity": "1", "fill-rule": "nonzero" };
12
- /** Project SVG drawn inline so currentColor and the set's default strokes apply; scripts, foreign content and handlers are dropped. */
13
- function sanitize(markup) {
14
- const parsed = new DOMParser().parseFromString(markup, "image/svg+xml").documentElement;
15
- if (parsed.namespaceURI !== SVG || parsed.localName !== "svg") return null;
16
- for (const node of parsed.querySelectorAll("*")) {
17
- if (["script", "foreignObject", "iframe", "image", "a", "animate", "set", "animateTransform", "animateMotion"].includes(node.localName) || node.namespaceURI !== SVG) node.remove();
18
- }
19
- for (const node of [parsed, ...parsed.querySelectorAll("*")]) {
20
- for (const attribute of Array.from(node.attributes)) {
21
- if (/^on/i.test(attribute.name) || /href$/i.test(attribute.name) && !attribute.value.trim().startsWith("#")) node.removeAttribute(attribute.name);
22
- }
23
- }
24
- const svg = document.importNode(parsed, true);
25
- for (const name of ["width", "height", "class"]) svg.removeAttribute(name);
26
- // The showcase styles its own svg chrome; inline the glyph's own (or initial) paint so it draws as in the project's Icon.
27
- for (const [name, initial] of Object.entries(paint)) if (!svg.style.getPropertyValue(name)) svg.style.setProperty(name, svg.getAttribute(name) ?? initial);
28
- svg.setAttribute("aria-hidden", "true"); svg.setAttribute("focusable", "false");
29
- return svg;
30
- }
31
-
32
- function glyph(item, px, label) {
33
- const span = element("span", { className: "icons-glyph" });
34
- span.style.width = span.style.height = `${px}px`;
35
- const svg = sanitize(item.svg);
36
- if (svg) span.append(svg);
37
- if (label) { span.setAttribute("role", "img"); span.setAttribute("aria-label", label); span.title = label; }
38
- else span.setAttribute("aria-hidden", "true");
39
- return span;
40
- }
41
-
42
- /** One line per viewBox unit (thinned on large boxes), the center lines stronger, under the glyph. */
43
- function grid(box) {
44
- const svg = document.createElementNS(SVG, "svg");
45
- svg.setAttribute("class", "icons-grid"); svg.setAttribute("aria-hidden", "true");
46
- svg.setAttribute("viewBox", `${box.x} ${box.y} ${box.width} ${box.height}`);
47
- svg.setAttribute("preserveAspectRatio", "xMidYMid meet");
48
- const step = Math.max(1, Math.ceil(Math.max(box.width, box.height) / 48));
49
- const line = (x1, y1, x2, y2, mid) => {
50
- const node = document.createElementNS(SVG, "line");
51
- for (const [name, value] of Object.entries({ x1, y1, x2, y2 })) node.setAttribute(name, value);
52
- if (mid) node.setAttribute("class", "mid");
53
- svg.append(node);
54
- };
55
- for (let unit = 0; unit <= box.width; unit += step) line(box.x + unit, box.y, box.x + unit, box.y + box.height, unit * 2 === box.width);
56
- for (let unit = 0; unit <= box.height; unit += step) line(box.x, box.y + unit, box.x + box.width, box.y + unit, unit * 2 === box.height);
57
- if (box.width % 2 && step === 1) line(box.x + box.width / 2, box.y, box.x + box.width / 2, box.y + box.height, true);
58
- if (box.height % 2 && step === 1) line(box.x, box.y + box.height / 2, box.x + box.width, box.y + box.height / 2, true);
59
- return svg;
60
- }
61
-
62
- const plural = (count, word) => `${count} ${word}${count === 1 ? "" : "s"}`;
63
- function findingCount(findings) {
64
- const errors = findings.filter(item => item.severity === "error").length;
65
- return errors === findings.length ? plural(errors, "error") : plural(findings.length, "issue");
66
- }
67
- function findingBox(finding) {
68
- return element("p", { className: "icons-finding", title: finding.file ?? "" }, element("strong", { textContent: finding.rule }), " ", finding.message);
69
- }
70
-
71
- function card(item, sizes) {
72
- const article = element("article", { className: "icons-card" });
73
- article.dataset.glyph = item.name;
74
- if (item.findings.length) article.dataset.findings = String(item.findings.length);
75
- const header = element("div", { className: "icons-card-head" }, element("h3", { textContent: item.name }), item.findings.length ? element("span", { className: "icons-badge", textContent: findingCount(item.findings) }) : null);
76
- const magnified = element("div", { className: "icons-mag" });
77
- if (item.grid) magnified.append(grid(item.grid));
78
- magnified.append(glyph(item, 96));
79
- const scale = element("div", { className: "icons-sizes" }, ...sizes.map(size => element("span", { className: "icons-size" }, glyph(item, size.px), element("small", { textContent: String(size.px), title: size.token }))));
80
- article.append(...[header, element("p", { className: "icons-alias", textContent: item.aliases.length ? `alias: ${item.aliases.join(", ")}` : "", title: item.aliases.join(", ") }), magnified, scale, ...item.findings.map(findingBox)].filter(Boolean));
81
- article.setAttribute("aria-label", item.name);
82
- return article;
83
- }
84
-
85
- function logo(file) {
86
- const figure = element("figure", { className: "icons-logo" });
87
- figure.dataset.logo = file.name;
88
- if (file.tooLarge) { figure.append(element("figcaption", { textContent: `${file.name} (over 1 MB; not shown)` })); return figure; }
89
- // The file exactly as it is, on a white and a black tile, so black and white artwork both show.
90
- figure.append(element("span", { className: "icons-logo-tile" }, element("img", { src: file.src, alt: file.name, title: file.file })),
91
- element("span", { className: "icons-logo-tile icons-logo-tile-black" }, element("img", { src: file.src, alt: "" })),
92
- element("figcaption", { textContent: file.name }));
93
- return figure;
94
- }
95
-
96
- const matches = (item, query) => !query || [item.name, ...item.aliases].some(name => name.toLowerCase().includes(query));
97
-
98
- /** Renders the view into slot; a later call with the same slot keeps the search text and scroll. */
99
- export function renderIcons(slot, data) {
100
- let view = slot.querySelector(":scope > .icons-view");
101
- const query = view?.querySelector("input[type=search]")?.value ?? "";
102
- const scroll = view?.scrollTop ?? 0;
103
- view = element("div", { className: "icons-view" });
104
- view.setAttribute("role", "region"); view.setAttribute("aria-label", "Icons");
105
- if (!data?.configured) {
106
- view.append(element("h1", { textContent: "Icons" }), element("p", { className: "icons-summary", textContent: "The project configures no glyph set (assets.glyphs)." }));
107
- slot.replaceChildren(view); return view;
108
- }
109
- const grid = data.mixed ? "mixed grids" : data.grid ? `${/^(?:8|11|18)(?!\d)|^8/.test(String(data.grid.width)) ? "an" : "a"} ${data.grid.width}×${data.grid.height} grid` : "no viewBox";
110
- const summary = `${data.source} · ${plural(data.glyphs.length, "glyph")} on ${grid} · ${data.aliasCount} ${data.aliasCount === 1 ? "alias" : "aliases"}`;
111
- const search = element("input", { type: "search", placeholder: "Search name or alias", value: query });
112
- search.setAttribute("aria-label", "Search glyphs by name or alias");
113
- const set = element("div", { className: "icons-set" });
114
- set.setAttribute("role", "list"); set.setAttribute("aria-label", "The set");
115
- const cards = element("div", { className: "icons-cards" });
116
- const empty = element("p", { className: "icons-empty", hidden: true });
117
- const text = data.textSize;
118
- view.append(
119
- element("div", { className: "icons-head" }, element("div", {}, element("h1", { textContent: "Icons" }), element("p", { className: "icons-summary", textContent: summary })), search),
120
- ...data.findings.map(findingBox),
121
- element("h2", {}, "The set ", element("small", { textContent: text ? `every glyph at ${text.px} px, the size used beside text` : "every glyph" })), set,
122
- element("h2", {}, "Glyphs ", element("small", { textContent: data.sizes.length ? "each on its grid, at every icon size" : "each on its grid" })), empty, cards,
123
- );
124
- for (const item of data.glyphs) {
125
- const wrapper = element("span", { className: "icons-set-item" }, glyph(item, text?.px ?? 18, item.name));
126
- wrapper.dataset.glyph = item.name; wrapper.setAttribute("role", "listitem");
127
- set.append(wrapper);
128
- cards.append(card(item, data.sizes));
129
- }
130
- if (data.logos) {
131
- view.append(element("h2", {}, "Other products' logos ", element("small", { textContent: data.logos.source })),
132
- data.logos.files.length ? element("div", { className: "icons-logos" }, ...data.logos.files.map(logo)) : element("p", { className: "icons-summary", textContent: "No images yet." }));
133
- }
134
- const filter = () => {
135
- const value = search.value.trim().toLowerCase();
136
- let shown = 0;
137
- data.glyphs.forEach((item, index) => { const visible = matches(item, value); set.children[index].hidden = cards.children[index].hidden = !visible; shown += visible; });
138
- empty.hidden = shown > 0; empty.textContent = `No glyph matches “${search.value.trim()}”.`;
139
- };
140
- search.addEventListener("input", filter);
141
- filter();
142
- slot.replaceChildren(view);
143
- view.scrollTop = scroll;
144
- if (query && document.activeElement === document.body) search.focus();
145
- return view;
146
- }
@@ -1,33 +1,5 @@
1
1
  <!doctype html>
2
2
  <html lang="en" data-theme="light">
3
- <head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>ADS Showcase</title><link rel="stylesheet" href="/style.css"></head>
4
- <body>
5
- <header id="header">
6
- <div id="brand"><span class="mark">ADS</span><span id="title">Design System</span><button id="pane-toggle" aria-label="Hide navigation pane" aria-expanded="true" aria-controls="sidebar" title="Hide navigation pane"><svg viewBox="0 0 16 16"><path d="M10 4l-4 4 4 4"/></svg></button></div>
7
- <nav id="sections" aria-label="Showcase sections">
8
- <button data-section="brand" hidden><svg viewBox="0 0 16 16"><path d="M8 1.5 9.9 5.6l4.4.5-3.3 3 .9 4.4L8 11.3l-3.9 2.2.9-4.4-3.3-3 4.4-.5L8 1.5Z"/></svg>Brand</button>
9
- <button data-section="tokens" aria-current="page"><svg viewBox="0 0 16 16"><path d="m8 2 6 3-6 3-6-3 6-3Zm-6 6 6 3 6-3M2 11l6 3 6-3"/></svg>Tokens</button>
10
- <button data-section="icons" hidden><svg viewBox="0 0 16 16"><circle cx="5" cy="5" r="2.5"/><rect x="9.5" y="2.5" width="4" height="5" rx="1"/><path d="m2.5 13.5 2.5-4 2.5 4ZM9.5 11.5h4M11.5 9.5v4"/></svg>Icons</button>
11
- <button data-section="components"><svg viewBox="0 0 16 16"><path d="m8 1 6 3.5v7L8 15l-6-3.5v-7L8 1Zm-6 3.5 6 3.5 6-3.5M8 8v7"/></svg>Components</button>
12
- <button data-section="patterns"><svg viewBox="0 0 16 16"><rect x="2" y="2" width="5" height="5"/><rect x="10" y="2" width="4" height="5"/><rect x="2" y="10" width="5" height="4"/><rect x="10" y="10" width="4" height="4"/></svg>Patterns</button>
13
- <button data-section="composition"><svg viewBox="0 0 16 16"><path d="M2 2h4v4H2zM10 2h4v4h-4zM2 10h4v4H2zM10 10h4v4h-4z"/></svg>Composition</button>
14
- </nav>
15
- <div class="actions"><button id="preview-status" data-phase="opening" aria-label="Preview status: Connecting to ADS MCP…" title="Connecting to ADS MCP…" popovertarget="status-details"><span class="status-dot" aria-hidden="true"></span></button><div id="status-details" popover><p id="status" role="status">Connecting to ADS MCP…</p><p id="warmup-status" hidden></p></div><button id="viewport" aria-label="Phone viewport" aria-pressed="false" aria-controls="frame-slot" title="Preview at phone width (390 px)"><svg viewBox="0 0 16 16" aria-hidden="true"><rect x="4" y="1" width="8" height="14" rx="1.5"/><path d="M7 12.5h2"/></svg></button><button id="grid-overlay" aria-label="Show grid overlay" title="Show grid overlay" aria-pressed="false"><svg viewBox="0 0 16 16"><path d="M3 2v12M6.5 2v12M9.5 2v12M13 2v12"/></svg></button><select id="brand-select" aria-label="Preview brand" title="Preview brand" hidden></select><button id="theme" aria-label="Use dark theme" title="Use dark theme"><svg viewBox="0 0 16 16"><path d="M13.5 9a5.5 5.5 0 0 1-6.5-6.5A5.5 5.5 0 1 0 13.5 9Z"/></svg></button><button id="minimize" aria-label="Minimize showcase menu" title="Minimize showcase menu (refresh to restore)"><svg viewBox="0 0 16 16"><path d="m4 10 4-4 4 4"/></svg></button></div>
16
- </header>
17
- <main>
18
- <aside id="sidebar"><nav id="entries" aria-label="Tokens"></nav></aside>
19
- <section id="preview-workspace" aria-label="Preview workspace">
20
- <div id="preview-error" role="alert" hidden>
21
- <svg viewBox="0 0 16 16" aria-hidden="true"><path d="m8 2 7 12H1L8 2Z"/><path d="M8 6v3M8 11v.5"/></svg>
22
- <p id="preview-error-message"></p>
23
- <button id="preview-error-details" type="button" popovertarget="status-details">Details</button>
24
- <button id="retry-preview" type="button">Retry preview</button>
25
- </div>
26
- <section id="preview" aria-label="Preview">
27
- <div id="loader" role="status" aria-label="Loading preview" hidden><span class="spinner" aria-hidden="true"></span></div>
28
- <div id="frame-slot"></div>
29
- </section>
30
- </section>
31
- </main>
32
- <script type="module" src="/client.js"></script>
33
- </body></html>
3
+ <head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>ADS Showcase</title><link rel="icon" href="favicon.ico" sizes="32x32"><link rel="icon" href="favicon.svg" type="image/svg+xml"><link rel="stylesheet" href="ui.css"><link rel="stylesheet" href="style.css"></head>
4
+ <body><div id="app"></div><script type="module" src="client.js"></script></body>
5
+ </html>
@@ -0,0 +1,46 @@
1
+ /* ADS-owned preview UX, loaded only inside the App by development mounts/helpers.
2
+ Selectors style their own frames, never the product's descendants or tokens. */
3
+ .ads-preview-root { position: relative; min-width: 0; height: 100%; min-height: 0; box-sizing: border-box; overflow: auto; padding: var(--space-8, 16px); background: var(--bg-canvas, Canvas); color: var(--text-body, CanvasText); font-family: var(--font-sans, system-ui); }
4
+ .ads-preview-page { max-width: 1240px; margin-inline: auto; padding: var(--space-16, 32px) var(--space-12, 24px); }
5
+ .ads-preview-page-wide { max-width: 1480px; }
6
+ .ads-preview-section { display: flex; flex-direction: column; gap: var(--space-10, 20px); min-width: 0; }
7
+ .ads-preview-heading { display: flex; flex-direction: column; gap: var(--space-3, 6px); padding-bottom: var(--space-8, 16px); border-bottom: var(--border-w, 1px) solid var(--border-subtle, currentColor); }
8
+ .ads-preview-title { margin: 0; font-size: var(--text-lg, 1.125rem); font-weight: var(--weight-semibold, 600); color: var(--text-strong, inherit); line-height: var(--leading-tight, 1.2); }
9
+ .ads-preview-description, .ads-preview-muted { margin: 0; color: var(--text-muted, inherit); font-size: var(--text-sm, 1rem); }
10
+ .ads-preview-label { font-size: var(--text-micro, .75rem); font-weight: var(--weight-semibold, 600); color: var(--text-muted, inherit); text-transform: uppercase; letter-spacing: var(--tracking-label, .05em); }
11
+ .ads-preview-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-6, 12px); min-width: 0; }
12
+ .ads-preview-row-center { align-items: center; }
13
+ .ads-preview-row-end { align-items: flex-end; }
14
+ .ads-preview-column { display: flex; flex-direction: column; gap: var(--space-4, 8px); min-width: 0; }
15
+ .ads-preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--space-10, 20px); }
16
+ .ads-preview-padded { padding: var(--space-12, 24px); }
17
+ .ads-preview-width-small { width: min(100%, 240px); }
18
+ .ads-preview-width-medium { width: min(100%, 360px); }
19
+ .ads-preview-width-large { width: min(100%, 480px); }
20
+ .ads-preview-grow { flex: 1; }
21
+ @media (max-width: 760px) { .ads-preview-page { padding-inline: var(--space-8, 16px); } }
22
+
23
+ .ads-preview-scroll { min-width: 0; max-width: 100%; overflow: auto; }
24
+
25
+ /* A region container for layouts declared with `context: container`; the
26
+ container name is the one ADS's spatial compiler queries. */
27
+ .ads-preview-region { container-type: inline-size; container-name: ads-region; min-width: 0; }
28
+
29
+ /* A composition is a whole screen: it fills the preview edge to edge. */
30
+ [data-ads-scenario-kind="composition"] > .ads-preview-root { padding: 0; }
31
+ /* In a preview the document never scrolls; the preview root does. A project's
32
+ `html { scrollbar-gutter: stable }` would leave an empty strip on the right. */
33
+ html:has(.ads-preview-root) { scrollbar-gutter: auto; }
34
+ /* A scenario that renders only its subject fills the frame, like a composition. */
35
+ .ads-preview-root[data-ads-subject-only] { padding: 0; }
36
+ /* A staged subject: the framing surface matches the showcase panes; the subject keeps the
37
+ project canvas, painted by the stage layer behind the content. */
38
+ .ads-preview-root[data-ads-staged] { isolation: isolate; background: var(--ads-ui-bg-chrome, light-dark(#f4f4f4, #1f1f1f)); }
39
+
40
+ /* A labelled region placeholder: layout scenarios show where regions go, not real content.
41
+ The tints match the Grid system examples, in both themes. */
42
+ .ads-preview-placeholder { box-sizing: border-box; display: flex; align-items: center; justify-content: center; flex: 1 1 auto; align-self: stretch; width: 100%; min-height: 100%; height: 100%; min-width: 0; padding: var(--space-8, 16px); font-family: var(--font-sans, system-ui, sans-serif); font-size: var(--text-sm, .875rem); color: light-dark(#3b4250, #c9ced8); background: light-dark(#ececee, #2a2b30); }
43
+ .ads-preview-placeholder-blue { background: light-dark(#dfeaf8, #263d53); }
44
+ .ads-preview-placeholder-mint { background: light-dark(#deeee6, #243f36); }
45
+ .ads-preview-placeholder-lavender { background: light-dark(#e9e3f5, #3b304c); }
46
+ .ads-preview-placeholder-warm { background: light-dark(#f5e8d6, #483923); }