@reqvire-org/ads 0.4.0 → 0.4.3
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 +115 -87
- package/dist/a11y.mjs +133 -48
- package/dist/analysis/compiler-options.mjs +13 -0
- package/dist/analysis/context.mjs +46 -0
- package/dist/analysis/file-tree.mjs +52 -0
- package/dist/analysis/helpers.mjs +142 -0
- package/dist/analysis/impact.mjs +20 -0
- package/dist/analysis/inputs.mjs +22 -0
- package/dist/analysis/module-resolvers.mjs +46 -0
- package/dist/analysis/native-adapter.mjs +180 -0
- package/dist/analysis/native-project.mjs +323 -0
- package/dist/analysis/queries.mjs +133 -0
- package/dist/analysis/service.mjs +153 -0
- package/dist/analysis/standalone.mjs +57 -0
- package/dist/analysis/syntax.mjs +179 -0
- package/dist/analysis/worker.mjs +182 -0
- package/dist/assets.mjs +6 -6
- package/dist/atomic-composition.mjs +191 -70
- package/dist/atomic-trace.mjs +120 -50
- package/dist/behavior-libraries.mjs +106 -37
- package/dist/behaviors.mjs +219 -77
- package/dist/boundaries.mjs +140 -41
- package/dist/brand-assets.mjs +219 -47
- package/dist/brands.mjs +86 -27
- package/dist/bun-compiler.mjs +28 -14
- package/dist/bun-worker.mjs +7 -5
- package/dist/capture/worker.mjs +15 -4
- package/dist/capture-store.mjs +4 -2
- package/dist/capture.mjs +17 -14
- package/dist/check-service.mjs +44 -58
- package/dist/check.mjs +754 -188
- package/dist/cli.mjs +200 -99
- package/dist/color-values.mjs +21 -21
- package/dist/component-contrast.mjs +127 -9
- package/dist/config.mjs +303 -135
- package/dist/construction-styles.cjs +10 -0
- package/dist/contrast-composition.mjs +134 -0
- package/dist/control-padding.mjs +45 -25
- package/dist/css-values.mjs +3 -2
- package/dist/declarative-flow.mjs +209 -109
- package/dist/design-values.mjs +136 -51
- package/dist/development-runtime.mjs +4 -6
- package/dist/draft-boundary.mjs +11 -6
- package/dist/evidence.mjs +1 -1
- package/dist/finding-rules.mjs +9 -5
- package/dist/font-rules.mjs +22 -17
- package/dist/fonts-generated.mjs +23 -16
- package/dist/foundation-views.mjs +242 -0
- package/dist/foundation.mjs +63 -39
- package/dist/generated-entries.mjs +101 -34
- package/dist/icons.mjs +79 -32
- package/dist/image-attributes.mjs +143 -66
- package/dist/image-size.mjs +1 -1
- package/dist/index.mjs +0 -2
- package/dist/init.mjs +122 -41
- package/dist/investigations.mjs +2 -2
- package/dist/layers.mjs +298 -129
- package/dist/layout-widths.mjs +180 -85
- package/dist/linaria/preserve-values.cjs +7 -0
- package/dist/linaria/spatial-inputs.cjs +56 -0
- package/dist/lockup-composition.mjs +44 -0
- package/dist/lockup-model.cjs +64 -0
- package/dist/mcp/THIRD_PARTY_NOTICES.md +51 -1
- package/dist/mcp/apps.mjs +4 -30
- package/dist/mcp/behavior-pages.mjs +72 -24
- package/dist/mcp/build-status.mjs +257 -64
- package/dist/mcp/catalog.mjs +90 -26
- package/dist/mcp/context.mjs +17 -18
- package/dist/mcp/draft-discovery.mjs +44 -21
- package/dist/mcp/drafts.mjs +903 -281
- package/dist/mcp/execution-coordinator.mjs +417 -167
- package/dist/mcp/execution-results.mjs +7 -7
- package/dist/mcp/mutations.mjs +673 -234
- package/dist/mcp/preview-watch.mjs +448 -170
- package/dist/mcp/preview-widget.bundle.js +44 -50
- package/dist/mcp/prompts.mjs +5 -5
- package/dist/mcp/result-pages.mjs +1 -1
- package/dist/mcp/sandbox-host.mjs +1 -1
- package/dist/mcp/server.mjs +2409 -577
- package/dist/mcp/showcase-host.mjs +165 -41
- package/dist/mcp/skills.mjs +1 -1
- package/dist/mcp/text-diff.mjs +29 -10
- package/dist/paint-contracts.mjs +174 -81
- package/dist/palette-generated.mjs +2 -2
- package/dist/pictogram-model.mjs +59 -0
- package/dist/pictograms.mjs +52 -0
- package/dist/preview-bun.mjs +494 -187
- package/dist/preview-failure.mjs +1 -1
- package/dist/preview-files.mjs +13 -13
- package/dist/preview-imports.mjs +104 -55
- package/dist/preview-inputs.mjs +2 -2
- package/dist/preview-requests.mjs +24 -0
- package/dist/preview-resources.mjs +288 -147
- package/dist/preview-scope.mjs +5 -4
- package/dist/program-cache.mjs +8 -34
- package/dist/project-documents.mjs +1 -1
- package/dist/public-api.mjs +69 -31
- package/dist/public-props.mjs +39 -22
- package/dist/{browser-audit → render-audit}/axe-run.mjs +3 -3
- package/dist/{browser-audit → render-audit}/image-shape.mjs +15 -5
- package/dist/{browser-audit → render-audit}/layout-overflow.mjs +86 -23
- package/dist/{browser-audit → render-audit}/non-text-contrast.mjs +86 -27
- package/dist/render-audit/pictograms.mjs +88 -0
- package/dist/{browser-audit → render-audit}/render-states.mjs +208 -52
- package/dist/{browser-audit → render-audit}/worker.mjs +98 -30
- package/dist/render-audit.mjs +838 -0
- package/dist/render-color-probe.mjs +96 -42
- package/dist/render-composition.mjs +164 -0
- package/dist/resource-limits.mjs +229 -97
- package/dist/runtime-contracts.mjs +467 -185
- package/dist/scenario-groups.mjs +22 -10
- package/dist/scenario-inspector.mjs +6 -43
- package/dist/scenario-program.mjs +8 -25
- package/dist/scenario-registry.mjs +72 -30
- package/dist/scenario-selectors.mjs +161 -64
- package/dist/scenario-slots.mjs +149 -56
- package/dist/scenario-trace.mjs +215 -109
- package/dist/scenarios-compiler.mjs +719 -378
- package/dist/scenarios-vite.d.mts +1 -3
- package/dist/scenarios-vite.mjs +2 -81
- package/dist/scenarios.mjs +421 -157
- package/dist/selector-match.mjs +2 -2
- package/dist/showcase/client.bundle.js +57 -56
- package/dist/showcase/draft-navigation.js +21 -3
- package/dist/showcase/favicon.ico +0 -0
- package/dist/showcase/favicon.svg +1 -0
- package/dist/showcase/foundation-view.css +58 -0
- package/dist/showcase/foundation-view.mjs +255 -0
- package/dist/showcase/guide-controls.ads.review.mjs +32 -0
- package/dist/showcase/icons.js +1 -145
- package/dist/showcase/index.html +3 -31
- package/dist/showcase/pictogram-view.mjs +53 -0
- package/dist/showcase/preview-frame.ads.review.css +46 -0
- package/dist/showcase/preview-frame.ads.review.d.mts +11 -0
- package/dist/showcase/preview-frame.ads.review.mjs +22 -0
- package/dist/showcase/preview-state.js +0 -9
- package/dist/showcase/refresh-scheduler.js +23 -0
- package/dist/showcase/style.css +5 -47
- package/dist/showcase/ui/ui.css +1353 -0
- package/dist/showcase/ui/ui.js +1064 -0
- package/dist/showcase-coverage.mjs +58 -37
- package/dist/skills/README.md +24 -23
- package/dist/skills/ads-designer/README.md +8 -2
- package/dist/skills/ads-designer/SKILL.md +143 -120
- package/dist/skills/ads-designer/references/accessibility.md +78 -15
- package/dist/skills/ads-designer/references/atomic-styles.md +4 -4
- package/dist/skills/ads-designer/references/behaviors.md +30 -27
- package/dist/skills/ads-designer/references/branding.md +101 -24
- package/dist/skills/ads-designer/references/captures.md +25 -0
- package/dist/skills/ads-designer/references/cli.md +21 -24
- package/dist/skills/ads-designer/references/contracts.md +7 -6
- package/dist/skills/ads-designer/references/design-data.md +49 -52
- package/dist/skills/ads-designer/references/drafts.md +20 -17
- package/dist/skills/ads-designer/references/evidence.md +1 -5
- package/dist/skills/ads-designer/references/guarded-editing.md +14 -18
- package/dist/skills/ads-designer/references/layers.md +1 -1
- package/dist/skills/ads-designer/references/layout.md +347 -0
- package/dist/skills/ads-designer/references/mobile.md +2 -1
- package/dist/skills/{ads-motion/references/performance.md → ads-designer/references/motion-performance.md} +5 -1
- package/dist/skills/{ads-motion/references/build.md → ads-designer/references/motion.md} +73 -5
- package/dist/skills/ads-designer/references/performance.md +3 -2
- package/dist/skills/ads-designer/references/pictograms.md +131 -0
- package/dist/skills/ads-designer/references/review.md +37 -34
- package/dist/skills/ads-designer/references/runtimes.md +33 -30
- package/dist/skills/ads-designer/references/scenarios.md +16 -18
- package/dist/skills/{ads-break-ui/references/catalog.md → ads-designer/references/stress-catalog.md} +3 -1
- package/dist/skills/ads-designer/references/stress-test.md +68 -0
- package/dist/skills/ads-designer/references/validation.md +83 -75
- package/dist/skills/ads-designer/references/workflows.md +8 -33
- package/dist/skills/ads-import/SKILL.md +43 -325
- package/dist/skills/ads-import/references/atomic-styles.md +4 -4
- package/dist/skills/ads-import/references/behaviors.md +30 -27
- package/dist/skills/ads-import/references/branding.md +5 -5
- package/dist/skills/ads-import/references/captures.md +25 -0
- package/dist/skills/ads-import/references/cli.md +21 -24
- package/dist/skills/ads-import/references/compatibility.md +1 -1
- package/dist/skills/ads-import/references/contracts.md +7 -6
- package/dist/skills/ads-import/references/design-data.md +49 -52
- package/dist/skills/ads-import/references/drafts.md +20 -17
- package/dist/skills/ads-import/references/evidence.md +1 -5
- package/dist/skills/ads-import/references/guarded-editing.md +14 -18
- package/dist/skills/ads-import/references/implementation.md +2 -1
- package/dist/skills/ads-import/references/layers.md +1 -1
- package/dist/skills/ads-import/references/layout.md +347 -0
- package/dist/skills/ads-import/references/review.md +37 -34
- package/dist/skills/ads-import/references/runtimes.md +33 -30
- package/dist/skills/ads-import/references/scenarios.md +16 -18
- package/dist/skills/ads-import/references/tokens.md +3 -3
- package/dist/skills/ads-import/references/validation.md +83 -75
- package/dist/skills/ads-import/references/workflows.md +8 -33
- package/dist/skills/ads-migrate/SKILL.md +56 -0
- package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +602 -0
- package/dist/skills/ads-port/SKILL.md +58 -344
- package/dist/skills/ads-port/references/atomic-styles.md +4 -4
- package/dist/skills/ads-port/references/behaviors.md +30 -27
- package/dist/skills/ads-port/references/captures.md +25 -0
- package/dist/skills/ads-port/references/cli.md +21 -24
- package/dist/skills/ads-port/references/contracts.md +7 -6
- package/dist/skills/ads-port/references/design-data.md +49 -52
- package/dist/skills/ads-port/references/drafts.md +20 -17
- package/dist/skills/ads-port/references/evidence.md +1 -5
- package/dist/skills/ads-port/references/guarded-editing.md +14 -18
- package/dist/skills/ads-port/references/layers.md +1 -1
- package/dist/skills/ads-port/references/layout.md +347 -0
- package/dist/skills/ads-port/references/lint-and-docs.md +8 -11
- package/dist/skills/ads-port/references/native-implementation.md +2 -1
- package/dist/skills/ads-port/references/review.md +37 -34
- package/dist/skills/ads-port/references/runtimes.md +33 -30
- package/dist/skills/ads-port/references/scenarios.md +16 -18
- package/dist/skills/ads-port/references/validation.md +83 -75
- package/dist/skills/ads-port/references/workflows.md +8 -33
- package/dist/source-symbols.mjs +1 -8
- package/dist/source-values.mjs +270 -129
- package/dist/spatial-composition.mjs +322 -0
- package/dist/spatial-contexts.cjs +56 -0
- package/dist/spatial-css.cjs +351 -0
- package/dist/spatial-inputs.cjs +80 -0
- package/dist/spatial-metadata.mjs +18 -0
- package/dist/spatial-model.cjs +322 -0
- package/dist/spatial.mjs +21 -0
- package/dist/stage-timing.cjs +20 -0
- package/dist/starters/preact/design-system/patterns/Conversation/Conversation.tsx +105 -0
- package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +275 -0
- package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
- package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
- package/dist/starters/preact/design-system/showcase/mcp/main.ads.mount.tsx +8 -0
- package/dist/starters/preact/ds.config.json +25 -6
- package/dist/starters/preact/package.json +4 -8
- package/dist/starters/preact/tsconfig.json +4 -5
- package/dist/starters/preact/vite.config.ts +3 -3
- package/dist/starters/react/ADS.md +42 -47
- package/dist/starters/react/README.md +47 -49
- package/dist/starters/react/design-system/assets/pictograms/catalog.ads.json +13 -0
- package/dist/starters/react/design-system/assets/pictograms/journey.dark.svg +7 -0
- package/dist/starters/react/design-system/assets/pictograms/journey.svg +7 -0
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +18 -2
- package/dist/starters/react/design-system/components/Actions/IconButton/README.md +3 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.fixture.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.scenario.tsx +7 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.tsx +26 -0
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/README.md +5 -0
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.fixture.ts +13 -0
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.scenario.tsx +22 -0
- package/dist/starters/react/design-system/index.ts +2 -1
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.fixture.ts +7 -0
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.scenario.tsx +15 -0
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.tsx +105 -0
- package/dist/starters/react/design-system/patterns/Conversation/README.md +9 -0
- package/dist/starters/react/design-system/patterns/Shell/Floating.ads.fixture.ts +5 -0
- package/dist/starters/react/design-system/patterns/Shell/Floating.ads.scenario.tsx +21 -0
- package/dist/starters/react/design-system/patterns/Shell/README.md +43 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.fixture.ts +5 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +21 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +274 -0
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +1 -1
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
- package/dist/starters/react/design-system/review/index.ads.review.ts +4 -0
- package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.review.tsx +6 -0
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +1 -1
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
- package/dist/starters/react/design-system/showcase/mcp/{main.tsx → main.ads.mount.tsx} +4 -2
- package/dist/starters/react/design-system/tokens/catalog.ads.json +1221 -0
- package/dist/starters/react/design-system/tokens/colors.css +1 -1
- package/dist/starters/react/design-system/tokens/spacing.css +22 -32
- package/dist/starters/react/design-system/tokens/spatial.ads.json +70 -0
- package/dist/starters/react/design-system/tokens/themes.generated.ts +1 -1
- package/dist/starters/react/ds.config.json +25 -6
- package/dist/starters/react/package.json +2 -6
- package/dist/starters/react/tsconfig.json +2 -3
- package/dist/starters/react/vite.config.ts +3 -3
- package/dist/style-boundaries.mjs +70 -25
- package/dist/task-cache.mjs +173 -72
- package/dist/task-worker.mjs +22 -11
- package/dist/test-boundaries.mjs +132 -59
- package/dist/themes-generated.mjs +1 -1
- package/dist/themes-watch.mjs +57 -22
- package/dist/themes.mjs +176 -73
- package/dist/token-export.mjs +39 -14
- package/dist/token-policy.mjs +6 -3
- package/dist/token-quality.mjs +6 -6
- package/dist/token-samples.mjs +16 -5
- package/dist/tokens.mjs +71 -26
- package/dist/ui-framework.mjs +16 -14
- package/dist/unit-contracts.mjs +251 -104
- package/dist/units.mjs +209 -99
- package/dist/usage.mjs +138 -38
- package/dist/validation-checks.mjs +115 -38
- package/dist/validation-inputs.mjs +191 -78
- package/dist/validation.mjs +268 -102
- package/dist/verification/browser.mjs +27 -5
- package/dist/verification.mjs +711 -187
- package/docs/ADS.md +96 -80
- package/docs/ARCHITECTURE.md +368 -137
- package/docs/BEHAVIORS.md +29 -25
- package/docs/CACHING.md +77 -17
- package/docs/CHANGELOG.md +332 -17
- package/docs/CONTRACTS.md +12 -4
- package/docs/DESIGN-REFERENCES.md +40 -0
- package/docs/GUIDE.md +300 -263
- package/docs/MCP.md +187 -324
- package/docs/SPATIAL-CHECKS.md +69 -0
- package/docs/benchmarks/README.md +39 -0
- package/package.json +43 -34
- package/dist/browser-audit.mjs +0 -429
- package/dist/create.mjs +0 -48
- package/dist/lint-config.mjs +0 -50
- package/dist/mcp/project-widget.bundle.js +0 -114
- package/dist/mcp/reports.mjs +0 -101
- package/dist/mcp/widget.bundle.js +0 -147
- package/dist/oxlint.mjs +0 -89
- package/dist/preview-builder.mjs +0 -133
- package/dist/preview-workers.mjs +0 -184
- package/dist/showcase.mjs +0 -77
- package/dist/skills/ads-break-ui/LICENSE.upstream +0 -21
- package/dist/skills/ads-break-ui/README.md +0 -16
- package/dist/skills/ads-break-ui/SKILL.md +0 -412
- package/dist/skills/ads-break-ui/agents/openai.yaml +0 -4
- package/dist/skills/ads-break-ui/references/atomic-styles.md +0 -293
- package/dist/skills/ads-break-ui/references/behaviors.md +0 -412
- package/dist/skills/ads-break-ui/references/captures.md +0 -135
- package/dist/skills/ads-break-ui/references/contracts.md +0 -317
- package/dist/skills/ads-break-ui/references/design-data.md +0 -354
- package/dist/skills/ads-break-ui/references/drafts.md +0 -194
- package/dist/skills/ads-break-ui/references/evidence.md +0 -128
- package/dist/skills/ads-break-ui/references/guarded-editing.md +0 -165
- package/dist/skills/ads-break-ui/references/layers.md +0 -145
- package/dist/skills/ads-break-ui/references/reporting.md +0 -101
- package/dist/skills/ads-break-ui/references/review.md +0 -97
- package/dist/skills/ads-break-ui/references/runtimes.md +0 -203
- package/dist/skills/ads-break-ui/references/scenarios.md +0 -246
- package/dist/skills/ads-break-ui/references/validation.md +0 -166
- package/dist/skills/ads-break-ui/references/verification.md +0 -58
- package/dist/skills/ads-break-ui/references/workflows.md +0 -90
- package/dist/skills/ads-designer/references/reporting.md +0 -101
- package/dist/skills/ads-import/references/reporting.md +0 -101
- package/dist/skills/ads-motion/LICENSE.upstream +0 -21
- package/dist/skills/ads-motion/README.md +0 -22
- package/dist/skills/ads-motion/SKILL.md +0 -385
- package/dist/skills/ads-motion/agents/openai.yaml +0 -4
- package/dist/skills/ads-motion/references/atomic-styles.md +0 -293
- package/dist/skills/ads-motion/references/audit.md +0 -44
- package/dist/skills/ads-motion/references/behaviors.md +0 -412
- package/dist/skills/ads-motion/references/captures.md +0 -135
- package/dist/skills/ads-motion/references/contracts.md +0 -317
- package/dist/skills/ads-motion/references/design-data.md +0 -354
- package/dist/skills/ads-motion/references/drafts.md +0 -194
- package/dist/skills/ads-motion/references/evidence.md +0 -128
- package/dist/skills/ads-motion/references/guarded-editing.md +0 -165
- package/dist/skills/ads-motion/references/layers.md +0 -145
- package/dist/skills/ads-motion/references/motion-review.md +0 -35
- package/dist/skills/ads-motion/references/reporting.md +0 -101
- package/dist/skills/ads-motion/references/review.md +0 -97
- package/dist/skills/ads-motion/references/runtimes.md +0 -203
- package/dist/skills/ads-motion/references/scenarios.md +0 -246
- package/dist/skills/ads-motion/references/validation.md +0 -166
- package/dist/skills/ads-motion/references/verification.md +0 -39
- package/dist/skills/ads-motion/references/workflows.md +0 -90
- package/dist/skills/ads-port/references/reporting.md +0 -101
- package/dist/starters/preact/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
- package/dist/starters/preact/design-system/components/Layout/Grid/Grid.tsx +0 -76
- package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.tsx +0 -29
- package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
- package/dist/starters/preact/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
- package/dist/starters/preact/design-system/review/token-preview/TokenPreview.tsx +0 -137
- package/dist/starters/preact/design-system/showcase/mcp/main.tsx +0 -6
- package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.fixture.ts +0 -7
- package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.fixture.ts +0 -7
- package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.fixture.ts +0 -12
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.scenario.tsx +0 -17
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.tsx +0 -75
- package/dist/starters/react/design-system/components/Layout/Grid/README.md +0 -21
- package/dist/starters/react/design-system/review/brand-preview/BrandPreview.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/brand-preview/BrandPreview.tsx +0 -112
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.tsx +0 -29
- package/dist/starters/react/design-system/review/grid-cell/GridCell.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/grid-cell/GridCell.tsx +0 -18
- package/dist/starters/react/design-system/review/index.ts +0 -6
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
- package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
- package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/token-preview/TokenPreview.tsx +0 -137
- package/dist/starters/react/design-system/showcase/mcp/index.html +0 -1
- package/dist/starters/react/design-system/tokens/Color.ads.fixture.ts +0 -124
- package/dist/starters/react/design-system/tokens/Color.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Layout.ads.fixture.ts +0 -39
- package/dist/starters/react/design-system/tokens/Layout.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Motion.ads.fixture.ts +0 -18
- package/dist/starters/react/design-system/tokens/Motion.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Shape.ads.fixture.ts +0 -30
- package/dist/starters/react/design-system/tokens/Shape.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Space.ads.fixture.ts +0 -37
- package/dist/starters/react/design-system/tokens/Space.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Type.ads.fixture.ts +0 -29
- package/dist/starters/react/design-system/tokens/Type.ads.scenario.tsx +0 -4
- package/dist/starters/react/package-lock.json +0 -4707
- package/dist/token-fixtures.mjs +0 -30
- package/docs/benchmarks/bun-previews.md +0 -91
- package/docs/benchmarks/preview-memory.md +0 -147
- package/docs/benchmarks/turbo-poc.md +0 -284
- package/docs/plans/execution-coordination.md +0 -57
- /package/dist/{browser-audit → render-audit}/first-render.mjs +0 -0
- /package/dist/{browser-audit → render-audit}/layout-shift.mjs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ads-designer
|
|
3
|
-
description:
|
|
3
|
+
description: Start a local React or Preact design system with `ads init --include-starter`, or build UI using a project's existing design system. Covers shared token contracts, local ownership, public APIs, layout, motion, stress-testing with worst-case content, external source integration, showcase inspection, and validation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Choose the editing workflow
|
|
@@ -21,9 +21,7 @@ and accepting its required proposals. If blocked, report the exact unfinished
|
|
|
21
21
|
draft/blocker; retain a proposal intentionally only when the user requests it.
|
|
22
22
|
Auto mode means agent review, without an extra human approval step.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
compiler. `mcp.previewWatch: false` is the externally managed builder variant;
|
|
26
|
-
MCP serves published previews and evidence without starting a compiler.
|
|
24
|
+
Every editing route uses ADS's own compiler, which `ads mcp` runs.
|
|
27
25
|
|
|
28
26
|
|
|
29
27
|
For validation scope, full audits, and CLI/MCP parity, read
|
|
@@ -36,13 +34,13 @@ and memory limits in project configuration; verify real workloads under them.
|
|
|
36
34
|
Inspect the target before editing. Read its `README.md`, `docs/ARCHITECTURE.md`
|
|
37
35
|
and `docs/ADS.md` when present (or existing project guides), public exports, and relevant
|
|
38
36
|
component guides. Preserve its
|
|
39
|
-
framework and contracts. Starting from zero uses `ads
|
|
40
|
-
starter shipped in the ADS package; no example repository is needed.
|
|
37
|
+
framework and contracts. Starting from zero uses `ads init --include-starter` in the
|
|
38
|
+
project, which adds the starter shipped in the ADS package; no example repository is needed.
|
|
41
39
|
|
|
42
40
|
Linaria is required for ADS component and pattern styling. Preserve the target's
|
|
43
41
|
UI framework and integrate compatible Linaria extraction with both application
|
|
44
|
-
and preview builds.
|
|
45
|
-
`ads init` does not install or configure Linaria.
|
|
42
|
+
and preview builds. `ads init --include-starter` (React or Preact) configures it;
|
|
43
|
+
plain `ads init` does not install or configure Linaria. Start design systems with the
|
|
46
44
|
project's framework. Current core
|
|
47
45
|
guards inspect JS/TS/JSX, CSS, and imported Linaria templates, not Vue/Svelte
|
|
48
46
|
single-file components or general HTML component templates. Entry HTML mount
|
|
@@ -54,8 +52,8 @@ production and scenario builds; never alias React to Preact just to shrink a
|
|
|
54
52
|
preview. Native Preact uses its own JSX transform, hooks and DOM events (live
|
|
55
53
|
text updates use `onInput`). Native SVG uses DOM names such as `stroke-width`,
|
|
56
54
|
not React presentation aliases. Keep Linaria extraction and the same public APIs.
|
|
57
|
-
`ads
|
|
58
|
-
example uses Preact. Neither is a component dependency of the receiving project.
|
|
55
|
+
`ads init --include-starter` sets up a React or Preact design system; the tool
|
|
56
|
+
repository's working example uses Preact. Neither is a component dependency of the receiving project.
|
|
59
57
|
|
|
60
58
|
When initializing a project without a saved framework, pass `--framework react`
|
|
61
59
|
or `--framework preact` for its actual runtime. Init saves the choice and later
|
|
@@ -73,8 +71,8 @@ implementations; external source updates require explicit imports or merges.
|
|
|
73
71
|
## MCP access when available
|
|
74
72
|
|
|
75
73
|
Use `ads_status` and `ads_catalog` to discover the connected project's public UI,
|
|
76
|
-
guides, showcase URL and addressable scenarios. `ads_tokens` inspects definitions;
|
|
77
|
-
`ads_scenarios` discovers previews and `ads_show_scenario` opens the selected real entry. Read relevant source
|
|
74
|
+
guides, showcase URL and addressable scenarios. `ads_tokens` inspects definitions;
|
|
75
|
+
`ads_scenarios` discovers previews, including the token and brand views ADS renders itself, and `ads_show_scenario` opens the selected real entry. Read relevant source
|
|
78
76
|
and inspect the actual view before changing it. HTML delivery alone is not a
|
|
79
77
|
rendering check. Use the normal showcase when the host lacks Apps support.
|
|
80
78
|
Use the returned `projectRoot` and `project.commands`; the connected ADS may be
|
|
@@ -96,9 +94,9 @@ names in `<Owner>.ads.exports.ts` and its style permissions (`styles.writes`,
|
|
|
96
94
|
`styles.inline`, `customization`) in `<Owner>.ads.contract.ts`. The public barrel,
|
|
97
95
|
review entry and styles entry are generated, so no draft edits them. Unused
|
|
98
96
|
permissions fail the core checks; do not declare a permission without its
|
|
99
|
-
implementation. Acceptance runs
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
implementation. Acceptance runs `ads check`, `acceptance.scripts`, and the draft
|
|
98
|
+
owners' own behavior tests and render audit (`acceptance.behavior`/`acceptance.audit`,
|
|
99
|
+
both default true); `ads_validate` checks everything a change reaches. Fix a failed acceptance in the
|
|
102
100
|
draft; never bypass a rejection with direct source writes. Shared styles/helpers use `foundation`, root guides use
|
|
103
101
|
`documentation`, and branding/fonts use their discovered `assets/*` unit.
|
|
104
102
|
Intentional configuration, rule exceptions, registered guard code and compiler
|
|
@@ -108,19 +106,22 @@ ADS gates. For binary/large assets, generate `git diff --binary --full-index` in
|
|
|
108
106
|
stay out of model context. Binary changes require Git. These tool instructions
|
|
109
107
|
apply to the MCP editing route; direct editors use the workflow above and run
|
|
110
108
|
the same required gates/checks.
|
|
111
|
-
For owner drafts, token-sample reconciliation,
|
|
109
|
+
For owner drafts, token-sample reconciliation, multi-owner drafts and local
|
|
112
110
|
shared Data ownership, read [guarded-editing.md](references/guarded-editing.md).
|
|
113
111
|
For on-demand current/candidate screenshots and visual dry-run review, read
|
|
114
112
|
[captures.md](references/captures.md).
|
|
113
|
+
For spacing or grid diagnosis, use `ads_capture` with selected `guides` layers
|
|
114
|
+
(`bounds`, `tracks`, `gaps`, `padding`, `margins`, `mini`) and read the returned
|
|
115
|
+
PNG resource. Capture with `guides:[]` for final appearance review. Read each
|
|
116
|
+
image before replacing that target's slot; guides do not establish passing
|
|
117
|
+
layout or behavior checks. Discover supported scenarios rather than inventing IDs.
|
|
115
118
|
For a rejected patch, failed check or loading error, read
|
|
116
119
|
[evidence and diagnosis](references/evidence.md); inspect the failing boundary
|
|
117
120
|
then page needed `ads_results` sections using the returned result ID. Inspect
|
|
118
121
|
one `ads_investigate({unit,check,runId})` summary before changing APIs or policy;
|
|
119
122
|
load request/error/artifact details only when relevant.
|
|
120
123
|
|
|
121
|
-
|
|
122
|
-
separate `${publicAlias}/review` entry (normally `@ds/review`), never the production
|
|
123
|
-
barrel. Product patterns are application UI. For ownership, migration, token
|
|
124
|
+
The showcase owns generic preview UX. Project-specific demonstrations use `.ads.scenario.*`, `.ads.fixture.*`, and small `.ads.review.*` helpers. Shared helpers may be organized in `review/` and exported through `@ds/review`, never the production barrel. Product patterns are application UI. For ownership, migration, token
|
|
124
125
|
renderers, build aliases or `review-import` / `review-contract` diagnostics, read
|
|
125
126
|
[development review UI](references/review.md), also served as `ads://guides/review`.
|
|
126
127
|
|
|
@@ -162,7 +163,7 @@ browser APIs and local helpers. MCP hosts supply no ad hoc runtime APIs. The
|
|
|
162
163
|
framework setting selects compilation/mounting; controller checks also validate
|
|
163
164
|
imports. For controller/behavior work, read
|
|
164
165
|
[behaviors.md](references/behaviors.md), also served as `ads://guides/behaviors`. Discover registered guarantees
|
|
165
|
-
with `ads_behaviors`;
|
|
166
|
+
with `ads_behaviors`; the gates run them, and `ads verify` runs one unit's checks from the CLI. Optional
|
|
166
167
|
`exercises` links public behavioral APIs to scenarios; keep `covers` for rendered
|
|
167
168
|
UI. Registration and demonstration are not passing evidence. `<Owner>.ads.contract.ts`,
|
|
168
169
|
scenarios, fixtures and checks stay out of production exports/imports. Verify
|
|
@@ -172,48 +173,49 @@ production widget cannot replay development effects. Keep dynamic behavior and
|
|
|
172
173
|
capabilities intact rather than rewriting them only for static coverage.
|
|
173
174
|
|
|
174
175
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
again
|
|
176
|
+
Never launch another preview builder: `ads mcp` runs ADS's compiler, reported in
|
|
177
|
+
`ads_status.compiler`. Edit owned sources, wait for the rebuild and invoke the
|
|
178
|
+
preview again. Check
|
|
178
179
|
`ads_status.build` or `ads://project/build` explicitly: a running process, older
|
|
179
180
|
artifact or unreported freshness does not establish current source. Fix reported
|
|
180
181
|
diagnostics in the owning source; notifications may not reach the agent.
|
|
181
182
|
When this skill is served over MCP, resolve relative references/assets from its
|
|
182
183
|
`SKILL.md` URI and fetch supporting files lazily. The host controls native skill
|
|
183
184
|
activation; ordinary resource reads do not establish it. Never rebuild a project
|
|
184
|
-
from skill text:
|
|
185
|
+
from skill text: the starter comes from `ads init --include-starter`.
|
|
185
186
|
|
|
186
187
|
## Start from zero
|
|
187
188
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
the
|
|
189
|
+
Start inside the project, whose `package.json` declares its package manager
|
|
190
|
+
(`"packageManager"`, or a `package-lock.json` / `bun.lock`). `ads init --include-starter`
|
|
191
|
+
adds the starter that ships in the same ADS package version, so the design system always
|
|
192
|
+
matches the tool that checks it, and sets ADS up (scripts, the tool as a development
|
|
193
|
+
dependency, checks in the build). It adds only what the project lacks:
|
|
192
194
|
|
|
193
195
|
```sh
|
|
194
|
-
npx @reqvire-org/ads@<version>
|
|
195
|
-
# Bun: bunx @reqvire-org/ads@<version>
|
|
196
|
-
cd <folder>
|
|
196
|
+
npx @reqvire-org/ads@<version> init --framework react --include-starter # or preact
|
|
197
|
+
# Bun: bunx @reqvire-org/ads@<version> init --framework preact --include-starter
|
|
197
198
|
npm install # bun install
|
|
198
199
|
npm run build # bun run build
|
|
199
200
|
```
|
|
200
201
|
|
|
201
|
-
|
|
202
|
-
or empty. Use the latest published version unless the user names one; read
|
|
202
|
+
Use the latest published version unless the user names one; read
|
|
203
203
|
[references/cli.md](references/cli.md) for a local tarball (`--tool-package`).
|
|
204
204
|
Never copy starter files by hand or port React files to Preact.
|
|
205
205
|
|
|
206
|
-
The
|
|
206
|
+
The starter's `README.md` and `ADS.md` (added when the project has none) explain it. It
|
|
207
|
+
has a semantic token
|
|
207
208
|
foundation in six groups (Color ramps and AA-checked roles, Type, Space & sizing, Shape &
|
|
208
209
|
elevation, Motion, Layout) with light and dark themes declared in `ds.config.json`
|
|
209
210
|
(`[data-theme]` themes the page or one section; optional `brands` add a brand axis beside
|
|
210
211
|
the themes; see `ads://guides/tokens`), React or Preact
|
|
211
|
-
TypeScript/Linaria configuration, general lint, a public barrel, project-owned
|
|
212
|
-
review
|
|
213
|
-
|
|
214
|
-
`
|
|
215
|
-
`
|
|
216
|
-
`SearchPage`
|
|
212
|
+
TypeScript/Linaria configuration, general lint, a generated public barrel, project-owned
|
|
213
|
+
review frames (demo and screen frames), placeholder brand artwork with an app icon, a
|
|
214
|
+
spatial definition (`tokens/spatial.ads.json`) for `@ads-layout`, an icon set with `Icon` and
|
|
215
|
+
`IconButton`, and examples of each layer: `Button`, `IconButton`, `Icon`, `Logo`, `Image` and
|
|
216
|
+
`TextField` in four component groups; the `SearchBar`, `Conversation` and `Shell` patterns; and
|
|
217
|
+
the `SearchPage` and `WorkspacePage` compositions. ADS renders the Tokens, Icons and Brand
|
|
218
|
+
views itself from the project's definitions and assets. Treat them as the project's own: adapt or replace them
|
|
217
219
|
for the requested product. The browser shell is supplied by ADS tooling.
|
|
218
220
|
|
|
219
221
|
Initialize/install ADS before running `npm run dev:showcase` for visual inspection.
|
|
@@ -226,7 +228,8 @@ For an existing app without an ADS, run init inside that app when the tool is
|
|
|
226
228
|
available, then integrate its local public alias, CSS entry, and Linaria
|
|
227
229
|
extraction with the existing framework. Init detects the package manager from
|
|
228
230
|
the app and preserves its scripts and lockfile. Init adds only the foundation
|
|
229
|
-
(
|
|
231
|
+
(token sheets, `catalog.ads.json`, `spatial.ads.json`, the scenario mount and the generated
|
|
232
|
+
entries); copy no other starter files.
|
|
230
233
|
Inspect files before editing; preserve configuration and application entry
|
|
231
234
|
points. Never copy the standalone package/configuration over an existing app.
|
|
232
235
|
|
|
@@ -292,9 +295,9 @@ architectural reuse does not require moving application services into the ADS.
|
|
|
292
295
|
Discover existing tokens and artwork before changing identity. Keep UI values
|
|
293
296
|
in the existing token files using fixed ADS names, and original artwork plus its
|
|
294
297
|
usage, backgrounds, credits, and licenses in `assets/brand/`. Keep fonts in
|
|
295
|
-
`assets/fonts/`, with optional `tokens/fonts.css
|
|
296
|
-
|
|
297
|
-
|
|
298
|
+
`assets/fonts/`, with an optional `tokens/fonts.css`. ADS generates the styles entry
|
|
299
|
+
(`styles.css`) from the token sheets present, in foundation order; add or remove a sheet, never
|
|
300
|
+
edit the entry. Artwork can
|
|
298
301
|
have fixed SVG colors; UI styles must
|
|
299
302
|
still use tokens and must not override primitive state.
|
|
300
303
|
|
|
@@ -311,33 +314,55 @@ Committed native and export icons are `assets.targets` (SVG copy, PNG, ICO, ICNS
|
|
|
311
314
|
and UI icon sets are `assets.glyphs`; `ads assets` keeps them and the committed
|
|
312
315
|
`assets/generated.json` current, and `ads check` fails when they are stale. Describe
|
|
313
316
|
and license each artwork in `assets/brand/README.md`, pair dark-theme variants as
|
|
314
|
-
`<name>.dark.svg`, show them through a component
|
|
315
|
-
|
|
316
|
-
delivered `.ico`/`.icns` files are artwork too;
|
|
317
|
-
|
|
317
|
+
`<name>.dark.svg`, and show them through a component where the product uses them. ADS renders
|
|
318
|
+
the artwork in `assets/brand/` in the Brand section itself; do not author brand preview scenarios. Finished PNG/JPEG/WebP images and
|
|
319
|
+
delivered `.ico`/`.icns` files are artwork too; supply enough source resolution for
|
|
320
|
+
their production size. Enlarged inspection samples do not add image detail.
|
|
321
|
+
Other products' logos are not brand artwork or glyphs: keep them, in their own
|
|
318
322
|
colors and under their owners' trademark and usage terms, in `assets/logos/` and
|
|
319
323
|
show them as images, never muted, tinted or recolored; ADS generates
|
|
320
324
|
and checks nothing there.
|
|
321
325
|
Read [branding.md](references/branding.md) (`ads://guides/branding`) before changing
|
|
322
|
-
brand artwork, icon outputs or glyphs.
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
326
|
+
brand artwork, icon outputs or glyphs. Its alignment guidance distinguishes UI
|
|
327
|
+
icons beside text from a brand mark paired with a name: use the project's size
|
|
328
|
+
roles and optical centering, and do not assume equal boxes or cap-height matching
|
|
329
|
+
prove visual alignment. Use its opt-in `@ads-lockup` construction to guard an owned
|
|
330
|
+
artwork/text pairing: declare the size token and direct artwork/text hooks, keep
|
|
331
|
+
text runs in spans, and fix `lockup-construction` errors at that declaration.
|
|
332
|
+
|
|
333
|
+
## Pictograms
|
|
334
|
+
|
|
335
|
+
Keep illustrative pictograms separate from brand identity and small UI icons.
|
|
336
|
+
Read [pictograms.md](references/pictograms.md) (`ads://guides/pictograms`) before
|
|
337
|
+
adding them. It covers `assets/pictograms/catalog.ads.json`, fixed-color/gradient
|
|
338
|
+
artwork, theme variants, the dedicated gallery and source/render guards. Preserve
|
|
339
|
+
artistic freedom; do not apply glyph recoloring or brand-lockup sizing to them.
|
|
340
|
+
|
|
341
|
+
## Layout
|
|
342
|
+
|
|
343
|
+
Write layout geometry (columns, placement, gutters, margins, rows, regions and panels) with
|
|
344
|
+
`@ads-layout` in owned Linaria styles. ADS validates it against `tokens/spatial.ads.json` and
|
|
345
|
+
compiles it to plain CSS; nothing ships at runtime. Choose fluid, fixed, hybrid, flow or inherited
|
|
346
|
+
tracks by what extra space should do, use `context: container` for regions that adapt to their own
|
|
347
|
+
width, and `overlay` for panels that cover content. Read [layout.md](references/layout.md)
|
|
348
|
+
(`ads://guides/layout`) for worked examples (page grid, tiles, nested alignment, application shell)
|
|
349
|
+
and the `grid-construction` fixes.
|
|
350
|
+
|
|
351
|
+
Outside `@ads-layout`, use shared sizing roles for fixed dimensions and responsive or intrinsic
|
|
352
|
+
sizing where the part can shrink. `layout-fixed-width` checks role membership and spatial
|
|
353
|
+
bounds. Use the spatial scale, standard control/icon sizes or an explicit `layout.widthTokens`
|
|
354
|
+
role; overlays declare their owner in `layout.fixedWidthUnits`. See the layout guide for
|
|
355
|
+
validated fixed tiles and hybrid panels. Atomic CSS
|
|
331
356
|
does not keep rule order: give queries on one property exclusive ranges, such as
|
|
332
357
|
`(min-width: 768px) and (max-width: 1023.98px)`. `ads audit` fails horizontal overflow at 390,
|
|
333
|
-
768 and 1280 px, and reports a set width above 96 px that overflows a 240 px container as a review item (`layout-overflow-narrow`). See the
|
|
358
|
+
768 and 1280 px, and reports a set width above 96 px that overflows a 240 px container as a review item (`layout-overflow-narrow`). See the Layout widths section of
|
|
334
359
|
[design-data.md](references/design-data.md) (`ads://guides/tokens`).
|
|
335
360
|
|
|
336
361
|
## Web performance
|
|
337
362
|
|
|
338
363
|
Use the project's image component; give `priority` to the view's main visible image only, since
|
|
339
|
-
lazy loading above the fold hurts. Call `preloadFonts()` from `
|
|
340
|
-
in the app entry
|
|
364
|
+
lazy loading above the fold hurts. Call `preloadFonts()` from the public entry (the barrel re-exports it once `ads assets` has
|
|
365
|
+
written it) in the app entry, or put its `fontPreloadTags()` in the page from a build step for an
|
|
341
366
|
earlier preload. `ads check` fails unsized or unchosen `<img>` (`img-attributes`), oversized assets
|
|
342
367
|
(`asset-image-budget`, `asset-font-budget`) and a weight no face covers (`font-weight-missing`);
|
|
343
368
|
`ads audit` fails layout shift above 0.1 (`layout-shift`) and an image at another shape than it
|
|
@@ -351,7 +376,11 @@ Target WCAG 2.2 AA. `ads check` fails on contrast in every theme and brand, targ
|
|
|
351
376
|
focus, text resize, reduced motion, text spacing, image alternatives and icon-only controls
|
|
352
377
|
(`a11y-*`, `token-contrast` and `component-contrast`), and lists keyboard reach for review
|
|
353
378
|
(`a11y-keyboard`); `ads audit` adds axe-core and non-text contrast in the browser. Read [accessibility.md](references/accessibility.md)
|
|
354
|
-
(`ads://guides/accessibility`) for the rules and the practice no tool can check.
|
|
379
|
+
(`ads://guides/accessibility`) for the rules and the practice no tool can check. When a
|
|
380
|
+
required color (a brand or reference color) cannot reach contrast with its text, follow its
|
|
381
|
+
"When a required color cannot reach contrast" options: other text color, WCAG's 3:1
|
|
382
|
+
large-text minimum (size declared in the block that pairs the colors), or the nearest passing
|
|
383
|
+
color, presented with ratios when the color is a stakeholder's decision.
|
|
355
384
|
|
|
356
385
|
## Design craft and mobile behavior
|
|
357
386
|
|
|
@@ -362,6 +391,22 @@ screens, browser chrome, safe areas, or mobile forms, read
|
|
|
362
391
|
[references/mobile.md](references/mobile.md). Load these when relevant rather
|
|
363
392
|
than imposing mobile application setup on every component task.
|
|
364
393
|
|
|
394
|
+
## Motion
|
|
395
|
+
|
|
396
|
+
To implement, review or audit animation, read [references/motion.md](references/motion.md):
|
|
397
|
+
when motion is worth adding, driver choice, timing and easing through the motion tokens,
|
|
398
|
+
recipes for common controls, a review checklist and interruption coverage. For jank or
|
|
399
|
+
rendering cost, read [references/motion-performance.md](references/motion-performance.md).
|
|
400
|
+
`a11y-reduced-motion` already guards the reduced-motion tokens.
|
|
401
|
+
|
|
402
|
+
## Stress-testing
|
|
403
|
+
|
|
404
|
+
To find what real content and states break a component or pattern, read
|
|
405
|
+
[references/stress-test.md](references/stress-test.md) and pick values from
|
|
406
|
+
[references/stress-catalog.md](references/stress-catalog.md). The default is a report;
|
|
407
|
+
fix only when asked (`+fix`). The render audit already fails overflow; a stress test adds the
|
|
408
|
+
content, collection, state and environment cases no guard knows.
|
|
409
|
+
|
|
365
410
|
Implement motion inside the owner using existing tokens and reduced-motion
|
|
366
411
|
policy. Use the project's existing driver, preserve documented exceptions, and
|
|
367
412
|
verify interruption and cleanup. Dedicated motion or stress-test skills can
|
|
@@ -374,9 +419,9 @@ Selected guidance adapts Emil Kowalski's design/mobile skills. Preserve its
|
|
|
374
419
|
## Use the showcase as the design workspace
|
|
375
420
|
|
|
376
421
|
Discover the existing showcase and its run/build commands before visual work.
|
|
377
|
-
Open its MCP-reported URL to inspect the current design.
|
|
378
|
-
|
|
379
|
-
|
|
422
|
+
Open its MCP-reported URL in the built-in client to inspect the current design.
|
|
423
|
+
Declare the project's framework and supply its native scenario mount adapter;
|
|
424
|
+
ADS manages preview compilation.
|
|
380
425
|
|
|
381
426
|
The showcase is a minimal shell plus an MCP client and Apps host, supplied by ADS
|
|
382
427
|
tooling. It discovers Tokens/Components/Patterns/Composition entries through MCP
|
|
@@ -386,24 +431,23 @@ copy its shell into the project or assemble a second catalogue/rendering pipelin
|
|
|
386
431
|
|
|
387
432
|
When MCP is connected, open the running URL from `ads_status`. Otherwise run the
|
|
388
433
|
installed `ads showcase` or the project's `dev:showcase` script. Do not launch a
|
|
389
|
-
second runtime/compiler for the same connected project.
|
|
390
|
-
preview
|
|
434
|
+
second runtime/compiler for the same connected project. ADS's managed Bun
|
|
435
|
+
preview compiler publishes a shared graph on first demand and after source
|
|
391
436
|
changes. The built-in client refreshes discovery and the active scenario in the
|
|
392
437
|
same App after a successful build. Shared runtime, foundation CSS, fonts and
|
|
393
438
|
selected scenario modules load through MCP
|
|
394
439
|
resources inside the sandboxed App. Never inject project styles/runtime into
|
|
395
|
-
the outer host. Keep the
|
|
440
|
+
the outer host. Keep the declared framework and its native mount/unmount adapter
|
|
396
441
|
consistent; scenario teardown must release owned timers, portals and workers.
|
|
397
442
|
The host shows errors and marks retained output as stale. Other hosts may need an
|
|
398
|
-
explicit preview-tool invocation.
|
|
399
|
-
|
|
443
|
+
explicit preview-tool invocation. ADS compiles the project's TSX/Linaria
|
|
444
|
+
source automatically; the application's production build remains project-owned.
|
|
400
445
|
|
|
401
|
-
|
|
402
|
-
the separate review entry, while scenario
|
|
446
|
+
Project-specific review helpers use `.ads.review.*`; generic framing belongs to the showcase preview UX. Shared helpers are exported through the separate review entry, while scenario
|
|
403
447
|
files define no CSS, custom classes or widget replicas. Keep real presentation in
|
|
404
448
|
its component/pattern owner. The tooling shell's CSS is outside that project
|
|
405
|
-
contract.
|
|
406
|
-
|
|
449
|
+
contract. A project's own showcase pages are checked like other showcase source; the
|
|
450
|
+
built-in client requires no TokensPage/ComponentsPage/PatternsPage/CompositionPage files.
|
|
407
451
|
|
|
408
452
|
Colocate `<Owner>.ads.scenario.tsx` and `<Owner>.ads.fixture.ts` with tokens and
|
|
409
453
|
each component/pattern. Put larger entries under `composition/<Name>/` with their
|
|
@@ -422,7 +466,8 @@ and `components/core/Button.ads.scenario.tsx` identify `components/core/Button`.
|
|
|
422
466
|
Use one form, no duplicate IDs or hand-maintained registry. Renames change IDs.
|
|
423
467
|
The showcase and external hosts mount the same discovered entry. ADS owns Bun
|
|
424
468
|
preview compilation and Linaria extraction independently of the application's
|
|
425
|
-
bundler.
|
|
469
|
+
bundler. Declare `framework`; ADS publishes `.ds/preview/manifest.json`
|
|
470
|
+
automatically. Keep the project-owned
|
|
426
471
|
framework mount adapter and its cleanup. Use `ads compile` for standalone/CI
|
|
427
472
|
preview builds. MCP discovers metadata without importing executable TSX. Read
|
|
428
473
|
[Runtime and compiler setup](references/runtimes.md) when setting up or migrating
|
|
@@ -448,38 +493,21 @@ unresolved branches do not grant speculative coverage. Tests and
|
|
|
448
493
|
unused imports/functions do not. Static reachability does not prove successful
|
|
449
494
|
mounting, correct content, every branch/state or visual parity: open each affected
|
|
450
495
|
entry independently and verify real behavior at narrow/wide sizes in both themes.
|
|
451
|
-
The
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
`
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
probes each token to verify that the declared sample property responds. It restores
|
|
467
|
-
values immediately. Missing, hidden, invalid or hardcoded samples produce a preview
|
|
468
|
-
error instead of a successful review. These browser checks apply to the mounted
|
|
469
|
-
scenario/theme, not every application state or pixel-level design quality.
|
|
470
|
-
Keep styles in the project renderer; do not add inline-style exemptions to scenarios.
|
|
471
|
-
Fix `token-scenario-reference`, `token-scenario-render` and `token-scenario-coverage`
|
|
472
|
-
findings. Metadata and unused fixture fields do not count. Discover exact token IDs with `ads_scenarios({kind:"tokens"})`; mount them
|
|
473
|
-
with `ads_show_scenario({id})` or `ads_show_tokens({category:id})`. With the shared
|
|
474
|
-
resource compiler, omitting category opens the first project token scenario.
|
|
475
|
-
Legacy compilers retain the generic definition inspector. Use `ads_tokens` for
|
|
476
|
-
source definitions and values; inspecting definitions does not prove UI parity.
|
|
477
|
-
The tool keeps the shared naming contract; sample templates and their token
|
|
478
|
-
lists belong to the project.
|
|
479
|
-
|
|
480
|
-
Development review helpers need no product catalogue scenario. A token scenario
|
|
481
|
-
may name its review renderer in `covers`; ordinary component/pattern scenarios
|
|
482
|
-
cover their production subjects. Keep review exports in the separate review entry.
|
|
496
|
+
The `showcase-coverage` policy also checks application render references.
|
|
497
|
+
|
|
498
|
+
ADS renders the Tokens views itself from the token definitions and `tokens/catalog.ads.json`.
|
|
499
|
+
Each catalogue group is a sidebar group with one view per kind of token
|
|
500
|
+
(`tokens/<Group>/<section>`, such as `tokens/Typography/line-height`); a group with one kind is a
|
|
501
|
+
single `tokens/<Group>` view. The catalogue groups tokens and gives each a sample binding:
|
|
502
|
+
`{ "token": "--accent", "property": "background-color", "probe": "rgb(31, 97, 163)" }`, the CSS
|
|
503
|
+
property the token is shown with and a valid test value different from its own. Tokens without an
|
|
504
|
+
entry appear in a "Values" group with a default binding for their type. Do not author
|
|
505
|
+
`tokens/…` scenarios or token review renderers: a project scenario with a foundation view's
|
|
506
|
+
ID fails. Invalid catalogue entries are `foundation-catalog` errors. Discover the views with
|
|
507
|
+
`ads_scenarios({kind:"tokens"})` and inspect definitions with `ads_tokens`.
|
|
508
|
+
|
|
509
|
+
Development review helpers need no product catalogue scenario; component and pattern
|
|
510
|
+
scenarios cover their production subjects. Keep review exports in the separate review entry.
|
|
483
511
|
Remove redundant helper catalogue scenarios during migration. Product UI retains
|
|
484
512
|
its real render-coverage requirement. Keep directory ownership anchored by its
|
|
485
513
|
implementation entry (`index` or a file matching the directory name).
|
|
@@ -527,13 +555,11 @@ the ADS server package itself. Persistent SSE/notification streams make
|
|
|
527
555
|
|
|
528
556
|
|
|
529
557
|
|
|
530
|
-
Run ADS's own gates directly with `ads check
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
or `ads_validate({policy:"acceptance"})`. Follow [validation](references/validation.md)
|
|
536
|
-
for triggers and evidence scopes; never weaken a policy to pass a failing change.
|
|
558
|
+
Run ADS's own gates directly with `ads check`. Register project-specific checks as explicit package scripts in
|
|
559
|
+
`acceptance.scripts` / `validation.scripts` (list each once), and behavior tests
|
|
560
|
+
through ADS contracts. Direct edits run `ads validate --changed` or
|
|
561
|
+
`ads_validate({scope:"changed"})`. Follow [validation](references/validation.md)
|
|
562
|
+
for what each gate runs; never weaken a gate to pass a failing change.
|
|
537
563
|
A project can use its own linter in those scripts when desired. Measured renderer properties and documented
|
|
538
564
|
non-state hooks are declared in the owner's contract (`styles.writes`,
|
|
539
565
|
`styles.inline`, `customization`); shared token writes and primitive state overrides
|
|
@@ -587,9 +613,10 @@ loading notifications on success and failure. Keep field errors and persistent
|
|
|
587
613
|
information in the relevant form, inline alert, or dialog.
|
|
588
614
|
|
|
589
615
|
Customize through shared tokens, component mappings and documented variants. Stacking, gestures,
|
|
590
|
-
measured geometry, and animation belong to the component. Register
|
|
591
|
-
|
|
592
|
-
|
|
616
|
+
measured geometry, and animation belong to the component. Register the notification API in
|
|
617
|
+
`usage.notifications` (`[{ "api", "host", "rootFiles" }]` in `ds.config.json`): `ads check` then
|
|
618
|
+
fails a call during render or from a `'use server'` module (`notification-client-usage`) and a
|
|
619
|
+
host mounted outside the listed roots (`notification-host-root`).
|
|
593
620
|
|
|
594
621
|
## Validate
|
|
595
622
|
|
|
@@ -616,10 +643,6 @@ declarative parent graphs, constrained theme bindings, private visual subject ro
|
|
|
616
643
|
shared Data ownership and guarded migration, read
|
|
617
644
|
[contracts.md](references/contracts.md) when the task touches those contracts.
|
|
618
645
|
|
|
619
|
-
For a suspected ADS defect or missing capability after targeted investigation, read
|
|
620
|
-
[reporting.md](references/reporting.md). Record actionable observations with
|
|
621
|
-
`ads_report_bug` or `ads_request_feature`; preserve valid APIs and rejected drafts.
|
|
622
|
-
|
|
623
646
|
For Data/UX/Skin boundaries, shared token reuse and private-value diagnostics, read
|
|
624
647
|
[design-data.md](references/design-data.md). Components own mappings and mechanics,
|
|
625
648
|
not independent token catalogues. Existing project font, text and spacing roles
|
|
@@ -11,7 +11,7 @@ Each message names its WCAG criterion.
|
|
|
11
11
|
| Rule | What it reviews | WCAG |
|
|
12
12
|
|---|---|---|
|
|
13
13
|
| `token-contrast` | Text, link, accent and status text on their backgrounds (4.5:1); focus and control borders on canvas and surface (3:1); in every theme and brand, for any CSS color syntax, with translucent colors composited over their background and the canvas. A pair color that cannot be resolved statically (`currentColor`, relative color syntax) is a `token-contrast-unresolved` info item | 1.4.3, 1.4.11 |
|
|
14
|
-
| `component-contrast` | A component or pattern style block (top level, a nested state such as `&:hover` or `&[aria-selected="true"]`, or an at-rule) that sets both `color: var(--a)` and `background`/`background-color: var(--b)` needs 4.5:1 in every theme and brand, resolved like `token-contrast
|
|
14
|
+
| `component-contrast` | A component or pattern style block (top level, a nested state such as `&:hover` or `&[aria-selected="true"]`, or an at-rule) that sets both `color: var(--a)` and `background`/`background-color: var(--b)` needs 4.5:1 in every theme and brand, resolved like `token-contrast`; large text needs 3:1 where the block or an enclosing block declares `font-size` of at least 24px, or 18.66px at `font-weight` 700+ (`px`, `pt` or `rem`, literal or token; `em`, `%` and `calc()` keep 4.5:1). Local custom properties in the block resolve one level, and an undeclared one reads its `var()` fallback. Disabled states are exempt; `currentColor`, `transparent`, transparent backgrounds, one token on both sides and native progress, meter and range parts are skipped; a side that names no color token, or text matching the canvas over a translucent background, is a `component-contrast-unresolved` info item | 1.4.3 |
|
|
15
15
|
| `a11y-target-size` | `--control-height-*` of at least 24 px (44 px where touch is common) | 2.5.8 |
|
|
16
16
|
| `a11y-focus` | `--focus-w` of at least 2 px, and a `:focus-visible` indicator in `base.css` | 2.4.7, 2.4.13 |
|
|
17
17
|
| `a11y-text-resize` | Font-size tokens in `rem`, so text follows the reader's browser font size | 1.4.4 |
|
|
@@ -26,7 +26,70 @@ attribute, or move the interaction to a native control. Do not silence it with a
|
|
|
26
26
|
value. Fix `component-contrast` with the role contract: `--x-text` on `--x-bg`, `--x-fg` on
|
|
27
27
|
`--x`; never a status color (`--success`) as text on its own tint (`--success-bg`).
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
The declaration-only exemptions above do not exempt a source-proven text node; the
|
|
30
|
+
composition check below can establish that matching foreground/background tokens hide text.
|
|
31
|
+
|
|
32
|
+
### Text on a background owned elsewhere
|
|
33
|
+
|
|
34
|
+
Use semantic text and surface tokens where they are owned; do not add a background to a
|
|
35
|
+
link merely to make it visible to the checker. ADS follows source-resolvable owned JSX,
|
|
36
|
+
component calls and forwarded children, so this pairing is checked without registration:
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
// Menu surface, owned by its panel component:
|
|
40
|
+
const surface = css`background: var(--bg-menu);`;
|
|
41
|
+
// Text, owned by a separate link component:
|
|
42
|
+
const link = css`color: var(--text-product);`;
|
|
43
|
+
// The composition supplies the relationship:
|
|
44
|
+
<MenuPanel><ProductLink>All new features</ProductLink></MenuPanel>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
A proved failing pair is a `component-contrast` error and blocks acceptance. Diagnostics
|
|
48
|
+
name the text token and the background source. Transparent wrappers do not hide an
|
|
49
|
+
ancestor background; a text node using the same token as its backdrop is still a failure.
|
|
50
|
+
No explicit pair contract is required. Keep decorative brand colors separate from text
|
|
51
|
+
roles when their contrast is insufficient.
|
|
52
|
+
|
|
53
|
+
The composition check deliberately leaves unknown prop spreads, differing class branches,
|
|
54
|
+
competing/conditional/descendant styles, unbound class names, gradients, opacity, filters,
|
|
55
|
+
transforms, text shadows, dynamic visibility and missing backdrops
|
|
56
|
+
unverified (`component-contrast-unresolved`). Keep legitimate component APIs; do not
|
|
57
|
+
flatten them or add paint to satisfy the checker. Audit the actual composed scenario,
|
|
58
|
+
including hover/focus and every theme/brand. A static success with an unresolved finding
|
|
59
|
+
is not proof that rendered contrast passes.
|
|
60
|
+
|
|
61
|
+
### When a required color cannot reach contrast
|
|
62
|
+
|
|
63
|
+
A brand or reference color (a live site's button blue, a product color) can fail with the
|
|
64
|
+
text it must carry: white on a light, saturated blue is often near 2.4:1. Do not ship it
|
|
65
|
+
failing, and do not hide it: no one-off value, `text-shadow`, opacity, gradient under the
|
|
66
|
+
text or disabled check. Work through these options, measure each candidate's ratio, and
|
|
67
|
+
when the color is a stakeholder's decision (a port that must match a reference), present
|
|
68
|
+
the candidates with their ratios and let them choose.
|
|
69
|
+
|
|
70
|
+
1. **Change the text, not the color.** Dark text may pass on the original color where
|
|
71
|
+
white cannot. Add a `--x-fg`/`--text-on-x` role for it.
|
|
72
|
+
2. **Large text.** WCAG and `component-contrast` need only 3:1 for large text: `font-size`
|
|
73
|
+
of at least 24px, or at least 18.66px at `font-weight` 700+, in `px`, `pt` or `rem`
|
|
74
|
+
(literal or token). Declare the size **in the same style block that pairs the colors**
|
|
75
|
+
(or an enclosing block) for a declaration-only pair. The composition check can also
|
|
76
|
+
resolve sizes inherited through owned DOM and nonconflicting classes. `em`, `%`
|
|
77
|
+
or `calc()` sizes keep 4.5:1. This fits prominent calls to action and headings, and
|
|
78
|
+
keeps a much brighter color (white on about `#0095dd` instead of `#0079d0`). Everything
|
|
79
|
+
with smaller text on that color still needs 4.5:1, so keep a separate passing token for it.
|
|
80
|
+
3. **Derive the nearest passing color**, as a token with the source color in a comment.
|
|
81
|
+
Lower lightness in small steps, keeping hue and saturation, until the pair passes. For
|
|
82
|
+
white text the background's relative luminance is capped near 0.18, so light
|
|
83
|
+
colors lose most of their brightness. If the result turns dull (cyan, teal, green, orange
|
|
84
|
+
and yellow go muddy when darkened), turn the hue a few degrees toward blue or purple,
|
|
85
|
+
which reach the same luminance at higher brightness and saturation, and stop at the
|
|
86
|
+
smallest shift that still looks like the original. Use the one token wherever that
|
|
87
|
+
color carries normal-size text, so the system has one passing variant, not several.
|
|
88
|
+
|
|
89
|
+
`token-contrast` role pairs (`--text-body` on `--bg-canvas`, `--x-text` on `--x-bg`) carry
|
|
90
|
+
no font size and always need 4.5:1; option 2 applies to component pairs only.
|
|
91
|
+
|
|
92
|
+
## Render audit (axe-core and non-text contrast)
|
|
30
93
|
|
|
31
94
|
Run `ads audit` after changing a component, pattern or composition scenario. It renders
|
|
32
95
|
each one in every declared brand and theme, runs axe-core's WCAG A/AA rules on the
|
|
@@ -48,7 +111,8 @@ design-system/components/Broken.ads.scenario.tsx:1:1 [error:a11y-axe] axe button
|
|
|
48
111
|
- Fix the finding in the component that renders the failing element, not in the scenario.
|
|
49
112
|
- A `color-contrast` finding that `token-contrast` or `component-contrast` also reports is a
|
|
50
113
|
token pair: change the ramp step or use the role pair. One only the audit reports comes
|
|
51
|
-
from
|
|
114
|
+
from a cascade or rendered state source analysis could not prove. Fix the text/surface
|
|
115
|
+
token in its real owner and verify the composed scenario; do not duplicate backgrounds.
|
|
52
116
|
- `a11y-non-text-contrast` errors cover enabled, visible buttons, inputs, selects,
|
|
53
117
|
textareas, links and `switch`/`checkbox`/`radio`/`slider`/`tab` roles. A control whose
|
|
54
118
|
background has less than 3:1 against its surroundings and that has a visible border needs
|
|
@@ -59,21 +123,20 @@ design-system/components/Broken.ads.scenario.tsx:1:1 [error:a11y-axe] axe button
|
|
|
59
123
|
or `-fg` token. Disabled controls are exempt. Each finding names the elements, themes,
|
|
60
124
|
brands and lowest ratio.
|
|
61
125
|
- A failed render is retried on its own, up to 3 attempts. Read `retries` for retried passes; a
|
|
62
|
-
`
|
|
126
|
+
`render-audit` error names a scenario that still failed and its last cause.
|
|
63
127
|
- Token and brand scenarios are skipped; name one with `--scenario` to audit it.
|
|
64
|
-
- `ads validate`/`ads_validate` run the audit
|
|
65
|
-
`
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
a series of accepted drafts. `mcp.auditPages` (1–16, default 4) sets how many pages
|
|
128
|
+
- `ads validate`/`ads_validate` always run the audit of every scenario their change
|
|
129
|
+
set reaches (everything with scope `all`); its findings fail validation, as they
|
|
130
|
+
fail `ads audit`. `ads_accept` audits the draft owners' own scenarios unless
|
|
131
|
+
`acceptance.audit` is false, and rejects the draft on any `a11y-axe` or
|
|
132
|
+
`a11y-non-text-contrast` error; read the findings with `ads_results`
|
|
133
|
+
(`diagnostics`). After a series of accepted drafts, `ads_validate` with
|
|
134
|
+
`scope:"changed"` audits everything they reach. `mcp.auditPages` (1–16, default 4) sets how many pages
|
|
72
135
|
render at once.
|
|
73
136
|
- It needs the project's Playwright and browser, as captures do: `npm install -D
|
|
74
|
-
@playwright/test` and `npx playwright install chromium` (`ads
|
|
75
|
-
|
|
76
|
-
Without them the
|
|
137
|
+
@playwright/test` and `npx playwright install chromium` (`ads init` declares
|
|
138
|
+
`@playwright/test`). `mcp.capture` selects the browser or an installed Chrome channel.
|
|
139
|
+
Without them the gate fails with a `render-audit` error.
|
|
77
140
|
|
|
78
141
|
A clean audit is not a pass: automated rules find only part of the WCAG failures. Keep the
|
|
79
142
|
manual checks below.
|