@reqvire-org/ads 0.5.0 → 0.5.1
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 +275 -12
- package/dist/ads-views.mjs +4 -4
- package/dist/analysis/design-usage.mjs +20 -4
- package/dist/analysis/mock-check.mjs +5 -4
- package/dist/analysis/owner-analysis-key.mjs +1 -1
- package/dist/analysis/owner-choices.mjs +172 -39
- package/dist/analysis/owner-composition.mjs +37 -13
- package/dist/analysis/owner-controls.mjs +27 -0
- package/dist/analysis/owner-source.mjs +67 -18
- package/dist/analysis/prose-owners.mjs +57 -0
- package/dist/analysis/styling-ownership.mjs +22 -0
- package/dist/check.mjs +7 -1
- package/dist/cli-arguments.mjs +2 -2
- package/dist/cli.mjs +3 -3
- package/dist/composed-contrast.mjs +28 -8
- package/dist/composed-keyline.mjs +107 -0
- package/dist/construction-output.mjs +146 -18
- package/dist/construction-spec.d.mts +212 -9
- package/dist/construction-spec.mjs +297 -56
- package/dist/corner-overpaint.mjs +53 -0
- package/dist/design-foundation.mjs +6 -1
- package/dist/design-usage.mjs +8 -2
- package/dist/emit/emission.mjs +11 -4
- package/dist/emit/font-emission.mjs +21 -1
- package/dist/emit/foundation-sheet.mjs +6 -5
- package/dist/emit/preview-tree.mjs +1 -1
- package/dist/finding-rules.mjs +7 -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/foundation-macro.d.mts +1 -1
- package/dist/frame-regions.mjs +66 -3
- package/dist/grid-facts.mjs +72 -16
- package/dist/grid-lowering.mjs +11 -5
- package/dist/init.mjs +14 -23
- package/dist/lowering-enter.mjs +31 -0
- package/dist/lowering-properties.mjs +22 -1
- package/dist/lowering-region-layout.mjs +42 -8
- package/dist/lowering-sequence.mjs +89 -0
- package/dist/lowering-session.mjs +7 -0
- package/dist/lowering-transitions.mjs +22 -8
- package/dist/mcp/preview-http.bundle.js +2 -2
- package/dist/mcp/preview-widget.bundle.js +5 -5
- package/dist/motion-model.mjs +2 -0
- package/dist/owner-analysis-check.mjs +67 -7
- package/dist/owner-errors.mjs +16 -0
- package/dist/owner-lowering.mjs +36 -16
- package/dist/owner-scenarios.mjs +25 -3
- package/dist/ownership-model.mjs +23 -4
- package/dist/paint-contrast.mjs +5 -0
- package/dist/placeholder-contrast.mjs +1 -0
- package/dist/platform-features.mjs +26 -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 +105 -3
- package/dist/recipe-model.mjs +31 -7
- package/dist/region-lowering.mjs +241 -41
- package/dist/render-audit/corner-overpaint.page.mjs +54 -0
- package/dist/render-audit/worker.mjs +6 -1
- package/dist/render-audit.mjs +25 -0
- package/dist/role-vocabulary.d.mts +38 -2
- package/dist/role-vocabulary.mjs +39 -4
- package/dist/scenario-kit.d.mts +6 -0
- package/dist/scenario-registry.mjs +1 -1
- 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 +117 -86
- 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 +2 -2
- package/dist/skills/ads-designer/references/atomic-styles.md +8 -1
- package/dist/skills/ads-designer/references/branding.md +7 -2
- package/dist/skills/ads-designer/references/cli.md +4 -4
- package/dist/skills/ads-designer/references/contracts.md +9 -2
- 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 +42 -3
- package/dist/skills/ads-designer/references/motion.md +37 -1
- package/dist/skills/ads-designer/references/performance.md +7 -1
- package/dist/skills/ads-designer/references/recipes.md +67 -6
- 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 +9 -2
- 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 +42 -3
- package/dist/skills/ads-import/references/recipes.md +67 -6
- 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 +2 -1
- package/dist/skills/ads-migrate/references/0.5.0-to-0.5.1.md +239 -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 +9 -2
- 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 +42 -3
- package/dist/skills/ads-port/references/recipes.md +67 -6
- 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 +68 -10
- package/dist/surface-effects.mjs +98 -0
- package/dist/target-size.mjs +1 -1
- package/dist/task-cache.mjs +1 -1
- 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.mjs +1 -1
- package/docs/ADS.md +36 -13
- package/docs/ARCHITECTURE.md +160 -16
- package/docs/ASSETS.md +81 -10
- package/docs/CACHING.md +1 -1
- package/docs/CHANGELOG.md +346 -21
- package/docs/DESIGN-REFERENCES.md +5 -5
- package/docs/GUIDE.md +241 -72
- package/docs/LANGUAGE.md +287 -21
- package/docs/LOWERING.md +13 -1
- package/docs/MOTION.md +233 -7
- package/docs/PROFILE-KINDS.md +167 -13
- package/docs/PROFILES.md +2 -2
- package/docs/RULES.md +49 -18
- package/docs/TOKEN-ROLES.md +9 -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
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { resolveTokenValue } from "./token-resolution.mjs";
|
|
2
|
+
export const SHAPE_SHADOW = "shape-shadow", GROUP_SHADOW = "group-shadow";
|
|
3
|
+
const FILTER_FIELDS = ["blur", SHAPE_SHADOW, GROUP_SHADOW], BACKDROP_FIELDS = ["backdrop-blur", "backdrop-saturate"];
|
|
4
|
+
export const MASK = "mask", EFFECT_FIELDS = [...FILTER_FIELDS, ...BACKDROP_FIELDS], EFFECT_PROPERTY_FIELDS = { filter: FILTER_FIELDS, "backdrop-filter": BACKDROP_FIELDS };
|
|
5
|
+
export function filterValue(fields) {
|
|
6
|
+
const shadow = fields[SHAPE_SHADOW] ?? fields[GROUP_SHADOW], parts = [...fields.blur === void 0 ? [] : [`blur(${fields.blur})`], ...shadow === void 0 ? [] : [`drop-shadow(${shadow})`]];
|
|
7
|
+
return parts.length === 0 ? null : parts.join(" ");
|
|
8
|
+
}
|
|
9
|
+
export function backdropFilterValue(fields) {
|
|
10
|
+
const parts = [
|
|
11
|
+
...fields["backdrop-blur"] === void 0 ? [] : [`blur(${fields["backdrop-blur"]})`],
|
|
12
|
+
...fields["backdrop-saturate"] === void 0 ? [] : [`saturate(${fields["backdrop-saturate"]})`]
|
|
13
|
+
];
|
|
14
|
+
return parts.length === 0 ? null : parts.join(" ");
|
|
15
|
+
}
|
|
16
|
+
export function effectDeclarations(values) {
|
|
17
|
+
const declarations = [];
|
|
18
|
+
let composed = !1;
|
|
19
|
+
for (const [property, value] of Object.entries(values)) {
|
|
20
|
+
if (property === MASK) {
|
|
21
|
+
declarations.push(["-webkit-mask-image", value], ["mask-image", value]);
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
if (!EFFECT_FIELDS.includes(property)) {
|
|
25
|
+
declarations.push([property, value]);
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (composed)
|
|
29
|
+
continue;
|
|
30
|
+
composed = !0;
|
|
31
|
+
const filter = filterValue(values), backdrop = backdropFilterValue(values);
|
|
32
|
+
if (filter !== null)
|
|
33
|
+
declarations.push(["filter", filter]);
|
|
34
|
+
if (backdrop !== null)
|
|
35
|
+
declarations.push(["-webkit-backdrop-filter", backdrop], ["backdrop-filter", backdrop]);
|
|
36
|
+
}
|
|
37
|
+
return declarations;
|
|
38
|
+
}
|
|
39
|
+
export function effectMisplaced(fields, place) {
|
|
40
|
+
const shape = fields[SHAPE_SHADOW] !== void 0, group = fields[GROUP_SHADOW] !== void 0;
|
|
41
|
+
if (shape && group)
|
|
42
|
+
return { reason: "both", field: GROUP_SHADOW };
|
|
43
|
+
if (fields[MASK] !== void 0 && place === "container")
|
|
44
|
+
return { reason: "mask-on-container", field: MASK };
|
|
45
|
+
if (shape && place !== "visual")
|
|
46
|
+
return { reason: "shape-on-container", field: SHAPE_SHADOW };
|
|
47
|
+
if (group && place === "visual")
|
|
48
|
+
return { reason: "group-on-visual", field: GROUP_SHADOW };
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
function layers(value) {
|
|
52
|
+
const parts = [];
|
|
53
|
+
let depth = 0, start = 0;
|
|
54
|
+
for (let index = 0;index < value.length; index++) {
|
|
55
|
+
const char = value[index];
|
|
56
|
+
if (char === "(")
|
|
57
|
+
depth++;
|
|
58
|
+
else if (char === ")")
|
|
59
|
+
depth--;
|
|
60
|
+
else if (char === "," && depth === 0) {
|
|
61
|
+
parts.push(value.slice(start, index));
|
|
62
|
+
start = index + 1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
parts.push(value.slice(start));
|
|
66
|
+
return parts.map((part) => part.trim()).filter((part) => part !== "");
|
|
67
|
+
}
|
|
68
|
+
export function shadowLayerProblem(value) {
|
|
69
|
+
const text = value.trim();
|
|
70
|
+
if (text === "" || text.toLowerCase() === "none")
|
|
71
|
+
return "none";
|
|
72
|
+
const all = layers(text);
|
|
73
|
+
if (all.length !== 1)
|
|
74
|
+
return "several-layers";
|
|
75
|
+
let depth = 0, flat = "";
|
|
76
|
+
for (const char of all[0] ?? "")
|
|
77
|
+
if (char === "(")
|
|
78
|
+
depth++;
|
|
79
|
+
else if (char === ")")
|
|
80
|
+
depth--;
|
|
81
|
+
else if (depth === 0)
|
|
82
|
+
flat += char;
|
|
83
|
+
const words = flat.split(/\s+/).filter((word) => word !== "");
|
|
84
|
+
if (words.some((word) => word.toLowerCase() === "inset"))
|
|
85
|
+
return "inset";
|
|
86
|
+
return words.filter((word) => /^[+-]?(?:\d+\.?\d*|\.\d+)(?:[a-z%]+)?$/i.test(word)).length > 3 ? "spread" : null;
|
|
87
|
+
}
|
|
88
|
+
export function shadowLayerFinding(value, contexts) {
|
|
89
|
+
for (const context of contexts) {
|
|
90
|
+
const resolved = resolveTokenValue(value, context.values);
|
|
91
|
+
if (resolved.kind !== "resolved")
|
|
92
|
+
return { problem: "unresolved", context: context.label };
|
|
93
|
+
const problem = shadowLayerProblem(resolved.value);
|
|
94
|
+
if (problem !== null)
|
|
95
|
+
return { problem, context: context.label };
|
|
96
|
+
}
|
|
97
|
+
return null;
|
|
98
|
+
}
|
package/dist/target-size.mjs
CHANGED
|
@@ -27,7 +27,7 @@ function ownBox(target, reader) {
|
|
|
27
27
|
return minimum > box.inline.px ? { block: box.block, inline: { px: minimum, exact: box.inline.exact } } : box;
|
|
28
28
|
}
|
|
29
29
|
function contentBox({ frame, content }, { length, line }) {
|
|
30
|
-
const border = length(frame.border), block = (envelope) => Math.max(length(frame.minBlock), envelope + 2 *
|
|
30
|
+
const border = length(frame.border), insets = length(frame.inset) + (frame.insetEnd === void 0 ? length(frame.inset) : length(frame.insetEnd)), block = (envelope) => Math.max(length(frame.minBlock), envelope + insets + 2 * border), sides = length(frame.paddingInline) + (frame.paddingInlineEnd === void 0 ? length(frame.paddingInline) : length(frame.paddingInlineEnd)) + 2 * border;
|
|
31
31
|
switch (content.kind) {
|
|
32
32
|
case "control": {
|
|
33
33
|
const text = line(content.line), size = content.visual === null ? null : length(content.visual.size), visualBlock = content.visual === null || size === null ? null : size * content.visual.block, visualInline = content.visual === null || size === null ? 0 : size * content.visual.inline;
|
package/dist/task-cache.mjs
CHANGED
|
@@ -38,7 +38,7 @@ function toolInputs() {
|
|
|
38
38
|
function visit(directory) {
|
|
39
39
|
for (const entry of readdirSync(directory, { withFileTypes: !0 }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
40
40
|
const file = path.join(directory, entry.name);
|
|
41
|
-
if (entry.isDirectory() && !["skills", "
|
|
41
|
+
if (entry.isDirectory() && !["skills", "showcase"].includes(entry.name))
|
|
42
42
|
visit(file);
|
|
43
43
|
else if (entry.isFile() && /\.(?:mjs|js|cjs|json)$/.test(entry.name))
|
|
44
44
|
rows.push([path.relative(toolRoot, file), hash(readFileSync(file))]);
|
package/dist/token-dtcg.mjs
CHANGED
|
@@ -15,6 +15,7 @@ export const DTCG_EXTENSION = "org.reqvire.ads", DTCG_TYPES = {
|
|
|
15
15
|
"positive-text-length": "dimension",
|
|
16
16
|
"positive-text-length-or-multiplier": null,
|
|
17
17
|
"positive-percentage": null,
|
|
18
|
+
"nonnegative-percentage": null,
|
|
18
19
|
"nonnegative-time": "duration",
|
|
19
20
|
angle: null,
|
|
20
21
|
"gradient-image": "gradient",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { tokenCss } from "./design-foundation.mjs";
|
|
1
|
+
import { tokenCss, tokenDefinitionContexts } from "./design-foundation.mjs";
|
|
2
2
|
import { buildTokenInventory } from "./token-inventory.mjs";
|
|
3
3
|
import { profileTokenRoles, roleShape, spacingDerivationRoles, tokenRoleGuides } from "./role-vocabulary.mjs";
|
|
4
4
|
const roleSpecimens = {
|
|
@@ -12,6 +12,19 @@ const roleSpecimens = {
|
|
|
12
12
|
"font-size": "font-size",
|
|
13
13
|
"font-weight": "font-weight",
|
|
14
14
|
"letter-spacing": "letter-spacing",
|
|
15
|
+
"line-height": "line-height",
|
|
16
|
+
"visual-size": "size",
|
|
17
|
+
"target-min-size": "size",
|
|
18
|
+
"control-min-size": "control",
|
|
19
|
+
"content-gap": "gap",
|
|
20
|
+
"grid-gutter": "gap",
|
|
21
|
+
"frame-inset": "inset",
|
|
22
|
+
"focus-offset": "inset",
|
|
23
|
+
blur: "blur",
|
|
24
|
+
"motion-scale": "scale",
|
|
25
|
+
"motion-angle": "angle",
|
|
26
|
+
"font-stretch": "font-stretch",
|
|
27
|
+
"word-spacing": "word-spacing",
|
|
15
28
|
duration: "duration",
|
|
16
29
|
easing: "easing"
|
|
17
30
|
}, lengthShapes = new Set(["nonnegative-length", "positive-length", "nonnegative-length-percentage", "signed-length", "signed-length-percentage"]);
|
|
@@ -21,8 +34,29 @@ export function tokenSpecimen(role, shape) {
|
|
|
21
34
|
return special;
|
|
22
35
|
return shape !== null && lengthShapes.has(shape) ? "length" : "value";
|
|
23
36
|
}
|
|
24
|
-
|
|
25
|
-
|
|
37
|
+
const themedSpecimens = new Set(["paint", "gradient", "shadow"]), REFERENCE_DEPTH = 16;
|
|
38
|
+
export function themedValues(inventory, defaultTheme) {
|
|
39
|
+
const byName = new Map(inventory.tokens.map((token) => [token.name, token.values.filter((entry) => entry.condition === null)])), authored = (name, theme, brand) => {
|
|
40
|
+
const values = byName.get(name) ?? [], at = (t, b) => values.find((entry) => entry.theme === t && entry.brand === b)?.value;
|
|
41
|
+
return at(theme, brand) ?? at(null, brand) ?? at(theme, null) ?? at(null, null);
|
|
42
|
+
}, resolve = (value, theme, brand, depth) => depth > REFERENCE_DEPTH ? value : value.replace(/var\(\s*(--[\w-]+)\s*(?:,\s*([^()]*(?:\([^()]*\)[^()]*)*))?\)/g, (written, name, fallback) => {
|
|
43
|
+
const found = authored(name, theme, brand);
|
|
44
|
+
return found !== void 0 ? resolve(found, theme, brand, depth + 1) : fallback !== void 0 ? resolve(fallback.trim(), theme, brand, depth + 1) : written;
|
|
45
|
+
}), contexts = inventory.contexts.filter((context) => context.condition === null), result = new Map;
|
|
46
|
+
for (const token of inventory.tokens) {
|
|
47
|
+
if (!themedSpecimens.has(tokenSpecimen(token.role, token.shape)))
|
|
48
|
+
continue;
|
|
49
|
+
const values = contexts.flatMap((context) => {
|
|
50
|
+
const found = authored(token.name, context.theme, context.brand);
|
|
51
|
+
return found === void 0 ? [] : [{ theme: context.theme ?? defaultTheme, brand: context.brand, value: resolve(found, context.theme, context.brand, 0) }];
|
|
52
|
+
});
|
|
53
|
+
if (new Set(values.map((entry) => entry.value)).size > 1)
|
|
54
|
+
result.set(token.name, values);
|
|
55
|
+
}
|
|
56
|
+
return result;
|
|
57
|
+
}
|
|
58
|
+
export function tokenViewFactsOf(inventory, purposes = new Map, defaultTheme = null) {
|
|
59
|
+
const themed = themedValues(inventory, defaultTheme), authored = (field) => field.replace(/-([a-z0-9])/g, (_, letter) => letter.toUpperCase()), readBy = (role) => Object.entries(profileTokenRoles).flatMap(([kind, fields]) => Object.entries(fields).flatMap(([field, roles]) => roles.includes(role) ? [`${kind}.${authored(field)}`] : []));
|
|
26
60
|
return {
|
|
27
61
|
roles: [...new Set(inventory.tokens.map((token) => token.role))].sort().map((role) => {
|
|
28
62
|
const guide = Object.hasOwn(tokenRoleGuides, role) ? tokenRoleGuides[role] : void 0;
|
|
@@ -42,7 +76,9 @@ export function tokenViewFactsOf(inventory) {
|
|
|
42
76
|
values: token.values,
|
|
43
77
|
declared: first === void 0 ? null : { file: first.file, line: first.line },
|
|
44
78
|
profiles: token.profiles,
|
|
45
|
-
type: token.type
|
|
79
|
+
type: token.type,
|
|
80
|
+
purpose: purposes.get(token.name) ?? null,
|
|
81
|
+
themed: themed.get(token.name) ?? []
|
|
46
82
|
};
|
|
47
83
|
})
|
|
48
84
|
};
|
|
@@ -58,5 +94,18 @@ export function tokenViewSheet(foundation) {
|
|
|
58
94
|
`);
|
|
59
95
|
}
|
|
60
96
|
export function tokenViewFacts(foundation, designSystem) {
|
|
61
|
-
return tokenViewFactsOf(buildTokenInventory({ foundation, designSystem, owners: [], reach: { complete: !1, reason: "The tokens view lists no owners." } }));
|
|
97
|
+
return tokenViewFactsOf(buildTokenInventory({ foundation, designSystem, owners: [], reach: { complete: !1, reason: "The tokens view lists no owners." } }), tokenPurposes(foundation), foundation.contexts.kind === "declared" ? foundation.contexts.themes[0]?.name ?? null : null);
|
|
98
|
+
}
|
|
99
|
+
const commentText = (text) => text.replace(/\s+/g, " ").trim();
|
|
100
|
+
export function tokenPurposes(foundation) {
|
|
101
|
+
const purposes = new Map;
|
|
102
|
+
for (const context of tokenDefinitionContexts(foundation))
|
|
103
|
+
for (const [name, declaration] of context.definitions) {
|
|
104
|
+
if (purposes.has(name))
|
|
105
|
+
continue;
|
|
106
|
+
const above = declaration.prev();
|
|
107
|
+
if (above?.type === "comment" && commentText(above.text) !== "")
|
|
108
|
+
purposes.set(name, commentText(above.text));
|
|
109
|
+
}
|
|
110
|
+
return purposes;
|
|
62
111
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { isDevelopmentModule } from "./development-modules.mjs";
|
|
2
|
+
const SCRIPT = /\.[cm]?tsx?$/, DECLARATION = /\.d\.[cm]?ts$/, ADS_ROLE = /\.ads\.[\w.]*[cm]?[jt]sx?$/, GENERATED = /(?:^|\/)palette\.generated\.ts$/;
|
|
3
|
+
export function unreachedSources(files, graph) {
|
|
4
|
+
return files.filter((file) => SCRIPT.test(file) && !DECLARATION.test(file) && !ADS_ROLE.test(file) && !GENERATED.test(file) && !isDevelopmentModule(file) && !graph.modules.has(file)).sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
5
|
+
}
|
package/dist/validation.mjs
CHANGED
|
@@ -20,7 +20,7 @@ function toolInputs() {
|
|
|
20
20
|
function visit(directory) {
|
|
21
21
|
for (const entry of readdirSync(directory, { withFileTypes: !0 }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
22
22
|
const file = path.join(directory, entry.name);
|
|
23
|
-
if (entry.isDirectory() && !["skills", "
|
|
23
|
+
if (entry.isDirectory() && !["skills", "showcase"].includes(entry.name))
|
|
24
24
|
visit(file);
|
|
25
25
|
else if (entry.isFile() && /\.(?:mjs|js|cjs|json)$/.test(file))
|
|
26
26
|
rows.push([path.relative(root, file), hash(readFileSync(file))]);
|
package/docs/ADS.md
CHANGED
|
@@ -59,7 +59,7 @@ MCP source editing is opt-in through `ads mcp --mutations`
|
|
|
59
59
|
Tooling updates preserve project-owned source and token values: an update never
|
|
60
60
|
silently replaces a brand, typography, spacing or motion value. Content imports
|
|
61
61
|
and adaptations are explicit operations; tool installation and upgrades load no
|
|
62
|
-
UI catalogue.
|
|
62
|
+
UI catalogue.
|
|
63
63
|
|
|
64
64
|
Websites and MCP Apps consume the same emitted components, patterns, controllers
|
|
65
65
|
and styles. Application adapters own routing, stores, MCP communication,
|
|
@@ -230,15 +230,19 @@ Both are declared in the recipe, never ad hoc
|
|
|
230
230
|
[TOKEN-ROLES.md](TOKEN-ROLES.md#provenance-and-permitted-derivation)).
|
|
231
231
|
- In every context, each token is a value of its role's shape (`token-type`),
|
|
232
232
|
and each surface profile's colour reaches 4.5:1 on its background
|
|
233
|
-
(`surface-contrast`)
|
|
233
|
+
(`surface-contrast`), or the minimum of what it paints where every use of
|
|
234
|
+
the profile is large text or artwork (3:1) or decorative artwork (none). A surface declaring `state: "inactive"` is exempt and
|
|
234
235
|
selectable only under `:disabled` or `[aria-disabled="true"]`
|
|
235
236
|
(`construction/inactive-surface-active`).
|
|
236
237
|
- Same-role tokens defined identically everywhere are reviewed
|
|
237
238
|
(`token-overlap-review`). What cannot be read statically is reviewed, never
|
|
238
|
-
passed (`token-type-unresolved`, `surface-contrast-unresolved`).
|
|
239
|
+
passed (`token-type-unresolved`, `surface-contrast-unresolved`). A surface
|
|
240
|
+
whose background is fully transparent is noted, not reviewed
|
|
241
|
+
(`surface-contrast-placed`): its contrast is decided where it is placed.
|
|
239
242
|
- Owner analysis checks owner states that pair one profile's colour with
|
|
240
243
|
another's background (`construction/state-contrast-insufficient`): 4.5:1, 3:1
|
|
241
|
-
over provably large text, none for inactive states
|
|
244
|
+
over provably large text and for artwork, none for inactive states and
|
|
245
|
+
decorative artwork.
|
|
242
246
|
|
|
243
247
|
#### Composed text contrast
|
|
244
248
|
|
|
@@ -273,6 +277,13 @@ See [LANGUAGE.md](LANGUAGE.md#spatial-construction-and-public-alignment).
|
|
|
273
277
|
(`source/frame-exceeds-region`). An unbounded region, a size ADS cannot
|
|
274
278
|
evaluate, or a public component placed as a cell or tile is
|
|
275
279
|
`review/frame-region-unresolved`, never a pass.
|
|
280
|
+
- A padded frame in a cell of a grid on a narrower gutter than `wide` puts its
|
|
281
|
+
content on the grid's text keyline: that gutter's start and the frame's
|
|
282
|
+
inline padding equal the wide gutter's start, within the profile's fine
|
|
283
|
+
unit, in every theme and brand (`source/keyline-missed`). A public component
|
|
284
|
+
placed in such a cell is held to the same by its root frame, across owners
|
|
285
|
+
(`component-keyline`; a root ADS cannot read is `component-keyline-unresolved`).
|
|
286
|
+
Controls, frames without inline padding and `gutter: "none"` grids are exempt.
|
|
276
287
|
- Every declared spatial profile, selected or not, reads through the grid
|
|
277
288
|
algebra in the base context and in every theme, brand and condition context
|
|
278
289
|
that changes a token it reads (`spatial-profile-invalid`). Every grid
|
|
@@ -342,11 +353,23 @@ passes it on. ADS never writes the application's document metadata; the
|
|
|
342
353
|
one grid (`assets/set-*`).
|
|
343
354
|
- An asset or glyph set that nothing binds or exports is an `asset-unused`
|
|
344
355
|
error. The application icon's drawings count as used.
|
|
356
|
+
- A source file the public entry never reaches is a `source-unreached` review
|
|
357
|
+
item. ADS reads a design system through its public barrel: the owners it
|
|
358
|
+
exports and what they import. A script outside that closure is checked by
|
|
359
|
+
nothing and emitted nowhere, so it should be exported, imported by an
|
|
360
|
+
exported owner, or deleted. It is reviewed, not refused, because a file can
|
|
361
|
+
be outside the entry on purpose for a while: a module that only a behaviour
|
|
362
|
+
contract or a test names, an owner being added or retired. Design
|
|
363
|
+
declarations (`*.ads.ts`), scenarios, fixtures, tests and mocks have their
|
|
364
|
+
own readers and are not concerned.
|
|
345
365
|
- Declared fonts (`font()` in `assets/`, one per family, beside its files) cover
|
|
346
366
|
what the text profiles draw: a selected weight that no upright face covers is
|
|
347
367
|
a `font-weight-missing` error at the profile.
|
|
348
368
|
- A font file above `assets.fontBudgetKb` (default 150, in KiB rounded up) is a
|
|
349
369
|
`font-budget` error.
|
|
370
|
+
- A family that declares a `fallback` has its matched fallback family named
|
|
371
|
+
right after it in every font-family token that names it first; otherwise
|
|
372
|
+
`font-fallback` (error).
|
|
350
373
|
- Reviewed: a family no font-family token names first or a face no profile
|
|
351
374
|
selects (`font-unused`), a file that is not WOFF2 (`font-format`), and a
|
|
352
375
|
`block` or `optional` display (`font-display`).
|
|
@@ -522,7 +545,7 @@ The application consumes the emitted output
|
|
|
522
545
|
(`jsxImportSource: "preact"`).
|
|
523
546
|
- `ads-dependencies.json` lists the packages the emitted modules require.
|
|
524
547
|
- The generated modules (`fonts.ts`, `app-icons.ts`, the palette) touch no
|
|
525
|
-
`window` or `document` when they load, so the emitted
|
|
548
|
+
`window` or `document` when they load, so the emitted example design system renders on a
|
|
526
549
|
server and hydrates in the browser. An owner's own module-level code decides
|
|
527
550
|
this for the rest.
|
|
528
551
|
|
|
@@ -562,13 +585,13 @@ accessibility, interaction, responsive layout, themes and motion.
|
|
|
562
585
|
serves them. `bun run sync:skill-references` copies them to each other skill's
|
|
563
586
|
`references/`, and `bun run check:skill-references` rejects drift during the
|
|
564
587
|
tool build. Published packages include them under `dist/skills/`.
|
|
565
|
-
- The
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
- The tool does not require
|
|
571
|
-
UI catalogue.
|
|
588
|
+
- The package ships no design system. `ads init` sets up configuration,
|
|
589
|
+
dependencies and an empty design-system folder; the project authors what goes
|
|
590
|
+
in it. The example design system the documents quote is ADS's own test
|
|
591
|
+
project (`tests/fixtures/starter-project/` in the repository), which the
|
|
592
|
+
package does not contain.
|
|
593
|
+
- The tool does not require any design system's names or styles and ships no
|
|
594
|
+
product UI catalogue.
|
|
572
595
|
- Tool releases should version contract changes, rules, skills and bootstrap
|
|
573
596
|
support. Project implementations and external source revisions have their own
|
|
574
597
|
update lifecycle; apply external changes through explicit source imports or
|
|
@@ -582,7 +605,7 @@ and fixture projects live under `tests/`.
|
|
|
582
605
|
- Runtime dependencies contain no React or UI library; the working example's
|
|
583
606
|
dependencies are development-only.
|
|
584
607
|
- The package allowlist contains only the CLI, core checks, MCP/Apps tooling and
|
|
585
|
-
its browser client, skills and the
|
|
608
|
+
its browser client, skills and the example design system. Packed-install tests verify that
|
|
586
609
|
it runs in a clean project without this repository's UI implementation.
|
|
587
610
|
- The playground is a working copy of `tests/fixtures/reference-project` under
|
|
588
611
|
ignored `.ds/playground/`
|
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.
|
|
@@ -464,7 +538,18 @@ icon ([fields](ADS.md#foundation-declaration)).
|
|
|
464
538
|
|
|
465
539
|
Emission writes them once as `foundation.css`. The sheet contains:
|
|
466
540
|
|
|
467
|
-
- One `@font-face` per declared font face
|
|
541
|
+
- One `@font-face` per declared font face, and for a family that declares a
|
|
542
|
+
`fallback`, one matched fallback face per declared face. `src/font-metrics.mts`
|
|
543
|
+
reads a face's measurements from its captured bytes (bare SFNT, WOFF, WOFF2;
|
|
544
|
+
only `head`, `hhea`, `OS/2`, `cmap` and `hmtx`; a WOFF2 stream is decompressed
|
|
545
|
+
once per captured byte array, held weakly). `src/font-fallback.mts` is pure:
|
|
546
|
+
the size adjustment is the face's average width of English prose
|
|
547
|
+
(`CHARACTER_FREQUENCY`: lowercase, space, capitals, punctuation and digits by
|
|
548
|
+
their share) over the system font's, and the line-metric overrides are the face's own divided by
|
|
549
|
+
it. The widths of Arial, Times New Roman and Courier New are constants
|
|
550
|
+
measured with the same reader. The record is computed when the font
|
|
551
|
+
declaration is read (`src/font-model.mts`), only for a declaration that
|
|
552
|
+
states a fallback.
|
|
468
553
|
- The reset.
|
|
469
554
|
- The text and surface fields on `body`. The surface is also on `[data-theme]`
|
|
470
555
|
and `[data-brand]`, so a nested context repaints.
|
|
@@ -504,7 +589,7 @@ construct in neither set is recorded as unrecognized; it is not dropped.
|
|
|
504
589
|
|
|
505
590
|
Two controls stop a new lowered construct from shipping unlisted. A unit test
|
|
506
591
|
requires a classification for every property the lowering inventory registers.
|
|
507
|
-
The emitted
|
|
592
|
+
The emitted example design system and fixtures are held to the inventory in both directions.
|
|
508
593
|
|
|
509
594
|
The registry states facts, never browser versions. ADS has no declared browser
|
|
510
595
|
targets: the application checks the recorded features against its own targets.
|
|
@@ -575,7 +660,7 @@ isolated preview.
|
|
|
575
660
|
|
|
576
661
|
ADS runs what owners register. It runs the built-in `unit`, `browser` and
|
|
577
662
|
`strict` profiles itself, with its own Bun and Playwright, and it owns evidence
|
|
578
|
-
freshness and investigations. The
|
|
663
|
+
freshness and investigations. The example design system's form-field bridge
|
|
579
664
|
(`controllers/FormField`) registers unit checks.
|
|
580
665
|
|
|
581
666
|
A project that registers no behavior checks gets `{ status: "not-available",
|
|
@@ -871,8 +956,36 @@ view module holds no stylesheet and no CSS rule
|
|
|
871
956
|
own rules from the facts, written as they are by
|
|
872
957
|
`showcase-client/project-rules.mts`.
|
|
873
958
|
|
|
874
|
-
**
|
|
875
|
-
|
|
959
|
+
**The views are cards.** `showcase-ui`'s `CardGroup`, `SampleCard` and
|
|
960
|
+
`GridMiniature` (`patterns/SampleCards/`) draw a view as groups of cards: a
|
|
961
|
+
stage for the sample, the name and one line. The
|
|
962
|
+
host passes them as data (`renderCardPage`) and fills each stage
|
|
963
|
+
(`[data-slot="stage"][data-key]`) with the sample it draws. On a miniature
|
|
964
|
+
grid it sets the project's values only: each column's share of the line, the
|
|
965
|
+
outer margin as the grid's inline padding, a gutter as a column's.
|
|
966
|
+
|
|
967
|
+
**Spatial grids** (`foundation`, in `showcase-client/ads-views.mts`, in the
|
|
968
|
+
Profiles section after its summary):
|
|
969
|
+
|
|
970
|
+
- Each grid's facts name the profiles it builds on (`buildsOn`, written at
|
|
971
|
+
emission from the profile facts). A profile whose breakpoints, gutters and
|
|
972
|
+
scale equal those of one it builds on shows only its own examples (a hybrid
|
|
973
|
+
grid, a fixed tiling); the shared cards stand under the profile that states
|
|
974
|
+
them.
|
|
975
|
+
|
|
976
|
+
- It embeds the facts' `grids` (`src/grid-facts.mts`): each spatial profile's
|
|
977
|
+
definition, its resolved breakpoints and lengths, and `examples`, the grid
|
|
978
|
+
algebra's own expansion of example regions on the profile. There is one
|
|
979
|
+
fluid example per gutter mode; a `hybrid` one when the profile states
|
|
980
|
+
`fixedStart` or `fixedEnd` (with its per-breakpoint tracks, and the first
|
|
981
|
+
gutter mode its cells fit with); and a `fixed` tiling when it states
|
|
982
|
+
`tileSize`. An optional example the algebra refuses is listed in `omitted`
|
|
983
|
+
with the reason, and the view says so.
|
|
984
|
+
- Like every view it takes the token-sheets frame: the document sheet and the
|
|
985
|
+
preview-only tokens sheet, which declares every token. An example reads the
|
|
986
|
+
profile's own tokens (a fixed track, a tile size), which no owner's sheet is
|
|
987
|
+
sure to carry. No owner is in its module graph, so an owner-only edit leaves
|
|
988
|
+
it unchanged.
|
|
876
989
|
|
|
877
990
|
**Tokens** (`tokens`, `showcase-client/tokens-view.mts`):
|
|
878
991
|
|
|
@@ -896,6 +1009,37 @@ owner's sheet is in its frame.
|
|
|
896
1009
|
draws that token's sample in the frame's theme and brand.
|
|
897
1010
|
- It lists no owners, so an owner-only edit leaves it unchanged; a profile or
|
|
898
1011
|
token edit rebuilds it.
|
|
1012
|
+
- ADS decides the sample, the showcase draws it. Each profile's `applied`
|
|
1013
|
+
fact (`profileApplied`) states what its sample is (one control, a box,
|
|
1014
|
+
text, a gap, a size, a focus indicator), what sits inside it, the CSS
|
|
1015
|
+
values for its box, its text and its artwork, the frame's own extent with
|
|
1016
|
+
whether it is a share of its container, and, for a composite, the fields
|
|
1017
|
+
that shape it. `showcase-ui`'s `AppliedSample` has a shape for each; the
|
|
1018
|
+
view sets the values on its slots and decides nothing. A new kind of sample
|
|
1019
|
+
is a new fact and a new shape, never a guess in the view.
|
|
1020
|
+
|
|
1021
|
+
**Tokens**, beside the above: each token's `purpose` is the comment its author
|
|
1022
|
+
wrote directly above its declaration (`tokenPurposes`); the view shows it,
|
|
1023
|
+
the profiles that read the token, a status only where one is not valid, and
|
|
1024
|
+
the contexts only where some token differs between them.
|
|
1025
|
+
|
|
1026
|
+
**Scenario pages** (`showcase-client/scenario-page.mts`): a scenario is data
|
|
1027
|
+
and subjects; ADS draws the page with `showcase-ui`'s `ScenarioPage`.
|
|
1028
|
+
|
|
1029
|
+
- Named `states` are one switch; the chosen set is every specimen's props.
|
|
1030
|
+
- Live controls (`controls: true`): owner analysis records each component's
|
|
1031
|
+
props that select markup or styling from a closed list of values
|
|
1032
|
+
(`src/analysis/owner-controls.mts`, the equality axes of the choice
|
|
1033
|
+
analysis). Emission writes them to the preview tree as
|
|
1034
|
+
`ads-preview-controls.json` (`src/preview-controls.mts`), a file of its own
|
|
1035
|
+
so that a token edit does not rebuild scenario modules. Each scenario's
|
|
1036
|
+
entry module embeds it; the page draws one control per prop of the first
|
|
1037
|
+
owner in `covers` and passes the chosen values over the state's props.
|
|
1038
|
+
- `frame: "screen"` fills the preview: the page takes the preview root's
|
|
1039
|
+
height and the specimen what the state bar leaves.
|
|
1040
|
+
- `tests/browser/showcase-ui-pages.test.mjs` measures what `ads check` cannot
|
|
1041
|
+
see on these pages: a screen that fills, a sample inside its box, a control
|
|
1042
|
+
that sets a prop, a header that keeps the current section in view.
|
|
899
1043
|
|
|
900
1044
|
**Artwork** (`assets`, `showcase-client/assets-view.mts`):
|
|
901
1045
|
|