@reqvire-org/ads 0.5.0 → 0.5.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 (554) hide show
  1. package/README.md +9 -6
  2. package/dist/ads-errors.mjs +382 -34
  3. package/dist/ads-views.mjs +4 -4
  4. package/dist/analysis/composition-axes.mjs +48 -0
  5. package/dist/analysis/construction-memo.mjs +38 -0
  6. package/dist/analysis/context.mjs +19 -0
  7. package/dist/analysis/design-reads.mjs +177 -0
  8. package/dist/analysis/design-usage.mjs +20 -4
  9. package/dist/analysis/factored-classes.mjs +90 -0
  10. package/dist/analysis/helpers.mjs +5 -7
  11. package/dist/analysis/mock-check.mjs +5 -4
  12. package/dist/analysis/native-project.mjs +12 -0
  13. package/dist/analysis/owner-analysis-cache.mjs +86 -23
  14. package/dist/analysis/owner-analysis-key.mjs +42 -10
  15. package/dist/analysis/owner-choices.mjs +195 -43
  16. package/dist/analysis/owner-composition.mjs +152 -43
  17. package/dist/analysis/owner-controls.mjs +27 -0
  18. package/dist/analysis/owner-reuse.mjs +8 -6
  19. package/dist/analysis/owner-source.mjs +309 -83
  20. package/dist/analysis/prose-owners.mjs +57 -0
  21. package/dist/analysis/scenario-keys.mjs +10 -7
  22. package/dist/analysis/service.mjs +50 -3
  23. package/dist/analysis/standalone.mjs +7 -4
  24. package/dist/analysis/styling-ownership.mjs +22 -0
  25. package/dist/analysis/syntax.mjs +59 -1
  26. package/dist/analysis/worker-protocol.mjs +14 -2
  27. package/dist/analysis/worker.mjs +32 -10
  28. package/dist/architecture-report.mjs +26 -0
  29. package/dist/asset-view-facts.mjs +16 -2
  30. package/dist/boundaries.mjs +26 -10
  31. package/dist/bun-compiler.mjs +2 -2
  32. package/dist/check-service.mjs +29 -17
  33. package/dist/check.mjs +20 -7
  34. package/dist/cli-arguments.mjs +2 -2
  35. package/dist/cli.mjs +4 -4
  36. package/dist/composed-contrast.mjs +28 -8
  37. package/dist/composed-keyline.mjs +107 -0
  38. package/dist/config.mjs +2 -1
  39. package/dist/construction-output.mjs +149 -20
  40. package/dist/construction-spec.d.mts +320 -12
  41. package/dist/construction-spec.mjs +452 -69
  42. package/dist/corner-overpaint.mjs +65 -0
  43. package/dist/derived-states.mjs +182 -0
  44. package/dist/design-foundation.mjs +6 -1
  45. package/dist/design-inputs.mjs +18 -3
  46. package/dist/design-system-closure.mjs +12 -7
  47. package/dist/design-usage.mjs +8 -2
  48. package/dist/emit/contract.mjs +24 -5
  49. package/dist/emit/emission.mjs +14 -5
  50. package/dist/emit/font-emission.mjs +21 -1
  51. package/dist/emit/foundation-sheet.mjs +6 -5
  52. package/dist/emit/integrity.mjs +8 -2
  53. package/dist/emit/output-watch.mjs +120 -0
  54. package/dist/emit/owner-emission-cache.mjs +4 -4
  55. package/dist/emit/preview-emitter.mjs +4 -2
  56. package/dist/emit/preview-tree.mjs +1 -1
  57. package/dist/emit/service.mjs +8 -2
  58. package/dist/finding-rules.mjs +10 -0
  59. package/dist/font-checks.mjs +42 -0
  60. package/dist/font-declaration.d.mts +10 -0
  61. package/dist/font-declaration.mjs +25 -3
  62. package/dist/font-fallback.d.mts +37 -0
  63. package/dist/font-fallback.mjs +25 -0
  64. package/dist/font-macro.d.mts +10 -0
  65. package/dist/font-metrics.d.mts +34 -0
  66. package/dist/font-metrics.mjs +314 -0
  67. package/dist/font-model.mjs +28 -2
  68. package/dist/form-states.mjs +8 -0
  69. package/dist/foundation-macro.d.mts +1 -1
  70. package/dist/frame-regions.mjs +92 -9
  71. package/dist/grid-facts.mjs +72 -16
  72. package/dist/grid-lowering.mjs +11 -5
  73. package/dist/hover-geometry.mjs +15 -0
  74. package/dist/init.mjs +14 -23
  75. package/dist/input-digests.mjs +17 -10
  76. package/dist/linaria/delivery.mjs +2 -0
  77. package/dist/lowering-enter.mjs +31 -0
  78. package/dist/lowering-properties.mjs +27 -1
  79. package/dist/lowering-region-layout.mjs +49 -10
  80. package/dist/lowering-sequence.mjs +89 -0
  81. package/dist/lowering-session.mjs +7 -0
  82. package/dist/lowering-transitions.mjs +22 -8
  83. package/dist/mcp/build-status.mjs +9 -1
  84. package/dist/mcp/compiler-channel.mjs +11 -4
  85. package/dist/mcp/mutations.mjs +1 -0
  86. package/dist/mcp/preview-http.bundle.js +2 -2
  87. package/dist/mcp/preview-watch.mjs +2 -1
  88. package/dist/mcp/preview-widget.bundle.js +5 -5
  89. package/dist/motion-model.mjs +3 -1
  90. package/dist/owner-analysis-check.mjs +86 -12
  91. package/dist/owner-errors.mjs +20 -2
  92. package/dist/owner-lowering.mjs +104 -25
  93. package/dist/owner-scenarios.mjs +29 -4
  94. package/dist/ownership-model.mjs +37 -4
  95. package/dist/paint-contrast.mjs +5 -0
  96. package/dist/placeholder-contrast.mjs +18 -1
  97. package/dist/platform-features.mjs +35 -2
  98. package/dist/preview-bun.mjs +17 -16
  99. package/dist/preview-controls.mjs +35 -0
  100. package/dist/preview-incremental.mjs +1 -1
  101. package/dist/preview-source.mjs +2 -2
  102. package/dist/profile-macro.d.mts +15 -0
  103. package/dist/profile-model.mjs +3 -3
  104. package/dist/profile-view-facts.mjs +55 -4
  105. package/dist/prose-model.d.mts +81 -0
  106. package/dist/prose-model.mjs +101 -0
  107. package/dist/recipe-macro.d.mts +176 -15
  108. package/dist/recipe-model.mjs +35 -7
  109. package/dist/region-lowering.mjs +463 -65
  110. package/dist/render-audit/corner-overpaint.page.mjs +54 -0
  111. package/dist/render-audit/layout-shift.page.mjs +24 -0
  112. package/dist/render-audit/render-states.mjs +122 -1
  113. package/dist/render-audit/render-states.page.mjs +140 -0
  114. package/dist/render-audit/worker.mjs +23 -3
  115. package/dist/render-audit.mjs +139 -1
  116. package/dist/role-vocabulary.d.mts +43 -2
  117. package/dist/role-vocabulary.mjs +50 -4
  118. package/dist/scenario-kit.d.mts +6 -0
  119. package/dist/scenario-registry.mjs +1 -1
  120. package/dist/scenarios-compiler.mjs +20 -6
  121. package/dist/scheme-switch.d.mts +8 -0
  122. package/dist/scheme-switch.mjs +1 -0
  123. package/dist/showcase/ads-views.mjs +116 -53
  124. package/dist/showcase/assets-view.mjs +136 -89
  125. package/dist/showcase/client.bundle.js +65 -65
  126. package/dist/showcase/http-client.bundle.js +17 -17
  127. package/dist/showcase/preview-frame.css +2 -0
  128. package/dist/showcase/profiles-view.mjs +163 -122
  129. package/dist/showcase/scenario-page.d.mts +11 -1
  130. package/dist/showcase/scenario-page.mjs +18 -3
  131. package/dist/showcase/token-sample.mjs +47 -4
  132. package/dist/showcase/tokens-view.mjs +82 -34
  133. package/dist/showcase/ui/ui.css +1 -1
  134. package/dist/showcase/ui/ui.js +5 -5
  135. package/dist/skills/README.md +5 -5
  136. package/dist/skills/ads-designer/README.md +1 -1
  137. package/dist/skills/ads-designer/SKILL.md +13 -12
  138. package/dist/skills/ads-designer/references/accessibility.md +9 -2
  139. package/dist/skills/ads-designer/references/atomic-styles.md +8 -1
  140. package/dist/skills/ads-designer/references/branding.md +20 -5
  141. package/dist/skills/ads-designer/references/cli.md +4 -4
  142. package/dist/skills/ads-designer/references/contracts.md +14 -4
  143. package/dist/skills/ads-designer/references/design-craft.md +1 -1
  144. package/dist/skills/ads-designer/references/design-data.md +3 -3
  145. package/dist/skills/ads-designer/references/forms.md +6 -6
  146. package/dist/skills/ads-designer/references/layout.md +46 -3
  147. package/dist/skills/ads-designer/references/motion.md +45 -1
  148. package/dist/skills/ads-designer/references/performance.md +7 -1
  149. package/dist/skills/ads-designer/references/recipes.md +92 -7
  150. package/dist/skills/ads-designer/references/runtimes.md +1 -1
  151. package/dist/skills/ads-designer/references/scenarios.md +1 -0
  152. package/dist/skills/ads-import/references/atomic-styles.md +8 -1
  153. package/dist/skills/ads-import/references/cli.md +4 -4
  154. package/dist/skills/ads-import/references/contracts.md +14 -4
  155. package/dist/skills/ads-import/references/design-data.md +3 -3
  156. package/dist/skills/ads-import/references/forms.md +6 -6
  157. package/dist/skills/ads-import/references/layout.md +46 -3
  158. package/dist/skills/ads-import/references/recipes.md +92 -7
  159. package/dist/skills/ads-import/references/runtimes.md +1 -1
  160. package/dist/skills/ads-import/references/scenarios.md +1 -0
  161. package/dist/skills/ads-migrate/SKILL.md +3 -1
  162. package/dist/skills/ads-migrate/references/0.5.0-to-0.5.1.md +239 -0
  163. package/dist/skills/ads-migrate/references/0.5.1-to-0.5.2.md +185 -0
  164. package/dist/skills/ads-port/references/atomic-styles.md +8 -1
  165. package/dist/skills/ads-port/references/cli.md +4 -4
  166. package/dist/skills/ads-port/references/contracts.md +14 -4
  167. package/dist/skills/ads-port/references/design-data.md +3 -3
  168. package/dist/skills/ads-port/references/forms.md +6 -6
  169. package/dist/skills/ads-port/references/layout.md +46 -3
  170. package/dist/skills/ads-port/references/recipes.md +92 -7
  171. package/dist/skills/ads-port/references/runtimes.md +1 -1
  172. package/dist/skills/ads-port/references/scenarios.md +1 -0
  173. package/dist/spatial-model.mjs +20 -4
  174. package/dist/state-conditions.d.mts +29 -0
  175. package/dist/state-conditions.mjs +42 -2
  176. package/dist/surface-contrast.mjs +69 -10
  177. package/dist/surface-effects.mjs +100 -0
  178. package/dist/target-size.mjs +1 -1
  179. package/dist/task-cache.mjs +9 -19
  180. package/dist/token-dtcg.mjs +1 -0
  181. package/dist/token-view-facts.mjs +54 -5
  182. package/dist/unreached-sources.mjs +5 -0
  183. package/dist/validation-checks.mjs +1 -1
  184. package/dist/validation.mjs +1 -1
  185. package/docs/ADS.md +36 -13
  186. package/docs/ARCHITECTURE.md +223 -23
  187. package/docs/ASSETS.md +81 -10
  188. package/docs/CACHING.md +152 -24
  189. package/docs/CHANGELOG.md +525 -23
  190. package/docs/DESIGN-REFERENCES.md +5 -5
  191. package/docs/GUIDE.md +286 -73
  192. package/docs/LANGUAGE.md +428 -24
  193. package/docs/LOWERING.md +13 -1
  194. package/docs/MOTION.md +241 -7
  195. package/docs/PROFILE-KINDS.md +176 -14
  196. package/docs/PROFILES.md +2 -2
  197. package/docs/RULES.md +63 -24
  198. package/docs/TOKEN-ROLES.md +15 -7
  199. package/package.json +1 -1
  200. package/dist/starter-files.mjs +0 -155
  201. package/dist/starter-overlay.mjs +0 -189
  202. package/dist/starters/preact/design-system/assets/avatars/avatar.ads.ts +0 -10
  203. package/dist/starters/preact/design-system/assets/avatars/member.svg +0 -1
  204. package/dist/starters/preact/design-system/assets/brand/emblem.ads.ts +0 -18
  205. package/dist/starters/preact/design-system/assets/brand/emblem.svg +0 -4
  206. package/dist/starters/preact/design-system/assets/brand/iris-emblem.ads.ts +0 -14
  207. package/dist/starters/preact/design-system/assets/brand/iris-emblem.svg +0 -4
  208. package/dist/starters/preact/design-system/assets/brand/mark.ads.ts +0 -14
  209. package/dist/starters/preact/design-system/assets/brand/mark.svg +0 -1
  210. package/dist/starters/preact/design-system/assets/glyphs/arrow.ads.ts +0 -14
  211. package/dist/starters/preact/design-system/assets/glyphs/arrow.svg +0 -1
  212. package/dist/starters/preact/design-system/assets/glyphs/chevron-20.svg +0 -1
  213. package/dist/starters/preact/design-system/assets/glyphs/chevron-24.svg +0 -1
  214. package/dist/starters/preact/design-system/assets/glyphs/chevron.ads.ts +0 -20
  215. package/dist/starters/preact/design-system/assets/glyphs/close.ads.ts +0 -13
  216. package/dist/starters/preact/design-system/assets/glyphs/close.svg +0 -1
  217. package/dist/starters/preact/design-system/assets/glyphs/favorite.ads.ts +0 -23
  218. package/dist/starters/preact/design-system/assets/glyphs/favorite.normal.svg +0 -1
  219. package/dist/starters/preact/design-system/assets/glyphs/favorite.selected.svg +0 -1
  220. package/dist/starters/preact/design-system/assets/glyphs/search.ads.ts +0 -10
  221. package/dist/starters/preact/design-system/assets/glyphs/search.svg +0 -1
  222. package/dist/starters/preact/design-system/assets/illustrations/journey.ads.ts +0 -32
  223. package/dist/starters/preact/design-system/assets/illustrations/journey.contrast.svg +0 -6
  224. package/dist/starters/preact/design-system/assets/illustrations/journey.dark.svg +0 -13
  225. package/dist/starters/preact/design-system/assets/illustrations/journey.light.svg +0 -13
  226. package/dist/starters/preact/design-system/assets/logos/harbor-pay.ads.ts +0 -17
  227. package/dist/starters/preact/design-system/assets/logos/harbor-pay.dark.svg +0 -10
  228. package/dist/starters/preact/design-system/assets/logos/harbor-pay.light.svg +0 -10
  229. package/dist/starters/preact/design-system/assets/logos/lumen-cloud.ads.ts +0 -15
  230. package/dist/starters/preact/design-system/assets/logos/lumen-cloud.dark.svg +0 -9
  231. package/dist/starters/preact/design-system/assets/logos/lumen-cloud.light.svg +0 -9
  232. package/dist/starters/preact/design-system/assets/status/error.svg +0 -1
  233. package/dist/starters/preact/design-system/assets/status/outcomes.ads.ts +0 -31
  234. package/dist/starters/preact/design-system/assets/status/status.ads.ts +0 -16
  235. package/dist/starters/preact/design-system/assets/status/success.svg +0 -1
  236. package/dist/starters/preact/design-system/assets/status/sync-status.ads.ts +0 -14
  237. package/dist/starters/preact/design-system/assets/status/sync-status.svg +0 -7
  238. package/dist/starters/preact/design-system/assets/status/warning.svg +0 -1
  239. package/dist/starters/preact/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -12
  240. package/dist/starters/preact/design-system/components/Actions/Button/Button.tsx +0 -198
  241. package/dist/starters/preact/design-system/components/Actions/IconButton/IconButton.tsx +0 -95
  242. package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +0 -22
  243. package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.tsx +0 -60
  244. package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +0 -24
  245. package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.tsx +0 -50
  246. package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +0 -8
  247. package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.tsx +0 -110
  248. package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +0 -25
  249. package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.tsx +0 -72
  250. package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +0 -8
  251. package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.tsx +0 -43
  252. package/dist/starters/preact/design-system/components/Content/Icon/Icon.ads.scenario.tsx +0 -21
  253. package/dist/starters/preact/design-system/components/Content/Icon/Icon.tsx +0 -41
  254. package/dist/starters/preact/design-system/components/Content/Icon/glyphs/arrow.tsx +0 -10
  255. package/dist/starters/preact/design-system/components/Content/Icon/glyphs/close.tsx +0 -10
  256. package/dist/starters/preact/design-system/components/Content/Icon/glyphs/search.tsx +0 -10
  257. package/dist/starters/preact/design-system/components/Content/Image/Image.ads.fixture.ts +0 -9
  258. package/dist/starters/preact/design-system/components/Content/Image/Image.ads.scenario.tsx +0 -12
  259. package/dist/starters/preact/design-system/components/Content/Image/Image.tsx +0 -83
  260. package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +0 -27
  261. package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +0 -46
  262. package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +0 -17
  263. package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +0 -41
  264. package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +0 -20
  265. package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.tsx +0 -37
  266. package/dist/starters/preact/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -24
  267. package/dist/starters/preact/design-system/components/Forms/TextField/TextField.tsx +0 -173
  268. package/dist/starters/preact/design-system/components/Identity/Identity.ads.scenario.tsx +0 -13
  269. package/dist/starters/preact/design-system/components/Identity/Identity.tsx +0 -146
  270. package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +0 -27
  271. package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.tsx +0 -194
  272. package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +0 -19
  273. package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.tsx +0 -37
  274. package/dist/starters/preact/design-system/controllers/FormField/FormField.ads.behavior.ts +0 -70
  275. package/dist/starters/preact/design-system/controllers/FormField/FormField.behavior.spec.ts +0 -237
  276. package/dist/starters/preact/design-system/controllers/FormField/FormField.ts +0 -343
  277. package/dist/starters/preact/design-system/controllers/FormField/useFormField.ts +0 -70
  278. package/dist/starters/preact/design-system/controllers/Palette/Palette.ts +0 -165
  279. package/dist/starters/preact/design-system/foundation.ads.ts +0 -22
  280. package/dist/starters/preact/design-system/index.ts +0 -51
  281. package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +0 -5
  282. package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +0 -22
  283. package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.fixture.ts +0 -12
  284. package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +0 -21
  285. package/dist/starters/preact/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +0 -24
  286. package/dist/starters/preact/design-system/mocks/Workspace/Media.ads.scenario.tsx +0 -24
  287. package/dist/starters/preact/design-system/mocks/Workspace/Stress.ads.scenario.tsx +0 -36
  288. package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.fixture.ts +0 -13
  289. package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +0 -27
  290. package/dist/starters/preact/design-system/mocks/Workspace/media/ads.svg +0 -1
  291. package/dist/starters/preact/design-system/palette.generated.ts +0 -188
  292. package/dist/starters/preact/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +0 -73
  293. package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +0 -23
  294. package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +0 -94
  295. package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +0 -21
  296. package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.tsx +0 -137
  297. package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +0 -22
  298. package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.tsx +0 -248
  299. package/dist/starters/preact/design-system/patterns/Shell/Shell.ads.scenario.tsx +0 -26
  300. package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +0 -268
  301. package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +0 -28
  302. package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.tsx +0 -105
  303. package/dist/starters/preact/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +0 -179
  304. package/dist/starters/preact/design-system/profiles/Containers/containers.ads.ts +0 -67
  305. package/dist/starters/preact/design-system/profiles/Containers/frames.ads.ts +0 -32
  306. package/dist/starters/preact/design-system/profiles/Containers/geometry.ads.ts +0 -30
  307. package/dist/starters/preact/design-system/profiles/Containers/spacing.ads.ts +0 -26
  308. package/dist/starters/preact/design-system/profiles/Controls/controls.ads.ts +0 -157
  309. package/dist/starters/preact/design-system/profiles/Controls/frames.ads.ts +0 -50
  310. package/dist/starters/preact/design-system/profiles/Controls/spacing.ads.ts +0 -29
  311. package/dist/starters/preact/design-system/profiles/Focus/keyboard.ads.ts +0 -13
  312. package/dist/starters/preact/design-system/profiles/Identity/identity.ads.ts +0 -25
  313. package/dist/starters/preact/design-system/profiles/Identity/spacing.ads.ts +0 -22
  314. package/dist/starters/preact/design-system/profiles/Layout/grid.ads.ts +0 -69
  315. package/dist/starters/preact/design-system/profiles/Layout/inspector.ads.ts +0 -146
  316. package/dist/starters/preact/design-system/profiles/Layout/overlays.ads.ts +0 -94
  317. package/dist/starters/preact/design-system/profiles/Layout/regions.ads.ts +0 -296
  318. package/dist/starters/preact/design-system/profiles/Motion/feedback.ads.ts +0 -92
  319. package/dist/starters/preact/design-system/profiles/Surfaces/controls.ads.ts +0 -142
  320. package/dist/starters/preact/design-system/profiles/Surfaces/document.ads.ts +0 -2
  321. package/dist/starters/preact/design-system/profiles/Surfaces/materials.ads.ts +0 -18
  322. package/dist/starters/preact/design-system/profiles/Surfaces/surfaces.ads.ts +0 -48
  323. package/dist/starters/preact/design-system/profiles/Typography/details.ads.ts +0 -19
  324. package/dist/starters/preact/design-system/profiles/Typography/document.ads.ts +0 -2
  325. package/dist/starters/preact/design-system/profiles/Typography/headings.ads.ts +0 -15
  326. package/dist/starters/preact/design-system/profiles/Typography/text.ads.ts +0 -73
  327. package/dist/starters/preact/design-system/profiles/Visuals/artwork.ads.ts +0 -46
  328. package/dist/starters/preact/design-system/profiles/Visuals/charts.ads.ts +0 -31
  329. package/dist/starters/preact/design-system/profiles/Visuals/content.ads.ts +0 -52
  330. package/dist/starters/preact/design-system/profiles/Visuals/glyphs.ads.ts +0 -35
  331. package/dist/starters/preact/design-system/profiles/Visuals/identity.ads.ts +0 -24
  332. package/dist/starters/preact/design-system/tokens/Artwork/paint.ads.css +0 -7
  333. package/dist/starters/preact/design-system/tokens/Artwork/visual-size.ads.css +0 -12
  334. package/dist/starters/preact/design-system/tokens/Brand/paint.ads.css +0 -7
  335. package/dist/starters/preact/design-system/tokens/Charts/paint.ads.css +0 -19
  336. package/dist/starters/preact/design-system/tokens/Containers/border-width.ads.css +0 -1
  337. package/dist/starters/preact/design-system/tokens/Containers/content-gap.ads.css +0 -5
  338. package/dist/starters/preact/design-system/tokens/Containers/frame-inset.ads.css +0 -6
  339. package/dist/starters/preact/design-system/tokens/Containers/frame-size.ads.css +0 -11
  340. package/dist/starters/preact/design-system/tokens/Containers/radius.ads.css +0 -1
  341. package/dist/starters/preact/design-system/tokens/Controls/border-width.ads.css +0 -4
  342. package/dist/starters/preact/design-system/tokens/Controls/content-gap.ads.css +0 -6
  343. package/dist/starters/preact/design-system/tokens/Controls/control-min-size.ads.css +0 -17
  344. package/dist/starters/preact/design-system/tokens/Controls/frame-inset.ads.css +0 -21
  345. package/dist/starters/preact/design-system/tokens/Controls/radius.ads.css +0 -1
  346. package/dist/starters/preact/design-system/tokens/Controls/target-min-size.ads.css +0 -2
  347. package/dist/starters/preact/design-system/tokens/Controls/visual-size.ads.css +0 -2
  348. package/dist/starters/preact/design-system/tokens/Focus/border-width.ads.css +0 -1
  349. package/dist/starters/preact/design-system/tokens/Focus/focus-offset.ads.css +0 -1
  350. package/dist/starters/preact/design-system/tokens/Foundation/spacing.ads.css +0 -20
  351. package/dist/starters/preact/design-system/tokens/Grid/grid-gutter.ads.css +0 -6
  352. package/dist/starters/preact/design-system/tokens/Grid/layer.ads.css +0 -2
  353. package/dist/starters/preact/design-system/tokens/Grid/layout-size.ads.css +0 -15
  354. package/dist/starters/preact/design-system/tokens/Grid/spacing.ads.css +0 -12
  355. package/dist/starters/preact/design-system/tokens/Grid/track-count.ads.css +0 -1
  356. package/dist/starters/preact/design-system/tokens/Identity/content-gap.ads.css +0 -6
  357. package/dist/starters/preact/design-system/tokens/Identity/visual-size.ads.css +0 -1
  358. package/dist/starters/preact/design-system/tokens/Motion/duration.ads.css +0 -6
  359. package/dist/starters/preact/design-system/tokens/Motion/easing.ads.css +0 -5
  360. package/dist/starters/preact/design-system/tokens/Motion/motion-angle.ads.css +0 -1
  361. package/dist/starters/preact/design-system/tokens/Motion/motion-distance.ads.css +0 -2
  362. package/dist/starters/preact/design-system/tokens/Motion/motion-scale.ads.css +0 -9
  363. package/dist/starters/preact/design-system/tokens/Surfaces/blur.ads.css +0 -2
  364. package/dist/starters/preact/design-system/tokens/Surfaces/gradient.ads.css +0 -2
  365. package/dist/starters/preact/design-system/tokens/Surfaces/opacity.ads.css +0 -2
  366. package/dist/starters/preact/design-system/tokens/Surfaces/paint.ads.css +0 -58
  367. package/dist/starters/preact/design-system/tokens/Surfaces/shadow.ads.css +0 -20
  368. package/dist/starters/preact/design-system/tokens/Typography/font-family.ads.css +0 -1
  369. package/dist/starters/preact/design-system/tokens/Typography/font-features.ads.css +0 -1
  370. package/dist/starters/preact/design-system/tokens/Typography/font-size.ads.css +0 -9
  371. package/dist/starters/preact/design-system/tokens/Typography/font-stretch.ads.css +0 -1
  372. package/dist/starters/preact/design-system/tokens/Typography/font-variations.ads.css +0 -1
  373. package/dist/starters/preact/design-system/tokens/Typography/font-weight.ads.css +0 -1
  374. package/dist/starters/preact/design-system/tokens/Typography/letter-spacing.ads.css +0 -1
  375. package/dist/starters/preact/design-system/tokens/Typography/line-height.ads.css +0 -11
  376. package/dist/starters/preact/design-system/tokens/Typography/word-spacing.ads.css +0 -1
  377. package/dist/starters/preact/starter.json +0 -11
  378. package/dist/starters/react/design-system/assets/avatars/avatar.ads.ts +0 -10
  379. package/dist/starters/react/design-system/assets/avatars/member.svg +0 -1
  380. package/dist/starters/react/design-system/assets/brand/emblem.ads.ts +0 -18
  381. package/dist/starters/react/design-system/assets/brand/emblem.svg +0 -4
  382. package/dist/starters/react/design-system/assets/brand/iris-emblem.ads.ts +0 -14
  383. package/dist/starters/react/design-system/assets/brand/iris-emblem.svg +0 -4
  384. package/dist/starters/react/design-system/assets/brand/mark.ads.ts +0 -14
  385. package/dist/starters/react/design-system/assets/brand/mark.svg +0 -1
  386. package/dist/starters/react/design-system/assets/glyphs/arrow.ads.ts +0 -14
  387. package/dist/starters/react/design-system/assets/glyphs/arrow.svg +0 -1
  388. package/dist/starters/react/design-system/assets/glyphs/chevron-20.svg +0 -1
  389. package/dist/starters/react/design-system/assets/glyphs/chevron-24.svg +0 -1
  390. package/dist/starters/react/design-system/assets/glyphs/chevron.ads.ts +0 -20
  391. package/dist/starters/react/design-system/assets/glyphs/close.ads.ts +0 -13
  392. package/dist/starters/react/design-system/assets/glyphs/close.svg +0 -1
  393. package/dist/starters/react/design-system/assets/glyphs/favorite.ads.ts +0 -23
  394. package/dist/starters/react/design-system/assets/glyphs/favorite.normal.svg +0 -1
  395. package/dist/starters/react/design-system/assets/glyphs/favorite.selected.svg +0 -1
  396. package/dist/starters/react/design-system/assets/glyphs/search.ads.ts +0 -10
  397. package/dist/starters/react/design-system/assets/glyphs/search.svg +0 -1
  398. package/dist/starters/react/design-system/assets/illustrations/journey.ads.ts +0 -32
  399. package/dist/starters/react/design-system/assets/illustrations/journey.contrast.svg +0 -6
  400. package/dist/starters/react/design-system/assets/illustrations/journey.dark.svg +0 -13
  401. package/dist/starters/react/design-system/assets/illustrations/journey.light.svg +0 -13
  402. package/dist/starters/react/design-system/assets/logos/harbor-pay.ads.ts +0 -17
  403. package/dist/starters/react/design-system/assets/logos/harbor-pay.dark.svg +0 -10
  404. package/dist/starters/react/design-system/assets/logos/harbor-pay.light.svg +0 -10
  405. package/dist/starters/react/design-system/assets/logos/lumen-cloud.ads.ts +0 -15
  406. package/dist/starters/react/design-system/assets/logos/lumen-cloud.dark.svg +0 -9
  407. package/dist/starters/react/design-system/assets/logos/lumen-cloud.light.svg +0 -9
  408. package/dist/starters/react/design-system/assets/status/error.svg +0 -1
  409. package/dist/starters/react/design-system/assets/status/outcomes.ads.ts +0 -31
  410. package/dist/starters/react/design-system/assets/status/status.ads.ts +0 -16
  411. package/dist/starters/react/design-system/assets/status/success.svg +0 -1
  412. package/dist/starters/react/design-system/assets/status/sync-status.ads.ts +0 -14
  413. package/dist/starters/react/design-system/assets/status/sync-status.svg +0 -7
  414. package/dist/starters/react/design-system/assets/status/warning.svg +0 -1
  415. package/dist/starters/react/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -12
  416. package/dist/starters/react/design-system/components/Actions/Button/Button.tsx +0 -198
  417. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +0 -95
  418. package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +0 -22
  419. package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.tsx +0 -60
  420. package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +0 -24
  421. package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.tsx +0 -50
  422. package/dist/starters/react/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +0 -8
  423. package/dist/starters/react/design-system/components/Content/Artwork/Artwork.tsx +0 -110
  424. package/dist/starters/react/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +0 -25
  425. package/dist/starters/react/design-system/components/Content/BarChart/BarChart.tsx +0 -72
  426. package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +0 -8
  427. package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.tsx +0 -43
  428. package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +0 -21
  429. package/dist/starters/react/design-system/components/Content/Icon/Icon.tsx +0 -41
  430. package/dist/starters/react/design-system/components/Content/Icon/glyphs/arrow.tsx +0 -10
  431. package/dist/starters/react/design-system/components/Content/Icon/glyphs/close.tsx +0 -10
  432. package/dist/starters/react/design-system/components/Content/Icon/glyphs/search.tsx +0 -10
  433. package/dist/starters/react/design-system/components/Content/Image/Image.ads.fixture.ts +0 -9
  434. package/dist/starters/react/design-system/components/Content/Image/Image.ads.scenario.tsx +0 -12
  435. package/dist/starters/react/design-system/components/Content/Image/Image.tsx +0 -83
  436. package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +0 -27
  437. package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +0 -46
  438. package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +0 -17
  439. package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +0 -41
  440. package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +0 -20
  441. package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.tsx +0 -37
  442. package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -24
  443. package/dist/starters/react/design-system/components/Forms/TextField/TextField.tsx +0 -173
  444. package/dist/starters/react/design-system/components/Identity/Identity.ads.scenario.tsx +0 -13
  445. package/dist/starters/react/design-system/components/Identity/Identity.tsx +0 -146
  446. package/dist/starters/react/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +0 -27
  447. package/dist/starters/react/design-system/components/Overlays/Menu/Menu.tsx +0 -194
  448. package/dist/starters/react/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +0 -19
  449. package/dist/starters/react/design-system/components/Overlays/Popover/Popover.tsx +0 -37
  450. package/dist/starters/react/design-system/controllers/FormField/FormField.ads.behavior.ts +0 -70
  451. package/dist/starters/react/design-system/controllers/FormField/FormField.behavior.spec.ts +0 -237
  452. package/dist/starters/react/design-system/controllers/FormField/FormField.ts +0 -343
  453. package/dist/starters/react/design-system/controllers/FormField/useFormField.ts +0 -70
  454. package/dist/starters/react/design-system/controllers/Palette/Palette.ts +0 -165
  455. package/dist/starters/react/design-system/foundation.ads.ts +0 -22
  456. package/dist/starters/react/design-system/index.ts +0 -51
  457. package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +0 -5
  458. package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +0 -22
  459. package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.fixture.ts +0 -12
  460. package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +0 -21
  461. package/dist/starters/react/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +0 -24
  462. package/dist/starters/react/design-system/mocks/Workspace/Media.ads.scenario.tsx +0 -24
  463. package/dist/starters/react/design-system/mocks/Workspace/Stress.ads.scenario.tsx +0 -36
  464. package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.fixture.ts +0 -13
  465. package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +0 -27
  466. package/dist/starters/react/design-system/mocks/Workspace/media/ads.svg +0 -1
  467. package/dist/starters/react/design-system/palette.generated.ts +0 -188
  468. package/dist/starters/react/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +0 -73
  469. package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +0 -23
  470. package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +0 -94
  471. package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +0 -21
  472. package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.tsx +0 -137
  473. package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +0 -22
  474. package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.tsx +0 -248
  475. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +0 -26
  476. package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +0 -268
  477. package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +0 -28
  478. package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.tsx +0 -105
  479. package/dist/starters/react/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +0 -179
  480. package/dist/starters/react/design-system/profiles/Containers/containers.ads.ts +0 -67
  481. package/dist/starters/react/design-system/profiles/Containers/frames.ads.ts +0 -32
  482. package/dist/starters/react/design-system/profiles/Containers/geometry.ads.ts +0 -30
  483. package/dist/starters/react/design-system/profiles/Containers/spacing.ads.ts +0 -26
  484. package/dist/starters/react/design-system/profiles/Controls/controls.ads.ts +0 -157
  485. package/dist/starters/react/design-system/profiles/Controls/frames.ads.ts +0 -50
  486. package/dist/starters/react/design-system/profiles/Controls/spacing.ads.ts +0 -29
  487. package/dist/starters/react/design-system/profiles/Focus/keyboard.ads.ts +0 -13
  488. package/dist/starters/react/design-system/profiles/Identity/identity.ads.ts +0 -25
  489. package/dist/starters/react/design-system/profiles/Identity/spacing.ads.ts +0 -22
  490. package/dist/starters/react/design-system/profiles/Layout/grid.ads.ts +0 -69
  491. package/dist/starters/react/design-system/profiles/Layout/inspector.ads.ts +0 -146
  492. package/dist/starters/react/design-system/profiles/Layout/overlays.ads.ts +0 -94
  493. package/dist/starters/react/design-system/profiles/Layout/regions.ads.ts +0 -296
  494. package/dist/starters/react/design-system/profiles/Motion/feedback.ads.ts +0 -92
  495. package/dist/starters/react/design-system/profiles/Surfaces/controls.ads.ts +0 -142
  496. package/dist/starters/react/design-system/profiles/Surfaces/document.ads.ts +0 -2
  497. package/dist/starters/react/design-system/profiles/Surfaces/materials.ads.ts +0 -18
  498. package/dist/starters/react/design-system/profiles/Surfaces/surfaces.ads.ts +0 -48
  499. package/dist/starters/react/design-system/profiles/Typography/details.ads.ts +0 -19
  500. package/dist/starters/react/design-system/profiles/Typography/document.ads.ts +0 -2
  501. package/dist/starters/react/design-system/profiles/Typography/headings.ads.ts +0 -15
  502. package/dist/starters/react/design-system/profiles/Typography/text.ads.ts +0 -73
  503. package/dist/starters/react/design-system/profiles/Visuals/artwork.ads.ts +0 -46
  504. package/dist/starters/react/design-system/profiles/Visuals/charts.ads.ts +0 -31
  505. package/dist/starters/react/design-system/profiles/Visuals/content.ads.ts +0 -52
  506. package/dist/starters/react/design-system/profiles/Visuals/glyphs.ads.ts +0 -35
  507. package/dist/starters/react/design-system/profiles/Visuals/identity.ads.ts +0 -24
  508. package/dist/starters/react/design-system/tokens/Artwork/paint.ads.css +0 -7
  509. package/dist/starters/react/design-system/tokens/Artwork/visual-size.ads.css +0 -12
  510. package/dist/starters/react/design-system/tokens/Brand/paint.ads.css +0 -7
  511. package/dist/starters/react/design-system/tokens/Charts/paint.ads.css +0 -19
  512. package/dist/starters/react/design-system/tokens/Containers/border-width.ads.css +0 -1
  513. package/dist/starters/react/design-system/tokens/Containers/content-gap.ads.css +0 -5
  514. package/dist/starters/react/design-system/tokens/Containers/frame-inset.ads.css +0 -6
  515. package/dist/starters/react/design-system/tokens/Containers/frame-size.ads.css +0 -11
  516. package/dist/starters/react/design-system/tokens/Containers/radius.ads.css +0 -1
  517. package/dist/starters/react/design-system/tokens/Controls/border-width.ads.css +0 -4
  518. package/dist/starters/react/design-system/tokens/Controls/content-gap.ads.css +0 -6
  519. package/dist/starters/react/design-system/tokens/Controls/control-min-size.ads.css +0 -17
  520. package/dist/starters/react/design-system/tokens/Controls/frame-inset.ads.css +0 -21
  521. package/dist/starters/react/design-system/tokens/Controls/radius.ads.css +0 -1
  522. package/dist/starters/react/design-system/tokens/Controls/target-min-size.ads.css +0 -2
  523. package/dist/starters/react/design-system/tokens/Controls/visual-size.ads.css +0 -2
  524. package/dist/starters/react/design-system/tokens/Focus/border-width.ads.css +0 -1
  525. package/dist/starters/react/design-system/tokens/Focus/focus-offset.ads.css +0 -1
  526. package/dist/starters/react/design-system/tokens/Foundation/spacing.ads.css +0 -20
  527. package/dist/starters/react/design-system/tokens/Grid/grid-gutter.ads.css +0 -6
  528. package/dist/starters/react/design-system/tokens/Grid/layer.ads.css +0 -2
  529. package/dist/starters/react/design-system/tokens/Grid/layout-size.ads.css +0 -15
  530. package/dist/starters/react/design-system/tokens/Grid/spacing.ads.css +0 -12
  531. package/dist/starters/react/design-system/tokens/Grid/track-count.ads.css +0 -1
  532. package/dist/starters/react/design-system/tokens/Identity/content-gap.ads.css +0 -6
  533. package/dist/starters/react/design-system/tokens/Identity/visual-size.ads.css +0 -1
  534. package/dist/starters/react/design-system/tokens/Motion/duration.ads.css +0 -6
  535. package/dist/starters/react/design-system/tokens/Motion/easing.ads.css +0 -5
  536. package/dist/starters/react/design-system/tokens/Motion/motion-angle.ads.css +0 -1
  537. package/dist/starters/react/design-system/tokens/Motion/motion-distance.ads.css +0 -2
  538. package/dist/starters/react/design-system/tokens/Motion/motion-scale.ads.css +0 -9
  539. package/dist/starters/react/design-system/tokens/Surfaces/blur.ads.css +0 -2
  540. package/dist/starters/react/design-system/tokens/Surfaces/gradient.ads.css +0 -2
  541. package/dist/starters/react/design-system/tokens/Surfaces/opacity.ads.css +0 -2
  542. package/dist/starters/react/design-system/tokens/Surfaces/paint.ads.css +0 -58
  543. package/dist/starters/react/design-system/tokens/Surfaces/shadow.ads.css +0 -20
  544. package/dist/starters/react/design-system/tokens/Typography/font-family.ads.css +0 -1
  545. package/dist/starters/react/design-system/tokens/Typography/font-features.ads.css +0 -1
  546. package/dist/starters/react/design-system/tokens/Typography/font-size.ads.css +0 -9
  547. package/dist/starters/react/design-system/tokens/Typography/font-stretch.ads.css +0 -1
  548. package/dist/starters/react/design-system/tokens/Typography/font-variations.ads.css +0 -1
  549. package/dist/starters/react/design-system/tokens/Typography/font-weight.ads.css +0 -1
  550. package/dist/starters/react/design-system/tokens/Typography/letter-spacing.ads.css +0 -1
  551. package/dist/starters/react/design-system/tokens/Typography/line-height.ads.css +0 -11
  552. package/dist/starters/react/design-system/tokens/Typography/word-spacing.ads.css +0 -1
  553. package/dist/starters/react/starter.json +0 -11
  554. package/docs/STARTER.md +0 -167
