@reqvire-org/ads 0.4.0 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +115 -87
- package/dist/a11y.mjs +133 -48
- package/dist/analysis/compiler-options.mjs +13 -0
- package/dist/analysis/context.mjs +46 -0
- package/dist/analysis/file-tree.mjs +52 -0
- package/dist/analysis/helpers.mjs +142 -0
- package/dist/analysis/impact.mjs +20 -0
- package/dist/analysis/inputs.mjs +22 -0
- package/dist/analysis/module-resolvers.mjs +46 -0
- package/dist/analysis/native-adapter.mjs +180 -0
- package/dist/analysis/native-project.mjs +323 -0
- package/dist/analysis/queries.mjs +133 -0
- package/dist/analysis/service.mjs +153 -0
- package/dist/analysis/standalone.mjs +57 -0
- package/dist/analysis/syntax.mjs +179 -0
- package/dist/analysis/worker.mjs +182 -0
- package/dist/assets.mjs +6 -6
- package/dist/atomic-composition.mjs +191 -70
- package/dist/atomic-trace.mjs +120 -50
- package/dist/behavior-libraries.mjs +106 -37
- package/dist/behaviors.mjs +219 -77
- package/dist/boundaries.mjs +140 -41
- package/dist/brand-assets.mjs +219 -47
- package/dist/brands.mjs +86 -27
- package/dist/bun-compiler.mjs +28 -14
- package/dist/bun-worker.mjs +7 -5
- package/dist/capture/worker.mjs +15 -4
- package/dist/capture-store.mjs +4 -2
- package/dist/capture.mjs +17 -14
- package/dist/check-service.mjs +44 -58
- package/dist/check.mjs +754 -188
- package/dist/cli.mjs +200 -99
- package/dist/color-values.mjs +21 -21
- package/dist/component-contrast.mjs +127 -9
- package/dist/config.mjs +303 -135
- package/dist/construction-styles.cjs +10 -0
- package/dist/contrast-composition.mjs +134 -0
- package/dist/control-padding.mjs +45 -25
- package/dist/css-values.mjs +3 -2
- package/dist/declarative-flow.mjs +209 -109
- package/dist/design-values.mjs +136 -51
- package/dist/development-runtime.mjs +4 -6
- package/dist/draft-boundary.mjs +11 -6
- package/dist/evidence.mjs +1 -1
- package/dist/finding-rules.mjs +9 -5
- package/dist/font-rules.mjs +22 -17
- package/dist/fonts-generated.mjs +23 -16
- package/dist/foundation-views.mjs +242 -0
- package/dist/foundation.mjs +63 -39
- package/dist/generated-entries.mjs +101 -34
- package/dist/icons.mjs +79 -32
- package/dist/image-attributes.mjs +143 -66
- package/dist/image-size.mjs +1 -1
- package/dist/index.mjs +0 -2
- package/dist/init.mjs +122 -41
- package/dist/investigations.mjs +2 -2
- package/dist/layers.mjs +298 -129
- package/dist/layout-widths.mjs +180 -85
- package/dist/linaria/preserve-values.cjs +7 -0
- package/dist/linaria/spatial-inputs.cjs +56 -0
- package/dist/lockup-composition.mjs +44 -0
- package/dist/lockup-model.cjs +64 -0
- package/dist/mcp/THIRD_PARTY_NOTICES.md +51 -1
- package/dist/mcp/apps.mjs +4 -30
- package/dist/mcp/behavior-pages.mjs +72 -24
- package/dist/mcp/build-status.mjs +257 -64
- package/dist/mcp/catalog.mjs +90 -26
- package/dist/mcp/context.mjs +17 -18
- package/dist/mcp/draft-discovery.mjs +44 -21
- package/dist/mcp/drafts.mjs +903 -281
- package/dist/mcp/execution-coordinator.mjs +417 -167
- package/dist/mcp/execution-results.mjs +7 -7
- package/dist/mcp/mutations.mjs +673 -234
- package/dist/mcp/preview-watch.mjs +448 -170
- package/dist/mcp/preview-widget.bundle.js +44 -50
- package/dist/mcp/prompts.mjs +5 -5
- package/dist/mcp/result-pages.mjs +1 -1
- package/dist/mcp/sandbox-host.mjs +1 -1
- package/dist/mcp/server.mjs +2409 -577
- package/dist/mcp/showcase-host.mjs +165 -41
- package/dist/mcp/skills.mjs +1 -1
- package/dist/mcp/text-diff.mjs +29 -10
- package/dist/paint-contracts.mjs +174 -81
- package/dist/palette-generated.mjs +2 -2
- package/dist/pictogram-model.mjs +59 -0
- package/dist/pictograms.mjs +52 -0
- package/dist/preview-bun.mjs +494 -187
- package/dist/preview-failure.mjs +1 -1
- package/dist/preview-files.mjs +13 -13
- package/dist/preview-imports.mjs +104 -55
- package/dist/preview-inputs.mjs +2 -2
- package/dist/preview-requests.mjs +24 -0
- package/dist/preview-resources.mjs +288 -147
- package/dist/preview-scope.mjs +5 -4
- package/dist/program-cache.mjs +8 -34
- package/dist/project-documents.mjs +1 -1
- package/dist/public-api.mjs +69 -31
- package/dist/public-props.mjs +39 -22
- package/dist/{browser-audit → render-audit}/axe-run.mjs +3 -3
- package/dist/{browser-audit → render-audit}/image-shape.mjs +15 -5
- package/dist/{browser-audit → render-audit}/layout-overflow.mjs +86 -23
- package/dist/{browser-audit → render-audit}/non-text-contrast.mjs +86 -27
- package/dist/render-audit/pictograms.mjs +88 -0
- package/dist/{browser-audit → render-audit}/render-states.mjs +208 -52
- package/dist/{browser-audit → render-audit}/worker.mjs +98 -30
- package/dist/render-audit.mjs +838 -0
- package/dist/render-color-probe.mjs +96 -42
- package/dist/render-composition.mjs +164 -0
- package/dist/resource-limits.mjs +229 -97
- package/dist/runtime-contracts.mjs +467 -185
- package/dist/scenario-groups.mjs +22 -10
- package/dist/scenario-inspector.mjs +6 -43
- package/dist/scenario-program.mjs +8 -25
- package/dist/scenario-registry.mjs +72 -30
- package/dist/scenario-selectors.mjs +161 -64
- package/dist/scenario-slots.mjs +149 -56
- package/dist/scenario-trace.mjs +215 -109
- package/dist/scenarios-compiler.mjs +719 -378
- package/dist/scenarios-vite.d.mts +1 -3
- package/dist/scenarios-vite.mjs +2 -81
- package/dist/scenarios.mjs +421 -157
- package/dist/selector-match.mjs +2 -2
- package/dist/showcase/client.bundle.js +57 -56
- package/dist/showcase/draft-navigation.js +21 -3
- package/dist/showcase/favicon.ico +0 -0
- package/dist/showcase/favicon.svg +1 -0
- package/dist/showcase/foundation-view.css +58 -0
- package/dist/showcase/foundation-view.mjs +255 -0
- package/dist/showcase/guide-controls.ads.review.mjs +32 -0
- package/dist/showcase/icons.js +1 -145
- package/dist/showcase/index.html +3 -31
- package/dist/showcase/pictogram-view.mjs +53 -0
- package/dist/showcase/preview-frame.ads.review.css +46 -0
- package/dist/showcase/preview-frame.ads.review.d.mts +11 -0
- package/dist/showcase/preview-frame.ads.review.mjs +22 -0
- package/dist/showcase/preview-state.js +0 -9
- package/dist/showcase/refresh-scheduler.js +23 -0
- package/dist/showcase/style.css +5 -47
- package/dist/showcase/ui/ui.css +1353 -0
- package/dist/showcase/ui/ui.js +1064 -0
- package/dist/showcase-coverage.mjs +58 -37
- package/dist/skills/README.md +24 -23
- package/dist/skills/ads-designer/README.md +8 -2
- package/dist/skills/ads-designer/SKILL.md +143 -120
- package/dist/skills/ads-designer/references/accessibility.md +78 -15
- package/dist/skills/ads-designer/references/atomic-styles.md +4 -4
- package/dist/skills/ads-designer/references/behaviors.md +30 -27
- package/dist/skills/ads-designer/references/branding.md +101 -24
- package/dist/skills/ads-designer/references/captures.md +25 -0
- package/dist/skills/ads-designer/references/cli.md +21 -24
- package/dist/skills/ads-designer/references/contracts.md +7 -6
- package/dist/skills/ads-designer/references/design-data.md +49 -52
- package/dist/skills/ads-designer/references/drafts.md +20 -17
- package/dist/skills/ads-designer/references/evidence.md +1 -5
- package/dist/skills/ads-designer/references/guarded-editing.md +14 -18
- package/dist/skills/ads-designer/references/layers.md +1 -1
- package/dist/skills/ads-designer/references/layout.md +347 -0
- package/dist/skills/ads-designer/references/mobile.md +2 -1
- package/dist/skills/{ads-motion/references/performance.md → ads-designer/references/motion-performance.md} +5 -1
- package/dist/skills/{ads-motion/references/build.md → ads-designer/references/motion.md} +73 -5
- package/dist/skills/ads-designer/references/performance.md +3 -2
- package/dist/skills/ads-designer/references/pictograms.md +131 -0
- package/dist/skills/ads-designer/references/review.md +37 -34
- package/dist/skills/ads-designer/references/runtimes.md +33 -30
- package/dist/skills/ads-designer/references/scenarios.md +16 -18
- package/dist/skills/{ads-break-ui/references/catalog.md → ads-designer/references/stress-catalog.md} +3 -1
- package/dist/skills/ads-designer/references/stress-test.md +68 -0
- package/dist/skills/ads-designer/references/validation.md +83 -75
- package/dist/skills/ads-designer/references/workflows.md +8 -33
- package/dist/skills/ads-import/SKILL.md +43 -325
- package/dist/skills/ads-import/references/atomic-styles.md +4 -4
- package/dist/skills/ads-import/references/behaviors.md +30 -27
- package/dist/skills/ads-import/references/branding.md +5 -5
- package/dist/skills/ads-import/references/captures.md +25 -0
- package/dist/skills/ads-import/references/cli.md +21 -24
- package/dist/skills/ads-import/references/compatibility.md +1 -1
- package/dist/skills/ads-import/references/contracts.md +7 -6
- package/dist/skills/ads-import/references/design-data.md +49 -52
- package/dist/skills/ads-import/references/drafts.md +20 -17
- package/dist/skills/ads-import/references/evidence.md +1 -5
- package/dist/skills/ads-import/references/guarded-editing.md +14 -18
- package/dist/skills/ads-import/references/implementation.md +2 -1
- package/dist/skills/ads-import/references/layers.md +1 -1
- package/dist/skills/ads-import/references/layout.md +347 -0
- package/dist/skills/ads-import/references/review.md +37 -34
- package/dist/skills/ads-import/references/runtimes.md +33 -30
- package/dist/skills/ads-import/references/scenarios.md +16 -18
- package/dist/skills/ads-import/references/tokens.md +3 -3
- package/dist/skills/ads-import/references/validation.md +83 -75
- package/dist/skills/ads-import/references/workflows.md +8 -33
- package/dist/skills/ads-migrate/SKILL.md +56 -0
- package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +602 -0
- package/dist/skills/ads-port/SKILL.md +58 -344
- package/dist/skills/ads-port/references/atomic-styles.md +4 -4
- package/dist/skills/ads-port/references/behaviors.md +30 -27
- package/dist/skills/ads-port/references/captures.md +25 -0
- package/dist/skills/ads-port/references/cli.md +21 -24
- package/dist/skills/ads-port/references/contracts.md +7 -6
- package/dist/skills/ads-port/references/design-data.md +49 -52
- package/dist/skills/ads-port/references/drafts.md +20 -17
- package/dist/skills/ads-port/references/evidence.md +1 -5
- package/dist/skills/ads-port/references/guarded-editing.md +14 -18
- package/dist/skills/ads-port/references/layers.md +1 -1
- package/dist/skills/ads-port/references/layout.md +347 -0
- package/dist/skills/ads-port/references/lint-and-docs.md +8 -11
- package/dist/skills/ads-port/references/native-implementation.md +2 -1
- package/dist/skills/ads-port/references/review.md +37 -34
- package/dist/skills/ads-port/references/runtimes.md +33 -30
- package/dist/skills/ads-port/references/scenarios.md +16 -18
- package/dist/skills/ads-port/references/validation.md +83 -75
- package/dist/skills/ads-port/references/workflows.md +8 -33
- package/dist/source-symbols.mjs +1 -8
- package/dist/source-values.mjs +270 -129
- package/dist/spatial-composition.mjs +322 -0
- package/dist/spatial-contexts.cjs +56 -0
- package/dist/spatial-css.cjs +351 -0
- package/dist/spatial-inputs.cjs +80 -0
- package/dist/spatial-metadata.mjs +18 -0
- package/dist/spatial-model.cjs +322 -0
- package/dist/spatial.mjs +21 -0
- package/dist/stage-timing.cjs +20 -0
- package/dist/starters/preact/design-system/patterns/Conversation/Conversation.tsx +105 -0
- package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +275 -0
- package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
- package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
- package/dist/starters/preact/design-system/showcase/mcp/main.ads.mount.tsx +8 -0
- package/dist/starters/preact/ds.config.json +25 -6
- package/dist/starters/preact/package.json +4 -8
- package/dist/starters/preact/tsconfig.json +4 -5
- package/dist/starters/preact/vite.config.ts +3 -3
- package/dist/starters/react/ADS.md +42 -47
- package/dist/starters/react/README.md +47 -49
- package/dist/starters/react/design-system/assets/pictograms/catalog.ads.json +13 -0
- package/dist/starters/react/design-system/assets/pictograms/journey.dark.svg +7 -0
- package/dist/starters/react/design-system/assets/pictograms/journey.svg +7 -0
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +18 -2
- package/dist/starters/react/design-system/components/Actions/IconButton/README.md +3 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.fixture.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.scenario.tsx +7 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.tsx +26 -0
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/README.md +5 -0
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.fixture.ts +13 -0
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.scenario.tsx +22 -0
- package/dist/starters/react/design-system/index.ts +2 -1
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.fixture.ts +7 -0
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.scenario.tsx +15 -0
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.tsx +105 -0
- package/dist/starters/react/design-system/patterns/Conversation/README.md +9 -0
- package/dist/starters/react/design-system/patterns/Shell/Floating.ads.fixture.ts +5 -0
- package/dist/starters/react/design-system/patterns/Shell/Floating.ads.scenario.tsx +21 -0
- package/dist/starters/react/design-system/patterns/Shell/README.md +43 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.fixture.ts +5 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +21 -0
- package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +274 -0
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +1 -1
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.review.tsx +7 -0
- package/dist/starters/react/design-system/review/index.ads.review.ts +4 -0
- package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.review.tsx +6 -0
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +1 -1
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +10 -0
- package/dist/starters/react/design-system/showcase/mcp/{main.tsx → main.ads.mount.tsx} +4 -2
- package/dist/starters/react/design-system/tokens/catalog.ads.json +1221 -0
- package/dist/starters/react/design-system/tokens/colors.css +1 -1
- package/dist/starters/react/design-system/tokens/spacing.css +22 -32
- package/dist/starters/react/design-system/tokens/spatial.ads.json +70 -0
- package/dist/starters/react/design-system/tokens/themes.generated.ts +1 -1
- package/dist/starters/react/ds.config.json +25 -6
- package/dist/starters/react/package.json +2 -6
- package/dist/starters/react/tsconfig.json +2 -3
- package/dist/starters/react/vite.config.ts +3 -3
- package/dist/style-boundaries.mjs +70 -25
- package/dist/task-cache.mjs +173 -72
- package/dist/task-worker.mjs +22 -11
- package/dist/test-boundaries.mjs +132 -59
- package/dist/themes-generated.mjs +1 -1
- package/dist/themes-watch.mjs +57 -22
- package/dist/themes.mjs +176 -73
- package/dist/token-export.mjs +39 -14
- package/dist/token-policy.mjs +6 -3
- package/dist/token-quality.mjs +6 -6
- package/dist/token-samples.mjs +16 -5
- package/dist/tokens.mjs +71 -26
- package/dist/ui-framework.mjs +16 -14
- package/dist/unit-contracts.mjs +251 -104
- package/dist/units.mjs +209 -99
- package/dist/usage.mjs +138 -38
- package/dist/validation-checks.mjs +115 -38
- package/dist/validation-inputs.mjs +191 -78
- package/dist/validation.mjs +268 -102
- package/dist/verification/browser.mjs +27 -5
- package/dist/verification.mjs +711 -187
- package/docs/ADS.md +96 -80
- package/docs/ARCHITECTURE.md +368 -137
- package/docs/BEHAVIORS.md +29 -25
- package/docs/CACHING.md +77 -17
- package/docs/CHANGELOG.md +332 -17
- package/docs/CONTRACTS.md +12 -4
- package/docs/DESIGN-REFERENCES.md +40 -0
- package/docs/GUIDE.md +300 -263
- package/docs/MCP.md +187 -324
- package/docs/SPATIAL-CHECKS.md +69 -0
- package/docs/benchmarks/README.md +39 -0
- package/package.json +43 -34
- package/dist/browser-audit.mjs +0 -429
- package/dist/create.mjs +0 -48
- package/dist/lint-config.mjs +0 -50
- package/dist/mcp/project-widget.bundle.js +0 -114
- package/dist/mcp/reports.mjs +0 -101
- package/dist/mcp/widget.bundle.js +0 -147
- package/dist/oxlint.mjs +0 -89
- package/dist/preview-builder.mjs +0 -133
- package/dist/preview-workers.mjs +0 -184
- package/dist/showcase.mjs +0 -77
- package/dist/skills/ads-break-ui/LICENSE.upstream +0 -21
- package/dist/skills/ads-break-ui/README.md +0 -16
- package/dist/skills/ads-break-ui/SKILL.md +0 -412
- package/dist/skills/ads-break-ui/agents/openai.yaml +0 -4
- package/dist/skills/ads-break-ui/references/atomic-styles.md +0 -293
- package/dist/skills/ads-break-ui/references/behaviors.md +0 -412
- package/dist/skills/ads-break-ui/references/captures.md +0 -135
- package/dist/skills/ads-break-ui/references/contracts.md +0 -317
- package/dist/skills/ads-break-ui/references/design-data.md +0 -354
- package/dist/skills/ads-break-ui/references/drafts.md +0 -194
- package/dist/skills/ads-break-ui/references/evidence.md +0 -128
- package/dist/skills/ads-break-ui/references/guarded-editing.md +0 -165
- package/dist/skills/ads-break-ui/references/layers.md +0 -145
- package/dist/skills/ads-break-ui/references/reporting.md +0 -101
- package/dist/skills/ads-break-ui/references/review.md +0 -97
- package/dist/skills/ads-break-ui/references/runtimes.md +0 -203
- package/dist/skills/ads-break-ui/references/scenarios.md +0 -246
- package/dist/skills/ads-break-ui/references/validation.md +0 -166
- package/dist/skills/ads-break-ui/references/verification.md +0 -58
- package/dist/skills/ads-break-ui/references/workflows.md +0 -90
- package/dist/skills/ads-designer/references/reporting.md +0 -101
- package/dist/skills/ads-import/references/reporting.md +0 -101
- package/dist/skills/ads-motion/LICENSE.upstream +0 -21
- package/dist/skills/ads-motion/README.md +0 -22
- package/dist/skills/ads-motion/SKILL.md +0 -385
- package/dist/skills/ads-motion/agents/openai.yaml +0 -4
- package/dist/skills/ads-motion/references/atomic-styles.md +0 -293
- package/dist/skills/ads-motion/references/audit.md +0 -44
- package/dist/skills/ads-motion/references/behaviors.md +0 -412
- package/dist/skills/ads-motion/references/captures.md +0 -135
- package/dist/skills/ads-motion/references/contracts.md +0 -317
- package/dist/skills/ads-motion/references/design-data.md +0 -354
- package/dist/skills/ads-motion/references/drafts.md +0 -194
- package/dist/skills/ads-motion/references/evidence.md +0 -128
- package/dist/skills/ads-motion/references/guarded-editing.md +0 -165
- package/dist/skills/ads-motion/references/layers.md +0 -145
- package/dist/skills/ads-motion/references/motion-review.md +0 -35
- package/dist/skills/ads-motion/references/reporting.md +0 -101
- package/dist/skills/ads-motion/references/review.md +0 -97
- package/dist/skills/ads-motion/references/runtimes.md +0 -203
- package/dist/skills/ads-motion/references/scenarios.md +0 -246
- package/dist/skills/ads-motion/references/validation.md +0 -166
- package/dist/skills/ads-motion/references/verification.md +0 -39
- package/dist/skills/ads-motion/references/workflows.md +0 -90
- package/dist/skills/ads-port/references/reporting.md +0 -101
- package/dist/starters/preact/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
- package/dist/starters/preact/design-system/components/Layout/Grid/Grid.tsx +0 -76
- package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.tsx +0 -29
- package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
- package/dist/starters/preact/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
- package/dist/starters/preact/design-system/review/token-preview/TokenPreview.tsx +0 -137
- package/dist/starters/preact/design-system/showcase/mcp/main.tsx +0 -6
- package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.fixture.ts +0 -7
- package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.fixture.ts +0 -7
- package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.contract.ts +0 -6
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.fixture.ts +0 -12
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.scenario.tsx +0 -17
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.tsx +0 -75
- package/dist/starters/react/design-system/components/Layout/Grid/README.md +0 -21
- package/dist/starters/react/design-system/review/brand-preview/BrandPreview.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/brand-preview/BrandPreview.tsx +0 -112
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.tsx +0 -29
- package/dist/starters/react/design-system/review/grid-cell/GridCell.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/grid-cell/GridCell.tsx +0 -18
- package/dist/starters/react/design-system/review/index.ts +0 -6
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
- package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.contract.ts +0 -6
- package/dist/starters/react/design-system/review/token-preview/TokenPreview.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/token-preview/TokenPreview.tsx +0 -137
- package/dist/starters/react/design-system/showcase/mcp/index.html +0 -1
- package/dist/starters/react/design-system/tokens/Color.ads.fixture.ts +0 -124
- package/dist/starters/react/design-system/tokens/Color.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Layout.ads.fixture.ts +0 -39
- package/dist/starters/react/design-system/tokens/Layout.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Motion.ads.fixture.ts +0 -18
- package/dist/starters/react/design-system/tokens/Motion.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Shape.ads.fixture.ts +0 -30
- package/dist/starters/react/design-system/tokens/Shape.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Space.ads.fixture.ts +0 -37
- package/dist/starters/react/design-system/tokens/Space.ads.scenario.tsx +0 -4
- package/dist/starters/react/design-system/tokens/Type.ads.fixture.ts +0 -29
- package/dist/starters/react/design-system/tokens/Type.ads.scenario.tsx +0 -4
- package/dist/starters/react/package-lock.json +0 -4707
- package/dist/token-fixtures.mjs +0 -30
- package/docs/benchmarks/bun-previews.md +0 -91
- package/docs/benchmarks/preview-memory.md +0 -147
- package/docs/benchmarks/turbo-poc.md +0 -284
- package/docs/plans/execution-coordination.md +0 -57
- /package/dist/{browser-audit → render-audit}/first-render.mjs +0 -0
- /package/dist/{browser-audit → render-audit}/layout-shift.mjs +0 -0
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
# Atomic style composition
|
|
2
|
-
|
|
3
|
-
Use this guide when creating or migrating component/pattern styles, changing
|
|
4
|
-
base/size/state combinations, or reviewing `atomic-composition-review` items.
|
|
5
|
-
It is also available as `ads://guides/atomic-styles` through ADS MCP.
|
|
6
|
-
|
|
7
|
-
## Why valid tokens can still render incorrectly
|
|
8
|
-
|
|
9
|
-
Atomic Linaria extracts declarations into reusable classes. `cx` from
|
|
10
|
-
`@linaria/atomic` or `@linaria/core` replaces earlier atoms with the same property
|
|
11
|
-
and selector/condition key. It does not expand every CSS shorthand or resolve
|
|
12
|
-
every overlap between physical and logical properties.
|
|
13
|
-
|
|
14
|
-
For example, these declarations have different atomic keys:
|
|
15
|
-
|
|
16
|
-
```tsx
|
|
17
|
-
const base = css`
|
|
18
|
-
padding: 0;
|
|
19
|
-
`;
|
|
20
|
-
const small = css`
|
|
21
|
-
padding-inline: var(--space-6);
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
cx(base, small);
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Both classes survive. Both declarations can affect horizontal padding in a
|
|
28
|
-
horizontal writing mode. In the inspected Linaria implementation, `padding` and
|
|
29
|
-
`padding-inline` receive equal specificity. If a reset atom is emitted later,
|
|
30
|
-
it can override the intended size. Shared atom reuse and CSS splitting can make
|
|
31
|
-
this visible in a larger build even when an isolated view appears correct.
|
|
32
|
-
The order of class names in HTML does not decide equal-specificity rule order.
|
|
33
|
-
Queries on one property therefore use exclusive ranges, such as
|
|
34
|
-
`(min-width: 768px) and (max-width: 1023.98px)` beside `(min-width: 1024px)`.
|
|
35
|
-
Valid tokens, successful extraction and a passing source check do not establish
|
|
36
|
-
the intended computed value.
|
|
37
|
-
|
|
38
|
-
See Linaria's [class merging implementation](https://github.com/callstack/linaria/blob/master/packages/core/src/cx.ts)
|
|
39
|
-
and [property priority implementation](https://github.com/callstack/linaria/blob/master/packages/atomic/src/processors/helpers/propertyPriority.ts).
|
|
40
|
-
Inspect the project's installed version when investigating its output.
|
|
41
|
-
|
|
42
|
-
## Prefer matching properties across composed blocks
|
|
43
|
-
|
|
44
|
-
Express the reset and overrides using the same property vocabulary:
|
|
45
|
-
|
|
46
|
-
```tsx
|
|
47
|
-
const base = css`
|
|
48
|
-
padding-block: 0;
|
|
49
|
-
padding-inline: 0;
|
|
50
|
-
`;
|
|
51
|
-
const small = css`
|
|
52
|
-
padding-inline: var(--space-6);
|
|
53
|
-
`;
|
|
54
|
-
const regular = css`
|
|
55
|
-
padding-block: var(--space-4);
|
|
56
|
-
padding-inline: var(--space-8);
|
|
57
|
-
`;
|
|
58
|
-
|
|
59
|
-
cx(base, compact ? small : regular);
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Now each selected size replaces the corresponding base atom through `cx`.
|
|
63
|
-
Review every size, including the default and icon-only variants. Changing only
|
|
64
|
-
one size can leave another size mixing shorthand and logical properties.
|
|
65
|
-
The names and tokens above are illustrative: use the project's real API and
|
|
66
|
-
declared tokens. Preserve its intended dimensions and supported writing modes.
|
|
67
|
-
|
|
68
|
-
The same reasoning applies to margin, inset, logical borders/corners, dimensions
|
|
69
|
-
and overflow. For example, prefer `margin-inline: 0` plus a size's
|
|
70
|
-
`margin-inline: var(...)` over combining `margin: 0` with that logical override.
|
|
71
|
-
Choose consistent physical properties when the product deliberately positions
|
|
72
|
-
against physical edges; logical properties are not mandatory.
|
|
73
|
-
|
|
74
|
-
An intentional state override may have a different selector or condition:
|
|
75
|
-
|
|
76
|
-
```tsx
|
|
77
|
-
const treatment = css`
|
|
78
|
-
padding-inline: var(--space-6);
|
|
79
|
-
&:hover { padding-inline: var(--space-8); }
|
|
80
|
-
`;
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
This is a distinct state, not two competing base atoms. Whether changing padding
|
|
84
|
-
on hover is desirable remains a product decision.
|
|
85
|
-
|
|
86
|
-
## Register typed custom properties without atomizing their descriptors
|
|
87
|
-
|
|
88
|
-
Use a literal `@property` in its component/pattern's Linaria template when the
|
|
89
|
-
browser needs a typed, interpolated runtime variable:
|
|
90
|
-
|
|
91
|
-
```tsx
|
|
92
|
-
const treatment = css`
|
|
93
|
-
@property --ds-example-progress {
|
|
94
|
-
syntax: "<number>";
|
|
95
|
-
inherits: false;
|
|
96
|
-
initial-value: 0;
|
|
97
|
-
}
|
|
98
|
-
opacity: var(--ds-example-progress);
|
|
99
|
-
`;
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
The identifier is illustrative; use a unique name owned by the real unit.
|
|
103
|
-
Registrations are document-global, even when authored beside one component.
|
|
104
|
-
Put them at template level or inside conditional at-rules, never element selectors.
|
|
105
|
-
Use the same ADS tag resolver described below in both product and preview builds;
|
|
106
|
-
it preserves each complete registration and its conditional context instead of
|
|
107
|
-
splitting syntax/inherits/initial-value into invalid atomic rules. This works for
|
|
108
|
-
atomic `css` and `styled`; the browser receives CSS without a registration runtime.
|
|
109
|
-
MCP delivers it inside the App document, not the outer showcase host.
|
|
110
|
-
|
|
111
|
-
`property-registration` validates descriptor shape, CSS syntax/initial-value and
|
|
112
|
-
ownership, and rejects conflicting schemas or registrations shared by unrelated
|
|
113
|
-
owners. Identical registrations from the same owner are permitted. Runtime
|
|
114
|
-
`--ds-*` / `--ux-*` variables stay with their runtime owner. A shared token's
|
|
115
|
-
registration belongs beside its actual definition in a foundation value sheet.
|
|
116
|
-
Neither `base.css` nor `fonts.css` becomes a registration escape hatch. Registration
|
|
117
|
-
alone does not define a token or satisfy its sample/fixture coverage.
|
|
118
|
-
|
|
119
|
-
Typed initial values must match their syntax and be computationally independent:
|
|
120
|
-
`0px` is valid metadata; `var(--space-4)`, `1rem` and `currentColor` are not.
|
|
121
|
-
The literal exemption applies only to registration descriptors. Keep design
|
|
122
|
-
assignments outside them token-backed; a technical fallback is not a place to
|
|
123
|
-
hide a component skin. Use literal static descriptors so guards can inspect them.
|
|
124
|
-
See the [W3C registration contract](https://www.w3.org/TR/css-properties-values-api-1/#at-property-rule).
|
|
125
|
-
|
|
126
|
-
Verify extracted CSS and actual interpolation, including after minification and
|
|
127
|
-
inside the MCP App. A declaration can parse while a browser ignores an invalid
|
|
128
|
-
registration. Keep required browser fallbacks and reduced-motion behavior; do not
|
|
129
|
-
replace a valid CSS implementation with script merely to evade extraction or a
|
|
130
|
-
guard limitation. These checks cover declarative registrations; arbitrary dynamic
|
|
131
|
-
`CSS.registerProperty()` calls are not an ownership proof.
|
|
132
|
-
|
|
133
|
-
## Preserve custom-property arithmetic during extraction
|
|
134
|
-
|
|
135
|
-
Custom properties can hold an unevaluated token stream that becomes arithmetic
|
|
136
|
-
only after substitution into a later `calc()`. For example:
|
|
137
|
-
|
|
138
|
-
```css
|
|
139
|
-
--i: 2;
|
|
140
|
-
--scale: var(--i) * 0.05 + 1;
|
|
141
|
-
transform: scale(calc(-1 * var(--scale)));
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
The result is scale `0.9`: substitution does not add parentheses around the
|
|
145
|
-
custom property. Some Linaria/Stylis extraction versions strip the whitespace
|
|
146
|
-
around the bare `+`, leaving `0.05+1`. The browser then treats the transform as
|
|
147
|
-
invalid. This can happen with CSS minification disabled. Source guards cannot
|
|
148
|
-
prove what a later extractor emits.
|
|
149
|
-
|
|
150
|
-
Use ADS's build-only resolver in **both** the application's Linaria configuration
|
|
151
|
-
and its separately configured MCP preview builder:
|
|
152
|
-
|
|
153
|
-
```js
|
|
154
|
-
import wyw from "@wyw-in-js/vite";
|
|
155
|
-
import { linariaTagResolver } from "@reqvire-org/ads/linaria";
|
|
156
|
-
|
|
157
|
-
// In the project's Vite plugins:
|
|
158
|
-
wyw({ tagResolver: linariaTagResolver });
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
The resolver keeps the project's installed atomic processor and preserves opaque
|
|
162
|
-
custom-property values through its nesting/atomization pass. It does not add a
|
|
163
|
-
browser runtime or alter token ownership. Existing projects must adopt it in
|
|
164
|
-
each extraction pipeline; upgrading ADS alone does not rewrite custom builders.
|
|
165
|
-
If an existing `tagResolver` handles other tags, delegate atomic imports to
|
|
166
|
-
`linariaTagResolver(source, tag)` and retain the existing fallback. WyW config
|
|
167
|
-
files also support this resolver when a build integration requires serializable
|
|
168
|
-
inline options.
|
|
169
|
-
|
|
170
|
-
For a source workaround, write a self-contained formula and consume it directly:
|
|
171
|
-
|
|
172
|
-
```css
|
|
173
|
-
--scale: calc(1 - var(--i) * 0.05);
|
|
174
|
-
transform: scale(var(--scale));
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
This also produces `0.9`. Simply wrapping the old value in `calc()` while keeping
|
|
178
|
-
the outer `-1 *` changes its grouping and result. Verify extracted CSS text and a
|
|
179
|
-
computed style after any rewrite, including nested `var()` fallbacks/transforms.
|
|
180
|
-
Do not globally insert spaces into already extracted CSS: that can change valid
|
|
181
|
-
signed numbers, identifiers, strings or URLs.
|
|
182
|
-
|
|
183
|
-
## Follow helpers and forwarded classes
|
|
184
|
-
|
|
185
|
-
Composition can cross a helper or a component boundary. For example, in component
|
|
186
|
-
implementation source:
|
|
187
|
-
|
|
188
|
-
```tsx
|
|
189
|
-
function baseClasses() { return base; }
|
|
190
|
-
function Primitive({ className, ...props }) {
|
|
191
|
-
return <button {...props} className={cx(baseClasses(), className)} />;
|
|
192
|
-
}
|
|
193
|
-
function CompactPrimitive(props) {
|
|
194
|
-
return <Primitive {...props} className={small} />;
|
|
195
|
-
}
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
The base and small atoms can reach the same button. Inspect both owners when
|
|
199
|
-
correcting their property vocabulary. The wrapper's class does not style every
|
|
200
|
-
descendant: a class on a child or sibling element is a separate composition.
|
|
201
|
-
An imported stylesheet alone does not show that its classes co-apply.
|
|
202
|
-
|
|
203
|
-
Spread order matters. `<button className={base} {...props} />` can replace the
|
|
204
|
-
entire className; `<button {...props} className={cx(base, className)} />` composes
|
|
205
|
-
it explicitly. Keep the product's intended forwarding behavior when fixing an
|
|
206
|
-
overlap. Do not change the public API simply to make tracing easier.
|
|
207
|
-
|
|
208
|
-
Review items include a bounded `composition` path through traced helpers and
|
|
209
|
-
components. A `target` identifies a statically reached DOM element. This
|
|
210
|
-
establishes source composition, not that a scenario mounted it or that its
|
|
211
|
-
computed result is wrong. `writingModeDependent: true` identifies overlaps that
|
|
212
|
-
change with direction or writing mode; evaluate those against supported modes.
|
|
213
|
-
Literal overlaps with provably equal values are omitted where the analyzer can
|
|
214
|
-
expand them safely. Token formulas, inheritance and runtime values still need
|
|
215
|
-
review. A margin shorthand and `margin-inline: auto` may agree horizontally but
|
|
216
|
-
disagree in vertical text, so horizontal equality alone is insufficient.
|
|
217
|
-
|
|
218
|
-
## Respond to a review item
|
|
219
|
-
|
|
220
|
-
1. Follow the review item's related file/line locations and inspect the actual `cx`
|
|
221
|
-
composition. Variant lookups may contribute several possible combinations.
|
|
222
|
-
2. In a current built preview, inspect computed properties and the winning CSS
|
|
223
|
-
rules. Establish whether extraction order, specificity, writing mode or an
|
|
224
|
-
intentional override explains the result.
|
|
225
|
-
3. For accidental overlap, align property names/granularity across the base and
|
|
226
|
-
affected variants. Use Linaria's `cx`, preserve tokens and fix the owning
|
|
227
|
-
component/pattern. Reordering class strings does not remove overlapping keys.
|
|
228
|
-
4. Verify the affected sizes/states and supported directions in the normal app
|
|
229
|
-
and preview build. Add a registered rendered check when a specific geometry
|
|
230
|
-
or computed-style guarantee matters.
|
|
231
|
-
|
|
232
|
-
Increasing specificity, adding `!important`, copying styles into scenarios or
|
|
233
|
-
moving component styling into `base.css` can hide the symptom while retaining
|
|
234
|
-
the conflict. Prefer resolving the composition itself. If an overlap is
|
|
235
|
-
intentional, document why its precedence is stable and verify the resulting
|
|
236
|
-
behavior rather than changing product capabilities to silence a review item.
|
|
237
|
-
|
|
238
|
-
Use existing behavior contracts and `ads_verify` for important geometry. Register
|
|
239
|
-
a check beside its owner, link its real scenario and use the project's browser
|
|
240
|
-
profile. An assertion can inspect the actual control in the App frame:
|
|
241
|
-
|
|
242
|
-
```ts
|
|
243
|
-
const frame = await openBehaviorScenario(page, "compact-spacing");
|
|
244
|
-
await expect(frame.getByRole("button", { name: "Compact" }))
|
|
245
|
-
.toHaveCSS("padding-inline-start", "8px");
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
The name, check ID and expected value above are examples. Derive assertions from
|
|
249
|
-
the project's intended API and design, with relevant variants, open/hover/focus
|
|
250
|
-
states, themes and supported writing modes. Wait for observable readiness; an
|
|
251
|
-
event-stream connection can prevent `networkidle` from settling. A generic
|
|
252
|
-
overlap scan cannot decide which dimensions the product intended. A failed
|
|
253
|
-
registered geometry assertion is blocking through the existing verification
|
|
254
|
-
contract; an overlap review item remains a review signal.
|
|
255
|
-
|
|
256
|
-
## What ADS checks
|
|
257
|
-
|
|
258
|
-
`atomic-composition-review` is a nonblocking review item, returned under `advisories`
|
|
259
|
-
with `severity: "review"`. CLI checks still exit successfully when there are no
|
|
260
|
-
errors; MCP checks and mutations preserve the review item and its guidance URI.
|
|
261
|
-
|
|
262
|
-
An unchanged advisory baseline is not evidence that the affected styles are
|
|
263
|
-
correct. Triage review items that reach an edited owner or its shared helpers against
|
|
264
|
-
the actual DOM classes and computed styles in a compiled scenario. Interaction
|
|
265
|
-
checks may pass without measuring padding, alignment or sizing. When an intended
|
|
266
|
-
layout is known, add a focused rendered assertion for that contract; when keeping
|
|
267
|
-
an overlap, state why it is intentional and which states/directions were checked.
|
|
268
|
-
Keep unresolved paths and unsupported writing modes explicit in the evidence.
|
|
269
|
-
|
|
270
|
-
The source review examines atomic Linaria templates and statically traceable
|
|
271
|
-
`cx` arguments, including aliases, local imports/re-exports, local helper returns,
|
|
272
|
-
arguments/defaults, nested composition, conditional expressions and variant-object
|
|
273
|
-
lookups. It follows explicit `className` forwarding through local function
|
|
274
|
-
components, props/rest spreads and imported React/Preact `memo`/`forwardRef`
|
|
275
|
-
wrappers to an intrinsic JSX element. It checks known overlaps involving box
|
|
276
|
-
spacing, inset, borders/corners, dimensions, overflow, backgrounds, typography,
|
|
277
|
-
motion and common layout shorthands, plus `all` resets. It compares shared selector/condition contexts; separate alternatives
|
|
278
|
-
within one conditional or lookup are not assumed to apply together. Matching
|
|
279
|
-
atomic property/selector/condition keys are replaced during traced `cx`
|
|
280
|
-
composition before comparing the surviving declarations.
|
|
281
|
-
|
|
282
|
-
This is a bounded source review, not a CSS engine or a proof of precedence. It
|
|
283
|
-
does not execute helpers or import project modules, enumerate every external
|
|
284
|
-
class, or model arbitrary runtime mutation, component rendering, selectors or
|
|
285
|
-
overlapping media queries. Recursive calls, unsupported call/control-flow paths,
|
|
286
|
-
unresolved DOM targets and traversal limits produce bounded
|
|
287
|
-
`atomic-composition-limit` informational advisories where known atomic styles
|
|
288
|
-
reach an unresolved composition. Ordinary externally supplied className values
|
|
289
|
-
remain open inputs, not guaranteed safe styles. Depth, work and alternative
|
|
290
|
-
limits keep source inspection bounded; an unreported path or an empty review
|
|
291
|
-
list does not establish visual correctness. Actual failed registered
|
|
292
|
-
browser/behavior checks remain blocking; potentially intentional source overlaps
|
|
293
|
-
remain review items.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Audit or plan motion
|
|
2
|
-
|
|
3
|
-
Start with the requested component/screen, not the entire repository. Map its
|
|
4
|
-
public inputs, state transitions, motion tokens, styles, geometry helpers,
|
|
5
|
-
timers, cleanup, and tests. Read nearby call sites to understand frequency and
|
|
6
|
-
composition. Track documented tradeoffs and accepted upstream comparisons.
|
|
7
|
-
|
|
8
|
-
Review using the categories in [motion-review.md](motion-review.md). Expand into rendering
|
|
9
|
-
performance only where observations or source evidence justify it; use
|
|
10
|
-
[performance.md](performance.md) if profiling is requested. An audit does not
|
|
11
|
-
silently apply production changes or rewrite configuration.
|
|
12
|
-
|
|
13
|
-
## Opportunities
|
|
14
|
-
|
|
15
|
-
When requested, suggest a small set of motion opportunities grounded in actual
|
|
16
|
-
state changes: new content, removal, selection, disclosure, or spatial movement.
|
|
17
|
-
For each, explain the user purpose, frequency, owner, and reduced-motion state.
|
|
18
|
-
Reject ideas that delay frequent input, duplicate existing feedback, or require
|
|
19
|
-
an unrelated library. It is valid to recommend no new animation.
|
|
20
|
-
|
|
21
|
-
## Implementation plans
|
|
22
|
-
|
|
23
|
-
If a plan is requested, make it executable against the inspected source:
|
|
24
|
-
|
|
25
|
-
1. Name the problem and its reproduction, including observed vs source-only
|
|
26
|
-
evidence. Record the revision or inspected snapshot; do not invent a Git
|
|
27
|
-
commit when the project has no committed source.
|
|
28
|
-
2. Identify owner files, public API implications, existing tokens, and any new
|
|
29
|
-
token definitions. Explain the intended state transitions and cancellation.
|
|
30
|
-
3. Describe the smallest coherent implementation, including geometry and exit
|
|
31
|
-
cleanup. Give exact changes where they resolve ambiguity; keep raw visual
|
|
32
|
-
constants in the token layer rather than embedding them in component samples.
|
|
33
|
-
4. List regression cases, real project commands, browser comparisons, and
|
|
34
|
-
practical limitations. Include reduced motion, interruption, and relevant
|
|
35
|
-
pointer/keyboard paths.
|
|
36
|
-
5. Record accepted differences, affected neighbors, source credits/notices, and
|
|
37
|
-
the local README updates needed after implementation.
|
|
38
|
-
|
|
39
|
-
Write a plan file only when the task or project workflow calls for one. Do not
|
|
40
|
-
create a parallel documentation tree for a small review. When implementation is
|
|
41
|
-
authorized, recheck the current source, execute the relevant plan, and update
|
|
42
|
-
the documentation to match what actually shipped. Ask only when a required
|
|
43
|
-
decision remains unresolved; routine implementation does not need another
|
|
44
|
-
confirmation after the user has already asked for it.
|