@reqvire-org/ads 0.4.6 → 0.5.0
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.
- package/README.md +265 -420
- package/dist/accessibility-declarations.mjs +43 -0
- package/dist/active-clock.d.mts +30 -0
- package/dist/active-clock.mjs +26 -17
- package/dist/ads-errors.mjs +3421 -0
- package/dist/ads-view-choices.mjs +17 -0
- package/dist/ads-views.mjs +12 -0
- package/dist/analysis/captured-content.mjs +16 -0
- package/dist/analysis/compiler-options.mjs +3 -7
- package/dist/analysis/context.mjs +14 -20
- package/dist/analysis/controller-gates.mjs +119 -0
- package/dist/analysis/design-usage.mjs +126 -0
- package/dist/analysis/file-tree.mjs +44 -29
- package/dist/analysis/framework-imports.mjs +62 -0
- package/dist/analysis/glyph-macros.mjs +103 -0
- package/dist/analysis/helpers.mjs +119 -91
- package/dist/analysis/impact.mjs +25 -12
- package/dist/analysis/inputs.mjs +19 -13
- package/dist/analysis/mock-check.mjs +98 -0
- package/dist/analysis/module-graph.mjs +156 -0
- package/dist/analysis/module-resolvers.mjs +30 -28
- package/dist/analysis/native-adapter.mjs +139 -146
- package/dist/analysis/native-boundary.mjs +52 -0
- package/dist/analysis/native-project.mjs +331 -231
- package/dist/analysis/native-session.mjs +20 -0
- package/dist/analysis/owner-accessibility.mjs +74 -0
- package/dist/analysis/owner-analysis-cache.mjs +125 -0
- package/dist/analysis/owner-analysis-key.mjs +114 -0
- package/dist/analysis/owner-choices.mjs +763 -0
- package/dist/analysis/owner-composition.mjs +612 -0
- package/dist/analysis/owner-discovery.mjs +164 -0
- package/dist/analysis/owner-failures.mjs +19 -0
- package/dist/analysis/owner-outcomes.mjs +42 -0
- package/dist/analysis/owner-reuse.mjs +100 -0
- package/dist/analysis/owner-source.mjs +1506 -0
- package/dist/analysis/public-imports.mjs +31 -0
- package/dist/analysis/queries.mjs +72 -54
- package/dist/analysis/runtime-setters.mjs +114 -0
- package/dist/analysis/scenario-keys.mjs +151 -0
- package/dist/analysis/service.mjs +111 -70
- package/dist/analysis/standalone.mjs +40 -37
- package/dist/analysis/styling-ownership.mjs +276 -0
- package/dist/analysis/svg-attributes.mjs +199 -0
- package/dist/analysis/syntax.mjs +82 -78
- package/dist/analysis/visual-bindings.mjs +68 -0
- package/dist/analysis/worker-protocol.mjs +302 -0
- package/dist/analysis/worker.mjs +234 -166
- package/dist/api-signature.mjs +53 -0
- package/dist/app-icon-checks.mjs +298 -0
- package/dist/app-icon-declaration.d.mts +53 -0
- package/dist/app-icon-declaration.mjs +66 -0
- package/dist/asset-binding.mjs +35 -0
- package/dist/asset-catalog.mjs +83 -0
- package/dist/asset-declaration.d.mts +42 -0
- package/dist/asset-declaration.mjs +108 -0
- package/dist/asset-macro.d.mts +63 -0
- package/dist/asset-macro.mjs +22 -0
- package/dist/asset-model.mjs +74 -0
- package/dist/asset-usage.mjs +14 -0
- package/dist/asset-view-facts.mjs +41 -0
- package/dist/authoring-macro.d.mts +11 -0
- package/dist/authoring-macro.mjs +21 -0
- package/dist/autocomplete-hints.mjs +31 -0
- package/dist/availability.mjs +9 -0
- package/dist/behavior-macro.d.mts +31 -0
- package/dist/behavior-macro.mjs +3 -0
- package/dist/behavior-registry.mjs +358 -0
- package/dist/boundaries.mjs +50 -212
- package/dist/browser-runtime.mjs +73 -0
- package/dist/browser-test.d.mts +3 -0
- package/dist/browser-test.mjs +2 -0
- package/dist/bun-bundler.mjs +10 -0
- package/dist/bun-compiler.mjs +30 -18
- package/dist/bun-runtime.mjs +4 -0
- package/dist/bun-worker.mjs +10 -4
- package/dist/capture/request.mjs +81 -0
- package/dist/capture/worker.mjs +69 -40
- package/dist/capture/worker.page.mjs +6 -0
- package/dist/capture-store.mjs +159 -75
- package/dist/capture.mjs +232 -95
- package/dist/check-service.mjs +27 -33
- package/dist/check.mjs +200 -904
- package/dist/cli-arguments.mjs +278 -0
- package/dist/cli.mjs +374 -304
- package/dist/color-values.mjs +294 -242
- package/dist/composed-contrast.mjs +628 -0
- package/dist/config.mjs +162 -454
- package/dist/construction-output.mjs +217 -0
- package/dist/construction-spec.d.mts +712 -0
- package/dist/construction-spec.mjs +937 -0
- package/dist/css-length.mjs +80 -0
- package/dist/css-quantity.mjs +173 -0
- package/dist/deletion-model.mjs +56 -0
- package/dist/deletion-plan.mjs +364 -0
- package/dist/dependency-manifest.mjs +56 -0
- package/dist/design-context-model.d.mts +61 -0
- package/dist/design-context-model.mjs +79 -0
- package/dist/design-contexts.mjs +105 -0
- package/dist/design-foundation.mjs +527 -0
- package/dist/design-inputs.mjs +156 -0
- package/dist/design-modules.mjs +27 -0
- package/dist/design-rejection.d.mts +23 -0
- package/dist/design-rejection.mjs +29 -0
- package/dist/design-system-closure.mjs +108 -0
- package/dist/design-usage.mjs +48 -0
- package/dist/development-modules.mjs +2 -0
- package/dist/development-runtime.mjs +0 -7
- package/dist/digest.mjs +2 -0
- package/dist/draft-boundary.mjs +1 -27
- package/dist/draft-workspace.mjs +11 -5
- package/dist/emit/accept.mjs +33 -0
- package/dist/emit/app-icon-emission.mjs +124 -0
- package/dist/emit/app-icon-render.mjs +126 -0
- package/dist/emit/asset-imports.mjs +18 -0
- package/dist/emit/cli-report.mjs +97 -0
- package/dist/emit/contract.mjs +136 -0
- package/dist/emit/emission.mjs +175 -0
- package/dist/emit/font-emission.mjs +91 -0
- package/dist/emit/foundation-sheet.mjs +55 -0
- package/dist/emit/icon-containers.mjs +46 -0
- package/dist/emit/integrity.mjs +61 -0
- package/dist/emit/lock.mjs +66 -0
- package/dist/emit/namespace.mjs +79 -0
- package/dist/emit/operation-reply.mjs +3 -0
- package/dist/emit/operation.mjs +36 -0
- package/dist/emit/output-location.mjs +20 -0
- package/dist/emit/output-package.mjs +7 -0
- package/dist/emit/owner-emission-cache.mjs +52 -0
- package/dist/emit/palette-module.mjs +19 -0
- package/dist/emit/palette-refresh.mjs +77 -0
- package/dist/emit/preview-emitter.mjs +110 -0
- package/dist/emit/preview-tree.mjs +174 -0
- package/dist/emit/scheduler.mjs +75 -0
- package/dist/emit/service.mjs +249 -0
- package/dist/emit/sync.mjs +38 -0
- package/dist/emit/watch.mjs +74 -0
- package/dist/emit/writer.mjs +102 -0
- package/dist/evidence.mjs +6 -8
- package/dist/example-babel.mjs +7 -0
- package/dist/example-literals.mjs +88 -0
- package/dist/finding-rules.mjs +71 -77
- package/dist/focus-checks.mjs +93 -0
- package/dist/font-checks.mjs +143 -0
- package/dist/font-declaration.d.mts +54 -0
- package/dist/font-declaration.mjs +77 -0
- package/dist/font-macro.d.mts +32 -0
- package/dist/font-macro.mjs +6 -0
- package/dist/font-model.mjs +37 -0
- package/dist/form-states.mjs +82 -0
- package/dist/foundation-macro.d.mts +108 -0
- package/dist/foundation-macro.mjs +6 -0
- package/dist/frame-regions.mjs +190 -0
- package/dist/glyph-set-declaration.d.mts +27 -0
- package/dist/glyph-set-declaration.mjs +36 -0
- package/dist/grid-checks.mjs +94 -0
- package/dist/grid-facts.mjs +92 -0
- package/dist/grid-lowering.mjs +257 -0
- package/dist/guard/cli.mjs +51 -0
- package/dist/guard/config.mjs +67 -0
- package/dist/guard/files.mjs +31 -0
- package/dist/guard/index.mjs +3 -0
- package/dist/guard/run.mjs +56 -0
- package/dist/guard/tsconfig.declarations.json +13 -0
- package/dist/index.mjs +2 -7
- package/dist/init-project.mjs +134 -0
- package/dist/init.mjs +225 -261
- package/dist/input-digests.mjs +216 -0
- package/dist/input-scope.mjs +18 -41
- package/dist/inspected-svg.d.mts +28 -0
- package/dist/inspected-svg.mjs +40 -0
- package/dist/inventories.mjs +149 -0
- package/dist/inventory-query.mjs +15 -0
- package/dist/investigations.mjs +177 -99
- package/dist/json.d.mts +10 -0
- package/dist/json.mjs +36 -0
- package/dist/linaria/atomic-processor.json +96 -0
- package/dist/linaria/atomic-processor.mjs +2452 -0
- package/dist/linaria/backend-identity.mjs +26 -0
- package/dist/linaria/compatibility.json +61 -0
- package/dist/linaria/css-shape.mjs +94 -0
- package/dist/linaria/custom-property-css.mjs +56 -0
- package/dist/linaria/delivery.mjs +111 -0
- package/dist/linaria/direct-extract.mjs +43 -0
- package/dist/linaria/extraction-cache.mjs +31 -0
- package/dist/linaria/extraction-model.mjs +5 -0
- package/dist/linaria/fingerprint.mjs +183 -0
- package/dist/linaria/pair-manifest.json +2315 -0
- package/dist/linaria/persisted-extraction-cache.mjs +352 -0
- package/dist/linaria/preservation.mjs +13 -0
- package/dist/linaria/priority-emitted-rank.mjs +40 -0
- package/dist/linaria/priority-manifest.mjs +87 -0
- package/dist/linaria/priority-table.mjs +47 -0
- package/dist/linaria/priority-tiers.mjs +27 -0
- package/dist/linaria/processor-host.mjs +42 -0
- package/dist/linaria/processor-runtime.mjs +36 -0
- package/dist/linaria-processor-NOTICES.md +147 -0
- package/dist/lowering-components.mjs +14 -0
- package/dist/lowering-effects.mjs +38 -0
- package/dist/lowering-emitter.mjs +29 -0
- package/dist/lowering-hidden.mjs +30 -0
- package/dist/lowering-layer.mjs +141 -0
- package/dist/lowering-motion.mjs +37 -0
- package/dist/lowering-normalize.mjs +194 -0
- package/dist/lowering-overlaps.mjs +328 -0
- package/dist/lowering-paint.mjs +32 -0
- package/dist/lowering-properties.mjs +144 -0
- package/dist/lowering-region-layout.mjs +191 -0
- package/dist/lowering-serialize.mjs +40 -0
- package/dist/lowering-session.mjs +130 -0
- package/dist/lowering-tiers.mjs +23 -0
- package/dist/lowering-transitions.mjs +39 -0
- package/dist/mcp/ads-mcp.mjs +423 -0
- package/dist/mcp/apps.mjs +3 -25
- package/dist/mcp/behavior-pages.mjs +58 -51
- package/dist/mcp/build-status.mjs +242 -254
- package/dist/mcp/catalog.mjs +21 -128
- package/dist/mcp/compiler-channel.mjs +280 -0
- package/dist/mcp/context.mjs +50 -40
- package/dist/mcp/deletions.mjs +147 -0
- package/dist/mcp/draft-discovery.mjs +43 -38
- package/dist/mcp/drafts.mjs +654 -755
- package/dist/mcp/execution-context.mjs +33 -22
- package/dist/mcp/execution-coordinator.mjs +367 -354
- package/dist/mcp/execution-results.mjs +440 -173
- package/dist/mcp/mutation-limits.mjs +1 -2
- package/dist/mcp/mutations.mjs +515 -553
- package/dist/mcp/patch.mjs +117 -75
- package/dist/mcp/preview-http.bundle.js +3 -7
- package/dist/mcp/preview-http.mjs +220 -107
- package/dist/mcp/preview-owner-guard.mjs +81 -43
- package/dist/mcp/preview-watch.mjs +492 -353
- package/dist/mcp/preview-widget.bundle.js +42 -46
- package/dist/mcp/preview-work.mjs +25 -13
- package/dist/mcp/prompts.mjs +22 -16
- package/dist/mcp/resource-loader.js +1 -1
- package/dist/mcp/result-pages.mjs +94 -54
- package/dist/mcp/sandbox-host.mjs +41 -19
- package/dist/mcp/server-discovery.mjs +96 -0
- package/dist/mcp/server-guides.mjs +43 -0
- package/dist/mcp/server-host.mjs +203 -0
- package/dist/mcp/server-observation.mjs +225 -0
- package/dist/mcp/server-project.mjs +371 -0
- package/dist/mcp/server-resources.mjs +466 -0
- package/dist/mcp/server-shared.mjs +79 -0
- package/dist/mcp/server-tools.mjs +791 -0
- package/dist/mcp/server.mjs +2 -2794
- package/dist/mcp/showcase-host.mjs +209 -135
- package/dist/mcp/showcase-http.mjs +50 -28
- package/dist/mcp/skills.mjs +32 -36
- package/dist/mcp/text-diff.mjs +18 -36
- package/dist/measured-geometry.mjs +157 -0
- package/dist/motion-model.mjs +50 -0
- package/dist/non-text-contrast.mjs +118 -0
- package/dist/owner-analysis-check.mjs +651 -0
- package/dist/owner-design.mjs +15 -0
- package/dist/owner-errors.mjs +200 -0
- package/dist/owner-lowering.mjs +186 -0
- package/dist/owner-scenarios.mjs +832 -0
- package/dist/ownership-model.d.mts +6 -0
- package/dist/ownership-model.mjs +124 -0
- package/dist/package-declarations.mjs +34 -0
- package/dist/paint-contrast.mjs +181 -0
- package/dist/palette-generated.mjs +101 -116
- package/dist/pictogram-model.mjs +13 -51
- package/dist/placeholder-contrast.mjs +34 -0
- package/dist/platform-features.mjs +377 -0
- package/dist/press-scale.mjs +26 -0
- package/dist/preview-bun.mjs +335 -406
- package/dist/preview-compile-inputs.mjs +78 -0
- package/dist/preview-contexts.mjs +7 -0
- package/dist/preview-failure.mjs +20 -10
- package/dist/preview-files.mjs +18 -36
- package/dist/preview-imports.mjs +76 -70
- package/dist/preview-incremental.mjs +322 -222
- package/dist/preview-inputs.mjs +28 -19
- package/dist/preview-manifest-update.mjs +67 -49
- package/dist/preview-requests.mjs +10 -17
- package/dist/preview-resources.mjs +275 -323
- package/dist/preview-scope.mjs +15 -17
- package/dist/preview-source.mjs +182 -0
- package/dist/preview-spatial.mjs +27 -0
- package/dist/profile-macro.d.mts +41 -0
- package/dist/profile-macro.mjs +6 -0
- package/dist/profile-model.d.mts +65 -0
- package/dist/profile-model.mjs +213 -0
- package/dist/profile-view-facts.mjs +42 -0
- package/dist/program-cache.mjs +9 -7
- package/dist/project-boundary.mjs +8 -13
- package/dist/project-documents.mjs +25 -29
- package/dist/property-registrations.mjs +44 -35
- package/dist/public-catalog.mjs +76 -0
- package/dist/recipe-defaults.mjs +117 -0
- package/dist/recipe-macro.d.mts +400 -0
- package/dist/recipe-macro.mjs +23 -0
- package/dist/recipe-model.d.mts +26 -0
- package/dist/recipe-model.mjs +190 -0
- package/dist/region-lowering.mjs +523 -0
- package/dist/registration-css.mjs +41 -0
- package/dist/registration-roles.mjs +35 -0
- package/dist/render-audit/axe-run.page.mjs +28 -0
- package/dist/render-audit/first-render.page.mjs +35 -0
- package/dist/render-audit/image-shape.page.mjs +42 -0
- package/dist/render-audit/layout-overflow.page.mjs +240 -0
- package/dist/render-audit/layout-shift.page.mjs +36 -0
- package/dist/render-audit/non-text-contrast.page.mjs +138 -0
- package/dist/render-audit/render-states.mjs +66 -293
- package/dist/render-audit/render-states.page.mjs +177 -0
- package/dist/render-audit/text-scale.mjs +42 -0
- package/dist/render-audit/text-scale.page.mjs +25 -0
- package/dist/render-audit/worker.mjs +125 -112
- package/dist/render-audit/worker.page.mjs +21 -0
- package/dist/render-audit.mjs +465 -500
- package/dist/resource-limits.mjs +185 -212
- package/dist/result.d.mts +34 -0
- package/dist/result.mjs +60 -0
- package/dist/role-vocabulary.d.mts +224 -0
- package/dist/role-vocabulary.mjs +223 -0
- package/dist/runtime-paint-contrast.mjs +97 -0
- package/dist/runtime-paint.mjs +42 -0
- package/dist/runtime-requirements.mjs +10 -11
- package/dist/runtime-style.mjs +21 -0
- package/dist/scenario-groups.mjs +42 -33
- package/dist/scenario-inspector.mjs +4 -4
- package/dist/scenario-kit.d.mts +79 -0
- package/dist/scenario-kit.mjs +18 -0
- package/dist/scenario-registry-model.mjs +2 -0
- package/dist/scenario-registry.mjs +89 -108
- package/dist/scenarios-compiler.mjs +901 -642
- package/dist/showcase/ads-views.mjs +103 -0
- package/dist/showcase/assets-view.mjs +221 -0
- package/dist/showcase/client.bundle.js +222 -59
- package/dist/showcase/guide-controls.d.mts +28 -0
- package/dist/showcase/guide-controls.mjs +31 -0
- package/dist/showcase/http-client.bundle.js +172 -9
- package/dist/showcase/index.html +1 -1
- package/dist/showcase/preview-frame.css +16 -0
- package/dist/showcase/preview-frame.d.mts +5 -0
- package/dist/showcase/preview-frame.mjs +4 -0
- package/dist/showcase/preview-root.d.mts +2 -0
- package/dist/showcase/preview-root.mjs +9 -0
- package/dist/showcase/profiles-view.mjs +280 -0
- package/dist/showcase/project-rules.mjs +9 -0
- package/dist/showcase/sandbox.bundle.js +1 -1
- package/dist/showcase/scenario-page.d.mts +39 -0
- package/dist/showcase/scenario-page.mjs +90 -0
- package/dist/showcase/style.css +2 -0
- package/dist/showcase/token-sample.mjs +46 -0
- package/dist/showcase/tokens-view.mjs +185 -0
- package/dist/showcase/ui/apple-touch-icon-9zwv3w79.png +0 -0
- package/dist/showcase/{favicon.ico → ui/favicon-c2c9kvtf.ico} +0 -0
- package/dist/showcase/ui/icon-192-t5zh7mxx.png +0 -0
- package/dist/showcase/ui/icon-512-ed6yz0n0.png +0 -0
- package/dist/showcase/ui/ui.css +1 -1353
- package/dist/showcase/ui/ui.js +165 -1064
- package/dist/showcase-http-routes.mjs +28 -21
- package/dist/skills/README.md +26 -26
- package/dist/skills/ads-designer/README.md +1 -1
- package/dist/skills/ads-designer/SKILL.md +311 -550
- package/dist/skills/ads-designer/references/accessibility.md +162 -114
- package/dist/skills/ads-designer/references/atomic-styles.md +61 -273
- package/dist/skills/ads-designer/references/behaviors.md +144 -278
- package/dist/skills/ads-designer/references/branding.md +132 -222
- package/dist/skills/ads-designer/references/captures.md +13 -7
- package/dist/skills/ads-designer/references/cli.md +80 -63
- package/dist/skills/ads-designer/references/contracts.md +218 -286
- package/dist/skills/ads-designer/references/design-craft.md +1 -1
- package/dist/skills/ads-designer/references/design-data.md +299 -323
- package/dist/skills/ads-designer/references/drafts.md +83 -22
- package/dist/skills/ads-designer/references/evidence.md +2 -1
- package/dist/skills/ads-designer/references/forms.md +199 -0
- package/dist/skills/ads-designer/references/guarded-editing.md +37 -48
- package/dist/skills/ads-designer/references/layers.md +64 -76
- package/dist/skills/ads-designer/references/layout.md +185 -330
- package/dist/skills/ads-designer/references/mobile.md +2 -2
- package/dist/skills/ads-designer/references/motion.md +30 -25
- package/dist/skills/ads-designer/references/performance.md +48 -49
- package/dist/skills/ads-designer/references/pictograms.md +62 -127
- package/dist/skills/ads-designer/references/recipes.md +307 -0
- package/dist/skills/ads-designer/references/review.md +51 -95
- package/dist/skills/ads-designer/references/runtimes.md +34 -33
- package/dist/skills/ads-designer/references/scenarios.md +255 -216
- package/dist/skills/ads-designer/references/stress-test.md +13 -5
- package/dist/skills/ads-designer/references/validation.md +28 -21
- package/dist/skills/ads-designer/references/workflows.md +7 -5
- package/dist/skills/ads-import/SKILL.md +29 -29
- package/dist/skills/ads-import/references/atomic-styles.md +61 -273
- package/dist/skills/ads-import/references/behaviors.md +144 -278
- package/dist/skills/ads-import/references/branding.md +24 -41
- package/dist/skills/ads-import/references/captures.md +13 -7
- package/dist/skills/ads-import/references/cli.md +80 -63
- package/dist/skills/ads-import/references/compatibility.md +3 -3
- package/dist/skills/ads-import/references/contracts.md +218 -286
- package/dist/skills/ads-import/references/design-data.md +299 -323
- package/dist/skills/ads-import/references/drafts.md +83 -22
- package/dist/skills/ads-import/references/evidence.md +2 -1
- package/dist/skills/ads-import/references/forms.md +199 -0
- package/dist/skills/ads-import/references/guarded-editing.md +37 -48
- package/dist/skills/ads-import/references/implementation.md +20 -20
- package/dist/skills/ads-import/references/layers.md +64 -76
- package/dist/skills/ads-import/references/layout.md +185 -330
- package/dist/skills/ads-import/references/recipes.md +307 -0
- package/dist/skills/ads-import/references/review.md +51 -95
- package/dist/skills/ads-import/references/runtimes.md +34 -33
- package/dist/skills/ads-import/references/scenarios.md +255 -216
- package/dist/skills/ads-import/references/tokens.md +26 -17
- package/dist/skills/ads-import/references/validation.md +28 -21
- package/dist/skills/ads-import/references/workflows.md +7 -5
- package/dist/skills/ads-migrate/SKILL.md +20 -5
- package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +6 -0
- package/dist/skills/ads-migrate/references/0.4.6-to-0.4.7.md +46 -0
- package/dist/skills/ads-migrate/references/0.4.7-to-0.5.0-boundary.md +71 -0
- package/dist/skills/ads-migrate/references/0.4.7-to-0.5.0-grid.md +204 -0
- package/dist/skills/ads-migrate/references/0.4.7-to-0.5.0.md +727 -0
- package/dist/skills/ads-port/SKILL.md +27 -28
- package/dist/skills/ads-port/references/atomic-styles.md +61 -273
- package/dist/skills/ads-port/references/behaviors.md +144 -278
- package/dist/skills/ads-port/references/captures.md +13 -7
- package/dist/skills/ads-port/references/cli.md +80 -63
- package/dist/skills/ads-port/references/contracts.md +218 -286
- package/dist/skills/ads-port/references/design-data.md +299 -323
- package/dist/skills/ads-port/references/drafts.md +83 -22
- package/dist/skills/ads-port/references/evidence.md +2 -1
- package/dist/skills/ads-port/references/forms.md +199 -0
- package/dist/skills/ads-port/references/guarded-editing.md +37 -48
- package/dist/skills/ads-port/references/layers.md +64 -76
- package/dist/skills/ads-port/references/layout.md +185 -330
- package/dist/skills/ads-port/references/lint-and-docs.md +2 -3
- package/dist/skills/ads-port/references/native-implementation.md +23 -33
- package/dist/skills/ads-port/references/recipes.md +307 -0
- package/dist/skills/ads-port/references/review.md +51 -95
- package/dist/skills/ads-port/references/runtimes.md +34 -33
- package/dist/skills/ads-port/references/scenarios.md +255 -216
- package/dist/skills/ads-port/references/validation.md +28 -21
- package/dist/skills/ads-port/references/workflows.md +7 -5
- package/dist/source-inventory.mjs +33 -0
- package/dist/source-values.mjs +272 -262
- package/dist/spatial-css.mjs +403 -0
- package/dist/spatial-metadata.mjs +11 -11
- package/dist/spatial-model.mjs +422 -0
- package/dist/spatial-reading.mjs +127 -0
- package/dist/stage-timing.mjs +27 -0
- package/dist/starter-files.mjs +155 -0
- package/dist/starter-overlay.mjs +189 -0
- package/dist/starters/preact/design-system/assets/avatars/avatar.ads.ts +10 -0
- package/dist/starters/preact/design-system/assets/avatars/member.svg +1 -0
- package/dist/starters/preact/design-system/assets/brand/emblem.ads.ts +18 -0
- package/dist/starters/preact/design-system/assets/brand/emblem.svg +4 -0
- package/dist/starters/preact/design-system/assets/brand/iris-emblem.ads.ts +14 -0
- package/dist/starters/preact/design-system/assets/brand/iris-emblem.svg +4 -0
- package/dist/starters/preact/design-system/assets/brand/mark.ads.ts +14 -0
- package/dist/starters/preact/design-system/assets/brand/mark.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/arrow.ads.ts +14 -0
- package/dist/starters/preact/design-system/assets/glyphs/arrow.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/chevron-20.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/chevron-24.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/chevron.ads.ts +20 -0
- package/dist/starters/preact/design-system/assets/glyphs/close.ads.ts +13 -0
- package/dist/starters/preact/design-system/assets/glyphs/close.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/favorite.ads.ts +23 -0
- package/dist/starters/preact/design-system/assets/glyphs/favorite.normal.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/favorite.selected.svg +1 -0
- package/dist/starters/preact/design-system/assets/glyphs/search.ads.ts +10 -0
- package/dist/starters/preact/design-system/assets/glyphs/search.svg +1 -0
- package/dist/starters/preact/design-system/assets/illustrations/journey.ads.ts +32 -0
- package/dist/starters/preact/design-system/assets/illustrations/journey.contrast.svg +6 -0
- package/dist/starters/preact/design-system/assets/illustrations/journey.dark.svg +13 -0
- package/dist/starters/preact/design-system/assets/illustrations/journey.light.svg +13 -0
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.ads.ts +17 -0
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.dark.svg +10 -0
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.light.svg +10 -0
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.ads.ts +15 -0
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.dark.svg +9 -0
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.light.svg +9 -0
- package/dist/starters/preact/design-system/assets/status/error.svg +1 -0
- package/dist/starters/preact/design-system/assets/status/outcomes.ads.ts +31 -0
- package/dist/starters/preact/design-system/assets/status/status.ads.ts +16 -0
- package/dist/starters/preact/design-system/assets/status/success.svg +1 -0
- package/dist/starters/preact/design-system/assets/status/sync-status.ads.ts +14 -0
- package/dist/starters/preact/design-system/assets/status/sync-status.svg +7 -0
- package/dist/starters/preact/design-system/assets/status/warning.svg +1 -0
- package/dist/starters/preact/design-system/components/Actions/Button/Button.ads.scenario.tsx +12 -0
- package/dist/starters/preact/design-system/components/Actions/Button/Button.tsx +198 -0
- package/dist/starters/preact/design-system/components/Actions/IconButton/IconButton.tsx +95 -0
- package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +22 -0
- package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.tsx +60 -0
- package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +24 -0
- package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.tsx +50 -0
- package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +8 -0
- package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.tsx +110 -0
- package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +25 -0
- package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.tsx +72 -0
- package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +8 -0
- package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.tsx +43 -0
- package/dist/starters/preact/design-system/components/Content/Icon/Icon.ads.scenario.tsx +21 -0
- package/dist/starters/preact/design-system/components/Content/Icon/Icon.tsx +41 -0
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/arrow.tsx +10 -0
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/close.tsx +10 -0
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/search.tsx +10 -0
- package/dist/starters/preact/design-system/components/Content/Image/Image.ads.fixture.ts +9 -0
- package/dist/starters/preact/design-system/components/Content/Image/Image.ads.scenario.tsx +12 -0
- package/dist/starters/preact/design-system/components/Content/Image/Image.tsx +83 -0
- package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +27 -0
- package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +46 -0
- package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +17 -0
- package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +41 -0
- package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +20 -0
- package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.tsx +37 -0
- package/dist/starters/preact/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +24 -0
- package/dist/starters/preact/design-system/components/Forms/TextField/TextField.tsx +173 -0
- package/dist/starters/preact/design-system/components/Identity/Identity.ads.scenario.tsx +13 -0
- package/dist/starters/preact/design-system/components/Identity/Identity.tsx +146 -0
- package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +27 -0
- package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.tsx +194 -0
- package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +19 -0
- package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.tsx +37 -0
- package/dist/starters/preact/design-system/controllers/FormField/FormField.ads.behavior.ts +70 -0
- package/dist/starters/preact/design-system/controllers/FormField/FormField.behavior.spec.ts +237 -0
- package/dist/starters/preact/design-system/controllers/FormField/FormField.ts +343 -0
- package/dist/starters/preact/design-system/controllers/FormField/useFormField.ts +70 -0
- package/dist/starters/preact/design-system/controllers/Palette/Palette.ts +165 -0
- package/dist/starters/preact/design-system/foundation.ads.ts +22 -0
- package/dist/starters/preact/design-system/index.ts +51 -0
- package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +5 -0
- package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +22 -0
- package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.fixture.ts +12 -0
- package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +21 -0
- package/dist/starters/preact/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +24 -0
- package/dist/starters/preact/design-system/mocks/Workspace/Media.ads.scenario.tsx +24 -0
- package/dist/starters/preact/design-system/mocks/Workspace/Stress.ads.scenario.tsx +36 -0
- package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.fixture.ts +13 -0
- package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +27 -0
- package/dist/starters/preact/design-system/mocks/Workspace/media/ads.svg +1 -0
- package/dist/starters/preact/design-system/palette.generated.ts +188 -0
- package/dist/starters/preact/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +73 -0
- package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +23 -0
- package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +94 -0
- package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +21 -0
- package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.tsx +137 -0
- package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +22 -0
- package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.tsx +248 -0
- package/dist/starters/preact/design-system/patterns/Shell/Shell.ads.scenario.tsx +26 -0
- package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +254 -261
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +28 -0
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.tsx +105 -0
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +179 -0
- package/dist/starters/preact/design-system/profiles/Containers/containers.ads.ts +67 -0
- package/dist/starters/preact/design-system/profiles/Containers/frames.ads.ts +32 -0
- package/dist/starters/preact/design-system/profiles/Containers/geometry.ads.ts +30 -0
- package/dist/starters/preact/design-system/profiles/Containers/spacing.ads.ts +26 -0
- package/dist/starters/preact/design-system/profiles/Controls/controls.ads.ts +157 -0
- package/dist/starters/preact/design-system/profiles/Controls/frames.ads.ts +50 -0
- package/dist/starters/preact/design-system/profiles/Controls/spacing.ads.ts +29 -0
- package/dist/starters/preact/design-system/profiles/Focus/keyboard.ads.ts +13 -0
- package/dist/starters/preact/design-system/profiles/Identity/identity.ads.ts +25 -0
- package/dist/starters/preact/design-system/profiles/Identity/spacing.ads.ts +22 -0
- package/dist/starters/preact/design-system/profiles/Layout/grid.ads.ts +69 -0
- package/dist/starters/preact/design-system/profiles/Layout/inspector.ads.ts +146 -0
- package/dist/starters/preact/design-system/profiles/Layout/overlays.ads.ts +94 -0
- package/dist/starters/preact/design-system/profiles/Layout/regions.ads.ts +296 -0
- package/dist/starters/preact/design-system/profiles/Motion/feedback.ads.ts +92 -0
- package/dist/starters/preact/design-system/profiles/Surfaces/controls.ads.ts +142 -0
- package/dist/starters/preact/design-system/profiles/Surfaces/document.ads.ts +2 -0
- package/dist/starters/preact/design-system/profiles/Surfaces/materials.ads.ts +18 -0
- package/dist/starters/preact/design-system/profiles/Surfaces/surfaces.ads.ts +48 -0
- package/dist/starters/preact/design-system/profiles/Typography/details.ads.ts +19 -0
- package/dist/starters/preact/design-system/profiles/Typography/document.ads.ts +2 -0
- package/dist/starters/preact/design-system/profiles/Typography/headings.ads.ts +15 -0
- package/dist/starters/preact/design-system/profiles/Typography/text.ads.ts +73 -0
- package/dist/starters/preact/design-system/profiles/Visuals/artwork.ads.ts +46 -0
- package/dist/starters/preact/design-system/profiles/Visuals/charts.ads.ts +31 -0
- package/dist/starters/preact/design-system/profiles/Visuals/content.ads.ts +52 -0
- package/dist/starters/preact/design-system/profiles/Visuals/glyphs.ads.ts +35 -0
- package/dist/starters/preact/design-system/profiles/Visuals/identity.ads.ts +24 -0
- package/dist/starters/preact/design-system/tokens/Artwork/paint.ads.css +7 -0
- package/dist/starters/preact/design-system/tokens/Artwork/visual-size.ads.css +12 -0
- package/dist/starters/preact/design-system/tokens/Brand/paint.ads.css +7 -0
- package/dist/starters/preact/design-system/tokens/Charts/paint.ads.css +19 -0
- package/dist/starters/preact/design-system/tokens/Containers/border-width.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Containers/content-gap.ads.css +5 -0
- package/dist/starters/preact/design-system/tokens/Containers/frame-inset.ads.css +6 -0
- package/dist/starters/preact/design-system/tokens/Containers/frame-size.ads.css +11 -0
- package/dist/starters/preact/design-system/tokens/Containers/radius.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Controls/border-width.ads.css +4 -0
- package/dist/starters/preact/design-system/tokens/Controls/content-gap.ads.css +6 -0
- package/dist/starters/preact/design-system/tokens/Controls/control-min-size.ads.css +17 -0
- package/dist/starters/preact/design-system/tokens/Controls/frame-inset.ads.css +21 -0
- package/dist/starters/preact/design-system/tokens/Controls/radius.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Controls/target-min-size.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Controls/visual-size.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Focus/border-width.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Focus/focus-offset.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Foundation/spacing.ads.css +20 -0
- package/dist/starters/preact/design-system/tokens/Grid/grid-gutter.ads.css +6 -0
- package/dist/starters/preact/design-system/tokens/Grid/layer.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Grid/layout-size.ads.css +15 -0
- package/dist/starters/preact/design-system/tokens/Grid/spacing.ads.css +12 -0
- package/dist/starters/preact/design-system/tokens/Grid/track-count.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Identity/content-gap.ads.css +6 -0
- package/dist/starters/preact/design-system/tokens/Identity/visual-size.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Motion/duration.ads.css +6 -0
- package/dist/starters/preact/design-system/tokens/Motion/easing.ads.css +5 -0
- package/dist/starters/preact/design-system/tokens/Motion/motion-angle.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Motion/motion-distance.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Motion/motion-scale.ads.css +9 -0
- package/dist/starters/preact/design-system/tokens/Surfaces/blur.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Surfaces/gradient.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Surfaces/opacity.ads.css +2 -0
- package/dist/starters/preact/design-system/tokens/Surfaces/paint.ads.css +58 -0
- package/dist/starters/preact/design-system/tokens/Surfaces/shadow.ads.css +20 -0
- package/dist/starters/preact/design-system/tokens/Typography/font-family.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Typography/font-features.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Typography/font-size.ads.css +9 -0
- package/dist/starters/preact/design-system/tokens/Typography/font-stretch.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Typography/font-variations.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Typography/font-weight.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Typography/letter-spacing.ads.css +1 -0
- package/dist/starters/preact/design-system/tokens/Typography/line-height.ads.css +11 -0
- package/dist/starters/preact/design-system/tokens/Typography/word-spacing.ads.css +1 -0
- package/dist/starters/preact/starter.json +11 -0
- package/dist/starters/react/design-system/assets/avatars/avatar.ads.ts +10 -0
- package/dist/starters/react/design-system/assets/avatars/member.svg +1 -0
- package/dist/starters/react/design-system/assets/brand/emblem.ads.ts +18 -0
- package/dist/starters/react/design-system/assets/brand/emblem.svg +4 -0
- package/dist/starters/react/design-system/assets/brand/iris-emblem.ads.ts +14 -0
- package/dist/starters/react/design-system/assets/brand/iris-emblem.svg +4 -0
- package/dist/starters/react/design-system/assets/brand/mark.ads.ts +14 -0
- package/dist/starters/react/design-system/assets/brand/mark.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/arrow.ads.ts +14 -0
- package/dist/starters/react/design-system/assets/glyphs/arrow.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/chevron-20.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/chevron-24.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/chevron.ads.ts +20 -0
- package/dist/starters/react/design-system/assets/glyphs/close.ads.ts +13 -0
- package/dist/starters/react/design-system/assets/glyphs/close.svg +1 -1
- package/dist/starters/react/design-system/assets/glyphs/favorite.ads.ts +23 -0
- package/dist/starters/react/design-system/assets/glyphs/favorite.normal.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/favorite.selected.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/search.ads.ts +10 -0
- package/dist/starters/react/design-system/assets/glyphs/search.svg +1 -1
- package/dist/starters/react/design-system/assets/illustrations/journey.ads.ts +32 -0
- package/dist/starters/react/design-system/assets/illustrations/journey.contrast.svg +6 -0
- package/dist/starters/react/design-system/assets/illustrations/journey.dark.svg +13 -0
- package/dist/starters/react/design-system/assets/illustrations/journey.light.svg +13 -0
- package/dist/starters/react/design-system/assets/logos/harbor-pay.ads.ts +17 -0
- package/dist/starters/react/design-system/assets/logos/harbor-pay.dark.svg +10 -0
- package/dist/starters/react/design-system/assets/logos/harbor-pay.light.svg +10 -0
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.ads.ts +15 -0
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.dark.svg +9 -0
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.light.svg +9 -0
- package/dist/starters/react/design-system/assets/status/error.svg +1 -0
- package/dist/starters/react/design-system/assets/status/outcomes.ads.ts +31 -0
- package/dist/starters/react/design-system/assets/status/status.ads.ts +16 -0
- package/dist/starters/react/design-system/assets/status/success.svg +1 -0
- package/dist/starters/react/design-system/assets/status/sync-status.ads.ts +14 -0
- package/dist/starters/react/design-system/assets/status/sync-status.svg +7 -0
- package/dist/starters/react/design-system/assets/status/warning.svg +1 -0
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.scenario.tsx +11 -12
- package/dist/starters/react/design-system/components/Actions/Button/Button.tsx +187 -45
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +83 -48
- package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +22 -0
- package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.tsx +60 -0
- package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +24 -0
- package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.tsx +50 -0
- package/dist/starters/react/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +8 -0
- package/dist/starters/react/design-system/components/Content/Artwork/Artwork.tsx +110 -0
- package/dist/starters/react/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +25 -0
- package/dist/starters/react/design-system/components/Content/BarChart/BarChart.tsx +72 -0
- package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +8 -0
- package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.tsx +43 -0
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +21 -16
- package/dist/starters/react/design-system/components/Content/Icon/Icon.tsx +32 -33
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/arrow.tsx +10 -0
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/close.tsx +10 -0
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/search.tsx +10 -0
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.fixture.ts +9 -2
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.scenario.tsx +10 -11
- package/dist/starters/react/design-system/components/Content/Image/Image.tsx +74 -42
- package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +27 -0
- package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +46 -0
- package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +17 -0
- package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +41 -0
- package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +20 -0
- package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.tsx +37 -0
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +23 -12
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.tsx +161 -49
- package/dist/starters/react/design-system/components/Identity/Identity.ads.scenario.tsx +13 -0
- package/dist/starters/react/design-system/components/Identity/Identity.tsx +146 -0
- package/dist/starters/react/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +27 -0
- package/dist/starters/react/design-system/components/Overlays/Menu/Menu.tsx +194 -0
- package/dist/starters/react/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +19 -0
- package/dist/starters/react/design-system/components/Overlays/Popover/Popover.tsx +37 -0
- package/dist/starters/react/design-system/controllers/FormField/FormField.ads.behavior.ts +70 -0
- package/dist/starters/react/design-system/controllers/FormField/FormField.behavior.spec.ts +237 -0
- package/dist/starters/react/design-system/controllers/FormField/FormField.ts +343 -0
- package/dist/starters/react/design-system/controllers/FormField/useFormField.ts +70 -0
- package/dist/starters/react/design-system/controllers/Palette/Palette.ts +5 -4
- package/dist/starters/react/design-system/foundation.ads.ts +22 -0
- package/dist/starters/react/design-system/index.ts +51 -12
- package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +5 -0
- package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +22 -0
- package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.fixture.ts +12 -0
- package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +21 -0
- package/dist/starters/react/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +24 -0
- package/dist/starters/react/design-system/mocks/Workspace/Media.ads.scenario.tsx +24 -0
- package/dist/starters/react/design-system/mocks/Workspace/Stress.ads.scenario.tsx +36 -0
- package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.fixture.ts +13 -0
- package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +27 -0
- package/dist/starters/react/design-system/mocks/Workspace/media/ads.svg +1 -0
- package/dist/starters/react/design-system/palette.generated.ts +188 -0
- package/dist/starters/react/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +73 -0
- package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +23 -0
- package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +94 -0
- package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +21 -0
- package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.tsx +137 -0
- package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +22 -0
- package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.tsx +248 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +26 -21
- package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +255 -261
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +28 -0
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.tsx +105 -0
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +179 -0
- package/dist/starters/react/design-system/profiles/Containers/containers.ads.ts +67 -0
- package/dist/starters/react/design-system/profiles/Containers/frames.ads.ts +32 -0
- package/dist/starters/react/design-system/profiles/Containers/geometry.ads.ts +30 -0
- package/dist/starters/react/design-system/profiles/Containers/spacing.ads.ts +26 -0
- package/dist/starters/react/design-system/profiles/Controls/controls.ads.ts +157 -0
- package/dist/starters/react/design-system/profiles/Controls/frames.ads.ts +50 -0
- package/dist/starters/react/design-system/profiles/Controls/spacing.ads.ts +29 -0
- package/dist/starters/react/design-system/profiles/Focus/keyboard.ads.ts +13 -0
- package/dist/starters/react/design-system/profiles/Identity/identity.ads.ts +25 -0
- package/dist/starters/react/design-system/profiles/Identity/spacing.ads.ts +22 -0
- package/dist/starters/react/design-system/profiles/Layout/grid.ads.ts +69 -0
- package/dist/starters/react/design-system/profiles/Layout/inspector.ads.ts +146 -0
- package/dist/starters/react/design-system/profiles/Layout/overlays.ads.ts +94 -0
- package/dist/starters/react/design-system/profiles/Layout/regions.ads.ts +296 -0
- package/dist/starters/react/design-system/profiles/Motion/feedback.ads.ts +92 -0
- package/dist/starters/react/design-system/profiles/Surfaces/controls.ads.ts +142 -0
- package/dist/starters/react/design-system/profiles/Surfaces/document.ads.ts +2 -0
- package/dist/starters/react/design-system/profiles/Surfaces/materials.ads.ts +18 -0
- package/dist/starters/react/design-system/profiles/Surfaces/surfaces.ads.ts +48 -0
- package/dist/starters/react/design-system/profiles/Typography/details.ads.ts +19 -0
- package/dist/starters/react/design-system/profiles/Typography/document.ads.ts +2 -0
- package/dist/starters/react/design-system/profiles/Typography/headings.ads.ts +15 -0
- package/dist/starters/react/design-system/profiles/Typography/text.ads.ts +73 -0
- package/dist/starters/react/design-system/profiles/Visuals/artwork.ads.ts +46 -0
- package/dist/starters/react/design-system/profiles/Visuals/charts.ads.ts +31 -0
- package/dist/starters/react/design-system/profiles/Visuals/content.ads.ts +52 -0
- package/dist/starters/react/design-system/profiles/Visuals/glyphs.ads.ts +35 -0
- package/dist/starters/react/design-system/profiles/Visuals/identity.ads.ts +24 -0
- package/dist/starters/react/design-system/tokens/Artwork/paint.ads.css +7 -0
- package/dist/starters/react/design-system/tokens/Artwork/visual-size.ads.css +12 -0
- package/dist/starters/react/design-system/tokens/Brand/paint.ads.css +7 -0
- package/dist/starters/react/design-system/tokens/Charts/paint.ads.css +19 -0
- package/dist/starters/react/design-system/tokens/Containers/border-width.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Containers/content-gap.ads.css +5 -0
- package/dist/starters/react/design-system/tokens/Containers/frame-inset.ads.css +6 -0
- package/dist/starters/react/design-system/tokens/Containers/frame-size.ads.css +11 -0
- package/dist/starters/react/design-system/tokens/Containers/radius.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Controls/border-width.ads.css +4 -0
- package/dist/starters/react/design-system/tokens/Controls/content-gap.ads.css +6 -0
- package/dist/starters/react/design-system/tokens/Controls/control-min-size.ads.css +17 -0
- package/dist/starters/react/design-system/tokens/Controls/frame-inset.ads.css +21 -0
- package/dist/starters/react/design-system/tokens/Controls/radius.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Controls/target-min-size.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Controls/visual-size.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Focus/border-width.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Focus/focus-offset.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Foundation/spacing.ads.css +20 -0
- package/dist/starters/react/design-system/tokens/Grid/grid-gutter.ads.css +6 -0
- package/dist/starters/react/design-system/tokens/Grid/layer.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Grid/layout-size.ads.css +15 -0
- package/dist/starters/react/design-system/tokens/Grid/spacing.ads.css +12 -0
- package/dist/starters/react/design-system/tokens/Grid/track-count.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Identity/content-gap.ads.css +6 -0
- package/dist/starters/react/design-system/tokens/Identity/visual-size.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Motion/duration.ads.css +6 -0
- package/dist/starters/react/design-system/tokens/Motion/easing.ads.css +5 -0
- package/dist/starters/react/design-system/tokens/Motion/motion-angle.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Motion/motion-distance.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Motion/motion-scale.ads.css +9 -0
- package/dist/starters/react/design-system/tokens/Surfaces/blur.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Surfaces/gradient.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Surfaces/opacity.ads.css +2 -0
- package/dist/starters/react/design-system/tokens/Surfaces/paint.ads.css +58 -0
- package/dist/starters/react/design-system/tokens/Surfaces/shadow.ads.css +20 -0
- package/dist/starters/react/design-system/tokens/Typography/font-family.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Typography/font-features.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Typography/font-size.ads.css +9 -0
- package/dist/starters/react/design-system/tokens/Typography/font-stretch.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Typography/font-variations.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Typography/font-weight.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Typography/letter-spacing.ads.css +1 -0
- package/dist/starters/react/design-system/tokens/Typography/line-height.ads.css +11 -0
- package/dist/starters/react/design-system/tokens/Typography/word-spacing.ads.css +1 -0
- package/dist/starters/react/starter.json +11 -0
- package/dist/state-conditions.d.mts +51 -0
- package/dist/state-conditions.mjs +67 -0
- package/dist/static-values.mjs +94 -0
- package/dist/surface-contrast.mjs +194 -0
- package/dist/target-size.mjs +177 -0
- package/dist/task-cache.mjs +142 -136
- package/dist/task-worker.mjs +18 -18
- package/dist/test-boundaries.mjs +50 -189
- package/dist/token-checks.mjs +21 -0
- package/dist/token-dtcg.mjs +135 -0
- package/dist/token-expression.mjs +19 -0
- package/dist/token-inventory.mjs +146 -0
- package/dist/token-operations.mjs +37 -0
- package/dist/token-overlap.mjs +29 -0
- package/dist/token-provenance.mjs +260 -0
- package/dist/token-references.mjs +71 -0
- package/dist/token-registrations.mjs +116 -0
- package/dist/token-resolution.mjs +38 -0
- package/dist/token-sections.mjs +123 -0
- package/dist/token-shapes.mjs +121 -0
- package/dist/token-sheet-check.mjs +54 -0
- package/dist/token-type-check.mjs +89 -0
- package/dist/token-view-facts.mjs +62 -0
- package/dist/tsconfig.declarations.json +24 -0
- package/dist/types/css-tree.d.ts +45 -0
- package/dist/ui-framework.mjs +34 -34
- package/dist/units.mjs +186 -226
- package/dist/unknown.d.mts +9 -0
- package/dist/unknown.mjs +13 -0
- package/dist/validation-checks.mjs +62 -71
- package/dist/validation-inputs.mjs +287 -184
- package/dist/validation.mjs +132 -159
- package/dist/verification/browser.d.mts +21 -25
- package/dist/verification/browser.mjs +281 -124
- package/dist/verification/browser.page.d.mts +22 -0
- package/dist/verification/browser.page.mjs +19 -0
- package/dist/verification/paint-audit.page.d.mts +55 -0
- package/dist/verification/paint-audit.page.mjs +144 -0
- package/dist/verification/playwright-reporter.mjs +160 -0
- package/dist/verification/preview-startup.d.mts +51 -0
- package/dist/verification/preview-startup.mjs +76 -0
- package/dist/verification/request.d.mts +28 -0
- package/dist/verification/request.mjs +30 -0
- package/dist/verification/unit-preload.mjs +37 -0
- package/dist/verification.mjs +574 -607
- package/docs/ADS.md +562 -565
- package/docs/ARCHITECTURE.md +1857 -1345
- package/docs/ASSETS.md +416 -0
- package/docs/BEHAVIORS.md +339 -370
- package/docs/CACHING.md +365 -154
- package/docs/CHANGELOG.md +171 -21
- package/docs/COMPARISON.md +21 -26
- package/docs/DESIGN-REFERENCES.md +39 -26
- package/docs/GUIDE.md +2306 -1288
- package/docs/LANGUAGE.md +893 -0
- package/docs/LOWERING.md +168 -0
- package/docs/MCP.md +1461 -1179
- package/docs/MOTION.md +265 -0
- package/docs/PROFILE-KINDS.md +390 -0
- package/docs/PROFILES.md +176 -0
- package/docs/RULES.md +559 -0
- package/docs/STARTER.md +167 -0
- package/docs/TOKEN-ROLES.md +375 -0
- package/docs/benchmarks/README.md +26 -27
- package/package.json +59 -45
- package/dist/a11y.mjs +0 -187
- package/dist/assets.mjs +0 -159
- package/dist/atomic-composition.mjs +0 -337
- package/dist/atomic-trace.mjs +0 -162
- package/dist/behavior-libraries.mjs +0 -162
- package/dist/behaviors.mjs +0 -306
- package/dist/brand-assets.mjs +0 -458
- package/dist/brands.mjs +0 -141
- package/dist/component-contrast.mjs +0 -256
- package/dist/construction-styles.cjs +0 -10
- package/dist/contracts/foundation.json +0 -211
- package/dist/contracts/tokens.json +0 -52
- package/dist/contracts.d.mts +0 -30
- package/dist/contrast-composition.mjs +0 -80
- package/dist/contrast-styles.mjs +0 -88
- package/dist/control-padding.mjs +0 -113
- package/dist/css-values.mjs +0 -27
- package/dist/declarative-flow.mjs +0 -244
- package/dist/design-values.mjs +0 -173
- package/dist/font-rules.mjs +0 -108
- package/dist/fonts-generated.mjs +0 -112
- package/dist/foundation-views.mjs +0 -242
- package/dist/foundation.mjs +0 -154
- package/dist/generated-entries.mjs +0 -198
- package/dist/html.mjs +0 -30
- package/dist/icons.mjs +0 -154
- package/dist/image-attributes.mjs +0 -187
- package/dist/image-size.mjs +0 -28
- package/dist/layers.mjs +0 -461
- package/dist/layout-widths.mjs +0 -332
- package/dist/linaria/atomic-css.cjs +0 -2
- package/dist/linaria/atomic-styled.cjs +0 -2
- package/dist/linaria/preserve-values.cjs +0 -58
- package/dist/linaria/spatial-inputs.cjs +0 -56
- package/dist/linaria.d.mts +0 -1
- package/dist/linaria.mjs +0 -9
- package/dist/lockup-composition.mjs +0 -44
- package/dist/lockup-model.cjs +0 -64
- package/dist/paint-contracts.mjs +0 -216
- package/dist/pictograms.mjs +0 -52
- package/dist/public-api.mjs +0 -121
- package/dist/public-props.mjs +0 -91
- package/dist/render-audit/axe-run.mjs +0 -17
- package/dist/render-audit/first-render.mjs +0 -40
- package/dist/render-audit/image-shape.mjs +0 -46
- package/dist/render-audit/layout-overflow.mjs +0 -167
- package/dist/render-audit/layout-shift.mjs +0 -32
- package/dist/render-audit/non-text-contrast.mjs +0 -151
- package/dist/render-audit/pictograms.mjs +0 -88
- package/dist/render-color-probe.mjs +0 -202
- package/dist/render-composition.mjs +0 -186
- package/dist/runtime-contracts.mjs +0 -506
- package/dist/scenario-program.mjs +0 -19
- package/dist/scenario-selectors.mjs +0 -237
- package/dist/scenario-slots.mjs +0 -217
- package/dist/scenario-trace.mjs +0 -314
- package/dist/scenarios-vite.d.mts +0 -2
- package/dist/scenarios-vite.mjs +0 -2
- package/dist/scenarios.mjs +0 -616
- package/dist/selector-match.mjs +0 -94
- package/dist/showcase/comparison.js +0 -48
- package/dist/showcase/connection.js +0 -10
- package/dist/showcase/draft-navigation.js +0 -59
- package/dist/showcase/foundation-view.css +0 -58
- package/dist/showcase/foundation-view.mjs +0 -255
- package/dist/showcase/guide-controls.ads.review.mjs +0 -32
- package/dist/showcase/http-connection.js +0 -86
- package/dist/showcase/http-preview.js +0 -81
- package/dist/showcase/icons.js +0 -2
- package/dist/showcase/navigation.js +0 -13
- package/dist/showcase/pictogram-view.mjs +0 -53
- package/dist/showcase/preview-frame.ads.review.css +0 -46
- package/dist/showcase/preview-frame.ads.review.d.mts +0 -11
- package/dist/showcase/preview-frame.ads.review.mjs +0 -22
- package/dist/showcase/preview-state.js +0 -11
- package/dist/showcase/refresh-scheduler.js +0 -23
- package/dist/showcase/resource-reader.js +0 -37
- package/dist/showcase-coverage.mjs +0 -139
- package/dist/source-symbols.mjs +0 -4
- package/dist/spatial-composition.mjs +0 -322
- package/dist/spatial-contexts.cjs +0 -56
- package/dist/spatial-css.cjs +0 -351
- package/dist/spatial-inputs.cjs +0 -80
- package/dist/spatial-model.cjs +0 -322
- package/dist/spatial.mjs +0 -21
- package/dist/stage-timing.cjs +0 -21
- package/dist/starters/preact/design-system/patterns/Conversation/Conversation.tsx +0 -105
- package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.ads.review.tsx +0 -7
- package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +0 -10
- package/dist/starters/preact/design-system/showcase/mcp/main.ads.mount.tsx +0 -8
- package/dist/starters/preact/ds.config.json +0 -37
- package/dist/starters/preact/package.json +0 -35
- package/dist/starters/preact/src/vite-env.d.ts +0 -7
- package/dist/starters/preact/tsconfig.json +0 -35
- package/dist/starters/preact/vite.config.ts +0 -23
- package/dist/starters/react/ADS.md +0 -286
- package/dist/starters/react/README.md +0 -184
- package/dist/starters/react/biome.css.json +0 -21
- package/dist/starters/react/design-system/assets/brand/README.md +0 -41
- package/dist/starters/react/design-system/assets/brand/app-icon.svg +0 -4
- package/dist/starters/react/design-system/assets/brand/logo.dark.svg +0 -6
- package/dist/starters/react/design-system/assets/brand/logo.svg +0 -6
- package/dist/starters/react/design-system/assets/glyphs/README.md +0 -15
- package/dist/starters/react/design-system/assets/glyphs/aliases.json +0 -1
- package/dist/starters/react/design-system/assets/glyphs/check.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron-down.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron-right.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/external-link.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/info.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/menu.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/plus.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/warning.svg +0 -1
- package/dist/starters/react/design-system/assets/pictograms/catalog.ads.json +0 -13
- package/dist/starters/react/design-system/assets/pictograms/journey.dark.svg +0 -7
- package/dist/starters/react/design-system/assets/pictograms/journey.svg +0 -7
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.fixture.ts +0 -1
- package/dist/starters/react/design-system/components/Actions/Button/README.md +0 -12
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.fixture.ts +0 -9
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.scenario.tsx +0 -16
- package/dist/starters/react/design-system/components/Actions/IconButton/README.md +0 -17
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.fixture.ts +0 -6
- package/dist/starters/react/design-system/components/Content/Icon/README.md +0 -17
- package/dist/starters/react/design-system/components/Content/Icon/glyphs.ts +0 -17
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Image/README.md +0 -20
- package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.fixture.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.scenario.tsx +0 -12
- package/dist/starters/react/design-system/components/Content/Logo/Logo.tsx +0 -35
- package/dist/starters/react/design-system/components/Content/Logo/README.md +0 -12
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.fixture.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.scenario.tsx +0 -7
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.tsx +0 -26
- package/dist/starters/react/design-system/components/Forms/TextField/README.md +0 -14
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.fixture.ts +0 -6
- package/dist/starters/react/design-system/composition/Search/SearchPage/README.md +0 -4
- package/dist/starters/react/design-system/composition/Search/SearchPage/SearchPage.ads.fixture.ts +0 -7
- package/dist/starters/react/design-system/composition/Search/SearchPage/SearchPage.ads.scenario.tsx +0 -16
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/README.md +0 -5
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.fixture.ts +0 -13
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.scenario.tsx +0 -22
- package/dist/starters/react/design-system/controllers/Palette/Palette.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.fixture.ts +0 -7
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.scenario.tsx +0 -15
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.tsx +0 -105
- package/dist/starters/react/design-system/patterns/Conversation/README.md +0 -9
- package/dist/starters/react/design-system/patterns/Search/SearchBar/README.md +0 -12
- package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.fixture.ts +0 -1
- package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.scenario.tsx +0 -11
- package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.tsx +0 -41
- package/dist/starters/react/design-system/patterns/Shell/Floating.ads.fixture.ts +0 -5
- package/dist/starters/react/design-system/patterns/Shell/Floating.ads.scenario.tsx +0 -21
- package/dist/starters/react/design-system/patterns/Shell/README.md +0 -43
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.fixture.ts +0 -5
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.review.tsx +0 -7
- package/dist/starters/react/design-system/review/index.ads.review.ts +0 -4
- package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.review.tsx +0 -6
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +0 -10
- package/dist/starters/react/design-system/showcase/mcp/main.ads.mount.tsx +0 -10
- package/dist/starters/react/design-system/styles.css +0 -7
- package/dist/starters/react/design-system/tokens/base.css +0 -36
- package/dist/starters/react/design-system/tokens/catalog.ads.json +0 -1221
- package/dist/starters/react/design-system/tokens/colors.css +0 -215
- package/dist/starters/react/design-system/tokens/elevation.css +0 -53
- package/dist/starters/react/design-system/tokens/spacing.css +0 -87
- package/dist/starters/react/design-system/tokens/spatial.ads.json +0 -70
- package/dist/starters/react/design-system/tokens/themes.generated.css +0 -142
- package/dist/starters/react/design-system/tokens/themes.generated.ts +0 -402
- package/dist/starters/react/design-system/tokens/typography.css +0 -31
- package/dist/starters/react/ds.config.json +0 -37
- package/dist/starters/react/gitignore.template +0 -8
- package/dist/starters/react/package.json +0 -39
- package/dist/starters/react/scripts/build-mcp-previews.mjs +0 -3
- package/dist/starters/react/src/vite-env.d.ts +0 -7
- package/dist/starters/react/tsconfig.build.json +0 -20
- package/dist/starters/react/tsconfig.json +0 -34
- package/dist/starters/react/vite.config.ts +0 -23
- package/dist/style-boundaries.mjs +0 -106
- package/dist/style-token-rules.mjs +0 -51
- package/dist/themes-generated.mjs +0 -161
- package/dist/themes-watch.mjs +0 -83
- package/dist/themes.mjs +0 -360
- package/dist/token-export.mjs +0 -94
- package/dist/token-origins.mjs +0 -24
- package/dist/token-policy.mjs +0 -26
- package/dist/token-quality.mjs +0 -149
- package/dist/token-samples.mjs +0 -19
- package/dist/tokens.mjs +0 -194
- package/dist/unit-contracts.mjs +0 -396
- package/dist/usage.mjs +0 -184
- package/dist/verification/playwright-reporter.cjs +0 -87
- package/docs/CONTRACTS.md +0 -285
- package/docs/HTTP-SHOWCASE-POC.md +0 -397
- package/docs/SPATIAL-CHECKS.md +0 -69
- package/docs/benchmarks/http-showcase-optimized.json +0 -1879
- package/docs/benchmarks/http-showcase-profile.json +0 -308
- package/docs/benchmarks/http-showcase.json +0 -3069
- /package/dist/{starters/react/design-system/assets/fonts/.gitkeep → analysis/semantic.mjs} +0 -0
- /package/dist/{starters/react/design-system/controllers/.gitkeep → lowering-model.mjs} +0 -0
- /package/dist/showcase/{favicon.svg → ui/favicon-scavmehf.svg} +0 -0
package/docs/GUIDE.md
CHANGED
|
@@ -1,368 +1,400 @@
|
|
|
1
1
|
# ADS tool guide
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
3
|
+
ADS is development tooling for a project's local design system. The package
|
|
4
|
+
contains a Bun CLI, asynchronous native static checks, the design-system
|
|
5
|
+
compiler and a starter design system that `ads init` installs. `ads emit`
|
|
6
|
+
compiles the design system into plain modules and stylesheets. ADS adds no
|
|
7
|
+
runtime dependency to the application's shipped UI.
|
|
8
|
+
|
|
9
|
+
There are two [editing routes](../skills/ads-designer/references/workflows.md).
|
|
10
|
+
Both use ADS's own compiler.
|
|
11
|
+
|
|
12
|
+
- **Direct editing.** Change the owned files normally, and use MCP for preview
|
|
13
|
+
and validation. Drafts and acceptance are not required, but you can use drafts
|
|
14
|
+
for isolation and for the Accepted/Draft comparison.
|
|
15
|
+
- **MCP-only editing.** Change source through
|
|
16
|
+
[tracked drafts](../skills/ads-designer/references/drafts.md), review the
|
|
17
|
+
rendered result, then accept the exact revision.
|
|
18
|
+
|
|
19
|
+
Complete each required tracked proposal before you report a design change as
|
|
20
|
+
finished.
|
|
21
21
|
|
|
22
22
|
## Use ADS through MCP
|
|
23
23
|
|
|
24
|
-
Connect your coding agent
|
|
25
|
-
The client launches `ads mcp` in your project;
|
|
26
|
-
source editing.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
`
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
`
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
annotated image before requesting a clean capture: each scenario/target has one
|
|
70
|
-
current slot, so the next capture replaces it. A draft comparison uses the same
|
|
71
|
-
layers for current and candidate.
|
|
72
|
-
|
|
73
|
-
Read `ads://project/captures` and the returned PNG image URIs through MCP
|
|
74
|
-
`resources/read`. Each target keeps only current and candidate: a successful
|
|
75
|
-
standalone screenshot replaces current and clears candidate; a screenshot-enabled
|
|
76
|
-
dry run replaces the pair; applying matching source promotes candidate. Source
|
|
77
|
-
changes mark images stale. There is no previous slot, history or TTL.
|
|
78
|
-
`ads_capture_clear` discards candidate or clears both images. Subscribe to resource
|
|
79
|
-
updates when supported, and explicitly reread otherwise. Screenshots provide visual
|
|
80
|
-
evidence for one state; they do not replace behavior checks.
|
|
81
|
-
|
|
82
|
-
ADS serves its skills over MCP, by what the client speaks:
|
|
83
|
-
|
|
84
|
-
| Client | How it gets skills |
|
|
24
|
+
Connect your coding agent with the [MCP client setup](MCP.md#connect-codex-or-claude).
|
|
25
|
+
The client launches `ads mcp` in your project; `--mutations` enables guarded
|
|
26
|
+
source editing. The server starts its showcase and the ADS-managed preview
|
|
27
|
+
compiler. Use the returned showcase URL; do not start a separate preview
|
|
28
|
+
application. The [MCP guide](MCP.md) gives the tool and resource schemas,
|
|
29
|
+
prompts, skills and notifications.
|
|
30
|
+
|
|
31
|
+
An agent works in these steps:
|
|
32
|
+
|
|
33
|
+
1. Call `ads_status`. It identifies the connected project, the available
|
|
34
|
+
commands, the mutation mode, the showcase URL, the declared themes and brands,
|
|
35
|
+
and the build freshness.
|
|
36
|
+
2. Find the public UI and behavior with `ads_catalog`, the tokens with
|
|
37
|
+
`ads_tokens`, the files of an owner with `ads_units` and the preview IDs with
|
|
38
|
+
`ads_scenarios`.
|
|
39
|
+
3. Read one relevant workflow [skill](MCP.md#skills) before you edit: natively,
|
|
40
|
+
or through `ads_skills` and `ads_read_skill` on an earlier protocol. The host
|
|
41
|
+
decides whether a skill is loaded into an agent's context. `npx skills`
|
|
42
|
+
installs the skills locally for a host that does not read them over MCP.
|
|
43
|
+
4. Open a discovered preview with `ads_show_scenario`. It renders the project's
|
|
44
|
+
actual scenario through MCP Apps. If the client cannot render Apps, use the
|
|
45
|
+
returned showcase link.
|
|
46
|
+
5. Select the editing route. The route does not depend on `mutations.enabled`.
|
|
47
|
+
- With direct source access, edit the owned files. Run `ads check` and the
|
|
48
|
+
relevant project checks before you finish.
|
|
49
|
+
- With MCP-only access and mutation tools enabled, every change goes through
|
|
50
|
+
a draft: `ads_create_draft`, `ads_read_file` and `ads_update_draft` (file
|
|
51
|
+
contents or a Git diff), a rendered `ads_show_draft` review, an optional
|
|
52
|
+
`ads_accept` dry run, then `ads_accept` of the exact revision. An owner is
|
|
53
|
+
in at most one open draft. Accept dependencies first and review dependents
|
|
54
|
+
again.
|
|
55
|
+
- After a series of accepted drafts, run `ads_validate({scope:"changed"})`.
|
|
56
|
+
- To remove declared targets, use `ads_delete`
|
|
57
|
+
([Deleting declared targets](#deleting-declared-targets)).
|
|
58
|
+
- A read-only MCP connection supports direct editors. It cannot edit for an
|
|
59
|
+
MCP-only client.
|
|
60
|
+
6. Review the diagnostics, the execution evidence and the rendered result. Check
|
|
61
|
+
`ads_status.build` again after changes. Notifications alone do not prove that
|
|
62
|
+
the output is current.
|
|
63
|
+
|
|
64
|
+
**Nothing to inspect or run.** A feature with nothing to inspect or run does not
|
|
65
|
+
report an empty match or a pass. Its result carries
|
|
66
|
+
`{ "status": "not-available", "reason", "message" }`:
|
|
67
|
+
|
|
68
|
+
| Reason | Meaning |
|
|
85
69
|
|---|---|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
70
|
+
| `no-scenarios` | No scenarios are registered, so nothing can be rendered, captured or audited |
|
|
71
|
+
| `no-behavior-checks` | No behavior checks are registered |
|
|
72
|
+
| `no-token-inventory` | The design system declares no token sheet (`ads tokens`, `ads_tokens`, `ads://project/tokens`, `ads://project/tokens/dtcg`) |
|
|
73
|
+
| `no-catalog` | The design system has no public barrel, or it exports nothing (`ads_catalog`, `ads://project/catalog`) |
|
|
74
|
+
| `none-selected` | Entries are registered, but the change set or selection reaches none of them |
|
|
75
|
+
| `turned-off` | The project's configuration turns the stage off |
|
|
76
|
+
|
|
77
|
+
A gate stage that ran nothing is listed as skipped, never as passed or
|
|
78
|
+
established.
|
|
79
|
+
|
|
80
|
+
**Screenshots.** For an on-demand screenshot, call `ads_capture` with a
|
|
81
|
+
discovered scenario ID and, optionally, a named `captureTargets` element, one
|
|
82
|
+
of the scenario's named states, a theme, a viewport and layout `guides`. To compare a draft with accepted source,
|
|
83
|
+
pass the `draft` id and the exact `revision`. Acceptance and its dry run create
|
|
84
|
+
no screenshots. A screenshot is visual evidence for one state; it does not
|
|
85
|
+
replace behavior checks. See
|
|
86
|
+
[screenshots and candidate comparison](MCP.md#screenshots-and-candidate-comparison)
|
|
87
|
+
and the portable [capture guide](../skills/ads-designer/references/captures.md)
|
|
88
|
+
(`ads://guides/captures`) for guides, named targets, limits and the
|
|
89
|
+
current/candidate image lifecycle.
|
|
90
|
+
|
|
91
|
+
Capture and the render audit use ADS's own Playwright; the project installs
|
|
92
|
+
nothing. The first capture or audit on a machine installs Playwright's browser
|
|
93
|
+
into its shared cache, with progress. To provision CI or an offline machine
|
|
94
|
+
ahead of time, run the command that a failed installation names:
|
|
95
|
+
`bunx playwright@<ADS's Playwright version> install chromium`.
|
|
88
96
|
|
|
89
|
-
|
|
90
|
-
for a host that does not read them over MCP.
|
|
97
|
+
## Implementation support
|
|
91
98
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
the same guide at `ads://guides/captures`.
|
|
99
|
+
[Design system source](#design-system-source) describes what you author and what
|
|
100
|
+
`ads check` enforces. [Emitting the design system](#emitting-the-design-system)
|
|
101
|
+
describes the output that an application imports.
|
|
96
102
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
restoring rejected revisions may reset the preview. “Checking changes…” is live
|
|
101
|
-
feedback, not acceptance: source gates and selected browser checks still decide
|
|
102
|
-
whether the revision passes. Application production builds are unchanged.
|
|
103
|
+
The starter and the emitted output target the project's framework: React, or
|
|
104
|
+
native Preact (owners typed by Preact's own JSX runtime, `preact/hooks`, no
|
|
105
|
+
`preact/compat`).
|
|
103
106
|
|
|
104
|
-
|
|
107
|
+
The guards do not parse Vue or Svelte single-file components, or HTML templates.
|
|
108
|
+
Keep the framework-specific checks for them. A clean ADS check does not validate
|
|
109
|
+
a surface that ADS does not check.
|
|
105
110
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
Current source checking supports `.js`, `.jsx`, `.ts`, `.tsx`, their module
|
|
113
|
-
variants, `.css`, and imported Linaria `css` and `styled` templates. JSX style/type checks
|
|
114
|
-
support React and native Preact, including imported factory aliases and
|
|
115
|
-
DOM/CSS types. Scenario discovery, coverage, ownership checks and MCP delivery
|
|
116
|
-
apply to both. The empty application starter comes for React and for Preact; this
|
|
117
|
-
checkout’s working example uses native Preact 11 with TypeScript and Linaria. ADS adds neither runtime
|
|
118
|
-
to a receiving application and never silently aliases React to Preact.
|
|
119
|
-
|
|
120
|
-
Vue/Svelte single-file components and HTML templates are not parsed by these
|
|
121
|
-
guards. Web Component JS/TS logic and separate CSS can be checked, but HTML
|
|
122
|
-
template strings and Shadow DOM style constructs lack equivalent coverage.
|
|
123
|
-
Retain framework-specific checks; a clean ADS check does not validate those
|
|
124
|
-
unchecked surfaces.
|
|
111
|
+
For product MCP Apps, make the widget's entry the root of the production bundle,
|
|
112
|
+
and import the necessary public design-system UI by name from the emitted
|
|
113
|
+
output. The app's own MCP server serves the built widget; it does not need ADS's
|
|
114
|
+
server or showcase. Check the runtime code and the emitted CSS and assets for
|
|
115
|
+
unrelated owners. See the
|
|
116
|
+
[product widget integration proof](MCP.md#product-widgets-and-payload-scope).
|
|
125
117
|
|
|
126
118
|
### Controllers and behavior checks
|
|
127
119
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
patterns own presentation.
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
120
|
+
A controller is a plain module that the barrel exports, with no recipe and no
|
|
121
|
+
markup. Keep a private controller with its consumer; share reusable behavior
|
|
122
|
+
through `design-system/controllers/<Name>/`. A controller owns lifecycle and
|
|
123
|
+
measurements, and components and patterns own presentation. It can read computed
|
|
124
|
+
styles and use an offscreen canvas. It renders no markup, sets no class or
|
|
125
|
+
style, and writes no styling through the DOM (`source/plain-*`). Use the
|
|
126
|
+
configured framework and the declared project dependencies.
|
|
127
|
+
|
|
128
|
+
Owners register behavior in `<Owner>.ads.behavior.ts`. ADS runs every check
|
|
129
|
+
itself: `unit` specs under its own Bun, `browser` and `strict` (React) specs
|
|
130
|
+
with its own Playwright. The project installs and configures no test runner;
|
|
131
|
+
`mcp.behaviorProfiles` can only set the `timeoutMs` of a built-in profile. A
|
|
132
|
+
design system that registers no checks reports `not-available`
|
|
133
|
+
(`no-behavior-checks`). See
|
|
134
|
+
[registered checks and their status](BEHAVIORS.md#registered-checks-and-their-status).
|
|
135
|
+
|
|
136
|
+
The starter's form-field bridge (`controllers/FormField`) registers eight
|
|
137
|
+
guarantees with unit checks. On an installed starter, `ads behaviors` lists them
|
|
138
|
+
and `ads verify` runs them under the built-in `unit` profile.
|
|
139
|
+
|
|
140
|
+
### Forms
|
|
141
|
+
|
|
142
|
+
A field shows a constraint error only after the user interacts with it (a
|
|
143
|
+
commit, a blur after an edit, a failed submit). It shows an application error (a
|
|
144
|
+
server's verdict) immediately. The starter's form-field bridge
|
|
145
|
+
(`controllers/FormField`: `bindFormField`, `bindForm`, and the hooks
|
|
146
|
+
`useFormField` and `useFormBridge`) mirrors that timing onto the field's root as
|
|
147
|
+
`data-user-invalid`, `data-user-valid` and `data-autofill`, which recipes select
|
|
148
|
+
as ordinary attribute states. It also sets `aria-invalid` explicitly, links the
|
|
149
|
+
error message with `aria-describedby` only while it is shown, announces an error
|
|
150
|
+
that appears on blur once through the form's one polite live region, and after a
|
|
151
|
+
failed submit focuses the form's error summary, or the first invalid field.
|
|
152
|
+
Where the browser lacks `:user-invalid`, its own tracked events give the same
|
|
153
|
+
timing.
|
|
154
|
+
|
|
155
|
+
The starter's `TextField` takes `type`, `autoComplete`, `inputMode`,
|
|
156
|
+
`enterKeyHint`, `spellCheck`, `autoCorrect` and `autoCapitalize` (off by default
|
|
157
|
+
for email, tel, url and password), `pattern`, `minLength`, `maxLength`,
|
|
158
|
+
`required`, `error` (the application's), `validationMessage` and
|
|
159
|
+
`nativeValidation`. Its invalid and autofill states draw inset rings, which take
|
|
160
|
+
no space and are not colour alone.
|
|
161
|
+
|
|
162
|
+
`ads check` blocks an error or autofill state shown by colour alone
|
|
163
|
+
(`source/form-state-colour-only`) and an autofill treatment that moves layout
|
|
164
|
+
(`source/autofill-layout-shift`). It reviews a text field that names what it
|
|
165
|
+
collects without `autoComplete` (`review/autocomplete-missing`). Read the forms
|
|
166
|
+
guide ([forms.md](../skills/ads-designer/references/forms.md),
|
|
167
|
+
`ads://guides/forms`) for the timing, the bridge's API, the recipe states and
|
|
168
|
+
the browser limits. ADS's browser tests run in Chromium only.
|
|
169
|
+
|
|
170
|
+
## Set up a design package
|
|
171
|
+
|
|
172
|
+
A design system lives in its own package, the *design package*: a folder with
|
|
173
|
+
its own `package.json`, `ds.config.json`, `tsconfig.json` and `design-system/`.
|
|
174
|
+
ADS runs only there. Applications consume what `ads emit` writes and never
|
|
175
|
+
install ADS. Install Bun 1.4.1 or later for ADS tooling and previews. ADS ships
|
|
176
|
+
everything else it needs (its own Playwright and browser, its test runners) and
|
|
177
|
+
needs nothing from the application.
|
|
178
|
+
|
|
179
|
+
There are two layouts.
|
|
180
|
+
|
|
181
|
+
**Several applications, one design system.** The design package has its own
|
|
182
|
+
repository. Its output is `dist/`, which its `exports` publish and which is
|
|
183
|
+
committed, so a Git reference installs it:
|
|
161
184
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
185
|
+
```sh
|
|
186
|
+
bunx @reqvire-org/ads init acme-design --framework react # or npx … init
|
|
187
|
+
cd acme-design && bun install
|
|
188
|
+
bun run lint:ds # ads check
|
|
189
|
+
bun run emit:ds # ads emit → dist/
|
|
190
|
+
git add . && git commit -m "Design system 1.0.0" && git tag v1.0.0
|
|
191
|
+
```
|
|
167
192
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
193
|
+
```json
|
|
194
|
+
{
|
|
195
|
+
"name": "@acme/ui",
|
|
196
|
+
"version": "1.0.0",
|
|
197
|
+
"type": "module",
|
|
198
|
+
"exports": { ".": "./dist/index.ts", "./foundation.css": "./dist/foundation.css" },
|
|
199
|
+
"files": ["dist"],
|
|
200
|
+
"sideEffects": ["*.css"],
|
|
201
|
+
"peerDependencies": { "react": "^19.0.0" },
|
|
202
|
+
"devDependencies": { "@reqvire-org/ads": "^0.5.0", "react": "19.2.7", "react-dom": "19.2.7", "@types/react": "19.2.17" },
|
|
203
|
+
"scripts": { "lint:ds": "ads check .", "emit:ds": "ads emit" }
|
|
204
|
+
}
|
|
205
|
+
```
|
|
171
206
|
|
|
172
|
-
|
|
207
|
+
An application in another repository depends on it by Git reference (or a packed
|
|
208
|
+
tarball, or a registry release), and installs its own React:
|
|
173
209
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
210
|
+
```json
|
|
211
|
+
{
|
|
212
|
+
"name": "shop-app",
|
|
213
|
+
"private": true,
|
|
214
|
+
"type": "module",
|
|
215
|
+
"dependencies": {
|
|
216
|
+
"@acme/ui": "git+ssh://git@github.com/acme/acme-design.git#v1.0.0",
|
|
217
|
+
"react": "^19.0.0",
|
|
218
|
+
"react-dom": "^19.0.0"
|
|
219
|
+
},
|
|
220
|
+
"devDependencies": { "vite": "^7.0.0", "@vitejs/plugin-react": "^5.0.0", "typescript": "^5.9.0" },
|
|
221
|
+
"scripts": { "dev": "vite", "build": "vite build" }
|
|
222
|
+
}
|
|
223
|
+
```
|
|
178
224
|
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
|
|
225
|
+
```tsx
|
|
226
|
+
import "@acme/ui/foundation.css";
|
|
227
|
+
import { Button } from "@acme/ui";
|
|
182
228
|
```
|
|
183
229
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
namespace is also recognized by guards. See the [Preact upgrade guide](https://preactjs.com/guide/v11/upgrade-guide/).
|
|
195
|
-
|
|
196
|
-
The [shared starter](https://github.com/reqvire-org/ads/tree/main/starters/shared)
|
|
197
|
-
and its [native generator](https://github.com/reqvire-org/ads/blob/main/scripts/build-starters.mjs)
|
|
198
|
-
show the setup. `ads init --framework preact --include-starter` adds the generated
|
|
199
|
-
Preact variant of that source. The generator changes runtime dependencies, JSX
|
|
200
|
-
settings, framework imports and the native mount together. For a Preact app without a saved framework, run
|
|
201
|
-
`ads init --framework preact`; newly generated foundation scenarios use native
|
|
202
|
-
hooks. Init preserves the application's compiler, dependencies and mount adapter.
|
|
203
|
-
|
|
204
|
-
### CSS correctness in the tool and starter
|
|
205
|
-
|
|
206
|
-
The tool and starter use Biome only for CSS, configured in
|
|
207
|
-
`biome.css.json`. Parsing rejects malformed CSS and invalid hex colors, including
|
|
208
|
-
token values. Explicit lint rules reject duplicate font names and selectors;
|
|
209
|
-
the starter also rejects duplicate properties. Formatting is disabled. ADS directly checks architecture, token usage and
|
|
210
|
-
ownership in JavaScript/TypeScript. The tool repository uses Oxlint for its own
|
|
211
|
-
ordinary JavaScript linting; consumers do not need that extra pass. `ads init` preserves an existing project's lint tools.
|
|
212
|
-
|
|
213
|
-
CSS regression tests cover rejected input, valid theme/nesting
|
|
214
|
-
contexts, and exclusion of JavaScript and generated outputs.
|
|
215
|
-
|
|
216
|
-
## Set up an existing project
|
|
217
|
-
|
|
218
|
-
Install Bun 1.4.1+ for ADS tooling and previews. The application keeps its own
|
|
219
|
-
Node/npm or Bun pipeline. Run inside the project containing `package.json`:
|
|
230
|
+
To upgrade, move the ref (`#v1.1.0`). To try an unreleased change, use a branch
|
|
231
|
+
ref or a packed tarball. Git references, tarballs and registries install a copy
|
|
232
|
+
without the design package's `devDependencies`. Its React for authoring is thus
|
|
233
|
+
never installed into the application: one React, no bundler setting. Symlinked
|
|
234
|
+
local dependencies (`file:` to a folder, `link:`, `npm link`) are not supported:
|
|
235
|
+
the application would resolve the design package's own `node_modules` first and
|
|
236
|
+
could load a second React.
|
|
237
|
+
|
|
238
|
+
**One application, one design system.** The design package is a folder in the
|
|
239
|
+
application's repository and emits directly into the application's source:
|
|
220
240
|
|
|
221
241
|
```sh
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
npm run build
|
|
242
|
+
cd shop-app
|
|
243
|
+
bunx @reqvire-org/ads init design --framework react --out ../src/ui
|
|
244
|
+
cd design && bun install && bun run emit:ds # → ../src/ui
|
|
226
245
|
```
|
|
227
246
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
the
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
247
|
+
```
|
|
248
|
+
shop-app/
|
|
249
|
+
├── package.json the application (no ADS)
|
|
250
|
+
├── src/ui/ emitted by ADS, committed
|
|
251
|
+
└── design/
|
|
252
|
+
├── package.json the design package (private)
|
|
253
|
+
├── ds.config.json { "compile": { "outDir": "../src/ui" } }
|
|
254
|
+
└── design-system/
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
The application imports the output as its own code
|
|
258
|
+
(`import { Button } from "./ui"` and `import "./ui/foundation.css"`). Emitted
|
|
259
|
+
files import `react` and resolve it upward from their folder, so `src/ui`
|
|
260
|
+
reaches the application's `node_modules` and its one React. This is why the
|
|
261
|
+
output does not stay inside the design folder in this layout. The design package
|
|
262
|
+
stays private, with no peers and no `exports`.
|
|
263
|
+
|
|
264
|
+
**Dependencies.** Each package that the emitted output imports must reach the
|
|
265
|
+
application:
|
|
266
|
+
|
|
267
|
+
| Kind | Example | Several applications (design package) | One application |
|
|
268
|
+
| --- | --- | --- | --- |
|
|
269
|
+
| Framework | `react`, `preact` | `peerDependencies` (range), pinned in `devDependencies` | application `dependencies` |
|
|
270
|
+
| Headless library holding shared state (context, focus) | `react-aria` | `peerDependencies` (range), pinned in `devDependencies` | application `dependencies` |
|
|
271
|
+
| Stateless library | `date-fns` | `dependencies` (installed with the design package) | application `dependencies` |
|
|
272
|
+
| Types only | `@types/react` | `devDependencies` | application `devDependencies` if it typechecks the output |
|
|
273
|
+
|
|
274
|
+
A library that holds shared state must be the application's one copy, so it is a
|
|
275
|
+
peer. npm 7+, pnpm and Bun install a missing peer and report a range conflict.
|
|
276
|
+
|
|
277
|
+
- With the output inside the design package, `ads check` reports
|
|
278
|
+
`package-dependency-undeclared` when the output imports a package at runtime
|
|
279
|
+
that the design package declares only in `devDependencies` or nowhere.
|
|
280
|
+
- In the one-application layout, the application's build enforces the rule: a
|
|
281
|
+
missing package is an unresolved import that names it.
|
|
282
|
+
- In both layouts, `ads emit` writes `ads-dependencies.json`: the packages that
|
|
283
|
+
the application must satisfy, with ranges and runtime or types use.
|
|
284
|
+
|
|
285
|
+
`<outDir>/package.json` declares `"sideEffects": ["*.css"]` in both layouts
|
|
286
|
+
([Consuming the output](#consuming-the-output)).
|
|
287
|
+
|
|
288
|
+
**Framework.** `--framework react` or `--framework preact` is required on the
|
|
289
|
+
first init. Init saves it as `framework` in `ds.config.json`, and later runs use
|
|
290
|
+
the saved value. ADS does not detect a framework and has no default. A Preact
|
|
291
|
+
design system gets the native Preact starter: the same design system, with
|
|
292
|
+
owners that import `preact/hooks` and Preact's types (`ComponentChildren`). If
|
|
293
|
+
the flag differs from the saved framework, init stops; change `ds.config.json`
|
|
294
|
+
explicitly.
|
|
295
|
+
|
|
296
|
+
**What init does.** `ads init [folder]` (the current folder by default):
|
|
297
|
+
|
|
298
|
+
- Creates the folder and its `package.json` when absent (name from the folder,
|
|
299
|
+
`version` `0.1.0`, `type: "module"`, and `private` with `--out`).
|
|
300
|
+
- Copies the starter's declared file set into an empty or absent design-system
|
|
301
|
+
folder: role token sheets, profiles, `foundation.ads.ts`, asset declarations
|
|
302
|
+
and drawings, controllers, owners, mocks, `palette.generated.ts` and
|
|
303
|
+
the authored barrel `index.ts`. Init generates nothing else.
|
|
304
|
+
- Writes `ds.config.json` with `schemaVersion`, `framework`, `dsDir` and the
|
|
305
|
+
`compile` defaults (`outDir` from `--out`). If the file exists, init keeps
|
|
306
|
+
every saved field and adds only the missing ones. Themes and brands are
|
|
307
|
+
declared in `foundation.ads.ts`, never in `ds.config.json`.
|
|
308
|
+
- Adds the tool and the framework's packages (`react`, `react-dom` and
|
|
309
|
+
`@types/react`, or `preact`) to `devDependencies` when neither dependency map
|
|
310
|
+
declares them. It keeps an existing tool version unless `--tool-package`
|
|
311
|
+
overrides it.
|
|
312
|
+
- Without `--out`, also adds the framework to `peerDependencies` and, when
|
|
313
|
+
absent, `exports`, `files` and `sideEffects` that publish `dist/`.
|
|
314
|
+
- Adds `lint:ds` (`ads check .`) and `emit:ds` (`ads emit`), in the spelling of
|
|
315
|
+
the package's package manager.
|
|
316
|
+
- Writes `tsconfig.json` and `ads-env.d.ts` when the package has no tsconfig:
|
|
317
|
+
bundler resolution, the framework's JSX, `@ds` mapped to the barrel, and SVG
|
|
318
|
+
module declarations. Editors and the package's own typecheck thus never use
|
|
319
|
+
the tsconfig of an enclosing application.
|
|
320
|
+
- Never edits `.gitignore`, never writes a lockfile, never follows symlinks and
|
|
321
|
+
never overwrites a project file. Ignore `.ds/` (ADS's caches and working
|
|
322
|
+
files) yourself.
|
|
323
|
+
|
|
324
|
+
A second run changes nothing. If the design-system folder already has content
|
|
325
|
+
and the package has a `ds.config.json`, init keeps the folder unchanged,
|
|
326
|
+
completes only the configuration and dependencies, and prints a notice. Without
|
|
327
|
+
a `ds.config.json`, init stops (`design-system-exists`): move the folder, or add
|
|
328
|
+
a `ds.config.json` (with another `dsDir` if that folder is not the design
|
|
329
|
+
system).
|
|
330
|
+
|
|
331
|
+
Init also stops before any write for an unrelated custom `lint:ds` or `emit:ds`
|
|
332
|
+
script, and for an `--out` folder that ADS cannot own
|
|
333
|
+
([The output folder](#the-output-folder)).
|
|
334
|
+
|
|
335
|
+
The JSON result of `ads init` reports `framework`, `packageManager`,
|
|
336
|
+
`toolDependency`, `designSystem` (`installed` with a file count, or `kept`),
|
|
337
|
+
`notices` and `updatedFiles`.
|
|
293
338
|
|
|
294
339
|
## Package manager detection
|
|
295
340
|
|
|
296
|
-
`init` reads
|
|
341
|
+
This version supports npm and Bun. `init` reads the package manager from the
|
|
342
|
+
design package:
|
|
297
343
|
|
|
298
|
-
1.
|
|
344
|
+
1. The `packageManager` field in its `package.json`.
|
|
299
345
|
2. Its Bun (`bun.lock` or `bun.lockb`) or npm (`package-lock.json`) lockfile.
|
|
300
346
|
|
|
301
|
-
A
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
does not
|
|
308
|
-
including ADS, run on Bun despite Node shebangs.
|
|
309
|
-
Launch the MCP server with `bunx @reqvire-org/ads mcp`, or its generated
|
|
310
|
-
`ads-mcp` script. Managed workers and screenshot capture inherit the interpreter.
|
|
311
|
-
Use `command: "runtime"` for portable preview compiler/behavior profiles;
|
|
312
|
-
explicit `node`, `bun` or other commands are respected. Project-specific tools
|
|
313
|
-
must themselves support the selected runtime. `ads_status.project.runtime`
|
|
314
|
-
reports the actual name, version and executable; package manager and UI framework
|
|
315
|
-
are separate choices.
|
|
316
|
-
|
|
317
|
-
## Migrating from DS
|
|
318
|
-
|
|
319
|
-
ADS uses the package `@reqvire-org/ads`, CLI `ads`, MCP tools named `ads_*`,
|
|
320
|
-
resource namespaces `ads://`, `ui://ads` and `skill://ads`, and skills named
|
|
321
|
-
`ads-*`. Replace the old `@reqvire-org/ds` dependency and package imports, install
|
|
322
|
-
dependencies, then run `ads init` to refresh managed build hooks. Existing
|
|
323
|
-
`ds.config.json`, `.ds/`, `design-system/`, `@ds`, shared token names and
|
|
324
|
-
`--ds-*`/`--ux-*` ownership prefixes remain valid. Project UI requires no rewrite.
|
|
325
|
-
|
|
326
|
-
Use `ads-mcp` and `ads-read-mcp` for the editing and read-only launch scripts.
|
|
327
|
-
Update MCP client configuration to the new package/server name and reconnect;
|
|
328
|
-
tool names and resource URIs have changed. Install the renamed `ads-*` skills
|
|
329
|
-
when using local skill installation. Rebuild previews with the new tool to
|
|
330
|
-
refresh generated resource manifests. Existing `DS.md` project guides are still
|
|
331
|
-
discovered; the tool's contract and new scaffold use `ADS.md`.
|
|
332
|
-
|
|
333
|
-
npm has no in-place package rename: publish `@reqvire-org/ads` as a new package.
|
|
334
|
-
Set up its own trusted publisher for `reqvire-org/ads`, workflow
|
|
335
|
-
`release.yml`, allowing `npm publish` and `npm dist-tag`. Once ADS is available,
|
|
336
|
-
deprecate the old package with a migration message:
|
|
337
|
-
|
|
338
|
-
```sh
|
|
339
|
-
npm deprecate @reqvire-org/ds "Renamed to @reqvire-org/ads. Install that package instead."
|
|
340
|
-
```
|
|
347
|
+
A new design package follows the repository it is created in: the nearest
|
|
348
|
+
enclosing folder with a `packageManager` field or a lockfile (an application, in
|
|
349
|
+
the one-application layout). Otherwise it uses Bun, which runs ADS. An existing
|
|
350
|
+
package that declares neither stops init with an error that names what to add.
|
|
351
|
+
With both lockfile types and no `packageManager`, keep one lockfile or set the
|
|
352
|
+
field. ADS never replaces or removes a lockfile. The launcher (`npx` or `bunx`)
|
|
353
|
+
does not change the package's choice.
|
|
341
354
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
355
|
+
Launch the MCP server with `bunx @reqvire-org/ads mcp` or
|
|
356
|
+
`npx @reqvire-org/ads mcp` in the design package. `ads_status.project.runtime`
|
|
357
|
+
reports the actual name, version and executable. The package manager and the UI
|
|
358
|
+
framework are separate choices.
|
|
346
359
|
|
|
347
360
|
## Develop ADS locally
|
|
348
361
|
|
|
349
|
-
|
|
362
|
+
These commands are for work on the ADS repository. Projects that use the
|
|
363
|
+
published package do not need them.
|
|
364
|
+
|
|
365
|
+
**Playground.** `bun run dev` (or `bun run dev:react`, the same command) builds
|
|
366
|
+
the tool and serves the showcase for a playground: a working copy of
|
|
367
|
+
`tests/fixtures/reference-project` in the ignored folder `.ds/playground/`.
|
|
368
|
+
Serving, drafts and accepted changes thus never change the fixture that the
|
|
369
|
+
tests read. `scripts/playground.mjs` creates the copy once.
|
|
370
|
+
`bun scripts/playground.mjs showcase --fresh` replaces it with the fixture's
|
|
371
|
+
current files, and the same script runs `mcp`, `check`, `validate`, `emit` or
|
|
372
|
+
`sync` on it. Playground edits are experiments: promote deliberate changes to
|
|
373
|
+
the fixture or the starter by hand.
|
|
374
|
+
|
|
375
|
+
To run the playground's MCP server and showcase together:
|
|
350
376
|
|
|
351
377
|
```sh
|
|
352
|
-
|
|
378
|
+
bun run ads-mcp -- --port 4191 # guarded editing enabled
|
|
353
379
|
# or:
|
|
354
|
-
|
|
380
|
+
bun run ads-read-mcp -- --port 4191 # read-only
|
|
355
381
|
```
|
|
356
382
|
|
|
357
|
-
Run one at a time and open **http://127.0.0.1:4191/**.
|
|
358
|
-
|
|
359
|
-
MCP client's launch configuration,
|
|
360
|
-
`npm --silent run ads-
|
|
361
|
-
|
|
362
|
-
|
|
383
|
+
Run one at a time and open **http://127.0.0.1:4191/**. Each command builds the
|
|
384
|
+
local tool (build logs go to stderr), then starts stdio MCP, the showcase and
|
|
385
|
+
its managed preview compiler. For an MCP client's launch configuration, run the
|
|
386
|
+
script silently (`npm --silent run ads-mcp`), so that a package manager banner
|
|
387
|
+
does not enter the JSON-RPC stream. If you need only the stdio connection, add
|
|
388
|
+
`--no-showcase` after `--`.
|
|
389
|
+
|
|
390
|
+
**Showcase UI.** `bun run dev:ui` serves ADS's own showcase design system
|
|
391
|
+
(`showcase-ui/`) in place, so its scenarios refresh as you edit them.
|
|
392
|
+
`bun run check:ui` validates it. Both build ADS first and link this checkout
|
|
393
|
+
into `showcase-ui/node_modules` (ignored). `bun run build` builds the showcase's
|
|
394
|
+
bundle from it.
|
|
363
395
|
|
|
364
|
-
Use `npm link` to try changes from this checkout in a
|
|
365
|
-
with ADS. From the ADS repository root:
|
|
396
|
+
**Link the checkout.** Use `npm link` to try changes from this checkout in a
|
|
397
|
+
project that is already set up with ADS. From the ADS repository root:
|
|
366
398
|
|
|
367
399
|
```sh
|
|
368
400
|
npm install
|
|
@@ -370,49 +402,58 @@ npm run build
|
|
|
370
402
|
npm link
|
|
371
403
|
```
|
|
372
404
|
|
|
373
|
-
Then
|
|
405
|
+
Then, in the test project, after you install its normal dependencies:
|
|
374
406
|
|
|
375
407
|
```sh
|
|
376
408
|
npm link @reqvire-org/ads
|
|
377
409
|
npm exec -- ads --version
|
|
378
|
-
npm run
|
|
410
|
+
npm run lint:ds
|
|
379
411
|
```
|
|
380
412
|
|
|
381
|
-
The project now uses your checkout through a symlink
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
the client starts in this project. The version check confirms which build is
|
|
385
|
-
running. See [npm's linking documentation](https://docs.npmjs.com/cli/v11/commands/npm-link/)
|
|
413
|
+
The project now uses your checkout through a symlink, and the version check
|
|
414
|
+
confirms which build runs. See
|
|
415
|
+
[npm's linking documentation](https://docs.npmjs.com/cli/v11/commands/npm-link/)
|
|
386
416
|
and [local-package resolution](https://docs.npmjs.com/cli/v11/commands/npm-exec/).
|
|
387
417
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
`npm
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
418
|
+
- Keep the normal published dependency in the project's `package.json`.
|
|
419
|
+
- The versionless `npx -y @reqvire-org/ads mcp` configuration uses the linked
|
|
420
|
+
copy when the client starts in this project.
|
|
421
|
+
- The link points to the built `dist/`; it does not compile source. After you
|
|
422
|
+
change ADS tool code, packaged skills, the starter or the showcase client, run
|
|
423
|
+
`npm run build` in this checkout and reconnect MCP.
|
|
424
|
+
- Changes to the test project's design system still use its managed preview
|
|
425
|
+
watcher.
|
|
426
|
+
- If `npm install` or `npm ci` in the test project replaces the link, run
|
|
427
|
+
`npm link @reqvire-org/ads` again.
|
|
428
|
+
- To return to the published version, run
|
|
429
|
+
`npm unlink --no-save @reqvire-org/ads` and then `npm install` in the test
|
|
430
|
+
project. To remove the global development link, run
|
|
431
|
+
`npm unlink --global @reqvire-org/ads`.
|
|
432
|
+
|
|
433
|
+
**MCP Explorer.** For this checkout's diagnostic MCP client, run:
|
|
400
434
|
|
|
401
435
|
```sh
|
|
402
436
|
npm run dev:mcp-explorer
|
|
403
437
|
```
|
|
404
438
|
|
|
405
|
-
Open **http://127.0.0.1:4190/**.
|
|
406
|
-
its showcase and ADS-managed preview compiler. The
|
|
407
|
-
[explorer guide](../mcp-explorer/README.md) covers tools, resources, prompts,
|
|
408
|
-
notifications and widget checks.
|
|
409
|
-
|
|
410
|
-
the
|
|
439
|
+
Open **http://127.0.0.1:4190/**. The command builds ADS and starts the real
|
|
440
|
+
stdio server, its showcase and the ADS-managed preview compiler. The
|
|
441
|
+
[explorer guide](../mcp-explorer/README.md) covers tools, resources, prompts,
|
|
442
|
+
skills, notifications and widget checks.
|
|
443
|
+
|
|
444
|
+
### CSS correctness in the tool
|
|
445
|
+
|
|
446
|
+
The tool repository uses Biome only for CSS, configured in `biome.css.json`.
|
|
447
|
+
Parsing rejects malformed CSS and invalid hex colors. Explicit lint rules reject
|
|
448
|
+
duplicate font names and duplicate selectors. Formatting is disabled. The tool
|
|
449
|
+
repository uses Oxlint for its own JavaScript linting; consumers do not need
|
|
450
|
+
that pass. `ads init` preserves an existing project's lint tools.
|
|
411
451
|
|
|
412
452
|
## Test a local package
|
|
413
453
|
|
|
414
|
-
Use a tarball to verify the packed release and a clean install before
|
|
415
|
-
For iterative development,
|
|
454
|
+
Use a tarball to verify the packed release and a clean install before you
|
|
455
|
+
publish. For iterative development, link the checkout
|
|
456
|
+
([Develop ADS locally](#develop-ads-locally)). From the repository root:
|
|
416
457
|
|
|
417
458
|
```sh
|
|
418
459
|
npm install
|
|
@@ -421,130 +462,134 @@ npm run pack:tool
|
|
|
421
462
|
ads_tool_package="$PWD/output/npm/reqvire-org-ads-$(bun -p 'require("./package.json").version').tgz"
|
|
422
463
|
```
|
|
423
464
|
|
|
424
|
-
Then
|
|
465
|
+
Then create a design package beside (or inside) a test application:
|
|
425
466
|
|
|
426
467
|
```sh
|
|
427
|
-
cd /absolute/path/to/test-
|
|
428
|
-
npx --yes --package "$ads_tool_package" ads init --framework react --tool-package "$ads_tool_package"
|
|
468
|
+
cd /absolute/path/to/test-application
|
|
469
|
+
npx --yes --package "$ads_tool_package" ads init design --framework react --out ../src/ui --tool-package "$ads_tool_package"
|
|
470
|
+
cd design
|
|
429
471
|
npm install
|
|
430
|
-
npm run
|
|
472
|
+
npm run lint:ds
|
|
473
|
+
npm run emit:ds
|
|
431
474
|
```
|
|
432
475
|
|
|
433
|
-
|
|
434
|
-
`--tool-package` accepts an absolute local tarball path, a version, or a
|
|
435
|
-
package/version. A tarball becomes a `file:` development dependency, so
|
|
436
|
-
available for subsequent installs. A published pinned version is
|
|
437
|
-
between machines without an archive. Routine builds need no global
|
|
476
|
+
For Bun, use `bun install` and `bun run lint:ds`. Keep the npx options before
|
|
477
|
+
`ads`. `--tool-package` accepts an absolute local tarball path, a version, or a
|
|
478
|
+
matching package/version. A tarball becomes a `file:` development dependency, so
|
|
479
|
+
keep it available for subsequent installs. A published pinned version is
|
|
480
|
+
portable between machines without an archive. Routine builds need no global
|
|
481
|
+
install.
|
|
438
482
|
|
|
439
483
|
## Commands and checks
|
|
440
484
|
|
|
441
485
|
| Command | Behavior |
|
|
442
486
|
|---------|----------|
|
|
443
|
-
| `ads init --framework react` |
|
|
444
|
-
| `ads check [directory]` | Read-only
|
|
445
|
-
| `ads
|
|
446
|
-
| `ads
|
|
487
|
+
| `ads init [folder] --framework react [--out ../src/ui]` | Set up the design package: tooling, configuration and the starter design system ([Set up a design package](#set-up-a-design-package)). A saved framework can omit the flag |
|
|
488
|
+
| `ads check [directory]` | Read-only check of the design system: structure, imports, owner analysis, mocks and the emitted output ([Design system source](#design-system-source)) |
|
|
489
|
+
| `ads compile [directory]` | Build ADS previews with Bun (`--watch` for incremental previews) |
|
|
490
|
+
| `ads emit [directory]` | Check, then write the compiled design system to its output folder ([Emitting the design system](#emitting-the-design-system)) |
|
|
491
|
+
| `ads sync [directory]` | Regenerate stale generated source files ([Regenerating generated source](#regenerating-generated-source)) |
|
|
492
|
+
| `ads validate [directory]` | The project gate (`--changed` limits it to what changed since the last successful full run) |
|
|
493
|
+
| `ads behaviors [directory]` | Registered behavior checks and current verification evidence |
|
|
494
|
+
| `ads verify [directory]` | Run registered behavior checks (`--unit` and `--check` select) |
|
|
495
|
+
| `ads audit [directory]` | Render audit of registered scenarios (`--scenario`, `--theme` and `--brand` select) |
|
|
496
|
+
| `ads tokens [directory]` | The design system's tokens: values per theme, brand and condition, declarations, profiles, owners and value-shape status (`--query`, `--role`, `--group`, `--limit`; `--format dtcg` exports DTCG JSON) ([Inspecting tokens and the public API](#inspecting-tokens-and-the-public-api)) |
|
|
447
497
|
| `ads mcp [directory]` | Serve tools, resources, prompts, skills and preview Apps; start the local showcase |
|
|
448
498
|
| `ads mcp --mutations` | Enable guarded edits to the local ADS, validated before application |
|
|
449
499
|
| `ads showcase [directory]` | Start the same MCP runtime and showcase for browser-only use |
|
|
450
500
|
| `ads --version`, `ads --help` | Version and usage |
|
|
451
501
|
|
|
452
|
-
`init`
|
|
453
|
-
|
|
454
|
-
for inspection
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
`
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
These are static checks, not framework type checking or browser CSS evaluation.
|
|
502
|
-
Arbitrary computed expressions, combined conditional cascade behavior, computed
|
|
503
|
-
module specifiers, JSX spreads, other styling engines, and renderer-specific APIs
|
|
504
|
-
need the project's existing checks and review. Continue to run its type checking,
|
|
505
|
-
component tests, and browser comparisons. Register component-specific guards as
|
|
506
|
-
explicit project scripts; include them in builds and `acceptance.scripts` when
|
|
507
|
-
required. `ads check` does not invoke project linter plugins.
|
|
502
|
+
`init` takes the folder of the design package to create or complete. Other
|
|
503
|
+
commands inspect the given directory. All default to the current folder.
|
|
504
|
+
`--json` gives structured results for inspection and setup commands; `mcp` uses
|
|
505
|
+
stdout only for JSON-RPC. `--fresh` (check and validate) executes the batch
|
|
506
|
+
checks without task-cache reads ([caching](CACHING.md)).
|
|
507
|
+
|
|
508
|
+
Exit codes:
|
|
509
|
+
|
|
510
|
+
- 0: success.
|
|
511
|
+
- 1: error findings, or a gate that did not pass. `ads audit` also exits 1 when
|
|
512
|
+
it ran nothing (no registered or selected scenario): its result is
|
|
513
|
+
`not-available`, never `ok`.
|
|
514
|
+
- 2: invalid input or configuration, or an execution error. With `--json`, an
|
|
515
|
+
execution error prints `{ "ok": false, "error" }`.
|
|
516
|
+
|
|
517
|
+
Review and info items never change the exit code. A one-shot command exits as
|
|
518
|
+
soon as it has reported: it closes its native compiler clients and does not wait
|
|
519
|
+
for their idle timeout. `ads mcp`, `ads showcase` and the `--watch` modes run
|
|
520
|
+
until stopped.
|
|
521
|
+
|
|
522
|
+
These are static checks. They are not framework type checking of the
|
|
523
|
+
application, and they do not evaluate CSS in a browser. Continue to run the
|
|
524
|
+
project's type checking, tests and browser comparisons. Register
|
|
525
|
+
project-specific guards as explicit project scripts, and include them in builds
|
|
526
|
+
and in `acceptance.scripts` when required. `ads check` does not invoke project
|
|
527
|
+
linter plugins. Keep the normal build gates enabled for edits made by other
|
|
528
|
+
tools.
|
|
529
|
+
|
|
530
|
+
**Guarded editing.** Guarded MCP editing is opt-in. Its mandatory checks and the
|
|
531
|
+
optional project `acceptance.scripts` run in a temporary project copy with
|
|
532
|
+
installed dependencies. See the [editing contract](MCP.md#guarded-editing) for
|
|
533
|
+
unit ownership, Git patches, bounded reads and preview review.
|
|
534
|
+
|
|
535
|
+
- `acceptance.scripts` and `validation.scripts` default to empty; ADS infers no
|
|
536
|
+
names. `ads validate` runs `acceptance.scripts` and then `validation.scripts`,
|
|
537
|
+
so list each script once. After direct source edits, run
|
|
538
|
+
`ads validate --changed`
|
|
539
|
+
([the two gates](../skills/ads-designer/references/validation.md)).
|
|
540
|
+
- Each project script has 60 seconds by default. For measured slower builds, set
|
|
541
|
+
`mcp.mutationCheckTimeoutMs` (100–300000 ms). Behavior profiles have a
|
|
542
|
+
separate whole-run budget.
|
|
543
|
+
- A preview waits up to 5 minutes for its build, including the first build after
|
|
544
|
+
the MCP server starts. `mcp.previewBuildTimeoutMs` (1000–3600000 ms) changes
|
|
545
|
+
this.
|
|
546
|
+
- When acceptance runs the owners' registered behavior checks, or a capture was
|
|
547
|
+
requested, ADS builds production previews and shares them with browser
|
|
548
|
+
verification. The render audit of acceptance renders the owners' UI scenarios
|
|
549
|
+
in the candidate on that host, or compiles only those scenarios when nothing
|
|
550
|
+
else needs previews. Core-only acceptance does not build the whole graph.
|
|
508
551
|
|
|
509
552
|
### Checks and guards
|
|
510
553
|
|
|
511
|
-
Every finding has one of three kinds
|
|
554
|
+
Every finding has one of three kinds. No setting changes the kind of a finding,
|
|
555
|
+
and there is no warning level.
|
|
512
556
|
|
|
513
557
|
- **Error**: fails `ads check`, `ads audit`, `ads validate` and MCP acceptance.
|
|
514
|
-
- **Review**: shown, never blocks
|
|
515
|
-
- **Info**: notes an analysis limit, such as
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
558
|
+
- **Review**: shown, never blocks. It names something only a person can judge.
|
|
559
|
+
- **Info**: notes an analysis limit, such as an owner that is not analysed until
|
|
560
|
+
another owner is fixed.
|
|
561
|
+
|
|
562
|
+
**Repair plan.** When a command fails, its text output ends with a repair plan:
|
|
563
|
+
the failed rules grouped by mistake, in the order to fix them, each with its
|
|
564
|
+
repair hint and the guides to read. An earlier group is often the cause of later
|
|
565
|
+
errors, so fix the first group and check again. After the steps, the plan names
|
|
566
|
+
the owners that are not analysed until those errors are fixed, one line each
|
|
567
|
+
(`Not analysed until fixed: <owner> (blocked by <owner>)`, capped, with the rest
|
|
568
|
+
in `--json`). `--json` output is the command's result unchanged. MCP replies
|
|
569
|
+
carry the plan as `repair`, with the owners in `repair.notAnalysed`.
|
|
570
|
+
[The rule reference](RULES.md) lists every rule under its group; agents read the
|
|
571
|
+
same catalogue as `ads://guides/errors`.
|
|
572
|
+
|
|
573
|
+
**Text output.** Text output prints errors and review items, but not individual
|
|
574
|
+
info notes. The summary line counts them and says where to read them, for
|
|
575
|
+
example
|
|
576
|
+
`ADS check failed: . (1 error, 4 review items, 38 info notes; --json lists them)`.
|
|
577
|
+
The info part is omitted when there are none. `ads validate` adds the same count
|
|
578
|
+
to its summary line. `ads audit` prints its info rows and counts them in its
|
|
579
|
+
summary.
|
|
519
580
|
|
|
520
581
|
**Gates.**
|
|
521
582
|
|
|
522
583
|
| Gate | What runs |
|
|
523
584
|
|---|---|
|
|
524
|
-
| `ads check` |
|
|
525
|
-
| `ads audit` | axe-core (WCAG A/AA rules), ADS's non-text contrast check, `layout-shift
|
|
585
|
+
| `ads check` | Design-system structure, the import closure, owner analysis, mock ownership, declared themes and brands, generated source and the emitted output folder; no browser |
|
|
586
|
+
| `ads audit` | `ads check`, then axe-core (WCAG A/AA rules), ADS's non-text contrast check, `layout-shift`, `layout-overflow` and `img-shape` in every registered scenario, once per declared brand and theme, and the text passes (`a11y-text-scale`, `a11y-text-spacing-override`, `a11y-reflow`) once per scenario |
|
|
526
587
|
| MCP acceptance | `ads_accept` checks the draft's candidate and writes no source unless it passes (`dryRun:true` writes nothing): `ads check` rules, `acceptance.scripts`, the draft owners' own registered behavior tests (`acceptance.behavior`, default `true`) and the render audit of their own UI scenarios (`acceptance.audit`, default `true`) |
|
|
527
588
|
| `ads validate` | The project gate, applying nothing: `ads check` rules, `acceptance.scripts` then `validation.scripts`, current previews, and every registered behavior test and render audit its change set reaches |
|
|
528
|
-
| `ads validate --changed` | The same for what changed since the last successful full run
|
|
529
|
-
|
|
530
|
-
**Render audit.** `ads validate` always runs it over the scenarios its change set
|
|
531
|
-
reaches; draft acceptance runs it over the draft owners' own scenarios.
|
|
532
|
-
`mcp.auditPages` (1–16, default 4) sets how many pages render at once. Each `a11y-axe`,
|
|
533
|
-
`a11y-non-text-contrast`, `layout-overflow` and `layout-shift` finding is an error that fails the gate, and an audit that cannot run fails it with a `render-audit` error
|
|
534
|
-
naming what to install. Each `a11y-incomplete` finding is an info item that fails nothing: axe could
|
|
535
|
-
not decide that rule on those elements, so check it by hand. It names the axe rule, scenario, themes,
|
|
536
|
-
elements, and axe's reason, such as `bgGradient` for text over a gradient. The audit needs the
|
|
537
|
-
project's Playwright and a browser:
|
|
589
|
+
| `ads validate --changed` | The same for what changed since the last successful full run. Configuration, foundation or token changes, and changes outside `dsDir` such as manifests, lockfiles or tooling, widen it to everything. Run it after direct edits or a series of accepted drafts |
|
|
538
590
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
npx playwright install chromium # Bun: bunx playwright install chromium
|
|
542
|
-
```
|
|
543
|
-
|
|
544
|
-
`mcp.capture` selects `browser` (`chromium`, `firefox`, `webkit`), an installed Chrome
|
|
545
|
-
`channel` such as `"chrome"`, and `timeoutMs`. To turn the owners' behavior tests or
|
|
546
|
-
render audit off for draft acceptance, set them in `ds.config.json`; `ads validate`
|
|
547
|
-
always runs both:
|
|
591
|
+
To turn the owners' behavior tests or render audit off for draft acceptance, set
|
|
592
|
+
them in `ds.config.json`. `ads validate` always runs both:
|
|
548
593
|
|
|
549
594
|
```json
|
|
550
595
|
{
|
|
@@ -553,924 +598,1897 @@ always runs both:
|
|
|
553
598
|
}
|
|
554
599
|
```
|
|
555
600
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
and
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
`
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
the
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
(
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
`
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
| A token explicitly named by `layout.widthTokens` | Supported and listed for review |
|
|
658
|
-
| Fixed/hybrid tracks emitted by `@ads-layout` | Checked by local track, cap, margin and gutter algebra |
|
|
601
|
+
A behavior, preview or audit stage with nothing to run (no registered checks or
|
|
602
|
+
scenarios, none that the change reaches, or turned off) is listed as
|
|
603
|
+
`skipped: true` with `status: "not-available"`, a `reason` code and a `message`.
|
|
604
|
+
In acceptance it does not block the draft; `ads audit` exits 1.
|
|
605
|
+
|
|
606
|
+
**Behavior.** A registered guarantee needs current passing execution evidence.
|
|
607
|
+
`ads verify` runs the registered checks against current source.
|
|
608
|
+
|
|
609
|
+
#### Render audit
|
|
610
|
+
|
|
611
|
+
The audit renders registered scenarios from the emitted preview tree, which
|
|
612
|
+
holds only a revision that passes `ads check`. With no registered scenario it
|
|
613
|
+
reports `not-available` (`no-scenarios`); with none selected, `none-selected`.
|
|
614
|
+
|
|
615
|
+
The audit mounts a scenario's specimens alone, without the page that ADS draws
|
|
616
|
+
around them in the showcase, so every finding is about the project's UI. A
|
|
617
|
+
capture shows the page as the showcase does.
|
|
618
|
+
|
|
619
|
+
- **Kinds.** Without `--scenario`, the audit renders component and pattern
|
|
620
|
+
scenarios. A mock gates nothing and is left out; `ads audit --scenario
|
|
621
|
+
mocks/<Name>` still audits one, as a look at how its owners combine.
|
|
622
|
+
- **States.** Every named state of a scenario is its own render, in every theme
|
|
623
|
+
and brand, with all passes. A finding lists the states it was found in
|
|
624
|
+
(`states`, and "States: Invalid, Long." at the end of its message); the same
|
|
625
|
+
finding in several states is one finding. A scenario has at most 12 states.
|
|
626
|
+
|
|
627
|
+
- Each `a11y-axe`, `a11y-non-text-contrast`, `a11y-text-scale`,
|
|
628
|
+
`a11y-text-spacing-override`, `a11y-reflow`, `layout-overflow`, `layout-shift`
|
|
629
|
+
and `img-shape` finding is an error that fails the gate.
|
|
630
|
+
- Each `a11y-incomplete` finding is an info item that fails nothing: axe could
|
|
631
|
+
not decide that rule on those elements, so check it by hand.
|
|
632
|
+
- An audit that cannot run fails the gate with a `render-audit-unavailable`
|
|
633
|
+
error. When the browser installation cannot run (offline, a blocked download),
|
|
634
|
+
the error names the command that installs the browser by hand (see
|
|
635
|
+
**Screenshots** above).
|
|
636
|
+
- The browser is Chromium by default. `mcp.capture` selects `browser`
|
|
637
|
+
(`chromium`, `firefox`, `webkit`), an installed Chrome `channel` such as
|
|
638
|
+
`"chrome"`, and `timeoutMs`.
|
|
639
|
+
- `mcp.auditPages` (1–16, default 4) sets how many pages render at once.
|
|
640
|
+
- A render that fails because the preview dropped or was slow is retried alone,
|
|
641
|
+
up to 3 attempts, with a new browser and preview. The other renders keep their
|
|
642
|
+
results, and findings never cause a retry. The JSON result and the check list
|
|
643
|
+
the retried passes under `retries`, and `ads audit` prints them. A scenario
|
|
644
|
+
that still fails is a `render-audit` error that names it and the last cause,
|
|
645
|
+
beside any findings.
|
|
646
|
+
|
|
647
|
+
What the audit measures in each render:
|
|
648
|
+
|
|
649
|
+
- **Non-text contrast** (WCAG 1.4.11, which axe-core does not check). A visible,
|
|
650
|
+
enabled control whose background does not stand out from its surroundings
|
|
651
|
+
needs a 3:1 border on its best-contrasting side (a soft field's one rule under
|
|
652
|
+
the text passes). An icon-only control needs a 3:1 icon. Disabled controls,
|
|
653
|
+
browser-drawn native controls and controls over a background image are exempt.
|
|
654
|
+
A text-entry control whose recipe declares an `accessibility` boundary
|
|
655
|
+
(identified by its visible label, or by a boundary that appears on
|
|
656
|
+
interaction) is not failed. It is listed on every run as the review item
|
|
657
|
+
`a11y-boundary-declared`, with a screenshot under `.ds/audit-evidence/`, for a
|
|
658
|
+
person to keep approving.
|
|
659
|
+
- **Overflow** at 390, 768 and 1280 px: horizontal document scrolling, elements
|
|
660
|
+
past the edge of the viewport, and text or a control cut off by
|
|
661
|
+
`overflow-x: hidden` or `clip` (`clipped`; the finding names what is cut).
|
|
662
|
+
- The audit measures what is cut, not the scroll width of the box. Images,
|
|
663
|
+
video, canvas, SVG artwork, iframes, `aria-hidden` and inert layers, and
|
|
664
|
+
pseudo-elements under a clip are not cut content, so a cropped hero image or
|
|
665
|
+
a decorative glow passes.
|
|
666
|
+
- Scrollers, ellipsis text, carousels, pannable widgets, native text fields,
|
|
667
|
+
fixed layers and visually hidden content are exempt.
|
|
668
|
+
- Components and patterns are also rendered in a 240 px container. What does
|
|
669
|
+
not fit a side pane is a `layout-overflow-narrow` review item.
|
|
670
|
+
- **Text scaling** (WCAG 1.4.4, 1.4.10, 1.4.12), once per scenario in the first
|
|
671
|
+
theme and brand, because text does not follow colour. The passes add about a
|
|
672
|
+
tenth to the audit's time.
|
|
673
|
+
- `a11y-text-scale`: at each overflow width the audit doubles the root font
|
|
674
|
+
size (200% text). It also renders the page zoomed to 200% (the 640 px
|
|
675
|
+
viewport that a 1280 px window leaves).
|
|
676
|
+
- `a11y-text-spacing-override`: at each overflow width the audit applies the
|
|
677
|
+
WCAG text-spacing values as the reader's stylesheet does (line height 1.5,
|
|
678
|
+
letter spacing 0.12em, word spacing 0.16em, 2em after paragraphs).
|
|
679
|
+
- `a11y-reflow`: the audit renders the page at 320 px (1280 px at 400%).
|
|
680
|
+
- Each pass reports what the scenario does not already show at rest:
|
|
681
|
+
horizontal overflow as above; text or controls cut off below by
|
|
682
|
+
`overflow: hidden` or `clip` (`block-clipped`); content that spills past a
|
|
683
|
+
box whose height or max-height does not grow (`spilled`); grid or flex items
|
|
684
|
+
that overlap past a reserved track (`overlap`); and a control or its focus
|
|
685
|
+
outline cut off by a clipping ancestor (`focus-clipped`).
|
|
686
|
+
- Each finding names the pass, the widths and the elements. Content that a
|
|
687
|
+
scroll axis hides is scrolled, not cut off. Ellipsis text, line clamps and
|
|
688
|
+
the exemptions of the overflow check stay exempt. Overflow that already
|
|
689
|
+
fails at 390 px is reported once, by `layout-overflow`.
|
|
690
|
+
- **Interaction states**: overlays opened from `aria-haspopup` controls, hovered
|
|
691
|
+
and focused controls, and busy controls, named in the finding's selector
|
|
692
|
+
(`open overlay "Edit": button`, `hover: button`). The result's `coverage`,
|
|
693
|
+
printed as a `Covered:` line, gives what was measured. What was skipped is a
|
|
694
|
+
`render-audit-skipped` info item. A render that measured none of its targets
|
|
695
|
+
is a `render-audit-nothing-measured` review item.
|
|
696
|
+
- **Settling**: the audit waits up to 5 s for the page to settle, and each
|
|
697
|
+
measurement waits for layout to stop moving. A page that never settles is
|
|
698
|
+
measured anyway and reported as `content-still-changing`.
|
|
699
|
+
- **Images and layout shift**: `img-shape` reports a visible image whose box
|
|
700
|
+
differs from its declared ratio. `layout-shift` reports a Cumulative Layout
|
|
701
|
+
Shift above 0.1 on first render, where the browser reports it (Chromium).
|
|
659
702
|
|
|
660
|
-
|
|
661
|
-
`@ads-layout fixed`. There is no universal fixed-width pixel cutoff and no warning for a
|
|
662
|
-
legitimate responsive cap around a small part.
|
|
703
|
+
## Showcase
|
|
663
704
|
|
|
664
|
-
|
|
705
|
+
ADS ships a minimal HTTP browser shell with isolated previews. `ads mcp` serves
|
|
706
|
+
the website alongside its stdio connection, and `ads showcase` starts the same
|
|
707
|
+
runtime for browser-only use. `ads mcp --no-showcase` keeps a headless stdio
|
|
708
|
+
server. Run the commands from the project root. Open the printed URL, or use
|
|
709
|
+
`ads_status.showcaseUrl` from a connected runtime: the URL and port of the
|
|
710
|
+
showcase that the server runs. ADS selects an available loopback port by
|
|
711
|
+
default; `--port 4185` selects a fixed port.
|
|
712
|
+
|
|
713
|
+
The browser reads discovery and opens previews through scoped HTTP services,
|
|
714
|
+
backed by the same engine as MCP. The client uses no project catalogue pages and
|
|
715
|
+
no direct component imports.
|
|
716
|
+
|
|
717
|
+
- SSE events refresh the menus and the build state.
|
|
718
|
+
- The selected scenario updates inside its persistent iframe. Compatible edits
|
|
719
|
+
keep component state, typed values and focus. Changed hook signatures follow
|
|
720
|
+
the framework's refresh rules (React Refresh, or Prefresh for Preact). An edit
|
|
721
|
+
that changes hook signatures or module boundaries, or the restoration of a
|
|
722
|
+
rejected revision, can reset the preview.
|
|
723
|
+
- A failed check restores the verified output. Errors identify stale retained
|
|
724
|
+
output.
|
|
725
|
+
- “Checking changes…” is live feedback, not acceptance. The source gates and the
|
|
726
|
+
selected browser checks decide whether the revision passes. Application
|
|
727
|
+
production builds are unchanged.
|
|
728
|
+
- The theme and brand selectors list the themes and brands that
|
|
729
|
+
`foundation.ads.ts` declares, through the preview host context.
|
|
730
|
+
|
|
731
|
+
Previews compile from the design system's emitted preview tree with ADS's Bun
|
|
732
|
+
compiler: incremental modules for watched previews and complete bundles for
|
|
733
|
+
verification. The project supplies no mount file and no preview application.
|
|
734
|
+
There is one managed compiler per runtime, shared by stdio and HTTP clients. The
|
|
735
|
+
App loads only the selected scenario's dependencies. An accepted mutation of a
|
|
736
|
+
configuration unit replaces the managed compiler and keeps MCP connected. See
|
|
737
|
+
[the compiler contract](MCP.md#one-client-command-managed-preview-builds) for
|
|
738
|
+
revisions, diagnostics, invalidation and the shared resource graph.
|
|
665
739
|
|
|
666
740
|
```json
|
|
667
|
-
{
|
|
668
|
-
"
|
|
669
|
-
"
|
|
670
|
-
}
|
|
741
|
+
{
|
|
742
|
+
"framework": "react@19.2.7",
|
|
743
|
+
"mcp": { "showcaseTitle": "My Project Design System" }
|
|
744
|
+
}
|
|
671
745
|
```
|
|
672
746
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
747
|
+
`framework` can pin the exact installed version (`name@1.2.3`). ADS keys preview
|
|
748
|
+
freshness and compiled previews by the files it owns (`ds.config.json` and the
|
|
749
|
+
design-system folder) and by the emitted preview tree. The pin is how a
|
|
750
|
+
framework upgrade reaches previews, so update it with the upgrade. The optional
|
|
751
|
+
title defaults to the project package name followed by ` · Design System`.
|
|
752
|
+
|
|
753
|
+
**Scenarios.** The showcase lists the registered [scenarios](#scenarios) and
|
|
754
|
+
previews them from the emitted preview tree. A project without scenarios lists
|
|
755
|
+
none, and `ads_scenarios`, `ads://project/scenarios` and `ads_status` report
|
|
756
|
+
`not-available` (`no-scenarios`).
|
|
757
|
+
|
|
758
|
+
**Showcase boxes.** A scenario's subject (the owners it covers) is shown in a
|
|
759
|
+
box of the project's own canvas, 16px larger than the subject on each side, on
|
|
760
|
+
the showcase's neutral page; the scenario's own headings and notes stay on the
|
|
761
|
+
page. The ADS views do the same for their samples and drawings. Leave at least
|
|
762
|
+
24px between a heading and the subject under it.
|
|
763
|
+
|
|
764
|
+
**Groups follow folders.** The left menu groups its entries by the design
|
|
765
|
+
system's folders: token folders and their role sheets, profile folders, asset
|
|
766
|
+
folders, the area folders that hold owners, and an owner that has more than
|
|
767
|
+
one scenario. Tokens, Profiles and Artwork each start with a **Summary** entry
|
|
768
|
+
generated from the same data: the folders with their counts. A view opened without the
|
|
769
|
+
showcase (an MCP App in another client) offers the same choices as buttons on
|
|
770
|
+
its page.
|
|
771
|
+
|
|
772
|
+
**ADS views.** Beside the scenarios, the showcase lists entries that ADS draws
|
|
773
|
+
itself from the revision it previews, in a frame of the project with its emitted
|
|
774
|
+
sheets and themes. They are not scenarios: the registry, `ads_scenarios` and
|
|
775
|
+
scenario coverage never list or count them, and no source file declares them.
|
|
776
|
+
They read the preview tree of the emitted revision, never live source, so an
|
|
777
|
+
edit appears after it is emitted.
|
|
778
|
+
|
|
779
|
+
- **Foundation** (id `foundation`, in the Tokens section) shows the grid of each
|
|
780
|
+
spatial profile: its breakpoints, outer margins and cell gutters in pixels,
|
|
781
|
+
the tokens that declare them, an example region per profile that steps through
|
|
782
|
+
the breakpoints as you resize the preview, and the mini unit. Each example is
|
|
783
|
+
the grid algebra's own expansion, carried in the preview tree's facts file
|
|
784
|
+
with its token references; the view derives no margins, bounds or tracks
|
|
785
|
+
itself. A changed margin or gutter token thus changes the example in the
|
|
786
|
+
frame's theme and brand. The guide overlay draws on the examples. It draws
|
|
787
|
+
each element's lattice in the mini unit of the spatial profile that the grids
|
|
788
|
+
of its owner follow, from the same facts.
|
|
789
|
+
`ads_show_scenario({ id: "foundation" })` opens the view like a scenario.
|
|
790
|
+
- **Profiles** (id `profiles`, the Profiles section) lists every profile,
|
|
791
|
+
whether or not an owner selects it. The left menu lists the folders under
|
|
792
|
+
`profiles/`; a folder's page shows its profiles in kind order. Each
|
|
793
|
+
profile is a section that names its kind, what it builds on (`with`), which profiles
|
|
794
|
+
build on it or select it in a slot, and where it is declared. Its table has
|
|
795
|
+
one row per field: the authored value, a sample when the field reads one
|
|
796
|
+
token, the role it reads (or `profile` for a composite's slot), and the
|
|
797
|
+
profile that states the value: "this profile", or the one it comes from. Each
|
|
798
|
+
choice has its own table with every option's fields. Each profile ends with
|
|
799
|
+
an **Applied** sample that shows it as a whole: text set in a text profile, a
|
|
800
|
+
surface painted with a surface profile, a box framed by a frame profile,
|
|
801
|
+
items spaced by a spacing profile, a control with a focus profile's
|
|
802
|
+
indicator, and a composite's profiles together. A motion profile also
|
|
803
|
+
plays: a square moves by the profile's timing on its own effect (a turn, a
|
|
804
|
+
scale or a distance), with a **Replay** button; it stays still when the
|
|
805
|
+
reader asks for reduced motion. Use it to find profiles
|
|
806
|
+
that repeat each other, and to see what a change to a base profile reaches.
|
|
807
|
+
`ads_show_scenario({ id: "profiles" })` opens the view like a scenario.
|
|
808
|
+
- **Artwork** (id `assets`, the Artwork section) lists every declared asset,
|
|
809
|
+
whether or not an owner draws it. The left menu lists the asset groups (the
|
|
810
|
+
folders under `assets/`). The Summary lists every glyph set with its
|
|
811
|
+
members: a set is a named list of glyphs that a component may choose from by
|
|
812
|
+
name at run time, declared beside the glyphs. A group's assets are sections by paint kind: foreground
|
|
813
|
+
(takes the text colour), slots (takes its paint slots' tokens) and intrinsic
|
|
814
|
+
(keeps its own colours). Each row draws the asset from its authored SVG, made
|
|
815
|
+
inert by ADS's sanitizer, and shows its title, aliases, glyph sets, what
|
|
816
|
+
differs between its drawings (themes, sizes, states), its optical centre
|
|
817
|
+
when that is not the middle of its box, and where it is declared. A themed asset shows the drawing of the preview's theme.
|
|
818
|
+
`ads_show_scenario({ id: "assets" })` opens the view like a scenario.
|
|
819
|
+
- **Tokens** (id `tokens`, also in the Tokens section) lists every token of the
|
|
820
|
+
token inventory (`ads tokens`), whether or not an owner uses it. No scenario
|
|
821
|
+
thus has to exercise a token. The left menu lists the token folders as groups
|
|
822
|
+
and each role sheet (`tokens/<Group>/<role>.ads.css`) as an entry; an entry's
|
|
823
|
+
page shows that role's tokens. Under
|
|
824
|
+
its name a section says what the role is for, the unit to write it in, the
|
|
825
|
+
profile fields that read it, and whether it may derive from a spacing token. A
|
|
826
|
+
**Problems** choice lists every token whose status is not valid. A group shows
|
|
827
|
+
its first 100 rows, and **Show more** adds the next 100. A token edit keeps
|
|
828
|
+
the selected group; an edit to an owner alone does not rebuild the view. The
|
|
829
|
+
explorer entry of the view is the token category, whose count is the number of
|
|
830
|
+
tokens. Each row shows:
|
|
831
|
+
- the name;
|
|
832
|
+
- a sample drawn from the token itself, in a box of the project's canvas: a
|
|
833
|
+
swatch for a paint, gradient, shadow or opacity; a bar for a length; a
|
|
834
|
+
corner for a radius; a line eight times as thick for a border width; a type
|
|
835
|
+
sample for a font family, size, weight or letter spacing; a bar for a
|
|
836
|
+
duration (1px per 5ms); the curve of an easing. Numbers are shown as text;
|
|
837
|
+
- its value here: what the frame computes in the theme and brand selected in
|
|
838
|
+
the showcase;
|
|
839
|
+
- the values that other contexts declare where they differ
|
|
840
|
+
(`dark: …; iris · dark: …; @media (…): …`);
|
|
841
|
+
- its value-shape status (valid, invalid, not following the text size, or not
|
|
842
|
+
statically checked, with the contexts and reason);
|
|
843
|
+
- where it is declared.
|
|
844
|
+
|
|
845
|
+
**Phone viewport.** The toggle in the showcase header constrains the real
|
|
846
|
+
preview iframe to 390 CSS pixels, or to the available width on a narrower
|
|
847
|
+
screen. It keeps the mounted example and its state, and does not change the
|
|
848
|
+
selected application host. `?viewport=phone` keeps the choice in a link; turn
|
|
849
|
+
the toggle off to follow the available browser width. On phone browsers the
|
|
850
|
+
catalogue starts collapsed, and the navigation button opens it again. Automated
|
|
851
|
+
captures keep their exact requested viewport.
|
|
852
|
+
|
|
853
|
+
**Approval view.** `?draft=<id>&view=approval&revision=<revision>`, the
|
|
854
|
+
`approvalUrl` that `ads_accept` returns, lists the accessibility declarations
|
|
855
|
+
that a draft revision adds or changes, and what ADS verifies of each. Its
|
|
856
|
+
"Approve and accept" is a person's step. It accepts that exact revision through
|
|
857
|
+
the gates of `ads_accept` and records no name; a changed draft asks for a new
|
|
858
|
+
link. First review the draft's split view in every theme and brand.
|
|
859
|
+
|
|
860
|
+
Run `ads check` and the registered project checks before preview compilation,
|
|
861
|
+
with the framework checks and meaningful tests. Review real entries at narrow
|
|
862
|
+
and wide sizes, in each declared theme and in the relevant states. Browser
|
|
863
|
+
verification establishes layout, keyboard and focus behavior, interactions and
|
|
864
|
+
motion; compiler success does not.
|
|
677
865
|
|
|
678
|
-
|
|
679
|
-
entry matching no token, unit or file is a `layout-config` error; an entry cannot name every
|
|
680
|
-
token or unit.
|
|
866
|
+
## Configuration and component rules
|
|
681
867
|
|
|
682
|
-
|
|
868
|
+
`ds.config.json` uses schema version 1. Every field is optional except the
|
|
869
|
+
framework that init saves. Defaults apply to the other fields:
|
|
683
870
|
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
871
|
+
```json
|
|
872
|
+
{
|
|
873
|
+
"schemaVersion": 1,
|
|
874
|
+
"framework": "react",
|
|
875
|
+
"dsDir": "design-system",
|
|
876
|
+
"assets": { "generatedPaths": ["dist", "dist-showcase", ".vite", ".ds"], "fontBudgetKb": 150 },
|
|
877
|
+
"acceptance": { "scripts": [], "behavior": true, "audit": true },
|
|
878
|
+
"validation": { "scripts": [], "inputs": [] },
|
|
879
|
+
"resources": { "memoryLimitMb": null },
|
|
880
|
+
"cache": { "extractionMaxMiB": 64, "extractionMaxEntries": 8192 },
|
|
881
|
+
"compile": { "outDir": null, "emitOnAccept": true },
|
|
882
|
+
"mcp": { "showcaseTitle": null, "auditPages": 4, "behaviorProfiles": {}, "capture": {} }
|
|
883
|
+
}
|
|
884
|
+
```
|
|
689
885
|
|
|
690
|
-
|
|
|
691
|
-
|---|---|
|
|
692
|
-
| `fluid` | Tracks that share the width: the breakpoint's column count, or `columns: N` |
|
|
693
|
-
| `hybrid` | Fluid tracks plus a `fixed-start` and/or `fixed-end` track (a token or `0`); `@ads-at <breakpoint> { fixed-start: …; fixed-end: … }` changes them from that breakpoint on |
|
|
694
|
-
| `fixed` | Tiles of `tile: <token>` that wrap |
|
|
695
|
-
| `flow` | A column with `row-gap`, natural content height |
|
|
696
|
-
| `inherited` | Inside a cell: continues the parent's tracks (CSS subgrid), optionally with its own `gutter` mode |
|
|
697
|
-
|
|
698
|
-
Fluid and hybrid roots also take `gutter`, `row-gap`, `margin`, `bound`, `align`, `rows` and
|
|
699
|
-
`context`. `align: start | center | end` places a capped region (`bound` other than `full`)
|
|
700
|
-
inside the available width, keeping its outer margin; the default is `center`. `rows` lists
|
|
701
|
-
1–12 row sizes, each `auto` (content height) or `fill` (shares the remaining block size), for
|
|
702
|
-
example `rows: auto fill` for a header above a body. Without `rows`, rows are implicit and
|
|
703
|
-
content-sized; ADS never invents equal rows.
|
|
704
|
-
`context: viewport` (the default) emits media queries; `context: container` applies the same
|
|
705
|
-
breakpoints to the nearest region container instead, so a layout responds to the space its
|
|
706
|
-
region has. Inherited layouts follow their parent's context.
|
|
707
|
-
|
|
708
|
-
Cells are direct children named by class or data attribute: `@ads-cell .name { … }`.
|
|
709
|
-
|
|
710
|
-
| Property | Values |
|
|
886
|
+
| Field | Purpose |
|
|
711
887
|
|---|---|
|
|
712
|
-
| `
|
|
713
|
-
| `
|
|
714
|
-
| `
|
|
715
|
-
| `
|
|
716
|
-
| `
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
`
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
Each measurement waits for layout to stop moving, so a component that refits after a resize is
|
|
744
|
-
measured after it refits. Before measuring anything, the audit waits up to 5 s for the page to settle:
|
|
745
|
-
no change in the scenario for 500 ms, no finite animation running, and nothing still loading. Content
|
|
746
|
-
that arrives late, such as syntax colours, is then measured every run. A page that never settles is
|
|
747
|
-
measured anyway and reported as `content-still-changing`.
|
|
748
|
-
|
|
749
|
-
The audit also renders what a scenario shows after someone acts on it, in every theme and brand.
|
|
750
|
-
Findings name the state in the selector, such as `open overlay "Edit": button` or `hover: button`.
|
|
751
|
-
The result's `coverage`, also printed as a `Covered:` line, gives what was measured. What was skipped is
|
|
752
|
-
a `render-audit-skipped` info item per reason, with up to 5 examples. A render that could measure none
|
|
753
|
-
of its targets is a `render-audit-nothing-measured` review item.
|
|
754
|
-
|
|
755
|
-
- **Overlays.** It clicks each distinct control with `aria-haspopup`, up to 3 per render, once per
|
|
756
|
-
theme and brand across the audit. What opens
|
|
757
|
-
(`dialog`, `alertdialog`, `menu`, `listbox` roles, an open `<dialog>` or popover) gets axe, non-text
|
|
758
|
-
contrast, and must fit the 390 px viewport. Give a trigger `aria-haspopup`, or render the overlay
|
|
759
|
-
open in its scenario. Tooltips are not opened.
|
|
760
|
-
- **Hover and focus.** Up to 6 controls per render, in document order, each distinct control once per
|
|
761
|
-
theme and brand on the same surface, measured by the first scenario in request order. Focus skips a
|
|
762
|
-
control a keyboard cannot reach: `aria-hidden` on it or an ancestor, `inert`, or `tabindex="-1"`
|
|
763
|
-
outside a `group`, `tablist`, `menu`, `menubar`, `radiogroup`, `toolbar`, `listbox`, `tree` or `grid` that
|
|
764
|
-
holds a `tabindex="0"`. Under hover it runs axe
|
|
765
|
-
`color-contrast` and the non-text check. A `:focus-visible` outline needs 3:1 against what is around
|
|
766
|
-
it. A focus ring drawn with `box-shadow` is not read, and an outline beside one is left alone.
|
|
767
|
-
- **Busy.** A control with `aria-busy="true"` is checked even when disabled, and its icon even when it
|
|
768
|
-
has text. Render the busy state in the scenario: the audit does not press buttons to reach it.
|
|
769
|
-
|
|
770
|
-
It also renders each component and pattern scenario with its container narrowed to 240 px, inside
|
|
771
|
-
the 1280 px viewport, once per brand, to show what would not fit a side pane. These are
|
|
772
|
-
`layout-overflow-narrow` review items: fix the part if it can sit in a pane, or change a scenario's
|
|
773
|
-
demo frame to a maximum.
|
|
774
|
-
|
|
775
|
-
- An element past the container's edge, or cut off inside it, is reported when it or something in it
|
|
776
|
-
has a set width, `min-width` or unshrinking `flex-basis` above 96 px. A row or table held open only
|
|
777
|
-
by its content, or by parts of 96 px or less, is not reported.
|
|
778
|
-
- Not rendered this way: compositions, scenarios with a `main` landmark, which are pages, and owners
|
|
779
|
-
in `layout.fixedWidthUnits`, which float above the layout.
|
|
780
|
-
- A finding that clears at the 390 px viewport, still in the 240 px container, is left out: it folds
|
|
781
|
-
on a viewport media query, such as a full-width site header.
|
|
782
|
-
|
|
783
|
-
**Web performance.** MCP serves this as `ads://guides/performance`.
|
|
784
|
-
|
|
785
|
-
| Rule | Gate | Fails |
|
|
786
|
-
|---|---|---|
|
|
787
|
-
| `img-attributes` | `ads check` | A raw `<img>` in components, patterns or compositions without `loading`, or without `width` and `height`, a visible `aspect-ratio`, a width and height in its style, or out-of-flow positioning. A `srcset` with width descriptors and no `sizes`, on `<img>` or the project's `Image`. A spread or a class from elsewhere is an `img-attributes-unresolved` info item |
|
|
788
|
-
| `asset-image-budget` | `ads check` | An image in `assets/` over its limit: SVG 100 KB, WebP and AVIF 300 KB, JPEG 400 KB, PNG and GIF 500 KB. `assets.imageBudgetKb` is one limit for every format |
|
|
789
|
-
| `img-shape` | `ads audit` | A visible image whose CSS sizing box differs from its explicit `aspect-ratio`, or, with none and `object-fit: fill`, whose content box differs from its `width` and `height`. Explicit CSS ratios respect `box-sizing`; attribute ratios exclude border and padding. A height attribute beats `aspect-ratio`: add `height: auto`. `object-fit: cover` in a box of its own with no `aspect-ratio` is a deliberate crop |
|
|
790
|
-
| `layout-shift` | `ads audit` | A scenario with Cumulative Layout Shift above 0.1 on first render, where the browser reports it (Chromium) |
|
|
791
|
-
| `themes-generated` | `ads check` | A stale `tokens/fonts.preload.generated.ts` |
|
|
792
|
-
| `font-weight-missing` | `ads check` | CSS uses a weight of a family `tokens/fonts.css` declares and no face covers it. A range such as `100 900`, or a face with no `font-weight`, covers what it spans. A weight in a rule with no `font-family` counts against the body's family |
|
|
793
|
-
| `asset-font-budget` | `ads check` | A font file in `assets/` above 150 KB. `assets.fontBudgetKb` changes the limit |
|
|
794
|
-
|
|
795
|
-
Review items, which fail nothing: `font-file-unused` (a declared face no CSS uses; weights 400 and 700
|
|
796
|
-
count as used, since browsers apply them by default), `font-display` (none, or `optional`, which decides
|
|
797
|
-
per file and can leave some weights in the fallback on one page) and `font-format` (not WOFF2). A
|
|
798
|
-
project with no `@font-face` gets none of these.
|
|
799
|
-
|
|
800
|
-
The starters' `Image` lazily loads and reserves space; `priority` marks the view's main visible
|
|
801
|
-
image. When body or heading text uses a font from `tokens/fonts.css`, `ads assets` writes
|
|
802
|
-
`tokens/fonts.preload.generated.ts`, and the generated public barrel re-exports it: call
|
|
803
|
-
`preloadFonts()` from the public entry in the app entry before the first render. It imports the files through the bundler, Vite or Bun, so the preload and the stylesheet share
|
|
804
|
-
one URL. For a preload earlier than JavaScript, a build step or prerender can call `fontPreloadTags()`
|
|
805
|
-
for `<link>` tags or `fontPreloadHeader()` for a `Link` header value; `fontPreloads` is the same list.
|
|
806
|
-
A project that sets heading fonts per component names what to preload in `assets.preloadFonts`:
|
|
807
|
-
`[{ "family": "Body", "weight": 400 }, { "family": "Heading", "weight": 700 }]`. That list replaces the
|
|
808
|
-
reading of `base.css`, and an entry `tokens/fonts.css` cannot satisfy is a `font-preload-config` error.
|
|
809
|
-
ADS does not cover page metadata, `noindex`, sitemaps or hosting; run Lighthouse on a production
|
|
810
|
-
build with real URLs.
|
|
811
|
-
|
|
812
|
-
**Themes and brands.** Themed tokens are per-theme halves (`--x-light`, `--x-dark`) on
|
|
813
|
-
`:root`; brands set their own halves on `[data-brand]`. `ads assets` generates
|
|
814
|
-
`themes.generated.css` and `.ts`. Missing or conflicting halves, empty themes or brands,
|
|
815
|
-
stale generated files, `light-dark()` and `[data-theme]`/`[data-brand]` ancestor selectors
|
|
816
|
-
in components are errors; see [Tokens, grid, icons and accessibility](#tokens-grid-icons-and-accessibility).
|
|
817
|
-
|
|
818
|
-
**Tokens.** Ownership, naming, the 2 px spacing rhythm (`token-rhythm`), missing names and
|
|
819
|
-
scenario references are errors; equal values in different roles are a
|
|
820
|
-
`token-overlap-review` item.
|
|
821
|
-
|
|
822
|
-
**Architecture.** Data, UX and Skin ownership, project structure, unit and paint contracts,
|
|
823
|
-
and binding and variable ownership are errors; Linaria atomic composition risks are
|
|
824
|
-
`atomic-composition-review` items. See [Generic architecture guards](#generic-architecture-guards).
|
|
825
|
-
|
|
826
|
-
**Behavior.** A registered guarantee needs current passing execution evidence. `ads verify`
|
|
827
|
-
runs the registered checks against current source (`--unit` and `--check` select);
|
|
828
|
-
`ads validate` runs every one its change set reaches, draft acceptance the draft
|
|
829
|
-
owners' own ones unless `acceptance.behavior` is `false`.
|
|
888
|
+
| `framework` | The UI framework that the design system is written for and that previews mount with (`react` or `preact`), optionally pinned as `react@<version>` |
|
|
889
|
+
| `dsDir` | The design-system folder |
|
|
890
|
+
| `assets.generatedPaths` | Project-relative folders that hold generated output, never source. They are not analysis inputs, and an import from one is a `source-unavailable` error |
|
|
891
|
+
| `assets.fontBudgetKb` | The largest font file that a `font()` declaration may list, in KiB rounded up (default 150). Above it: `font-budget` |
|
|
892
|
+
| `acceptance` | Draft acceptance: extra project scripts, and whether the owners' behavior tests and render audit run |
|
|
893
|
+
| `validation` | `ads validate`: scripts run after `acceptance.scripts`, and extra project files that count as validation inputs |
|
|
894
|
+
| `resources.memoryLimitMb` | An optional memory budget for ADS's managed processes |
|
|
895
|
+
| `cache` | Bounds of the persisted extraction cache ([Cache bounds](#cache-bounds)) |
|
|
896
|
+
| `compile` | The emitted output folder, and emit after acceptance ([Emitting the design system](#emitting-the-design-system)) |
|
|
897
|
+
| `mcp` | Showcase title, check and preview timeouts, audit concurrency, behavior profiles, capture browser and result retention |
|
|
898
|
+
|
|
899
|
+
An unknown field, at the top level or in a section, fails to load; ADS does not
|
|
900
|
+
silently weaken checks. Paths stay within the receiving project. A subfolder
|
|
901
|
+
with its own `ds.config.json` is a separate project: check, validation, audits,
|
|
902
|
+
previews and watches stop there and run in it on their own.
|
|
903
|
+
|
|
904
|
+
ADS reads only the design-system project: the `dsDir` tree, `ds.config.json`,
|
|
905
|
+
package manifests and lockfiles with their dependency-resolution configuration,
|
|
906
|
+
the TypeScript configuration chain, the entry files of configured package
|
|
907
|
+
scripts and their imports, notices and `validation.inputs`. ADS does not read or
|
|
908
|
+
check application source, public directories, the root `index.html` or tests
|
|
909
|
+
outside `dsDir`. An edit to them never makes validation, preview or acceptance
|
|
910
|
+
evidence stale. A policy about how the application uses the design system
|
|
911
|
+
belongs to the application's own tooling.
|
|
912
|
+
|
|
913
|
+
### Cache bounds
|
|
914
|
+
|
|
915
|
+
`cache` bounds ADS's persisted extraction cache in `.ds/cache/extraction/`
|
|
916
|
+
(see [the caching guide](CACHING.md#persisted-extraction-cache)).
|
|
917
|
+
Both fields are optional:
|
|
830
918
|
|
|
831
|
-
|
|
919
|
+
```json
|
|
920
|
+
{ "cache": { "extractionMaxMiB": 64, "extractionMaxEntries": 8192 } }
|
|
921
|
+
```
|
|
922
|
+
|
|
923
|
+
| Field | Default | Range | Bounds |
|
|
924
|
+
| --- | --- | --- | --- |
|
|
925
|
+
| `extractionMaxMiB` | 64 | integer 1–65536 | Disk space of all entries, in MiB |
|
|
926
|
+
| `extractionMaxEntries` | 8192 | integer 128–1000000 | Number of entries |
|
|
927
|
+
|
|
928
|
+
The bound limits disk space only. A lookup costs the same at any size, and
|
|
929
|
+
pruning runs when ADS is idle or about to exit, not during a check. A smaller
|
|
930
|
+
cap extracts more again after restarts. Values outside the ranges fail to load.
|
|
931
|
+
`ADS_CACHE=off` disables the disk layer whatever the bound.
|
|
932
|
+
|
|
933
|
+
### Design system source
|
|
934
|
+
|
|
935
|
+
A design system authors recipe owners (`@reqvire-org/ads/recipe`), role token
|
|
936
|
+
sheets (`tokens/**/*.ads.css`), profiles (`profiles/**/*.ads.ts`), asset
|
|
937
|
+
declarations beside their drawings (`assets/<group>/*.ads.ts` and `*.svg`) and
|
|
938
|
+
`foundation.ads.ts`. The public barrel `index.ts` is written by hand and names
|
|
939
|
+
each public owner (`export *` is rejected). The installed `@reqvire-org/ads`
|
|
940
|
+
package types the macro imports. An `env.d.ts` at the design-system root is
|
|
941
|
+
included when present, but is not required. Source in any other form fails.
|
|
942
|
+
|
|
943
|
+
This section describes what `ads check` enforces, by area. `ads check`, MCP
|
|
944
|
+
checks, previews, emission and draft acceptance use the same findings.
|
|
945
|
+
[The contract](ADS.md#checks) lists the rules of each area,
|
|
946
|
+
[the rule reference](RULES.md) gives the statement and repair of every rule, and
|
|
947
|
+
[the authoring language](LANGUAGE.md) describes the constructs.
|
|
948
|
+
|
|
949
|
+
#### Structure, themes and brands
|
|
950
|
+
|
|
951
|
+
- `project-structure`: `dsDir`, `index.ts` and `foundation.ads.ts` are required.
|
|
952
|
+
- `import-leaves-design-system`: an import leaves the design-system folder.
|
|
953
|
+
- `source-unavailable`: an import names a file that is not an analysis input,
|
|
954
|
+
such as a folder in `assets.generatedPaths` or the emitted output.
|
|
955
|
+
- `source/framework-mismatch` (`owner-analysis`, at the import): a React package
|
|
956
|
+
(`react`, `react-dom`, their subpaths, type imports included) in a Preact
|
|
957
|
+
project, or a Preact package (`preact`, `@preact/*`) in a React project.
|
|
958
|
+
|
|
959
|
+
ADS reads the themes and brands from `foundation({ ..., themes, brands })`, in
|
|
960
|
+
declared order. The first theme and brand are the defaults: the `:root` values
|
|
961
|
+
of the token sheets. The render audit, capture, the showcase and `ads_status`
|
|
962
|
+
read the same declaration. Two optional fields are `true` or omitted:
|
|
963
|
+
|
|
964
|
+
- `followSystemTheme: true`: a root without `data-theme` follows the OS colour
|
|
965
|
+
scheme. It takes the first light-scheme theme for a light preference and the
|
|
966
|
+
first dark-scheme theme for a dark one, so the design system needs one of
|
|
967
|
+
each. An explicit `data-theme` always wins, and brands keep their own values.
|
|
968
|
+
Emission copies the token rules of each such theme for
|
|
969
|
+
`:root:not([data-theme])` under `@media (prefers-color-scheme: …)`, directly
|
|
970
|
+
after the original, so they cascade as the attribute does.
|
|
971
|
+
- `sections: true`: `data-theme` or `data-brand` on any element switches its
|
|
972
|
+
subtree ([Colours that depend on their surroundings](#colours-that-depend-on-their-surroundings)).
|
|
973
|
+
Without it, only the attributes of `<html>` select a context.
|
|
974
|
+
|
|
975
|
+
An invalid list or field is an `owner-analysis` finding at the field
|
|
976
|
+
(`contexts/list-invalid`). A theme or brand that a token sheet or asset variant
|
|
977
|
+
names without a declaration is one finding per reference
|
|
978
|
+
(`contexts/theme-undeclared`, `contexts/brand-undeclared`). A declared
|
|
979
|
+
non-default theme or brand that nothing defines is an error at its entry
|
|
980
|
+
(`theme-undefined`, `brand-undefined`).
|
|
981
|
+
|
|
982
|
+
#### Owner analysis
|
|
983
|
+
|
|
984
|
+
Owner analysis reads the design inputs and discovers every owner that the barrel
|
|
985
|
+
reaches. It type-checks the owners with the scenarios and the fixtures they
|
|
986
|
+
import. It then analyzes, lowers and compiles every reachable construction, and
|
|
987
|
+
resolves each owner's token CSS. Each failure is a blocking `owner-analysis`
|
|
988
|
+
finding with a `code` that names the exact error (`<domain>/<kind>`, for example
|
|
989
|
+
`spec/value-invalid` or `token-css/token-missing`), its `group`, a `repair` hint
|
|
990
|
+
and a position.
|
|
991
|
+
|
|
992
|
+
- ADS analyzes every owner. One check thus reports the first source failure of
|
|
993
|
+
each failing owner (in discovery order), every TypeScript diagnostic, each
|
|
994
|
+
failing helper module, the first compile failure of the analyzed owners and
|
|
995
|
+
every token CSS failure.
|
|
996
|
+
- Invalid design inputs, owner discovery failures (a cycle, `export *`) and
|
|
997
|
+
import-graph failures stop analysis of the revision.
|
|
998
|
+
- An owner whose grid aligns the rows of a failed owner (`alignRows`) cannot be
|
|
999
|
+
analyzed until that owner is fixed. ADS reports it as a nonblocking
|
|
1000
|
+
`owner-analysis-blocked` info advisory at the aligned component, with the
|
|
1001
|
+
failed owner in `blockedBy`, never as an error that repeats the cause. After
|
|
1002
|
+
the fix, the blocked owner reports its own problems.
|
|
1003
|
+
- What analysis cannot prove is a nonblocking `owner-analysis-review` item with
|
|
1004
|
+
a `review/<kind>` code: a scroll container that nothing focuses, a summary
|
|
1005
|
+
without its marker or artwork, truncated or clamped text without a `title`.
|
|
1006
|
+
|
|
1007
|
+
Three codes concern profile and recipe declarations:
|
|
1008
|
+
|
|
1009
|
+
- `foundation/profile-field-unknown`, at the field: a profile field that its
|
|
1010
|
+
kind does not have (a misspelt composite slot such as `frameProfle`, a text
|
|
1011
|
+
field on a spacing profile, an unknown field in a choice option or spatial
|
|
1012
|
+
clause). The vocabulary is the kind's token and policy fields and the
|
|
1013
|
+
composite slots.
|
|
1014
|
+
- `foundation/profile-argument-default`, at the selection: a slot reference
|
|
1015
|
+
selects the default option of the referenced profile.
|
|
1016
|
+
- `source/recipe-redundant`, at the declaration: a recipe restates what its
|
|
1017
|
+
selected profile supplies. This is a default choice selection, a binding equal
|
|
1018
|
+
to its composite slot (by name, an equivalent alias, `{ slot: "text" }` on a
|
|
1019
|
+
text part, a binding recipe's `visual`, a paint transition's `motion`), the
|
|
1020
|
+
default content gap, or a `when` state that selects the base surface. It is
|
|
1021
|
+
redundant only when it is redundant in every reachable choice. A state surface
|
|
1022
|
+
may overlay part of its base (a colour-only error state).
|
|
1023
|
+
|
|
1024
|
+
#### Tokens
|
|
1025
|
+
|
|
1026
|
+
Shared values obey three contracts: the value shape of each role, the roles that
|
|
1027
|
+
each profile field reads, and the permitted token derivations
|
|
1028
|
+
([token roles](TOKEN-ROLES.md)). ADS checks the tokens in every context that the
|
|
1029
|
+
sheets declare: the base, each theme, each brand, each brand under each theme,
|
|
1030
|
+
and the overrides of each `@media`/`@supports` condition. It first resolves
|
|
1031
|
+
`var()` references through the values of that context. Each finding is at the
|
|
1032
|
+
declaration, unless stated.
|
|
1033
|
+
|
|
1034
|
+
- `token-role-duplicate` (error): a token has one role, the file name of its
|
|
1035
|
+
sheet. Its `:root` default and every theme or brand override are in that
|
|
1036
|
+
sheet.
|
|
1037
|
+
- `token-selector-invalid` (error): token rules are `:root`,
|
|
1038
|
+
`:root[data-theme="…"]`, `:root[data-brand="…"]` or both, directly or inside
|
|
1039
|
+
`@media`, `@supports` or `@layer`. Another selector (`.card`, a selector list,
|
|
1040
|
+
`[data-theme]` without `:root`) or at-rule (`@container`) forms no context. An
|
|
1041
|
+
override of a token with no `:root` default is allowed; each reference to such
|
|
1042
|
+
a token needs a `var()` fallback (`token-css/token-missing`).
|
|
1043
|
+
- `review/context-section-inactive` (review): without `sections: true`, a
|
|
1044
|
+
`data-theme` or `data-brand` attribute on design-system markup switches
|
|
1045
|
+
nothing.
|
|
1046
|
+
- `token-sheet-property` (error): a token sheet declares custom properties only.
|
|
1047
|
+
An ordinary property (`:root { color: red }`) is not read as a token.
|
|
1048
|
+
- `token-type` (error): every token is a value of the shape of its role
|
|
1049
|
+
(`paint` a colour, `spacing` a nonnegative length, `duration` a nonnegative
|
|
1050
|
+
time, `easing` a timing function). A `calc()` that mixes units is accepted
|
|
1051
|
+
where the role has no sign or range bound.
|
|
1052
|
+
- `token-type-unresolved` (review, never a silent pass): a mixed-unit `calc()`
|
|
1053
|
+
where the role has a bound, or a value ADS cannot read statically (an unknown
|
|
1054
|
+
function, `currentColor`, an undefined reference).
|
|
1055
|
+
- `token-provenance` (error): a forbidden authored edge or composite position,
|
|
1056
|
+
including in unused tokens and fallbacks. Repair the named reference with a
|
|
1057
|
+
permitted role or shared literal
|
|
1058
|
+
([provenance](TOKEN-ROLES.md#provenance-and-permitted-derivation)).
|
|
1059
|
+
- `token-overlap-review` (review, at the second token): tokens of one role that
|
|
1060
|
+
are identical in every context are possibly one decision named twice. Pure
|
|
1061
|
+
aliases (`var(--space-lg)` in every context) are not compared.
|
|
1062
|
+
- `a11y-text-resize` (error): a `font-size` token, and a `line-height` token
|
|
1063
|
+
that is a length, resolves to `rem` or `em` (or a `calc()`, `min()`, `max()`
|
|
1064
|
+
or `clamp()` that contains them) in every context (WCAG 2.2 1.4.4). A px line
|
|
1065
|
+
height stays fixed while resized text grows, so lines overlap; a unitless
|
|
1066
|
+
multiplier already scales. See also
|
|
1067
|
+
[Text scaling in the application](#text-scaling-in-the-application).
|
|
1068
|
+
|
|
1069
|
+
**Spatial profiles.**
|
|
1070
|
+
|
|
1071
|
+
- `spatial-profile-invalid` (error, at the profile's declaration): every
|
|
1072
|
+
declared spatial profile, selected or not, reads through the grid algebra
|
|
1073
|
+
(units, scale, ratios, maximum width, breakpoints, margins and gutters), as
|
|
1074
|
+
grid lowering and the preview facts read it, in the base context and in every
|
|
1075
|
+
context that defines a reached token differently. Profiles that compose one
|
|
1076
|
+
definition (`with: ["page-grid"]`) and have the same failure give one finding,
|
|
1077
|
+
at the profile that declares the units. An owner that selects a broken profile
|
|
1078
|
+
also reports its own failure at the construction.
|
|
1079
|
+
- `spatial-context-unsupported` (error, at the profile's declaration): a
|
|
1080
|
+
breakpoint width, column count or named condition bound is compiled into media
|
|
1081
|
+
queries and track lists, so no context can give its token another value.
|
|
1082
|
+
Margins, gutters, the maximum width and fixed tracks are read live and can
|
|
1083
|
+
differ by context, if every grid still holds there
|
|
1084
|
+
(`construction/grid-context-invalid`, at the grid construction).
|
|
1085
|
+
|
|
1086
|
+
#### Contrast
|
|
1087
|
+
|
|
1088
|
+
Each text pair belongs to one of three checks. The minimum is 4.5:1 (WCAG 2.2
|
|
1089
|
+
1.4.3), or 3:1 where the text is provably large: its text profile, own or
|
|
1090
|
+
inherited, resolves to at least 24px, or 18.66px at weight 700, in that context.
|
|
1091
|
+
Inactive elements and states (`:disabled`, `[aria-disabled="true"]`, not a state
|
|
1092
|
+
only excluded with `:not()`) have no minimum. The same is true for placeholder
|
|
1093
|
+
contrast.
|
|
1094
|
+
|
|
1095
|
+
**`surface-contrast`** (error, at the profile's declaration): a surface profile
|
|
1096
|
+
that sets both `color` and `background` reaches 4.5:1 in every context. Its
|
|
1097
|
+
`background-image` gradient stops count as backgrounds. A profile does not state
|
|
1098
|
+
whether its colour paints only non-text UI, so the text minimum applies to every
|
|
1099
|
+
pair.
|
|
1100
|
+
|
|
1101
|
+
- A translucent background, an `opacity` below 1 or an image that is not a
|
|
1102
|
+
gradient of known colours is a `surface-contrast-unresolved` review item.
|
|
1103
|
+
- A surface that paints a disabled control declares `state: "inactive"` among
|
|
1104
|
+
its fields and is not checked. A construction can select it only under an
|
|
1105
|
+
inactive owner state; anywhere else is `construction/inactive-surface-active`.
|
|
1106
|
+
|
|
1107
|
+
**State contrast** (owner analysis): an owner's `when` states pair the colour of
|
|
1108
|
+
one profile with the background of another, such as a colour-only error state
|
|
1109
|
+
over the base fill, or a hover fill under the base colour.
|
|
1110
|
+
`construction/state-contrast-insufficient` blocks the owner;
|
|
1111
|
+
`review/state-contrast-unresolved` is a review item.
|
|
1112
|
+
|
|
1113
|
+
**`component-contrast`** (error, at the surface that chose the colour of the
|
|
1114
|
+
text): text meets the minimum against the backdrop it is rendered on, across
|
|
1115
|
+
elements and owners, without declared pairs.
|
|
1116
|
+
[The contract](ADS.md#composed-text-contrast) defines the rule and its
|
|
1117
|
+
unresolved cases, and [the architecture](ARCHITECTURE.md#composed-contrast)
|
|
1118
|
+
explains the join.
|
|
1119
|
+
|
|
1120
|
+
- ADS follows each text position outward through the elements of its owner, into
|
|
1121
|
+
the slot of every component it is passed to and back out, and up through every
|
|
1122
|
+
placement of its owner. The colour is the nearest one that a surface sets. The
|
|
1123
|
+
backdrop is the nearest opaque background, with translucent backgrounds and
|
|
1124
|
+
gradients of known colours composited over it.
|
|
1125
|
+
- Text sizes inherit across owners: an owner without a text profile takes its
|
|
1126
|
+
renderer's, else the document's. A placement's literal props select the
|
|
1127
|
+
choices of the child that it renders. Hidden elements and absent text
|
|
1128
|
+
(`{null}`, an empty or missing prop) add nothing.
|
|
1129
|
+
- Applications also place a component that the public barrel exports, on the
|
|
1130
|
+
document surface that `foundation({ surface })` declares. ADS thus checks its
|
|
1131
|
+
text there also. An application's own coloured container is outside this
|
|
1132
|
+
check.
|
|
1133
|
+
- An element that renders `data-theme` or `data-brand` is painted with the
|
|
1134
|
+
document surface. With `sections: true`, its subtree is checked in the named
|
|
1135
|
+
context only; without sections, in the page's contexts.
|
|
1136
|
+
- The finding lists the pair's `tokens`, every failing context that differs from
|
|
1137
|
+
the one it extends (`contexts`: theme, brand, condition, ratio, minimum) and,
|
|
1138
|
+
in `related`, the backdrop, the placements and the slots between them.
|
|
1139
|
+
- What ADS cannot prove is a `component-contrast-unresolved` review item at the
|
|
1140
|
+
placement or element, never a pass. Examples are a wrapper component that ADS
|
|
1141
|
+
does not analyze, a same-file component that does not render its `children`, a
|
|
1142
|
+
component placed by a plain module, a user-agent colour, an out-of-flow
|
|
1143
|
+
element without its own backdrop, `opacity` below 1, an unknown image, with
|
|
1144
|
+
sections a `data-theme`/`data-brand` that ADS cannot name, an expression that
|
|
1145
|
+
may be text, and markup rendered outside the markup of its component.
|
|
1146
|
+
|
|
1147
|
+
#### Accessibility in owners
|
|
1148
|
+
|
|
1149
|
+
ADS checks owners and their constructions against WCAG 2.2 AA. Each finding is
|
|
1150
|
+
an owner-analysis finding with its fine-grained code, reported under its
|
|
1151
|
+
`a11y-*` rule.
|
|
1152
|
+
|
|
1153
|
+
- `a11y-focus` (error, at the focus profile; WCAG 2.4.7, 1.4.11): the `width` of
|
|
1154
|
+
every focus profile is at least 2 CSS px in every context, and the document's
|
|
1155
|
+
default indicator has 3:1 against the background of the document surface. What
|
|
1156
|
+
cannot be evaluated is `a11y-focus-unresolved` (review).
|
|
1157
|
+
- `a11y-target-size` (error): every control construction and every
|
|
1158
|
+
`frame: "control"` part is at least 24 × 24 CSS px in every context, its hit
|
|
1159
|
+
area included (`construction/target-size-below-minimum`, naming the element,
|
|
1160
|
+
its size, the context and the deficit).
|
|
1161
|
+
- ADS computes the size from the lowered box, with relative lengths at the
|
|
1162
|
+
16px reference root: min block = max(`min-block-size`, content + 2 × (inset +
|
|
1163
|
+
border)); inline = max(the frame's `min-inline-size`, 2 × (`padding-inline` +
|
|
1164
|
+
border) + content).
|
|
1165
|
+
- Neighbouring hit areas in a stack or inline arrangement must not overlap
|
|
1166
|
+
across their gap (`construction/target-area-overlap`).
|
|
1167
|
+
- A value that ADS cannot evaluate, or an inline extent that reaches 24px only
|
|
1168
|
+
with the width of its label (text is data), is `a11y-target-size-unresolved`
|
|
1169
|
+
(review).
|
|
1170
|
+
- A frame's `min-target-inline-size` / `min-target-block-size` (role
|
|
1171
|
+
`target-min-size`) lower to a hit area that the element owns: a centred,
|
|
1172
|
+
absolutely positioned `::after` that takes no layout space. A top-layer root
|
|
1173
|
+
cannot have one.
|
|
1174
|
+
- `a11y-icon-label` (error, at the control's element): in every reachable choice
|
|
1175
|
+
where a control renders no text part, its root has a non-empty `aria-label`,
|
|
1176
|
+
`aria-labelledby` or `title` (`source/control-name-missing`). Conditions are
|
|
1177
|
+
evaluated in the choice. Application text (a label prop) counts as a name, as
|
|
1178
|
+
it counts as content in a text part.
|
|
1179
|
+
- `source/pressed-state-mismatch` (`owner-analysis` error, at the choice's
|
|
1180
|
+
binding recipe; WCAG 4.1.2): a toggle's `aria-pressed` agrees with its
|
|
1181
|
+
drawing. In every reachable choice where the root of a construction sets
|
|
1182
|
+
`aria-pressed` and its artwork declares a `selected` state, a pressed choice
|
|
1183
|
+
draws `selected` and an unpressed one another state. An `aria-pressed` whose
|
|
1184
|
+
type is not finite (`any`, for example) is a `review/pressed-state-unresolved`
|
|
1185
|
+
item.
|
|
1186
|
+
- `a11y-image-alt` (error, at the image): every `<img>` that an owner renders
|
|
1187
|
+
has `alt`: artwork (`source/intrinsic-alt-missing`), content media and any
|
|
1188
|
+
other image (`source/image-alt-missing`). `alt=""` marks a decorative one.
|
|
1189
|
+
- `a11y-keyboard` (review, at the element): `onClick` on a non-interactive
|
|
1190
|
+
element (div, span, li, img, …) without a role and `tabIndex`
|
|
1191
|
+
(`review/click-without-keyboard`). Composite-widget items (option, tab,
|
|
1192
|
+
menuitem, row, gridcell, …) and backdrops whose handler reads `currentTarget`
|
|
1193
|
+
are exempt.
|
|
1194
|
+
- `a11y-non-text-contrast` (error): the check applies where a construction knows
|
|
1195
|
+
the surface that a control part sits on (an enclosing element that paints an
|
|
1196
|
+
opaque background). A control part is a `frame: "control"` part, or
|
|
1197
|
+
`frame: { kind: "control", rules }` with one-sided rules such as a soft
|
|
1198
|
+
field's underline.
|
|
1199
|
+
- The border colour of the part (base and each owner state) reaches 3:1, when
|
|
1200
|
+
the part's own background does not bound it at 3:1.
|
|
1201
|
+
- The focus outline colour reaches 3:1, on the enclosing background outside
|
|
1202
|
+
the box and on the part's own background inside it.
|
|
1203
|
+
- The error is `construction/non-text-contrast-insufficient`. Unprovable pairs
|
|
1204
|
+
are `review/non-text-contrast-unresolved`.
|
|
1205
|
+
- A part can carry a human-approved `accessibility` declaration. It turns the
|
|
1206
|
+
border error into the review item `review/boundary-identified-otherwise` and
|
|
1207
|
+
needs a person's approval at acceptance (see the accessibility reference of
|
|
1208
|
+
the skill).
|
|
1209
|
+
- A control's artwork paints with its text colour, which `surface-contrast`
|
|
1210
|
+
already holds to 4.5:1. The surroundings of a control root are its parent's
|
|
1211
|
+
composition, which the render audit measures.
|
|
1212
|
+
|
|
1213
|
+
#### Assets, fonts and the application icon
|
|
1214
|
+
|
|
1215
|
+
**Assets** ([assets](ASSETS.md#icons-and-glyph-sets)).
|
|
1216
|
+
|
|
1217
|
+
- Asset names, asset aliases and glyph-set names are one namespace
|
|
1218
|
+
(`assets/name-duplicate`, at the repeated field). An alias resolves to its
|
|
1219
|
+
asset wherever an asset name is accepted.
|
|
1220
|
+
- The members of a glyph set are declared, distinct foreground assets on one
|
|
1221
|
+
grid, and its aliases name members (`assets/set-*`, at the member or alias).
|
|
1222
|
+
- An owner that takes an icon takes a glyph reference
|
|
1223
|
+
(`Glyph<"close" | "search">`, made with `glyph()`). An icon chosen from data
|
|
1224
|
+
is looked up in a declared glyph set by a name typed as the names of the set.
|
|
1225
|
+
The constructions do not depend on the glyph (`source/glyph-*` codes).
|
|
1226
|
+
- `asset-unused` (error, at the name in the declaration): an asset that no owner
|
|
1227
|
+
binds, no bound set lists and no `glyph()` references, or a glyph set that no
|
|
1228
|
+
owner binds. ADS reports it only after every owner is analyzed.
|
|
1229
|
+
|
|
1230
|
+
**Fonts.** Declare a font family once, with `font()`, in an `assets/**/*.ads.ts`
|
|
1231
|
+
file beside its files. Keep its licence there also:
|
|
1232
|
+
|
|
1233
|
+
```ts
|
|
1234
|
+
import { font } from "@reqvire-org/ads/font" with { type: "macro" };
|
|
1235
|
+
|
|
1236
|
+
export default font({
|
|
1237
|
+
family: "Inter", // the CSS family name, unique in the design system
|
|
1238
|
+
title: "Inter",
|
|
1239
|
+
description: "UI text face",
|
|
1240
|
+
license: "SIL OFL 1.1 (assets/fonts/inter/OFL.txt)",
|
|
1241
|
+
display: "swap", // swap | fallback | optional | block
|
|
1242
|
+
faces: [
|
|
1243
|
+
{ source: "./Inter-Variable.woff2", weight: [100, 900] },
|
|
1244
|
+
{ source: "./Inter-Italic.woff2", weight: [100, 900], style: "italic" },
|
|
1245
|
+
],
|
|
1246
|
+
preload: [{ weight: 600 }], // optional: faces to preload beyond the document text's
|
|
1247
|
+
});
|
|
1248
|
+
```
|
|
832
1249
|
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
1250
|
+
A font is used where a font-family role token names it first
|
|
1251
|
+
(`--font-ui: "Inter", system-ui, sans-serif`), in any theme, brand or condition.
|
|
1252
|
+
The starter keeps system fonts. A face's file is a design input. A missing file,
|
|
1253
|
+
a source outside the declaration's folder, a file whose bytes are not its
|
|
1254
|
+
format, a repeated family (`fonts/family-duplicate`) or overlapping faces reject
|
|
1255
|
+
the declaration.
|
|
1256
|
+
|
|
1257
|
+
- `font-weight-missing` (error, at the profile): a text profile draws a declared
|
|
1258
|
+
font at a weight that no upright face covers. The weight is its font-weight
|
|
1259
|
+
token in some context; the document text profile without one draws at 400.
|
|
1260
|
+
- `font-budget` (error): a file is above `assets.fontBudgetKb`.
|
|
1261
|
+
- `font-unused` (review): a family that no font-family token names first, or a
|
|
1262
|
+
face of a used family that no profile selects. The 400, 700 and italic faces
|
|
1263
|
+
count as used, because browsers draw plain, bold and emphasized text with
|
|
1264
|
+
them.
|
|
1265
|
+
- `font-format` (review): a file is not WOFF2.
|
|
1266
|
+
- `font-display` (review): display `block` (invisible text while loading) or
|
|
1267
|
+
`optional` (one page can mix the face and the fallback).
|
|
1268
|
+
|
|
1269
|
+
**Application icon.** `foundation({ appIcon })` names a declared asset as the
|
|
1270
|
+
icon that browsers, launchers and app stores show
|
|
1271
|
+
([the icon role](ASSETS.md#the-application-icon-a-role-not-a-kind)). `ads emit`
|
|
1272
|
+
renders it ([The output folder](#the-output-folder)). Its drawings count as used
|
|
1273
|
+
(no `asset-unused`).
|
|
1274
|
+
|
|
1275
|
+
```ts
|
|
1276
|
+
export default foundation({
|
|
1277
|
+
// …tokens, profiles, themes…
|
|
1278
|
+
appIcon: {
|
|
1279
|
+
asset: "app-icon", // a declared asset() name or alias
|
|
1280
|
+
background: "--brand-surface", // optional: a paint-role token behind padded renders
|
|
1281
|
+
maskable: { padding: 0.1 }, // optional: or { asset: "app-icon-maskable" }
|
|
1282
|
+
exports: [ // optional: further images, inside the output folder
|
|
1283
|
+
{ file: "icons/128x128.png", size: 128 },
|
|
1284
|
+
{ file: "social/banner.png", asset: "banner", width: 1200, height: 630, background: "--brand-surface" },
|
|
1285
|
+
{ file: "icons/icon.ico", sizes: [16, 32, 48, 256] },
|
|
1286
|
+
{ file: "icons/icon.icns", sizes: [16, 32, 64, 128, 256, 512, 1024] },
|
|
1287
|
+
{ file: "icons/app.svg" },
|
|
1288
|
+
],
|
|
1289
|
+
},
|
|
1290
|
+
});
|
|
1291
|
+
```
|
|
1292
|
+
|
|
1293
|
+
- `app-icon-asset` (error, at `appIcon.asset` or `appIcon.background`): the
|
|
1294
|
+
asset is undeclared, is not `paint: "intrinsic"` (a browser tab or launcher
|
|
1295
|
+
cannot read CSS variables), has optical-size variants, or has a viewBox that
|
|
1296
|
+
is not square. Or a background token is not a paint-role token, or does not
|
|
1297
|
+
resolve to an opaque colour in the default theme and brand. With variants, ADS
|
|
1298
|
+
renders the drawing of the default theme.
|
|
1299
|
+
- `app-icon-export` (error, at the entry): a file outside the output folder
|
|
1300
|
+
(`..`, absolute or hidden segments), or at a path that ADS or another export
|
|
1301
|
+
writes (the platform icons, `fonts/`); a format other than `.svg`, `.png`,
|
|
1302
|
+
`.ico` and `.icns`; a size outside 16–2048 px; an export asset that cannot be
|
|
1303
|
+
rendered; or a sizing that the format does not take. `.png` takes `size`, or
|
|
1304
|
+
`width` and `height`; `.ico` takes `sizes` up to 256; `.icns` takes `sizes`
|
|
1305
|
+
16, 32, 64, 128, 256, 512 and 1024; an `.svg` copy takes none.
|
|
1306
|
+
- `app-icon-maskable` (error, at `appIcon.maskable`): a padded master (`padding`
|
|
1307
|
+
0–0.4 of the width on each side) needs `background`, and its drawing stays
|
|
1308
|
+
inside the safe zone, the central circle of 80% of the width (W3C Web App
|
|
1309
|
+
Manifest). A separate maskable drawing is square and opaque to its edges. ADS
|
|
1310
|
+
reads both from the drawing rendered at 256 px.
|
|
1311
|
+
|
|
1312
|
+
#### Styling ownership
|
|
1313
|
+
|
|
1314
|
+
Styling exists only in owners, and owners style only through their recipes. Each
|
|
1315
|
+
finding is an `owner-analysis` error at its position.
|
|
1316
|
+
|
|
1317
|
+
- `source/css-in-js-import`: an import of a CSS-in-JS package in any
|
|
1318
|
+
design-system file, including owners, scenarios and fixtures. ADS keeps the
|
|
1319
|
+
known packages as one closed list, a backstop for libraries that hide a class
|
|
1320
|
+
name behind a component or a call.
|
|
1321
|
+
- A production module that authors no recipe renders only design-system owners.
|
|
1322
|
+
The errors are intrinsic markup (`source/plain-markup`); `className`, `class`,
|
|
1323
|
+
`style` or `css` on a rendered element (`source/plain-style-attribute`);
|
|
1324
|
+
styling written through the DOM (`source/plain-style-write`); and stylesheet
|
|
1325
|
+
imports (`source/plain-stylesheet-import`). To repair them, move the styling
|
|
1326
|
+
into a recipe in an owner. Then render that owner from the plain module, or
|
|
1327
|
+
make the module an owner by authoring the recipe of its markup.
|
|
1328
|
+
- A scenario styles nothing. It can render fixture markup around owners. Styling
|
|
1329
|
+
props (on owners too), DOM styling writes and stylesheet imports are the same
|
|
1330
|
+
errors, and a `<style>` element is `source/style-element`.
|
|
1331
|
+
- An owner imports no stylesheet (`source/owner-stylesheet-import`, at the
|
|
1332
|
+
import, whether or not the file exists).
|
|
1333
|
+
- An owner writes no styling through the DOM (`source/owner-style-write`).
|
|
1334
|
+
Geometry that it measures at runtime goes through the declared `measured`
|
|
1335
|
+
values of its recipe ([Runtime values](#runtime-values-and-interaction)).
|
|
1336
|
+
- A production module's import that points into a development location
|
|
1337
|
+
(mock media such as `../mocks/…/media/photo.svg`, a fixture) is
|
|
1338
|
+
`source/development-import`. `source/module-unresolved` stays for paths that
|
|
1339
|
+
are really unresolved.
|
|
1340
|
+
- A development file's import of an asset that the preview serves
|
|
1341
|
+
(`./media/mark.svg`, `?raw`, `?url`, `?worker`) needs no module declaration.
|
|
1342
|
+
|
|
1343
|
+
`source/framework-mismatch` is in
|
|
1344
|
+
[Structure, themes and brands](#structure-themes-and-brands).
|
|
1345
|
+
|
|
1346
|
+
**Mocks.** `mock-ownership` (codes `mock/<kind>`) applies
|
|
1347
|
+
to every script under `mocks/` and each helper it imports. A mock is held to
|
|
1348
|
+
what a source application is held to. The script renders only what it imports
|
|
1349
|
+
from `@ds` with explicit props: a pattern, and components only inside a
|
|
1350
|
+
pattern, as its child or in a slot prop (`component-outside-pattern`). It may import
|
|
1351
|
+
any framework hook and declared library. It reaches the design system only
|
|
1352
|
+
through `@ds`: a relative import leads to captured helpers inside `mocks/` or
|
|
1353
|
+
its own `media/` images. Native or local markup,
|
|
1354
|
+
`style`/`className`/`css`/`dangerouslySetInnerHTML`, spreads, re-exports,
|
|
1355
|
+
imperative styles, dynamic code and design hidden in strings are errors at their
|
|
1356
|
+
position.
|
|
1357
|
+
|
|
1358
|
+
##### The same check for a source package
|
|
1359
|
+
|
|
1360
|
+
The part of the mock rule that concerns design use is released as its own npm
|
|
1361
|
+
package, `@reqvire-org/ads-guard`. An application installs it and confirms that
|
|
1362
|
+
its own source does no design and uses the design system only. It is optional.
|
|
1363
|
+
Its purpose is to close the loop for work in the application, where ADS does
|
|
1364
|
+
not look: without it, a person or an agent can add an element or a class in
|
|
1365
|
+
application code and nothing reports it.
|
|
1366
|
+
|
|
1367
|
+
It runs on Node or Bun and needs no ADS in the application.
|
|
1368
|
+
|
|
1369
|
+
```sh
|
|
1370
|
+
npm install --save-dev @reqvire-org/ads-guard # or: bun add --dev @reqvire-org/ads-guard
|
|
1371
|
+
npx ads-guard # or: bunx ads-guard
|
|
1372
|
+
```
|
|
1373
|
+
|
|
1374
|
+
Where to run it:
|
|
1375
|
+
|
|
1376
|
+
| Stage | How |
|
|
1377
|
+
| --- | --- |
|
|
1378
|
+
| Lint | `"lint": "eslint . && ads-guard"` in the application's `package.json` |
|
|
1379
|
+
| Test | `"pretest": "ads-guard"`, so tests do not start on source that does design |
|
|
1380
|
+
| Build | `"prebuild": "ads-guard"`, when a build must never ship such source |
|
|
1381
|
+
| CI | A step `npx ads-guard` (or `bunx ads-guard`); it exits 1 on findings |
|
|
1382
|
+
| An agent's own loop | Tell the agent to run `npx ads-guard` after it edits application code, and to fix findings by using or adding a pattern, never by excluding the file |
|
|
1383
|
+
|
|
1384
|
+
`npx ads-guard --json` prints the report for tools.
|
|
1385
|
+
|
|
1386
|
+
`ads-guard.config.json`, in the application's root:
|
|
856
1387
|
|
|
857
1388
|
```json
|
|
858
1389
|
{
|
|
859
|
-
"
|
|
860
|
-
"
|
|
861
|
-
|
|
862
|
-
}
|
|
1390
|
+
"designSystem": "@acme/design",
|
|
1391
|
+
"include": ["src"],
|
|
1392
|
+
"exclude": ["src/generated"],
|
|
1393
|
+
"allow": { "react": ["Suspense", "StrictMode"], "react-router": ["Outlet", "RouterProvider"] }
|
|
863
1394
|
}
|
|
864
1395
|
```
|
|
865
1396
|
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
1397
|
+
- `designSystem` is the specifier the application imports the design system
|
|
1398
|
+
by. The guard reads its public entry to learn which exports are patterns.
|
|
1399
|
+
When the specifier is an alias that Node cannot resolve, `entry` names the
|
|
1400
|
+
entry file.
|
|
1401
|
+
- `include` lists the source folders. `exclude` lists folders and files under
|
|
1402
|
+
them that are not checked. Every run reports what was excluded, and an entry
|
|
1403
|
+
that does not exist is an error, so the list cannot hide anything.
|
|
1404
|
+
- `allow` lists components of other packages that carry no design, one by one:
|
|
1405
|
+
a router's outlet, providers, the framework's own markers.
|
|
1406
|
+
- Tests and the design system's own files are never checked; the report counts
|
|
1407
|
+
them. Document metadata (`<title>`, `<meta>`, `<script>`, a `<link>` that is
|
|
1408
|
+
not a stylesheet) is accepted anywhere.
|
|
1409
|
+
- Exit code 0: the source uses the design system only. 1: findings, each with
|
|
1410
|
+
a file, position, code (`design-usage/<kind>`), message and repair. 2: the
|
|
1411
|
+
configuration is wrong.
|
|
1412
|
+
|
|
1413
|
+
The configuration belongs to the application, not to the design system: ADS
|
|
1414
|
+
reads only the design-system project, and one design system can serve
|
|
1415
|
+
applications on different frameworks.
|
|
1416
|
+
|
|
1417
|
+
**Libraries in an application.** What a library gives decides how it is used.
|
|
1418
|
+
|
|
1419
|
+
| The library gives | Examples | Use |
|
|
1420
|
+
| --- | --- | --- |
|
|
1421
|
+
| Functions and hooks | Image URL builders, a router's hooks, date utilities | Freely. They are behavior. |
|
|
1422
|
+
| Components that render nothing | `Suspense`, `Outlet`, providers | Listed in the guard's `allow`. |
|
|
1423
|
+
| Hooks that return props for an element | `react-aria` | In the design system: the owner spreads them on its own element (`behaviorLibraries`). |
|
|
1424
|
+
| Components with their own design | A styled library, a framework's image component | Not rendered. Take the library's function; the design system owns the element. |
|
|
1425
|
+
|
|
1426
|
+
- **Images.** The application asks the library for the URLs and passes them to
|
|
1427
|
+
the design system's image owner: with Next.js, `getImageProps` from
|
|
1428
|
+
`next/image` gives `src`, `srcSet` and `sizes` as data; Cloudinary and imgix
|
|
1429
|
+
build the same from a source and a width. The starter's `Image` takes
|
|
1430
|
+
`source` and `responsive: { srcSet, sizes }`.
|
|
1431
|
+
- **Links.** The pattern renders `<a href>` and reports the click; the
|
|
1432
|
+
application navigates in the handler with its router.
|
|
1433
|
+
|
|
1434
|
+
#### Layout
|
|
1435
|
+
|
|
1436
|
+
**Grid containers.** A grid in container context (`context: "container"`)
|
|
1437
|
+
follows the nearest `ads-region` size container. An owned ancestor in the same
|
|
1438
|
+
owner must thus start one in every reachable choice: a region framed
|
|
1439
|
+
`frame: { container: "region" }`. Otherwise the tier rules of the grid never
|
|
1440
|
+
match, wherever the component is placed, and the grid is
|
|
1441
|
+
`source/grid-container-missing` at its construction. A container that a consumer
|
|
1442
|
+
renders around the component, or one inside a public component that the grid is
|
|
1443
|
+
passed to, is not evidence for this owner.
|
|
1444
|
+
|
|
1445
|
+
**Frames in grid cells.** A grid cell whose own construction declares a frame
|
|
1446
|
+
with a fixed inline size needs that width at the lower edge of every tier it is
|
|
1447
|
+
visible in. A fixed inline size is an `inline-size` that its `max-inline-size`
|
|
1448
|
+
does not cap to the region, or a `min-inline-size`.
|
|
1449
|
+
|
|
1450
|
+
- Where the grid algebra bounds the cell and the frame is wider, the cell is
|
|
1451
|
+
`source/frame-exceeds-region` at its construction. The finding names the tier,
|
|
1452
|
+
the condition and the context. The bound is the span of the cell less its
|
|
1453
|
+
gutter insets, in every context whose geometry differs.
|
|
1454
|
+
- Where the algebra cannot bound the cell (inherited tracks, or the placement
|
|
1455
|
+
outside a named condition at a tier that the condition can hold), or the size
|
|
1456
|
+
is not a length that ADS evaluates (an `em` of an unknown font size), it is
|
|
1457
|
+
the review item `review/frame-region-unresolved`, never a pass.
|
|
1458
|
+
- Frames deeper inside a cell are checked against the cell less the inline
|
|
1459
|
+
insets and fixed sizes of the owned elements between. A public component, or a
|
|
1460
|
+
list, figure, blockquote or fieldset in the way, is reviewed.
|
|
1461
|
+
- For the children of a fixed tiling grid, a size wider than the tile fails. Any
|
|
1462
|
+
other fixed size is reviewed, because a tile shrinks to a narrower region.
|
|
1463
|
+
- A public component placed as a cell or tile is reviewed, naming the narrowest
|
|
1464
|
+
region that the grid gives it. Its frame belongs to its own owner.
|
|
1465
|
+
- A nested grid inside a cell is checked against its own regions.
|
|
1466
|
+
|
|
1467
|
+
The overflow check of the render audit stays the rendered backstop.
|
|
1468
|
+
|
|
1469
|
+
**Row width.** An `inline` row is as wide as its content and never wider than
|
|
1470
|
+
its container. `extent: "container"` on its root makes it take the width
|
|
1471
|
+
available in any parent (a block, a column that aligns its children, the space
|
|
1472
|
+
left beside siblings). A part with `extent: "fill"` needs such a row, or one
|
|
1473
|
+
whose frame fixes its width: in a row that hugs, it has nothing to fill
|
|
1474
|
+
(`construction/extent-row-hugs`). `"container"` on a row whose frame fixes its
|
|
1475
|
+
width is `construction/extent-conflict`.
|
|
1476
|
+
|
|
1477
|
+
**Text layout.** Text layout is closed and resolved at compile time. A text
|
|
1478
|
+
part's `wrap` is one of anywhere (`true`/`"anywhere"`), `"never"`, `"balance"`
|
|
1479
|
+
(headings and short titles), `"pretty"` (body text) or `"truncate"`. Truncation
|
|
1480
|
+
is one line with an ellipsis, or a clamp to `lines: 2 | 3`. `reserveLines:
|
|
1481
|
+
1 | 2 | 3` makes the part always take that many lines of the line height of its
|
|
1482
|
+
text profile. Control labels keep their own closed `wrap` (word breaks by
|
|
1483
|
+
default, `"anywhere"` or `"never"`). [The language](LANGUAGE.md#closed-layout-constructs)
|
|
1484
|
+
gives the lowering; the contract's platform inventory lists each lowered feature
|
|
1485
|
+
([Browser targets](#browser-targets)).
|
|
1486
|
+
|
|
1487
|
+
- `spec/value-invalid`: `lines` other than `2 | 3`; `lines` without
|
|
1488
|
+
`wrap: "truncate"`; or a clamp that reserves more lines than it shows
|
|
1489
|
+
(`lines: 2` with `reserveLines: 3`, at `reserveLines`, naming both values).
|
|
1490
|
+
- `spec/value-invalid`, `construction/extent-conflict`: a clamp on a declared
|
|
1491
|
+
native `element`, or beside an arrangement's own display or a scroll
|
|
1492
|
+
container.
|
|
1493
|
+
- `source/clamp-on-control`: a clamp on a control or a form label (a button,
|
|
1494
|
+
label, legend, summary, select, option or text field), or on text inside one.
|
|
1495
|
+
It hides what the control does.
|
|
1496
|
+
- `review/truncated-text-unnamed`: truncated or clamped text without a `title`.
|
|
1497
|
+
Assistive technology reads all of the text. Sighted readers need the title, an
|
|
1498
|
+
expand control or the full content elsewhere, and analysis sees only the
|
|
1499
|
+
title.
|
|
1500
|
+
- `review/balance-on-paragraph`, at the part's `wrap`: `wrap: "balance"` on a
|
|
1501
|
+
text part rendered as a `<p>`. A paragraph is body text, which `"pretty"`
|
|
1502
|
+
suits. Render a heading as a heading element.
|
|
1503
|
+
|
|
1504
|
+
#### Runtime values and interaction
|
|
1505
|
+
|
|
1506
|
+
The authoring language owns these constructs. Each lowers to plain CSS and
|
|
1507
|
+
plain `style.setProperty`/`removeProperty` calls, with no ADS runtime.
|
|
1508
|
+
|
|
1509
|
+
**Measured geometry** ([language](LANGUAGE.md#measured-runtime-geometry),
|
|
1510
|
+
[cropped media](LANGUAGE.md#cropped-media)). A recipe declares what its owner
|
|
1511
|
+
measures at runtime with `measured: { name: { type, property, fallback? } }`.
|
|
1512
|
+
The owner writes the values with `recipe.measured.set` and `.clear`, or spreads
|
|
1513
|
+
`recipe.measured.props(…)` on the element for a value known at render. Codes:
|
|
1514
|
+
`construction/measured-property-unsupported`,
|
|
1515
|
+
`construction/measured-profile-conflict`,
|
|
1516
|
+
`construction/measured-placement-missing`, `source/measured-undeclared`,
|
|
1517
|
+
`review/measured-unused`, `construction/cover-box-missing` and
|
|
1518
|
+
`construction/cover-asset-unsupported`. A measured size on a `frame: "control"`
|
|
1519
|
+
part is checked for target size with its fallback and reviewed
|
|
1520
|
+
(`a11y-target-size-unresolved`). Measured values never take part in contrast.
|
|
1521
|
+
The starter's `Menu` is a worked example: it places its panel below its trigger,
|
|
1522
|
+
or above it when only that side has room, and clears the values when it closes.
|
|
1523
|
+
|
|
1524
|
+
**Interaction properties** ([language](LANGUAGE.md#interaction-properties)).
|
|
1525
|
+
Drag handles, splitters and carousels declare `cursor`, `touchAction` and
|
|
1526
|
+
`userSelect` in `normalize`, and scroll snap as `snap: { type, align }` on the
|
|
1527
|
+
arrangement that scrolls. Codes: `spec/value-invalid`,
|
|
1528
|
+
`construction/extent-conflict`, `construction/snap-without-scroll`,
|
|
1529
|
+
`review/user-select-text` and `review/touch-action-unhandled`. A splitter
|
|
1530
|
+
combines both constructs: the grip declares the interaction, the pane declares
|
|
1531
|
+
the measured width, and the pointer handlers of the owner write the width
|
|
1532
|
+
through the measured setter.
|
|
1533
|
+
|
|
1534
|
+
**Runtime paint from data** ([language](LANGUAGE.md#runtime-paint-from-data)). A
|
|
1535
|
+
recipe declares the paints that its owner selects by data (a chart series, a
|
|
1536
|
+
status) with `paints: { name: { property, values, fallback } }`. The owner
|
|
1537
|
+
writes `recipe.paints.set` and `.clear`. Codes:
|
|
1538
|
+
`construction/paint-property-unsupported`, `construction/paint-value-role`,
|
|
1539
|
+
`construction/paint-profile-conflict`,
|
|
1540
|
+
`construction/paint-contrast-insufficient`, `source/paint-undeclared`,
|
|
1541
|
+
`source/paint-value-untyped`, `review/paint-unused` and
|
|
1542
|
+
`review/paint-contrast-unresolved`. The starter's `BarChart` paints its bars
|
|
1543
|
+
from the `--chart-1`…`--chart-3` series tokens (`tokens/Charts/paint.ads.css`,
|
|
1544
|
+
with light, dark and high-contrast values).
|
|
1545
|
+
|
|
1546
|
+
**Press scale** ([language](LANGUAGE.md#state-focus-and-motion),
|
|
1547
|
+
[motion](MOTION.md)). A press effect is a `when` state that reads `scale` from
|
|
1548
|
+
the motion slot of the recipe: on the artwork part of a control, or on a region
|
|
1549
|
+
or control root that declares `transition: ["scale"]`. A scale factor is
|
|
1550
|
+
relative: 0.96 moves a 40px button in by less than 1px per side, and a 400px
|
|
1551
|
+
card by 8px. Select the factor per size class, through the motion profile that
|
|
1552
|
+
the motion slot of the composite selects. The starter names the classes
|
|
1553
|
+
(`tokens/Motion/motion-scale.ads.css`, `profiles/Motion/feedback.ads.ts`):
|
|
1554
|
+
|
|
1555
|
+
| Element size | Profile | Factor | Shrink |
|
|
1556
|
+
| --- | --- | --- | --- |
|
|
1557
|
+
| Artwork inside a control (~20px) | `press-glyph` | 0.98 in the starter; 0.9 gives a visible ~1px | ~0.2px per side at 0.98 |
|
|
1558
|
+
| A control (~120 × 40px) | `press-control` | 0.97 | ~1–2px |
|
|
1559
|
+
| A card or tile surface (~300px) | `press-surface` | 0.99 | ~1.5px |
|
|
1560
|
+
| A page-sized region | none | — | no press scale |
|
|
1561
|
+
|
|
1562
|
+
The starter's Button, IconButton and ToggleTile press their artwork
|
|
1563
|
+
(`action-feedback` composes `press-glyph`). A `frame: "container"` root whose
|
|
1564
|
+
press factor is below 0.98 in some token context, or cannot be read as a number,
|
|
1565
|
+
is the review item `review/press-scale-large-surface` at the `scale` endpoint
|
|
1566
|
+
(`owner-analysis-review`, never blocking, also in a draft's acceptance result).
|
|
1567
|
+
`frame: {}` roots and control roots do not count. Select a surface-class press
|
|
1568
|
+
profile (factor at least 0.98) or no press scale, or keep a deliberate stronger
|
|
1569
|
+
press. Only such roots read token values for this item, so every other owner
|
|
1570
|
+
keeps its analysis across token edits.
|
|
1571
|
+
|
|
1572
|
+
#### Generated source and the emitted output
|
|
1573
|
+
|
|
1574
|
+
- `palette-generated` (error): a declared `palette.generated.ts` is missing or
|
|
1575
|
+
out of date, or one is present without `palette: true`
|
|
1576
|
+
([Regenerating generated source](#regenerating-generated-source)).
|
|
1577
|
+
- `generated-modified` (error) and `generated-stale` (info): see
|
|
1578
|
+
[Hand edits and out-of-date output](#hand-edits-and-out-of-date-output).
|
|
1579
|
+
|
|
1580
|
+
#### Scenarios
|
|
1581
|
+
|
|
1582
|
+
Every public owner needs a scenario. A public owner is a file that the barrel
|
|
1583
|
+
re-exports and that authors recipes; a public plain module needs none. A public
|
|
1584
|
+
owner that no scenario covers is a `scenario-coverage` error at the owner file,
|
|
1585
|
+
naming it and where its scenario goes.
|
|
1586
|
+
|
|
1587
|
+
A scenario is a `*.ads.scenario.tsx` under `components/`, `patterns/` or
|
|
1588
|
+
`mocks/`. It supplies data and subjects; ADS draws the page with its own
|
|
1589
|
+
showcase components, the same for every design system.
|
|
882
1590
|
|
|
883
1591
|
```tsx
|
|
884
1592
|
import { Button } from "@ds";
|
|
885
|
-
import {
|
|
886
|
-
|
|
887
|
-
export
|
|
1593
|
+
import type { Scenario } from "@reqvire-org/ads/showcase";
|
|
1594
|
+
|
|
1595
|
+
export const scenario = {
|
|
1596
|
+
title: "Button",
|
|
1597
|
+
description: "The primary action control.",
|
|
1598
|
+
covers: ["Button"],
|
|
1599
|
+
specimens: [
|
|
1600
|
+
{ title: "Sizes", arrangement: "row",
|
|
1601
|
+
render: () => <><Button label="Continue" size="sm" /><Button label="Continue" size="lg" /></> },
|
|
1602
|
+
],
|
|
1603
|
+
} satisfies Scenario;
|
|
888
1604
|
```
|
|
889
1605
|
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
1606
|
+
- It exports a literal `scenario` and has no default export (`scenario-entry`).
|
|
1607
|
+
ADS draws the title, the description, each specimen's title and note, the box
|
|
1608
|
+
around a specimen, the gaps and the state switch.
|
|
1609
|
+
- `title` is a nonempty static string. `covers` lists the public UI that the
|
|
1610
|
+
specimens render. Optional fields are `description`, `id`, `exercises`,
|
|
1611
|
+
`frame`, `states` and `captureTargets` (up to 20 named, nonempty CSS selectors
|
|
1612
|
+
of at most 500 characters). Another field, a `frame` outside `inline`,
|
|
1613
|
+
`screen` and `phone`, or `states` that is not an object literal of named prop
|
|
1614
|
+
sets is a `scenario-field` error.
|
|
1615
|
+
- `specimens` is a nonempty array literal of object literals
|
|
1616
|
+
(`scenario-specimens`). A specimen has a `render` function and can have a
|
|
1617
|
+
static `title` and `note`, an `arrangement` (`stack`, `row`, `tiles`) and a
|
|
1618
|
+
`width` (`content`, `full`, `small`, `medium`).
|
|
1619
|
+
- `render` is a component of the project's framework. It can hold local state.
|
|
1620
|
+
Its argument is the chosen state's props.
|
|
1621
|
+
- A scenario file writes no markup of its own (`scenario-markup`): no HTML or
|
|
1622
|
+
SVG element, no `style` attribute, and no component that a fixture or helper
|
|
1623
|
+
file declares. It renders owners, text and the scenario kit.
|
|
1624
|
+
|
|
1625
|
+
**States.** `states` names sets of props. ADS draws one switch for the scenario
|
|
1626
|
+
and passes the chosen set to every `render`. A new choice starts each specimen
|
|
1627
|
+
again. Use local state for what a person changes by using the owner. The
|
|
1628
|
+
showcase address names the chosen state (`&state=<name>`), so a state can be
|
|
1629
|
+
linked, and `ads_capture` takes the same name to capture it.
|
|
1630
|
+
|
|
1631
|
+
**Frames.** `frame: "inline"` (the default) is a page of boxed specimens.
|
|
1632
|
+
`frame: "screen"` shows the first specimen as a whole screen, with the state
|
|
1633
|
+
switch in a bar above it; a mock uses it. `frame: "phone"` shows it in a
|
|
1634
|
+
390 by 844px box.
|
|
1635
|
+
|
|
1636
|
+
**The scenario kit.** `@reqvire-org/ads/showcase` supplies what a subject
|
|
1637
|
+
sometimes needs around it. The kit renders only in an ADS preview.
|
|
1638
|
+
|
|
1639
|
+
| Kit | Purpose |
|
|
1640
|
+
| --- | --- |
|
|
1641
|
+
| `Container` | A parent of a named size and direction, for a subject that only makes sense inside one. `inline`: `fill`, `pane`, `column`, `page`. `block`: `content`, `short`, `medium`, `tall`. |
|
|
1642
|
+
| `Placeholder` | A labelled, tinted stand-in for a slot that the application fills. |
|
|
1643
|
+
| `Anchor` | The control an overlay opens from. Its child is a function that receives the control's element. |
|
|
1644
|
+
| `EventLog`, `useEvents` | Shows what the owner's callbacks received. |
|
|
1645
|
+
|
|
1646
|
+
**Roles.** The type of an export decides what it is, however it was made
|
|
1647
|
+
(aliases, re-exports, `memo`, any chain of factories).
|
|
1648
|
+
|
|
1649
|
+
- It is rendered UI when calling it returns the framework's element type, or
|
|
1650
|
+
constructing it gives a class component. The element types are React's
|
|
1651
|
+
`ReactNode`, `ReactElement` or `JSX.Element`, and Preact's `VNode`,
|
|
1652
|
+
`ComponentChildren` or `JSX.Element`, identified by the framework's own
|
|
1653
|
+
declarations.
|
|
1654
|
+
- It is a behavioral API when it is callable or constructible and returns
|
|
1655
|
+
anything else (a value, `void`, a controller instance, a hook's result), or is
|
|
1656
|
+
declared under `controllers/` (a context provider).
|
|
1657
|
+
- An export of a recipe owner, or one that aliases it, is UI unless its
|
|
1658
|
+
signatures show otherwise (a hook beside the component).
|
|
1659
|
+
- When its type, or what calling it returns, is `any`, `unknown` or generic, ADS
|
|
1660
|
+
does not guess. An `exercises` entry that names it is a
|
|
1661
|
+
`scenario-exercise-review` item that says why. A `covers` entry that names it
|
|
1662
|
+
is judged by whether the scenario renders it.
|
|
1663
|
+
|
|
1664
|
+
**`covers`.** ADS checks each entry on its own, at that entry
|
|
1665
|
+
(`entry: "covers[1]"`). A bad entry is left out of what the scenario registers,
|
|
1666
|
+
and the valid ones stand.
|
|
1667
|
+
|
|
1668
|
+
- `scenario-covers`: the entry is not a static name, or the barrel does not
|
|
1669
|
+
export it.
|
|
1670
|
+
- `scenario-covers-role`: the entry names a public behavioral API.
|
|
1671
|
+
- `scenario-render`, at the entry: nothing that a specimen's `render` reaches
|
|
1672
|
+
renders the covered export. ADS resolves every JSX tag that a `render` reaches,
|
|
1673
|
+
and every call of the framework's element factory (`createElement`, or
|
|
1674
|
+
Preact's `h`), to its declaration, through `const` aliases. It follows the
|
|
1675
|
+
design system's own components (scenario adapters, owners) into theirs, so a
|
|
1676
|
+
mock renders the owners that its patterns render. An import, or a
|
|
1677
|
+
reference outside the rendered tree, does not count.
|
|
1678
|
+
|
|
1679
|
+
**`exercises`** names the public behavioral APIs that the scenario uses, so that
|
|
1680
|
+
previews and `ads_scenarios` can find them. It is a demonstration, never passing
|
|
1681
|
+
behavior evidence. The scenario stays registered with its valid entries and its
|
|
1682
|
+
covers.
|
|
1683
|
+
|
|
1684
|
+
- `scenario-exercise-api`, at the entry: the entry is not a static name, is not
|
|
1685
|
+
exported by the barrel, names rendered UI, or names a value that is neither
|
|
1686
|
+
callable nor constructible.
|
|
1687
|
+
- `scenario-field`: `exercises` is not an array.
|
|
1688
|
+
- `scenario-exercise`: the mounted code never uses the API (it is only imported,
|
|
1689
|
+
or used in a function that nothing reaches). A use is a call, a construction
|
|
1690
|
+
or a render (a context provider), in a specimen's `render` or in a development
|
|
1691
|
+
adapter that it reaches: a component it renders, a function it calls, an event
|
|
1692
|
+
handler. A call of a method attached to the API (`api.success()`) counts,
|
|
1693
|
+
through aliases, namespace imports and re-exports.
|
|
1694
|
+
- `scenario-exercise-review` (review, never blocks): the mounted code only
|
|
1695
|
+
passes the API on or reads it, or ADS cannot tell the role of the entry.
|
|
1696
|
+
|
|
1697
|
+
**Other rules.** The location, entry, metadata and identity of a scenario are
|
|
1698
|
+
checked as `scenario-location`, `scenario-entry`, `scenario-metadata`,
|
|
1699
|
+
`scenario-field` and `scenario-identity`. After a field error (an unknown field,
|
|
1700
|
+
an empty `title`, an invalid `id` or `captureTargets`), the scenario stays
|
|
1701
|
+
registered and its coverage counts while `covers` reads. Unreadable metadata
|
|
1702
|
+
(`scenario-metadata`, marked `coverage: "not-established"`) leaves its coverage
|
|
1703
|
+
unknown, not missing.
|
|
1704
|
+
|
|
1705
|
+
#### Previews
|
|
1706
|
+
|
|
1707
|
+
A scenario previews the emitted owner: the bytes that `ads emit` writes, with
|
|
1708
|
+
the emitted `foundation.css` as the document CSS.
|
|
1709
|
+
|
|
1710
|
+
- While a preview compiler runs, ADS emits each settled edit of the design
|
|
1711
|
+
system into a preview-owned tree (`.ds/emitted/live`, never the output
|
|
1712
|
+
folder), and the open previews rebuild from it. Scenario and fixture edits
|
|
1713
|
+
rebuild without an emit.
|
|
1714
|
+
- A revision whose check fails is not emitted, and the previews keep the last
|
|
1715
|
+
good revision. `ads://project/build` reports `freshness`
|
|
1716
|
+
`{ kind: "stale", shown, reason: { kind: "emit-failed", failure } }` with the
|
|
1717
|
+
findings of the check until the edit is fixed, then
|
|
1718
|
+
`{ kind: "current", revision }`.
|
|
1719
|
+
- The showcase marks such a preview stale. The preview status in the toolbar
|
|
1720
|
+
becomes an error. Its details list the findings of the check (or of emission)
|
|
1721
|
+
and offer Retry preview, until the revision is current again.
|
|
1722
|
+
- Several MCP servers on one project share that tree. They write it one at a
|
|
1723
|
+
time under a lock in `.ds/locks/`, and an earlier revision never replaces the
|
|
1724
|
+
revision of the latest edit.
|
|
1725
|
+
|
|
1726
|
+
#### Touch density
|
|
1727
|
+
|
|
1728
|
+
Input modality is a token context, like a theme or a brand, so controls can grow
|
|
1729
|
+
on touch screens without a new construct. Override the size tokens in their own
|
|
1730
|
+
role sheets under `@media (pointer: coarse)`. Every owner that reads them
|
|
1731
|
+
follows:
|
|
893
1732
|
|
|
894
|
-
```
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
Select.ads.scenario.tsx
|
|
901
|
-
Switch/ # ungrouped owner
|
|
902
|
-
Switch.ads.scenario.tsx
|
|
903
|
-
```
|
|
904
|
-
|
|
905
|
-
The folder name is the group name, with spelling and case unchanged:
|
|
906
|
-
`form-controls/` displays as `form-controls`. The owner's own directory and the
|
|
907
|
-
layer root are never groups. The same convention applies to `patterns/` and
|
|
908
|
-
`composition/`. Nested containers appear as one label, such as
|
|
909
|
-
`Forms / Selection`. A regular file (`index.ts`, `README.md`, etc.) or a symbolic
|
|
910
|
-
link prevents that container from becoming a group. Hidden entries are ignored.
|
|
911
|
-
|
|
912
|
-
There is no grouping metadata, tag list or grouping registry. Do not add `group`
|
|
913
|
-
to the scenario export or owner contract. The optional `group` in MCP discovery
|
|
914
|
-
results is computed from folders; it is not authoring input. Change a group by
|
|
915
|
-
moving complete owner directories and updating imports, exports and any scenario,
|
|
916
|
-
behavior or capture references whose path-derived IDs change.
|
|
917
|
-
|
|
918
|
-
Ungrouped entries remain directly visible without a Default heading. Named groups
|
|
919
|
-
are collapsible and sorted alphabetically within each layer. Existing flat
|
|
920
|
-
projects continue to work without moving files. Token views follow the catalogue's groups.
|
|
921
|
-
|
|
922
|
-
ADS renders the **Tokens** section itself from the token sheets and
|
|
923
|
-
`<dsDir>/tokens/catalog.ads.json`. Token navigation follows the same model as folders: a
|
|
924
|
-
catalogue group is a sidebar group, and each kind of token in it (color fills, text colors,
|
|
925
|
-
font families, text sizes, line heights, shadows…) is one view, `tokens/<Group>/<section>`, so a page shows one kind at a
|
|
926
|
-
time. A group with a single kind stays one view, `tokens/<Group>`; the `Layout` group stays one
|
|
927
|
-
view with the spatial reference. The section follows from each token's sample property, so there
|
|
928
|
-
is no section metadata. As on component pages, each sample sits on the project canvas in a box
|
|
929
|
-
while names and values sit on the showcase surface. The catalogue lists groups and gives each token its sample binding:
|
|
1733
|
+
```css
|
|
1734
|
+
/* tokens/Controls/control-min-size.ads.css */
|
|
1735
|
+
:root { --control-height-sm: 1.75rem; --control-height-md: 2.25rem; --control-height-lg: 2.75rem; }
|
|
1736
|
+
@media (pointer: coarse) {
|
|
1737
|
+
:root { --control-height-sm: 2.25rem; --control-height-md: 2.75rem; --control-height-lg: 3rem; }
|
|
1738
|
+
}
|
|
930
1739
|
|
|
931
|
-
|
|
932
|
-
{
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
{ "id": "Color", "title": "Color", "samples": [
|
|
936
|
-
{ "token": "--accent", "property": "background-color", "probe": "rgb(31, 97, 163)" }
|
|
937
|
-
] }
|
|
938
|
-
]
|
|
1740
|
+
/* tokens/Controls/frame-inset.ads.css: the insets that go with the taller frames */
|
|
1741
|
+
:root { --control-inset-inline: 0.75rem; }
|
|
1742
|
+
@media (pointer: coarse) {
|
|
1743
|
+
:root { --control-inset-inline: 1rem; }
|
|
939
1744
|
}
|
|
940
1745
|
```
|
|
941
1746
|
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
interfaces. No delivery flag or project migration is required. Existing custom showcases
|
|
973
|
-
are preserved by init; replace their run command deliberately when migrating.
|
|
974
|
-
|
|
975
|
-
Run core and registered project checks before preview compilation, alongside
|
|
976
|
-
framework checks and meaningful tests. Review real entries at narrow/wide sizes,
|
|
977
|
-
in both themes and relevant states. Browser verification still establishes
|
|
978
|
-
layout, keyboard/focus, interactions and motion; compiler success does not.
|
|
979
|
-
|
|
980
|
-
Public `*Props` declarations omit inherited DOM `style`; arbitrary visual strings
|
|
981
|
-
also fail. Measured geometry uses explicit boundaries. HTML mount styles may
|
|
982
|
-
only establish full root height and body overflow. Project presentation belongs
|
|
983
|
-
in owned component/pattern styles, with tokens supplying visual values.
|
|
984
|
-
|
|
985
|
-
## Branding
|
|
986
|
-
|
|
987
|
-
ADS has fixed token names and ownership namespaces. Change values in the existing
|
|
988
|
-
token files; `--accent`, `--font-sans`, `--radius-md`, and the other shared roles
|
|
989
|
-
keep their meanings across projects. Foreign shared prefixes such as `--nuv-*` or
|
|
990
|
-
`--brand-*` fail. There are no independent owner-local token namespaces. Components own `--ds-*`, patterns own `--ux-*`, and the showcase
|
|
991
|
-
reserves `--showcase-*` for showcase boundaries. Fixture files still define no
|
|
992
|
-
custom styling; the frame pattern uses `--ux-*`. Branding never assigns
|
|
993
|
-
component state variables.
|
|
994
|
-
|
|
995
|
-
Keep original artwork (SVG masters, finished PNG/JPEG/WebP images, delivered
|
|
996
|
-
`.ico`/`.icns` files, in any mix) and a usage/credits/license README in
|
|
997
|
-
`design-system/assets/brand/`, and font files in `assets/fonts/`. `ads check` fails
|
|
998
|
-
when artwork is undescribed in that README (`brand-readme`), the README states no
|
|
999
|
-
license (`brand-license`), and lists artwork nothing uses for review (`brand-unused`). Name a dark-theme variant
|
|
1000
|
-
`<name>.dark.svg`; the component showing it renders both and shows each with a display switch
|
|
1001
|
-
(`display: var(--display-dark, block)`). ADS renders the showcase's first
|
|
1002
|
-
section, **Brand** (`brand/Assets`), from the artwork in `assets/brand/` and its subfolders: artwork in the
|
|
1003
|
-
current theme and the app icon at its actual sizes. Projects author no brand preview scenarios. A finished image renders only at or below its own
|
|
1004
|
-
pixel size; ADS never enlarges it. The [branding guide](../skills/ads-designer/references/branding.md)
|
|
1005
|
-
(`ads://guides/branding`) covers the whole flow. Font declarations
|
|
1006
|
-
belong in optional `tokens/fonts.css`. ADS generates the import-only foundation entry
|
|
1007
|
-
(`styles.css`) from the sheets present, in this order: fonts, colors, typography, spacing,
|
|
1008
|
-
elevation, base, themes.generated.css. Never edit it by hand.
|
|
1009
|
-
Fixed artwork colors and geometry are permitted inside SVG assets; they do not
|
|
1010
|
-
permit raw visual values in component or pattern styles.
|
|
1011
|
-
|
|
1012
|
-
Foundation sheets are checked source. Keep root token definitions in value sheets,
|
|
1013
|
-
font faces in `fonts.css`, and closed-role defaults in `base.css` (document
|
|
1014
|
-
typography/canvas/theme, limited native resets, global focus/reduced motion).
|
|
1015
|
-
Owner hooks, contextual UI selectors, keyframes, extra CSS imports, raw visual
|
|
1016
|
-
values and missing token references fail checks there too. Move component-specific
|
|
1017
|
-
repairs into their Linaria owner; see the [foundation contract](ADS.md#shared-token-contract).
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
Select one square master, an SVG or a PNG/JPEG/WebP of at least 512 px, with an
|
|
1021
|
-
ADS-relative path:
|
|
1747
|
+
- The token checks evaluate the overrides of each `@media` condition as a
|
|
1748
|
+
context of its own, crossed with every theme and brand. Thus
|
|
1749
|
+
`a11y-target-size`, contrast and `token-type` all check the touch values. A
|
|
1750
|
+
coarse value that makes a control smaller than 24 px fails in that context,
|
|
1751
|
+
and the finding names it (for example `:root under @media (pointer: coarse)`).
|
|
1752
|
+
- `ads emit` writes the overrides into the emitted sheets unchanged. Nothing
|
|
1753
|
+
runs at runtime.
|
|
1754
|
+
- ADS checks WCAG 2.2 AA (2.5.8): 24 px, whatever the pointer. Larger touch
|
|
1755
|
+
targets (44 px is a common platform guideline) are a design choice that the
|
|
1756
|
+
tokens express, not a rule that ADS enforces. An owned hit area
|
|
1757
|
+
(`minTargetBlockSize`, `minTargetInlineSize` on a frame profile) can enlarge
|
|
1758
|
+
the target without a change to the layout.
|
|
1759
|
+
- The starter does this ([starter touch density](STARTER.md#touch-density)). To
|
|
1760
|
+
see it, open a scenario in a touch context: Chromium DevTools device
|
|
1761
|
+
emulation, or Playwright's `hasTouch: true`, which makes Chromium report a
|
|
1762
|
+
coarse primary pointer.
|
|
1763
|
+
- Prefer `(pointer: coarse)` for the primary input. `(any-pointer: coarse)` also
|
|
1764
|
+
matches a laptop with a touch screen, which then gets touch density with a
|
|
1765
|
+
mouse also.
|
|
1766
|
+
|
|
1767
|
+
### Colours that depend on their surroundings
|
|
1768
|
+
|
|
1769
|
+
Some UI must change its colours with what it sits on. Examples are a dark footer
|
|
1770
|
+
or dark card on a light page, a button over a photo or a strongly coloured
|
|
1771
|
+
banner, the cells and icons of a selected table row, and the links inside a
|
|
1772
|
+
warning banner. ADS has two checked patterns for this.
|
|
1773
|
+
|
|
1774
|
+
#### Nested theme and brand sections
|
|
1775
|
+
|
|
1776
|
+
A design system opts in with `sections: true` in its foundation declaration:
|
|
1022
1777
|
|
|
1023
|
-
```
|
|
1024
|
-
|
|
1778
|
+
```ts
|
|
1779
|
+
// foundation.ads.ts
|
|
1780
|
+
export default foundation({
|
|
1781
|
+
// …
|
|
1782
|
+
themes: [
|
|
1783
|
+
{ name: "light", scheme: "light" },
|
|
1784
|
+
{ name: "dark", scheme: "dark" },
|
|
1785
|
+
],
|
|
1786
|
+
sections: true,
|
|
1787
|
+
});
|
|
1025
1788
|
```
|
|
1026
1789
|
|
|
1027
|
-
|
|
1028
|
-
|
|
1790
|
+
Then `data-theme="<name>"` or `data-brand="<name>"` on any element switches
|
|
1791
|
+
every token in the subtree of that element, exactly as the same attribute on
|
|
1792
|
+
`<html>` switches the page.
|
|
1029
1793
|
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
| `apple-touch-icon.png` | 180 × 180 |
|
|
1035
|
-
| `icon-192.png` | 192 × 192 |
|
|
1036
|
-
| `icon-512.png` | 512 × 512 |
|
|
1794
|
+
**Cost.** Sections are opt-in because they cost CSS. Every owner sheet carries
|
|
1795
|
+
toggle rules and a section rule for its context-dependent tokens. Without `sections: true`, ADS emits
|
|
1796
|
+
no section rule, and `data-theme` or `data-brand` below `<html>` changes
|
|
1797
|
+
nothing: the subtree keeps the page's values.
|
|
1037
1798
|
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
before generated files are replaced, so invalid artwork leaves prior outputs
|
|
1043
|
-
intact. Sources, duplicate output mounts, and symlinked write paths are checked.
|
|
1799
|
+
**Authoring.** Token sheets continue to declare their contexts on the root only
|
|
1800
|
+
(`:root`, `:root[data-theme="dark"]`, `:root[data-brand="iris"]`,
|
|
1801
|
+
`:root[data-brand="iris"][data-theme="dark"]`). Emission applies each context to
|
|
1802
|
+
sections also ([The output folder](#the-output-folder)).
|
|
1044
1803
|
|
|
1045
|
-
|
|
1804
|
+
**Selection.** The nearest `data-theme` and the nearest `data-brand` select the
|
|
1805
|
+
context independently, at any depth. The nearest attribute is the element's own
|
|
1806
|
+
or an ancestor's, `<html>` included.
|
|
1046
1807
|
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1808
|
+
- A `data-brand="iris"` section inside a dark page gets iris's dark values.
|
|
1809
|
+
- A `data-theme="light"` section inside a dark page resets to the values of the
|
|
1810
|
+
default theme.
|
|
1811
|
+
- The `color-scheme` of the section follows its theme, so native controls and
|
|
1812
|
+
`light-dark()` match.
|
|
1813
|
+
- `foundation.css` repaints its document surface.
|
|
1050
1814
|
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1815
|
+
The checks already evaluate every theme, brand and brand × theme context. The
|
|
1816
|
+
same findings thus prove contrast inside a section and on the page.
|
|
1817
|
+
|
|
1818
|
+
A dark footer on a light page:
|
|
1819
|
+
|
|
1820
|
+
```tsx
|
|
1821
|
+
// Application code: the footer and everything in it take the dark theme's values.
|
|
1822
|
+
<footer data-theme="dark">
|
|
1823
|
+
<p>Northstar · Terms · Privacy</p>
|
|
1824
|
+
<Button onClick={subscribe}>Subscribe</Button>
|
|
1825
|
+
</footer>
|
|
1060
1826
|
```
|
|
1061
1827
|
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
and
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
hook and size token for a logo/icon beside text. It centers the artwork and aligns
|
|
1109
|
-
the text runs, preserving intrinsic artwork proportions. The blocking check rejects
|
|
1110
|
-
conflicting styles and unresolved hooks; it does not restrict standalone artwork
|
|
1111
|
-
or prove optical balance. See the [worked branding example](../skills/ads-designer/references/branding.md#aligning-artwork-with-text)
|
|
1112
|
-
for markup, font trimming, browser support and review boundaries.
|
|
1113
|
-
|
|
1114
|
-
`ads audit` runs `ads check` first. A policy error such as `layout-fixed-width` or `img-attributes`
|
|
1115
|
-
does not stop it: it renders every scenario and reports those errors with its own, and exits 1. Only
|
|
1116
|
-
an error that stops rendering blocks it (`source-syntax`, `css-syntax`, `project-structure`,
|
|
1117
|
-
`styles-entry`, `scenario-contract`); a broken import fails the scenarios that reach it. `ads check`,
|
|
1118
|
-
`ads compile` and `ads validate` stop on every error, as before.
|
|
1119
|
-
|
|
1120
|
-
It adds a rendered check: axe-core (WCAG A/AA rules) in every component, pattern
|
|
1121
|
-
and composition scenario, once per declared brand and theme (`--scenario`, `--theme` and
|
|
1122
|
-
`--brand` narrow it). Each violation is an `a11y-axe` error naming the axe rule, WCAG
|
|
1123
|
-
criterion, themes and brands, failing elements and help link, and `ads audit` exits 1. It
|
|
1124
|
-
needs the project's Playwright and browser, as captures do. `ads validate` runs it too,
|
|
1125
|
-
over every scenario its change set reaches; MCP draft acceptance audits the draft
|
|
1126
|
-
owners' own scenarios before writing source unless `acceptance.audit` is `false`, and an
|
|
1127
|
-
`a11y-axe`, `a11y-non-text-contrast` or `layout-overflow` error rejects the change.
|
|
1128
|
-
`ads tokens --format dtcg` exports the tokens as W3C Design Tokens JSON for design tools
|
|
1129
|
-
(`--theme <name>` and `--brand <name>` select one context). MCP clients read the same export
|
|
1130
|
-
from `ads://project/tokens/dtcg` (`?theme=` and `?brand=`).
|
|
1131
|
-
|
|
1132
|
-
`themes` in `ds.config.json` declares the themes (a name and the color scheme for native
|
|
1133
|
-
controls; the first is the default), and the optional `brands` the brands (the first is the
|
|
1134
|
-
default). `data-theme="<name>"` and `data-brand="<name>"` on `<html>` theme the page, on any
|
|
1135
|
-
element one section; each element follows its nearest theme and its nearest brand, at any
|
|
1136
|
-
nesting depth, in every browser with CSS variables.
|
|
1137
|
-
|
|
1138
|
-
Write a token that differs per theme as one plain value per theme, named with the theme as
|
|
1139
|
-
suffix, on `:root`:
|
|
1828
|
+
**Guarantees.**
|
|
1829
|
+
|
|
1830
|
+
- Any element below a section resolves the context of the nearest `data-theme`
|
|
1831
|
+
and the nearest `data-brand` above it, at any depth and in any order of the
|
|
1832
|
+
two attributes.
|
|
1833
|
+
- A token whose value reads another token (`var(--action-fill)`) resolves with
|
|
1834
|
+
the values of the section.
|
|
1835
|
+
- A token that a context leaves undefined is undefined in such a section also.
|
|
1836
|
+
Its readers take their `var()` fallback.
|
|
1837
|
+
- Only declared names switch. An undeclared `data-theme` value leaves the
|
|
1838
|
+
section on the context of its parent.
|
|
1839
|
+
|
|
1840
|
+
**Limits.**
|
|
1841
|
+
|
|
1842
|
+
- A section switches whole themes and brands, never a subset of tokens.
|
|
1843
|
+
- A recipe's own declaration of a token on the section element wins over the
|
|
1844
|
+
value of the section. Sections apply at zero specificity, as the root values
|
|
1845
|
+
of the page are overridable.
|
|
1846
|
+
- Conditional overrides (`@media`, `@supports`) follow each condition as the
|
|
1847
|
+
checks evaluate it, one condition at a time. When two conditions hold at once
|
|
1848
|
+
and override the same token in different contexts, a section takes the value
|
|
1849
|
+
of the later condition, where the page root cascades them by specificity.
|
|
1850
|
+
- `@layer` is read as the checks read it. The contexts of a token in one layer
|
|
1851
|
+
behave exactly. A layered and an unlayered override of the same token are not
|
|
1852
|
+
ranked by layer.
|
|
1853
|
+
|
|
1854
|
+
#### Explicit choices
|
|
1855
|
+
|
|
1856
|
+
Sometimes a child must look different on one particular background that is not a
|
|
1857
|
+
whole theme, such as a photo or a brand-coloured banner. The child then exposes
|
|
1858
|
+
a closed choice that the caller sets, as Spectrum's `staticColor` prop does. The
|
|
1859
|
+
choice is typed and checked like any other choice. The caller must pass it.
|
|
1860
|
+
|
|
1861
|
+
```tsx
|
|
1862
|
+
// IconButton.tsx (sketch): tone selects a precompiled surface; the default adds nothing.
|
|
1863
|
+
export interface IconButtonProps {
|
|
1864
|
+
// …
|
|
1865
|
+
/** "on-dark" over a photo or dark fill the theme does not know about. */
|
|
1866
|
+
tone?: "default" | "on-dark";
|
|
1867
|
+
}
|
|
1868
|
+
const toneChoices = {
|
|
1869
|
+
default: undefined,
|
|
1870
|
+
"on-dark": recipe({ surface: "control-on-dark-surface" }).root,
|
|
1871
|
+
};
|
|
1872
|
+
// … className={`ds-icon-button ${anatomy} ${toneChoices[tone] ?? ""} …`}
|
|
1873
|
+
```
|
|
1140
1874
|
|
|
1141
1875
|
```css
|
|
1876
|
+
/* tokens/Surfaces/paint.ads.css: static paints, the same in every context. */
|
|
1142
1877
|
:root {
|
|
1143
|
-
--
|
|
1144
|
-
--
|
|
1145
|
-
--bg-canvas-light: var(--slate-1-light); /* a half refers to halves */
|
|
1146
|
-
--bg-canvas-dark: var(--slate-2-dark);
|
|
1147
|
-
--accent: var(--color-accent-9); /* single values stay single */
|
|
1148
|
-
}
|
|
1149
|
-
[data-brand="acme"] { /* a brand sets its own halves */
|
|
1150
|
-
--color-accent-9-light: oklch(55% .2 25);
|
|
1151
|
-
--color-accent-9-dark: oklch(70% .16 25);
|
|
1878
|
+
--static-dark-fill: #101c19;
|
|
1879
|
+
--static-light-text: #ffffff;
|
|
1152
1880
|
}
|
|
1153
1881
|
```
|
|
1154
1882
|
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
`"followSystemTheme": true` makes a page without `data-theme` take the first declared theme
|
|
1165
|
-
whose scheme matches the OS `prefers-color-scheme`; an explicit `data-theme` wins.
|
|
1166
|
-
|
|
1167
|
-
Beside it ADS generates `tokens/themes.generated.ts`, written, checked and kept current
|
|
1168
|
-
together with the CSS: every color token resolved for every theme and brand as `{ css, rgba }`
|
|
1169
|
-
for Canvas, WebGL and SVG renderers. The starter's `controllers/Palette` reads it:
|
|
1170
|
-
`paletteFor(element)` (the nearest theme and brand's palette), `observePalette(element,
|
|
1171
|
-
callback)` (once per theme or brand change) and `resolveColor(element, value)` (a non-token
|
|
1172
|
-
color, cached, without inserting elements). `render-color-probe` (review) flags color reads
|
|
1173
|
-
from the page inside per-item render callbacks. The same module exports `themed({ light,
|
|
1174
|
-
dark, … })` and `themedByScheme({ light, dark })` for per-theme values that come from data at
|
|
1175
|
-
runtime; `light-dark()` is an error in token sheets, component CSS and component string
|
|
1176
|
-
literals (`theme-light-dark`).
|
|
1177
|
-
|
|
1178
|
-
Errors: a token value set under `[data-theme]`, `prefers-color-scheme` or a combined brand
|
|
1179
|
-
selector (`theme-old-form`); a component or pattern styled by a `[data-theme]` or
|
|
1180
|
-
`[data-brand]` ancestor selector (`theme-selector`); a themed token without a half for every theme
|
|
1181
|
-
(`theme-coverage`); a token set both as one value and as halves (`theme-half-conflict`); a
|
|
1182
|
-
half that refers to a theme-following token instead of its half (`theme-half-reference`); a
|
|
1183
|
-
lone half (`theme-new-token`); themes without any halves (`theme-empty`); an undeclared
|
|
1184
|
-
brand name (`brand-undeclared`); a brand that gives a theme-following token one value
|
|
1185
|
-
(`brand-theme-value`) or only some of its halves or ramp steps (`brand-coverage`); a token
|
|
1186
|
-
only a brand defines (`brand-new-token`); a declared brand without values (`brand-empty`).
|
|
1187
|
-
See the [token guide](../skills/ads-designer/references/design-data.md) and the
|
|
1188
|
-
[accessibility guide](../skills/ads-designer/references/accessibility.md).
|
|
1189
|
-
|
|
1190
|
-
Initialized builds run:
|
|
1883
|
+
```ts
|
|
1884
|
+
// profiles/Surfaces/controls.ads.ts: the treatment.
|
|
1885
|
+
export const controlOnDarkSurface = profile({
|
|
1886
|
+
name: "control-on-dark-surface",
|
|
1887
|
+
kind: "surface",
|
|
1888
|
+
with: ["control-surface"],
|
|
1889
|
+
fields: { background: "--static-dark-fill", color: "--static-light-text" },
|
|
1890
|
+
});
|
|
1891
|
+
```
|
|
1191
1892
|
|
|
1192
|
-
```
|
|
1193
|
-
|
|
1893
|
+
```tsx
|
|
1894
|
+
// Application code: the caller knows what is behind the button.
|
|
1895
|
+
<figure>
|
|
1896
|
+
<img src={photo} alt="" />
|
|
1897
|
+
<IconButton icon={closeGlyph} label="Close" tone="on-dark" />
|
|
1898
|
+
</figure>
|
|
1194
1899
|
```
|
|
1195
1900
|
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
Mount `.ds/assets/` using the application's existing bundler. Init does not change
|
|
1202
|
-
framework configuration. For a Vite app with no other public directory, a project
|
|
1203
|
-
can set `publicDir: path.resolve(import.meta.dirname, ".ds/assets")`; when it
|
|
1204
|
-
already has public assets, use its existing asset merge/copy step and reject
|
|
1205
|
-
duplicate output paths. Use the same assets in development and production.
|
|
1206
|
-
Application manifest metadata and other platform exports remain project-owned.
|
|
1207
|
-
|
|
1208
|
-
### Generic architecture guards
|
|
1209
|
-
|
|
1210
|
-
`ads check` enforces reusable architecture policies alongside token checks:
|
|
1211
|
-
|
|
1212
|
-
| Guard | Shared enforcement |
|
|
1213
|
-
|----------------|------------------------------|
|
|
1214
|
-
| Public APIs | Inherited/explicit style props and open-ended visual color/fill/stroke strings |
|
|
1215
|
-
| Renderer boundaries | JSX inline styles, React/Preact CSS types, imperative `.style` writes, bulk style writes, and style-object escapes |
|
|
1216
|
-
| Asset ownership | ADS/public mount collisions, configured generated assets in source, and tracked generated output |
|
|
1217
|
-
| Product patterns | CSS/JSX namespace ownership; ADS implementations and showcase cannot import app source |
|
|
1218
|
-
| Primitive state | State-variable overrides outside components; undocumented non-state component variables |
|
|
1219
|
-
| Literal visual values | Absolute/font-relative lengths (including `ch` and root font units), durations and color/effect formulas require tokens; geometry angles and responsive viewport/container relationships remain available |
|
|
1220
|
-
| Fixed token ownership | Foreign token names, shared token overrides, misplaced component/pattern/showcase variables, and noncanonical foundation imports |
|
|
1221
|
-
| Showcase ownership | Fixture CSS/Linaria definitions, custom JSX classes, native controls/widget roles, state styling, private CSS/aliased imports, catalogue dependencies of a project's own showcase pages and source ownership, and runtime imports of fixtures/test helpers |
|
|
1222
|
-
| Scenario coverage | All public renderable UI has path-discovered entries, colocated fixtures, literal metadata and reachable public render references; runtime imports of scenarios/fixtures are rejected |
|
|
1223
|
-
| Data access | Direct global fetch/XHR/WebSocket/EventSource in ADS source is rejected; injected services, workers and lazy imports remain allowed |
|
|
1224
|
-
| Showcase coverage | Public ADS UI referenced by production JSX/React `createElement` has showcase render references; imports and tests alone do not count |
|
|
1225
|
-
|
|
1226
|
-
ES module imports, re-exports, and dynamic imports with literal specifiers use
|
|
1227
|
-
TypeScript's project configuration, including aliases and bundler resource
|
|
1228
|
-
queries. ADS implementations and showcase fixtures cannot import app code.
|
|
1229
|
-
Private imports within ADS implementations remain allowed, including when the ADS
|
|
1230
|
-
is nested inside `src/`. Application integration harnesses belong in test support.
|
|
1231
|
-
|
|
1232
|
-
Unknown configuration fields fail rather than silently weakening checks.
|
|
1233
|
-
|
|
1234
|
-
Notification usage can be enforced directly by ADS, without a project lint
|
|
1235
|
-
plugin or another parse/lint pass:
|
|
1901
|
+
Surface contrast proves the pair of the profile in every context, and these
|
|
1902
|
+
static paints do not change between contexts. The on-dark treatment is thus
|
|
1903
|
+
readable whatever theme the page uses. Whether the photo needs the treatment is
|
|
1904
|
+
the caller's decision, which the type makes explicit.
|
|
1236
1905
|
|
|
1237
|
-
|
|
1238
|
-
{
|
|
1239
|
-
"usage": {
|
|
1240
|
-
"notifications": [{
|
|
1241
|
-
"api": "toast",
|
|
1242
|
-
"host": "Toaster",
|
|
1243
|
-
"rootFiles": ["src/App.tsx", "design-system/components/Toast.ads.scenario.tsx"]
|
|
1244
|
-
}],
|
|
1245
|
-
"restrictedImports": ["sonner"]
|
|
1246
|
-
}
|
|
1247
|
-
}
|
|
1248
|
-
```
|
|
1906
|
+
#### What neither pattern covers
|
|
1249
1907
|
|
|
1250
|
-
|
|
1251
|
-
recognizes named aliases and namespace imports, respecting shadowed bindings.
|
|
1252
|
-
It rejects direct module/render calls and calls in `use server` modules, requires
|
|
1253
|
-
a stable `id` for directly effect-created notifications with inspectable options,
|
|
1254
|
-
and restricts the host to the exact declared roots. Direct conditional hosts and
|
|
1255
|
-
duplicate static host IDs in one file fail. `restrictedImports` rejects runtime
|
|
1256
|
-
package and subpath imports, re-exports, literal dynamic imports and unshadowed
|
|
1257
|
-
`require` calls; type-only imports are exempt. Both policies are empty by default.
|
|
1258
|
-
|
|
1259
|
-
These native guards run in `ads check`, acceptance and validation. They inspect
|
|
1260
|
-
source and ADS runtime/scenario files, excluding tests and declaration contracts.
|
|
1261
|
-
They do not prove cross-module host uniqueness or trace helper calls, dynamic
|
|
1262
|
-
IDs/options, aliases assigned to local variables or framework render callbacks.
|
|
1263
|
-
Keep route persistence and lifecycle browser tests. ADS does not assume a toast
|
|
1264
|
-
implementation exists or install one.
|
|
1265
|
-
|
|
1266
|
-
Component interaction variables such as `--ds-button-hover-bg` cannot be
|
|
1267
|
-
assigned by app code, patterns, or showcase code. This includes static JSX style
|
|
1268
|
-
objects in files with inline-style exceptions. Reading a variable is allowed;
|
|
1269
|
-
the component owns its state definitions. Documented non-state customizations
|
|
1270
|
-
are registered explicitly. State variables cannot be allowlisted.
|
|
1271
|
-
|
|
1272
|
-
Keep renderer-, framework-, and component-specific project guards too. The
|
|
1273
|
-
shared tool does not validate a third-party graph renderer's own APIs, arbitrary
|
|
1274
|
-
runtime spreads, or the semantic meaning of a
|
|
1275
|
-
measured value. Register project-specific guard scripts in the existing build
|
|
1276
|
-
and configured acceptance/validation scripts. The project's own linter remains
|
|
1277
|
-
an independent build tool.
|
|
1278
|
-
|
|
1279
|
-
### Project boundaries and assets
|
|
1280
|
-
|
|
1281
|
-
Style permissions belong to their owner, in its `<Owner>.ads.contract.ts`, with paths
|
|
1282
|
-
relative to the contract:
|
|
1908
|
+
Two cases are not covered:
|
|
1283
1909
|
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
customization: ["--ds-panel-gap"],
|
|
1289
|
-
} satisfies UnitContract;
|
|
1290
|
-
```
|
|
1910
|
+
- state that cascades to children: a selected table row whose cells, icons and
|
|
1911
|
+
checkbox switch to "on selected" colours;
|
|
1912
|
+
- tinted containers: a success or warning banner whose links and icons must stay
|
|
1913
|
+
readable on its tint.
|
|
1291
1914
|
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
exception and never permits imperative writes by itself. `customization` lists a
|
|
1298
|
-
component's non-state `--ds-*` variables that patterns, the showcase and the
|
|
1299
|
-
application may set.
|
|
1915
|
+
These cases need a prop passed through each child (an explicit choice at every
|
|
1916
|
+
level), or a construct that lets a surface set the context that its descendants
|
|
1917
|
+
read. ADS has no such surface-context construct. Do not emulate one with a theme
|
|
1918
|
+
per state: a theme is a whole colour mode, and the checks would prove every
|
|
1919
|
+
token of it.
|
|
1300
1920
|
|
|
1301
|
-
|
|
1921
|
+
### Emitting the design system
|
|
1302
1922
|
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
"generatedPaths": ["dist", "dist-showcase", ".vite", ".ds"],
|
|
1309
|
-
"generatedFiles": ["icon-generated.png"]
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
```
|
|
1923
|
+
`ads emit [directory] [--json] [--force] [--watch]` compiles the design system
|
|
1924
|
+
into plain modules that an application can install without ADS. It captures the
|
|
1925
|
+
current revision of the design system once, runs `ads check` on it, and writes
|
|
1926
|
+
output only when that check passes. A failing check returns its findings and
|
|
1927
|
+
writes nothing.
|
|
1313
1928
|
|
|
1314
|
-
|
|
1929
|
+
Exit codes:
|
|
1315
1930
|
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
directories; nothing is inferred from filenames such as `favicon.ico`.
|
|
1931
|
+
- `0`: emitted, including "nothing changed".
|
|
1932
|
+
- `1`: a failing check or emission, or an output folder with hand edits.
|
|
1933
|
+
- `2`: an invalid invocation, an unusable output folder, a concurrent emit,
|
|
1934
|
+
cancellation, a source change during the emit, or a write failure.
|
|
1321
1935
|
|
|
1322
|
-
`
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
Git inspects tracked files, including nested workspaces. Outside a Git repo,
|
|
1326
|
-
there are no tracked outputs to check; other asset checks still run. Real Git
|
|
1327
|
-
inspection errors fail the check. These guards read files and never delete them.
|
|
1936
|
+
`--json` prints `{ "ok": true, "revision", "outDir", "written", "unchanged",
|
|
1937
|
+
"removed", "contract", "owners", "forced" }` or
|
|
1938
|
+
`{ "ok": false, "failure": { "kind", … } }`.
|
|
1328
1939
|
|
|
1329
|
-
|
|
1940
|
+
#### The output folder
|
|
1330
1941
|
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1942
|
+
By default ADS writes the design package's `dist/`, which the package's
|
|
1943
|
+
`exports` publish. The one-application layout emits into the application's
|
|
1944
|
+
source ([Set up a design package](#set-up-a-design-package)):
|
|
1334
1945
|
|
|
1335
1946
|
```json
|
|
1336
|
-
{
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1947
|
+
{ "compile": { "outDir": "../src/ui", "emitOnAccept": true } }
|
|
1948
|
+
```
|
|
1949
|
+
|
|
1950
|
+
- `compile.outDir` is relative to the design package, or `null` for the default.
|
|
1951
|
+
It can be outside the package (an application's source). It is never the
|
|
1952
|
+
package's root, the design-system folder or an ancestor of either, and never
|
|
1953
|
+
inside `node_modules`, `.git` or `.ds`, judged from the package root. Any
|
|
1954
|
+
other value fails to load.
|
|
1955
|
+
- `compile.emitOnAccept` (`true` or `false`, default `true`) emits after
|
|
1956
|
+
`ads_accept` publishes a draft ([Emit after acceptance](#emit-after-acceptance)).
|
|
1957
|
+
- ADS owns the output folder entirely: after every emit it holds exactly the
|
|
1958
|
+
emitted files. Emission refuses to replace a folder that holds files it did
|
|
1959
|
+
not write, so an `outDir` that points at existing application code cannot
|
|
1960
|
+
erase that code.
|
|
1961
|
+
- The folder is never an input. ADS does not capture, watch or analyze it, so an
|
|
1962
|
+
emit never changes the revision that a check or a preview sees.
|
|
1963
|
+
- The repository owner decides whether the folder is committed. ADS never edits
|
|
1964
|
+
`.gitignore`, and emission, checks and the contract behave the same in both
|
|
1965
|
+
cases.
|
|
1966
|
+
|
|
1967
|
+
The folder holds:
|
|
1968
|
+
|
|
1969
|
+
- **Owner modules and sheets**, at the owner's path inside the design system.
|
|
1970
|
+
The module is the authored source with class expressions replaced by compiled
|
|
1971
|
+
classes. `<Owner>.css` holds the token CSS that the owner uses and its
|
|
1972
|
+
compiled atomic rules. With `sections: true` it also holds the section rules
|
|
1973
|
+
that apply the contexts of those tokens to nested `data-theme`/`data-brand`
|
|
1974
|
+
sections.
|
|
1975
|
+
- **`foundation.css`**, the document CSS that `foundation.ads.ts` declares, once
|
|
1976
|
+
for the design system
|
|
1977
|
+
([contents](ARCHITECTURE.md#the-foundation-has-a-narrow-styling-role)): one
|
|
1978
|
+
`@font-face` per declared font face (`font-family`,
|
|
1979
|
+
`src: url("./fonts/…") format(…)`, `font-weight` value or range, `font-style`
|
|
1980
|
+
and `font-display`); the document reset (box sizing, body margin, inherited
|
|
1981
|
+
control fonts, and `display: none` for every `[hidden]` element except
|
|
1982
|
+
`hidden="until-found"`); the `text` and `surface` profile fields on `body`;
|
|
1983
|
+
the default focus indicator from the `focus` profile
|
|
1984
|
+
(`foundation({ focus: "keyboard-focus" })`) on every `:focus-visible` element,
|
|
1985
|
+
at zero specificity so that the indicator of a construction wins;
|
|
1986
|
+
`color-scheme` for each declared theme; the page scroll lock behind a modal
|
|
1987
|
+
dialog, when an owner needs it; and the tokens that these use.
|
|
1988
|
+
- **`index.ts`**, the public barrel: the authored `<dsDir>/index.ts` with the
|
|
1989
|
+
same exports, which resolve to the emitted modules (public `@ds` imports, if
|
|
1990
|
+
any, made relative). It imports `foundation.css` first. It is the import entry
|
|
1991
|
+
of the output: an application imports the emitted design system, with its
|
|
1992
|
+
document CSS, through it, as it imports `@ds` while authoring. With declared
|
|
1993
|
+
fonts it also re-exports `fonts.ts`, and with an application icon
|
|
1994
|
+
`app-icons.ts`.
|
|
1995
|
+
- **Fonts**, with declared fonts: each face's file at
|
|
1996
|
+
`fonts/<family-slug>/<source>`, and `fonts.ts`, the preload list. Previews use
|
|
1997
|
+
the emitted tree, so they draw the faces also. `fonts.ts` exports:
|
|
1998
|
+
- `fontPreloads` (`{ href, type }[]`): the face that the document `text`
|
|
1999
|
+
profile draws first, in the default context, then the `preload` faces of
|
|
2000
|
+
each declaration, once each;
|
|
2001
|
+
- `preloadFonts(doc = document)`, which adds one
|
|
2002
|
+
`<link rel="preload" as="font" crossorigin>` per face, once;
|
|
2003
|
+
- `fontPreloadTags()` and `fontPreloadHeader()`, for a build step, a server
|
|
2004
|
+
render or a `Link` header.
|
|
2005
|
+
|
|
2006
|
+
Each href is a standard asset import of the file
|
|
2007
|
+
(`import font0 from "./fonts/…"`), which the application's bundler resolves to
|
|
2008
|
+
its public URL: the same in the client and server builds, and the same as the
|
|
2009
|
+
`url()` of the stylesheet, so a preloaded font downloads once. Call
|
|
2010
|
+
`preloadFonts()` in the app entry before the first render, or render
|
|
2011
|
+
`fontPreloadTags()` into the server's `<head>` (`preloadFonts()` then adds
|
|
2012
|
+
nothing).
|
|
2013
|
+
- **Application icon**, with `foundation({ appIcon })`: each export at its
|
|
2014
|
+
`file`, and the platform set under `icons/`: `favicon.svg` (the drawing),
|
|
2015
|
+
`favicon.ico` (16, 32 and 48 px), `apple-touch-icon.png` (180 px),
|
|
2016
|
+
`icon-192.png` and `icon-512.png`, and with a maskable icon
|
|
2017
|
+
`icon-maskable-192.png` and `icon-maskable-512.png`. `app-icons.ts` exports:
|
|
2018
|
+
- `appIconLinks` (`{ rel, href, sizes?, type }[]`): the ICO, the SVG and the
|
|
2019
|
+
touch icon;
|
|
2020
|
+
- `appIconTags()`: the same as `<link>` tags for the head of the page, from a
|
|
2021
|
+
build step, prerender or server render;
|
|
2022
|
+
- `webManifestIcons` (`{ src, sizes, type, purpose }[]`) for the `icons` of a
|
|
2023
|
+
web app manifest, the maskable ones with `purpose: "maskable"`.
|
|
2024
|
+
|
|
2025
|
+
Each URL is an asset import of the file (`import icon0 from "./icons/…"`). ADS
|
|
2026
|
+
does not write into the application's `public/` folder: copy the files, or
|
|
2027
|
+
import them from the output. ADS caches renders by the bytes of the drawing
|
|
2028
|
+
and the settings, so an emit with an unchanged icon renders nothing. Committed
|
|
2029
|
+
launcher or installer icons are committed with the folder.
|
|
2030
|
+
- **Helper modules** that the owners or the barrel import, with public `@ds`
|
|
2031
|
+
imports made relative. A public helper that no owner imports is emitted also.
|
|
2032
|
+
A module's `glyph("close")` becomes the reference literal `{ asset, source }`
|
|
2033
|
+
(the SVG text of its drawing), and the declaration of a glyph set under
|
|
2034
|
+
`assets/` becomes its name list. The application's bundler thus drops a glyph
|
|
2035
|
+
that is not imported.
|
|
2036
|
+
- **`ads-glyph.ts`**, the types-only `Glyph`/`GlyphSet` module, when an emitted
|
|
2037
|
+
module uses glyph references. Their `@reqvire-org/ads/asset` type imports are
|
|
2038
|
+
rewritten to it.
|
|
2039
|
+
- **`ads-dependencies.json`**, the packages that the emitted modules require.
|
|
2040
|
+
- **`package.json`**, `{ "sideEffects": ["*.css"] }`: an emitted module does
|
|
2041
|
+
nothing when it loads except import its stylesheet. The file has no `type`
|
|
2042
|
+
field, because the output is source for bundlers, not a package that Node
|
|
2043
|
+
runs.
|
|
2044
|
+
- **`ads-contract.json`**, the record of the emission: `format`
|
|
2045
|
+
(`"ads-contract"`), `version` (2), the source `revision`, `files` with the
|
|
2046
|
+
`sha256` of each emitted file, and `platform`
|
|
2047
|
+
([Browser targets](#browser-targets)). The contract does not list itself. ADS
|
|
2048
|
+
also reads a version 1 contract, which has no `platform`, and verifies its
|
|
2049
|
+
folder in the same way; the next emit replaces it.
|
|
2050
|
+
|
|
2051
|
+
#### Consuming the output
|
|
2052
|
+
|
|
2053
|
+
The output ships source only: `.ts`/`.tsx` modules, `.css` sheets and the JSON
|
|
2054
|
+
records, plus the files of the declared fonts and the images of the application
|
|
2055
|
+
icon. An application consumes it through a bundler (Vite, Bun, Next.js, or a
|
|
2056
|
+
library build such as tsup or Vite library mode). Applications import the
|
|
2057
|
+
emitted barrel, never authoring source, which holds build-time macros. With the
|
|
2058
|
+
default output folder, for example:
|
|
2059
|
+
|
|
2060
|
+
```jsonc
|
|
2061
|
+
// tsconfig.json
|
|
2062
|
+
{ "compilerOptions": { "paths": { "@ds": ["./design-system/dist/index.ts"] } } }
|
|
2063
|
+
```
|
|
2064
|
+
|
|
2065
|
+
```ts
|
|
2066
|
+
// vite.config.ts
|
|
2067
|
+
export default defineConfig({ resolve: { alias: { "@ds": "/design-system/dist/index.ts" } } });
|
|
2068
|
+
```
|
|
2069
|
+
|
|
2070
|
+
**JSX.** The output carries no JSX pragma: compile it with the JSX runtime of
|
|
2071
|
+
the project's framework. For Preact, set `"jsx": "react-jsx"` and
|
|
2072
|
+
`"jsxImportSource": "preact"` in the application's `tsconfig.json` (Vite and Bun
|
|
2073
|
+
read them from there).
|
|
2074
|
+
|
|
2075
|
+
**Stylesheets.** Each owner module begins with a side-effect import of its own
|
|
2076
|
+
sheet (`import "./Button.css";`). There is no separate stylesheet to include: a
|
|
2077
|
+
bundle that imports an owner gets its CSS. The JavaScript of unused owners is
|
|
2078
|
+
tree-shaken with every bundler.
|
|
2079
|
+
|
|
2080
|
+
- Vite, webpack and Next.js read the nearest `package.json` of each file. A
|
|
2081
|
+
bundler that honours the output's `sideEffects` bundles, through `index.ts`,
|
|
2082
|
+
only the sheets of the owners that the application uses: an owner imported
|
|
2083
|
+
through the barrel bundles the same CSS as a direct import of its module.
|
|
2084
|
+
- Bun.build ignores `sideEffects` for CSS and bundles every public owner's sheet
|
|
2085
|
+
that the barrel reaches. With Bun.build, import the owners you use directly from the
|
|
2086
|
+
output (`<outDir>/components/Actions/Button/Button`, with
|
|
2087
|
+
`<outDir>/foundation.css`).
|
|
2088
|
+
- Other bundlers that honour `sideEffects` for CSS imports should behave as Vite
|
|
2089
|
+
does. ADS tests Vite and Bun.build
|
|
2090
|
+
(`tests/integration/packed-emitted-app.test.ts`).
|
|
2091
|
+
|
|
2092
|
+
**Asset imports.** `fonts.ts` and `app-icons.ts` import their files (`.woff2`,
|
|
2093
|
+
`.woff`, `.ttf`, `.otf`, `.ico`, `.svg`, `.png`) as standard asset imports, each
|
|
2094
|
+
marked `// @ts-ignore`. A bundler's own types (`vite/client`) declare those
|
|
2095
|
+
modules, and a second wildcard declaration would conflict with them.
|
|
2096
|
+
|
|
2097
|
+
- Vite resolves the `url()` of the stylesheet and those imports to one hashed
|
|
2098
|
+
file, in client and SSR builds. It inlines files under
|
|
2099
|
+
`build.assetsInlineLimit` (4 KiB by default) as data URLs in both; set `0` to
|
|
2100
|
+
keep every icon a file.
|
|
2101
|
+
- Bun.build reads the `paths` alias itself and copies each imported file under a
|
|
2102
|
+
hashed name. Set `publicPath` (for example `"/"`) so that the imported URLs
|
|
2103
|
+
are absolute, not relative to the page.
|
|
2104
|
+
- Bun.build inlines a `url()` file of a stylesheet smaller than 128 KiB as a
|
|
2105
|
+
data URL. A small font thus arrives with the CSS, and a preload of its file is
|
|
2106
|
+
a second download. With Bun.build, preload only faces of 128 KiB or more.
|
|
2107
|
+
|
|
2108
|
+
**Server rendering.** The generated modules (`fonts.ts`, `app-icons.ts`, the
|
|
2109
|
+
palette) touch no `window` or `document` when they load. The starter's owners
|
|
2110
|
+
use the DOM only in effects, ref callbacks and handlers, so the emitted starter
|
|
2111
|
+
renders with `react-dom/server` or `preact-render-to-string` and hydrates
|
|
2112
|
+
without mismatch. For other owners, their own module-level code decides this.
|
|
2113
|
+
|
|
2114
|
+
- Values spread with `recipe.measured.props(…)` are in the server's markup.
|
|
2115
|
+
Values set with `recipe.measured.set` or `recipe.paints.set` are written by
|
|
2116
|
+
the client after hydration.
|
|
2117
|
+
- The server render can put `fontPreloadTags()` and `appIconTags()` in the head
|
|
2118
|
+
of the page. A Vite SSR build gives each file the URL that the client build
|
|
2119
|
+
gives it, so the server's tags are the client's and the client's
|
|
2120
|
+
`preloadFonts()` adds nothing
|
|
2121
|
+
(`tests/browser/emitted-ssr-hydration-browser.test.ts`).
|
|
2122
|
+
|
|
2123
|
+
#### Browser targets
|
|
2124
|
+
|
|
2125
|
+
ADS does not certify browser versions. The `platform` section of the contract
|
|
2126
|
+
states, as facts read from the emitted sheets, what the emitted CSS uses beyond
|
|
2127
|
+
the CSS core. The core is CSS 2.1 and the long-established CSS3 modules:
|
|
2128
|
+
selectors level 3, media queries, flexbox, grid layout, custom properties,
|
|
2129
|
+
`calc()` and the comparison functions, transforms, transitions, animations and
|
|
2130
|
+
web fonts.
|
|
2131
|
+
|
|
2132
|
+
```jsonc
|
|
2133
|
+
"platform": {
|
|
2134
|
+
"features": {
|
|
2135
|
+
"popover": { "css": [":popover-open"], "owners": ["components/Overlays/Menu/Menu.tsx"],
|
|
2136
|
+
"degrades": "Required by popovers and menus: …" },
|
|
2137
|
+
"lh-unit": { "css": ["lh"], "owners": ["components/Actions/Button/Button.tsx", "…"],
|
|
2138
|
+
"degrades": "Declarations measured in lines are dropped: control boxes sized by 1lh fall back to their content height, …" },
|
|
2139
|
+
"user-select": { "css": ["user-select"], "prefixed": ["-webkit-user-select"], "owners": ["…"], "degrades": "Text stays selectable; …" },
|
|
2140
|
+
"text-wrap-balance": { "css": ["text-wrap: balance"], "owners": ["…"], "degrades": "Normal wrapping: line lengths are not balanced." }
|
|
2141
|
+
},
|
|
2142
|
+
"unrecognized": {},
|
|
2143
|
+
"assumptions": ["foundation.css loads before every owner sheet: …", "…"]
|
|
1342
2144
|
}
|
|
1343
2145
|
```
|
|
1344
2146
|
|
|
1345
|
-
`
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
the
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
2147
|
+
- `features`, by feature id:
|
|
2148
|
+
- `css`: the constructs found (properties, value keywords such as
|
|
2149
|
+
`display: -webkit-box`, at-rules, media features, pseudo-classes, units,
|
|
2150
|
+
functions);
|
|
2151
|
+
- `prefixed`: the vendor-prefixed forms that ADS writes beside or for the
|
|
2152
|
+
standard one (the clamp's `-webkit-box` form, `-webkit-user-select`);
|
|
2153
|
+
- `owners`: the owners whose sheets use it (`foundation.css` for the document
|
|
2154
|
+
sheet);
|
|
2155
|
+
- `degrades`: what happens in a browser without it. Required features
|
|
2156
|
+
(popover, modal dialogs, logical properties, `:focus-visible`) say so.
|
|
2157
|
+
Progressive enhancements (balanced and pretty wrapping, `@starting-style`,
|
|
2158
|
+
text-box trim) describe the plainer result.
|
|
2159
|
+
- `unrecognized`: constructs that the inventory has no entry for, with their
|
|
2160
|
+
owners. Typically this is a function in the project's own token values. Check
|
|
2161
|
+
them yourself.
|
|
2162
|
+
- `assumptions`: what the output needs of the document. `foundation.css` loads
|
|
2163
|
+
first (or, for a namespaced emission, the host page's own document styles).
|
|
2164
|
+
Themes and brands are selected with `data-theme`/`data-brand` on the root or a
|
|
2165
|
+
section. The root font size is the 16px that ADS's pixel-equivalent checks
|
|
2166
|
+
assume. Operating-system text scaling is not audited.
|
|
2167
|
+
|
|
2168
|
+
Check the listed features against your own browser targets, for example with
|
|
2169
|
+
Baseline data, before you rely on a degradation that you cannot accept. ADS has
|
|
2170
|
+
no declared targets with generated fallbacks.
|
|
2171
|
+
|
|
2172
|
+
#### Text scaling in the application
|
|
2173
|
+
|
|
2174
|
+
ADS owns the design system, not the application's `index.html`, and never writes
|
|
2175
|
+
document metadata (no `<meta name="text-scale">`). A design system is safe for
|
|
2176
|
+
the reader's text size, including the text scaling of the operating system where
|
|
2177
|
+
the browser passes it on, under three conditions.
|
|
2178
|
+
|
|
2179
|
+
ADS checks the two that belong to the design system. Every font size and length
|
|
2180
|
+
line height is in `rem` or `em` (`a11y-text-resize`). Every scenario keeps its
|
|
2181
|
+
content with 200% text, 200% zoom, WCAG text spacing and at 320 px (the text
|
|
2182
|
+
passes of the [render audit](#render-audit)). `foundation.css` sets no root font
|
|
2183
|
+
size, so `rem` starts from the browser's default (`medium`), which is where the
|
|
2184
|
+
reader's setting arrives.
|
|
2185
|
+
|
|
2186
|
+
The third is the application's document, which ADS does not check:
|
|
2187
|
+
|
|
2188
|
+
- Leave the root font size to the reader: no `px` `font-size` on `html` or
|
|
2189
|
+
`:root`. A percentage or `rem` scales with the setting; a `px` value replaces
|
|
2190
|
+
it.
|
|
2191
|
+
- Let the reader zoom: no `user-scalable=no`, and no `maximum-scale` below 2, in
|
|
2192
|
+
the viewport `<meta>` (WCAG 1.4.4).
|
|
2193
|
+
- To receive the operating system's text scale on browsers that support it, opt
|
|
2194
|
+
in with `<meta name="text-scale" content="scale">` in the head of the
|
|
2195
|
+
document. The tag tells the browser that the page scales its own text. The
|
|
2196
|
+
browser then sets the default font size from the system setting, and does not
|
|
2197
|
+
zoom or enlarge text on its own. Without the tag, those browsers keep their
|
|
2198
|
+
own adjustment, which the zoom pass covers. Add the tag when the application's
|
|
2199
|
+
own CSS also sizes text in `rem` or `em`: ADS checks the owners of the design
|
|
2200
|
+
system for this, not the pages of the application.
|
|
2201
|
+
|
|
2202
|
+
#### How an emit writes
|
|
2203
|
+
|
|
2204
|
+
- **Incremental.** An emit writes only the files whose bytes changed, and
|
|
2205
|
+
removes the files that are no longer emitted. An emit with no source change
|
|
2206
|
+
writes nothing. Owners whose analysis is unchanged keep their emitted module
|
|
2207
|
+
and are not analyzed or serialized again. This applies within one running ADS
|
|
2208
|
+
process, such as the MCP server or `ads emit --watch`; a one-off CLI run
|
|
2209
|
+
reuses only the persisted extraction cache.
|
|
2210
|
+
- **Whole-folder swap.** ADS stages the new tree beside the output folder and
|
|
2211
|
+
swaps it in with two renames, so a reader never sees a mix of old and new
|
|
2212
|
+
files. Between the renames the folder is briefly absent, because Bun offers no
|
|
2213
|
+
atomic directory exchange. A tool that reads it at that instant can see it
|
|
2214
|
+
missing and must retry. A failure or cancellation leaves the old tree
|
|
2215
|
+
untouched.
|
|
2216
|
+
- **One writer.** One emit writes a given output folder at a time, under a lock
|
|
2217
|
+
in `.ds/locks/`. An emit from another process is refused as `output-busy`. ADS
|
|
2218
|
+
removes a lock that a stopped process left. Within one process
|
|
2219
|
+
(`ads emit --watch`, or the MCP server's `ads_emit` and emit after
|
|
2220
|
+
acceptance), an emit requested while another runs is queued: at most one
|
|
2221
|
+
follow-up per output folder, which emits the source as it is when it starts.
|
|
2222
|
+
|
|
2223
|
+
**Watch mode.** `ads emit --watch` emits once, then again whenever the inputs of
|
|
2224
|
+
the design system change (the files that `ads check` captures, never the output
|
|
2225
|
+
folder).
|
|
2226
|
+
|
|
2227
|
+
- Changes that arrive within 150 ms of the first one share one emit. An event
|
|
2228
|
+
that leaves the bytes of every input as they were emitted (a touched file, a
|
|
2229
|
+
restored edit) emits nothing.
|
|
2230
|
+
- Each emit prints one line with the revision, the written, unchanged and
|
|
2231
|
+
removed counts and its duration, or its failure (findings on stderr). The
|
|
2232
|
+
watch continues after a failure. With `--json`, each emit is one JSON object
|
|
2233
|
+
per line: the `--json` result plus `event: "emit"` and `elapsedMs`.
|
|
2234
|
+
- The analysis stays warm, so after a one-owner edit only that owner is analyzed
|
|
2235
|
+
and serialized again.
|
|
2236
|
+
- SIGINT, SIGTERM or the end of stdin stops the watch. Run it with an open
|
|
2237
|
+
stdin; `< /dev/null` stops it immediately. A running emit is cancelled without
|
|
2238
|
+
a partial folder, and the lock, the watchers and the analysis process are
|
|
2239
|
+
released (exit 0).
|
|
2240
|
+
|
|
2241
|
+
#### Emit after acceptance
|
|
2242
|
+
|
|
2243
|
+
When `ads_accept` publishes a draft, the MCP server writes the published
|
|
2244
|
+
revision into the output folder, unless `compile.emitOnAccept` is `false`. It
|
|
2245
|
+
does not emit on a dry run, a rejection, a cancellation before publication or a
|
|
2246
|
+
stale revision. [Emitting from MCP](MCP.md#emitting-from-mcp) gives the `emit`
|
|
2247
|
+
result, including its `from` (`candidate-tree` or `published-source`).
|
|
2248
|
+
|
|
2249
|
+
- The source is published first, then the output folder. Acceptance never
|
|
2250
|
+
depends on the emit, and no owner is analyzed again for it.
|
|
2251
|
+
- A failed write (a hand edit, a busy folder, a cancellation, a write error) is
|
|
2252
|
+
reported as a failed emit with its `repair`, never as a success. The folder
|
|
2253
|
+
keeps its previous emission whole, `ads check` reports it `generated-stale`
|
|
2254
|
+
until `ads emit` runs, and nothing retries the emit.
|
|
2255
|
+
- The emit is never forced. Hand edits are reported as `output-modified`.
|
|
2256
|
+
- The MCP tool `ads_emit` (mutation-enabled servers) runs the same emit on
|
|
2257
|
+
demand. `ads_delete` publishes and emits in the same way.
|
|
2258
|
+
|
|
2259
|
+
#### Hand edits and out-of-date output
|
|
2260
|
+
|
|
2261
|
+
**Hand edits.** Before it writes, ADS verifies the folder against its
|
|
2262
|
+
`ads-contract.json`. A file edited after emission, a missing file, a file that
|
|
2263
|
+
ADS did not emit, or a non-empty folder without a contract refuses the emit
|
|
2264
|
+
(`output-modified`, exit 1), and nothing is written. Make the change in the
|
|
2265
|
+
design-system source, or run `ads emit --force` to overwrite the folder.
|
|
2266
|
+
`ads check` reports the same differences as blocking `generated-modified`
|
|
2267
|
+
findings, each hand-edited, missing or foreign file on its own. It reports
|
|
2268
|
+
nothing while the folder does not exist. The contract reports a hand-edited icon
|
|
2269
|
+
like any emitted file.
|
|
2270
|
+
|
|
2271
|
+
**Out-of-date output.** The contract records the source revision that the output
|
|
2272
|
+
was emitted from: the digest of the inputs that `ads check` captures for the
|
|
2273
|
+
same bytes. When the design system has changed since then, `ads check` (in the
|
|
2274
|
+
CLI, MCP and validation) lists a `generated-stale` info item at the contract,
|
|
2275
|
+
naming both revisions and `ads emit`. The item never blocks a check or an
|
|
2276
|
+
acceptance. After an accept with `compile.emitOnAccept: false`, it is expected
|
|
2277
|
+
until the next emit. `ads check --json` lists it, and the text report counts it
|
|
2278
|
+
among the info notes. A folder without a readable contract is
|
|
2279
|
+
`generated-modified`.
|
|
2280
|
+
|
|
2281
|
+
#### Renderer palette
|
|
2282
|
+
|
|
2283
|
+
Code that draws on a canvas or with WebGL needs theme colours as JavaScript
|
|
2284
|
+
values. A design system that declares `palette: true` in `foundation()` (the
|
|
2285
|
+
starter does) keeps `<dsDir>/palette.generated.ts`: every paint-role token,
|
|
2286
|
+
resolved in every declared context (each theme of the default brand, then
|
|
2287
|
+
`<brand>/<theme>`). A design system that does not declare it gets none.
|
|
2288
|
+
|
|
2289
|
+
- The module exports `palette`, `themes`, `brands`, `contexts`,
|
|
2290
|
+
`defaultContext`, `systemThemes`, `themeSchemes` and `unresolved`, and the
|
|
2291
|
+
types `ColorToken`, `Palette`, `PaletteColor`, `PaletteContext` and `Theme`.
|
|
2292
|
+
- Themes, brands and the default come from `foundation.ads.ts`, in declared
|
|
2293
|
+
order. A value is what the `:root` rules of the token sheets cascade to on a
|
|
2294
|
+
root with that `data-theme`/`data-brand`. `@media`/`@supports` variants are
|
|
2295
|
+
not contexts.
|
|
2296
|
+
- `systemThemes` names the theme that each OS colour scheme selects when the
|
|
2297
|
+
foundation declares `followSystemTheme: true`. Otherwise it is `null`.
|
|
2298
|
+
- The module is generated source. Owners and controllers import it relatively
|
|
2299
|
+
and typecheck against its exact token union, and emission copies it as a plain
|
|
2300
|
+
module. The starter's `controllers/Palette/Palette.ts` reads it (`paletteFor`,
|
|
2301
|
+
`observePalette`, `resolveColor`, `paletteContext`, exported from the barrel).
|
|
2302
|
+
- `ads emit` never writes source, so it refuses while `ads check` reports
|
|
2303
|
+
`palette-generated`
|
|
2304
|
+
([Regenerating generated source](#regenerating-generated-source)).
|
|
2305
|
+
|
|
2306
|
+
### Deleting declared targets
|
|
2307
|
+
|
|
2308
|
+
Through MCP (`--mutations`), `ads_delete` removes declared targets (tokens,
|
|
2309
|
+
profiles, components, patterns, assets, glyph sets, fonts) without a draft.
|
|
2310
|
+
[Guarded deletion](MCP.md#guarded-deletion) gives the inputs, what each target
|
|
2311
|
+
kind removes, the refusals and the result.
|
|
2312
|
+
|
|
2313
|
+
- Name each target by identity: a token's custom property (`--radius-spare`); a
|
|
2314
|
+
profile, asset, glyph-set or font family name; or a component or pattern owner
|
|
2315
|
+
path (`Actions/Button`). Pass the `ads_status.sourceRevision` at which you
|
|
2316
|
+
inspected them, and try `dryRun: true` first.
|
|
2317
|
+
- ADS refuses the deletion while anything that survives still refers to a
|
|
2318
|
+
target, while an open draft holds a changed file, and at another source
|
|
2319
|
+
revision. Change a dependent first, or name it in the same request. ADS never
|
|
2320
|
+
deletes dependents on its own.
|
|
2321
|
+
- The candidate runs the same checks as `ads_accept`. On success ADS writes the
|
|
2322
|
+
source, then the output folder.
|
|
2323
|
+
- The protection covers the design system that ADS checks. ADS cannot see
|
|
2324
|
+
applications maintained elsewhere, or consumers of a published package, that
|
|
2325
|
+
still import a removed export.
|
|
2326
|
+
|
|
2327
|
+
### Inspecting tokens and the public API
|
|
2328
|
+
|
|
2329
|
+
`ads tokens [directory]` lists every token that the role sheets
|
|
2330
|
+
(`tokens/**/<role>.ads.css`) declare, by group (the folder of the sheet below
|
|
2331
|
+
`tokens/`), role (the name of the sheet) and name. Each token has one line with
|
|
2332
|
+
its role, its `:root` value (the default theme and brand), its value-shape
|
|
2333
|
+
status when it is not valid, and its first declaration. Below it is each theme,
|
|
2334
|
+
brand or condition whose value differs:
|
|
2335
|
+
|
|
2336
|
+
```text
|
|
2337
|
+
ADS tokens: 1 of 1
|
|
2338
|
+
--action-fill Surfaces/paint #145e50 design-system/tokens/Surfaces/paint.ads.css:8
|
|
2339
|
+
:root[data-theme="dark"]: #a6e8cf
|
|
2340
|
+
:root[data-brand="iris"]: #51429a
|
|
2341
|
+
```
|
|
2342
|
+
|
|
2343
|
+
- `--query text` keeps tokens whose name, role or group contains the text. Token
|
|
2344
|
+
names are accepted as written (`--query --action-fill`). `--role` and
|
|
2345
|
+
`--group` select exactly, and `--limit n` bounds the listing.
|
|
2346
|
+
- `--json` prints the page `{ total, tokens, nextOffset?, groups, contexts,
|
|
2347
|
+
reach }`. [The token inventory](MCP.md#the-token-inventory) describes the
|
|
2348
|
+
fields of each token: `role`, `group`, `shape`, `value`, `values`,
|
|
2349
|
+
`declarations`, `profiles`, `owners` and `type`. `reach.complete` is false
|
|
2350
|
+
while an owner was not analyzed.
|
|
2351
|
+
- `--format dtcg` prints every token as one
|
|
2352
|
+
[W3C Design Tokens (DTCG)](https://www.designtokens.org/tr/2025.10/format/)
|
|
2353
|
+
document. The selection options do not apply to the export.
|
|
2354
|
+
- The structure is `group → role → name` (without `--`), with `$type` from
|
|
2355
|
+
the value shape of the role.
|
|
2356
|
+
- `$value` is the `:root` value: an exact `var(--token)` as a
|
|
2357
|
+
`{group.role.name}` reference; a colour, dimension, duration, font family
|
|
2358
|
+
or cubic Bézier as its DTCG object; other values as CSS text marked
|
|
2359
|
+
`css: true`.
|
|
2360
|
+
- `$extensions["org.reqvire.ads"]` has the token's `name`, `role`, `group` and
|
|
2361
|
+
`modes`: the value of every theme, brand and condition that differs, keyed
|
|
2362
|
+
`dark`, `iris`, `iris/dark` or `dark @media (…)`. The document's own
|
|
2363
|
+
extension lists the context of each mode.
|
|
2364
|
+
- The output is deterministic (keys sorted), so you can commit and diff it.
|
|
2365
|
+
|
|
2366
|
+
Both forms read the sources as `ads check` does, never a generated file. The
|
|
2367
|
+
inventory reports value-shape problems but never fails (exit 0); `ads check`
|
|
2368
|
+
fails for them. Tokens that do not read (for example, a sheet names an
|
|
2369
|
+
undeclared theme) are an execution error (exit 2) that names the first finding
|
|
2370
|
+
of `ads check`.
|
|
2371
|
+
|
|
2372
|
+
MCP serves the same inventory (`ads_tokens`, `ads://project/tokens`,
|
|
2373
|
+
`ads://project/tokens/dtcg`) and the public catalogue: `ads_catalog` lists every
|
|
2374
|
+
public export with its API role, source, scenarios and props and, for an owner,
|
|
2375
|
+
the profiles it selects ([MCP inspection](MCP.md#inspect-the-design-system)).
|
|
2376
|
+
|
|
2377
|
+
### Regenerating generated source
|
|
2378
|
+
|
|
2379
|
+
`ads sync [directory] [--json]` creates and refreshes the generated source files
|
|
2380
|
+
that `foundation.ads.ts` declares. The only such file is
|
|
2381
|
+
`<dsDir>/palette.generated.ts` (`palette: true`), generated from the token
|
|
2382
|
+
sheets and `foundation.ads.ts`.
|
|
2383
|
+
|
|
2384
|
+
- If you edit source directly, run `ads sync` after you declare the palette, or
|
|
2385
|
+
change colour tokens or the declared themes and brands. Until then,
|
|
2386
|
+
`ads check` reports a blocking `palette-generated` finding. It reports the
|
|
2387
|
+
same finding for a module that is present without the declaration.
|
|
2388
|
+
- Drafts need no sync: acceptance creates or regenerates the file in the
|
|
2389
|
+
candidate before its check, so the published change includes it.
|
|
2390
|
+
- The command prints each file that it created or wrote, or that every generated
|
|
2391
|
+
file is current. It never creates an undeclared file, and leaves a file that
|
|
2392
|
+
is present without its declaration unchanged (declare it or delete it).
|
|
2393
|
+
- Exit codes: 0 created, written or current; 1 the inputs of a generated file do
|
|
2394
|
+
not read, or the file is present without its declaration (run `ads check` for
|
|
2395
|
+
the located finding); 2 a usage error.
|
|
2396
|
+
- With `--json` it prints `{ ok, root, files: [{ source, file, outcome }] }`.
|
|
2397
|
+
`outcome` is `absent` (neither declared nor present), `undeclared`, `current`,
|
|
2398
|
+
`created`, `written` or `inputs-unreadable`.
|
|
2399
|
+
|
|
2400
|
+
**Project guards.** Put a component-specific guard beside its owner, and
|
|
2401
|
+
register its command in the project build or in `acceptance.scripts`. Core
|
|
2402
|
+
tooling imports no particular component. For native ADS gates outside
|
|
2403
|
+
package-manager scripts, run the installed tool directly:
|
|
1377
2404
|
|
|
1378
2405
|
```sh
|
|
1379
2406
|
ads check .
|
|
1380
|
-
ads
|
|
2407
|
+
ads emit .
|
|
1381
2408
|
```
|
|
1382
2409
|
|
|
1383
|
-
|
|
2410
|
+
Keep unrelated lint, type checking and framework build commands. Ignore `.ds/`.
|
|
2411
|
+
Generated paths refer to the project and its locally installed tool.
|
|
1384
2412
|
|
|
1385
2413
|
## External content
|
|
1386
2414
|
|
|
1387
|
-
Use the repository's `ads-import` skill for selected external ADS source or
|
|
1388
|
-
values, and `ads-port` for a native implementation inspired by an upstream
|
|
1389
|
-
library. These agent workflows
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
2415
|
+
Use the repository's `ads-import` skill for selected external ADS source or
|
|
2416
|
+
theme values, and `ads-port` for a native implementation inspired by an upstream
|
|
2417
|
+
library. These are agent workflows, not CLI import or design subcommands.
|
|
2418
|
+
|
|
2419
|
+
- The workflows handle dependency closure, token mapping, motion comparisons,
|
|
2420
|
+
source credits, applicable notices and local documentation.
|
|
2421
|
+
- A port reuses the project's visual language and consolidates equivalent design
|
|
2422
|
+
roles that upstream dependencies introduce. Verify the required behavior and
|
|
2423
|
+
the consistency with the project. Exact visual replication is an explicit
|
|
2424
|
+
requirement, not the default.
|
|
2425
|
+
- Install the skills through `npx skills`, or read the packaged skills through
|
|
2426
|
+
the [stdio MCP server](MCP.md#skills). MCP serving does not install or
|
|
2427
|
+
automatically activate a skill.
|
|
2428
|
+
- The tool bundles no UI component or example library other than the starter.
|
|
1399
2429
|
|
|
1400
2430
|
## Release maintenance
|
|
1401
2431
|
|
|
1402
|
-
|
|
1403
|
-
Published npm versions cannot be replaced, even
|
|
2432
|
+
Select a version that is not already in `npm view @reqvire-org/ads versions`.
|
|
2433
|
+
Published npm versions cannot be replaced, even if you move or recreate a Git
|
|
1404
2434
|
tag; see [npm publishing rules](https://docs.npmjs.com/cli/v11/commands/npm-publish/).
|
|
1405
2435
|
|
|
1406
|
-
Update `package.json` and its lockfile with
|
|
1407
|
-
`npm version <new-version> --no-git-tag-version --ignore-scripts`.
|
|
1408
|
-
[local verification and changelog stamp workflow](#releasing-the-ads-tool)
|
|
1409
|
-
|
|
1410
|
-
and the committed local proof,
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
`<Owner>.ads.contract.ts` consolidates token/behavior declarations with typed
|
|
1420
|
-
paint and declarative-consumer contracts. Production APIs/types stay in runtime
|
|
1421
|
-
files. ADS reads contract data statically; no project import runs during discovery.
|
|
1422
|
-
See [CONTRACTS.md](CONTRACTS.md) for exact fields, supported producer forms and
|
|
1423
|
-
source/browser limits. Only `.ads.`-marked filenames are development roles.
|
|
1424
|
-
|
|
1425
|
-
Project scale policies remain explicit. A registered check can call
|
|
1426
|
-
`inspectTokenOrigins(await inspectTokens(root), target, {stopAt: allowedSharedTokens})`
|
|
1427
|
-
from the tooling package. Check `aliasOnly` for strict alias-only policies across
|
|
1428
|
-
all themes; inspect `literals`/`diagnostics` for raw values, cycles and limits.
|
|
1429
|
-
Choose exact targets/origins and documented geometry exceptions in project code;
|
|
1430
|
-
register the command in `acceptance.scripts` and the normal build. ADS owns no
|
|
1431
|
-
universal spacing scale and infers no design meaning from token names.
|
|
2436
|
+
1. Update `package.json` and its lockfile with
|
|
2437
|
+
`npm version <new-version> --no-git-tag-version --ignore-scripts`.
|
|
2438
|
+
2. Follow the [local verification and changelog stamp workflow](#releasing-the-ads-tool).
|
|
2439
|
+
3. Push the matching `v<new-version>` tag. `release.yml` checks version
|
|
2440
|
+
availability and the committed local proof, builds, packs and publishes the
|
|
2441
|
+
tagged version, and creates the GitHub release with the changelog entry as
|
|
2442
|
+
the release notes. It does not repeat the local browser and package suite.
|
|
2443
|
+
Stable tags publish as `latest`; prerelease tags publish as `next`.
|
|
2444
|
+
4. Check the workflow result and the npm version before you update consumer
|
|
2445
|
+
dependencies.
|
|
2446
|
+
|
|
2447
|
+
The manual workflow moves a label to an existing published version. It does not
|
|
2448
|
+
publish new source.
|
|
1432
2449
|
|
|
1433
2450
|
## Releasing the ADS tool
|
|
1434
2451
|
|
|
1435
|
-
Run the complete tool, browser and packed npm/Bun suite locally before
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
2452
|
+
Run the complete tool, browser and packed npm/Bun suite locally before you tag.
|
|
2453
|
+
|
|
2454
|
+
1. Commit the implementation, the documentation and the package version. The
|
|
2455
|
+
runner refuses uncommitted inputs, untracked release source and source
|
|
2456
|
+
changes during the run.
|
|
2457
|
+
2. Run `bun run release:verify` with Bun, Chrome, npm and Node available. The
|
|
2458
|
+
packed tests install ADS into an npm project and check the Node-facing
|
|
2459
|
+
exports. The runner rejects failed or skipped tests.
|
|
2460
|
+
3. Commit the generated stamp and tag the resulting commit. Do not write a
|
|
2461
|
+
passing stamp by hand.
|
|
2462
|
+
4. Run `bun run release:proof` to verify the stamp.
|
|
2463
|
+
|
|
2464
|
+
**The suite.** It runs the same grouped command as `bun run test`: one shared
|
|
2465
|
+
build, then the unit, integration and browser groups. The worker defaults and
|
|
2466
|
+
per-group overrides of [test configuration](../tests/README.md) also apply to
|
|
2467
|
+
release verification.
|
|
2468
|
+
|
|
2469
|
+
Bun's optional `[test] smol = true` in `bunfig.toml` reduces heap growth through
|
|
2470
|
+
more frequent garbage collection. It can slow tests, and it is not a hard limit
|
|
2471
|
+
for the runner or its compiler and browser children. For a hard memory cap, use
|
|
2472
|
+
an OS or container limit.
|
|
2473
|
+
|
|
2474
|
+
**Make targets.** `make test` runs the same full suite, `make test-grid` uses
|
|
2475
|
+
serial compact dots, and `make test-analysis` runs the focused analysis tests.
|
|
2476
|
+
`make release-verify` records release evidence and `make release-proof` verifies
|
|
2477
|
+
it. These targets enable terminal colors. Direct `bun run release:verify` also
|
|
2478
|
+
preserves colors while it saves its output. To disable colors, use
|
|
2479
|
+
`make test FORCE_COLOR=0` or `FORCE_COLOR=0 bun run release:verify`.
|
|
2480
|
+
|
|
2481
|
+
**The stamp.** A successful run writes a generated verification stamp under the
|
|
2482
|
+
matching version in `docs/CHANGELOG.md`. It records the tested implementation
|
|
2483
|
+
commit, command, counts, runtimes, completion time, duration, source SHA-256 and
|
|
2484
|
+
log SHA-256, per-group counts and report hashes, and explicit test-setting
|
|
2485
|
+
overrides. All three fresh JUnit reports must pass without skips. The full log
|
|
2486
|
+
is in `output/local-tests.log`, and the group reports are in
|
|
2487
|
+
`output/local-tests.junit/`.
|
|
2488
|
+
|
|
2489
|
+
**The proof.** `bun run release:proof` verifies that the tested commit is an
|
|
2490
|
+
ancestor, and that its source digest matches both the release tree and the
|
|
2491
|
+
working inputs. Only generated proof blocks and the machine-specific, unpackaged
|
|
2492
|
+
`.mcp.json` launcher are excluded from the digest. Other tracked changes require
|
|
2493
|
+
another local run. The proof is a record of trusted local verification. It is
|
|
2494
|
+
not a signed attestation or a substitute for review.
|