@@ -8,7 +8,7 @@ correct in the first render. MCP serves this guide as `ads://guides/layout`.
8
8
 
9
9
  The parent owns external placement and gutters; each element owns its frame and
10
10
  child arrangement. There is no second layout API and no parent-owned internal
11
- padding. The starter's grid values follow
11
+ padding. The example design system's grid values follow
12
12
  [IBM Carbon's 2x Grid](https://www.carbondesignsystem.com/building-blocks/foundations/2x-grid/overview)
13
13
  and its spacing borrows Adobe Spectrum's non-uniform scale. Both are starting
14
14
  points; a project may choose any. Icon/logo alignment with text is a separate design decision; box
@@ -67,6 +67,11 @@ media queries and track lists, so a context cannot change them
67
67
  | A region that adapts to the space it gets, not the window | `context: "container"` inside an owned ancestor framed `container: "region"` |
68
68
  | Children stacked or in a row inside a component | `layout: "stack"` or `"inline"` |
69
69
  | Several parts painted in one area | `layout: "layered"` |
70
+ | A jump target (a section or heading with an id) under a sticky header | `anchorClear: { slot: "layer", field: "clearBlockStart" }` to land right under the header, or `{ slot: "spacing", field: "anchorGap" }` for the target's own distance (level with a sticky side column); never a document-wide scroll padding in the application |
71
+ | Neighbours that overlap (a pile of faces, stacked cards) | `overlap: { slot: "spacing", field: "overlap" }` on the `inline` or `stack` arrangement, from an `overlap` token; never negative margins of your own |
72
+ | An element that changes size, padding or spacing under a state | a `when` entry selecting another profile: `frame: { profile }` on the element, `spacing: "<profile>"` on its arrangement; `geometryTransition` to animate it. Give a `:hover` state a focus or attribute state of the same geometry |
73
+ | A part that appears in a row by growing from nothing (a counter, row actions) | `collapsed: true` on the part and `collapsed: false` in the state's `when` entry (or the reverse); its box goes on the element it holds |
74
+ | A decorative backdrop larger than its box (a glow) | a first part of a `layered` parent with `outset: { block, inline }` (spacing fields; a `box-share` token in the profile's `outsetBlock`/`outsetInline` makes it a share of the box) and a gradient surface |
70
75
  | A panel that covers the content | a top-layer root (`layer`), or a cell stacked by the profile's `overlayLayer` |
71
76
 
72
77
  Typical defaults, not rules: headers and toolbars are fluid in width; side panels
@@ -88,6 +93,20 @@ const form = recipe({
88
93
  });
89
94
  ```
90
95
 
96
+ A rounded frame does not clip what it holds. When a child's background or an
97
+ image reaches its corners, choose: `overflow: "clip"` on the frame, padding in
98
+ its frame profile, or the same radius on the child (`construction/corner-overpaint`,
99
+ and `corner-overpainted` in the audit).
100
+
101
+ An edge that moves with the layout: name the frame's ruled sides and rounded
102
+ corners, then the other set under a named condition of the spatial profile:
103
+ `frame: { rules: ["block-end"], corners: ["end-start", "end-end"] }, at: {
104
+ "narrow-content": { frame: { rules: ["inline-start"], corners: ["start-end",
105
+ "end-end"] } } }`. A named condition holds below its bound.
106
+
107
+ Columns of unequal width: `columns: 2, weights: [0.85, 1.15]` on a fluid grid
108
+ (one positive number per local column). Never write `grid-template-columns`.
109
+
91
110
  The field exposes its label, control and help rows; `alignRows` binds them through
92
111
  subgrid. The cell must span exactly those rows, in the order the component exposes
93
112
  them (`align-rows-mismatch`), and aligned rows share one gap. The pattern never
@@ -102,6 +121,15 @@ until that owner is fixed.
102
121
  "region" }` on a wrapper whose width is the region the grid should follow
103
122
  (`grid-container-missing`).
104
123
  A container the application renders around a public component does not count.
124
+ - Text in a grid starts on one keyline, the `wide` gutter's start. A padded frame
125
+ in a `narrow` or `condensed` cell (a card) needs an inline padding that, with
126
+ that gutter's start, equals the wide gutter's start within the profile's fine
127
+ unit: otherwise `keyline-missed`. Use a frame profile whose `paddingInline`
128
+ token is the wide gutter's start token (the example design system's `card-cell`). A public
129
+ component placed in such a cell is held to the same by its root frame
130
+ (`component-keyline`): give it a variant with that padding. Borders are not
131
+ counted; controls, `gutter: "none"` grids and frames without inline padding are
132
+ exempt.
105
133
  - A cell's frame with a fixed inline size fits the cell at the lower edge of every
106
134
  tier it is visible in, as the grid algebra bounds it (span less gutter insets):
107
135
  wider is `frame-exceeds-region`. Cap a fixed frame to its region
@@ -126,6 +154,18 @@ until that owner is fixed.
126
154
  `overlay: "none"` (the default) returns it to flow at a later tier. Overlays
127
155
  belong to a root fluid or hybrid grid, never to inherited tracks or a cell that
128
156
  carries them.
157
+ - An element that stays in view while its container scrolls declares
158
+ `sticky: { edge: "block-start" }` on its root or part (`clear: "block-start"`
159
+ to sit below a top bar by the layer profile's `clearBlockStart`). Never write
160
+ `position: sticky` or a `top` offset by hand.
161
+ - A visual part changes size by breakpoint with `at: { "<condition>": { visual:
162
+ "<visual profile>" } }` on the part, never with a second element or a media
163
+ query of your own. Both sizes must select the same drawing of the asset.
164
+ - A frame whose two inline sides differ states them one by one:
165
+ `paddingInlineStart` and `paddingInlineEnd` (not beside `paddingInline`). On
166
+ a container frame the keyline is read at the start inset. A control's frame
167
+ takes them too (a tag padded more before its remove button), and
168
+ `paddingBlockStart` / `paddingBlockEnd` in place of `minimumBlockInset`.
129
169
  - `visible: false` hides the cell over the tiers it is set for (bounded queries,
130
170
  so a visible tier keeps the element's own display); `visible: true` shows it
131
171
  again from a later tier. Hiding a part while a named condition holds is the
@@ -161,7 +201,10 @@ until that owner is fixed.
161
201
  a split view) declares `extent: "container"` on its root: it fills a block
162
202
  parent, a column even when that column aligns its children to the start, and
163
203
  the space left beside its siblings in a row. Cap such a row with a
164
- `maxInlineSize` token in its frame profile ("at most 30rem"). A part can fill
204
+ `maxInlineSize` token in its frame profile ("at most 30rem"). A control (a
205
+ full-width button) takes `extent: "container"` on its recipe root in the same
206
+ way; offer it as a recipe choice the component selects from a prop, not as a
207
+ change in each parent. A part can fill
165
208
  a `"container"` row or a row whose frame fixes its width (`inlineSize`);
166
209
  in any other row it is `extent-row-hugs`, because a hugging row has nothing to
167
210
  fill. `align` is the other axis: it places the row's children across the row
@@ -187,7 +230,7 @@ measure for running text.
187
230
  ## Inspect and verify
188
231
 
189
232
  `ads check` proves the construction: every tier's placement, track counts and
190
- alignment. The showcase's Foundation view draws each spatial profile's example
233
+ alignment. The showcase's Spatial grids page (under Profiles) draws each spatial profile's example
191
234
  from the algebra's own output, and the guide overlay's mini-unit squares use the
192
235
  unit of the profile the owner's grids follow. What content does inside it is a rendered question: review the owner's
193
236
  scenario with `ads_capture` layout guides and the render audit's overflow checks at
@@ -92,8 +92,21 @@ const largerText = recipe({ select: { typography: "lg" } });
92
92
  reachable combination must form one construction (one arrangement, one
93
93
  provider per field).
94
94
  - Application text (`string` props) selects markup by presence only
95
- (`help && <span>`); choosing a design by its content, or an unbounded choice,
96
- is rejected.
95
+ (`help && <span>`); choosing a design by its content, or an unbounded
96
+ choice, is rejected.
97
+ - An optional callback, object or slot selects markup by whether it is given:
98
+ `{onRemove && <button onClick={onRemove}>}`, `{icon ? … : …}`,
99
+ `{sourceDark !== undefined && …}`. Both variants are checked, so the optional
100
+ element is a part with `required: false`; no boolean prop beside the callback
101
+ and no `hidden` wrapper. A node (`footer?: ReactNode`) is tested with
102
+ `!== undefined` only, since a given node may be `0`, `""`, `false` or `null`;
103
+ a default value makes the prop always given.
104
+ - A content image with a file for dark themes is two visual parts,
105
+ `scheme: "light"` and `scheme: "dark"`, both rendered as `<img>` with
106
+ `width` and `height`: CSS displays the one for the theme in effect. The image
107
+ of the scheme the default theme does not have is `loading="lazy"`, so its
108
+ file is not downloaded while hidden. Declared artwork uses its own theme
109
+ variants instead.
97
110
 
98
111
  <a id="when"></a>
99
112
  ## `when` states
@@ -114,6 +127,16 @@ The key grammar is closed: `&` followed by one or more of `:hover`, `:active`,
114
127
  `:focus`, `:focus-visible`, `:focus-within`, `:disabled`, `:enabled`,
115
128
  `:checked`, `:indeterminate`, `[aria-*]`, `[data-*]` or `[open]` (an attribute
116
129
  with at most one double-quoted value), each optionally inside `:not(…)`.
130
+ A control recipe takes its text from its profile's text slot, or names its
131
+ own with `text: "<profile>"`. A border's line (`dashed`, `dotted`) is the frame
132
+ profile's `borderStyle`, never a recipe field.
133
+ A `when` entry selects a `surface`, and may select a `text` profile that
134
+ differs from the element's own in weight and tracking only (the chosen option
135
+ is heavier).
136
+ A state of a direct part of the recipe is written `:has(> .part:state)` with
137
+ `:checked`, `:indeterminate`, `:focus-visible`, `:hover` or `:disabled`: a
138
+ checkbox's box under its native input's `:checked`, a field control's own
139
+ hover. Never mirror those states into attributes by script.
117
140
  Lowering appends the part's path to the condition, so a pseudo-element, a
118
141
  combinator or class, a type, a nested `&`, another attribute operator or a
119
142
  functional pseudo-class (`:has`, `:is`, `:dir`) would select a different
@@ -121,10 +144,71 @@ element and is rejected where it is written. The state itself is the owner's
121
144
  code: an attribute it sets (`data-dragging`, `aria-busy`) or a native state;
122
145
  a recipe never creates a state machine.
123
146
 
124
- - `paintTransition` interpolates `background-color`, `border-color`, `color`
125
- or `box-shadow` between the base surface and its state surfaces, timed by a
126
- motion profile with a `static` reduced-motion policy. A channel that does not
127
- change, or a gradient or blur on the element, is rejected.
147
+ - `paintTransition` interpolates `background-color`, `border-color`, `color`,
148
+ `box-shadow`, `filter` (the surface's `blur`, `shapeShadow`, `groupShadow`)
149
+ or `backdrop-filter` (`backdropBlur`, `backdropSaturate`) between the base
150
+ surface and its state surfaces, timed by a motion profile with a `static`
151
+ reduced-motion policy. A channel that does not change, an effect that changes
152
+ without its channel, or a gradient on the element, is rejected.
153
+ - Long-form content (articles, docs, legal text, Markdown or CMS output) is a
154
+ component whose recipe has `layout: "prose"`: `rhythm` for the space between
155
+ blocks and `elements` naming a text, surface and frame profile per plain
156
+ element (`paragraph`, `heading2`, `link`, `list`, `item`, `quote`, `rule`,
157
+ `pre`, `table`, `cell`, `media`, …). Content is then plain markup inside it
158
+ (`<Prose><h2>…</h2><p>…</p></Prose>`); never a component per paragraph, and
159
+ never descendant CSS of your own. Declare every element the content uses.
160
+ A block's `spaceBefore` and `spaceAfter` replace the rhythm around it (a
161
+ heading closer to its text); `list` takes `markers` (a shape per depth of
162
+ nesting) and `item` takes `marker` (a colour) and `markerText` (a weight);
163
+ `component` gives every component placed among the blocks its space before
164
+ and after.
165
+ Only classless elements are styled, so do not put classes on content. For
166
+ content that arrives as an HTML string, add a second component on the same
167
+ recipe that injects it (`ProseHtml({ html })`); the application passes the
168
+ string as a prop and sanitises it first.
169
+ - `enter: { from: { surface, translate | scale | rotate }, motion }` on a root
170
+ or a region part is an entrance on first render: the element starts from a
171
+ surface that states only `opacity` and `blur`, and at most one movement read
172
+ from the entrance's motion profile, then settles. See the motion reference.
173
+ - A part that needs a box of its own without being a control (a disc behind a
174
+ mark, a badge) takes `frame: { profile: "<frame profile>" }`; do not make a
175
+ separate owner only to give an element padding, a border or a size. The
176
+ drawn box of a checkbox, radio or switch whose native `<input>` is hidden
177
+ takes `focus: { of: "<the input's part>" }`: the focus profile's outline is
178
+ drawn on the box while the input has keyboard focus. A visual part may sit
179
+ inside such a part: the owner reads it by its name (`recipe.parts.<name>`,
180
+ `recipe.assets.<name>.source`), which one nested part of the recipe has. On a
181
+ visual part the frame's size is the box and the drawing keeps its visual
182
+ profile's size, centred in it.
183
+ - A switch, a radio's dot or a slider's thumb is a decorative box of its control:
184
+ a part without a `kind`, with `frame: { profile }` and a `surface`, that takes
185
+ another surface or `translateInline` under the control's state
186
+ (`&[aria-checked="true"]`). Keep it empty and `aria-hidden`; name the control
187
+ on its root. Do not rebuild the control as a region to get a second element.
188
+ - A native `<progress>` is styled as a part: its own surface is the track and
189
+ `pseudo: { progressValue: { surface } }` (a background-only surface) the
190
+ fill, proven at 3:1 against the track. Do not draw a measured fill beside a
191
+ hidden native element.
192
+ - A border whose sides differ is stated in the profiles, not the recipe: the
193
+ frame's `borderWidth` plus a side's own (`borderInlineStartWidth`), the
194
+ surface's `borderColor` plus a side's own (`borderInlineStartColor`). Sides
195
+ are logical.
196
+ - Case is a text-profile field, `textTransform: "uppercase" | "lowercase" |
197
+ "capitalize"`: never rewrite content to change its case, and never case text
198
+ with a class.
199
+ - Surface effects are surface-profile fields, composed in a fixed order:
200
+ `blur` → `filter: blur()`; `backdropBlur` and `backdropSaturate` (role
201
+ `saturation`, a percentage) → `backdrop-filter: blur() saturate()`;
202
+ `brightness` (role `brightness`, a percentage, on a visual part only) →
203
+ `filter: brightness()`: a picture with no dark version takes a token that
204
+ is `100%` in the light theme and lower in the dark one. For
205
+ shadows choose by meaning: `boxShadow` for a box (card, panel, control);
206
+ `shapeShadow` on a visual part whose drawing is not its box (transparent
207
+ image, artwork); `groupShadow` on a container when everything inside should
208
+ cast one shadow. `mask` (a `gradient` token whose alpha fades the element)
209
+ goes on a visual part or on an element that scrolls, never on a container of
210
+ standing text. The two shadows need a one-layer shadow token (no spread,
211
+ inset, `none` or second layer) in every theme.
128
212
  - Pressing: a glyph part, or a region or control root, declares
129
213
  `transition: ["scale"]` and one `when` entry with
130
214
  `scale: { slot: "motion", field: "scale" }`. The element rests at `scale: 1`
@@ -159,6 +243,7 @@ fragment or a native frame-only element.
159
243
  `cursor` (`pointer`, `default`, `grab`, `grabbing`, `col-resize`,
160
244
  `row-resize`, `move`, `text`, `not-allowed`), `touchAction` (`none`, `pan-x`,
161
245
  `pan-y`) and `userSelect: "none"` (written with its prefixed companion).
246
+ A `<textarea>` part may also state `resize: "vertical" | "none"`.
162
247
  Removing text selection from text, or touch gestures from an owner that
163
248
  handles no pointer or touch events, is a review note.
164
249
  - Scroll snap belongs to the scrolling element's arrangement:
@@ -263,7 +348,7 @@ text part breaks one way, set by one `wrap` field:
263
348
  keeps it reachable, which analysis cannot see).
