@reqvire-org/ads 0.3.53 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +114 -94
- package/dist/a11y.mjs +108 -29
- 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 +140 -0
- package/dist/analysis/impact.mjs +20 -0
- package/dist/analysis/inputs.mjs +15 -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 +146 -0
- package/dist/analysis/standalone.mjs +57 -0
- package/dist/analysis/syntax.mjs +164 -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 +222 -79
- package/dist/boundaries.mjs +137 -40
- package/dist/brand-assets.mjs +219 -47
- package/dist/brands.mjs +86 -27
- package/dist/bun-compiler.mjs +34 -13
- 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 +66 -0
- package/dist/check.mjs +756 -196
- package/dist/cli.mjs +203 -100
- package/dist/color-values.mjs +21 -21
- package/dist/component-contrast.mjs +2 -2
- package/dist/config.mjs +308 -163
- package/dist/construction-styles.cjs +10 -0
- package/dist/contracts.d.mts +9 -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 +7 -5
- package/dist/font-rules.mjs +2 -2
- package/dist/fonts-generated.mjs +4 -2
- package/dist/foundation-views.mjs +238 -0
- package/dist/foundation.mjs +63 -39
- package/dist/generated-entries.mjs +198 -0
- package/dist/icons.mjs +80 -33
- package/dist/image-attributes.mjs +109 -36
- package/dist/image-size.mjs +1 -1
- package/dist/index.mjs +0 -2
- package/dist/init.mjs +128 -68
- package/dist/investigations.mjs +2 -2
- package/dist/layers.mjs +300 -127
- 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 +91 -26
- package/dist/mcp/context.mjs +17 -18
- package/dist/mcp/draft-discovery.mjs +44 -21
- package/dist/mcp/drafts.mjs +978 -343
- package/dist/mcp/execution-coordinator.mjs +417 -167
- package/dist/mcp/execution-results.mjs +7 -7
- package/dist/mcp/mutations.mjs +701 -219
- package/dist/mcp/preview-watch.mjs +465 -161
- package/dist/mcp/preview-widget.bundle.js +44 -50
- package/dist/mcp/prompts.mjs +6 -6
- package/dist/mcp/result-pages.mjs +1 -1
- package/dist/mcp/sandbox-host.mjs +1 -1
- package/dist/mcp/server.mjs +2436 -570
- package/dist/mcp/showcase-host.mjs +176 -39
- 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/preview-bun.mjs +493 -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 +10 -0
- package/dist/project-documents.mjs +1 -1
- package/dist/public-api.mjs +70 -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 +2 -2
- 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/{browser-audit → render-audit}/render-states.mjs +208 -52
- package/dist/{browser-audit → render-audit}/worker.mjs +86 -30
- package/dist/render-audit.mjs +828 -0
- package/dist/render-color-probe.mjs +96 -42
- 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 +768 -359
- package/dist/scenarios-vite.d.mts +1 -3
- package/dist/scenarios-vite.mjs +2 -81
- package/dist/scenarios.mjs +424 -159
- package/dist/selector-match.mjs +2 -2
- package/dist/showcase/client.bundle.js +57 -56
- package/dist/showcase/draft-navigation.js +18 -0
- package/dist/showcase/favicon.ico +0 -0
- package/dist/showcase/favicon.svg +1 -0
- package/dist/showcase/foundation-view.css +55 -0
- package/dist/showcase/foundation-view.mjs +252 -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/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 +1062 -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 +152 -144
- package/dist/skills/ads-designer/references/accessibility.md +14 -11
- package/dist/skills/ads-designer/references/atomic-styles.md +4 -4
- package/dist/skills/ads-designer/references/behaviors.md +34 -30
- package/dist/skills/ads-designer/references/branding.md +98 -10
- package/dist/skills/ads-designer/references/captures.md +31 -31
- package/dist/skills/ads-designer/references/cli.md +21 -20
- package/dist/skills/ads-designer/references/contracts.md +63 -29
- package/dist/skills/ads-designer/references/design-data.md +49 -52
- package/dist/skills/ads-designer/references/drafts.md +71 -52
- package/dist/skills/ads-designer/references/evidence.md +1 -5
- package/dist/skills/ads-designer/references/guarded-editing.md +58 -51
- 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/review.md +42 -38
- package/dist/skills/ads-designer/references/runtimes.md +33 -30
- package/dist/skills/ads-designer/references/scenarios.md +17 -19
- 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 -71
- package/dist/skills/ads-designer/references/workflows.md +19 -37
- package/dist/skills/ads-import/SKILL.md +43 -328
- package/dist/skills/ads-import/references/atomic-styles.md +4 -4
- package/dist/skills/ads-import/references/behaviors.md +34 -30
- package/dist/skills/ads-import/references/branding.md +5 -5
- package/dist/skills/ads-import/references/captures.md +31 -31
- package/dist/skills/ads-import/references/cli.md +21 -20
- package/dist/skills/ads-import/references/compatibility.md +1 -1
- package/dist/skills/ads-import/references/contracts.md +63 -29
- package/dist/skills/ads-import/references/design-data.md +49 -52
- package/dist/skills/ads-import/references/drafts.md +71 -52
- package/dist/skills/ads-import/references/evidence.md +1 -5
- package/dist/skills/ads-import/references/guarded-editing.md +58 -51
- 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 +42 -38
- package/dist/skills/ads-import/references/runtimes.md +33 -30
- package/dist/skills/ads-import/references/scenarios.md +17 -19
- package/dist/skills/ads-import/references/tokens.md +3 -3
- package/dist/skills/ads-import/references/validation.md +83 -71
- package/dist/skills/ads-import/references/workflows.md +19 -37
- 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 +54 -346
- package/dist/skills/ads-port/references/atomic-styles.md +4 -4
- package/dist/skills/ads-port/references/behaviors.md +34 -30
- package/dist/skills/ads-port/references/captures.md +31 -31
- package/dist/skills/ads-port/references/cli.md +21 -20
- package/dist/skills/ads-port/references/contracts.md +63 -29
- package/dist/skills/ads-port/references/design-data.md +49 -52
- package/dist/skills/ads-port/references/drafts.md +71 -52
- package/dist/skills/ads-port/references/evidence.md +1 -5
- package/dist/skills/ads-port/references/guarded-editing.md +58 -51
- 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 +8 -7
- package/dist/skills/ads-port/references/review.md +42 -38
- package/dist/skills/ads-port/references/runtimes.md +33 -30
- package/dist/skills/ads-port/references/scenarios.md +17 -19
- package/dist/skills/ads-port/references/validation.md +83 -71
- package/dist/skills/ads-port/references/workflows.md +19 -37
- package/dist/source-symbols.mjs +1 -8
- package/dist/source-values.mjs +266 -128
- 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 +24 -19
- 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 +54 -52
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.exports.ts +1 -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/Icon/Icon.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.exports.ts +1 -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/controllers/Palette/Palette.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/index.ts +5 -8
- 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/Search/SearchBar/SearchBar.ads.exports.ts +1 -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 -0
- 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 -0
- 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/styles.css +1 -0
- 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 +24 -19
- 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 +73 -27
- package/dist/task-cache.mjs +173 -72
- package/dist/task-worker.mjs +22 -11
- package/dist/test-boundaries.mjs +133 -60
- package/dist/themes-generated.mjs +1 -1
- package/dist/themes-watch.mjs +60 -19
- 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 +270 -89
- package/dist/units.mjs +215 -180
- package/dist/usage.mjs +138 -38
- package/dist/validation-checks.mjs +121 -38
- package/dist/validation-inputs.mjs +187 -78
- package/dist/validation.mjs +268 -102
- package/dist/verification/browser.mjs +27 -5
- package/dist/verification.mjs +711 -187
- package/docs/ADS.md +100 -89
- package/docs/ARCHITECTURE.md +353 -159
- package/docs/BEHAVIORS.md +33 -28
- package/docs/CACHING.md +55 -11
- package/docs/CHANGELOG.md +358 -17
- package/docs/COMPARISON.md +1 -1
- package/docs/CONTRACTS.md +22 -29
- package/docs/DESIGN-REFERENCES.md +40 -0
- package/docs/GUIDE.md +313 -292
- package/docs/MCP.md +261 -439
- package/docs/SPATIAL-CHECKS.md +69 -0
- package/docs/benchmarks/README.md +39 -0
- package/package.json +42 -34
- package/dist/browser-audit.mjs +0 -424
- package/dist/contract-migration.mjs +0 -110
- package/dist/create.mjs +0 -48
- package/dist/lint-config.mjs +0 -48
- package/dist/mcp/draft-exports.mjs +0 -40
- package/dist/mcp/edit-preparation.mjs +0 -115
- 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 -88
- 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 -415
- 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 -411
- package/dist/skills/ads-break-ui/references/captures.md +0 -160
- package/dist/skills/ads-break-ui/references/contracts.md +0 -284
- package/dist/skills/ads-break-ui/references/design-data.md +0 -354
- package/dist/skills/ads-break-ui/references/drafts.md +0 -178
- package/dist/skills/ads-break-ui/references/evidence.md +0 -128
- package/dist/skills/ads-break-ui/references/guarded-editing.md +0 -154
- 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 -96
- 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 -162
- package/dist/skills/ads-break-ui/references/verification.md +0 -58
- package/dist/skills/ads-break-ui/references/workflows.md +0 -83
- 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 -388
- 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 -411
- package/dist/skills/ads-motion/references/captures.md +0 -160
- package/dist/skills/ads-motion/references/contracts.md +0 -284
- package/dist/skills/ads-motion/references/design-data.md +0 -354
- package/dist/skills/ads-motion/references/drafts.md +0 -178
- package/dist/skills/ads-motion/references/evidence.md +0 -128
- package/dist/skills/ads-motion/references/guarded-editing.md +0 -154
- 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 -96
- 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 -162
- package/dist/skills/ads-motion/references/verification.md +0 -39
- package/dist/skills/ads-motion/references/workflows.md +0 -83
- package/dist/skills/ads-port/references/reporting.md +0 -101
- 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.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.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.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.tsx +0 -18
- package/dist/starters/react/design-system/review/index.ts +0 -5
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
- 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,284 +0,0 @@
|
|
|
1
|
-
# Static owner contracts and development files
|
|
2
|
-
|
|
3
|
-
Use one optional `<Owner>.ads.contract.ts` for constrained
|
|
4
|
-
paint inputs, scoped runtime bindings, declarative parts and behavioral checks.
|
|
5
|
-
The import `import type { UnitContract } from "@reqvire-org/ads/contracts"` supplies
|
|
6
|
-
development typing. ADS reads its AST and resolves real symbols without importing
|
|
7
|
-
or executing project modules. It adds no production runtime.
|
|
8
|
-
|
|
9
|
-
## Files and ownership
|
|
10
|
-
|
|
11
|
-
```text
|
|
12
|
-
components/Plot/
|
|
13
|
-
Plot.tsx production API/root
|
|
14
|
-
Series.tsx production declarative API
|
|
15
|
-
renderer.tsx production consumer
|
|
16
|
-
paints.ts production binding producer
|
|
17
|
-
types.ts production prop types
|
|
18
|
-
Plot.ads.contract.ts static tool declaration
|
|
19
|
-
Plot.ads.scenario.tsx demonstration
|
|
20
|
-
Plot.ads.fixture.ts demonstration data
|
|
21
|
-
Plot.ads.behavior.spec.ts registered browser checks
|
|
22
|
-
Plot.ads.test.tsx optional unit tests
|
|
23
|
-
Plot.ads.helpers.ts development-only adapters
|
|
24
|
-
README.md API/provenance
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
This is an example, not a required inventory. Use the same roles for patterns,
|
|
28
|
-
controllers and relevant development owners. `review/` remains a separate
|
|
29
|
-
shared development layer; its implementation filenames need no extra marker.
|
|
30
|
-
Runtime components, types and styles cannot import `.ads.` files, tests, fixtures
|
|
31
|
-
or review code through aliases, barrels or helpers. Unknown `.ads.` roles are
|
|
32
|
-
still development-only and are diagnosed. Fixtures/helpers cannot define styles;
|
|
33
|
-
put demo framing in review. Ordinary README/license files retain their names.
|
|
34
|
-
|
|
35
|
-
Scenarios/fixtures/review enter only the selected preview closure. Contracts are
|
|
36
|
-
never executable preview modules; derived audit descriptors are data. Specs run
|
|
37
|
-
only in the configured test runner. Production declaration emission must also
|
|
38
|
-
start from the public runtime entry, rather than include every file under the
|
|
39
|
-
design-system folder. The starter’s `tsconfig.build.json` does this; its normal
|
|
40
|
-
no-emit typecheck still checks development sources. Core import guards protect
|
|
41
|
-
the runtime dependency closure. Review custom emitter configurations through
|
|
42
|
-
the configuration owner before migrating a consuming project. Guards remain tooling. Production prop types
|
|
43
|
-
belong in runtime files, never inferred from a development contract.
|
|
44
|
-
|
|
45
|
-
## A contract uses actual implementation references
|
|
46
|
-
|
|
47
|
-
```ts
|
|
48
|
-
import type { UnitContract } from "@reqvire-org/ads/contracts";
|
|
49
|
-
import { Plot } from "./Plot";
|
|
50
|
-
import { Series } from "./Series";
|
|
51
|
-
import { Renderer } from "./renderer";
|
|
52
|
-
import { paints } from "./paints";
|
|
53
|
-
|
|
54
|
-
export default {
|
|
55
|
-
schemaVersion: 1,
|
|
56
|
-
paintInputs: [
|
|
57
|
-
{ api: Plot, property: "config.*.paint", kind: "paint-reference" },
|
|
58
|
-
{ api: Series, property: "fill", kind: "paint-reference", bindings: ["items"] },
|
|
59
|
-
],
|
|
60
|
-
bindings: {
|
|
61
|
-
items: {
|
|
62
|
-
input: { api: Plot, property: "config" },
|
|
63
|
-
producer: paints,
|
|
64
|
-
valueFrom: "paint",
|
|
65
|
-
variable: "--plot-runtime-${key}",
|
|
66
|
-
scope: { api: Plot, selector: '[data-plot-root=""]' },
|
|
67
|
-
checks: ["isolation"],
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
declarativeParts: [
|
|
71
|
-
{ api: Series, parent: Plot, consumer: Renderer, checks: ["isolation"] },
|
|
72
|
-
],
|
|
73
|
-
behavior: {
|
|
74
|
-
subjects: { plot: { api: Plot }, renderer: { implementation: Renderer, role: "implementation" } },
|
|
75
|
-
guarantees: [{
|
|
76
|
-
id: "scoped-output",
|
|
77
|
-
description: "Changing either instance updates only its own output.",
|
|
78
|
-
subjects: ["plot", "renderer"], checks: ["isolation"],
|
|
79
|
-
}],
|
|
80
|
-
checks: {
|
|
81
|
-
isolation: {
|
|
82
|
-
file: "./Plot.ads.behavior.spec.ts", case: "isolation",
|
|
83
|
-
scenario: "components/Plot", profile: "widget",
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
} satisfies UnitContract;
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Keep contracts small; most owners need none or one section. Supported data are
|
|
91
|
-
literal objects/arrays, static constants/spreads, `as const` and `satisfies`.
|
|
92
|
-
Symbol references resolve through normal imports, aliases and re-exports.
|
|
93
|
-
Calls, getters, methods, computed metadata and environment-dependent expressions
|
|
94
|
-
are rejected. Function references are opaque identities, never executed.
|
|
95
|
-
Private implementation subjects may be internal module exports without becoming
|
|
96
|
-
public barrel exports. Private subjects default to the existing headless controller
|
|
97
|
-
contract. Use `role: "controller"` explicitly for behavior-only code, or
|
|
98
|
-
`role: "implementation"` for a private visual renderer or binding producer whose
|
|
99
|
-
guarantees should be tracked without classifying it as a controller. Shared
|
|
100
|
-
`controllers/` source always remains headless. An implementation role retains
|
|
101
|
-
normal ownership, dependency, styling and development boundaries; it is not a
|
|
102
|
-
style exception. Producers/consumers must belong to the same owner. Required
|
|
103
|
-
checks must exist, back named guarantees and use a browser profile with the
|
|
104
|
-
corresponding scenario. A relationship is registration, not a passing guarantee.
|
|
105
|
-
|
|
106
|
-
## Typed paints and runtime bindings
|
|
107
|
-
|
|
108
|
-
Production-facing types can use:
|
|
109
|
-
|
|
110
|
-
```ts
|
|
111
|
-
export type Paint = `var(--${string})` | `url(#${string})` | "none" | "currentColor";
|
|
112
|
-
export interface SeriesProps { fill?: Paint }
|
|
113
|
-
export type Config = Readonly<Record<string, { paint: Paint }>>;
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
ADS follows the actual property path/type, including nested maps. A name such as
|
|
117
|
-
`Paint`, an arbitrary `string`, `any` or a forged metadata role grants no waiver.
|
|
118
|
-
Supported references are a single accessible token/binding `var(--name)`, a local
|
|
119
|
-
SVG paint `url(#id)`, `none` or `currentColor`. Fallbacks, raw colours, external
|
|
120
|
-
URLs and arbitrary CSS are outside this role. Raw domain colours need a separately
|
|
121
|
-
reviewed validated input boundary; they are not implicitly supported here.
|
|
122
|
-
|
|
123
|
-
A runtime family is instance data, not an infinite design-token inventory. Its
|
|
124
|
-
source proof requires the declared config map, exact key/value mapping and actual
|
|
125
|
-
root attachment. Supported producers use `Object.entries(config)` with a loop,
|
|
126
|
-
or `Object.fromEntries(...map(...))`; same-owner helper returns are traceable.
|
|
127
|
-
Guard each key before the write/return using
|
|
128
|
-
`if (!/^[A-Za-z0-9_-]+$/.test(key)) throw new Error("Invalid key")` (a loop may
|
|
129
|
-
`continue`). Return only the computed map. For example:
|
|
130
|
-
|
|
131
|
-
```ts
|
|
132
|
-
export function paints(config: Config) {
|
|
133
|
-
const result: Record<string, string> = {};
|
|
134
|
-
for (const [key, entry] of Object.entries(config)) {
|
|
135
|
-
if (!/^[A-Za-z0-9_-]+$/.test(key)) throw new Error("Invalid key");
|
|
136
|
-
result[`--plot-runtime-${key}`] = entry.paint;
|
|
137
|
-
}
|
|
138
|
-
return result;
|
|
139
|
-
}
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
The runtime root attaches that returned map using `style={paints(config)}` or a
|
|
143
|
-
traceable local/useMemo result and the declared class/exact data attribute.
|
|
144
|
-
Place spreading props before the explicit scope/style so an unknown spread
|
|
145
|
-
cannot replace them. This grants permission to that binding attachment only;
|
|
146
|
-
it does not authorize arbitrary inline styling, CSSProperties APIs or bulk writes.
|
|
147
|
-
Unsupported dynamic producers/attachment paths fail with an analysis diagnostic.
|
|
148
|
-
Keep the implementation project-owned; there is no required ADS binding helper.
|
|
149
|
-
|
|
150
|
-
A producer with alternative/derived sources declares each entry path, for example:
|
|
151
|
-
|
|
152
|
-
```ts
|
|
153
|
-
valueFrom: ["paint", "scheme.day", "scheme.night"],
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
Register each matching `config.*.<path>` in `paintInputs`. The producer may write
|
|
157
|
-
one declared field, or a per-theme value built with the generated helpers from
|
|
158
|
-
`tokens/themes.generated.ts`: `themed({ light: entry.scheme.day, dark: entry.scheme.night })`
|
|
159
|
-
(keys exactly the declared themes) or `themedByScheme({ light: …, dark: … })` (each theme
|
|
160
|
-
takes the value for its color scheme). Every value is a declared field and the argument is
|
|
161
|
-
an object literal without spreads. The normal key/map/root proof still applies. Raw
|
|
162
|
-
constants, undeclared fields, `light-dark()`, extra writes and unknown transforms are
|
|
163
|
-
rejected. The browser audit checks an accessible color reference in every theme's branch;
|
|
164
|
-
a local SVG URL or `none` is not a color there.
|
|
165
|
-
|
|
166
|
-
Families cannot overlap shared tokens, private runtime
|
|
167
|
-
prefixes or other bindings. A broad family such as `--color-${key}` grants no
|
|
168
|
-
shared-token exception. Use a distinct private family where collision freedom
|
|
169
|
-
cannot be established. Registered paint consumers list their allowed binding IDs;
|
|
170
|
-
borrowing a peer's binding family or private runtime variable remains invalid. Bindings are scoped
|
|
171
|
-
to their actual root; portals outside it need deliberate project integration.
|
|
172
|
-
|
|
173
|
-
A registered binding producer gives a per-theme value with `themed()` or
|
|
174
|
-
`themedByScheme()`; its output is `var(--ads-if-<theme>, <reference>)` once per declared
|
|
175
|
-
theme, in declared order. The App paint audit checks every branch and its observed effect
|
|
176
|
-
in the active theme. Raw colors, undefined tokens and SVG URLs in a branch remain invalid.
|
|
177
|
-
This derived binding form does not widen public paint-input types; use constrained
|
|
178
|
-
references for each theme input and verify every theme in browser checks.
|
|
179
|
-
|
|
180
|
-
The App audit checks current mounted instances, accessible values, local SVG
|
|
181
|
-
resources and computed paint-property responses. Visibility and complete rendered
|
|
182
|
-
output still need assertions in the registered browser checks. It rejects missing/duplicate IDs and reports unobserved written values separately. It is bounded to 100 families, 20 instances per family, 100 keys
|
|
183
|
-
and 1000 elements per instance. Exceeding a budget reports limits and complete: false; it does not invalidate a
|
|
184
|
-
working component. An unobserved paint effect also remains unverified until its
|
|
185
|
-
relevant consumer/state is checked. It does
|
|
186
|
-
not prove every future input, visibility state or interaction. In registered
|
|
187
|
-
Playwright checks, use `auditBehaviorPaints(frame)` from
|
|
188
|
-
`@reqvire-org/ads/verification` after updates. Assert `result.ok` and, when claiming complete current-map
|
|
189
|
-
evidence, `result.complete` and the expected `verified` entries.
|
|
190
|
-
Exercise two instances with identical keys/different paints, key updates/removal,
|
|
191
|
-
themes, local SVG IDs and invalid/inaccessible references. Keep normal runner
|
|
192
|
-
profiles; React StrictMode still needs a project development harness.
|
|
193
|
-
|
|
194
|
-
## Rendered and declarative evidence
|
|
195
|
-
|
|
196
|
-
`covers` names rendered public UI. A null-returning declarative part belongs in
|
|
197
|
-
`exercises`, alongside behavioral APIs:
|
|
198
|
-
|
|
199
|
-
```tsx
|
|
200
|
-
export const scenario = {
|
|
201
|
-
title: "Plot", covers: ["Plot"], exercises: ["Series"],
|
|
202
|
-
};
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
A part may register several distinct parents; each API/parent pair has one
|
|
206
|
-
consumer/check declaration. A parent may itself be a registered declarative part.
|
|
207
|
-
The graph must be acyclic and every parent chain must reach a public rendering
|
|
208
|
-
root. Duplicate pairs, cycles and detached part graphs fail.
|
|
209
|
-
|
|
210
|
-
For example, `Entry` can belong to `FirstView` and `SecondView`, while `Detail`
|
|
211
|
-
belongs to `Entry`. The scenario covers the rendering roots and exercises both
|
|
212
|
-
`Entry` and `Detail`. A nested `Detail` outside its registered parent does not count.
|
|
213
|
-
|
|
214
|
-
The real part must reach its registered consumer through a rendering parent.
|
|
215
|
-
ADS resolves source identity comparisons (`child.type === Series`, including a
|
|
216
|
-
traceable comparison helper) and reads of that same child’s props traced from the consumer’s children input.
|
|
217
|
-
Traceable paths include local recursive fragment flattening, `find`/`filter`,
|
|
218
|
-
callback aliases and props carried through local records. Reusing a review layout
|
|
219
|
-
inside another instance of itself is ordinary component composition, not a
|
|
220
|
-
recursive helper call. Source sites/work limits still bound analysis.
|
|
221
|
-
|
|
222
|
-
`exercises` establishes reachable behavioral use, including a conditional state
|
|
223
|
-
and mapped literal fixture data; it does not promise unconditional initial DOM.
|
|
224
|
-
Always-false branches, unused adapters, empty/unknown fixture maps and broken
|
|
225
|
-
parent chains grant no credit. `covers` retains its rendering contract. Required
|
|
226
|
-
browser checks cover a rendering root and exercise the relevant parent/child
|
|
227
|
-
chain, then verify adding/removing/updating the part changes actual output.
|
|
228
|
-
|
|
229
|
-
A comparison against a decoy object gives no evidence. An import, unrelated parent, unused
|
|
230
|
-
child or metadata claim gives no consumption credit. Unknown render branches are
|
|
231
|
-
conservative. Browser checks must verify that adding/removing/changing the part
|
|
232
|
-
changes output. Source relationships and current browser evidence are separate.
|
|
233
|
-
Do not add fake DOM, hide public parts or rewrite a valid API to appease tracing.
|
|
234
|
-
|
|
235
|
-
Scenario metadata is validated by field/entry with positions and reasons.
|
|
236
|
-
A bad entry still blocks acceptance while valid independent render evidence is
|
|
237
|
-
retained. Unreadable prerequisites report coverage as not established. Inspect
|
|
238
|
-
the exact source diagnostic and bounded results; do not assume every subsequent
|
|
239
|
-
missing preview means its runtime API is invalid.
|
|
240
|
-
|
|
241
|
-
## Shared Data and project consistency
|
|
242
|
-
|
|
243
|
-
Data has one shared design vocabulary in the configured token foundation. There
|
|
244
|
-
is no owner-contract token namespace or private value stylesheet. Components map
|
|
245
|
-
shared values into `--ds-*`; patterns use `--ux-*`. Static literals cannot bypass
|
|
246
|
-
this boundary through aliases, fallbacks, themes or helper/import interpolation.
|
|
247
|
-
Shared token samples belong under the token directory. See
|
|
248
|
-
[shared Data and component mappings](design-data.md).
|
|
249
|
-
|
|
250
|
-
`inspectTokenOrigins(inventory, name, {stopAt: names})` remains available for
|
|
251
|
-
project-specific audits of shared alias relationships. It supplements mandatory
|
|
252
|
-
core source checks and does not enable independent local values.
|
|
253
|
-
|
|
254
|
-
## Migration and MCP editing
|
|
255
|
-
|
|
256
|
-
Use the static owner contract for new registrations. Competing declarations fail.
|
|
257
|
-
Contracts participate in discovery, ownership, source revisions, affected-check
|
|
258
|
-
selection and candidate gates. `ads_units` exposes `contractFile`; `ads_catalog`
|
|
259
|
-
reports constrained paint paths and declarative parent/consumer/check references.
|
|
260
|
-
Use bounded file reads and paged detailed results, not repeated whole-project dumps.
|
|
261
|
-
|
|
262
|
-
Install supporting ADS tooling before migrating a consuming project and reconnect
|
|
263
|
-
MCP before replacing a package used by a running server. Then:
|
|
264
|
-
|
|
265
|
-
1. Discover one owner with `ads_units`.
|
|
266
|
-
2. `ads_prepare_patch({ unit, action: "migrate" })` creates a normal local draft.
|
|
267
|
-
3. Review the converted contract, renamed files/imports and migration notes.
|
|
268
|
-
4. `ads_prepare_patch({ unit, action: "diff", draft })` emits its Git patchFile.
|
|
269
|
-
5. Dry-run/apply with `ads_apply_patch`, or a genuinely coupled transaction.
|
|
270
|
-
|
|
271
|
-
Migration never edits live source or bypasses gates. It retains stable scenario
|
|
272
|
-
IDs, check case IDs and directory ownership. A canonical `<Owner>.ads.scenario.tsx` is the same
|
|
273
|
-
development entry as `Scenario.tsx`, even without a production entry or owner
|
|
274
|
-
contract. Explicit flat IDs and existing flat peer families remain separate.
|
|
275
|
-
An optional static `scenario.id` preserves a legacy
|
|
276
|
-
identity when a renamed filename would otherwise be ambiguous; it must stay
|
|
277
|
-
inside the owning unit and be unique. Whole-file or unimportable private behavior subjects stay
|
|
278
|
-
in legacy registration with a note until deliberately resolved. Unknown runner
|
|
279
|
-
globs, custom adapters and documentation references require review. Ambiguous
|
|
280
|
-
flat-to-directory renames stay in the legacy form with a migration note so file
|
|
281
|
-
ownership cannot silently change. Preserve
|
|
282
|
-
licenses, pending drafts and unrelated work; keep transactions within their limits.
|
|
283
|
-
There is no alternate JSON contract editor. Do not loosen a guard or make a valid
|
|
284
|
-
API private merely to complete a migration.
|
|
@@ -1,354 +0,0 @@
|
|
|
1
|
-
# Shared Data, component mappings and design consistency
|
|
2
|
-
|
|
3
|
-
ADS has three cooperating responsibilities: Data supplies one shared design
|
|
4
|
-
vocabulary; UX owns structure, behavior and accessibility; Skin maps Data to
|
|
5
|
-
states and variants. Components own their implementation, not separate design
|
|
6
|
-
systems. Project values and themes remain project-owned.
|
|
7
|
-
|
|
8
|
-
## One design catalogue
|
|
9
|
-
|
|
10
|
-
Define static design values, semantic roles, formulas and themes in the configured
|
|
11
|
-
shared token foundation: colors, typography, spacing and elevation. Reuse existing
|
|
12
|
-
roles before introducing another token. A new value is a visible project design
|
|
13
|
-
decision. Do not copy every imported library constant into another name merely to
|
|
14
|
-
satisfy a guard. Existing project font, text, spacing and other semantic roles
|
|
15
|
-
take precedence over divergent upstream constants. Preserve the capability and
|
|
16
|
-
interaction contract, then document deliberate visual differences from the
|
|
17
|
-
migration reference. Do not add a private or duplicate role to recover an
|
|
18
|
-
upstream font or size that project policy intentionally replaces.
|
|
19
|
-
|
|
20
|
-
Porting should converge on the destination's visual language. Different upstream
|
|
21
|
-
dependencies do not justify separate scales or duplicate roles. Consolidate
|
|
22
|
-
equivalent roles introduced by the selected port, update their consumers and
|
|
23
|
-
samples, and remove obsolete source sheets when unused. Compare semantics,
|
|
24
|
-
themes, states and actual use before merging; equal numbers alone are not enough.
|
|
25
|
-
For an empty destination, establish a coherent initial vocabulary across the
|
|
26
|
-
selected scope. Exact upstream pixels are not a default acceptance requirement.
|
|
27
|
-
Document intentional adaptations and verify consistency with existing UI while
|
|
28
|
-
preserving required behavior. Unrelated cleanup or removal of an existing public
|
|
29
|
-
token needs its own scope/compatibility decision.
|
|
30
|
-
|
|
31
|
-
There are no owner-local token namespaces, token manifests, component token value
|
|
32
|
-
sheets or `tokens` sections in owner contracts. Token previews and their fixtures
|
|
33
|
-
belong under the shared token directory. The public contract remains about shared
|
|
34
|
-
names, meanings, types and alias relationships; ADS supplies no hardcoded palette,
|
|
35
|
-
spacing grid or component catalogue.
|
|
36
|
-
|
|
37
|
-
## Component variables are mappings and runtime mechanics
|
|
38
|
-
|
|
39
|
-
`--ds-*` belongs to component implementations, `--ux-*` to patterns and review
|
|
40
|
-
presentation, and `--showcase-*` to development scaffolding. They are not additional
|
|
41
|
-
token vocabularies. State styling remains owned by the control. Documented non-state
|
|
42
|
-
customization hooks keep their narrow registration and ownership rules.
|
|
43
|
-
|
|
44
|
-
```css
|
|
45
|
-
/* In component Linaria: map project Data into a state. */
|
|
46
|
-
--ds-control-bg: var(--accent);
|
|
47
|
-
--ds-control-hover-bg: var(--accent-hover);
|
|
48
|
-
--ds-control-gap: var(--space-4);
|
|
49
|
-
--ds-control-font: var(--font-sans);
|
|
50
|
-
|
|
51
|
-
/* Rejected: private design values, even behind aliases or fallbacks. */
|
|
52
|
-
--ds-control-gap: 7px;
|
|
53
|
-
--ds-control-bg: red;
|
|
54
|
-
--ds-control-gap: var(--space-4, 7px);
|
|
55
|
-
--ds-control-font: Arial;
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Styles and static interpolations from imports/helpers obey the same source rule.
|
|
59
|
-
Unknown interpolation is not proof of a valid design source. Typography/layering
|
|
60
|
-
roles follow variable references to their actual consuming properties; a different
|
|
61
|
-
variable name cannot conceal an independent font, weight or stacking level.
|
|
62
|
-
|
|
63
|
-
Zero, structural unitless geometry, percentages, grid fractions, responsive
|
|
64
|
-
viewport/container relationships and structural angles retain their existing use.
|
|
65
|
-
Measured instance geometry still uses exact, documented style-write boundaries;
|
|
66
|
-
those boundaries do not authorize another static design palette. Typed per-instance
|
|
67
|
-
paint bindings retain their provenance and browser checks. Inputs select shared
|
|
68
|
-
paints or local SVG resources, rather than supplying arbitrary visual strings.
|
|
69
|
-
|
|
70
|
-
A calculation containing a raw design length/color is still rejected. Structural
|
|
71
|
-
calculations using shared values can remain valid; static analysis cannot prove
|
|
72
|
-
whether a dimensionless factor represents real geometry or an invented scale.
|
|
73
|
-
Review that intent and do not disguise a new design decision as arithmetic.
|
|
74
|
-
|
|
75
|
-
## Review overlap without deleting legitimate roles
|
|
76
|
-
|
|
77
|
-
`token-overlap-review` is a nonblocking review item for shared tokens with identical
|
|
78
|
-
normalized definitions across their declared theme/condition scopes. It identifies
|
|
79
|
-
the tokens and source. Inspect their consumers and roles. If one decision is being
|
|
80
|
-
copied, reuse one shared token or make its relationship explicit with an alias.
|
|
81
|
-
Equal values alone do not prove equal purpose: body text and strong text, spacing
|
|
82
|
-
and control sizes, or two motion roles may intentionally differ later. A light-only
|
|
83
|
-
match does not justify merging tokens whose dark/reduced-motion values differ.
|
|
84
|
-
|
|
85
|
-
For existing workspaces, convert independent component constants explicitly:
|
|
86
|
-
select an existing shared role when it means the same thing; centralize genuinely
|
|
87
|
-
missing decisions; remove private sheets/imports and contract fields; update token
|
|
88
|
-
sample coverage in the shared directory. Preserve themes, units, public APIs and
|
|
89
|
-
behavior unless changing the visual policy was explicitly intended. Review a Git
|
|
90
|
-
diff and run core, project and browser checks. There is no compatibility mode that
|
|
91
|
-
keeps independent component token definitions valid.
|
|
92
|
-
|
|
93
|
-
## Accessibility and rhythm checks
|
|
94
|
-
|
|
95
|
-
`ads check` checks token values in every theme and brand. Each finding below is an error unless marked info:
|
|
96
|
-
|
|
97
|
-
- `token-contrast`: the roles that meet on screen fall below WCAG 2.2 AA: `--text-strong`,
|
|
98
|
-
`--text-body`, `--text-muted`, `--text-link` and `--accent-text` on `--bg-canvas`,
|
|
99
|
-
`--bg-surface` and `--bg-hover`; `--accent-fg` on `--accent` and `--accent-hover`; each
|
|
100
|
-
status's `-fg` on its solid and `-text` on its `-bg` (4.5:1); `--border-focus` and
|
|
101
|
-
`--border-strong` on the canvas and surface (3:1). Fix it by choosing a different ramp
|
|
102
|
-
step for the role, in the theme the message names, never with a one-off color.
|
|
103
|
-
Any CSS color is evaluated (hex, named, `rgb()`, `hsl()`, `hwb()`, `lab()`, `lch()`,
|
|
104
|
-
`oklab()`, `oklch()`, `color()`, `color-mix()`, `light-dark()`), through halves and
|
|
105
|
-
aliases. A translucent background counts as composited over `--bg-canvas`, a translucent
|
|
106
|
-
foreground as composited over its background.
|
|
107
|
-
- `token-contrast-unresolved` (info): a pair color ADS cannot resolve statically
|
|
108
|
-
(`currentColor`, relative color syntax, a system color), so that pair is not checked. Give
|
|
109
|
-
the role a color or a ramp step, or check the pages that use it with `ads audit`.
|
|
110
|
-
- `token-rhythm`: a numbered spacing step leaves the scale `--space-N` = N × 2 px.
|
|
111
|
-
- `control-padding`: pad a control with the token for its size. A block sized with
|
|
112
|
-
`--control-height-<size>` pads its sides with `--control-padding-<size>`; the small gap
|
|
113
|
-
inside a track (segmented control, switch) uses `--control-inset` (add it to the spacing
|
|
114
|
-
tokens if the project has none). Anything that is not a control does not use
|
|
115
|
-
`--control-height-*`.
|
|
116
|
-
|
|
117
|
-
`token-overlap-review` (review) compares values only within a token family (`--radius-*`
|
|
118
|
-
with `--radius-*`): a radius equal to a spacing step is two scales meeting, not a duplicate.
|
|
119
|
-
|
|
120
|
-
## Exchange format
|
|
121
|
-
|
|
122
|
-
`ads tokens --format dtcg` prints the tokens as W3C Design Tokens (Community Group draft)
|
|
123
|
-
JSON: groups by family, typed `$value`s, `{group.token}` references for `var()` aliases.
|
|
124
|
-
Values the format cannot express (fluid `clamp()` sizes, layered shadows) keep their CSS in
|
|
125
|
-
`$extensions["org.reqvire.ads"].css`; other themes' values are in
|
|
126
|
-
`$extensions["org.reqvire.ads"].scopes`.
|
|
127
|
-
|
|
128
|
-
## Grid
|
|
129
|
-
|
|
130
|
-
The `--grid-*` tokens describe a column grid: `--grid-columns-sm/md/lg` (the starter's 4, 8
|
|
131
|
-
and 16), `--grid-gutter`, `--grid-gutter-narrow`, `--grid-gutter-condensed` and
|
|
132
|
-
`--grid-margin-sm/md/lg`, aliasing spacing steps. The starter's `Grid` switches columns by
|
|
133
|
-
container width (768 and 1024 px) with container queries, since CSS variables cannot be
|
|
134
|
-
breakpoints. The showcase's grid overlay draws these tokens over every preview at the same
|
|
135
|
-
widths; a project without them shows no overlay. Align text to a cell's edge, not its gutter.
|
|
136
|
-
|
|
137
|
-
### Widths are fluid on the grid
|
|
138
|
-
|
|
139
|
-
`--grid-span-1` to `--grid-span-16` are widths of N of 16 columns, fluid in their container.
|
|
140
|
-
Set one inside a container query, under a `Grid` or another `container-type: inline-size`
|
|
141
|
-
ancestor, and leave narrow containers at full width:
|
|
142
|
-
|
|
143
|
-
```css
|
|
144
|
-
inline-size: 100%;
|
|
145
|
-
@container (min-width: 1024px) { max-inline-size: var(--grid-span-10); }
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Atomic CSS does not keep rule order, so two queries on one property need exclusive ranges:
|
|
149
|
-
|
|
150
|
-
```css
|
|
151
|
-
@container (min-width: 768px) and (max-width: 1023.98px) { max-inline-size: var(--grid-span-12); }
|
|
152
|
-
@container (min-width: 1024px) { max-inline-size: var(--grid-span-10); }
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
Use `%` or `fr` for a share of the parent and a `ch` measure for running text
|
|
156
|
-
(`max-inline-size: 65ch`).
|
|
157
|
-
|
|
158
|
-
`layout-fixed-width` is an error for `width`, `min-width`, the logical inline sizes, `flex-basis`,
|
|
159
|
-
`flex`'s basis and `grid-template-columns` tracks that cannot shrink below 96 px, in any unit, raw,
|
|
160
|
-
through a token or by arithmetic. `max-width` and `max-inline-size` are not read: a maximum cannot
|
|
161
|
-
force overflow, so cap with them freely.
|
|
162
|
-
|
|
163
|
-
When it fires, pick the fix by what the element is:
|
|
164
|
-
|
|
165
|
-
| The element | Do |
|
|
166
|
-
|---|---|
|
|
167
|
-
| A small part: an icon, control, handle or thumbnail | Size it at 96 px or less, plainly: `width: 64px`, `width: var(--control-height-lg)` |
|
|
168
|
-
| A panel, column or anything that can give way | `width: min(100%, 280px)`, `flex: 1 1 280px` or a `minmax(0, 280px)` track |
|
|
169
|
-
| A part that truly stays that wide | A token listed in `layout.widthTokens` in `ds.config.json`, used plainly: `width: var(--side-pane-width)` |
|
|
170
|
-
| A resizable part | A `clamp()` of three such tokens; a runtime variable needs a declared fallback: `clamp(var(--pane-min), var(--ux-pane, var(--pane)), var(--pane-max))` |
|
|
171
|
-
| An overlay: dialog, menu, popover, tooltip | Its owner in `layout.fixedWidthUnits`, by unit id or file glob |
|
|
172
|
-
|
|
173
|
-
These do not fix it:
|
|
174
|
-
|
|
175
|
-
- Another unit. `32.5ch`, `20em` and `20rem` are as fixed as `280px`, and depend on the font too.
|
|
176
|
-
`ch` and `em` are measured at the rule's `font-size`, or 16 px.
|
|
177
|
-
- `max(100%, 280px)`, `clamp(200px, 50%, 400px)`, `calc(100% + 200px)`: they cannot shrink below
|
|
178
|
-
their fixed part.
|
|
179
|
-
- `min(100%, 64px)` around a small part. `layout-width-noop` asks for the plain size; in a flex or
|
|
180
|
-
grid parent the percentage can affect wrapping, so compare the scenario after changing it.
|
|
181
|
-
- A token name. `--control-*`, `--side-pane-*` and every other name are read for their value.
|
|
182
|
-
|
|
183
|
-
`ads check` lists every declared fixed width for review (`layout-declared-width`). There is no
|
|
184
|
-
per-declaration exception.
|
|
185
|
-
|
|
186
|
-
`ads audit` opens each control with `aria-haspopup` and measures what opens, hovers and focuses
|
|
187
|
-
controls for contrast, and checks a control with `aria-busy="true"`. So give overlay triggers
|
|
188
|
-
`aria-haspopup`, or render the overlay open in its scenario, and render a busy example.
|
|
189
|
-
|
|
190
|
-
`layout-overflow` (`ads audit`) renders every UI scenario at 390, 768 and 1280 px and fails on
|
|
191
|
-
horizontal page overflow, elements past the viewport and clipped content. `overflow-x: auto`
|
|
192
|
-
scrollers and `text-overflow: ellipsis` are exempt. It also renders components and patterns in a
|
|
193
|
-
240 px container, and fails when a set width above 96 px overflows it. Make that width fluid, or
|
|
194
|
-
scroll it. Only an overlay's owner, listed in `layout.fixedWidthUnits`, stays out of this render.
|
|
195
|
-
|
|
196
|
-
## Color roles and states
|
|
197
|
-
|
|
198
|
-
Name roles by element and purpose, the same in every theme; only their values change. Point roles at ramp steps rather than raw colors, so a theme is a ramp swap:
|
|
199
|
-
|
|
200
|
-
- Layers: `--bg-canvas` → `--bg-surface` → `--bg-raised` (menus, popovers), with `--bg-field`
|
|
201
|
-
for inputs. In dark themes each layer up is one step lighter; in light themes surfaces stay
|
|
202
|
-
near white.
|
|
203
|
-
- States move along the ramp: hover one step, pressed or active two, selected a subtle accent
|
|
204
|
-
step (`--bg-selected`). Solid fills hover one step darker (`--accent-hover`).
|
|
205
|
-
- Disabled is always neutral (`--bg-disabled`, `--text-disabled`, `--border-disabled`) with no
|
|
206
|
-
hover or focus response; WCAG exempts it from contrast, so `token-contrast` skips it.
|
|
207
|
-
- `--bg-overlay` is the translucent scrim behind modals; `--bg-skeleton` fills loading
|
|
208
|
-
placeholders.
|
|
209
|
-
- Never signal state or status by color alone: pair it with text, an icon or a shape.
|
|
210
|
-
|
|
211
|
-
## Themes
|
|
212
|
-
|
|
213
|
-
Declare themes in `ds.config.json` (`themes: [{ name, scheme }]`, the first is the default;
|
|
214
|
-
`scheme` sets `color-scheme` for native controls and scrollbars).
|
|
215
|
-
|
|
216
|
-
Write a token that differs per theme as one half per theme, named with the theme as suffix,
|
|
217
|
-
on `:root`:
|
|
218
|
-
|
|
219
|
-
```css
|
|
220
|
-
:root {
|
|
221
|
-
--color-accent-9-light: oklch(55% .2 280);
|
|
222
|
-
--color-accent-9-dark: oklch(70% .16 280);
|
|
223
|
-
--bg-canvas-light: var(--slate-1-light);
|
|
224
|
-
--bg-canvas-dark: var(--slate-2-dark);
|
|
225
|
-
--accent: var(--color-accent-9);
|
|
226
|
-
}
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
- A half is a plain value or refers to halves: `--text-muted-dark: var(--slate-11-dark)`,
|
|
230
|
-
never `var(--slate-11)` (`theme-half-reference`).
|
|
231
|
-
- Give every themed token a half for every declared theme (`theme-coverage`). Tokens that do
|
|
232
|
-
not change per theme stay single values; a role that aliases a ramp step
|
|
233
|
-
(`--accent: var(--color-accent-9)`) needs no halves.
|
|
234
|
-
- Never set token values under `[data-theme]` or `prefers-color-scheme` (`theme-old-form`),
|
|
235
|
-
and never set a token both as one value and as halves (`theme-half-conflict`).
|
|
236
|
-
- ADS writes `tokens/themes.generated.css` from the halves and the declared themes and
|
|
237
|
-
brands: `ads assets` writes it, and the showcase and MCP server rewrite it whenever tokens
|
|
238
|
-
or `ds.config.json` change. Commit it, never edit it; it is the last foundation import.
|
|
239
|
-
After editing tokens without a running showcase, run `ads assets` (`themes-generated`
|
|
240
|
-
fails when it is stale).
|
|
241
|
-
- `data-theme="<name>"` on `<html>` themes the page; on any element it themes that section
|
|
242
|
-
and everything inside it, down to the next `data-theme`. A themed section paints its own
|
|
243
|
-
canvas and text (`base.css`).
|
|
244
|
-
- Add a theme for a real need: high contrast, a dimmed reading mode. Add a half for it to
|
|
245
|
-
every themed token. Check a theme in the showcase (the theme button steps through declared
|
|
246
|
-
themes) and capture it by name.
|
|
247
|
-
- Show content that belongs to one theme (a dark logo variant) with the generated display
|
|
248
|
-
switch: `display: var(--display-dark, block)`. It is `none` outside the nearest dark
|
|
249
|
-
theme. Never style by theme or brand with a selector (`[data-theme="dark"] &`,
|
|
250
|
-
`:root[data-brand] &`): it ignores the nearest section (`theme-selector`). Give per-theme
|
|
251
|
-
values as token halves instead.
|
|
252
|
-
- A per-theme value that comes from data at runtime (a chart series color, a highlighter
|
|
253
|
-
color) uses the generated helpers, never `light-dark()` (`theme-light-dark`):
|
|
254
|
-
`style={{ "--series": themed({ light: a, dark: b }) }}` with every declared theme as a key,
|
|
255
|
-
or `themedByScheme({ light: a, dark: b })` when the data has only light and dark (each
|
|
256
|
-
theme takes the value for its scheme). Values are complete colors.
|
|
257
|
-
- To follow the OS setting, set `"followSystemTheme": true` in `ds.config.json`: a page
|
|
258
|
-
without `data-theme` takes the first declared theme whose scheme matches
|
|
259
|
-
`prefers-color-scheme`. An explicit `data-theme` always wins. Letting the user choose and
|
|
260
|
-
remembering it is application code: it sets `data-theme`.
|
|
261
|
-
|
|
262
|
-
## Brands
|
|
263
|
-
|
|
264
|
-
A brand is a second axis beside the theme: the theme sets the color mode, the brand sets
|
|
265
|
-
identity (an accent ramp, a font). Use brands for white label (one product, each customer's
|
|
266
|
-
accent, font and logo, each in light and dark), a product family, or a co-branded partner
|
|
267
|
-
section; without them every combination becomes a theme (`acme-light`, `acme-dark`, …).
|
|
268
|
-
|
|
269
|
-
Declare brands in `ds.config.json` (`brands: [{ name }]`, the first is the default; leave
|
|
270
|
-
`brands` out for one brand). The default brand's values are the ones on `:root`. Another
|
|
271
|
-
brand re-sets existing tokens on its own selector only, with every half of a themed token it
|
|
272
|
-
changes:
|
|
273
|
-
|
|
274
|
-
```css
|
|
275
|
-
[data-brand="acme"] {
|
|
276
|
-
--color-accent-9-light: oklch(55% .2 25);
|
|
277
|
-
--color-accent-9-dark: oklch(70% .16 25);
|
|
278
|
-
--font-sans: Georgia, serif;
|
|
279
|
-
}
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
- `data-brand="<name>"` on `<html>` brands the page; on any element that section. Brand and
|
|
283
|
-
theme are independent: each element takes its nearest brand and its nearest theme, at any
|
|
284
|
-
nesting depth, including the default brand inside another brand's section.
|
|
285
|
-
- Errors: a brand that gives a themed token one value (`brand-theme-value`) or only some of
|
|
286
|
-
its halves or ramp steps (`brand-coverage`), a token only a brand defines
|
|
287
|
-
(`brand-new-token`), a declared brand without values (`brand-empty`), a `data-brand` name
|
|
288
|
-
the config does not declare (`brand-undeclared`). `token-contrast` runs for every brand
|
|
289
|
-
in every theme.
|
|
290
|
-
- A brand's logo is brand artwork (`ads://guides/branding`). Render every brand's logo and
|
|
291
|
-
show each with `display: var(--display-brand-<brand>, block)`, so a section shows its
|
|
292
|
-
nearest brand's logo.
|
|
293
|
-
- The showcase shows a brand selector next to the theme button; captures take `brand`;
|
|
294
|
-
`ads tokens --format dtcg --brand <name>` exports a brand (with `--theme`, one brand in
|
|
295
|
-
one theme).
|
|
296
|
-
|
|
297
|
-
## Colors in Canvas, WebGL and SVG renderers
|
|
298
|
-
|
|
299
|
-
A renderer that needs colors as values (a graph, a chart, a canvas) reads them from the
|
|
300
|
-
generated palette, never from the page per item. `tokens/themes.generated.ts` holds every
|
|
301
|
-
color token resolved for every context (`<theme>`, and `<brand>/<theme>` for other brands)
|
|
302
|
-
as `{ css, rgba }`: `css` is `#rrggbb`, or `rgba(…)` when translucent; `rgba` is sRGB
|
|
303
|
-
0–255 with alpha 0–1. Aliases, halves and `color-mix()` are resolved; out-of-gamut colors
|
|
304
|
-
are clipped per channel, as a canvas does. ADS writes it with `themes.generated.css`.
|
|
305
|
-
|
|
306
|
-
```ts
|
|
307
|
-
import { paletteFor, observePalette } from "@ds";
|
|
308
|
-
|
|
309
|
-
let colors = paletteFor(container); // once per render pass
|
|
310
|
-
const fill = colors["--accent"].rgba; // inside the per-node loop
|
|
311
|
-
const stop = observePalette(container, next => { colors = next; redraw(); });
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
- `paletteFor(element)` returns the palette of the element's nearest theme and brand (and
|
|
315
|
-
the OS setting under `followSystemTheme`). Call it once per render or context change; look
|
|
316
|
-
colors up inside loops.
|
|
317
|
-
- `observePalette(element, callback)` calls back once when the element's theme or brand
|
|
318
|
-
changes; redraw from it instead of rebuilding the renderer. It returns the unsubscribe.
|
|
319
|
-
- `paletteContext(element)` returns the context key (`<theme>` or `<brand>/<theme>`) for
|
|
320
|
-
`palette[key]` or for caching per context.
|
|
321
|
-
- `resolveColor(element, value)` resolves a color that is not a palette token (currentColor,
|
|
322
|
-
a value from data) once, without inserting elements, and caches it.
|
|
323
|
-
- A token whose value cannot be resolved ahead of time (currentColor, relative color syntax,
|
|
324
|
-
system colors) is not in the palette in any context; `unresolved` lists it. Use
|
|
325
|
-
`resolveColor` for those.
|
|
326
|
-
- The palette reflects token sheets, not inline token overrides at runtime or `@media`
|
|
327
|
-
variants.
|
|
328
|
-
|
|
329
|
-
`render-color-probe` (review) flags a computed-style color read or `getImageData` inside a
|
|
330
|
-
per-item path (an array callback, a loop body, `nodeReducer`/`edgeReducer`, d3 `.attr`/
|
|
331
|
-
`.style` callbacks). Move the read out with `paletteFor`.
|
|
332
|
-
|
|
333
|
-
## Spacing
|
|
334
|
-
|
|
335
|
-
`--space-N` is N × 2 px, from 2 to 160 px; the same values hold at every screen size, and a
|
|
336
|
-
layout steps down one or two sizes at narrow widths instead of scaling. Use the scale for
|
|
337
|
-
padding inside components and for gaps between them; a value off the scale needs a reason.
|
|
338
|
-
|
|
339
|
-
- Distance says how related things are: closer means more related. Group with space before
|
|
340
|
-
reaching for dividers, borders or cards.
|
|
341
|
-
- More space around an element gives it more importance. Sections can be dense, but leave the
|
|
342
|
-
page as a whole room to breathe.
|
|
343
|
-
- Parents own the space between their children (`gap`, stack tokens); a component carries no
|
|
344
|
-
outer margin, so it fits wherever it is placed.
|
|
345
|
-
- Horizontal layout follows the column grid; percentages are fine for splitting a region and
|
|
346
|
-
for minimum and maximum widths.
|
|
347
|
-
|
|
348
|
-
## Motion tokens
|
|
349
|
-
|
|
350
|
-
Six durations (`--dur-instant` 70 ms, `--dur-fast` 110, `--dur-moderate` 150, `--dur-normal`
|
|
351
|
-
240, `--dur-slow` 400, `--dur-slower` 700) and three curve pairs (standard, enter and exit, each everyday and
|
|
352
|
-
`-strong`). Every duration is 0 under `prefers-reduced-motion`. Pick by purpose, not by
|
|
353
|
-
number: the ads-motion skill's build guide maps each token to its use and gives the easing
|
|
354
|
-
rules.
|