@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
package/dist/motion-model.mjs
CHANGED
|
@@ -2,6 +2,8 @@ import { check, rejecting } from "./design-rejection.mjs";
|
|
|
2
2
|
const OPERATIONS = {
|
|
3
3
|
"translate-inline": { channel: "translate", field: "distance", neutral: 0 },
|
|
4
4
|
scale: { channel: "scale", field: "scale", neutral: 1 },
|
|
5
|
+
"scale-inline": { channel: "scale", field: "scale", neutral: 1 },
|
|
6
|
+
"scale-block": { channel: "scale", field: "scale", neutral: 1 },
|
|
5
7
|
rotate: { channel: "rotate", field: "angle", neutral: 0 }
|
|
6
8
|
}, isProperty = (value) => Object.hasOwn(OPERATIONS, value), CHANNELS = ["translate", "scale", "rotate"], CONDITIONS = new Set(["&:hover:not(:disabled)", "&:active:not(:disabled)", '&[aria-busy="true"]']), declarationsOf = (node) => (node.nodes ?? []).filter((child) => child.type === "decl");
|
|
7
9
|
export const inspectMotion = (part, motionProfiles, { complete = !0 } = {}) => rejecting(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { currentAnalysis, memoFact, memoProgram } from "./analysis/context.mjs";
|
|
3
|
-
import { optionalSourceText } from "./analysis/helpers.mjs";
|
|
3
|
+
import { capturedTreeFiles, optionalSourceText } from "./analysis/helpers.mjs";
|
|
4
4
|
import { projectOwnerCache, projectScenarioCache } from "./analysis/owner-analysis-cache.mjs";
|
|
5
5
|
import { designDigests } from "./analysis/owner-analysis-key.mjs";
|
|
6
6
|
import { barrelDeclarations, checkDesignSystem } from "./analysis/owner-discovery.mjs";
|
|
@@ -23,7 +23,7 @@ import { tokenChecks } from "./token-checks.mjs";
|
|
|
23
23
|
import { describeTokenProvenance } from "./token-provenance.mjs";
|
|
24
24
|
import { describeTokenType } from "./token-type-check.mjs";
|
|
25
25
|
import { describeTokenSheet } from "./token-sheet-check.mjs";
|
|
26
|
-
import { describeSurfaceContrast, describeUnresolved } from "./surface-contrast.mjs";
|
|
26
|
+
import { describeSurfaceContrast, describeUnresolved, sufficientForUses } from "./surface-contrast.mjs";
|
|
27
27
|
import { describeFocus, focusChecks } from "./focus-checks.mjs";
|
|
28
28
|
import { NO_TARGETS, targetSizeFindings } from "./target-size.mjs";
|
|
29
29
|
import { describeTokenOverlap } from "./token-overlap.mjs";
|
|
@@ -32,6 +32,8 @@ import { describeFont, fontChecks } from "./font-checks.mjs";
|
|
|
32
32
|
import { appIconAssets, appIconPath, appIconPlan, appIconRule, describeAppIcon } from "./app-icon-checks.mjs";
|
|
33
33
|
import { maskableFindings } from "./emit/app-icon-render.mjs";
|
|
34
34
|
import { composedContrastFindings, composedRepair, describeComposedContrast } from "./composed-contrast.mjs";
|
|
35
|
+
import { composedKeylineFindings, keylineRepairs } from "./composed-keyline.mjs";
|
|
36
|
+
import { unreachedSources } from "./unreached-sources.mjs";
|
|
35
37
|
export const OWNER_ANALYSIS_RULE = "owner-analysis", OWNER_BLOCKED_RULE = "owner-analysis-blocked";
|
|
36
38
|
export { FOUNDATION_DECLARATION } from "./design-contexts.mjs";
|
|
37
39
|
export const OWNER_REVIEW_RULE = "owner-analysis-review";
|
|
@@ -45,6 +47,7 @@ const ACCESSIBILITY_RULES = new Map([
|
|
|
45
47
|
["construction/accessibility-declaration-unmet", "a11y-non-text-contrast"]
|
|
46
48
|
]), ACCESSIBILITY_REVIEWS = new Map([
|
|
47
49
|
["review/click-without-keyboard", "a11y-keyboard"],
|
|
50
|
+
["review/motion-endless", "a11y-motion-endless"],
|
|
48
51
|
["review/target-size-unresolved", "a11y-target-size-unresolved"],
|
|
49
52
|
["review/target-area-overlap-unresolved", "a11y-target-size-unresolved"]
|
|
50
53
|
]), ownerRule = (code) => ACCESSIBILITY_RULES.get(code) ?? OWNER_ANALYSIS_RULE, reviewRule = (code) => ACCESSIBILITY_REVIEWS.get(code) ?? OWNER_REVIEW_RULE, TOKEN_CHECK_GUIDES = {
|
|
@@ -59,6 +62,7 @@ const ACCESSIBILITY_RULES = new Map([
|
|
|
59
62
|
"a11y-focus-unresolved": "ads://guides/accessibility",
|
|
60
63
|
"surface-contrast": "ads://guides/accessibility",
|
|
61
64
|
"surface-contrast-unresolved": "ads://guides/accessibility",
|
|
65
|
+
"surface-contrast-placed": "ads://guides/accessibility",
|
|
62
66
|
"token-overlap-review": "ads://guides/tokens",
|
|
63
67
|
"spatial-profile-invalid": "ads://guides/layout",
|
|
64
68
|
"spatial-context-unsupported": "ads://guides/layout"
|
|
@@ -140,9 +144,12 @@ async function analyzeRevision(inputs, captured, settings) {
|
|
|
140
144
|
}
|
|
141
145
|
if (analyzed.kind === "err")
|
|
142
146
|
return { report: { diagnostics: distinct([...missing, ...findingsOf(inputs, { kind: "owner", failure: analyzed.error })]), advisories: [], contexts: contextFindings, palette, tokens, fonts, appIcon, assets: [], composed: [], packages: [] }, checked: null };
|
|
143
|
-
const iconAssets = design.value.appIcon === null ? [] : appIconAssets(design.value.appIcon, assets), composed =
|
|
147
|
+
const iconAssets = design.value.appIcon === null ? [] : appIconAssets(design.value.appIcon, assets), composed = [
|
|
148
|
+
...await timing.timeStage("composed-contrast", () => composedFindings(inputs, texts, analyzed.value, foundation, design.value.document)),
|
|
149
|
+
...timing.timeStage("composed-keyline", () => keylineFindings(inputs, analyzed.value, foundation))
|
|
150
|
+
], checkedFindings = checkFindings(inputs, analyzed.value), released = releasedSurfaces(foundation, analyzed.value, design.value.document), usedTokens = released.size === 0 ? tokens : tokenFindings(inputs, texts, foundation, design.value.document, released);
|
|
144
151
|
return {
|
|
145
|
-
report: { ...checkedFindings, diagnostics: distinct([...missing, ...checkedFindings.diagnostics]), contexts: contextFindings, palette, tokens, fonts, appIcon, assets: assetFindings(inputs, texts, assets, analyzed.value, iconAssets), composed, packages: packageFindings(inputs, analyzed.value) },
|
|
152
|
+
report: { ...checkedFindings, diagnostics: distinct([...missing, ...checkedFindings.diagnostics]), contexts: contextFindings, palette, tokens: usedTokens, fonts, appIcon, assets: [...assetFindings(inputs, texts, assets, analyzed.value, iconAssets), ...unreachedFindings(inputs, analyzed.value)], composed, packages: packageFindings(inputs, analyzed.value) },
|
|
146
153
|
checked: { check: analyzed.value, contexts, foundation, document: design.value.document, assets, fonts: design.value.fonts, appIcon: icon.plan, keys: new Map(reuse.keys()), options, tally }
|
|
147
154
|
};
|
|
148
155
|
}
|
|
@@ -193,6 +200,24 @@ function assetFindings(inputs, captured, catalog, check, iconAssets) {
|
|
|
193
200
|
const icon = { assets: iconAssets, sets: [], glyphs: [] };
|
|
194
201
|
return unusedArtwork(catalog, [...owners, ...[...check.plain.values()].map((module) => module.artwork), icon]).map((item) => unusedFinding(inputs, captured, item));
|
|
195
202
|
}
|
|
203
|
+
function unreachedFindings(inputs, check) {
|
|
204
|
+
const plainModules = [...check.graph.modules.values()].filter((module) => module.role !== "owner").length;
|
|
205
|
+
if ([...check.outcomes.values()].some((outcome) => outcome.kind !== "analyzed") || check.plain.size !== plainModules)
|
|
206
|
+
return [];
|
|
207
|
+
const captured = capturedTreeFiles(inputs.dsRoot);
|
|
208
|
+
if (captured === null)
|
|
209
|
+
return [];
|
|
210
|
+
const files = captured.map((file) => path.relative(inputs.dsRoot, file).replaceAll("\\", "/")).filter((file) => !file.startsWith(".."));
|
|
211
|
+
return unreachedSources(files, check.graph).map((file) => ({
|
|
212
|
+
rule: "source-unreached",
|
|
213
|
+
severity: findingSeverity("source-unreached"),
|
|
214
|
+
file: projectFile(inputs, path.join(inputs.dsRoot, file)),
|
|
215
|
+
line: 1,
|
|
216
|
+
column: 1,
|
|
217
|
+
message: `${file} is not reached from the design system's public entry: no exported owner imports it, so ADS checks nothing in it and emits nothing from it. Export it from the entry, import it from an owner that is exported, or delete it; leave it only if it is outside the entry on purpose.`,
|
|
218
|
+
guidanceUri: "ads://guides/layers"
|
|
219
|
+
}));
|
|
220
|
+
}
|
|
196
221
|
function unusedFinding(inputs, captured, item) {
|
|
197
222
|
const at = sitePositionIn(inputs, (name) => captured.get(name) ?? null, { kind: "macro-field", file: item.site.file, macro: item.site.macro, declaration: item.site.declaration, path: ["name"] }), what = (() => {
|
|
198
223
|
switch (item.kind) {
|
|
@@ -236,13 +261,28 @@ function paletteFindings(inputs, foundation, contexts, declared) {
|
|
|
236
261
|
function missingTokenFindings(inputs, captured, foundation) {
|
|
237
262
|
return tokenChecks(foundation).missing.map((failure) => finding(ownerError({ kind: "token-css", owner: inputs.dsRoot, failure }), failure.reference === null ? foundationPosition(inputs) : { file: projectFile(inputs, path.join(inputs.dsRoot, failure.reference.file)), ...offsetPosition(captured.get(failure.reference.file) ?? null, failure.reference.offset) }));
|
|
238
263
|
}
|
|
239
|
-
|
|
264
|
+
const surfacePairKey = (finding) => JSON.stringify([finding.profile, finding.paints]);
|
|
265
|
+
function releasedSurfaces(foundation, check, document) {
|
|
266
|
+
const none = new Set, failing = tokenChecks(foundation).contrast.filter((finding) => finding.kind === "surface-contrast");
|
|
267
|
+
if (failing.length === 0 || [...check.outcomes.values()].some((outcome) => outcome.kind !== "analyzed"))
|
|
268
|
+
return none;
|
|
269
|
+
const uses = new Map, record = (use) => void uses.set(use.surface, [...uses.get(use.surface) ?? [], use]);
|
|
270
|
+
record({ surface: document.names.surface, content: "text", text: { fontSize: document.text.get("font-size") ?? null, fontWeight: document.text.get("font-weight") ?? null } });
|
|
271
|
+
for (const [, owner] of analyzedOwners(check.outcomes))
|
|
272
|
+
for (const style of owner.styles.values()) {
|
|
273
|
+
if (style.surfaceUses === void 0)
|
|
274
|
+
return none;
|
|
275
|
+
style.surfaceUses.forEach(record);
|
|
276
|
+
}
|
|
277
|
+
return new Set(failing.filter((finding) => sufficientForUses(foundation, finding.paints, [finding.profile, ...finding.shared].flatMap((name) => uses.get(name) ?? []))).map(surfacePairKey));
|
|
278
|
+
}
|
|
279
|
+
function tokenFindings(inputs, captured, foundation, document, released = new Set) {
|
|
240
280
|
const report = tokenChecks(foundation), text = (name) => captured.get(name) ?? null, atSheet = (site) => site === null ? foundationPosition(inputs) : { file: projectFile(inputs, path.join(inputs.dsRoot, site.file)), ...offsetPosition(text(site.file), site.offset) }, atProfile = (file, profile) => file === null ? foundationPosition(inputs) : { file: projectFile(inputs, path.join(inputs.dsRoot, file)), ...offsetPosition(text(file), profileOffset(text(file), profile)) }, located = (rule, position, message) => ({ rule, severity: findingSeverity(rule), ...position, message, guidanceUri: TOKEN_CHECK_GUIDES[rule] });
|
|
241
281
|
return [
|
|
242
282
|
...report.sheets.map((finding) => located(finding.kind, atSheet(finding.site), describeTokenSheet(finding))),
|
|
243
283
|
...report.types.filter((finding) => finding.kind !== "token-type-unresolved" || finding.missingTokens === void 0).map((finding) => located(tokenTypeRule(finding), atSheet(finding.site), describeTokenType(finding))),
|
|
244
284
|
...report.provenance.map((finding) => located(finding.kind, atSheet(finding.site), describeTokenProvenance(finding))),
|
|
245
|
-
...report.contrast.map((finding) => located(finding.kind, atProfile(finding.file, finding.profile), describeSurfaceContrast(finding))),
|
|
285
|
+
...report.contrast.filter((finding) => !released.has(surfacePairKey(finding))).map((finding) => located(finding.kind, atProfile(finding.file, finding.profile), describeSurfaceContrast(finding))),
|
|
246
286
|
...report.overlaps.map((finding) => located(finding.kind, atSheet(finding.site), describeTokenOverlap(finding))),
|
|
247
287
|
...focusChecks(foundation, document).map((finding) => located(focusRule(finding), atProfile(finding.file, finding.profile), describeFocus(finding, describeUnresolved))),
|
|
248
288
|
...gridChecks(foundation).map((finding) => located(finding.kind, atProfile(finding.file, finding.profile), describeGridCheck(finding)))
|
|
@@ -274,6 +314,24 @@ async function composedFindings(inputs, captured, check, foundation, document) {
|
|
|
274
314
|
return finding.kind === "component-contrast" ? { ...located, tokens: finding.tokens, contexts: finding.contexts, states: finding.states } : located;
|
|
275
315
|
});
|
|
276
316
|
}
|
|
317
|
+
function keylineFindings(inputs, check, foundation) {
|
|
318
|
+
const owners = new Map;
|
|
319
|
+
for (const [name, owner] of analyzedOwners(check.outcomes))
|
|
320
|
+
owners.set(name, owner.composition);
|
|
321
|
+
const at = (point) => ({ file: projectFile(inputs, path.join(inputs.dsRoot, point.file)), line: point.line, column: point.column }), px = (value) => `${Math.round(value * 100) / 100}px`;
|
|
322
|
+
return composedKeylineFindings({ foundation, owners }).map((finding) => {
|
|
323
|
+
const repair = keylineRepairs[finding.kind], message = finding.kind === "component-keyline" ? `<${finding.component}> is placed in a cell of a ${finding.gutter}-gutter grid, and its root frame ${finding.frame} starts its content ${px(finding.insetPx)} from the column line (the ${finding.gutter} gutter's start and its inline padding; borders are not counted), but the text keyline of this grid is ${px(finding.keylinePx)} (the wide gutter's start) under ${finding.context}: its text is ${px(Math.abs(finding.insetPx - finding.keylinePx))} ${finding.insetPx > finding.keylinePx ? "past" : "short of"} the keyline, more than the profile's fine unit (${px(finding.tolerancePx)}).` : `<${finding.component}> is placed in a cell of a ${finding.gutter}-gutter grid, but whether its content starts on the grid's text keyline cannot be proven: ${finding.reason}.`;
|
|
324
|
+
return {
|
|
325
|
+
rule: finding.kind,
|
|
326
|
+
severity: findingSeverity(finding.kind),
|
|
327
|
+
...at(finding.site),
|
|
328
|
+
message: `${message} ${repair}`,
|
|
329
|
+
repair,
|
|
330
|
+
guidanceUri: "ads://guides/layout",
|
|
331
|
+
related: finding.kind === "component-keyline" ? [{ ...at(finding.frameAt), message: `The root frame of <${finding.component}>: ${finding.frame}.` }] : []
|
|
332
|
+
};
|
|
333
|
+
});
|
|
334
|
+
}
|
|
277
335
|
function fontRule(finding) {
|
|
278
336
|
switch (finding.kind) {
|
|
279
337
|
case "font-weight-missing":
|
|
@@ -284,6 +342,8 @@ function fontRule(finding) {
|
|
|
284
342
|
case "font-family-unused":
|
|
285
343
|
case "font-face-unused":
|
|
286
344
|
return "font-unused";
|
|
345
|
+
case "font-fallback-unnamed":
|
|
346
|
+
return "font-fallback";
|
|
287
347
|
}
|
|
288
348
|
}
|
|
289
349
|
function fontFindingPath(finding) {
|
|
@@ -305,7 +365,7 @@ function fontFindings(inputs, captured, foundation, document, fonts) {
|
|
|
305
365
|
return composed.kind === "ok" ? composed.value.file ?? null : null;
|
|
306
366
|
};
|
|
307
367
|
return fontChecks({ foundation, document, fonts, budgetKb: inputs.fontBudgetKb, profileFile }).map((finding) => {
|
|
308
|
-
const rule = fontRule(finding), position = finding.kind === "font-weight-missing" ? finding.file === null ? foundationPosition(inputs) : { file: projectFile(inputs, path.join(inputs.dsRoot, finding.file)), ...offsetPosition(text(finding.file), profileOffset(text(finding.file), finding.profile)) } : sitePositionIn(inputs, text, { kind: "macro-field", file: finding.font.site.file, macro: "font", declaration: finding.font.site.declaration, path: fontFindingPath(finding) });
|
|
368
|
+
const rule = fontRule(finding), position = finding.kind === "font-weight-missing" ? finding.file === null ? foundationPosition(inputs) : { file: projectFile(inputs, path.join(inputs.dsRoot, finding.file)), ...offsetPosition(text(finding.file), profileOffset(text(finding.file), finding.profile)) } : finding.kind === "font-fallback-unnamed" ? { file: projectFile(inputs, path.join(inputs.dsRoot, finding.file)), ...offsetPosition(text(finding.file), Math.max(0, (text(finding.file) ?? "").search(new RegExp(`${finding.token}\\s*:`)))) } : sitePositionIn(inputs, text, { kind: "macro-field", file: finding.font.site.file, macro: "font", declaration: finding.font.site.declaration, path: fontFindingPath(finding) });
|
|
309
369
|
return { rule, severity: findingSeverity(rule), ...position, message: describeFont(finding), guidanceUri: "ads://guides/performance" };
|
|
310
370
|
});
|
|
311
371
|
}
|
package/dist/owner-errors.mjs
CHANGED
|
@@ -91,6 +91,8 @@ export function constructionError(failure) {
|
|
|
91
91
|
case "profile-kind":
|
|
92
92
|
case "profile-field-missing":
|
|
93
93
|
case "profile-field-unsupported":
|
|
94
|
+
case "surface-effect-misplaced":
|
|
95
|
+
case "surface-shadow-layer":
|
|
94
96
|
case "content-missing":
|
|
95
97
|
case "profile-provider-conflict":
|
|
96
98
|
case "parts-visual-repeated":
|
|
@@ -105,6 +107,19 @@ export function constructionError(failure) {
|
|
|
105
107
|
case "drawn-height-below-minimum":
|
|
106
108
|
case "paint-transition-redundant":
|
|
107
109
|
case "paint-transition-effect-unsupported":
|
|
110
|
+
case "prose-contrast-insufficient":
|
|
111
|
+
case "condition-visual-unsupported":
|
|
112
|
+
case "sequence-steps-invalid":
|
|
113
|
+
case "sequence-not-seamless":
|
|
114
|
+
case "sequence-step-field":
|
|
115
|
+
case "sequence-stagger-missing":
|
|
116
|
+
case "sequence-property-conflict":
|
|
117
|
+
case "state-text-field":
|
|
118
|
+
case "state-text-unbound":
|
|
119
|
+
case "outset-unsupported":
|
|
120
|
+
case "scheme-unsupported":
|
|
121
|
+
case "enter-surface-unsupported":
|
|
122
|
+
case "enter-property-conflict":
|
|
108
123
|
case "pseudo-surface-unsupported":
|
|
109
124
|
case "placeholder-contrast-insufficient":
|
|
110
125
|
case "placeholder-contrast-unresolved":
|
|
@@ -113,6 +128,7 @@ export function constructionError(failure) {
|
|
|
113
128
|
case "target-size-below-minimum":
|
|
114
129
|
case "target-area-overlap":
|
|
115
130
|
case "non-text-contrast-insufficient":
|
|
131
|
+
case "corner-overpaint":
|
|
116
132
|
case "accessibility-declaration-unmet":
|
|
117
133
|
case "layer-root-padding":
|
|
118
134
|
case "layer-frame-position":
|
package/dist/owner-lowering.mjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { BORDER_STYLE } from "./role-vocabulary.mjs";
|
|
1
2
|
import { reducedMotionPolicy } from "./lowering-motion.mjs";
|
|
2
3
|
import { attempt } from "./result.mjs";
|
|
3
4
|
import { tokenValueContexts } from "./design-foundation.mjs";
|
|
4
5
|
import { lengthPx } from "./css-length.mjs";
|
|
5
|
-
import { normalizedDeclarations } from "./construction-spec.mjs";
|
|
6
|
+
import { normalizedDeclarations, scaleValue } from "./construction-spec.mjs";
|
|
7
|
+
import { FRAME_INSET_FIELDS } from "./lowering-region-layout.mjs";
|
|
6
8
|
import {
|
|
7
9
|
HIT_AREA_FIELDS,
|
|
8
10
|
LIGHT,
|
|
@@ -21,8 +23,13 @@ import {
|
|
|
21
23
|
writeTransitions,
|
|
22
24
|
placed,
|
|
23
25
|
profiles,
|
|
24
|
-
visualPart
|
|
26
|
+
visualPart,
|
|
27
|
+
checkSurfaceEffects,
|
|
28
|
+
writeEnter,
|
|
29
|
+
writePlays,
|
|
30
|
+
writeStateText
|
|
25
31
|
} from "./construction-output.mjs";
|
|
32
|
+
import { settled } from "./lowering-enter.mjs";
|
|
26
33
|
function controlArrangement(spec) {
|
|
27
34
|
switch (spec.layout) {
|
|
28
35
|
case "inline":
|
|
@@ -44,45 +51,52 @@ export function controlEnvelope(spec, line, visual, gap) {
|
|
|
44
51
|
}
|
|
45
52
|
export function lowerControl(spec, foundation, input) {
|
|
46
53
|
return attempt((reject) => {
|
|
47
|
-
const profile = profiles(foundation, reject), selected = profile.select(spec.profile, spec.select), slots = Object.fromEntries(selected.fields), text = profile.of(slots["text-profile"], "text", spec.profile), frame = profile.of(slots["frame-profile"], "frame", spec.profile), spacing = profile.of(slots["spacing-profile"], "spacing", spec.profile), visual = profile.of(slots["visual-profile"], "visual", spec.profile), focus = profile.of(slots["focus-profile"], "focus", spec.profile), animated = spec.glyph !== null && (spec.glyph.transition.length > 0 || spec.glyph.when.length > 0), pressed = spec.press.when.length > 0, motion = animated || pressed || slots["motion-profile"] !== void 0 ? profile.of(slots["motion-profile"], "motion", spec.profile) : {};
|
|
54
|
+
const profile = profiles(foundation, reject), selected = profile.select(spec.profile, spec.select), slots = Object.fromEntries(selected.fields), text = profile.of(spec.text ?? slots["text-profile"], "text", spec.profile), frame = profile.of(slots["frame-profile"], "frame", spec.profile), spacing = profile.of(slots["spacing-profile"], "spacing", spec.profile), visual = profile.of(slots["visual-profile"], "visual", spec.profile), focus = profile.of(slots["focus-profile"], "focus", spec.profile), animated = spec.glyph !== null && (spec.glyph.transition.length > 0 || spec.glyph.when.length > 0), pressed = spec.press.when.length > 0, motion = animated || pressed || slots["motion-profile"] !== void 0 ? profile.of(slots["motion-profile"], "motion", spec.profile) : {};
|
|
48
55
|
if (animated || pressed || slots["motion-profile"] !== void 0) {
|
|
49
56
|
const reduced = reducedMotionPolicy(motion.reduced);
|
|
50
57
|
if (reduced.kind === "unsupported")
|
|
51
58
|
return reject({ kind: "lowering", failure: { kind: "motion", error: { kind: "reduced-motion-unsupported", declared: reduced.declared } } });
|
|
52
59
|
checkMotion(spec.source, motion, reject);
|
|
53
60
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
writePaintTransition(out, profile, "&", spec.paintTransition, motionFields(spec.paintTransition.motion, slots, profile), surfaces, reject,
|
|
58
|
-
|
|
59
|
-
writeTransitions(out, "&",
|
|
60
|
-
|
|
61
|
+
checkSurfaceEffects(foundation, profile, [spec.surface, ...spec.when.map(([, name]) => name)], "container", reject);
|
|
62
|
+
const out = output(input.root, "lowerButton", reject, profile), press = writeRootPress(out, spec.press, motion, profile, reject), surfaces = { base: { name: spec.surface, fields: profile.of(spec.surface, "surface") }, states: spec.when.map(([, surface]) => ({ name: surface, fields: profile.of(surface, "surface") })) }, pressGroups = press === null ? [] : [press], entering = writeEnter(out, profile, "&", spec.enter, surfaces.base.fields, spec.when.map(([condition, surface]) => ({ selector: condition, fields: profile.of(surface, "surface") })), slots, [...spec.paintTransition?.channels ?? [], ...pressGroups.flatMap((group) => group.properties)], reject), groups = entering === null ? pressGroups : [...pressGroups, entering.group], blurred = entering?.blurred ?? !1;
|
|
63
|
+
if (spec.paintTransition !== null)
|
|
64
|
+
writePaintTransition(out, profile, "&", spec.paintTransition, motionFields(spec.paintTransition.motion, slots, profile), surfaces, reject, groups);
|
|
65
|
+
else
|
|
66
|
+
writeTransitions(out, "&", groups);
|
|
67
|
+
writePlays(out, profile, foundation, "&", spec.plays, "&", [...spec.paintTransition?.channels ?? [], ...groups.flatMap((group) => group.properties)], reject);
|
|
68
|
+
profile.only(frame, "frame", ["min-block-size", "min-inline-size", ...FRAME_INSET_FIELDS, "minimum-block-inset", "border-width", BORDER_STYLE, "radius", ...HIT_AREA_FIELDS]);
|
|
69
|
+
const line = frame[BORDER_STYLE];
|
|
70
|
+
if (line !== void 0 && spec.normalize.some(([property]) => property === "border-style"))
|
|
71
|
+
return reject({ kind: "extent-conflict", element: "&", property: "border-style", providers: ["frame profile", "normalize"] });
|
|
61
72
|
const minInline = frame["min-inline-size"], { asset, hasText } = input;
|
|
62
73
|
if (!hasText && asset === null)
|
|
63
74
|
return reject({ kind: "content-missing" });
|
|
64
75
|
if (asset !== null && asset.paint !== "foreground")
|
|
65
76
|
return reject({ kind: "paint-unsupported", asset: asset.name, paint: asset.paint });
|
|
66
|
-
const geometry = asset === null ? null : visualPart(asset, visual, input.state, LIGHT, reject), at = (fields, name, owner) => profile.field(fields, owner, name), lineHeight = at(text, "line-height", "text"), gap = at(spacing, "content-gap", "spacing"), box = controlBox(frame, controlEnvelope(spec, hasText ? LINE_BOX : null, geometry?.extent ?? null, gap), profile.field), keepsWidth = hasText && spec.label.wrap === "never";
|
|
77
|
+
const geometry = asset === null ? null : visualPart(asset, visual, input.state, LIGHT, reject), at = (fields, name, owner) => profile.field(fields, owner, name), lineHeight = at(text, "line-height", "text"), gap = at(spacing, "content-gap", "spacing"), box = controlBox(frame, controlEnvelope(spec, hasText ? LINE_BOX : null, geometry?.extent ?? null, gap), profile.field, reject), keepsWidth = hasText && spec.label.wrap === "never";
|
|
67
78
|
out.rule("&", {
|
|
68
79
|
...controlArrangement(spec),
|
|
80
|
+
...spec.extent === "container" && spec.layout !== "native" ? { display: "flex", "inline-size": "100%" } : {},
|
|
69
81
|
"box-sizing": "border-box",
|
|
70
82
|
...minInline !== void 0 ? { "min-inline-size": minInline } : keepsWidth ? {} : { "min-inline-size": "0" },
|
|
71
83
|
...text,
|
|
72
84
|
...controlBoxValues(box),
|
|
85
|
+
...line === void 0 ? {} : { "border-style": line },
|
|
73
86
|
gap,
|
|
74
|
-
...
|
|
87
|
+
...settled(surfaces.base.fields, blurred)
|
|
75
88
|
});
|
|
76
89
|
out.rule("&", normalizedDeclarations(spec.normalize));
|
|
90
|
+
writeStateText(out, profile, "&", text, spec.textWhen, (condition) => condition, reject);
|
|
77
91
|
for (const [condition, values] of spec.normalizeWhen)
|
|
78
92
|
out.rule(condition, normalizedDeclarations(values));
|
|
79
93
|
for (const [condition, surface] of spec.when)
|
|
80
|
-
out.rule(condition, { ...profile.of(surface, "surface") });
|
|
94
|
+
out.rule(condition, { ...settled(profile.of(surface, "surface"), blurred) });
|
|
81
95
|
const hitArea = hitAreaOf(frame);
|
|
82
96
|
writeHitArea(out, "&", hitArea);
|
|
83
97
|
const target = {
|
|
84
98
|
element: "&",
|
|
85
|
-
frame: frameTarget(frame, profile.field),
|
|
99
|
+
frame: frameTarget(frame, box, profile.field),
|
|
86
100
|
hitArea,
|
|
87
101
|
content: {
|
|
88
102
|
kind: "control",
|
|
@@ -114,7 +128,7 @@ export function lowerControl(spec, foundation, input) {
|
|
|
114
128
|
...glyph.transition.length > 0 ? {
|
|
115
129
|
"transition-property": glyph.transition.join(", "),
|
|
116
130
|
"transition-duration": at(motion, "duration", "motion"),
|
|
117
|
-
"transition-delay":
|
|
131
|
+
...motion.delay === void 0 ? {} : { "transition-delay": motion.delay },
|
|
118
132
|
"transition-timing-function": at(motion, "easing", "motion")
|
|
119
133
|
} : {}
|
|
120
134
|
} : {}
|
|
@@ -123,7 +137,10 @@ export function lowerControl(spec, foundation, input) {
|
|
|
123
137
|
for (const [condition, effects] of glyph.when) {
|
|
124
138
|
const values = {};
|
|
125
139
|
for (const effect of effects)
|
|
126
|
-
|
|
140
|
+
if (effect.effect === "translate-inline")
|
|
141
|
+
values.translate = at(motion, effect.field, "motion");
|
|
142
|
+
else
|
|
143
|
+
values.scale = scaleValue(effect.effect, at(motion, effect.field, "motion"));
|
|
127
144
|
out.rule(`${condition} > ${glyph.selector}`, values);
|
|
128
145
|
const inline = effects.find((effect) => effect.effect === "translate-inline"), reduced = ["media", "(prefers-reduced-motion: reduce)"];
|
|
129
146
|
if (inline !== void 0)
|
|
@@ -132,6 +149,8 @@ export function lowerControl(spec, foundation, input) {
|
|
|
132
149
|
if (inline !== void 0)
|
|
133
150
|
out.rule(`${condition}:dir(rtl) > ${glyph.selector}`, { translate: "0px" }, reduced);
|
|
134
151
|
}
|
|
152
|
+
const moved = [...new Set(glyph.when.flatMap(([, effects]) => effects.map((effect) => effect.effect === "translate-inline" ? "translate" : "scale")))];
|
|
153
|
+
writePlays(out, profile, foundation, glyph.name, glyph.plays, part, moved, reject);
|
|
135
154
|
}
|
|
136
155
|
return out.finish({ kind: "control", artwork: geometry === null ? null : placed(geometry), targets: { elements: [target], neighbours: [] } }, input.hidden);
|
|
137
156
|
});
|
|
@@ -181,6 +200,7 @@ export function lowerArtwork(spec, foundation, input) {
|
|
|
181
200
|
}
|
|
182
201
|
});
|
|
183
202
|
}
|
|
203
|
+
writePlays(out, profile, foundation, part.name, part.plays, `& > ${part.selector}`, part.effects.length > 0 ? ["rotate"] : [], reject);
|
|
184
204
|
return out.finish({ kind: "artwork", artwork: placed(geometry), theme: theme.name, drawnHeight: height }, input.hidden);
|
|
185
205
|
});
|
|
186
206
|
}
|
package/dist/owner-scenarios.mjs
CHANGED
|
@@ -9,10 +9,12 @@ import { PUBLIC_BARREL, ownerCompilerOptions, ownerProgramRoots, programSource }
|
|
|
9
9
|
import ts from "./analysis/syntax.mjs";
|
|
10
10
|
import { isScenarioFile, scenarioIdentity, sourceFiles } from "./config.mjs";
|
|
11
11
|
import { isDevelopmentModule } from "./development-modules.mjs";
|
|
12
|
+
import { publicProse } from "./analysis/prose-owners.mjs";
|
|
13
|
+
import { isProseTag } from "./prose-model.mjs";
|
|
12
14
|
import { findingRules } from "./finding-rules.mjs";
|
|
13
15
|
import { err, ok } from "./result.mjs";
|
|
14
16
|
import { createScenarioGroups } from "./scenario-groups.mjs";
|
|
15
|
-
const KINDS = ["components", "patterns", "mocks"], isKind = (value) => KINDS.some((kind) => kind === value), FIELDS = ["id", "title", "description", "covers", "exercises", "frame", "states", "specimens", "captureTargets"], SUBJECT_FIELDS = new Set(["states", "specimens"]), FRAMES = ["inline", "screen", "phone"], ARRANGEMENTS = ["stack", "row", "tiles"], WIDTHS = ["content", "full", "small", "medium"], MAX_STATES = 12, SPECIMEN_FIELDS = ["title", "note", "arrangement", "width", "render"], quoted = (values) => values.map((value) => `"${value}"`).join(", "), isField = (name) => FIELDS.some((field) => field === name), SAFE_ID = /^[\w-]+(?:[/.][\w-]+)*$/, FIXTURE_EXTENSIONS = [".ts", ".tsx", ".js", ".jsx", ".mts", ".cts", ".mjs", ".cjs", ".json"], ENTRY_LISTS = new Set(["covers", "exercises"]), unwrap = (input) => {
|
|
17
|
+
const KINDS = ["components", "patterns", "mocks"], isKind = (value) => KINDS.some((kind) => kind === value), FIELDS = ["id", "title", "description", "covers", "exercises", "frame", "states", "controls", "specimens", "captureTargets"], SUBJECT_FIELDS = new Set(["states", "specimens"]), FRAMES = ["inline", "screen", "phone"], ARRANGEMENTS = ["stack", "row", "tiles"], WIDTHS = ["content", "full", "small", "medium"], MAX_STATES = 12, SPECIMEN_FIELDS = ["title", "note", "arrangement", "width", "render"], quoted = (values) => values.map((value) => `"${value}"`).join(", "), isField = (name) => FIELDS.some((field) => field === name), SAFE_ID = /^[\w-]+(?:[/.][\w-]+)*$/, FIXTURE_EXTENSIONS = [".ts", ".tsx", ".js", ".jsx", ".mts", ".cts", ".mjs", ".cjs", ".json"], ENTRY_LISTS = new Set(["covers", "exercises"]), unwrap = (input) => {
|
|
16
18
|
let node = input;
|
|
17
19
|
while (ts.isAsExpression(node) || ts.isSatisfiesExpression(node) || ts.isParenthesizedExpression(node))
|
|
18
20
|
node = node.expression;
|
|
@@ -172,7 +174,7 @@ async function registrationOf(options, program, checker, file) {
|
|
|
172
174
|
for (const problem of subjects.problems)
|
|
173
175
|
report(problem.rule, problem.message, problem.node ?? record.nodes.get(problem.field) ?? metadata?.node, problem.entry);
|
|
174
176
|
if (kind !== "mocks")
|
|
175
|
-
for (const problem of markupProblems(dsRoot, source))
|
|
177
|
+
for (const problem of markupProblems(dsRoot, source, await publicProse(dsRoot)))
|
|
176
178
|
report("scenario-markup", problem.message, problem.node);
|
|
177
179
|
let valid = !entry && subjects.renders.length > 0;
|
|
178
180
|
for (const [name, node] of record.nodes)
|
|
@@ -184,6 +186,8 @@ async function registrationOf(options, program, checker, file) {
|
|
|
184
186
|
const declaredDescription = record.values.get("description");
|
|
185
187
|
if (record.nodes.has("description") && (typeof declaredDescription !== "string" || declaredDescription.trim() === ""))
|
|
186
188
|
report("scenario-field", "`description` is a nonempty static string: one sentence under the page's title.", record.nodes.get("description"), "description");
|
|
189
|
+
if (record.nodes.has("controls") && typeof record.values.get("controls") !== "boolean")
|
|
190
|
+
report("scenario-field", "`controls` is `true` or `false`: with `true` ADS draws a control for each closed prop of the first owner in `covers`, and every specimen receives the chosen values as props.", record.nodes.get("controls"), "controls");
|
|
187
191
|
const declaredFrame = record.values.get("frame");
|
|
188
192
|
if (record.nodes.has("frame") && !FRAMES.some((frame) => frame === declaredFrame))
|
|
189
193
|
report("scenario-field", `\`frame\` is one of ${quoted(FRAMES)}: a page of boxed specimens (the default), or one specimen as a whole screen.`, record.nodes.get("frame"), "frame");
|
|
@@ -590,7 +594,7 @@ const specimenRenders = (checker, source) => memoProgram(source, "owner-scenario
|
|
|
590
594
|
const { metadata } = scenarioExports(source), record = metadata?.initializer === void 0 ? void 0 : await recordOf(checker, metadata.initializer, new Set, SUBJECT_FIELDS);
|
|
591
595
|
return record === void 0 ? [] : (await specimensOf(checker, record)).renders;
|
|
592
596
|
});
|
|
593
|
-
function markupProblems(dsRoot, source) {
|
|
597
|
+
function markupProblems(dsRoot, source, prose) {
|
|
594
598
|
const problems = [], development = new Map;
|
|
595
599
|
for (const statement of source.statements) {
|
|
596
600
|
if (!ts.isImportDeclaration(statement) || !ts.isStringLiteral(statement.moduleSpecifier) || !statement.moduleSpecifier.text.startsWith("."))
|
|
@@ -619,6 +623,12 @@ function markupProblems(dsRoot, source) {
|
|
|
619
623
|
problems.push({ node: attribute, message: "A scenario does not style what it shows: remove `style`. A size or a position the subject needs comes from the scenario kit's Container, or from the owner's own props." });
|
|
620
624
|
const tag = node.tagName, name = tag.getText();
|
|
621
625
|
if (ts.isIdentifier(tag) && /^[a-z]/.test(name)) {
|
|
626
|
+
const owner = isProseTag(name) ? proseOwnerOf(node, prose) : void 0;
|
|
627
|
+
if (owner !== void 0) {
|
|
628
|
+
if (!owner.tags.has(name))
|
|
629
|
+
problems.push({ node: tag, message: `<${name}> is content of ${owner.name}, whose prose recipe declares no such element: it would be drawn without a design. Declare the element in the recipe's \`elements\`, or write the content with the elements it declares.` });
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
622
632
|
problems.push({ node: tag, message: `A scenario renders public owners and the scenario kit, not <${name}>. ADS draws the page: put text in \`title\`, \`description\` and each specimen's \`title\` and \`note\`, choose its \`arrangement\` and \`width\`, and use the kit (Container, Placeholder, Anchor, EventLog) around a subject that needs one.` });
|
|
623
633
|
return;
|
|
624
634
|
}
|
|
@@ -631,6 +641,18 @@ function markupProblems(dsRoot, source) {
|
|
|
631
641
|
});
|
|
632
642
|
return problems;
|
|
633
643
|
}
|
|
644
|
+
function proseOwnerOf(node, prose) {
|
|
645
|
+
for (let current = node.parent;current !== void 0; current = current.parent) {
|
|
646
|
+
if (!ts.isJsxElement(current) || current.openingElement === node)
|
|
647
|
+
continue;
|
|
648
|
+
const tag = current.openingElement.tagName;
|
|
649
|
+
if (ts.isIdentifier(tag) && isProseTag(tag.text))
|
|
650
|
+
continue;
|
|
651
|
+
const tags = ts.isIdentifier(tag) ? prose.get(tag.text) : void 0;
|
|
652
|
+
return tags === void 0 ? void 0 : { name: tag.getText(), tags };
|
|
653
|
+
}
|
|
654
|
+
return;
|
|
655
|
+
}
|
|
634
656
|
const defaultExportNode = (source) => source.statements.find((statement) => ts.isExportAssignment(statement) || ts.isFunctionDeclaration(statement) && hasModifier(statement, ts.SyntaxKind.DefaultKeyword));
|
|
635
657
|
async function renderedNames(checker, dsRoot, entries, exported) {
|
|
636
658
|
const rendered = new Set, visited = new Set, pending = [...entries];
|
package/dist/ownership-model.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { fail, rejecting } from "./design-rejection.mjs";
|
|
2
|
-
import { CURSORS, ELEMENT_NAMES, FRAME_SIDES, OVERFLOW_VALUES, PAINT_CHANNELS, SNAP_ALIGNS, SNAP_TYPES, TEXT_ALIGNS, TEXT_WRAPS, TOUCH_ACTIONS, USER_SELECTS } from "./construction-spec.mjs";
|
|
3
|
-
const identifier = /^[a-z][\w-]*$/, profile = /^[a-z][\w-]*(?:\([a-z][\w-]*:\s*[a-z][\w-]*(?:,\s*[a-z][\w-]*:\s*[a-z][\w-]*)*\))?$/, binding = (value) => profile.test(value) || /^profile\([\w-]+-profile\)$/.test(value), wordList = (value) => value.split(/\s+/).every((word) => identifier.test(word)), positive = (value) => /^[1-9]\d*$/.test(value) && Number(value) <= 64, oneOf = (...values) => (value) => values.includes(value), metric = (slot, fields) => (value) => fields.some((field) => value === `profile(${slot}-profile.${field})`), spacing = metric("spacing", ["content-gap", "label-gap", "details-gap", "meta-gap"]), placement = {
|
|
2
|
+
import { CURSORS, ELEMENT_NAMES, FRAME_CORNERS, FRAME_SIDES, OVERFLOW_VALUES, PAINT_CHANNELS, RESIZES, SNAP_ALIGNS, SNAP_TYPES, TEXT_ALIGNS, TEXT_WRAPS, TOUCH_ACTIONS, USER_SELECTS } from "./construction-spec.mjs";
|
|
3
|
+
const identifier = /^[a-z][\w-]*$/, profile = /^[a-z][\w-]*(?:\([a-z][\w-]*:\s*[a-z][\w-]*(?:,\s*[a-z][\w-]*:\s*[a-z][\w-]*)*\))?$/, binding = (value) => profile.test(value) || /^profile\([\w-]+-profile\)$/.test(value), wordList = (value) => value.split(/\s+/).every((word) => identifier.test(word)), positive = (value) => /^[1-9]\d*$/.test(value) && Number(value) <= 64, oneOf = (...values) => (value) => values.includes(value), metric = (slot, fields) => (value) => fields.some((field) => value === `profile(${slot}-profile.${field})`), spacing = metric("spacing", ["content-gap", "label-gap", "details-gap", "meta-gap", "section-gap", "indent"]), placement = {
|
|
4
4
|
start: (value) => value === "auto" || positive(value),
|
|
5
5
|
end: positive,
|
|
6
6
|
span: (value) => value === "full" || positive(value),
|
|
7
7
|
row: positive,
|
|
8
8
|
"row-span": positive,
|
|
9
9
|
overlay: oneOf("none", "start", "end"),
|
|
10
|
-
visible: oneOf("true", "false")
|
|
10
|
+
visible: oneOf("true", "false"),
|
|
11
|
+
visual: binding
|
|
11
12
|
}, TEXT_ALIGN = oneOf(...TEXT_ALIGNS), OVERFLOW = oneOf(...OVERFLOW_VALUES), ELEMENT = oneOf(...ELEMENT_NAMES), FIELDS = {
|
|
12
13
|
"ads-recipe": {
|
|
13
14
|
profile: (value) => profile.test(value),
|
|
@@ -19,7 +20,9 @@ const identifier = /^[a-z][\w-]*$/, profile = /^[a-z][\w-]*(?:\([a-z][\w-]*:\s*[
|
|
|
19
20
|
extent: oneOf("content", "container"),
|
|
20
21
|
gap: spacing,
|
|
21
22
|
"row-gap": spacing,
|
|
23
|
+
rhythm: spacing,
|
|
22
24
|
columns: positive,
|
|
25
|
+
weights: (value) => value.split(/\s+/).length <= 64 && value.split(/\s+/).every((weight) => /^\d+(\.\d+)?$/.test(weight) && Number(weight) > 0),
|
|
23
26
|
rows: (value) => value.split(/\s+/).length <= 12 && value.split(/\s+/).every((row) => ["auto", "fill"].includes(row)),
|
|
24
27
|
gutter: (value) => identifier.test(value),
|
|
25
28
|
margin: oneOf("none"),
|
|
@@ -34,6 +37,7 @@ const identifier = /^[a-z][\w-]*$/, profile = /^[a-z][\w-]*(?:\([a-z][\w-]*:\s*[
|
|
|
34
37
|
},
|
|
35
38
|
"ads-part": {
|
|
36
39
|
kind: oneOf("text", "visual", "vector"),
|
|
40
|
+
scheme: oneOf("light", "dark"),
|
|
37
41
|
selector: (value) => /^\.[a-z][\w-]*$/.test(value),
|
|
38
42
|
required: oneOf("true", "false"),
|
|
39
43
|
wrap: oneOf("true", "false", ...TEXT_WRAPS),
|
|
@@ -58,11 +62,16 @@ const identifier = /^[a-z][\w-]*$/, profile = /^[a-z][\w-]*(?:\([a-z][\w-]*:\s*[
|
|
|
58
62
|
transition: (value) => value.trim() === "" || value.trim().split(/\s+/).every((channel) => ["translate", "scale", "rotate"].includes(channel))
|
|
59
63
|
},
|
|
60
64
|
"ads-frame": {
|
|
65
|
+
profile: binding,
|
|
61
66
|
container: oneOf("region"),
|
|
62
67
|
ratio: (value) => /^[1-9]\d*\s*\/\s*[1-9]\d*$/.test(value),
|
|
63
68
|
rules: (value) => {
|
|
64
69
|
const sides = value.split(/\s+/);
|
|
65
70
|
return new Set(sides).size === sides.length && sides.every((side) => FRAME_SIDES.includes(side));
|
|
71
|
+
},
|
|
72
|
+
corners: (value) => {
|
|
73
|
+
const corners = value.split(/\s+/).filter((corner) => corner !== "");
|
|
74
|
+
return new Set(corners).size === corners.length && corners.every((corner) => FRAME_CORNERS.includes(corner));
|
|
66
75
|
}
|
|
67
76
|
},
|
|
68
77
|
"ads-paint-transition": {
|
|
@@ -72,8 +81,13 @@ const identifier = /^[a-z][\w-]*$/, profile = /^[a-z][\w-]*(?:\([a-z][\w-]*:\s*[
|
|
|
72
81
|
},
|
|
73
82
|
motion: binding
|
|
74
83
|
},
|
|
84
|
+
"ads-enter": { surface: binding, motion: binding, translate: metric("motion", ["distance"]), scale: metric("motion", ["scale"]), rotate: metric("motion", ["angle"]) },
|
|
75
85
|
"ads-pseudo": { surface: binding },
|
|
76
86
|
"ads-accessibility": { boundary: () => !0, reason: () => !0 },
|
|
87
|
+
"ads-element": { text: binding, surface: binding, frame: binding, marker: binding, "space-before": spacing, indent: spacing },
|
|
88
|
+
"ads-play": { sequence: binding, order: (value) => /^(?:[0-9]|[12][0-9]|3[0-2])$/.test(value) },
|
|
89
|
+
"ads-outset": { block: spacing, inline: spacing },
|
|
90
|
+
"ads-sticky": { edge: oneOf("block-start", "block-end"), clear: oneOf("none", "block-start") },
|
|
77
91
|
"ads-snap": { type: oneOf(...SNAP_TYPES), align: oneOf(...SNAP_ALIGNS) },
|
|
78
92
|
"ads-layer": {
|
|
79
93
|
element: oneOf("dialog", "popover"),
|
|
@@ -93,9 +107,13 @@ const identifier = /^[a-z][\w-]*$/, profile = /^[a-z][\w-]*(?:\([a-z][\w-]*:\s*[
|
|
|
93
107
|
"ads-align": { rows: wordList },
|
|
94
108
|
"ads-when": {
|
|
95
109
|
surface: binding,
|
|
110
|
+
text: binding,
|
|
96
111
|
repeat: oneOf("continuous"),
|
|
97
112
|
"translate-inline": metric("motion", ["distance"]),
|
|
113
|
+
"translate-block": metric("motion", ["distance"]),
|
|
98
114
|
scale: metric("motion", ["scale"]),
|
|
115
|
+
"scale-inline": metric("motion", ["scale"]),
|
|
116
|
+
"scale-block": metric("motion", ["scale"]),
|
|
99
117
|
rotate: metric("motion", ["angle"])
|
|
100
118
|
}
|
|
101
119
|
}, NATIVE = {
|
|
@@ -105,7 +123,8 @@ const identifier = /^[a-z][\w-]*$/, profile = /^[a-z][\w-]*(?:\([a-z][\w-]*:\s*[
|
|
|
105
123
|
"text-decoration": oneOf("none"),
|
|
106
124
|
"pointer-events": oneOf("none"),
|
|
107
125
|
"touch-action": oneOf(...TOUCH_ACTIONS),
|
|
108
|
-
"user-select": oneOf(...USER_SELECTS)
|
|
126
|
+
"user-select": oneOf(...USER_SELECTS),
|
|
127
|
+
resize: oneOf(...RESIZES)
|
|
109
128
|
};
|
|
110
129
|
export const checkOwnerStyle = (ast, file) => rejecting(() => {
|
|
111
130
|
const deny = (detail) => fail(`${file}: ${detail}`, "profile-value-required");
|
package/dist/paint-contrast.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import valueParser from "postcss-value-parser";
|
|
2
2
|
import { canonicalCss, parseCssColor, srgb8 } from "./color-values.mjs";
|
|
3
3
|
import { readQuantity } from "./css-quantity.mjs";
|
|
4
|
+
import { conditionsExclusive } from "./state-conditions.mjs";
|
|
4
5
|
import { resolveTokenValue } from "./token-resolution.mjs";
|
|
5
6
|
export const TEXT_MINIMUM = 4.5, NON_TEXT_MINIMUM = 3, LARGE_TEXT_MINIMUM = 3, LARGE_TEXT_PX = 24, LARGE_BOLD_TEXT_PX = 18.66, BOLD_WEIGHT = 700;
|
|
6
7
|
function required(condition) {
|
|
@@ -97,6 +98,8 @@ export function paintContrast(context, paints, minimum) {
|
|
|
97
98
|
const back = readColor(paints.background, context);
|
|
98
99
|
if (back.kind === "unresolved")
|
|
99
100
|
return unresolved({ kind: "paint-unresolved", paint: "background", value: back.value, reason: back.reason });
|
|
101
|
+
if (back.rgba[3] === 0)
|
|
102
|
+
return unresolved({ kind: "background-transparent", value: paints.background });
|
|
100
103
|
if (back.rgba[3] < 1)
|
|
101
104
|
return unresolved({ kind: "background-translucent", value: paints.background });
|
|
102
105
|
if (paints.opacity !== void 0 && paints.opacity !== null && !opaque(paints.opacity, context))
|
|
@@ -130,6 +133,8 @@ export function reachablePairs(foreground, background) {
|
|
|
130
133
|
return [];
|
|
131
134
|
if (back.condition === null && fore.condition !== null && setsBackground.has(fore.condition))
|
|
132
135
|
return [];
|
|
136
|
+
if (fore.condition !== null && back.condition !== null && conditionsExclusive(fore.condition, back.condition))
|
|
137
|
+
return [];
|
|
133
138
|
return [{ foreground: fore, background: back }];
|
|
134
139
|
}));
|
|
135
140
|
}
|
|
@@ -9,6 +9,7 @@ function placeholderReason(unresolved) {
|
|
|
9
9
|
case "paint-unresolved":
|
|
10
10
|
return `${unresolved.value}: ${unresolved.reason}`;
|
|
11
11
|
case "background-translucent":
|
|
12
|
+
case "background-transparent":
|
|
12
13
|
return `background ${unresolved.value} is translucent; what shows through is unknown`;
|
|
13
14
|
case "opacity":
|
|
14
15
|
return `opacity ${unresolved.value} lets what is behind the part show through`;
|
|
@@ -11,10 +11,17 @@ const LOGICAL_PROPERTIES = [
|
|
|
11
11
|
"max-block-size",
|
|
12
12
|
"inset",
|
|
13
13
|
...["margin", "padding", "inset"].flatMap((family) => [`${family}-block`, `${family}-inline`, ...["block-start", "block-end", "inline-start", "inline-end"].map((side) => `${family}-${side}`)]),
|
|
14
|
-
...["width", "color", "style"].flatMap((member) => ["block-start", "block-end", "inline-start", "inline-end"].map((side) => `border-${side}-${member}`))
|
|
14
|
+
...["width", "color", "style"].flatMap((member) => ["block-start", "block-end", "inline-start", "inline-end"].map((side) => `border-${side}-${member}`)),
|
|
15
|
+
...["start-start", "start-end", "end-start", "end-end"].map((corner) => `border-${corner}-radius`)
|
|
15
16
|
];
|
|
16
17
|
export const PLATFORM_FEATURES = [
|
|
17
18
|
{ id: "aspect-ratio", css: ["aspect-ratio"], degrades: "Boxes take their content's height instead of the declared ratio." },
|
|
19
|
+
{
|
|
20
|
+
id: "backdrop-filter",
|
|
21
|
+
css: ["backdrop-filter"],
|
|
22
|
+
prefixed: ["-webkit-backdrop-filter"],
|
|
23
|
+
degrades: "A surface's backdrop blur and saturation do not apply: a translucent surface shows what is behind it sharp, so its background must stay readable without them. The prefixed form covers engines that implement only it."
|
|
24
|
+
},
|
|
18
25
|
{ id: "color-mix", css: ["color-mix()"], degrades: "Colours mixed with color-mix() are dropped; the property falls back to its inherited or initial value." },
|
|
19
26
|
{ id: "color-scheme", css: ["color-scheme"], degrades: "Native controls and scrollbars keep the browser's default scheme under a dark theme." },
|
|
20
27
|
{ id: "container-queries", css: ["@container", "container-name", "container-type"], degrades: "Container-dependent rules do not apply: a region keeps its base arrangement at every container size." },
|
|
@@ -26,8 +33,9 @@ export const PLATFORM_FEATURES = [
|
|
|
26
33
|
degrades: "None expected: the standard list-style-type: none hides a summary's marker; the prefixed pseudo-element hides it where the engine draws it as a separate box."
|
|
27
34
|
},
|
|
28
35
|
{ id: "dir-pseudo-class", css: [":dir()"], degrades: "Right-to-left overrides do not apply: mirrored offsets and motion keep their left-to-right direction." },
|
|
36
|
+
{ id: "filter-effects", css: ["filter", "blur()", "drop-shadow()", "saturate()"], degrades: "A surface's blur and its shape or group shadow do not apply: the element is drawn sharp and without that shadow." },
|
|
29
37
|
{ id: "focus-visible", css: [":focus-visible"], degrades: "Required for focus indicators: rules selecting :focus-visible are dropped, so keyboard focus is not drawn." },
|
|
30
|
-
{ id: "has-pseudo-class", css: [":has()"], degrades: "Rules that select by a descendant are dropped: the page keeps scrolling behind an open modal dialog." },
|
|
38
|
+
{ id: "has-pseudo-class", css: [":has()"], degrades: "Rules that select by a descendant are dropped: the page keeps scrolling behind an open modal dialog, and a part does not show its native part's state (a checkbox's drawn box stays unchecked)." },
|
|
31
39
|
{ id: "individual-transforms", css: ["translate", "rotate", "scale"], degrades: "Press scale, glyph offsets and their transitions and keyframes do not apply; elements stay at rest." },
|
|
32
40
|
{ id: "light-dark", css: ["light-dark()"], degrades: "Colours chosen with light-dark() are dropped; the property falls back to its inherited or initial value." },
|
|
33
41
|
{
|
|
@@ -38,6 +46,12 @@ export const PLATFORM_FEATURES = [
|
|
|
38
46
|
},
|
|
39
47
|
{ id: "logical-properties", css: LOGICAL_PROPERTIES, degrades: "Required: sizes, spacing, insets and borders are written as logical properties; without them boxes lose those declarations." },
|
|
40
48
|
{ id: "lh-unit", css: ["lh", "rlh"], degrades: "Declarations measured in lines are dropped: control boxes sized by 1lh fall back to their content height, and reserved text lines take no extra height." },
|
|
49
|
+
{
|
|
50
|
+
id: "mask-image",
|
|
51
|
+
css: ["mask-image"],
|
|
52
|
+
prefixed: ["-webkit-mask-image"],
|
|
53
|
+
degrades: "A surface's mask does not apply: the drawing, or the border of a scrolling element, is shown without its fade. The prefixed form covers engines that implement only it."
|
|
54
|
+
},
|
|
41
55
|
{ id: "media-range-syntax", css: ["@media range syntax"], degrades: "Media queries written as ranges (width < 40rem) are ignored: responsive layouts keep their base arrangement." },
|
|
42
56
|
{ id: "modal-dialog", css: [":modal", "::backdrop"], degrades: "Required by modal sheets: without modal dialogs the sheet neither blocks the page behind it nor paints its backdrop." },
|
|
43
57
|
{ id: "modern-color-spaces", css: ["oklch()", "oklab()", "lab()", "lch()", "hwb()", "color()"], degrades: "Colours in these spaces are dropped; the property falls back to its inherited or initial value." },
|
|
@@ -59,6 +73,7 @@ export const PLATFORM_FEATURES = [
|
|
|
59
73
|
{ id: "subgrid", css: ["grid-template-columns: subgrid", "grid-template-rows: subgrid"], degrades: "A subgrid cell lays out its items on its own tracks: parts no longer align across siblings." },
|
|
60
74
|
{ id: "starting-style", css: ["@starting-style"], degrades: "Entry animations are skipped: the element appears in its open state at once." },
|
|
61
75
|
{ id: "text-box-trim", css: ["text-box-trim", "text-box-edge"], degrades: "Text keeps its half-leading: the space around trimmed labels is slightly larger." },
|
|
76
|
+
{ id: "resize", css: ["resize"], degrades: "The multi-line field keeps the engine's own resize behaviour: no handle where the engine draws none (touch devices), a handle on both axes otherwise." },
|
|
62
77
|
{ id: "text-wrap-balance", css: ["text-wrap: balance"], degrades: "Normal wrapping: line lengths are not balanced." },
|
|
63
78
|
{ id: "text-wrap-pretty", css: ["text-wrap: pretty"], degrades: "Normal wrapping: a paragraph may end in a single short word." },
|
|
64
79
|
{ id: "touch-action", css: ["touch-action"], degrades: "The browser's default touch gestures (panning, zooming) apply to the element." },
|
|
@@ -130,6 +145,15 @@ export const PLATFORM_FEATURES = [
|
|
|
130
145
|
"position",
|
|
131
146
|
"text-align",
|
|
132
147
|
"text-decoration-line",
|
|
148
|
+
"font-stretch",
|
|
149
|
+
"letter-spacing",
|
|
150
|
+
"word-spacing",
|
|
151
|
+
"font-feature-settings",
|
|
152
|
+
"font-variation-settings",
|
|
153
|
+
"text-decoration-color",
|
|
154
|
+
"text-decoration-thickness",
|
|
155
|
+
"text-underline-offset",
|
|
156
|
+
"text-transform",
|
|
133
157
|
"text-overflow",
|
|
134
158
|
"transform",
|
|
135
159
|
"transition-delay",
|