264
349
  - `textEdge` trims a text part's box to the edges it names (`["cap",
265
350
  "alphabetic"]`); `textAlign` sets
266
- its alignment. Balanced, pretty and trimmed text degrade to plain wrapping and
351
+ its alignment, on a control's label too. Balanced, pretty and trimmed text degrade to plain wrapping and
267
352
  spacing in a browser without them.
268
353
 
269
354
  <a id="assets"></a>
@@ -37,7 +37,7 @@ cd design && bun install
37
37
  bun run lint:ds
38
38
  ```
39
39
 
40
- Use `--framework preact` for a Preact project (the native Preact starter).
40
+ Use `--framework preact` for a Preact project.
41
41
  Preserve project metadata and lockfiles.
42
42
  ADS's `lint:ds` script runs `ads check .` and `emit:ds` runs `ads emit`. ADS gates
43
43
  do not require Oxlint. Projects can run their chosen linter through their own
@@ -35,6 +35,7 @@ export const scenario = {
35
35
  | `exercises` | Optional: the public behavioral APIs (hooks, controllers, providers) the specimens use. |
36
36
  | `specimens` | What the page shows: a nonempty array literal. |
37
37
  | `states` | Optional: named sets of props. ADS draws one switch; every `render` receives the chosen set. |
38
+ | `controls` | Optional `true`: ADS draws a live control for each closed prop (a union of literals, a boolean) of the first owner in `covers`. Every `render` receives the chosen values as props, over the chosen state's. A specimen takes part by spreading them: `render: (props) => <Button label="Save" {...props} />`. |
38
39
  | `frame` | `"inline"` (default): a page of boxed specimens. `"screen"` or `"phone"`: the first specimen as a whole screen. |
39
40
  | `captureTargets` | Optional: up to 20 elements by CSS selector. |
40
41
  | `id` | Optional: an identity inside the scenario's own folder. |
@@ -97,7 +97,7 @@ export function spatialModel(input, values) {
97
97
  return px;
98
98
  } };
