@reqvire-org/ads 0.5.0 → 0.5.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 +9 -6
- package/dist/ads-errors.mjs +382 -34
- package/dist/ads-views.mjs +4 -4
- package/dist/analysis/composition-axes.mjs +48 -0
- package/dist/analysis/construction-memo.mjs +38 -0
- package/dist/analysis/context.mjs +19 -0
- package/dist/analysis/design-reads.mjs +177 -0
- package/dist/analysis/design-usage.mjs +20 -4
- package/dist/analysis/factored-classes.mjs +90 -0
- package/dist/analysis/helpers.mjs +5 -7
- package/dist/analysis/mock-check.mjs +5 -4
- package/dist/analysis/native-project.mjs +12 -0
- package/dist/analysis/owner-analysis-cache.mjs +86 -23
- package/dist/analysis/owner-analysis-key.mjs +42 -10
- package/dist/analysis/owner-choices.mjs +195 -43
- package/dist/analysis/owner-composition.mjs +152 -43
- package/dist/analysis/owner-controls.mjs +27 -0
- package/dist/analysis/owner-reuse.mjs +8 -6
- package/dist/analysis/owner-source.mjs +309 -83
- package/dist/analysis/prose-owners.mjs +57 -0
- package/dist/analysis/scenario-keys.mjs +10 -7
- package/dist/analysis/service.mjs +50 -3
- package/dist/analysis/standalone.mjs +7 -4
- package/dist/analysis/styling-ownership.mjs +22 -0
- package/dist/analysis/syntax.mjs +59 -1
- package/dist/analysis/worker-protocol.mjs +14 -2
- package/dist/analysis/worker.mjs +32 -10
- package/dist/architecture-report.mjs +26 -0
- package/dist/asset-view-facts.mjs +16 -2
- package/dist/boundaries.mjs +26 -10
- package/dist/bun-compiler.mjs +2 -2
- package/dist/check-service.mjs +29 -17
- package/dist/check.mjs +20 -7
- package/dist/cli-arguments.mjs +2 -2
- package/dist/cli.mjs +4 -4
- package/dist/composed-contrast.mjs +28 -8
- package/dist/composed-keyline.mjs +107 -0
- package/dist/config.mjs +2 -1
- package/dist/construction-output.mjs +149 -20
- package/dist/construction-spec.d.mts +320 -12
- package/dist/construction-spec.mjs +452 -69
- package/dist/corner-overpaint.mjs +65 -0
- package/dist/derived-states.mjs +182 -0
- package/dist/design-foundation.mjs +6 -1
- package/dist/design-inputs.mjs +18 -3
- package/dist/design-system-closure.mjs +12 -7
- package/dist/design-usage.mjs +8 -2
- package/dist/emit/contract.mjs +24 -5
- package/dist/emit/emission.mjs +14 -5
- package/dist/emit/font-emission.mjs +21 -1
- package/dist/emit/foundation-sheet.mjs +6 -5
- package/dist/emit/integrity.mjs +8 -2
- package/dist/emit/output-watch.mjs +120 -0
- package/dist/emit/owner-emission-cache.mjs +4 -4
- package/dist/emit/preview-emitter.mjs +4 -2
- package/dist/emit/preview-tree.mjs +1 -1
- package/dist/emit/service.mjs +8 -2
- package/dist/finding-rules.mjs +10 -0
- package/dist/font-checks.mjs +42 -0
- package/dist/font-declaration.d.mts +10 -0
- package/dist/font-declaration.mjs +25 -3
- package/dist/font-fallback.d.mts +37 -0
- package/dist/font-fallback.mjs +25 -0
- package/dist/font-macro.d.mts +10 -0
- package/dist/font-metrics.d.mts +34 -0
- package/dist/font-metrics.mjs +314 -0
- package/dist/font-model.mjs +28 -2
- package/dist/form-states.mjs +8 -0
- package/dist/foundation-macro.d.mts +1 -1
- package/dist/frame-regions.mjs +92 -9
- package/dist/grid-facts.mjs +72 -16
- package/dist/grid-lowering.mjs +11 -5
- package/dist/hover-geometry.mjs +15 -0
- package/dist/init.mjs +14 -23
- package/dist/input-digests.mjs +17 -10
- package/dist/linaria/delivery.mjs +2 -0
- package/dist/lowering-enter.mjs +31 -0
- package/dist/lowering-properties.mjs +27 -1
- package/dist/lowering-region-layout.mjs +49 -10
- package/dist/lowering-sequence.mjs +89 -0
- package/dist/lowering-session.mjs +7 -0
- package/dist/lowering-transitions.mjs +22 -8
- package/dist/mcp/build-status.mjs +9 -1
- package/dist/mcp/compiler-channel.mjs +11 -4
- package/dist/mcp/mutations.mjs +1 -0
- package/dist/mcp/preview-http.bundle.js +2 -2
- package/dist/mcp/preview-watch.mjs +2 -1
- package/dist/mcp/preview-widget.bundle.js +5 -5
- package/dist/motion-model.mjs +3 -1
- package/dist/owner-analysis-check.mjs +86 -12
- package/dist/owner-errors.mjs +20 -2
- package/dist/owner-lowering.mjs +104 -25
- package/dist/owner-scenarios.mjs +29 -4
- package/dist/ownership-model.mjs +37 -4
- package/dist/paint-contrast.mjs +5 -0
- package/dist/placeholder-contrast.mjs +18 -1
- package/dist/platform-features.mjs +35 -2
- package/dist/preview-bun.mjs +17 -16
- package/dist/preview-controls.mjs +35 -0
- package/dist/preview-incremental.mjs +1 -1
- package/dist/preview-source.mjs +2 -2
- package/dist/profile-macro.d.mts +15 -0
- package/dist/profile-model.mjs +3 -3
- package/dist/profile-view-facts.mjs +55 -4
- package/dist/prose-model.d.mts +81 -0
- package/dist/prose-model.mjs +101 -0
- package/dist/recipe-macro.d.mts +176 -15
- package/dist/recipe-model.mjs +35 -7
- package/dist/region-lowering.mjs +463 -65
- package/dist/render-audit/corner-overpaint.page.mjs +54 -0
- package/dist/render-audit/layout-shift.page.mjs +24 -0
- package/dist/render-audit/render-states.mjs +122 -1
- package/dist/render-audit/render-states.page.mjs +140 -0
- package/dist/render-audit/worker.mjs +23 -3
- package/dist/render-audit.mjs +139 -1
- package/dist/role-vocabulary.d.mts +43 -2
- package/dist/role-vocabulary.mjs +50 -4
- package/dist/scenario-kit.d.mts +6 -0
- package/dist/scenario-registry.mjs +1 -1
- package/dist/scenarios-compiler.mjs +20 -6
- package/dist/scheme-switch.d.mts +8 -0
- package/dist/scheme-switch.mjs +1 -0
- package/dist/showcase/ads-views.mjs +116 -53
- package/dist/showcase/assets-view.mjs +136 -89
- package/dist/showcase/client.bundle.js +65 -65
- package/dist/showcase/http-client.bundle.js +17 -17
- package/dist/showcase/preview-frame.css +2 -0
- package/dist/showcase/profiles-view.mjs +163 -122
- package/dist/showcase/scenario-page.d.mts +11 -1
- package/dist/showcase/scenario-page.mjs +18 -3
- package/dist/showcase/token-sample.mjs +47 -4
- package/dist/showcase/tokens-view.mjs +82 -34
- package/dist/showcase/ui/ui.css +1 -1
- package/dist/showcase/ui/ui.js +5 -5
- package/dist/skills/README.md +5 -5
- package/dist/skills/ads-designer/README.md +1 -1
- package/dist/skills/ads-designer/SKILL.md +13 -12
- package/dist/skills/ads-designer/references/accessibility.md +9 -2
- package/dist/skills/ads-designer/references/atomic-styles.md +8 -1
- package/dist/skills/ads-designer/references/branding.md +20 -5
- package/dist/skills/ads-designer/references/cli.md +4 -4
- package/dist/skills/ads-designer/references/contracts.md +14 -4
- package/dist/skills/ads-designer/references/design-craft.md +1 -1
- package/dist/skills/ads-designer/references/design-data.md +3 -3
- package/dist/skills/ads-designer/references/forms.md +6 -6
- package/dist/skills/ads-designer/references/layout.md +46 -3
- package/dist/skills/ads-designer/references/motion.md +45 -1
- package/dist/skills/ads-designer/references/performance.md +7 -1
- package/dist/skills/ads-designer/references/recipes.md +92 -7
- package/dist/skills/ads-designer/references/runtimes.md +1 -1
- package/dist/skills/ads-designer/references/scenarios.md +1 -0
- package/dist/skills/ads-import/references/atomic-styles.md +8 -1
- package/dist/skills/ads-import/references/cli.md +4 -4
- package/dist/skills/ads-import/references/contracts.md +14 -4
- package/dist/skills/ads-import/references/design-data.md +3 -3
- package/dist/skills/ads-import/references/forms.md +6 -6
- package/dist/skills/ads-import/references/layout.md +46 -3
- package/dist/skills/ads-import/references/recipes.md +92 -7
- package/dist/skills/ads-import/references/runtimes.md +1 -1
- package/dist/skills/ads-import/references/scenarios.md +1 -0
- package/dist/skills/ads-migrate/SKILL.md +3 -1
- package/dist/skills/ads-migrate/references/0.5.0-to-0.5.1.md +239 -0
- package/dist/skills/ads-migrate/references/0.5.1-to-0.5.2.md +185 -0
- package/dist/skills/ads-port/references/atomic-styles.md +8 -1
- package/dist/skills/ads-port/references/cli.md +4 -4
- package/dist/skills/ads-port/references/contracts.md +14 -4
- package/dist/skills/ads-port/references/design-data.md +3 -3
- package/dist/skills/ads-port/references/forms.md +6 -6
- package/dist/skills/ads-port/references/layout.md +46 -3
- package/dist/skills/ads-port/references/recipes.md +92 -7
- package/dist/skills/ads-port/references/runtimes.md +1 -1
- package/dist/skills/ads-port/references/scenarios.md +1 -0
- package/dist/spatial-model.mjs +20 -4
- package/dist/state-conditions.d.mts +29 -0
- package/dist/state-conditions.mjs +42 -2
- package/dist/surface-contrast.mjs +69 -10
- package/dist/surface-effects.mjs +100 -0
- package/dist/target-size.mjs +1 -1
- package/dist/task-cache.mjs +9 -19
- package/dist/token-dtcg.mjs +1 -0
- package/dist/token-view-facts.mjs +54 -5
- package/dist/unreached-sources.mjs +5 -0
- package/dist/validation-checks.mjs +1 -1
- package/dist/validation.mjs +1 -1
- package/docs/ADS.md +36 -13
- package/docs/ARCHITECTURE.md +223 -23
- package/docs/ASSETS.md +81 -10
- package/docs/CACHING.md +152 -24
- package/docs/CHANGELOG.md +525 -23
- package/docs/DESIGN-REFERENCES.md +5 -5
- package/docs/GUIDE.md +286 -73
- package/docs/LANGUAGE.md +428 -24
- package/docs/LOWERING.md +13 -1
- package/docs/MOTION.md +241 -7
- package/docs/PROFILE-KINDS.md +176 -14
- package/docs/PROFILES.md +2 -2
- package/docs/RULES.md +63 -24
- package/docs/TOKEN-ROLES.md +15 -7
- package/package.json +1 -1
- package/dist/starter-files.mjs +0 -155
- package/dist/starter-overlay.mjs +0 -189
- package/dist/starters/preact/design-system/assets/avatars/avatar.ads.ts +0 -10
- package/dist/starters/preact/design-system/assets/avatars/member.svg +0 -1
- package/dist/starters/preact/design-system/assets/brand/emblem.ads.ts +0 -18
- package/dist/starters/preact/design-system/assets/brand/emblem.svg +0 -4
- package/dist/starters/preact/design-system/assets/brand/iris-emblem.ads.ts +0 -14
- package/dist/starters/preact/design-system/assets/brand/iris-emblem.svg +0 -4
- package/dist/starters/preact/design-system/assets/brand/mark.ads.ts +0 -14
- package/dist/starters/preact/design-system/assets/brand/mark.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/arrow.ads.ts +0 -14
- package/dist/starters/preact/design-system/assets/glyphs/arrow.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/chevron-20.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/chevron-24.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/chevron.ads.ts +0 -20
- package/dist/starters/preact/design-system/assets/glyphs/close.ads.ts +0 -13
- package/dist/starters/preact/design-system/assets/glyphs/close.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/favorite.ads.ts +0 -23
- package/dist/starters/preact/design-system/assets/glyphs/favorite.normal.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/favorite.selected.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/search.ads.ts +0 -10
- package/dist/starters/preact/design-system/assets/glyphs/search.svg +0 -1
- package/dist/starters/preact/design-system/assets/illustrations/journey.ads.ts +0 -32
- package/dist/starters/preact/design-system/assets/illustrations/journey.contrast.svg +0 -6
- package/dist/starters/preact/design-system/assets/illustrations/journey.dark.svg +0 -13
- package/dist/starters/preact/design-system/assets/illustrations/journey.light.svg +0 -13
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.ads.ts +0 -17
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.dark.svg +0 -10
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.light.svg +0 -10
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.ads.ts +0 -15
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.dark.svg +0 -9
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.light.svg +0 -9
- package/dist/starters/preact/design-system/assets/status/error.svg +0 -1
- package/dist/starters/preact/design-system/assets/status/outcomes.ads.ts +0 -31
- package/dist/starters/preact/design-system/assets/status/status.ads.ts +0 -16
- package/dist/starters/preact/design-system/assets/status/success.svg +0 -1
- package/dist/starters/preact/design-system/assets/status/sync-status.ads.ts +0 -14
- package/dist/starters/preact/design-system/assets/status/sync-status.svg +0 -7
- package/dist/starters/preact/design-system/assets/status/warning.svg +0 -1
- package/dist/starters/preact/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -12
- package/dist/starters/preact/design-system/components/Actions/Button/Button.tsx +0 -198
- package/dist/starters/preact/design-system/components/Actions/IconButton/IconButton.tsx +0 -95
- package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +0 -22
- package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.tsx +0 -60
- package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +0 -24
- package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.tsx +0 -50
- package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +0 -8
- package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.tsx +0 -110
- package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +0 -25
- package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.tsx +0 -72
- package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +0 -8
- package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.tsx +0 -43
- package/dist/starters/preact/design-system/components/Content/Icon/Icon.ads.scenario.tsx +0 -21
- package/dist/starters/preact/design-system/components/Content/Icon/Icon.tsx +0 -41
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/arrow.tsx +0 -10
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/close.tsx +0 -10
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/search.tsx +0 -10
- package/dist/starters/preact/design-system/components/Content/Image/Image.ads.fixture.ts +0 -9
- package/dist/starters/preact/design-system/components/Content/Image/Image.ads.scenario.tsx +0 -12
- package/dist/starters/preact/design-system/components/Content/Image/Image.tsx +0 -83
- package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +0 -27
- package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +0 -46
- package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +0 -17
- package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +0 -41
- package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +0 -20
- package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.tsx +0 -37
- package/dist/starters/preact/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -24
- package/dist/starters/preact/design-system/components/Forms/TextField/TextField.tsx +0 -173
- package/dist/starters/preact/design-system/components/Identity/Identity.ads.scenario.tsx +0 -13
- package/dist/starters/preact/design-system/components/Identity/Identity.tsx +0 -146
- package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +0 -27
- package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.tsx +0 -194
- package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +0 -19
- package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.tsx +0 -37
- package/dist/starters/preact/design-system/controllers/FormField/FormField.ads.behavior.ts +0 -70
- package/dist/starters/preact/design-system/controllers/FormField/FormField.behavior.spec.ts +0 -237
- package/dist/starters/preact/design-system/controllers/FormField/FormField.ts +0 -343
- package/dist/starters/preact/design-system/controllers/FormField/useFormField.ts +0 -70
- package/dist/starters/preact/design-system/controllers/Palette/Palette.ts +0 -165
- package/dist/starters/preact/design-system/foundation.ads.ts +0 -22
- package/dist/starters/preact/design-system/index.ts +0 -51
- package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +0 -5
- package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +0 -22
- package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.fixture.ts +0 -12
- package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +0 -21
- package/dist/starters/preact/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +0 -24
- package/dist/starters/preact/design-system/mocks/Workspace/Media.ads.scenario.tsx +0 -24
- package/dist/starters/preact/design-system/mocks/Workspace/Stress.ads.scenario.tsx +0 -36
- package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.fixture.ts +0 -13
- package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +0 -27
- package/dist/starters/preact/design-system/mocks/Workspace/media/ads.svg +0 -1
- package/dist/starters/preact/design-system/palette.generated.ts +0 -188
- package/dist/starters/preact/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +0 -73
- package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +0 -23
- package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +0 -94
- package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +0 -21
- package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.tsx +0 -137
- package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +0 -22
- package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.tsx +0 -248
- package/dist/starters/preact/design-system/patterns/Shell/Shell.ads.scenario.tsx +0 -26
- package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +0 -268
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +0 -28
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.tsx +0 -105
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +0 -179
- package/dist/starters/preact/design-system/profiles/Containers/containers.ads.ts +0 -67
- package/dist/starters/preact/design-system/profiles/Containers/frames.ads.ts +0 -32
- package/dist/starters/preact/design-system/profiles/Containers/geometry.ads.ts +0 -30
- package/dist/starters/preact/design-system/profiles/Containers/spacing.ads.ts +0 -26
- package/dist/starters/preact/design-system/profiles/Controls/controls.ads.ts +0 -157
- package/dist/starters/preact/design-system/profiles/Controls/frames.ads.ts +0 -50
- package/dist/starters/preact/design-system/profiles/Controls/spacing.ads.ts +0 -29
- package/dist/starters/preact/design-system/profiles/Focus/keyboard.ads.ts +0 -13
- package/dist/starters/preact/design-system/profiles/Identity/identity.ads.ts +0 -25
- package/dist/starters/preact/design-system/profiles/Identity/spacing.ads.ts +0 -22
- package/dist/starters/preact/design-system/profiles/Layout/grid.ads.ts +0 -69
- package/dist/starters/preact/design-system/profiles/Layout/inspector.ads.ts +0 -146
- package/dist/starters/preact/design-system/profiles/Layout/overlays.ads.ts +0 -94
- package/dist/starters/preact/design-system/profiles/Layout/regions.ads.ts +0 -296
- package/dist/starters/preact/design-system/profiles/Motion/feedback.ads.ts +0 -92
- package/dist/starters/preact/design-system/profiles/Surfaces/controls.ads.ts +0 -142
- package/dist/starters/preact/design-system/profiles/Surfaces/document.ads.ts +0 -2
- package/dist/starters/preact/design-system/profiles/Surfaces/materials.ads.ts +0 -18
- package/dist/starters/preact/design-system/profiles/Surfaces/surfaces.ads.ts +0 -48
- package/dist/starters/preact/design-system/profiles/Typography/details.ads.ts +0 -19
- package/dist/starters/preact/design-system/profiles/Typography/document.ads.ts +0 -2
- package/dist/starters/preact/design-system/profiles/Typography/headings.ads.ts +0 -15
- package/dist/starters/preact/design-system/profiles/Typography/text.ads.ts +0 -73
- package/dist/starters/preact/design-system/profiles/Visuals/artwork.ads.ts +0 -46
- package/dist/starters/preact/design-system/profiles/Visuals/charts.ads.ts +0 -31
- package/dist/starters/preact/design-system/profiles/Visuals/content.ads.ts +0 -52
- package/dist/starters/preact/design-system/profiles/Visuals/glyphs.ads.ts +0 -35
- package/dist/starters/preact/design-system/profiles/Visuals/identity.ads.ts +0 -24
- package/dist/starters/preact/design-system/tokens/Artwork/paint.ads.css +0 -7
- package/dist/starters/preact/design-system/tokens/Artwork/visual-size.ads.css +0 -12
- package/dist/starters/preact/design-system/tokens/Brand/paint.ads.css +0 -7
- package/dist/starters/preact/design-system/tokens/Charts/paint.ads.css +0 -19
- package/dist/starters/preact/design-system/tokens/Containers/border-width.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Containers/content-gap.ads.css +0 -5
- package/dist/starters/preact/design-system/tokens/Containers/frame-inset.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Containers/frame-size.ads.css +0 -11
- package/dist/starters/preact/design-system/tokens/Containers/radius.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Controls/border-width.ads.css +0 -4
- package/dist/starters/preact/design-system/tokens/Controls/content-gap.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Controls/control-min-size.ads.css +0 -17
- package/dist/starters/preact/design-system/tokens/Controls/frame-inset.ads.css +0 -21
- package/dist/starters/preact/design-system/tokens/Controls/radius.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Controls/target-min-size.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Controls/visual-size.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Focus/border-width.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Focus/focus-offset.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Foundation/spacing.ads.css +0 -20
- package/dist/starters/preact/design-system/tokens/Grid/grid-gutter.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Grid/layer.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Grid/layout-size.ads.css +0 -15
- package/dist/starters/preact/design-system/tokens/Grid/spacing.ads.css +0 -12
- package/dist/starters/preact/design-system/tokens/Grid/track-count.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Identity/content-gap.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Identity/visual-size.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Motion/duration.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Motion/easing.ads.css +0 -5
- package/dist/starters/preact/design-system/tokens/Motion/motion-angle.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Motion/motion-distance.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Motion/motion-scale.ads.css +0 -9
- package/dist/starters/preact/design-system/tokens/Surfaces/blur.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Surfaces/gradient.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Surfaces/opacity.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Surfaces/paint.ads.css +0 -58
- package/dist/starters/preact/design-system/tokens/Surfaces/shadow.ads.css +0 -20
- package/dist/starters/preact/design-system/tokens/Typography/font-family.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/font-features.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/font-size.ads.css +0 -9
- package/dist/starters/preact/design-system/tokens/Typography/font-stretch.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/font-variations.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/font-weight.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/letter-spacing.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/line-height.ads.css +0 -11
- package/dist/starters/preact/design-system/tokens/Typography/word-spacing.ads.css +0 -1
- package/dist/starters/preact/starter.json +0 -11
- package/dist/starters/react/design-system/assets/avatars/avatar.ads.ts +0 -10
- package/dist/starters/react/design-system/assets/avatars/member.svg +0 -1
- package/dist/starters/react/design-system/assets/brand/emblem.ads.ts +0 -18
- package/dist/starters/react/design-system/assets/brand/emblem.svg +0 -4
- package/dist/starters/react/design-system/assets/brand/iris-emblem.ads.ts +0 -14
- package/dist/starters/react/design-system/assets/brand/iris-emblem.svg +0 -4
- package/dist/starters/react/design-system/assets/brand/mark.ads.ts +0 -14
- package/dist/starters/react/design-system/assets/brand/mark.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/arrow.ads.ts +0 -14
- package/dist/starters/react/design-system/assets/glyphs/arrow.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron-20.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron-24.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron.ads.ts +0 -20
- package/dist/starters/react/design-system/assets/glyphs/close.ads.ts +0 -13
- package/dist/starters/react/design-system/assets/glyphs/close.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/favorite.ads.ts +0 -23
- package/dist/starters/react/design-system/assets/glyphs/favorite.normal.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/favorite.selected.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/search.ads.ts +0 -10
- package/dist/starters/react/design-system/assets/glyphs/search.svg +0 -1
- package/dist/starters/react/design-system/assets/illustrations/journey.ads.ts +0 -32
- package/dist/starters/react/design-system/assets/illustrations/journey.contrast.svg +0 -6
- package/dist/starters/react/design-system/assets/illustrations/journey.dark.svg +0 -13
- package/dist/starters/react/design-system/assets/illustrations/journey.light.svg +0 -13
- package/dist/starters/react/design-system/assets/logos/harbor-pay.ads.ts +0 -17
- package/dist/starters/react/design-system/assets/logos/harbor-pay.dark.svg +0 -10
- package/dist/starters/react/design-system/assets/logos/harbor-pay.light.svg +0 -10
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.ads.ts +0 -15
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.dark.svg +0 -9
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.light.svg +0 -9
- package/dist/starters/react/design-system/assets/status/error.svg +0 -1
- package/dist/starters/react/design-system/assets/status/outcomes.ads.ts +0 -31
- package/dist/starters/react/design-system/assets/status/status.ads.ts +0 -16
- package/dist/starters/react/design-system/assets/status/success.svg +0 -1
- package/dist/starters/react/design-system/assets/status/sync-status.ads.ts +0 -14
- package/dist/starters/react/design-system/assets/status/sync-status.svg +0 -7
- package/dist/starters/react/design-system/assets/status/warning.svg +0 -1
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -12
- package/dist/starters/react/design-system/components/Actions/Button/Button.tsx +0 -198
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +0 -95
- package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +0 -22
- package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.tsx +0 -60
- package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +0 -24
- package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.tsx +0 -50
- package/dist/starters/react/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +0 -8
- package/dist/starters/react/design-system/components/Content/Artwork/Artwork.tsx +0 -110
- package/dist/starters/react/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +0 -25
- package/dist/starters/react/design-system/components/Content/BarChart/BarChart.tsx +0 -72
- package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +0 -8
- package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.tsx +0 -43
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +0 -21
- package/dist/starters/react/design-system/components/Content/Icon/Icon.tsx +0 -41
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/arrow.tsx +0 -10
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/close.tsx +0 -10
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/search.tsx +0 -10
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.fixture.ts +0 -9
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.scenario.tsx +0 -12
- package/dist/starters/react/design-system/components/Content/Image/Image.tsx +0 -83
- package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +0 -27
- package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +0 -46
- package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +0 -17
- package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +0 -41
- package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +0 -20
- package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.tsx +0 -37
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -24
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.tsx +0 -173
- package/dist/starters/react/design-system/components/Identity/Identity.ads.scenario.tsx +0 -13
- package/dist/starters/react/design-system/components/Identity/Identity.tsx +0 -146
- package/dist/starters/react/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +0 -27
- package/dist/starters/react/design-system/components/Overlays/Menu/Menu.tsx +0 -194
- package/dist/starters/react/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +0 -19
- package/dist/starters/react/design-system/components/Overlays/Popover/Popover.tsx +0 -37
- package/dist/starters/react/design-system/controllers/FormField/FormField.ads.behavior.ts +0 -70
- package/dist/starters/react/design-system/controllers/FormField/FormField.behavior.spec.ts +0 -237
- package/dist/starters/react/design-system/controllers/FormField/FormField.ts +0 -343
- package/dist/starters/react/design-system/controllers/FormField/useFormField.ts +0 -70
- package/dist/starters/react/design-system/controllers/Palette/Palette.ts +0 -165
- package/dist/starters/react/design-system/foundation.ads.ts +0 -22
- package/dist/starters/react/design-system/index.ts +0 -51
- package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +0 -5
- package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +0 -22
- package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.fixture.ts +0 -12
- package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +0 -21
- package/dist/starters/react/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +0 -24
- package/dist/starters/react/design-system/mocks/Workspace/Media.ads.scenario.tsx +0 -24
- package/dist/starters/react/design-system/mocks/Workspace/Stress.ads.scenario.tsx +0 -36
- package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.fixture.ts +0 -13
- package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +0 -27
- package/dist/starters/react/design-system/mocks/Workspace/media/ads.svg +0 -1
- package/dist/starters/react/design-system/palette.generated.ts +0 -188
- package/dist/starters/react/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +0 -73
- package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +0 -23
- package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +0 -94
- package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +0 -21
- package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.tsx +0 -137
- package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +0 -22
- package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.tsx +0 -248
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +0 -26
- package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +0 -268
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +0 -28
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.tsx +0 -105
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +0 -179
- package/dist/starters/react/design-system/profiles/Containers/containers.ads.ts +0 -67
- package/dist/starters/react/design-system/profiles/Containers/frames.ads.ts +0 -32
- package/dist/starters/react/design-system/profiles/Containers/geometry.ads.ts +0 -30
- package/dist/starters/react/design-system/profiles/Containers/spacing.ads.ts +0 -26
- package/dist/starters/react/design-system/profiles/Controls/controls.ads.ts +0 -157
- package/dist/starters/react/design-system/profiles/Controls/frames.ads.ts +0 -50
- package/dist/starters/react/design-system/profiles/Controls/spacing.ads.ts +0 -29
- package/dist/starters/react/design-system/profiles/Focus/keyboard.ads.ts +0 -13
- package/dist/starters/react/design-system/profiles/Identity/identity.ads.ts +0 -25
- package/dist/starters/react/design-system/profiles/Identity/spacing.ads.ts +0 -22
- package/dist/starters/react/design-system/profiles/Layout/grid.ads.ts +0 -69
- package/dist/starters/react/design-system/profiles/Layout/inspector.ads.ts +0 -146
- package/dist/starters/react/design-system/profiles/Layout/overlays.ads.ts +0 -94
- package/dist/starters/react/design-system/profiles/Layout/regions.ads.ts +0 -296
- package/dist/starters/react/design-system/profiles/Motion/feedback.ads.ts +0 -92
- package/dist/starters/react/design-system/profiles/Surfaces/controls.ads.ts +0 -142
- package/dist/starters/react/design-system/profiles/Surfaces/document.ads.ts +0 -2
- package/dist/starters/react/design-system/profiles/Surfaces/materials.ads.ts +0 -18
- package/dist/starters/react/design-system/profiles/Surfaces/surfaces.ads.ts +0 -48
- package/dist/starters/react/design-system/profiles/Typography/details.ads.ts +0 -19
- package/dist/starters/react/design-system/profiles/Typography/document.ads.ts +0 -2
- package/dist/starters/react/design-system/profiles/Typography/headings.ads.ts +0 -15
- package/dist/starters/react/design-system/profiles/Typography/text.ads.ts +0 -73
- package/dist/starters/react/design-system/profiles/Visuals/artwork.ads.ts +0 -46
- package/dist/starters/react/design-system/profiles/Visuals/charts.ads.ts +0 -31
- package/dist/starters/react/design-system/profiles/Visuals/content.ads.ts +0 -52
- package/dist/starters/react/design-system/profiles/Visuals/glyphs.ads.ts +0 -35
- package/dist/starters/react/design-system/profiles/Visuals/identity.ads.ts +0 -24
- package/dist/starters/react/design-system/tokens/Artwork/paint.ads.css +0 -7
- package/dist/starters/react/design-system/tokens/Artwork/visual-size.ads.css +0 -12
- package/dist/starters/react/design-system/tokens/Brand/paint.ads.css +0 -7
- package/dist/starters/react/design-system/tokens/Charts/paint.ads.css +0 -19
- package/dist/starters/react/design-system/tokens/Containers/border-width.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Containers/content-gap.ads.css +0 -5
- package/dist/starters/react/design-system/tokens/Containers/frame-inset.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Containers/frame-size.ads.css +0 -11
- package/dist/starters/react/design-system/tokens/Containers/radius.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Controls/border-width.ads.css +0 -4
- package/dist/starters/react/design-system/tokens/Controls/content-gap.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Controls/control-min-size.ads.css +0 -17
- package/dist/starters/react/design-system/tokens/Controls/frame-inset.ads.css +0 -21
- package/dist/starters/react/design-system/tokens/Controls/radius.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Controls/target-min-size.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Controls/visual-size.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Focus/border-width.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Focus/focus-offset.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Foundation/spacing.ads.css +0 -20
- package/dist/starters/react/design-system/tokens/Grid/grid-gutter.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Grid/layer.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Grid/layout-size.ads.css +0 -15
- package/dist/starters/react/design-system/tokens/Grid/spacing.ads.css +0 -12
- package/dist/starters/react/design-system/tokens/Grid/track-count.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Identity/content-gap.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Identity/visual-size.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Motion/duration.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Motion/easing.ads.css +0 -5
- package/dist/starters/react/design-system/tokens/Motion/motion-angle.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Motion/motion-distance.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Motion/motion-scale.ads.css +0 -9
- package/dist/starters/react/design-system/tokens/Surfaces/blur.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Surfaces/gradient.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Surfaces/opacity.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Surfaces/paint.ads.css +0 -58
- package/dist/starters/react/design-system/tokens/Surfaces/shadow.ads.css +0 -20
- package/dist/starters/react/design-system/tokens/Typography/font-family.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/font-features.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/font-size.ads.css +0 -9
- package/dist/starters/react/design-system/tokens/Typography/font-stretch.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/font-variations.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/font-weight.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/letter-spacing.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/line-height.ads.css +0 -11
- package/dist/starters/react/design-system/tokens/Typography/word-spacing.ads.css +0 -1
- package/dist/starters/react/starter.json +0 -11
- package/docs/STARTER.md +0 -167
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -111,24 +111,26 @@ What an application imports from ADS in its own build works under Node. The Bun
|
|
|
111
111
|
tooling choice is separate from the UI framework and adds no Node or Bun
|
|
112
112
|
dependency to deployed components.
|
|
113
113
|
|
|
114
|
-
### Frameworks
|
|
114
|
+
### Frameworks
|
|
115
115
|
|
|
116
116
|
The project declares its framework in `ds.config.json`: React or native Preact.
|
|
117
117
|
The framework's own JSX runtime and hooks module type the owners, emission
|
|
118
118
|
writes its JSX runtime, and a package of the other framework is an error.
|
|
119
119
|
Additional frameworks need explicit tooling support.
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
The package ships no design system. `ads init --framework react` (or
|
|
122
|
+
`preact`), run inside an existing project, writes the configuration and the
|
|
123
|
+
dependencies and creates an empty design-system folder for the project to
|
|
124
|
+
author in. It never replaces a project file, edits `.gitignore` or writes a
|
|
125
|
+
lockfile.
|
|
125
126
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
ADS tests itself with one example design system, written for React
|
|
128
|
+
(`tests/fixtures/starter-project/`). The build writes its declared file set
|
|
129
|
+
and, through an overlay (`tests/helpers/starter/starter-overlay.mts`), a native
|
|
130
|
+
Preact copy of the same source to `.ds/test-starters/`, outside the package;
|
|
131
|
+
the overlay stops the build on a React API without a declared Preact
|
|
132
|
+
counterpart. The tests install it after `ads init`
|
|
133
|
+
(`tests/helpers/starter-project.mjs`).
|
|
132
134
|
|
|
133
135
|
### No production runtime
|
|
134
136
|
|
|
@@ -216,6 +218,17 @@ Authors write the contexts on `:root` only; emission applies them to sections
|
|
|
216
218
|
in the foundation's identity and an edit re-emits every sheet. Without the flag
|
|
217
219
|
the emitted bytes carry no toggle, section rule or section `color-scheme`.
|
|
218
220
|
|
|
221
|
+
Every rule of `foundation.css` that sets `color-scheme` (the `:root` default,
|
|
222
|
+
`:root[data-theme]`, a section when sections are declared, and
|
|
223
|
+
`:root:not([data-theme])` under the OS preference) also writes the two scheme
|
|
224
|
+
switches (`src/scheme-switch.mts`): in a light scope `--ads-not-light: initial`
|
|
225
|
+
and `--ads-not-dark: none`, in a dark scope the reverse. `initial` makes a
|
|
226
|
+
custom property guaranteed-invalid, so `display: var(--ads-not-light, block)`
|
|
227
|
+
is `block` in a light scope and `none` in a dark one. Each scope writes both
|
|
228
|
+
because custom properties inherit. A visual part's `scheme` lowers to that
|
|
229
|
+
display (`src/region-lowering.mts`); the switch is the construction's own
|
|
230
|
+
property (`Output.own`), not a token of the owner sheet's closure.
|
|
231
|
+
|
|
219
232
|
- **Toggles.** Selectors cannot find the nearest ancestor on two independent
|
|
220
233
|
axes, so each axis travels as inherited toggle custom properties:
|
|
221
234
|
`--ads-theme-dark`, `--ads-brand-iris`, and `--ads-root-theme` for the base.
|
|
@@ -305,6 +318,67 @@ transition set. Its review, `review/press-scale-large-surface`
|
|
|
305
318
|
reads them only for a `frame: "container"` root that presses. Other owners stay
|
|
306
319
|
token-independent, so their analyses survive token edits.
|
|
307
320
|
|
|
321
|
+
**Sequences.** A `sequence` profile's steps are profile clauses
|
|
322
|
+
(`ads-step at-<n>`), like a spatial profile's breakpoints, so composition and
|
|
323
|
+
selection work unchanged. `src/lowering-sequence.mts` is pure: it turns the
|
|
324
|
+
selected steps into keyframes (mirrored for right-to-left when a step travels
|
|
325
|
+
inline), the `animation-*` writes and the reduced-motion rule, and names the
|
|
326
|
+
properties it animates so `partPlays` (`src/region-lowering.mts`) can refuse a
|
|
327
|
+
second source of motion for one property. Keyframes are named by their content
|
|
328
|
+
(`keyframesName`), so parts with equal steps share one rule; the session keeps
|
|
329
|
+
them through `writeKeyframes`. Script-defined animation is refused by
|
|
330
|
+
`scriptAnimations` (`src/analysis/styling-ownership.mts`), which resolves each
|
|
331
|
+
`animate` / `setKeyframes` call and `new Animation` / `new KeyframeEffect`
|
|
332
|
+
through the checker so that a project function of the same name is not
|
|
333
|
+
reported.
|
|
334
|
+
|
|
335
|
+
**Prose.** `src/prose-model.mts` is the closed set: element names, their tags,
|
|
336
|
+
the browser defaults replaced, and which element can contain which. A prose
|
|
337
|
+
root is a region whose `RegionSpec.prose` holds the declared elements;
|
|
338
|
+
`lowerProse` (`src/region-lowering.mts`) writes one rule per tag with the
|
|
339
|
+
selector `& <tag>:not([class])`, a descendant selector the overlap check
|
|
340
|
+
already reasons about by element type, and proves contrast with
|
|
341
|
+
`paintContrast` over the token contexts, so a prose owner that declares a
|
|
342
|
+
colour is token-dependent. The markup checks need to know prose owners without
|
|
343
|
+
the owner analysis: `src/analysis/prose-owners.mts` reads them syntactically
|
|
344
|
+
from the barrel's re-exports and each file's own `recipe({ layout: "prose" })`
|
|
345
|
+
literal, in the captured revision. Emission writes that map as
|
|
346
|
+
`ads-prose.json`; the design-use library reads it beside the entry file,
|
|
347
|
+
because an emitted owner carries no recipe.
|
|
348
|
+
|
|
349
|
+
**Entrances.** `enter` on a region root, a region part or a control root is
|
|
350
|
+
parsed into an `EnterSpec` (`src/construction-spec.mts`) that carries its
|
|
351
|
+
driver as a union with one member today, `first-render`; a driver started by an
|
|
352
|
+
owner state or by the scroll position joins that union without changing what
|
|
353
|
+
authors wrote. `src/lowering-enter.mts` is pure: it returns the first style
|
|
354
|
+
(`@starting-style`, repeated under each state surface that writes the same
|
|
355
|
+
property), the transition group, and whether the element enters blurred.
|
|
356
|
+
`writeEnter` (`src/construction-output.mts`) resolves the profiles and writes
|
|
357
|
+
the first style; the caller adds the group to the element's one transition set
|
|
358
|
+
(`transitionSetRules`), whose reduced-motion rule zeroes durations and never
|
|
359
|
+
the starting values, as the layer motion does. `settled` adds a zero blur to
|
|
360
|
+
the surfaces of an element that enters blurred and casts a shape or group
|
|
361
|
+
shadow, so its filter lists keep one shape and interpolate. The recipe model
|
|
362
|
+
carries the entrance as an `ads-enter` clause (`src/recipe-model.mts`,
|
|
363
|
+
validated in `src/ownership-model.mts`).
|
|
364
|
+
|
|
365
|
+
**Surface effects.** `src/surface-effects.mts` owns the surface fields that are
|
|
366
|
+
not paints of the element's box: `blur`, `shapeShadow`, `groupShadow`,
|
|
367
|
+
`backdropBlur` and `backdropSaturate`. It is pure. A profile keeps them as
|
|
368
|
+
separate fields; the one writer of rules (`output().rule` in
|
|
369
|
+
`src/construction-output.mts`) composes those of a rule into `filter` and
|
|
370
|
+
`backdrop-filter` (with `-webkit-backdrop-filter` before it) in a fixed order,
|
|
371
|
+
so every construction that applies a surface lowers them the same way; a grid's
|
|
372
|
+
own rule, which is a tree and not a rule write, calls the same function.
|
|
373
|
+
`checkSurfaceEffects` runs where a construction selects its surfaces (region
|
|
374
|
+
root and parts, control, grid) and knows the place: a visual part or a
|
|
375
|
+
container. It rejects a misplaced shape or group shadow, and reads token values
|
|
376
|
+
only for a surface that declares one, to prove its token is one
|
|
377
|
+
`drop-shadow()` layer in every token context. So only those owners become
|
|
378
|
+
token-dependent. The paint-transition channels `filter` and `backdrop-filter`
|
|
379
|
+
(`src/lowering-transitions.mts`) each cover the fields composed into that
|
|
380
|
+
property.
|
|
381
|
+
|
|
308
382
|
### Composed contrast
|
|
309
383
|
|
|
310
384
|
Another owner often paints the backdrop of the text an owner renders.
|
|
@@ -338,6 +412,16 @@ every token context through the shared paint mechanism
|
|
|
338
412
|
subtree to that context only when the foundation declares `sections: true`;
|
|
339
413
|
either way `foundation.css` repaints the element with the document surface.
|
|
340
414
|
|
|
415
|
+
**Composition facts.** Each text position and placement records the chains of
|
|
416
|
+
owned elements above it in every reachable choice, with the props that select
|
|
417
|
+
each chain (`src/analysis/owner-composition.mts`). Only the props that change
|
|
418
|
+
the chain are recorded (`src/analysis/composition-axes.mts`, exact: a prop that
|
|
419
|
+
decides whether another is read is kept), so a large variant matrix whose other
|
|
420
|
+
props style other elements keeps few leaves per position; more than 512 distinct
|
|
421
|
+
leaves at one position is a limit. Positions on the same path share one
|
|
422
|
+
enumeration, and each element's facts and each attribute read are reused across
|
|
423
|
+
choices that assign the inputs they read the same.
|
|
424
|
+
|
|
341
425
|
**Boundaries.** A boundary is a placement above which neither paint is known.
|
|
342
426
|
A pair that the elements below a boundary decide is checked; a side that
|
|
343
427
|
reaches it is `component-contrast-unresolved` at the placement.
|
|
@@ -464,7 +548,18 @@ icon ([fields](ADS.md#foundation-declaration)).
|
|
|
464
548
|
|
|
465
549
|
Emission writes them once as `foundation.css`. The sheet contains:
|
|
466
550
|
|
|
467
|
-
- One `@font-face` per declared font face
|
|
551
|
+
- One `@font-face` per declared font face, and for a family that declares a
|
|
552
|
+
`fallback`, one matched fallback face per declared face. `src/font-metrics.mts`
|
|
553
|
+
reads a face's measurements from its captured bytes (bare SFNT, WOFF, WOFF2;
|
|
554
|
+
only `head`, `hhea`, `OS/2`, `cmap` and `hmtx`; a WOFF2 stream is decompressed
|
|
555
|
+
once per captured byte array, held weakly). `src/font-fallback.mts` is pure:
|
|
556
|
+
the size adjustment is the face's average width of English prose
|
|
557
|
+
(`CHARACTER_FREQUENCY`: lowercase, space, capitals, punctuation and digits by
|
|
558
|
+
their share) over the system font's, and the line-metric overrides are the face's own divided by
|
|
559
|
+
it. The widths of Arial, Times New Roman and Courier New are constants
|
|
560
|
+
measured with the same reader. The record is computed when the font
|
|
561
|
+
declaration is read (`src/font-model.mts`), only for a declaration that
|
|
562
|
+
states a fallback.
|
|
468
563
|
- The reset.
|
|
469
564
|
- The text and surface fields on `body`. The surface is also on `[data-theme]`
|
|
470
565
|
and `[data-brand]`, so a nested context repaints.
|
|
@@ -504,7 +599,7 @@ construct in neither set is recorded as unrecognized; it is not dropped.
|
|
|
504
599
|
|
|
505
600
|
Two controls stop a new lowered construct from shipping unlisted. A unit test
|
|
506
601
|
requires a classification for every property the lowering inventory registers.
|
|
507
|
-
The emitted
|
|
602
|
+
The emitted example design system and fixtures are held to the inventory in both directions.
|
|
508
603
|
|
|
509
604
|
The registry states facts, never browser versions. ADS has no declared browser
|
|
510
605
|
targets: the application checks the recorded features against its own targets.
|
|
@@ -575,7 +670,7 @@ isolated preview.
|
|
|
575
670
|
|
|
576
671
|
ADS runs what owners register. It runs the built-in `unit`, `browser` and
|
|
577
672
|
`strict` profiles itself, with its own Bun and Playwright, and it owns evidence
|
|
578
|
-
freshness and investigations. The
|
|
673
|
+
freshness and investigations. The example design system's form-field bridge
|
|
579
674
|
(`controllers/FormField`) registers unit checks.
|
|
580
675
|
|
|
581
676
|
A project that registers no behavior checks gets `{ status: "not-available",
|
|
@@ -871,8 +966,36 @@ view module holds no stylesheet and no CSS rule
|
|
|
871
966
|
own rules from the facts, written as they are by
|
|
872
967
|
`showcase-client/project-rules.mts`.
|
|
873
968
|
|
|
874
|
-
**
|
|
875
|
-
|
|
969
|
+
**The views are cards.** `showcase-ui`'s `CardGroup`, `SampleCard` and
|
|
970
|
+
`GridMiniature` (`patterns/SampleCards/`) draw a view as groups of cards: a
|
|
971
|
+
stage for the sample, the name and one line. The
|
|
972
|
+
host passes them as data (`renderCardPage`) and fills each stage
|
|
973
|
+
(`[data-slot="stage"][data-key]`) with the sample it draws. On a miniature
|
|
974
|
+
grid it sets the project's values only: each column's share of the line, the
|
|
975
|
+
outer margin as the grid's inline padding, a gutter as a column's.
|
|
976
|
+
|
|
977
|
+
**Spatial grids** (`foundation`, in `showcase-client/ads-views.mts`, in the
|
|
978
|
+
Profiles section after its summary):
|
|
979
|
+
|
|
980
|
+
- Each grid's facts name the profiles it builds on (`buildsOn`, written at
|
|
981
|
+
emission from the profile facts). A profile whose breakpoints, gutters and
|
|
982
|
+
scale equal those of one it builds on shows only its own examples (a hybrid
|
|
983
|
+
grid, a fixed tiling); the shared cards stand under the profile that states
|
|
984
|
+
them.
|
|
985
|
+
|
|
986
|
+
- It embeds the facts' `grids` (`src/grid-facts.mts`): each spatial profile's
|
|
987
|
+
definition, its resolved breakpoints and lengths, and `examples`, the grid
|
|
988
|
+
algebra's own expansion of example regions on the profile. There is one
|
|
989
|
+
fluid example per gutter mode; a `hybrid` one when the profile states
|
|
990
|
+
`fixedStart` or `fixedEnd` (with its per-breakpoint tracks, and the first
|
|
991
|
+
gutter mode its cells fit with); and a `fixed` tiling when it states
|
|
992
|
+
`tileSize`. An optional example the algebra refuses is listed in `omitted`
|
|
993
|
+
with the reason, and the view says so.
|
|
994
|
+
- Like every view it takes the token-sheets frame: the document sheet and the
|
|
995
|
+
preview-only tokens sheet, which declares every token. An example reads the
|
|
996
|
+
profile's own tokens (a fixed track, a tile size), which no owner's sheet is
|
|
997
|
+
sure to carry. No owner is in its module graph, so an owner-only edit leaves
|
|
998
|
+
it unchanged.
|
|
876
999
|
|
|
877
1000
|
**Tokens** (`tokens`, `showcase-client/tokens-view.mts`):
|
|
878
1001
|
|
|
@@ -896,6 +1019,37 @@ owner's sheet is in its frame.
|
|
|
896
1019
|
draws that token's sample in the frame's theme and brand.
|
|
897
1020
|
- It lists no owners, so an owner-only edit leaves it unchanged; a profile or
|
|
898
1021
|
token edit rebuilds it.
|
|
1022
|
+
- ADS decides the sample, the showcase draws it. Each profile's `applied`
|
|
1023
|
+
fact (`profileApplied`) states what its sample is (one control, a box,
|
|
1024
|
+
text, a gap, a size, a focus indicator), what sits inside it, the CSS
|
|
1025
|
+
values for its box, its text and its artwork, the frame's own extent with
|
|
1026
|
+
whether it is a share of its container, and, for a composite, the fields
|
|
1027
|
+
that shape it. `showcase-ui`'s `AppliedSample` has a shape for each; the
|
|
1028
|
+
view sets the values on its slots and decides nothing. A new kind of sample
|
|
1029
|
+
is a new fact and a new shape, never a guess in the view.
|
|
1030
|
+
|
|
1031
|
+
**Tokens**, beside the above: each token's `purpose` is the comment its author
|
|
1032
|
+
wrote directly above its declaration (`tokenPurposes`); the view shows it,
|
|
1033
|
+
the profiles that read the token, a status only where one is not valid, and
|
|
1034
|
+
the contexts only where some token differs between them.
|
|
1035
|
+
|
|
1036
|
+
**Scenario pages** (`showcase-client/scenario-page.mts`): a scenario is data
|
|
1037
|
+
and subjects; ADS draws the page with `showcase-ui`'s `ScenarioPage`.
|
|
1038
|
+
|
|
1039
|
+
- Named `states` are one switch; the chosen set is every specimen's props.
|
|
1040
|
+
- Live controls (`controls: true`): owner analysis records each component's
|
|
1041
|
+
props that select markup or styling from a closed list of values
|
|
1042
|
+
(`src/analysis/owner-controls.mts`, the equality axes of the choice
|
|
1043
|
+
analysis). Emission writes them to the preview tree as
|
|
1044
|
+
`ads-preview-controls.json` (`src/preview-controls.mts`), a file of its own
|
|
1045
|
+
so that a token edit does not rebuild scenario modules. Each scenario's
|
|
1046
|
+
entry module embeds it; the page draws one control per prop of the first
|
|
1047
|
+
owner in `covers` and passes the chosen values over the state's props.
|
|
1048
|
+
- `frame: "screen"` fills the preview: the page takes the preview root's
|
|
1049
|
+
height and the specimen what the state bar leaves.
|
|
1050
|
+
- `tests/browser/showcase-ui-pages.test.mjs` measures what `ads check` cannot
|
|
1051
|
+
see on these pages: a screen that fills, a sample inside its box, a control
|
|
1052
|
+
that sets a prop, a header that keeps the current section in view.
|
|
899
1053
|
|
|
900
1054
|
**Artwork** (`assets`, `showcase-client/assets-view.mts`):
|
|
901
1055
|
|
|
@@ -1058,6 +1212,16 @@ flowchart LR
|
|
|
1058
1212
|
cache or `current`. Only validation and compilation that both pass against
|
|
1059
1213
|
unchanged source publish the verified graph; a failure restores the last
|
|
1060
1214
|
verified view.
|
|
1215
|
+
- **One check for a managed revision.** The MCP process's preview emitter checks
|
|
1216
|
+
in its analysis worker before emitting and sends a passing report over the
|
|
1217
|
+
private compiler channel, held in memory during that MCP process's lifetime.
|
|
1218
|
+
The Bun compiler's validation gate offers that report to the shared
|
|
1219
|
+
check service, which matches the full architecture-input key and refreshes
|
|
1220
|
+
output integrity before reuse. It still fences the build's inputs before
|
|
1221
|
+
publication. Missing or stale evidence checks normally; standalone compilation
|
|
1222
|
+
keeps its own gate. The emitter also seeds the live project's bounded saved
|
|
1223
|
+
reports, without eagerly storing acceptance candidates there. Native programs
|
|
1224
|
+
and owner facts remain in the worker that owns them; no worker cache is copied.
|
|
1061
1225
|
- **Recovery.** Guarded publication invalidates the compiler explicitly.
|
|
1062
1226
|
Content reconciliation recovers missed atomic file replacements, so OS watch
|
|
1063
1227
|
delivery cannot establish freshness.
|
|
@@ -1270,7 +1434,9 @@ preview workspaces are full copies of that set.
|
|
|
1270
1434
|
Neither set holds application source, public folders, the root `index.html` or
|
|
1271
1435
|
tests outside `dsDir`. So an application, backend, native-toolchain or
|
|
1272
1436
|
documentation edit never stales a validation, preview or acceptance revision.
|
|
1273
|
-
The emitted output folder is never an input.
|
|
1437
|
+
The emitted output folder is never an input. Its integrity findings are read
|
|
1438
|
+
when a report is returned; the MCP server keeps them event-fed for its project
|
|
1439
|
+
([caching](CACHING.md)).
|
|
1274
1440
|
|
|
1275
1441
|
Compiled-preview cache keys need no read of application source or
|
|
1276
1442
|
`node_modules`. The preview compiler's own inputs are the TypeScript
|
|
@@ -1349,12 +1515,38 @@ its analysis and emitted module
|
|
|
1349
1515
|
([caching](CACHING.md#owner-analysis-reuse)).
|
|
1350
1516
|
|
|
1351
1517
|
The analysis service bounds active project and revision state. It closes after
|
|
1352
|
-
idle time when no registered revision pins it. Direct library clients
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1518
|
+
idle time when no registered revision pins it. Direct library clients keep
|
|
1519
|
+
their native sessions for 60 seconds after their last call, so spaced-out calls
|
|
1520
|
+
keep their programs and ASTs; while idle, a session's compiler process does not
|
|
1521
|
+
hold the event loop, so a finished caller exits at once. Syntax-only clients
|
|
1522
|
+
have their own short idle cleanup. A one-shot CLI command closes its clients
|
|
1523
|
+
when it has reported. When one scenario inspector closes, its requests are
|
|
1524
|
+
canceled and the shared compiler of other callers stays. Persisted registry
|
|
1525
|
+
metadata has separate content checks.
|
|
1526
|
+
|
|
1527
|
+
Cancelling an analysis request stops its work in the analysis worker, not only
|
|
1528
|
+
the caller's wait: the service sends a `cancel` message that the worker serves
|
|
1529
|
+
as it arrives, ahead of its queue. A queued request is answered without running;
|
|
1530
|
+
a running one stops at its next cancellation point (between owners, choices,
|
|
1531
|
+
scenarios, closure files and extracted constructions; `throwIfCancelled` in
|
|
1532
|
+
`src/analysis/context.mts`). Caches keep settled outcomes only, so a canceled
|
|
1533
|
+
analysis leaves nothing behind.
|
|
1534
|
+
|
|
1535
|
+
An unregistered analysis request sends the worker only the files that changed
|
|
1536
|
+
since the inventory the service last sent for that root, named by that
|
|
1537
|
+
inventory. The worker applies the changes only when it holds exactly that
|
|
1538
|
+
inventory (a registration or promotion of the project, or a restart, clears it);
|
|
1539
|
+
otherwise it refuses them and the complete inventory is sent. Stage tracing
|
|
1540
|
+
reports each request's `files` and whether they were `changes` on
|
|
1541
|
+
`analysis-inventory`.
|
|
1542
|
+
|
|
1543
|
+
Configuration read during an analysis is the captured revision's:
|
|
1544
|
+
`ds.config.json` (`loadConfig`) and the TypeScript configuration with its local
|
|
1545
|
+
`extends` chain (`projectCompilerOptions`) are read through the capture, never
|
|
1546
|
+
from newer bytes on disk: every `extends` target named by a path, relative or
|
|
1547
|
+
absolute, is read from the revision, and one the revision lacks or cannot parse
|
|
1548
|
+
is reported (`typescript-config-invalid`) instead of read from disk. A package
|
|
1549
|
+
configuration in `extends` is an installed dependency.
|
|
1358
1550
|
|
|
1359
1551
|
## On-demand visual evidence
|
|
1360
1552
|
|
|
@@ -1460,6 +1652,14 @@ and its exemptions.
|
|
|
1460
1652
|
- Each render waits, bounded, for its content to settle, and the audit also
|
|
1461
1653
|
renders interaction states (opened `aria-haspopup` overlays, hovered and
|
|
1462
1654
|
focused controls).
|
|
1655
|
+
- Owner states are derived, not written (`src/derived-states.mts`): emission
|
|
1656
|
+
reads each construction's lowered CSS, whose selectors all start at its root,
|
|
1657
|
+
takes the compound after the root class as the state, and writes it with the
|
|
1658
|
+
construction's class string to the preview-only `ads-preview-audit.json`.
|
|
1659
|
+
The audit reads it once the previews are built and hands it to the page,
|
|
1660
|
+
which matches a construction by `data-ads-source` (the owner) and the element's
|
|
1661
|
+
classes; within one owner a class string is one construction. Nothing is added
|
|
1662
|
+
to rendered markup, and the facts never reach emitted output.
|
|
1463
1663
|
- Each worker lists what every render could measure, then assigns targets in
|
|
1464
1664
|
request order, so which render measures a shared control does not depend on
|
|
1465
1665
|
page speed.
|
package/docs/ASSETS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A design system declares its artwork with `asset()` and its glyph sets with
|
|
4
4
|
`glyphSet()` (`@reqvire-org/ads/asset`), in `assets/**/*.ads.ts` beside the
|
|
5
|
-
drawings, never in CSS. The examples are the
|
|
5
|
+
drawings, never in CSS. The examples are the example design system's.
|
|
6
6
|
|
|
7
7
|
## One size selection
|
|
8
8
|
|
|
@@ -50,6 +50,28 @@ const largeChevron = recipe({
|
|
|
50
50
|
dangerouslySetInnerHTML={{ __html: largeChevron.assets.visual.source }} />
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
A region that arranges artwork beside other parts (a tick before a line of
|
|
54
|
+
text) can bind it in its own recipe: the visual part names the asset, and the
|
|
55
|
+
same recipe gives the element's class and the drawing.
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
const row = recipe({
|
|
59
|
+
layout: "inline",
|
|
60
|
+
parts: {
|
|
61
|
+
tick: { selector: ".ux-tick", kind: "visual", required: true, asset: "tick", visual: "glyph-md" },
|
|
62
|
+
label: { selector: ".ux-label", kind: "text", required: true },
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
<span className={row.root}>
|
|
66
|
+
<span className={`ux-tick ${row.parts.tick}`} aria-hidden="true"
|
|
67
|
+
dangerouslySetInnerHTML={{ __html: row.assets.tick.source }} />
|
|
68
|
+
<span className="ux-label">{label}</span>
|
|
69
|
+
</span>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Use a separate binding recipe, as above, when the artwork is a choice (one
|
|
73
|
+
recipe per asset, selected by a prop).
|
|
74
|
+
|
|
53
75
|
- Asset and profile reference the **same token identity**, not a filename, an
|
|
54
76
|
equal pixel value or a word such as "large". Different tokens with equal
|
|
55
77
|
values do not match.
|
|
@@ -58,7 +80,7 @@ const largeChevron = recipe({
|
|
|
58
80
|
- The 20/24 pair is a project choice: an optical asset can register any finite
|
|
59
81
|
set of `visual-size` tokens.
|
|
60
82
|
- A public option such as `<Artwork size="large" asset="chevron" />` maps once
|
|
61
|
-
to the large visual profile; it is not passed to the asset. The
|
|
83
|
+
to the large visual profile; it is not passed to the asset. The example design system's
|
|
62
84
|
Artwork (`components/Content/Artwork/Artwork.tsx`) shows this for the optical
|
|
63
85
|
Chevron and the scalable Sync status.
|
|
64
86
|
|
|
@@ -83,9 +105,7 @@ assets/
|
|
|
83
105
|
namespace (`assets/name-duplicate`).
|
|
84
106
|
- `source` is relative to its declaration and stays below that directory.
|
|
85
107
|
Parent traversal, remote URLs and filename-inferred themes are rejected.
|
|
86
|
-
- Production content images are
|
|
87
|
-
[application data](STARTER.md#content-media-is-application-data), not part of
|
|
88
|
-
this catalogue.
|
|
108
|
+
- Production content images are application data, not part of this catalogue.
|
|
89
109
|
|
|
90
110
|
| Owner | Responsibility |
|
|
91
111
|
| --- | --- |
|
|
@@ -100,7 +120,7 @@ assets/
|
|
|
100
120
|
|
|
101
121
|
- `name`, `title`, `description`, `license` and `paint` are required.
|
|
102
122
|
`description` is usage guidance, not an accessible label. `license` states the
|
|
103
|
-
actual ownership and licensing; the
|
|
123
|
+
actual ownership and licensing; the example design system's artwork is original, under the
|
|
104
124
|
repository's license.
|
|
105
125
|
- Declare exactly one of a root `source` or nonempty `variants`. A root source
|
|
106
126
|
is a single scalable `normal` drawing.
|
|
@@ -171,6 +191,11 @@ are emitted, not a full state × size × theme product.
|
|
|
171
191
|
`high-contrast` theme, with different viewBoxes and per-drawing centers. The
|
|
172
192
|
owner passes its real theme to its finite recipe choice and scoped wrapper;
|
|
173
193
|
nothing claims OS forced-colors support or DOM theme discovery.
|
|
194
|
+
- **A content image is not an asset.** A picture the application supplies
|
|
195
|
+
(a CMS or blog image) has no declaration and no variants. When it has a
|
|
196
|
+
second file for dark themes, its owner renders both as `<img>` elements in
|
|
197
|
+
two visual parts, `scheme: "light"` and `scheme: "dark"`, and the page's
|
|
198
|
+
theme displays one: see [a light and a dark file](#a-content-image-with-a-light-and-a-dark-file).
|
|
174
199
|
- **Brand** is not a drawing selector. Palette changes use token-bound
|
|
175
200
|
channels. A different identity is another asset: Identity selects Mark or
|
|
176
201
|
Iris emblem, and the mock supplies the matching brand scope, with no
|
|
@@ -217,7 +242,7 @@ import { IconButton, SearchIcon, closeGlyph } from "@ds";
|
|
|
217
242
|
```
|
|
218
243
|
|
|
219
244
|
An emitted module of the design system makes the reference, one per glyph in
|
|
220
|
-
the
|
|
245
|
+
the example design system (`components/Content/Icon/glyphs/close.tsx`):
|
|
221
246
|
|
|
222
247
|
```tsx
|
|
223
248
|
import { glyph } from "@reqvire-org/ads/asset" with { type: "macro" };
|
|
@@ -342,7 +367,7 @@ export default asset({
|
|
|
342
367
|
});
|
|
343
368
|
```
|
|
344
369
|
|
|
345
|
-
The
|
|
370
|
+
The example design system's `PartnerLogo` (`components/Content/PartnerLogo/PartnerLogo.tsx`)
|
|
346
371
|
binds each logo by name with one visual profile (`partner-logo`, a fixed height
|
|
347
372
|
that keeps the drawing whole). It takes the theme it is in, which selects the
|
|
348
373
|
light or dark artwork. Its two logos are fictional: replace them with real
|
|
@@ -353,6 +378,46 @@ declared asset by group and every glyph set with its members, each drawn from
|
|
|
353
378
|
its authored SVG in the preview's theme
|
|
354
379
|
([guide](GUIDE.md#showcase)). `ads check` and `ads_catalog` report them too.
|
|
355
380
|
|
|
381
|
+
## A content image with a light and a dark file
|
|
382
|
+
|
|
383
|
+
Declared artwork selects its drawing by theme at compile time, from its
|
|
384
|
+
variants. A content image cannot: its files are application data, and its owner
|
|
385
|
+
does not know the page's theme when it renders (a `data-theme` on the document,
|
|
386
|
+
a themed section around it, or the OS preference). So both images are in the
|
|
387
|
+
markup and CSS displays one, with no script:
|
|
388
|
+
|
|
389
|
+
```tsx
|
|
390
|
+
const picture = recipe({
|
|
391
|
+
layout: "inline",
|
|
392
|
+
profile: "content-media",
|
|
393
|
+
frame: {},
|
|
394
|
+
parts: {
|
|
395
|
+
light: { selector: ".ds-picture-light", kind: "visual", scheme: "light", required: true },
|
|
396
|
+
dark: { selector: ".ds-picture-dark", kind: "visual", scheme: "dark", required: true },
|
|
397
|
+
},
|
|
398
|
+
}).root;
|
|
399
|
+
|
|
400
|
+
<span className={picture}>
|
|
401
|
+
<img className="ds-picture-light" width={light.width} height={light.height} src={light.src} alt={alt} />
|
|
402
|
+
<img className="ds-picture-dark" loading="lazy" width={dark.width} height={dark.height} src={dark.src} alt={alt} />
|
|
403
|
+
</span>
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
- `foundation.css` writes two switches in every rule that sets `color-scheme`:
|
|
407
|
+
`--ads-not-light` and `--ads-not-dark`. Each scheme part's display reads its
|
|
408
|
+
own (`display: var(--ads-not-light, block)`), so it is displayed under its
|
|
409
|
+
scheme and `display: none` under the other. The hidden image is out of the
|
|
410
|
+
accessibility tree, so both carry the same `alt`.
|
|
411
|
+
- An `at` condition on a scheme part hides it like any part: the image is
|
|
412
|
+
displayed where both its scheme and the condition show it.
|
|
413
|
+
- Both images state `width` and `height`.
|
|
414
|
+
- The image of the scheme the default theme (the first declared) does not have
|
|
415
|
+
is `loading="lazy"` in every choice. Browsers do not download a hidden lazy
|
|
416
|
+
image, so a page in the default theme downloads one file. Only the default
|
|
417
|
+
scheme's image may load eagerly or take `fetchPriority`.
|
|
418
|
+
- A recipe declares both parts or neither, as siblings. The example design system's `Image`
|
|
419
|
+
takes the second file as `sourceDark`.
|
|
420
|
+
|
|
356
421
|
## Artwork guards at a glance
|
|
357
422
|
|
|
358
423
|
| Guard | Rejected |
|
|
@@ -383,8 +448,14 @@ or `[min, max]` range and an optional `style`) and optional `preload` faces.
|
|
|
383
448
|
weights those profiles draw.
|
|
384
449
|
- `ads emit` copies the files to `fonts/<family>/`, writes their `@font-face`
|
|
385
450
|
rules into `foundation.css` and lists the faces to preload in `fonts.ts`.
|
|
386
|
-
|
|
387
|
-
|
|
451
|
+
- Optional `fallback` names the system font drawn while the family loads
|
|
452
|
+
(`"Arial"`, `"Times New Roman"`, `"Courier New"`, or `{ font, sizeAdjust }`).
|
|
453
|
+
ADS measures each face file and emits a `"<family> Fallback"` face matched to
|
|
454
|
+
it (`size-adjust`, `ascent-override`, `descent-override`,
|
|
455
|
+
`line-gap-override`), so text does not move when the family arrives. The
|
|
456
|
+
font-family token names it right after the family (`font-fallback`).
|
|
457
|
+
|
|
458
|
+
The example design system keeps system fonts and declares no family. [The guide](GUIDE.md)
|
|
388
459
|
has an example, the checks and the emitted helpers.
|
|
389
460
|
|
|
390
461
|
## The application icon: a role, not a kind
|