@reqvire-org/ads 0.4.0 → 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 +105 -86
- 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 +5 -5
- 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 +135 -38
- 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 +40 -57
- package/dist/check.mjs +749 -188
- package/dist/cli.mjs +200 -99
- package/dist/color-values.mjs +21 -21
- package/dist/component-contrast.mjs +2 -2
- package/dist/config.mjs +303 -135
- package/dist/construction-styles.cjs +10 -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 +2 -2
- package/dist/foundation-views.mjs +238 -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 +109 -36
- 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 +901 -281
- package/dist/mcp/execution-coordinator.mjs +417 -167
- package/dist/mcp/execution-results.mjs +7 -7
- package/dist/mcp/mutations.mjs +670 -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 +2402 -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/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 +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 +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 +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 +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 +130 -119
- package/dist/skills/ads-designer/references/accessibility.md +12 -13
- 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 +98 -10
- 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/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 +54 -343
- 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 +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 +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/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/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 +208 -98
- package/dist/usage.mjs +138 -38
- package/dist/validation-checks.mjs +115 -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 +90 -79
- package/docs/ARCHITECTURE.md +294 -136
- package/docs/BEHAVIORS.md +29 -25
- package/docs/CACHING.md +52 -17
- package/docs/CHANGELOG.md +309 -17
- package/docs/CONTRACTS.md +12 -4
- package/docs/DESIGN-REFERENCES.md +40 -0
- package/docs/GUIDE.md +270 -258
- package/docs/MCP.md +181 -324
- 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 -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
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { css, cx } from "@linaria/atomic";
|
|
2
|
+
import { useEffect, useRef, useState } from "preact/hooks";
|
|
3
|
+
import type { ComponentChildren as ReactNode } from "preact";
|
|
4
|
+
import { IconButton } from "../../components/Actions/IconButton/IconButton";
|
|
5
|
+
|
|
6
|
+
export type ShellAsideMode = "docked" | "floating";
|
|
7
|
+
|
|
8
|
+
export interface ShellProps {
|
|
9
|
+
/** Prefix for the region and toggle ids; unique on the page. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Header content after the navigation toggle, such as a logo and title. */
|
|
12
|
+
header?: ReactNode;
|
|
13
|
+
/** Navigation shown while the panel is expanded. */
|
|
14
|
+
navigation: ReactNode;
|
|
15
|
+
/** Compact navigation shown in the collapsed rail, usually icon buttons. */
|
|
16
|
+
rail?: ReactNode;
|
|
17
|
+
navigationLabel?: string;
|
|
18
|
+
/** Controlled navigation state; omit to let the Shell keep it. */
|
|
19
|
+
navigationExpanded?: boolean;
|
|
20
|
+
defaultNavigationExpanded?: boolean;
|
|
21
|
+
onNavigationExpandedChange?: (expanded: boolean) => void;
|
|
22
|
+
/** A secondary panel at the inline end, such as details or filters. */
|
|
23
|
+
aside?: ReactNode;
|
|
24
|
+
asideLabel?: string;
|
|
25
|
+
/** docked: pushes the main region from the large breakpoint and covers it below. floating: always covers. */
|
|
26
|
+
asideMode?: ShellAsideMode;
|
|
27
|
+
asideOpen?: boolean;
|
|
28
|
+
defaultAsideOpen?: boolean;
|
|
29
|
+
onAsideOpenChange?: (open: boolean) => void;
|
|
30
|
+
/** The main region. It is a region container, so layouts inside respond to its width. */
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Region geometry is one validated hybrid construction per state. Columns: the
|
|
35
|
+
// navigation track is the rail, or the side pane from lg; the aside track is
|
|
36
|
+
// empty, or the side pane from lg when docked. Below lg an expanded navigation
|
|
37
|
+
// and a docked aside cover the main region instead of narrowing it. Rows: the
|
|
38
|
+
// header keeps its content height and the body fills the rest. The header
|
|
39
|
+
// continues the column tracks, so its bar starts where the main region starts.
|
|
40
|
+
const tracks = `
|
|
41
|
+
columns: 3;
|
|
42
|
+
fixed-start: --navigation-rail-width;
|
|
43
|
+
fixed-end: 0;
|
|
44
|
+
gutter: none;
|
|
45
|
+
margin: --space-0;
|
|
46
|
+
bound: full;
|
|
47
|
+
rows: auto fill;
|
|
48
|
+
`;
|
|
49
|
+
const headerCell = `@ads-cell .ux-shell-header {
|
|
50
|
+
row: 1;
|
|
51
|
+
@ads-layout inherited {
|
|
52
|
+
gutter: none;
|
|
53
|
+
@ads-cell .ux-shell-brand { span: 1; }
|
|
54
|
+
@ads-cell .ux-shell-bar { start: 2; span: 2; }
|
|
55
|
+
}
|
|
56
|
+
}`;
|
|
57
|
+
const mainCell = `@ads-cell .ux-shell-main { start: 2; span: 1; row: 2; container: region; }`;
|
|
58
|
+
const navigationRail = `@ads-cell .ux-shell-navigation { span: 1; row: 2; }`;
|
|
59
|
+
const navigationPanel = `@ads-cell .ux-shell-navigation { span: 1; row: 2; overlay: start; @ads-at lg { overlay: none; } }`;
|
|
60
|
+
const asideClosed = `@ads-cell .ux-shell-aside { start: 3; span: 1; row: 2; }`;
|
|
61
|
+
const asideDocked = `@ads-cell .ux-shell-aside { start: 3; span: 1; row: 2; overlay: end; @ads-at lg { overlay: none; } }`;
|
|
62
|
+
const asideFloating = `@ads-cell .ux-shell-aside { start: 3; span: 1; row: 2; overlay: end; }`;
|
|
63
|
+
// The backdrop shows wherever a panel covers the main region.
|
|
64
|
+
const backdropNarrow = `@ads-cell .ux-shell-backdrop { span: 1; row: 2; overlay: start; @ads-at lg { visible: false; } }`;
|
|
65
|
+
const backdropAlways = `@ads-cell .ux-shell-backdrop { span: 1; row: 2; overlay: start; }`;
|
|
66
|
+
|
|
67
|
+
const regions = {
|
|
68
|
+
"rail-closed": css`@ads-layout hybrid { ${tracks} ${headerCell} ${navigationRail} ${mainCell} ${asideClosed} ${backdropNarrow} }`,
|
|
69
|
+
"rail-docked": css`@ads-layout hybrid { ${tracks} @ads-at lg { fixed-end: --side-pane-width; } ${headerCell} ${navigationRail} ${mainCell} ${asideDocked} ${backdropNarrow} }`,
|
|
70
|
+
"rail-floating": css`@ads-layout hybrid { ${tracks} ${headerCell} ${navigationRail} ${mainCell} ${asideFloating} ${backdropAlways} }`,
|
|
71
|
+
"panel-closed": css`@ads-layout hybrid { ${tracks} @ads-at lg { fixed-start: --side-pane-width; } ${headerCell} ${navigationPanel} ${mainCell} ${asideClosed} ${backdropNarrow} }`,
|
|
72
|
+
"panel-docked": css`@ads-layout hybrid { ${tracks} @ads-at lg { fixed-start: --side-pane-width; fixed-end: --side-pane-width; } ${headerCell} ${navigationPanel} ${mainCell} ${asideDocked} ${backdropNarrow} }`,
|
|
73
|
+
"panel-floating": css`@ads-layout hybrid { ${tracks} @ads-at lg { fixed-start: --side-pane-width; } ${headerCell} ${navigationPanel} ${mainCell} ${asideFloating} ${backdropAlways} }`,
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const root = css`
|
|
77
|
+
block-size: 100%;
|
|
78
|
+
min-block-size: 0;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
background: var(--bg-canvas);
|
|
81
|
+
color: var(--text-body);
|
|
82
|
+
`;
|
|
83
|
+
const header = css`
|
|
84
|
+
min-block-size: var(--app-header-height);
|
|
85
|
+
border-block-end: var(--border-w) solid var(--border-subtle);
|
|
86
|
+
background: var(--bg-surface);
|
|
87
|
+
`;
|
|
88
|
+
// The toggle keeps one position: centred in the rail, at the same inset in the panel.
|
|
89
|
+
const brand = css`
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
padding-inline-start: var(--space-6);
|
|
93
|
+
`;
|
|
94
|
+
// The bar's inset matches the main region's padding, so header and content share a keyline.
|
|
95
|
+
const bar = css`
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
gap: var(--space-6);
|
|
99
|
+
padding-inline: var(--space-8);
|
|
100
|
+
`;
|
|
101
|
+
const headerContent = css`
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
gap: var(--space-6);
|
|
105
|
+
flex: 1;
|
|
106
|
+
min-inline-size: 0;
|
|
107
|
+
`;
|
|
108
|
+
// A panel is a column: its content area fills the panel's height.
|
|
109
|
+
const panel = css`
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-direction: column;
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
inline-size: 100%;
|
|
114
|
+
max-inline-size: var(--side-pane-width);
|
|
115
|
+
overflow: auto;
|
|
116
|
+
background: var(--bg-surface);
|
|
117
|
+
z-index: var(--z-overlay);
|
|
118
|
+
&:focus-visible { outline: var(--focus-w) solid var(--border-focus); outline-offset: calc(var(--focus-w) * -1); }
|
|
119
|
+
`;
|
|
120
|
+
const navigationEdge = css`border-inline-end: var(--border-w) solid var(--border-subtle);`;
|
|
121
|
+
const asideEdge = css`border-inline-start: var(--border-w) solid var(--border-subtle);`;
|
|
122
|
+
const panelContent = css`
|
|
123
|
+
flex: 1 0 auto;
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
gap: var(--space-4);
|
|
127
|
+
padding: var(--space-8);
|
|
128
|
+
`;
|
|
129
|
+
const railContent = css`
|
|
130
|
+
flex: 1 0 auto;
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
align-items: center;
|
|
134
|
+
gap: var(--space-4);
|
|
135
|
+
padding-block: var(--space-6);
|
|
136
|
+
`;
|
|
137
|
+
const asideHeader = css`
|
|
138
|
+
display: flex;
|
|
139
|
+
justify-content: flex-end;
|
|
140
|
+
padding: var(--space-4);
|
|
141
|
+
`;
|
|
142
|
+
const main = css`
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
gap: var(--space-stack-lg);
|
|
146
|
+
padding: var(--space-8);
|
|
147
|
+
overflow: auto;
|
|
148
|
+
`;
|
|
149
|
+
// Below the panels and above the main region.
|
|
150
|
+
const backdrop = css`
|
|
151
|
+
inline-size: 100%;
|
|
152
|
+
background: var(--bg-overlay);
|
|
153
|
+
z-index: var(--z-sticky);
|
|
154
|
+
`;
|
|
155
|
+
|
|
156
|
+
/** Whether a panel currently covers the main region instead of taking a track. */
|
|
157
|
+
const covers = (element: HTMLElement | null) => !!element && getComputedStyle(element).position === "absolute";
|
|
158
|
+
const focusById = (id: string) => document.getElementById(id)?.focus();
|
|
159
|
+
|
|
160
|
+
function useToggle(value: boolean | undefined, initial: boolean, onChange?: (next: boolean) => void) {
|
|
161
|
+
const [own, setOwn] = useState(initial);
|
|
162
|
+
const current = value ?? own;
|
|
163
|
+
const set = (next: boolean) => {
|
|
164
|
+
if (value === undefined) setOwn(next);
|
|
165
|
+
onChange?.(next);
|
|
166
|
+
};
|
|
167
|
+
return [current, set] as const;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Application regions: header, navigation (rail or panel), main and an optional
|
|
172
|
+
* aside. Panels push the main region from the large breakpoint and cover it
|
|
173
|
+
* below; a floating aside always covers, over a backdrop. Escape dismisses a
|
|
174
|
+
* covering panel and focus returns to its toggle; a press on the backdrop
|
|
175
|
+
* closes it too.
|
|
176
|
+
*/
|
|
177
|
+
export function Shell({
|
|
178
|
+
id,
|
|
179
|
+
header: headerSlot,
|
|
180
|
+
navigation,
|
|
181
|
+
rail,
|
|
182
|
+
navigationLabel = "Navigation",
|
|
183
|
+
navigationExpanded,
|
|
184
|
+
defaultNavigationExpanded = false,
|
|
185
|
+
onNavigationExpandedChange,
|
|
186
|
+
aside,
|
|
187
|
+
asideLabel = "Details",
|
|
188
|
+
asideMode = "docked",
|
|
189
|
+
asideOpen,
|
|
190
|
+
defaultAsideOpen = false,
|
|
191
|
+
onAsideOpenChange,
|
|
192
|
+
children,
|
|
193
|
+
}: ShellProps) {
|
|
194
|
+
const [expanded, setExpanded] = useToggle(navigationExpanded, defaultNavigationExpanded, onNavigationExpandedChange);
|
|
195
|
+
const [open, setOpen] = useToggle(asideOpen, defaultAsideOpen, onAsideOpenChange);
|
|
196
|
+
const navigationRef = useRef<HTMLElement>(null);
|
|
197
|
+
const asideRef = useRef<HTMLElement>(null);
|
|
198
|
+
const ids = { navigation: `${id}-navigation`, aside: `${id}-aside`, navigationToggle: `${id}-navigation-toggle`, asideToggle: `${id}-aside-toggle` };
|
|
199
|
+
const showAside = !!aside && open;
|
|
200
|
+
const state = `${expanded ? "panel" : "rail"}-${showAside ? asideMode : "closed"}` as keyof typeof regions;
|
|
201
|
+
|
|
202
|
+
// A panel that opens over the content takes focus; one that pushes leaves it in place.
|
|
203
|
+
useEffect(() => { if (expanded && covers(navigationRef.current)) navigationRef.current?.focus(); }, [expanded]);
|
|
204
|
+
useEffect(() => { if (showAside && covers(asideRef.current)) asideRef.current?.focus(); }, [showAside]);
|
|
205
|
+
|
|
206
|
+
const collapseNavigation = () => { setExpanded(false); focusById(ids.navigationToggle); };
|
|
207
|
+
const closeAside = () => { setOpen(false); focusById(ids.asideToggle); };
|
|
208
|
+
|
|
209
|
+
return (
|
|
210
|
+
<div className={cx("ux-shell", root, regions[state])}>
|
|
211
|
+
<header className={cx("ux-shell-header", header)}>
|
|
212
|
+
<div className={cx("ux-shell-brand", brand)}>
|
|
213
|
+
<IconButton
|
|
214
|
+
id={ids.navigationToggle}
|
|
215
|
+
icon="menu"
|
|
216
|
+
label={expanded ? `Collapse ${navigationLabel.toLowerCase()}` : `Expand ${navigationLabel.toLowerCase()}`}
|
|
217
|
+
expanded={expanded}
|
|
218
|
+
controls={ids.navigation}
|
|
219
|
+
onClick={() => setExpanded(!expanded)}
|
|
220
|
+
/>
|
|
221
|
+
</div>
|
|
222
|
+
<div className={cx("ux-shell-bar", bar)}>
|
|
223
|
+
<div className={headerContent}>{headerSlot}</div>
|
|
224
|
+
{aside ? (
|
|
225
|
+
<IconButton
|
|
226
|
+
id={ids.asideToggle}
|
|
227
|
+
icon="info"
|
|
228
|
+
label={open ? `Close ${asideLabel.toLowerCase()}` : `Open ${asideLabel.toLowerCase()}`}
|
|
229
|
+
expanded={open}
|
|
230
|
+
controls={ids.aside}
|
|
231
|
+
onClick={() => setOpen(!open)}
|
|
232
|
+
/>
|
|
233
|
+
) : null}
|
|
234
|
+
</div>
|
|
235
|
+
</header>
|
|
236
|
+
<nav
|
|
237
|
+
ref={navigationRef}
|
|
238
|
+
id={ids.navigation}
|
|
239
|
+
aria-label={navigationLabel}
|
|
240
|
+
tabIndex={-1}
|
|
241
|
+
className={cx("ux-shell-navigation", panel, navigationEdge)}
|
|
242
|
+
onKeyDown={(event) => { if (event.key === "Escape" && expanded && covers(navigationRef.current)) collapseNavigation(); }}
|
|
243
|
+
>
|
|
244
|
+
{expanded ? <div className={panelContent}>{navigation}</div> : <div className={railContent}>{rail}</div>}
|
|
245
|
+
</nav>
|
|
246
|
+
<main className={cx("ux-shell-main", main)}>{children}</main>
|
|
247
|
+
{expanded || showAside ? (
|
|
248
|
+
// Pointer dismissal only; keyboard users close panels with Escape or their toggles.
|
|
249
|
+
<div
|
|
250
|
+
aria-hidden="true"
|
|
251
|
+
className={cx("ux-shell-backdrop", backdrop)}
|
|
252
|
+
onPointerDown={() => {
|
|
253
|
+
if (expanded && covers(navigationRef.current)) setExpanded(false);
|
|
254
|
+
if (showAside && covers(asideRef.current)) setOpen(false);
|
|
255
|
+
}}
|
|
256
|
+
/>
|
|
257
|
+
) : null}
|
|
258
|
+
{showAside ? (
|
|
259
|
+
<aside
|
|
260
|
+
ref={asideRef}
|
|
261
|
+
id={ids.aside}
|
|
262
|
+
aria-label={asideLabel}
|
|
263
|
+
tabIndex={-1}
|
|
264
|
+
className={cx("ux-shell-aside", panel, asideEdge)}
|
|
265
|
+
onKeyDown={(event) => { if (event.key === "Escape") closeAside(); }}
|
|
266
|
+
>
|
|
267
|
+
<div className={asideHeader}>
|
|
268
|
+
<IconButton icon="close" label={`Close ${asideLabel.toLowerCase()}`} size="sm" onClick={closeAside} />
|
|
269
|
+
</div>
|
|
270
|
+
<div className={panelContent}>{aside}</div>
|
|
271
|
+
</aside>
|
|
272
|
+
) : null}
|
|
273
|
+
</div>
|
|
274
|
+
);
|
|
275
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentChildren as ReactNode } from "preact";
|
|
2
|
+
import { previewFrameClasses } from "@reqvire-org/ads/preview";
|
|
3
|
+
export interface DemoFrameProps { layout?: "row" | "column"; children?: ReactNode; }
|
|
4
|
+
/** The scenario selects an arrangement; ADS owns the generic preview presentation. */
|
|
5
|
+
export function DemoFrame({ layout = "row", children }: DemoFrameProps) {
|
|
6
|
+
return <div className={previewFrameClasses(layout, "padded")}>{children}</div>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentChildren as ReactNode } from "preact";
|
|
2
|
+
import { previewFrameClasses } from "@reqvire-org/ads/preview";
|
|
3
|
+
export interface ScreenFrameProps { title: string; description?: string; children?: ReactNode; }
|
|
4
|
+
export function ScreenFrame({ title, description, children }: ScreenFrameProps) {
|
|
5
|
+
return <main className={previewFrameClasses("page", "section")}>
|
|
6
|
+
<h1 className={previewFrameClasses("title")}>{title}</h1>
|
|
7
|
+
{description ? <p className={previewFrameClasses("description")}>{description}</p> : null}
|
|
8
|
+
{children}
|
|
9
|
+
</main>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { render, type ComponentType } from "preact";
|
|
2
|
+
import { createPreviewRoot } from "@reqvire-org/ads/preview";
|
|
3
|
+
import "@ds";
|
|
4
|
+
export function mountScenario(Scenario: ComponentType, container: HTMLElement) {
|
|
5
|
+
const frame = createPreviewRoot(container);
|
|
6
|
+
render(<Scenario />, frame);
|
|
7
|
+
return () => { render(null, frame); frame.remove(); };
|
|
8
|
+
}
|
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "preact",
|
|
3
|
-
"themes": [
|
|
3
|
+
"themes": [
|
|
4
|
+
{
|
|
5
|
+
"name": "light",
|
|
6
|
+
"scheme": "light"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "dark",
|
|
10
|
+
"scheme": "dark"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
4
13
|
"behaviorLibraries": [],
|
|
5
|
-
"acceptance": {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
14
|
+
"acceptance": {
|
|
15
|
+
"scripts": [],
|
|
16
|
+
"behavior": true,
|
|
17
|
+
"audit": true
|
|
18
|
+
},
|
|
19
|
+
"validation": {
|
|
20
|
+
"scripts": [],
|
|
21
|
+
"inputs": []
|
|
9
22
|
},
|
|
10
23
|
"assets": {
|
|
11
24
|
"iconSource": "assets/brand/app-icon.svg",
|
|
12
25
|
"glyphs": {
|
|
13
26
|
"source": "assets/glyphs",
|
|
14
27
|
"output": "components/Content/Icon/glyphs.ts",
|
|
15
|
-
"attributes": {
|
|
28
|
+
"attributes": {
|
|
29
|
+
"fill": "none",
|
|
30
|
+
"stroke": "currentColor",
|
|
31
|
+
"stroke-width": "2",
|
|
32
|
+
"stroke-linecap": "round",
|
|
33
|
+
"stroke-linejoin": "round"
|
|
34
|
+
}
|
|
16
35
|
}
|
|
17
36
|
}
|
|
18
37
|
}
|
|
@@ -14,14 +14,11 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"dev": "ads showcase",
|
|
16
16
|
"dev:showcase": "ads showcase",
|
|
17
|
-
"lint": "
|
|
17
|
+
"lint": "biome lint --config-path=biome.css.json .",
|
|
18
18
|
"typecheck": "tsc --noEmit",
|
|
19
19
|
"build": "npm run lint && npm run typecheck && npm run build:lib",
|
|
20
20
|
"build:lib": "vite build && tsc --project tsconfig.build.json",
|
|
21
|
-
"build:showcase": "ads compile ."
|
|
22
|
-
"preview": "ads showcase",
|
|
23
|
-
"preview:showcase": "ads showcase",
|
|
24
|
-
"build:mcp-previews": "ads compile ."
|
|
21
|
+
"build:showcase": "ads compile ."
|
|
25
22
|
},
|
|
26
23
|
"devDependencies": {
|
|
27
24
|
"@babel/preset-react": "7.29.7",
|
|
@@ -31,9 +28,8 @@
|
|
|
31
28
|
"@playwright/test": "1.64.1",
|
|
32
29
|
"@types/node": "25.9.4",
|
|
33
30
|
"@wyw-in-js/vite": "2.1.3",
|
|
34
|
-
"oxlint": "1.72.0",
|
|
35
|
-
"preact": "11.0.1",
|
|
36
31
|
"typescript": "5.9.3",
|
|
37
|
-
"vite": "6.4.3"
|
|
32
|
+
"vite": "6.4.3",
|
|
33
|
+
"preact": "11.0.1"
|
|
38
34
|
}
|
|
39
35
|
}
|
|
@@ -13,20 +13,19 @@
|
|
|
13
13
|
"moduleDetection": "force",
|
|
14
14
|
"noEmit": true,
|
|
15
15
|
"jsx": "react-jsx",
|
|
16
|
-
"jsxImportSource": "preact",
|
|
17
16
|
"strict": true,
|
|
18
17
|
"noUnusedLocals": true,
|
|
19
18
|
"noUnusedParameters": true,
|
|
20
19
|
"noFallthroughCasesInSwitch": true,
|
|
21
|
-
"baseUrl": ".",
|
|
22
20
|
"paths": {
|
|
23
21
|
"@ds/review": [
|
|
24
|
-
"design-system/review/index.ts"
|
|
22
|
+
"./design-system/review/index.ads.review.ts"
|
|
25
23
|
],
|
|
26
24
|
"@ds": [
|
|
27
|
-
"design-system/index.ts"
|
|
25
|
+
"./design-system/index.ts"
|
|
28
26
|
]
|
|
29
|
-
}
|
|
27
|
+
},
|
|
28
|
+
"jsxImportSource": "preact"
|
|
30
29
|
},
|
|
31
30
|
"include": [
|
|
32
31
|
"src",
|
|
@@ -2,13 +2,13 @@ import path from "node:path";
|
|
|
2
2
|
import { defineConfig } from "vite";
|
|
3
3
|
import wyw from "@wyw-in-js/vite";
|
|
4
4
|
import { linariaTagResolver } from "@reqvire-org/ads/linaria";
|
|
5
|
-
import {
|
|
5
|
+
import { developmentImportGuard } from "@reqvire-org/ads/scenarios/vite";
|
|
6
6
|
|
|
7
7
|
export default defineConfig({
|
|
8
8
|
esbuild: { jsx: "automatic", jsxImportSource: "preact" },
|
|
9
|
-
plugins: [
|
|
9
|
+
plugins: [developmentImportGuard(), wyw({ tagResolver: linariaTagResolver })],
|
|
10
10
|
resolve: {
|
|
11
|
-
alias: { "@ds/review": path.resolve(import.meta.dirname, "design-system/review/index.ts"), "@ds": path.resolve(import.meta.dirname, "design-system/index.ts") },
|
|
11
|
+
alias: { "@ds/review": path.resolve(import.meta.dirname, "design-system/review/index.ads.review.ts"), "@ds": path.resolve(import.meta.dirname, "design-system/index.ts") },
|
|
12
12
|
},
|
|
13
13
|
build: {
|
|
14
14
|
outDir: "dist",
|
|
@@ -17,12 +17,12 @@ The rules and commands needed to use this starter are included locally.
|
|
|
17
17
|
| Patterns | Reusable layout and composition | `patterns/` |
|
|
18
18
|
| Scenarios | Colocated development entries and inputs | Beside their owner; larger entries in `composition/` |
|
|
19
19
|
| Showcase host | Navigation and MCP client | Packaged ADS tooling |
|
|
20
|
-
|
|
|
20
|
+
| Native framework mount | Framework mount/unmount and foundation imports | `showcase/mcp/` |
|
|
21
21
|
| Application | Domain data, routing, effects and callbacks | Consuming application |
|
|
22
22
|
|
|
23
|
-
The starter
|
|
24
|
-
dependencies and the preview mount adapter consistent. Init
|
|
25
|
-
|
|
23
|
+
The starter records the selected framework in `ds.config.json`. Keep that choice,
|
|
24
|
+
JSX, runtime dependencies and the preview mount adapter consistent. Init selects
|
|
25
|
+
the matching native starter; it does not migrate existing application source.
|
|
26
26
|
|
|
27
27
|
The starter has examples of each layer (Button, IconButton, Icon, Logo, TextField and
|
|
28
28
|
Grid; the SearchBar pattern; the SearchPage composition), a shared `controllers/Palette`
|
|
@@ -125,27 +125,32 @@ notifications. The project does not author a second catalogue or browser app.
|
|
|
125
125
|
|
|
126
126
|
`ads mcp` starts the loopback website alongside stdio. Open the URL returned by
|
|
127
127
|
`ads_status`. Without an agent connection, `ads showcase` starts the same runtime
|
|
128
|
-
for browser use. Both transports share
|
|
128
|
+
for browser use. Both transports share ADS's managed Bun preview compiler.
|
|
129
129
|
|
|
130
130
|
The shell owns section tabs, collapsible navigation, theme controls and the App
|
|
131
131
|
slot. Components, patterns, token values, scenarios, fixtures and their Linaria
|
|
132
132
|
styles remain project-owned. Only the sandboxed App loads and applies project
|
|
133
133
|
runtime, CSS and fonts, through MCP resources. App presentation comes from the
|
|
134
|
-
selected compiled scenario
|
|
134
|
+
selected compiled scenario. ADS owns generic framing through `@reqvire-org/ads/preview`;
|
|
135
|
+
project-specific demonstrations live in marked `.ads.review.*` helpers, exported
|
|
136
|
+
through `@ds/review`. Development files, including mounts and review styles, use
|
|
137
|
+
the `.ads.*` filename marker and cannot enter production bundles. Do not recreate
|
|
135
138
|
production widgets inside the client or scenario.
|
|
136
139
|
|
|
137
140
|
There are five sections: Brand (first, shown only when the project has scenarios in
|
|
138
141
|
`brand/`), Tokens, Components, Patterns and Composition, plus an Icons tab after Tokens
|
|
139
142
|
for the glyph set. There are
|
|
140
143
|
no required `TokensPage`/`ComponentsPage`/`PatternsPage`/`CompositionPage` files.
|
|
141
|
-
|
|
142
|
-
the built-in client. Its tooling CSS is separate from the project style contract.
|
|
144
|
+
A project's own browsing pages are checked like other showcase source when present;
|
|
145
|
+
the built-in client needs none. Its tooling CSS is separate from the project style contract.
|
|
143
146
|
|
|
144
|
-
|
|
145
|
-
|
|
147
|
+
ADS's managed compiler builds requested scenarios and their dependencies,
|
|
148
|
+
retaining roots used by other open previews. Standalone full builds compile all
|
|
149
|
+
discovered scenarios. Selections reuse the App and load their dependency closure. The
|
|
146
150
|
project's `mountScenario(Scenario, container)` adapter returns an unmount callback
|
|
147
151
|
that releases owned roots, listeners, timers, portals and workers. Switching or
|
|
148
|
-
|
|
152
|
+
changing its compiled dependency closure resets its state. Unrelated graph
|
|
153
|
+
updates preserve the mounted state and unchanged shared modules.
|
|
149
154
|
Host context selects the project theme; it does not replace the project's skin.
|
|
150
155
|
|
|
151
156
|
|
|
@@ -168,30 +173,24 @@ design-system/
|
|
|
168
173
|
composition/Workspace/
|
|
169
174
|
Workspace.ads.scenario.tsx
|
|
170
175
|
Workspace.ads.fixture.ts
|
|
171
|
-
showcase/mcp/
|
|
172
|
-
main.tsx
|
|
176
|
+
showcase/mcp/ Native framework mount
|
|
177
|
+
main.ads.mount.tsx
|
|
173
178
|
```
|
|
174
179
|
|
|
175
180
|
Use `<Owner>.ads.scenario.tsx` and `<Owner>.ads.fixture.ts` for new entries.
|
|
176
181
|
The scenario exports a default independently mountable view and literal metadata
|
|
177
182
|
`export const scenario = { title: "Button states", covers: ["Button"] };`.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
`
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
`data-ads-property`. In a browser, the App validates the declared property/value and
|
|
190
|
-
probe using `CSS.supports`, checks the sample is rendered, then temporarily changes
|
|
191
|
-
that token to its fixture probe. Its computed sample property must respond. Values
|
|
192
|
-
are restored before yielding to painting; hardcoded lookalikes fail. Source gates
|
|
193
|
-
prove the contract structure, not successful rendering. The browser check covers
|
|
194
|
-
the mounted scenario and theme; visual quality and other states still need review.
|
|
183
|
+
ADS owns the Tokens and Brand views. It builds one `tokens/<Group>` view per catalogue group
|
|
184
|
+
from the token sheets and `<dsDir>/tokens/catalog.ads.json`, whose groups give each token a
|
|
185
|
+
literal `{ token, property, probe }` binding, and one `brand/Assets` view from the artwork in
|
|
186
|
+
`assets/brand/` and its subfolders. Tokens without an entry fall into a Values group with a default binding for
|
|
187
|
+
their type. An invalid catalogue is a `foundation-catalog` error, and a project scenario with a
|
|
188
|
+
foundation view's ID fails. No token-name/property mapping or sample values are embedded in the
|
|
189
|
+
tool. Display values come from foundation CSS; probes are verification inputs owned by the
|
|
190
|
+
catalogue. In a browser, the view validates each declared property and probe with
|
|
191
|
+
`CSS.supports` and temporarily changes the token to its probe; the computed property must
|
|
192
|
+
respond, and values are restored before painting. This covers the mounted view and theme;
|
|
193
|
+
visual quality still needs review.
|
|
195
194
|
|
|
196
195
|
It imports real public UI through `@ds` and its local fixture. The adapter supplies
|
|
197
196
|
initial state, callbacks and simulated services. The default entry needs no
|
|
@@ -213,13 +212,10 @@ are excluded. Coverage is a static source policy; it does not prove runtime
|
|
|
213
212
|
mounting, correct props, every branch/state or visual parity. The older
|
|
214
213
|
`showcase-coverage` policy also checks application render references.
|
|
215
214
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
update. All three are errors in `ads check`, run by `lint:ds` and the build.
|
|
221
|
-
Coverage is static reachability, not proof that every branch actually renders
|
|
222
|
-
or applies the right CSS property. Browser review still verifies the samples.
|
|
215
|
+
The foundation views cover every token, so a new token needs no scenario. An additional project
|
|
216
|
+
scenario that claims tokens is still checked: `token-scenario-reference` rejects undeclared
|
|
217
|
+
token names in its metadata and reachable inputs, and `token-scenario-render` rejects claimed
|
|
218
|
+
tokens with no reachable input reference.
|
|
223
219
|
|
|
224
220
|
Scenarios and fixture helpers are development-only wherever colocated. Runtime
|
|
225
221
|
source and the public barrel cannot import or re-export them. Showcase/scenario
|
|
@@ -253,8 +249,8 @@ present), colors, typography, spacing, elevation, base, then the generated
|
|
|
253
249
|
`themes.generated.css`.
|
|
254
250
|
|
|
255
251
|
Select an SVG with `assets.iconSource` in `ds.config.json`, relative to the ADS
|
|
256
|
-
folder. Initialized builds run
|
|
257
|
-
build steps. Standard icons go into ignored `.ds/assets/`; integrate that
|
|
252
|
+
folder. Initialized builds run `ads check`, then `ads assets`, then existing
|
|
253
|
+
build steps. Project lint scripts remain project-owned. Standard icons go into ignored `.ds/assets/`; integrate that
|
|
258
254
|
directory with the application's asset mount and reject duplicate paths.
|
|
259
255
|
Application metadata and custom platform exports remain project-owned. See
|
|
260
256
|
[brand guidance](design-system/assets/brand/README.md).
|
|
@@ -266,15 +262,14 @@ in a README beside the component. When adapting another library, record its
|
|
|
266
262
|
version, author, links, concrete influences, and agreed differences. Shared
|
|
267
263
|
architecture belongs here rather than duplicating each component contract.
|
|
268
264
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
statically provable misuse; register
|
|
272
|
-
runtime barrel. Core checks must work without any particular component library.
|
|
265
|
+
A Biome CSS check is included. `ads check` enforces the ownership and token
|
|
266
|
+
contract; no other linter is needed. Add component-local checks only for concrete,
|
|
267
|
+
statically provable misuse; register them as project scripts and keep them outside
|
|
268
|
+
the runtime barrel. Core checks must work without any particular component library.
|
|
273
269
|
Use configured token and ownership guards as the system grows; bring applicable
|
|
274
|
-
component-specific
|
|
275
|
-
tooling.
|
|
276
|
-
`
|
|
277
|
-
Use explicit `boundaries` for documented renderer properties and non-state hooks.
|
|
270
|
+
component-specific checks with an external item and register them in project
|
|
271
|
+
tooling. Declare renderer property permissions in the owner's `styles.writes`
|
|
272
|
+
and `styles.inline` contract fields, and document supported hooks in `customization`.
|
|
278
273
|
|
|
279
274
|
## Verification
|
|
280
275
|
|