99
99
  }
100
- const regionKeys = ["columns", "gutter", "row-gap", "margin", "bound", "tile", "ratio", "fixed-start", "fixed-end", "context", "rows", "align", "overlay-layer"], trackKeys = ["fixed-start", "fixed-end"], placementKeys = ["start", "span", "end", "overlay", "row", "row-span", "visible"], cellKeys = [...placementKeys, "padding", "ratio", "container"];
100
+ const regionKeys = ["columns", "weights", "gutter", "row-gap", "margin", "bound", "tile", "ratio", "fixed-start", "fixed-end", "context", "rows", "align", "overlay-layer"], trackKeys = ["fixed-start", "fixed-end"], placementKeys = ["start", "span", "end", "overlay", "row", "row-span", "visible"], cellKeys = [...placementKeys, "padding", "ratio", "container"];
101
101
  function declarations(node, allowed) {
102
102
  const result = {}, isAllowed = (prop) => allowed.includes(prop);
103
103
  for (const child of node.nodes ?? [])
@@ -118,13 +118,25 @@ function regionTracks(model, props, point, mode, tracks, fixedTracks) {
118
118
  const count = Number(props.columns ?? point.count), margin = model.length(props.margin ?? point.margin), cap = props.bound === "full" ? 1 / 0 : model.length(!props.bound || props.bound === "system" ? model.maxWidth : props.bound, !0), width = Math.min(point.fromPx, cap) - 2 * margin;
119
119
  if (width <= 0)
120
120
  fail(`Region bounds and margins leave no content width at ${point.name}.`);
121
- if (mode !== "hybrid")
122
- return Array(count).fill(width / count);
121
+ if (mode !== "hybrid") {
122
+ const weights = trackWeights(props, count), total = weights.reduce((sum, weight) => sum + weight, 0);
123
+ return weights.map((weight) => width * weight / total);
124
+ }
123
125
  const fixedLength = (value) => value === void 0 || value === "0" ? 0 : model.length(value, !0), start = fixedLength(tracks.start), end = fixedLength(tracks.end), fluidCount = count - fixedTracks.length;
124
126
  if (fluidCount < 1 || start + end >= width)
125
127
  fail(`Fixed tracks leave no fluid space at ${point.name}.`);
126
128
  return [...tracks.start === void 0 ? [] : [start], ...Array(fluidCount).fill((width - start - end) / fluidCount), ...tracks.end === void 0 ? [] : [end]];
127
129
  }
130
+ function trackWeights(props, count) {
131
+ if (props.weights === void 0)
132
+ return Array(count).fill(1);
133
+ const weights = props.weights.split(/\s+/).map(Number);
134
+ if (props.columns === void 0)
135
+ fail("weights need local columns: declare `columns` on the region.");
136
+ if (weights.length !== count || weights.some((weight) => !Number.isFinite(weight) || weight <= 0 || weight > 100))
137
+ fail(`weights lists one positive number (at most 100) for each of the ${count} columns.`);
138
+ return weights;
139
+ }
128
140
  const fromQuery = (px) => `(width >= ${px / 16}rem)`;
129
141
  export const belowQuery = (px) => `(width < ${px / 16}rem)`;
130
142
  export function expandSpatialStyles(css, model, options) {
@@ -196,6 +208,8 @@ function expand(css, model) {
196
208
  fail("Local column counts are integers from 1 to 64.");
197
209
  if (mode === "inherited" && (props.columns || props.margin || props.bound))
198
210
  fail("Inherited tracks keep their parent's span and bounds.");
211
+ if (props.weights !== void 0 && mode !== "fluid")
212
+ fail("Track weights belong to a fluid region with local columns.");
199
213
  const gutter = props.gutter ?? "wide", edges = gutter === "none" ? null : system.gutters[gutter];
200
214
  if (gutter !== "none" && !edges)
201
215
  fail(`Unknown gutter ${gutter}.`);
@@ -325,7 +339,9 @@ function expand(css, model) {
325
339
  if (mode === "hybrid") {
326
340
  const fluidCount = count - fixedTracks.length;
327
341
  append(rule, "grid-template-columns", [tracks.start === void 0 ? "" : spacing(tracks.start), `repeat(${fluidCount}, minmax(0, 1fr))`, tracks.end === void 0 ? "" : spacing(tracks.end)].filter(Boolean).join(" "));
328
- } else
342
+ } else if (props.weights !== void 0)
343
+ append(rule, "grid-template-columns", trackWeights(props, count).map((weight) => `minmax(0, ${weight}fr)`).join(" "));
344
+ else
329
345
  append(rule, "grid-template-columns", `repeat(${count}, minmax(0, 1fr))`);
330
346
  const bound = props.bound ?? "system", cap = bound === "full" ? null : spacing(bound === "system" ? system.maxWidth : bound);
331
347
  if (!cap)
@@ -1,11 +1,21 @@
1
1
  import { type Result } from "./result.mjs";
2
2
  export declare const STATE_PSEUDO_CLASSES: readonly ["hover", "active", "focus", "focus-visible", "focus-within", "disabled", "enabled", "checked", "indeterminate"];
3
3
  export type StatePseudoClass = (typeof STATE_PSEUDO_CLASSES)[number];
4
+ /** The states of a direct part a condition may read: a native form element's, and the part's own hover. */
5
+ export declare const PART_STATES: readonly ["checked", "indeterminate", "focus-visible", "hover", "disabled"];
6
+ export type PartState = (typeof PART_STATES)[number];
4
7
  /** One state the owner root must (or, negated, must not) be in. */
5
8
  export type StateToken = {
6
9
  readonly kind: "pseudo-class";
7
10
  readonly name: StatePseudoClass;
8
11
  readonly negated: boolean;
12
+ }
13
+ /** A direct part (by its class selector) is in a state: `:has(> .part:state)`. */
14
+ | {
15
+ readonly kind: "part";
16
+ readonly part: string;
17
+ readonly state: PartState;
18
+ readonly negated: boolean;
9
19
  } | {
10
20
  readonly kind: "attribute";
11
21
  readonly name: string;
@@ -46,6 +56,25 @@ export type ConditionProblem =
46
56
  } | {
47
57
  readonly kind: "state-repeated";
48
58
  readonly state: string;
59
+ }
60
+ /** `:has(…)` in another shape than a direct part's class and one part state. */
61
+ | {
62
+ readonly kind: "part-state-unsupported";
63
+ readonly text: string;
64
+ }
65
+ /** `:has(> .class:state)` whose class is no direct part of the recipe. */
66
+ | {
67
+ readonly kind: "part-unknown";
68
+ readonly part: string;
49
69
  };
50
70
  /** Parses one authored condition against the closed grammar. */
51
71
  export declare function parseStateCondition(source: string): Result<StateCondition, ConditionProblem>;
72
+ /**
73
+ * Whether two owner-state conditions can never hold on one root together: one requires a state the
74
+ * other excludes (`[aria-pressed="true"]` and `[aria-pressed="false"]`, `:hover` and
75
+ * `:not(:hover)`, `:disabled` and `:enabled`). False when either is outside the grammar, so an
76
+ * unknown condition is treated as able to meet any other.
77
+ */
78
+ /** The direct parts (class selectors) whose states a condition reads; empty outside the grammar. */
79
+ export declare function conditionParts(condition: string): readonly string[];
80
+ export declare function conditionsExclusive(a: string, b: string): boolean;
@@ -1,10 +1,12 @@
1
1
  import { err, ok } from "./result.mjs";
2
- export const STATE_PSEUDO_CLASSES = ["hover", "active", "focus", "focus-visible", "focus-within", "disabled", "enabled", "checked", "indeterminate"];
2
+ export const STATE_PSEUDO_CLASSES = ["hover", "active", "focus", "focus-visible", "focus-within", "disabled", "enabled", "checked", "indeterminate"], PART_STATES = ["checked", "indeterminate", "focus-visible", "hover", "disabled"];
3
3
  const isPseudoClass = (name) => STATE_PSEUDO_CLASSES.includes(name), STATE_ATTRIBUTE = /^(?:aria-[a-z][a-z0-9-]*|data-[a-z][a-z0-9-]*|open)$/, IDENTIFIER = /^-?[a-z][a-z0-9-]*/i;
4
4
  function stateToken(token, negated) {
5
5
  switch (token.kind) {
6
6
  case "pseudo-class":
7
7
  return { kind: "pseudo-class", name: token.name, negated };
8
+ case "part":
9
+ return { kind: "part", part: token.part, state: token.state, negated };
8
10
  case "attribute":
9
11
  return { kind: "attribute", name: token.name, value: token.value, negated };
10
12
  }
@@ -13,6 +15,12 @@ function simple(source, at) {
13
15
  const rest = source.slice(at);
14
16
  if (rest.startsWith("::"))
15
17
  return err({ kind: "pseudo-element", name: IDENTIFIER.exec(rest.slice(2))?.[0] ?? rest.slice(2) });
18
+ if (rest.startsWith(":has(")) {
19
+ const match = /^:has\(> (\.-?[a-z_][\w-]*):([a-z-]+)\)/i.exec(rest), state = match?.[2]?.toLowerCase();
20
+ if (match?.[1] === void 0 || state === void 0 || !PART_STATES.includes(state))
21
+ return err({ kind: "part-state-unsupported", text: rest.slice(0, rest.indexOf(")") + 1 || rest.length) });
22
+ return ok({ token: { kind: "part", part: match[1], state }, end: at + match[0].length });
23
+ }
16
24
  if (rest.startsWith(":")) {
17
25
  const name = IDENTIFIER.exec(rest.slice(1))?.[0];
18
26
  if (name === void 0)
@@ -36,7 +44,7 @@ function simple(source, at) {
36
44
  return err({ kind: "structure", at, text: rest });
37
45
  }
38
46
  const tokenText = (token) => {
39
- const inner = token.kind === "pseudo-class" ? `:${token.name}` : `[${token.name}${token.value === null ? "" : `="${token.value}"`}]`;
47
+ const inner = token.kind === "pseudo-class" ? `:${token.name}` : token.kind === "part" ? `:has(> ${token.part}:${token.state})` : `[${token.name}${token.value === null ? "" : `="${token.value}"`}]`;
40
48
  return token.negated ? `:not(${inner})` : inner;
41
49
  };
42
50
  export function parseStateCondition(source) {
@@ -65,3 +73,35 @@ export function parseStateCondition(source) {
65
73
  return err({ kind: "state-missing" });
66
74
  return ok({ source, states });
67
75
  }
76
+ const statesExclude = (a, b) => {
77
+ if (a.kind === "pseudo-class" && b.kind === "pseudo-class") {
78
+ if (a.name === b.name)
79
+ return a.negated !== b.negated;
80
+ const pair = [a.name, b.name].sort().join(" ");
81
+ return !a.negated && !b.negated && (pair === "disabled enabled" || pair === "checked indeterminate");
82
+ }
83
+ if (a.kind === "part" && b.kind === "part" && a.part === b.part) {
84
+ if (a.state === b.state)
85
+ return a.negated !== b.negated;
86
+ return !a.negated && !b.negated && [a.state, b.state].sort().join(" ") === "checked indeterminate";
87
+ }
88
+ if (a.kind === "attribute" && b.kind === "attribute" && a.name === b.name) {
89
+ if (!a.negated && !b.negated)
90
+ return a.value !== null && b.value !== null && a.value !== b.value;
91
+ if (a.negated && b.negated)
92
+ return !1;
93
+ const [positive, negative] = a.negated ? [b, a] : [a, b];
94
+ return negative.value === null || negative.value === positive.value;
95
+ }
96
+ return !1;
97
+ };
98
+ export function conditionParts(condition) {
99
+ const parsed = parseStateCondition(condition);
100
+ return parsed.kind === "err" ? [] : parsed.value.states.flatMap((token) => token.kind === "part" ? [token.part] : []);
101
+ }
102
+ export function conditionsExclusive(a, b) {
103
+ const left = parseStateCondition(a), right = parseStateCondition(b);
104
+ if (left.kind === "err" || right.kind === "err")
105
+ return !1;
106
+ return left.value.states.some((x) => right.value.states.some((y) => statesExclude(x, y)));
107
+ }
@@ -2,7 +2,7 @@ import { INACTIVE_STATE, SURFACE_STATE } from "./role-vocabulary.mjs";
2
2
  import { selectedProfile, tokenValueContexts } from "./design-foundation.mjs";
3
3
  import { lengthPx } from "./css-length.mjs";
4
4
  import { resolveTokenValue } from "./token-resolution.mjs";
5
- import { BOLD_WEIGHT, inactiveCondition, LARGE_BOLD_TEXT_PX, LARGE_TEXT_MINIMUM, LARGE_TEXT_PX, paintContrast, reachablePairs, TEXT_MINIMUM } from "./paint-contrast.mjs";
5
+ import { BOLD_WEIGHT, inactiveCondition, LARGE_BOLD_TEXT_PX, LARGE_TEXT_MINIMUM, LARGE_TEXT_PX, NON_TEXT_MINIMUM, paintContrast, reachablePairs, TEXT_MINIMUM } from "./paint-contrast.mjs";
6
6
  import { err, ok } from "./result.mjs";
7
7
  const PAINT_FIELDS = ["color", "background", "background-image", "opacity"], paintsOf = (fields) => ({
8
8
  foreground: fields.color ?? null,
@@ -28,7 +28,7 @@ export function surfaceContrastFindings(foundation) {
28
28
  }
29
29
  const contexts = tokenValueContexts(foundation), findings = [];
30
30
  for (const { paints, profiles } of groups.values()) {
31
- const [profile = "", ...shared] = profiles, composed = foundation.model.compose(profile), file = composed.kind === "ok" ? composed.value.file ?? null : null, failing = [], unprovable = [];
31
+ const [profile = "", ...shared] = profiles, composed = foundation.model.compose(profile), file = composed.kind === "ok" ? composed.value.file ?? null : null, failing = [], unprovable = [], placed = [];
32
32
  let first = null, reason = null;
33
33
  for (const context of contexts) {
34
34
  const outcome = paintContrast(context, paints, TEXT_MINIMUM);
@@ -40,8 +40,12 @@ export function surfaceContrastFindings(foundation) {
40
40
  first ??= outcome;
41
41
  break;
42
42
  case "unresolved":
43
- unprovable.push(context.label);
44
- reason ??= outcome.unresolved;
43
+ if (outcome.unresolved.kind === "background-transparent")
44
+ placed.push(context.label);
45
+ else {
46
+ unprovable.push(context.label);
47
+ reason ??= outcome.unresolved;
48
+ }
45
49
  break;
46
50
  }
47
51
  }
@@ -50,6 +54,8 @@ export function surfaceContrastFindings(foundation) {
50
54
  findings.push({ kind: "surface-contrast", ...located, contexts: failing, foreground: first.foreground, background: first.background, ratio: first.ratio, minimum: first.minimum });
51
55
  if (reason !== null)
52
56
  findings.push({ kind: "surface-contrast-unresolved", ...located, contexts: unprovable, unresolved: reason });
57
+ if (placed.length > 0)
58
+ findings.push({ kind: "surface-contrast-placed", ...located, contexts: placed });
53
59
  }
54
60
  return findings;
55
61
  }
@@ -61,6 +67,8 @@ export function describeUnresolved(unresolved) {
61
67
  return `${unresolved.paint === "background" ? "background" : "colour"} ${unresolved.value}: ${unresolved.reason}`;
62
68
  case "background-translucent":
63
69
  return `background ${unresolved.value} is translucent; what shows through is unknown`;
70
+ case "background-transparent":
71
+ return `background ${unresolved.value} is transparent; what is behind it is decided where it is placed`;
64
72
  case "opacity":
65
73
  return `opacity ${unresolved.value} lets what is behind the element show through`;
66
74
  case "background-image":
@@ -72,10 +80,56 @@ export function describeSurfaceContrast(finding) {
72
80
  switch (finding.kind) {
73
81
  case "surface-contrast":
74
82
  return `Surface profile ${finding.profile}${alsoNamed(finding.shared)} paints color ${finding.paints.foreground ?? ""} (${finding.foreground}) on background ${finding.paints.background ?? ""} (${finding.background}) at ${finding.ratio}:1 under ${contextList(finding.contexts)}; text needs ${finding.minimum}:1 (WCAG 2.2 1.4.3).`;
83
+ case "surface-contrast-placed":
84
+ return `Surface profile ${finding.profile}${alsoNamed(finding.shared)} has a fully transparent background (${finding.paints.background ?? ""}) under ${contextList(finding.contexts)}: its text contrast depends on what it is placed on, which the cross-owner check and the render audit read.`;
75
85
  case "surface-contrast-unresolved":
76
86
  return `The text contrast of surface profile ${finding.profile}${alsoNamed(finding.shared)} cannot be proven under ${contextList(finding.contexts)}: ${describeUnresolved(finding.unresolved)}.`;
77
87
  }
78
88
  }
89
+ export function useMinimum(use, context) {
90
+ switch (use.content) {
91
+ case "text":
92
+ return textMinimum(use.text, context);
93
+ case "graphic":
94
+ return NON_TEXT_MINIMUM;
95
+ case "decorative":
96
+ return 0;
97
+ }
98
+ }
99
+ const profileName = (reference) => /^[^(\s]+/.exec(reference.trim())?.[0] ?? reference;
100
+ function mentions(value, profile) {
101
+ if (typeof value === "string")
102
+ return profileName(value) === profile ? 1 : 0;
103
+ if (Array.isArray(value))
104
+ return value.reduce((sum, item) => sum + mentions(item, profile), 0);
105
+ if (value !== null && typeof value === "object")
106
+ return Object.values(value).reduce((sum, item) => sum + mentions(item, profile), 0);
107
+ return 0;
108
+ }
109
+ export function surfaceUses(foundation, spec, read, content) {
110
+ const selections = surfacedElements(foundation, spec).flatMap((element) => [element.surface, ...element.when.map(([, name]) => name)].flatMap((name) => name === null ? [] : [{ name: profileName(name), element }])), uses = [];
111
+ for (const name of new Set(read.map((use) => use.name))) {
112
+ const selected = selectedProfile(foundation, name);
113
+ if (selected.kind === "err" || selected.value.kind !== "surface")
114
+ continue;
115
+ const own = selections.filter((selection) => selection.name === name);
116
+ if (own.length === 0 || mentions(spec.source, name) !== own.length) {
117
+ uses.push({ surface: name, content: "text", text: null });
118
+ continue;
119
+ }
120
+ for (const { element } of own)
121
+ uses.push({ surface: name, content: content(element), text: element.text });
122
+ }
123
+ return uses;
124
+ }
125
+ export function sufficientForUses(foundation, paints, uses) {
126
+ if (uses.length === 0)
127
+ return !1;
128
+ return tokenValueContexts(foundation).every((context) => {
129
+ const minimum = Math.max(...uses.map((use) => useMinimum(use, context)));
130
+ return minimum === 0 || paintContrast(context, paints, minimum).kind !== "insufficient";
131
+ });
132
+ }
79
133
  function textProfile(foundation, reference) {
80
134
  if (reference === void 0)
81
135
  return null;
@@ -120,20 +174,21 @@ export function textMinimum(text, context) {
120
174
  function regionElements(foundation, parts, slots, enclosing) {
121
175
  return parts.flatMap((part) => {
122
176
  const text = (part.text !== null ? boundText(foundation, part.text, slots) : part.content.kind === "text" ? textProfile(foundation, slots["text-profile"]) : null) ?? enclosing;
123
- return [{ element: part.name, surface: part.surface, when: part.when, text }, ...regionElements(foundation, part.parts, slots, text)];
177
+ return [{ element: part.name, surface: part.surface, when: part.when, text, visual: part.content.kind === "visual" && part.parts.length === 0 }, ...regionElements(foundation, part.parts, slots, text)];
124
178
  });
125
179
  }
126
180
  export function surfacedElements(foundation, spec) {
127
181
  switch (spec.kind) {
128
182
  case "control": {
129
183
  const slots = slotsOf(foundation, spec.profile, spec.select);
130
- return [{ element: "&", surface: spec.surface, when: spec.when, text: textProfile(foundation, slots["text-profile"]) }];
184
+ return [{ element: "&", surface: spec.surface, when: spec.when, text: textProfile(foundation, spec.text ?? slots["text-profile"]), visual: !1 }];
131
185
  }
132
186
  case "region": {
133
187
  const slots = slotsOf(foundation, spec.profile, spec.select), text = boundText(foundation, spec.text, slots);
134
- return [{ element: "&", surface: spec.surface, when: spec.when, text }, ...regionElements(foundation, spec.parts, slots, text)];
188
+ return [{ element: "&", surface: spec.surface, when: spec.when, text, visual: !1 }, ...regionElements(foundation, spec.parts, slots, text)];
135
189
  }
136
190
  case "artwork":
191
+ return spec.surface === null ? [] : [{ element: "&", surface: spec.surface, when: [], text: null, visual: !0 }];
137
192
  case "grid":
138
193
  return [];
139
194
  }
@@ -154,12 +209,16 @@ export function inactiveSurfaceActive(foundation, spec) {
154
209
  }
155
210
  return null;
156
211
  }
157
- export function stateContrast(foundation, spec) {
212
+ export function stateContrast(foundation, spec, content = () => "text") {
158
213
  const unresolved = [];
159
214
  let contexts = null;
160
- for (const { element, surface, when, text } of surfacedElements(foundation, spec)) {
215
+ for (const surfaced of surfacedElements(foundation, spec)) {
216
+ const { element, surface, when, text } = surfaced;
161
217
  if (when.length === 0 || surface === null)
162
218
  continue;
219
+ const painted = content(surfaced);
220
+ if (painted === "decorative")
221
+ continue;
163
222
  const sourced = [{ condition: null, surface }, ...when.map(([condition, name]) => ({ condition, surface: name }))].flatMap(({ condition, surface: name }) => {
164
223
  const selected = selectedProfile(foundation, name);
165
224
  if (selected.kind === "err" || selected.value.kind !== "surface")
@@ -175,7 +234,7 @@ export function stateContrast(foundation, spec) {
175
234
  let noted = !1;
176
235
  contexts ??= tokenValueContexts(foundation);
177
236
  for (const context of contexts) {
178
- const outcome = paintContrast(context, paints, textMinimum(text, context));
237
+ const outcome = paintContrast(context, paints, painted === "graphic" ? NON_TEXT_MINIMUM : textMinimum(text, context));
179
238
  switch (outcome.kind) {
180
239
  case "sufficient":
181
240
  break;