@reqvire-org/ads 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -6
- package/dist/ads-errors.mjs +382 -34
- package/dist/ads-views.mjs +4 -4
- package/dist/analysis/composition-axes.mjs +48 -0
- package/dist/analysis/construction-memo.mjs +38 -0
- package/dist/analysis/context.mjs +19 -0
- package/dist/analysis/design-reads.mjs +177 -0
- package/dist/analysis/design-usage.mjs +20 -4
- package/dist/analysis/factored-classes.mjs +90 -0
- package/dist/analysis/helpers.mjs +5 -7
- package/dist/analysis/mock-check.mjs +5 -4
- package/dist/analysis/native-project.mjs +12 -0
- package/dist/analysis/owner-analysis-cache.mjs +86 -23
- package/dist/analysis/owner-analysis-key.mjs +42 -10
- package/dist/analysis/owner-choices.mjs +195 -43
- package/dist/analysis/owner-composition.mjs +152 -43
- package/dist/analysis/owner-controls.mjs +27 -0
- package/dist/analysis/owner-reuse.mjs +8 -6
- package/dist/analysis/owner-source.mjs +309 -83
- package/dist/analysis/prose-owners.mjs +57 -0
- package/dist/analysis/scenario-keys.mjs +10 -7
- package/dist/analysis/service.mjs +50 -3
- package/dist/analysis/standalone.mjs +7 -4
- package/dist/analysis/styling-ownership.mjs +22 -0
- package/dist/analysis/syntax.mjs +59 -1
- package/dist/analysis/worker-protocol.mjs +14 -2
- package/dist/analysis/worker.mjs +32 -10
- package/dist/architecture-report.mjs +26 -0
- package/dist/asset-view-facts.mjs +16 -2
- package/dist/boundaries.mjs +26 -10
- package/dist/bun-compiler.mjs +2 -2
- package/dist/check-service.mjs +29 -17
- package/dist/check.mjs +20 -7
- package/dist/cli-arguments.mjs +2 -2
- package/dist/cli.mjs +4 -4
- package/dist/composed-contrast.mjs +28 -8
- package/dist/composed-keyline.mjs +107 -0
- package/dist/config.mjs +2 -1
- package/dist/construction-output.mjs +149 -20
- package/dist/construction-spec.d.mts +320 -12
- package/dist/construction-spec.mjs +452 -69
- package/dist/corner-overpaint.mjs +65 -0
- package/dist/derived-states.mjs +182 -0
- package/dist/design-foundation.mjs +6 -1
- package/dist/design-inputs.mjs +18 -3
- package/dist/design-system-closure.mjs +12 -7
- package/dist/design-usage.mjs +8 -2
- package/dist/emit/contract.mjs +24 -5
- package/dist/emit/emission.mjs +14 -5
- package/dist/emit/font-emission.mjs +21 -1
- package/dist/emit/foundation-sheet.mjs +6 -5
- package/dist/emit/integrity.mjs +8 -2
- package/dist/emit/output-watch.mjs +120 -0
- package/dist/emit/owner-emission-cache.mjs +4 -4
- package/dist/emit/preview-emitter.mjs +4 -2
- package/dist/emit/preview-tree.mjs +1 -1
- package/dist/emit/service.mjs +8 -2
- package/dist/finding-rules.mjs +10 -0
- package/dist/font-checks.mjs +42 -0
- package/dist/font-declaration.d.mts +10 -0
- package/dist/font-declaration.mjs +25 -3
- package/dist/font-fallback.d.mts +37 -0
- package/dist/font-fallback.mjs +25 -0
- package/dist/font-macro.d.mts +10 -0
- package/dist/font-metrics.d.mts +34 -0
- package/dist/font-metrics.mjs +314 -0
- package/dist/font-model.mjs +28 -2
- package/dist/form-states.mjs +8 -0
- package/dist/foundation-macro.d.mts +1 -1
- package/dist/frame-regions.mjs +92 -9
- package/dist/grid-facts.mjs +72 -16
- package/dist/grid-lowering.mjs +11 -5
- package/dist/hover-geometry.mjs +15 -0
- package/dist/init.mjs +14 -23
- package/dist/input-digests.mjs +17 -10
- package/dist/linaria/delivery.mjs +2 -0
- package/dist/lowering-enter.mjs +31 -0
- package/dist/lowering-properties.mjs +27 -1
- package/dist/lowering-region-layout.mjs +49 -10
- package/dist/lowering-sequence.mjs +89 -0
- package/dist/lowering-session.mjs +7 -0
- package/dist/lowering-transitions.mjs +22 -8
- package/dist/mcp/build-status.mjs +9 -1
- package/dist/mcp/compiler-channel.mjs +11 -4
- package/dist/mcp/mutations.mjs +1 -0
- package/dist/mcp/preview-http.bundle.js +2 -2
- package/dist/mcp/preview-watch.mjs +2 -1
- package/dist/mcp/preview-widget.bundle.js +5 -5
- package/dist/motion-model.mjs +3 -1
- package/dist/owner-analysis-check.mjs +86 -12
- package/dist/owner-errors.mjs +20 -2
- package/dist/owner-lowering.mjs +104 -25
- package/dist/owner-scenarios.mjs +29 -4
- package/dist/ownership-model.mjs +37 -4
- package/dist/paint-contrast.mjs +5 -0
- package/dist/placeholder-contrast.mjs +18 -1
- package/dist/platform-features.mjs +35 -2
- package/dist/preview-bun.mjs +17 -16
- package/dist/preview-controls.mjs +35 -0
- package/dist/preview-incremental.mjs +1 -1
- package/dist/preview-source.mjs +2 -2
- package/dist/profile-macro.d.mts +15 -0
- package/dist/profile-model.mjs +3 -3
- package/dist/profile-view-facts.mjs +55 -4
- package/dist/prose-model.d.mts +81 -0
- package/dist/prose-model.mjs +101 -0
- package/dist/recipe-macro.d.mts +176 -15
- package/dist/recipe-model.mjs +35 -7
- package/dist/region-lowering.mjs +463 -65
- package/dist/render-audit/corner-overpaint.page.mjs +54 -0
- package/dist/render-audit/layout-shift.page.mjs +24 -0
- package/dist/render-audit/render-states.mjs +122 -1
- package/dist/render-audit/render-states.page.mjs +140 -0
- package/dist/render-audit/worker.mjs +23 -3
- package/dist/render-audit.mjs +139 -1
- package/dist/role-vocabulary.d.mts +43 -2
- package/dist/role-vocabulary.mjs +50 -4
- package/dist/scenario-kit.d.mts +6 -0
- package/dist/scenario-registry.mjs +1 -1
- package/dist/scenarios-compiler.mjs +20 -6
- package/dist/scheme-switch.d.mts +8 -0
- package/dist/scheme-switch.mjs +1 -0
- package/dist/showcase/ads-views.mjs +116 -53
- package/dist/showcase/assets-view.mjs +136 -89
- package/dist/showcase/client.bundle.js +65 -65
- package/dist/showcase/http-client.bundle.js +17 -17
- package/dist/showcase/preview-frame.css +2 -0
- package/dist/showcase/profiles-view.mjs +163 -122
- package/dist/showcase/scenario-page.d.mts +11 -1
- package/dist/showcase/scenario-page.mjs +18 -3
- package/dist/showcase/token-sample.mjs +47 -4
- package/dist/showcase/tokens-view.mjs +82 -34
- package/dist/showcase/ui/ui.css +1 -1
- package/dist/showcase/ui/ui.js +5 -5
- package/dist/skills/README.md +5 -5
- package/dist/skills/ads-designer/README.md +1 -1
- package/dist/skills/ads-designer/SKILL.md +13 -12
- package/dist/skills/ads-designer/references/accessibility.md +9 -2
- package/dist/skills/ads-designer/references/atomic-styles.md +8 -1
- package/dist/skills/ads-designer/references/branding.md +20 -5
- package/dist/skills/ads-designer/references/cli.md +4 -4
- package/dist/skills/ads-designer/references/contracts.md +14 -4
- package/dist/skills/ads-designer/references/design-craft.md +1 -1
- package/dist/skills/ads-designer/references/design-data.md +3 -3
- package/dist/skills/ads-designer/references/forms.md +6 -6
- package/dist/skills/ads-designer/references/layout.md +46 -3
- package/dist/skills/ads-designer/references/motion.md +45 -1
- package/dist/skills/ads-designer/references/performance.md +7 -1
- package/dist/skills/ads-designer/references/recipes.md +92 -7
- package/dist/skills/ads-designer/references/runtimes.md +1 -1
- package/dist/skills/ads-designer/references/scenarios.md +1 -0
- package/dist/skills/ads-import/references/atomic-styles.md +8 -1
- package/dist/skills/ads-import/references/cli.md +4 -4
- package/dist/skills/ads-import/references/contracts.md +14 -4
- package/dist/skills/ads-import/references/design-data.md +3 -3
- package/dist/skills/ads-import/references/forms.md +6 -6
- package/dist/skills/ads-import/references/layout.md +46 -3
- package/dist/skills/ads-import/references/recipes.md +92 -7
- package/dist/skills/ads-import/references/runtimes.md +1 -1
- package/dist/skills/ads-import/references/scenarios.md +1 -0
- package/dist/skills/ads-migrate/SKILL.md +3 -1
- package/dist/skills/ads-migrate/references/0.5.0-to-0.5.1.md +239 -0
- package/dist/skills/ads-migrate/references/0.5.1-to-0.5.2.md +185 -0
- package/dist/skills/ads-port/references/atomic-styles.md +8 -1
- package/dist/skills/ads-port/references/cli.md +4 -4
- package/dist/skills/ads-port/references/contracts.md +14 -4
- package/dist/skills/ads-port/references/design-data.md +3 -3
- package/dist/skills/ads-port/references/forms.md +6 -6
- package/dist/skills/ads-port/references/layout.md +46 -3
- package/dist/skills/ads-port/references/recipes.md +92 -7
- package/dist/skills/ads-port/references/runtimes.md +1 -1
- package/dist/skills/ads-port/references/scenarios.md +1 -0
- package/dist/spatial-model.mjs +20 -4
- package/dist/state-conditions.d.mts +29 -0
- package/dist/state-conditions.mjs +42 -2
- package/dist/surface-contrast.mjs +69 -10
- package/dist/surface-effects.mjs +100 -0
- package/dist/target-size.mjs +1 -1
- package/dist/task-cache.mjs +9 -19
- package/dist/token-dtcg.mjs +1 -0
- package/dist/token-view-facts.mjs +54 -5
- package/dist/unreached-sources.mjs +5 -0
- package/dist/validation-checks.mjs +1 -1
- package/dist/validation.mjs +1 -1
- package/docs/ADS.md +36 -13
- package/docs/ARCHITECTURE.md +223 -23
- package/docs/ASSETS.md +81 -10
- package/docs/CACHING.md +152 -24
- package/docs/CHANGELOG.md +525 -23
- package/docs/DESIGN-REFERENCES.md +5 -5
- package/docs/GUIDE.md +286 -73
- package/docs/LANGUAGE.md +428 -24
- package/docs/LOWERING.md +13 -1
- package/docs/MOTION.md +241 -7
- package/docs/PROFILE-KINDS.md +176 -14
- package/docs/PROFILES.md +2 -2
- package/docs/RULES.md +63 -24
- package/docs/TOKEN-ROLES.md +15 -7
- package/package.json +1 -1
- package/dist/starter-files.mjs +0 -155
- package/dist/starter-overlay.mjs +0 -189
- package/dist/starters/preact/design-system/assets/avatars/avatar.ads.ts +0 -10
- package/dist/starters/preact/design-system/assets/avatars/member.svg +0 -1
- package/dist/starters/preact/design-system/assets/brand/emblem.ads.ts +0 -18
- package/dist/starters/preact/design-system/assets/brand/emblem.svg +0 -4
- package/dist/starters/preact/design-system/assets/brand/iris-emblem.ads.ts +0 -14
- package/dist/starters/preact/design-system/assets/brand/iris-emblem.svg +0 -4
- package/dist/starters/preact/design-system/assets/brand/mark.ads.ts +0 -14
- package/dist/starters/preact/design-system/assets/brand/mark.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/arrow.ads.ts +0 -14
- package/dist/starters/preact/design-system/assets/glyphs/arrow.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/chevron-20.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/chevron-24.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/chevron.ads.ts +0 -20
- package/dist/starters/preact/design-system/assets/glyphs/close.ads.ts +0 -13
- package/dist/starters/preact/design-system/assets/glyphs/close.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/favorite.ads.ts +0 -23
- package/dist/starters/preact/design-system/assets/glyphs/favorite.normal.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/favorite.selected.svg +0 -1
- package/dist/starters/preact/design-system/assets/glyphs/search.ads.ts +0 -10
- package/dist/starters/preact/design-system/assets/glyphs/search.svg +0 -1
- package/dist/starters/preact/design-system/assets/illustrations/journey.ads.ts +0 -32
- package/dist/starters/preact/design-system/assets/illustrations/journey.contrast.svg +0 -6
- package/dist/starters/preact/design-system/assets/illustrations/journey.dark.svg +0 -13
- package/dist/starters/preact/design-system/assets/illustrations/journey.light.svg +0 -13
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.ads.ts +0 -17
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.dark.svg +0 -10
- package/dist/starters/preact/design-system/assets/logos/harbor-pay.light.svg +0 -10
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.ads.ts +0 -15
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.dark.svg +0 -9
- package/dist/starters/preact/design-system/assets/logos/lumen-cloud.light.svg +0 -9
- package/dist/starters/preact/design-system/assets/status/error.svg +0 -1
- package/dist/starters/preact/design-system/assets/status/outcomes.ads.ts +0 -31
- package/dist/starters/preact/design-system/assets/status/status.ads.ts +0 -16
- package/dist/starters/preact/design-system/assets/status/success.svg +0 -1
- package/dist/starters/preact/design-system/assets/status/sync-status.ads.ts +0 -14
- package/dist/starters/preact/design-system/assets/status/sync-status.svg +0 -7
- package/dist/starters/preact/design-system/assets/status/warning.svg +0 -1
- package/dist/starters/preact/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -12
- package/dist/starters/preact/design-system/components/Actions/Button/Button.tsx +0 -198
- package/dist/starters/preact/design-system/components/Actions/IconButton/IconButton.tsx +0 -95
- package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +0 -22
- package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.tsx +0 -60
- package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +0 -24
- package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.tsx +0 -50
- package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +0 -8
- package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.tsx +0 -110
- package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +0 -25
- package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.tsx +0 -72
- package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +0 -8
- package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.tsx +0 -43
- package/dist/starters/preact/design-system/components/Content/Icon/Icon.ads.scenario.tsx +0 -21
- package/dist/starters/preact/design-system/components/Content/Icon/Icon.tsx +0 -41
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/arrow.tsx +0 -10
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/close.tsx +0 -10
- package/dist/starters/preact/design-system/components/Content/Icon/glyphs/search.tsx +0 -10
- package/dist/starters/preact/design-system/components/Content/Image/Image.ads.fixture.ts +0 -9
- package/dist/starters/preact/design-system/components/Content/Image/Image.ads.scenario.tsx +0 -12
- package/dist/starters/preact/design-system/components/Content/Image/Image.tsx +0 -83
- package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +0 -27
- package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +0 -46
- package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +0 -17
- package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +0 -41
- package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +0 -20
- package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.tsx +0 -37
- package/dist/starters/preact/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -24
- package/dist/starters/preact/design-system/components/Forms/TextField/TextField.tsx +0 -173
- package/dist/starters/preact/design-system/components/Identity/Identity.ads.scenario.tsx +0 -13
- package/dist/starters/preact/design-system/components/Identity/Identity.tsx +0 -146
- package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +0 -27
- package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.tsx +0 -194
- package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +0 -19
- package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.tsx +0 -37
- package/dist/starters/preact/design-system/controllers/FormField/FormField.ads.behavior.ts +0 -70
- package/dist/starters/preact/design-system/controllers/FormField/FormField.behavior.spec.ts +0 -237
- package/dist/starters/preact/design-system/controllers/FormField/FormField.ts +0 -343
- package/dist/starters/preact/design-system/controllers/FormField/useFormField.ts +0 -70
- package/dist/starters/preact/design-system/controllers/Palette/Palette.ts +0 -165
- package/dist/starters/preact/design-system/foundation.ads.ts +0 -22
- package/dist/starters/preact/design-system/index.ts +0 -51
- package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +0 -5
- package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +0 -22
- package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.fixture.ts +0 -12
- package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +0 -21
- package/dist/starters/preact/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +0 -24
- package/dist/starters/preact/design-system/mocks/Workspace/Media.ads.scenario.tsx +0 -24
- package/dist/starters/preact/design-system/mocks/Workspace/Stress.ads.scenario.tsx +0 -36
- package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.fixture.ts +0 -13
- package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +0 -27
- package/dist/starters/preact/design-system/mocks/Workspace/media/ads.svg +0 -1
- package/dist/starters/preact/design-system/palette.generated.ts +0 -188
- package/dist/starters/preact/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +0 -73
- package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +0 -23
- package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +0 -94
- package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +0 -21
- package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.tsx +0 -137
- package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +0 -22
- package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.tsx +0 -248
- package/dist/starters/preact/design-system/patterns/Shell/Shell.ads.scenario.tsx +0 -26
- package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +0 -268
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +0 -28
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.tsx +0 -105
- package/dist/starters/preact/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +0 -179
- package/dist/starters/preact/design-system/profiles/Containers/containers.ads.ts +0 -67
- package/dist/starters/preact/design-system/profiles/Containers/frames.ads.ts +0 -32
- package/dist/starters/preact/design-system/profiles/Containers/geometry.ads.ts +0 -30
- package/dist/starters/preact/design-system/profiles/Containers/spacing.ads.ts +0 -26
- package/dist/starters/preact/design-system/profiles/Controls/controls.ads.ts +0 -157
- package/dist/starters/preact/design-system/profiles/Controls/frames.ads.ts +0 -50
- package/dist/starters/preact/design-system/profiles/Controls/spacing.ads.ts +0 -29
- package/dist/starters/preact/design-system/profiles/Focus/keyboard.ads.ts +0 -13
- package/dist/starters/preact/design-system/profiles/Identity/identity.ads.ts +0 -25
- package/dist/starters/preact/design-system/profiles/Identity/spacing.ads.ts +0 -22
- package/dist/starters/preact/design-system/profiles/Layout/grid.ads.ts +0 -69
- package/dist/starters/preact/design-system/profiles/Layout/inspector.ads.ts +0 -146
- package/dist/starters/preact/design-system/profiles/Layout/overlays.ads.ts +0 -94
- package/dist/starters/preact/design-system/profiles/Layout/regions.ads.ts +0 -296
- package/dist/starters/preact/design-system/profiles/Motion/feedback.ads.ts +0 -92
- package/dist/starters/preact/design-system/profiles/Surfaces/controls.ads.ts +0 -142
- package/dist/starters/preact/design-system/profiles/Surfaces/document.ads.ts +0 -2
- package/dist/starters/preact/design-system/profiles/Surfaces/materials.ads.ts +0 -18
- package/dist/starters/preact/design-system/profiles/Surfaces/surfaces.ads.ts +0 -48
- package/dist/starters/preact/design-system/profiles/Typography/details.ads.ts +0 -19
- package/dist/starters/preact/design-system/profiles/Typography/document.ads.ts +0 -2
- package/dist/starters/preact/design-system/profiles/Typography/headings.ads.ts +0 -15
- package/dist/starters/preact/design-system/profiles/Typography/text.ads.ts +0 -73
- package/dist/starters/preact/design-system/profiles/Visuals/artwork.ads.ts +0 -46
- package/dist/starters/preact/design-system/profiles/Visuals/charts.ads.ts +0 -31
- package/dist/starters/preact/design-system/profiles/Visuals/content.ads.ts +0 -52
- package/dist/starters/preact/design-system/profiles/Visuals/glyphs.ads.ts +0 -35
- package/dist/starters/preact/design-system/profiles/Visuals/identity.ads.ts +0 -24
- package/dist/starters/preact/design-system/tokens/Artwork/paint.ads.css +0 -7
- package/dist/starters/preact/design-system/tokens/Artwork/visual-size.ads.css +0 -12
- package/dist/starters/preact/design-system/tokens/Brand/paint.ads.css +0 -7
- package/dist/starters/preact/design-system/tokens/Charts/paint.ads.css +0 -19
- package/dist/starters/preact/design-system/tokens/Containers/border-width.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Containers/content-gap.ads.css +0 -5
- package/dist/starters/preact/design-system/tokens/Containers/frame-inset.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Containers/frame-size.ads.css +0 -11
- package/dist/starters/preact/design-system/tokens/Containers/radius.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Controls/border-width.ads.css +0 -4
- package/dist/starters/preact/design-system/tokens/Controls/content-gap.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Controls/control-min-size.ads.css +0 -17
- package/dist/starters/preact/design-system/tokens/Controls/frame-inset.ads.css +0 -21
- package/dist/starters/preact/design-system/tokens/Controls/radius.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Controls/target-min-size.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Controls/visual-size.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Focus/border-width.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Focus/focus-offset.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Foundation/spacing.ads.css +0 -20
- package/dist/starters/preact/design-system/tokens/Grid/grid-gutter.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Grid/layer.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Grid/layout-size.ads.css +0 -15
- package/dist/starters/preact/design-system/tokens/Grid/spacing.ads.css +0 -12
- package/dist/starters/preact/design-system/tokens/Grid/track-count.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Identity/content-gap.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Identity/visual-size.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Motion/duration.ads.css +0 -6
- package/dist/starters/preact/design-system/tokens/Motion/easing.ads.css +0 -5
- package/dist/starters/preact/design-system/tokens/Motion/motion-angle.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Motion/motion-distance.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Motion/motion-scale.ads.css +0 -9
- package/dist/starters/preact/design-system/tokens/Surfaces/blur.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Surfaces/gradient.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Surfaces/opacity.ads.css +0 -2
- package/dist/starters/preact/design-system/tokens/Surfaces/paint.ads.css +0 -58
- package/dist/starters/preact/design-system/tokens/Surfaces/shadow.ads.css +0 -20
- package/dist/starters/preact/design-system/tokens/Typography/font-family.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/font-features.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/font-size.ads.css +0 -9
- package/dist/starters/preact/design-system/tokens/Typography/font-stretch.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/font-variations.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/font-weight.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/letter-spacing.ads.css +0 -1
- package/dist/starters/preact/design-system/tokens/Typography/line-height.ads.css +0 -11
- package/dist/starters/preact/design-system/tokens/Typography/word-spacing.ads.css +0 -1
- package/dist/starters/preact/starter.json +0 -11
- package/dist/starters/react/design-system/assets/avatars/avatar.ads.ts +0 -10
- package/dist/starters/react/design-system/assets/avatars/member.svg +0 -1
- package/dist/starters/react/design-system/assets/brand/emblem.ads.ts +0 -18
- package/dist/starters/react/design-system/assets/brand/emblem.svg +0 -4
- package/dist/starters/react/design-system/assets/brand/iris-emblem.ads.ts +0 -14
- package/dist/starters/react/design-system/assets/brand/iris-emblem.svg +0 -4
- package/dist/starters/react/design-system/assets/brand/mark.ads.ts +0 -14
- package/dist/starters/react/design-system/assets/brand/mark.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/arrow.ads.ts +0 -14
- package/dist/starters/react/design-system/assets/glyphs/arrow.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron-20.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron-24.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron.ads.ts +0 -20
- package/dist/starters/react/design-system/assets/glyphs/close.ads.ts +0 -13
- package/dist/starters/react/design-system/assets/glyphs/close.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/favorite.ads.ts +0 -23
- package/dist/starters/react/design-system/assets/glyphs/favorite.normal.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/favorite.selected.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/search.ads.ts +0 -10
- package/dist/starters/react/design-system/assets/glyphs/search.svg +0 -1
- package/dist/starters/react/design-system/assets/illustrations/journey.ads.ts +0 -32
- package/dist/starters/react/design-system/assets/illustrations/journey.contrast.svg +0 -6
- package/dist/starters/react/design-system/assets/illustrations/journey.dark.svg +0 -13
- package/dist/starters/react/design-system/assets/illustrations/journey.light.svg +0 -13
- package/dist/starters/react/design-system/assets/logos/harbor-pay.ads.ts +0 -17
- package/dist/starters/react/design-system/assets/logos/harbor-pay.dark.svg +0 -10
- package/dist/starters/react/design-system/assets/logos/harbor-pay.light.svg +0 -10
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.ads.ts +0 -15
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.dark.svg +0 -9
- package/dist/starters/react/design-system/assets/logos/lumen-cloud.light.svg +0 -9
- package/dist/starters/react/design-system/assets/status/error.svg +0 -1
- package/dist/starters/react/design-system/assets/status/outcomes.ads.ts +0 -31
- package/dist/starters/react/design-system/assets/status/status.ads.ts +0 -16
- package/dist/starters/react/design-system/assets/status/success.svg +0 -1
- package/dist/starters/react/design-system/assets/status/sync-status.ads.ts +0 -14
- package/dist/starters/react/design-system/assets/status/sync-status.svg +0 -7
- package/dist/starters/react/design-system/assets/status/warning.svg +0 -1
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -12
- package/dist/starters/react/design-system/components/Actions/Button/Button.tsx +0 -198
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +0 -95
- package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +0 -22
- package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.tsx +0 -60
- package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +0 -24
- package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.tsx +0 -50
- package/dist/starters/react/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +0 -8
- package/dist/starters/react/design-system/components/Content/Artwork/Artwork.tsx +0 -110
- package/dist/starters/react/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +0 -25
- package/dist/starters/react/design-system/components/Content/BarChart/BarChart.tsx +0 -72
- package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +0 -8
- package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.tsx +0 -43
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +0 -21
- package/dist/starters/react/design-system/components/Content/Icon/Icon.tsx +0 -41
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/arrow.tsx +0 -10
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/close.tsx +0 -10
- package/dist/starters/react/design-system/components/Content/Icon/glyphs/search.tsx +0 -10
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.fixture.ts +0 -9
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.scenario.tsx +0 -12
- package/dist/starters/react/design-system/components/Content/Image/Image.tsx +0 -83
- package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +0 -27
- package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +0 -46
- package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +0 -17
- package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +0 -41
- package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +0 -20
- package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.tsx +0 -37
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -24
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.tsx +0 -173
- package/dist/starters/react/design-system/components/Identity/Identity.ads.scenario.tsx +0 -13
- package/dist/starters/react/design-system/components/Identity/Identity.tsx +0 -146
- package/dist/starters/react/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +0 -27
- package/dist/starters/react/design-system/components/Overlays/Menu/Menu.tsx +0 -194
- package/dist/starters/react/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +0 -19
- package/dist/starters/react/design-system/components/Overlays/Popover/Popover.tsx +0 -37
- package/dist/starters/react/design-system/controllers/FormField/FormField.ads.behavior.ts +0 -70
- package/dist/starters/react/design-system/controllers/FormField/FormField.behavior.spec.ts +0 -237
- package/dist/starters/react/design-system/controllers/FormField/FormField.ts +0 -343
- package/dist/starters/react/design-system/controllers/FormField/useFormField.ts +0 -70
- package/dist/starters/react/design-system/controllers/Palette/Palette.ts +0 -165
- package/dist/starters/react/design-system/foundation.ads.ts +0 -22
- package/dist/starters/react/design-system/index.ts +0 -51
- package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +0 -5
- package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +0 -22
- package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.fixture.ts +0 -12
- package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +0 -21
- package/dist/starters/react/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +0 -24
- package/dist/starters/react/design-system/mocks/Workspace/Media.ads.scenario.tsx +0 -24
- package/dist/starters/react/design-system/mocks/Workspace/Stress.ads.scenario.tsx +0 -36
- package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.fixture.ts +0 -13
- package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +0 -27
- package/dist/starters/react/design-system/mocks/Workspace/media/ads.svg +0 -1
- package/dist/starters/react/design-system/palette.generated.ts +0 -188
- package/dist/starters/react/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +0 -73
- package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +0 -23
- package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +0 -94
- package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +0 -21
- package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.tsx +0 -137
- package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +0 -22
- package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.tsx +0 -248
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +0 -26
- package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +0 -268
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +0 -28
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.tsx +0 -105
- package/dist/starters/react/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +0 -179
- package/dist/starters/react/design-system/profiles/Containers/containers.ads.ts +0 -67
- package/dist/starters/react/design-system/profiles/Containers/frames.ads.ts +0 -32
- package/dist/starters/react/design-system/profiles/Containers/geometry.ads.ts +0 -30
- package/dist/starters/react/design-system/profiles/Containers/spacing.ads.ts +0 -26
- package/dist/starters/react/design-system/profiles/Controls/controls.ads.ts +0 -157
- package/dist/starters/react/design-system/profiles/Controls/frames.ads.ts +0 -50
- package/dist/starters/react/design-system/profiles/Controls/spacing.ads.ts +0 -29
- package/dist/starters/react/design-system/profiles/Focus/keyboard.ads.ts +0 -13
- package/dist/starters/react/design-system/profiles/Identity/identity.ads.ts +0 -25
- package/dist/starters/react/design-system/profiles/Identity/spacing.ads.ts +0 -22
- package/dist/starters/react/design-system/profiles/Layout/grid.ads.ts +0 -69
- package/dist/starters/react/design-system/profiles/Layout/inspector.ads.ts +0 -146
- package/dist/starters/react/design-system/profiles/Layout/overlays.ads.ts +0 -94
- package/dist/starters/react/design-system/profiles/Layout/regions.ads.ts +0 -296
- package/dist/starters/react/design-system/profiles/Motion/feedback.ads.ts +0 -92
- package/dist/starters/react/design-system/profiles/Surfaces/controls.ads.ts +0 -142
- package/dist/starters/react/design-system/profiles/Surfaces/document.ads.ts +0 -2
- package/dist/starters/react/design-system/profiles/Surfaces/materials.ads.ts +0 -18
- package/dist/starters/react/design-system/profiles/Surfaces/surfaces.ads.ts +0 -48
- package/dist/starters/react/design-system/profiles/Typography/details.ads.ts +0 -19
- package/dist/starters/react/design-system/profiles/Typography/document.ads.ts +0 -2
- package/dist/starters/react/design-system/profiles/Typography/headings.ads.ts +0 -15
- package/dist/starters/react/design-system/profiles/Typography/text.ads.ts +0 -73
- package/dist/starters/react/design-system/profiles/Visuals/artwork.ads.ts +0 -46
- package/dist/starters/react/design-system/profiles/Visuals/charts.ads.ts +0 -31
- package/dist/starters/react/design-system/profiles/Visuals/content.ads.ts +0 -52
- package/dist/starters/react/design-system/profiles/Visuals/glyphs.ads.ts +0 -35
- package/dist/starters/react/design-system/profiles/Visuals/identity.ads.ts +0 -24
- package/dist/starters/react/design-system/tokens/Artwork/paint.ads.css +0 -7
- package/dist/starters/react/design-system/tokens/Artwork/visual-size.ads.css +0 -12
- package/dist/starters/react/design-system/tokens/Brand/paint.ads.css +0 -7
- package/dist/starters/react/design-system/tokens/Charts/paint.ads.css +0 -19
- package/dist/starters/react/design-system/tokens/Containers/border-width.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Containers/content-gap.ads.css +0 -5
- package/dist/starters/react/design-system/tokens/Containers/frame-inset.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Containers/frame-size.ads.css +0 -11
- package/dist/starters/react/design-system/tokens/Containers/radius.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Controls/border-width.ads.css +0 -4
- package/dist/starters/react/design-system/tokens/Controls/content-gap.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Controls/control-min-size.ads.css +0 -17
- package/dist/starters/react/design-system/tokens/Controls/frame-inset.ads.css +0 -21
- package/dist/starters/react/design-system/tokens/Controls/radius.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Controls/target-min-size.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Controls/visual-size.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Focus/border-width.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Focus/focus-offset.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Foundation/spacing.ads.css +0 -20
- package/dist/starters/react/design-system/tokens/Grid/grid-gutter.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Grid/layer.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Grid/layout-size.ads.css +0 -15
- package/dist/starters/react/design-system/tokens/Grid/spacing.ads.css +0 -12
- package/dist/starters/react/design-system/tokens/Grid/track-count.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Identity/content-gap.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Identity/visual-size.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Motion/duration.ads.css +0 -6
- package/dist/starters/react/design-system/tokens/Motion/easing.ads.css +0 -5
- package/dist/starters/react/design-system/tokens/Motion/motion-angle.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Motion/motion-distance.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Motion/motion-scale.ads.css +0 -9
- package/dist/starters/react/design-system/tokens/Surfaces/blur.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Surfaces/gradient.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Surfaces/opacity.ads.css +0 -2
- package/dist/starters/react/design-system/tokens/Surfaces/paint.ads.css +0 -58
- package/dist/starters/react/design-system/tokens/Surfaces/shadow.ads.css +0 -20
- package/dist/starters/react/design-system/tokens/Typography/font-family.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/font-features.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/font-size.ads.css +0 -9
- package/dist/starters/react/design-system/tokens/Typography/font-stretch.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/font-variations.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/font-weight.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/letter-spacing.ads.css +0 -1
- package/dist/starters/react/design-system/tokens/Typography/line-height.ads.css +0 -11
- package/dist/starters/react/design-system/tokens/Typography/word-spacing.ads.css +0 -1
- package/dist/starters/react/starter.json +0 -11
- package/docs/STARTER.md +0 -167
package/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, GEOMETRY_CHANNELS, 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"]), outsetSpacing = metric("spacing", ["content-gap", "label-gap", "details-gap", "meta-gap", "section-gap", "indent", "outset-block", "outset-inline"]), anchorClear = (value) => value === "profile(layer-profile.clear-block-start)" || value === "profile(spacing-profile.anchor-gap)", overlapSpacing = metric("spacing", ["overlap"]), 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,11 @@ 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
|
+
overlap: overlapSpacing,
|
|
24
|
+
rhythm: spacing,
|
|
25
|
+
"anchor-clear": anchorClear,
|
|
22
26
|
columns: positive,
|
|
27
|
+
weights: (value) => value.split(/\s+/).length <= 64 && value.split(/\s+/).every((weight) => /^\d+(\.\d+)?$/.test(weight) && Number(weight) > 0),
|
|
23
28
|
rows: (value) => value.split(/\s+/).length <= 12 && value.split(/\s+/).every((row) => ["auto", "fill"].includes(row)),
|
|
24
29
|
gutter: (value) => identifier.test(value),
|
|
25
30
|
margin: oneOf("none"),
|
|
@@ -34,11 +39,14 @@ const identifier = /^[a-z][\w-]*$/, profile = /^[a-z][\w-]*(?:\([a-z][\w-]*:\s*[
|
|
|
34
39
|
},
|
|
35
40
|
"ads-part": {
|
|
36
41
|
kind: oneOf("text", "visual", "vector"),
|
|
42
|
+
scheme: oneOf("light", "dark"),
|
|
37
43
|
selector: (value) => /^\.[a-z][\w-]*$/.test(value),
|
|
38
44
|
required: oneOf("true", "false"),
|
|
39
45
|
wrap: oneOf("true", "false", ...TEXT_WRAPS),
|
|
40
46
|
"text-align": TEXT_ALIGN,
|
|
41
47
|
"reserve-lines": oneOf("1", "2", "3"),
|
|
48
|
+
collapsed: oneOf("true", "false"),
|
|
49
|
+
"anchor-clear": anchorClear,
|
|
42
50
|
lines: oneOf("2", "3"),
|
|
43
51
|
overflow: OVERFLOW,
|
|
44
52
|
extent: oneOf("fill", "fill-both"),
|
|
@@ -58,11 +66,16 @@ const identifier = /^[a-z][\w-]*$/, profile = /^[a-z][\w-]*(?:\([a-z][\w-]*:\s*[
|
|
|
58
66
|
transition: (value) => value.trim() === "" || value.trim().split(/\s+/).every((channel) => ["translate", "scale", "rotate"].includes(channel))
|
|
59
67
|
},
|
|
60
68
|
"ads-frame": {
|
|
69
|
+
profile: binding,
|
|
61
70
|
container: oneOf("region"),
|
|
62
71
|
ratio: (value) => /^[1-9]\d*\s*\/\s*[1-9]\d*$/.test(value),
|
|
63
72
|
rules: (value) => {
|
|
64
73
|
const sides = value.split(/\s+/);
|
|
65
74
|
return new Set(sides).size === sides.length && sides.every((side) => FRAME_SIDES.includes(side));
|
|
75
|
+
},
|
|
76
|
+
corners: (value) => {
|
|
77
|
+
const corners = value.split(/\s+/).filter((corner) => corner !== "");
|
|
78
|
+
return new Set(corners).size === corners.length && corners.every((corner) => FRAME_CORNERS.includes(corner));
|
|
66
79
|
}
|
|
67
80
|
},
|
|
68
81
|
"ads-paint-transition": {
|
|
@@ -72,8 +85,21 @@ const identifier = /^[a-z][\w-]*$/, profile = /^[a-z][\w-]*(?:\([a-z][\w-]*:\s*[
|
|
|
72
85
|
},
|
|
73
86
|
motion: binding
|
|
74
87
|
},
|
|
88
|
+
"ads-geometry-transition": {
|
|
89
|
+
channels: (value) => {
|
|
90
|
+
const channels = value.split(/\s+/);
|
|
91
|
+
return new Set(channels).size === channels.length && channels.every((channel) => GEOMETRY_CHANNELS.includes(channel));
|
|
92
|
+
},
|
|
93
|
+
motion: binding
|
|
94
|
+
},
|
|
95
|
+
"ads-enter": { surface: binding, motion: binding, translate: metric("motion", ["distance"]), scale: metric("motion", ["scale"]), rotate: metric("motion", ["angle"]) },
|
|
75
96
|
"ads-pseudo": { surface: binding },
|
|
76
97
|
"ads-accessibility": { boundary: () => !0, reason: () => !0 },
|
|
98
|
+
"ads-focus": { of: () => !0 },
|
|
99
|
+
"ads-element": { text: binding, surface: binding, frame: binding, marker: binding, "marker-text": binding, markers: wordList, "space-before": spacing, "space-after": spacing, indent: spacing, "anchor-clear": anchorClear },
|
|
100
|
+
"ads-play": { sequence: binding, order: (value) => /^(?:[0-9]|[12][0-9]|3[0-2])$/.test(value) },
|
|
101
|
+
"ads-outset": { block: outsetSpacing, inline: outsetSpacing },
|
|
102
|
+
"ads-sticky": { edge: oneOf("block-start", "block-end"), clear: oneOf("none", "block-start") },
|
|
77
103
|
"ads-snap": { type: oneOf(...SNAP_TYPES), align: oneOf(...SNAP_ALIGNS) },
|
|
78
104
|
"ads-layer": {
|
|
79
105
|
element: oneOf("dialog", "popover"),
|
|
@@ -93,9 +119,15 @@ const identifier = /^[a-z][\w-]*$/, profile = /^[a-z][\w-]*(?:\([a-z][\w-]*:\s*[
|
|
|
93
119
|
"ads-align": { rows: wordList },
|
|
94
120
|
"ads-when": {
|
|
95
121
|
surface: binding,
|
|
122
|
+
spacing: binding,
|
|
123
|
+
collapsed: oneOf("true", "false"),
|
|
124
|
+
text: binding,
|
|
96
125
|
repeat: oneOf("continuous"),
|
|
97
126
|
"translate-inline": metric("motion", ["distance"]),
|
|
127
|
+
"translate-block": metric("motion", ["distance"]),
|
|
98
128
|
scale: metric("motion", ["scale"]),
|
|
129
|
+
"scale-inline": metric("motion", ["scale"]),
|
|
130
|
+
"scale-block": metric("motion", ["scale"]),
|
|
99
131
|
rotate: metric("motion", ["angle"])
|
|
100
132
|
}
|
|
101
133
|
}, NATIVE = {
|
|
@@ -105,7 +137,8 @@ const identifier = /^[a-z][\w-]*$/, profile = /^[a-z][\w-]*(?:\([a-z][\w-]*:\s*[
|
|
|
105
137
|
"text-decoration": oneOf("none"),
|
|
106
138
|
"pointer-events": oneOf("none"),
|
|
107
139
|
"touch-action": oneOf(...TOUCH_ACTIONS),
|
|
108
|
-
"user-select": oneOf(...USER_SELECTS)
|
|
140
|
+
"user-select": oneOf(...USER_SELECTS),
|
|
141
|
+
resize: oneOf(...RESIZES)
|
|
109
142
|
};
|
|
110
143
|
export const checkOwnerStyle = (ast, file) => rejecting(() => {
|
|
111
144
|
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
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inactiveCondition, paintContrast, reachablePairs, TEXT_MINIMUM } from "./paint-contrast.mjs";
|
|
1
|
+
import { inactiveCondition, NON_TEXT_MINIMUM, paintContrast, reachablePairs, TEXT_MINIMUM } from "./paint-contrast.mjs";
|
|
2
2
|
import { tokenValueContexts } from "./design-foundation.mjs";
|
|
3
3
|
import { err, ok } from "./result.mjs";
|
|
4
4
|
export const PLACEHOLDER_MINIMUM = TEXT_MINIMUM;
|
|
@@ -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`;
|
|
@@ -32,3 +33,19 @@ export function checkPlaceholderContrast(foundation, part, foreground, backgroun
|
|
|
32
33
|
}
|
|
33
34
|
return ok(null);
|
|
34
35
|
}
|
|
36
|
+
export function checkProgressContrast(foundation, part, fill, track) {
|
|
37
|
+
const pairs = reachablePairs(fill, track).filter((pair) => !inactiveCondition(pair.foreground.condition) && !inactiveCondition(pair.background.condition));
|
|
38
|
+
for (const context of tokenValueContexts(foundation))
|
|
39
|
+
for (const pair of pairs) {
|
|
40
|
+
const states = [pair.foreground.condition, pair.background.condition], outcome = paintContrast(context, { foreground: pair.foreground.value, background: pair.background.value }, NON_TEXT_MINIMUM);
|
|
41
|
+
switch (outcome.kind) {
|
|
42
|
+
case "sufficient":
|
|
43
|
+
continue;
|
|
44
|
+
case "insufficient":
|
|
45
|
+
return err({ kind: "progress-contrast-insufficient", part, context: context.label, states, ratio: outcome.ratio, minimum: outcome.minimum });
|
|
46
|
+
case "unresolved":
|
|
47
|
+
return err({ kind: "progress-contrast-unresolved", part, context: context.label, states, reason: outcome.unresolved.kind === "paint-missing" ? outcome.unresolved.paint === "background" ? "the part sets no background for its track" : "the fill's surface sets no background" : placeholderReason(outcome.unresolved) });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return ok(null);
|
|
51
|
+
}
|
|
@@ -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." },
|
|
@@ -25,9 +32,16 @@ export const PLATFORM_FEATURES = [
|
|
|
25
32
|
prefixed: ["::-webkit-details-marker"],
|
|
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
|
},
|
|
35
|
+
{
|
|
36
|
+
id: "progress-parts",
|
|
37
|
+
css: ["appearance"],
|
|
38
|
+
prefixed: ["-webkit-appearance", "::-webkit-progress-bar", "::-webkit-progress-value", "::-moz-progress-bar"],
|
|
39
|
+
degrades: "A progress bar keeps the engine's own drawing: its track and fill are not the design's paints. Each engine reads only its own pseudo-element; there is no standard one."
|
|
40
|
+
},
|
|
28
41
|
{ id: "dir-pseudo-class", css: [":dir()"], degrades: "Right-to-left overrides do not apply: mirrored offsets and motion keep their left-to-right direction." },
|
|
42
|
+
{ id: "filter-effects", css: ["filter", "blur()", "drop-shadow()", "saturate()", "brightness()"], degrades: "A surface's brightness, blur and its shape or group shadow do not apply: the element is drawn as it is, sharp and without that shadow." },
|
|
29
43
|
{ 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." },
|
|
44
|
+
{ 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
45
|
{ 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
46
|
{ 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
47
|
{
|
|
@@ -38,6 +52,12 @@ export const PLATFORM_FEATURES = [
|
|
|
38
52
|
},
|
|
39
53
|
{ 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
54
|
{ 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." },
|
|
55
|
+
{
|
|
56
|
+
id: "mask-image",
|
|
57
|
+
css: ["mask-image"],
|
|
58
|
+
prefixed: ["-webkit-mask-image"],
|
|
59
|
+
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."
|
|
60
|
+
},
|
|
41
61
|
{ 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
62
|
{ 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
63
|
{ 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." },
|
|
@@ -55,10 +75,13 @@ export const PLATFORM_FEATURES = [
|
|
|
55
75
|
{ id: "prefers-reduced-motion", css: ["@media (prefers-reduced-motion)"], degrades: "Motion is not reduced for users who ask for less: transitions and animations run at full length." },
|
|
56
76
|
{ id: "interaction-media", css: ["@media (hover)", "@media (any-hover)", "@media (pointer)", "@media (any-pointer)"], degrades: "Input-dependent rules do not apply." },
|
|
57
77
|
{ id: "registered-custom-properties", css: ["@property"], degrades: "Registered custom properties behave as unregistered ones: no type checking, no interpolation, and they inherit." },
|
|
78
|
+
{ id: "interpolate-size", css: ["interpolate-size"], degrades: "A collapsed part opens and closes at once instead of growing: its size and what it shows are the same, without the animation." },
|
|
79
|
+
{ id: "scroll-margin", css: ["scroll-margin-block-start"], degrades: "A jump to an anchor puts its target at the very top of the scroll container, under whatever is stuck there." },
|
|
58
80
|
{ id: "scroll-snap", css: ["scroll-snap-type", "scroll-snap-align"], degrades: "Scrolling does not snap: a scrolled track stops wherever the scroll ends." },
|
|
59
81
|
{ 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
82
|
{ id: "starting-style", css: ["@starting-style"], degrades: "Entry animations are skipped: the element appears in its open state at once." },
|
|
61
83
|
{ 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." },
|
|
84
|
+
{ 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
85
|
{ id: "text-wrap-balance", css: ["text-wrap: balance"], degrades: "Normal wrapping: line lengths are not balanced." },
|
|
63
86
|
{ id: "text-wrap-pretty", css: ["text-wrap: pretty"], degrades: "Normal wrapping: a paragraph may end in a single short word." },
|
|
64
87
|
{ id: "touch-action", css: ["touch-action"], degrades: "The browser's default touch gestures (panning, zooming) apply to the element." },
|
|
@@ -128,8 +151,18 @@ export const PLATFORM_FEATURES = [
|
|
|
128
151
|
"overflow-wrap",
|
|
129
152
|
"pointer-events",
|
|
130
153
|
"position",
|
|
154
|
+
"visibility",
|
|
131
155
|
"text-align",
|
|
132
156
|
"text-decoration-line",
|
|
157
|
+
"font-stretch",
|
|
158
|
+
"letter-spacing",
|
|
159
|
+
"word-spacing",
|
|
160
|
+
"font-feature-settings",
|
|
161
|
+
"font-variation-settings",
|
|
162
|
+
"text-decoration-color",
|
|
163
|
+
"text-decoration-thickness",
|
|
164
|
+
"text-underline-offset",
|
|
165
|
+
"text-transform",
|
|
133
166
|
"text-overflow",
|
|
134
167
|
"transform",
|
|
135
168
|
"transition-delay",
|
package/dist/preview-bun.mjs
CHANGED
|
@@ -21,7 +21,8 @@ import * as timing from "./stage-timing.mjs";
|
|
|
21
21
|
import { bunBundler } from "./bun-bundler.mjs";
|
|
22
22
|
import { isRecord } from "./unknown.mjs";
|
|
23
23
|
import { adsViewDefinition } from "./ads-views.mjs";
|
|
24
|
-
import { PREVIEW_FACTS_FILE, PREVIEW_TOKENS_SHEET } from "./emit/preview-tree.mjs";
|
|
24
|
+
import { PREVIEW_CONTROLS_FILE, PREVIEW_FACTS_FILE, PREVIEW_TOKENS_SHEET } from "./emit/preview-tree.mjs";
|
|
25
|
+
import { parsePreviewControls } from "./preview-controls.mjs";
|
|
25
26
|
const distributedFrame = existsSync(new URL("./showcase/preview-frame.mjs", import.meta.url)), builtFrame = !distributedFrame && existsSync(new URL("../dist/showcase/ui/ui.js", import.meta.url)), compiledFrame = distributedFrame || builtFrame, previewFrameDirectory = distributedFrame ? "./showcase/" : builtFrame ? "../dist/showcase/" : "../showcase-client/", previewFrameFile = (file) => fileURLToPath(new URL(`${previewFrameDirectory}${file}`, import.meta.url)), previewFrameModule = (name) => previewFrameFile(`${name}${compiledFrame ? ".mjs" : ".mts"}`);
|
|
26
27
|
export const SCENARIO_KIT = "@reqvire-org/ads/showcase", previewFrameFiles = [
|
|
27
28
|
previewFrameModule("preview-frame"),
|
|
@@ -38,9 +39,16 @@ export const SCENARIO_KIT = "@reqvire-org/ads/showcase", previewFrameFiles = [
|
|
|
38
39
|
previewFrameModule("assets-view"),
|
|
39
40
|
...["inspected-svg", "result"].map((name) => fileURLToPath(new URL(builtFrame ? `../dist/${name}.mjs` : `./${name}${distributedFrame ? ".mjs" : ".mts"}`, import.meta.url)))
|
|
40
41
|
], adsViewsModule = previewFrameModule("ads-views");
|
|
41
|
-
export function previewEntryCode(entry, { root, tree,
|
|
42
|
-
if (entry.view === void 0)
|
|
43
|
-
|
|
42
|
+
export function previewEntryCode(entry, { root, tree, foundation }, projectMount, inputs) {
|
|
43
|
+
if (entry.view === void 0) {
|
|
44
|
+
const file = path.join(tree, PREVIEW_CONTROLS_FILE);
|
|
45
|
+
let controls = {};
|
|
46
|
+
try {
|
|
47
|
+
controls = parsePreviewControls(readFileSync(file, "utf8"));
|
|
48
|
+
inputs.add(file);
|
|
49
|
+
} catch {}
|
|
50
|
+
return `import {mountScenario} from ${JSON.stringify(projectMount())};import {scenario} from ${JSON.stringify(path.join(root, entry.file))};export const mount=container=>mountScenario(scenario,container,${JSON.stringify(controls)});`;
|
|
51
|
+
}
|
|
44
52
|
const definition = adsViewDefinition(entry.view), file = path.join(tree, PREVIEW_FACTS_FILE);
|
|
45
53
|
let facts = null;
|
|
46
54
|
try {
|
|
@@ -48,17 +56,10 @@ export function previewEntryCode(entry, { root, tree, publicAlias, foundation },
|
|
|
48
56
|
inputs.add(file);
|
|
49
57
|
facts = isRecord(read) ? { [definition.facts]: read[definition.facts] ?? null } : null;
|
|
50
58
|
} catch {}
|
|
51
|
-
const mount = `import {mountAdsView} from ${JSON.stringify(adsViewsModule)};`, options = `view:${JSON.stringify(entry.view)},facts:${JSON.stringify(facts)}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
case "token-sheets": {
|
|
56
|
-
const sheet = path.join(tree, PREVIEW_TOKENS_SHEET), sheets = [...foundation === null ? [] : [foundation], ...existsSync(sheet) ? [sheet] : []];
|
|
57
|
-
if (sheets.includes(sheet))
|
|
58
|
-
inputs.add(sheet);
|
|
59
|
-
return `${sheets.map((file) => `import ${JSON.stringify(file)};`).join("")}${mount}export const mount=container=>mountAdsView(container,{${options}});`;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
59
|
+
const mount = `import {mountAdsView} from ${JSON.stringify(adsViewsModule)};`, options = `view:${JSON.stringify(entry.view)},facts:${JSON.stringify(facts)}`, sheet = path.join(tree, PREVIEW_TOKENS_SHEET), sheets = [...foundation === null ? [] : [foundation], ...existsSync(sheet) ? [sheet] : []];
|
|
60
|
+
if (sheets.includes(sheet))
|
|
61
|
+
inputs.add(sheet);
|
|
62
|
+
return `${sheets.map((file) => `import ${JSON.stringify(file)};`).join("")}${mount}export const mount=container=>mountAdsView(container,{${options}});`;
|
|
62
63
|
}
|
|
63
64
|
const hash = (value) => createHash("sha256").update(value).digest("hex"), fileHash = (file) => {
|
|
64
65
|
try {
|
|
@@ -156,7 +157,7 @@ export function createBunPreviewBuilder() {
|
|
|
156
157
|
return kitFile = file;
|
|
157
158
|
}, emittedClasses = new Map, mounts = new Map(entries.map((entry, index) => {
|
|
158
159
|
const file = path.join(workDirectory, hash(entry.id) + ".tsx");
|
|
159
|
-
writeFileSync(file, previewEntryCode(entry, { root: options.root, tree: origin.tree,
|
|
160
|
+
writeFileSync(file, previewEntryCode(entry, { root: options.root, tree: origin.tree, foundation }, projectMount, inputs));
|
|
160
161
|
return [file, index];
|
|
161
162
|
})), previewUi = previewFrameFiles[0], alias = (specifier) => {
|
|
162
163
|
if (specifier === "@reqvire-org/ads/preview")
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export function previewControls(owners) {
|
|
2
|
+
const byComponent = new Map;
|
|
3
|
+
for (const owner of owners)
|
|
4
|
+
for (const { component, prop, values, optional } of owner.controls ?? []) {
|
|
5
|
+
const list = byComponent.get(component) ?? byComponent.set(component, []).get(component) ?? [];
|
|
6
|
+
if (!list.some((control) => control.prop === prop))
|
|
7
|
+
list.push({ prop, values, optional });
|
|
8
|
+
}
|
|
9
|
+
return Object.fromEntries([...byComponent].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0));
|
|
10
|
+
}
|
|
11
|
+
export const previewControlsText = (owners) => `${JSON.stringify(previewControls(owners), null, 2)}
|
|
12
|
+
`;
|
|
13
|
+
export function parsePreviewControls(text) {
|
|
14
|
+
try {
|
|
15
|
+
const read = JSON.parse(text);
|
|
16
|
+
if (typeof read !== "object" || read === null || Array.isArray(read))
|
|
17
|
+
return {};
|
|
18
|
+
const controls = {};
|
|
19
|
+
for (const [component, list] of Object.entries(read)) {
|
|
20
|
+
if (!Array.isArray(list))
|
|
21
|
+
continue;
|
|
22
|
+
controls[component] = list.flatMap((item) => {
|
|
23
|
+
if (typeof item !== "object" || item === null)
|
|
24
|
+
return [];
|
|
25
|
+
const prop = Reflect.get(item, "prop"), values = Reflect.get(item, "values");
|
|
26
|
+
if (typeof prop !== "string" || !Array.isArray(values))
|
|
27
|
+
return [];
|
|
28
|
+
return [{ prop, values: values.filter((value) => typeof value === "string" || typeof value === "boolean"), optional: Reflect.get(item, "optional") === !0 }];
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return controls;
|
|
32
|
+
} catch {
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -333,7 +333,7 @@ async function createGraph(options, configuration) {
|
|
|
333
333
|
return name;
|
|
334
334
|
}
|
|
335
335
|
const roots = entries.map((entry, index) => {
|
|
336
|
-
const file = path.join(directory, hash(entry.id) + ".tsx"), mount = previewEntryCode(entry, { root: options.root, tree: emittedTree,
|
|
336
|
+
const file = path.join(directory, hash(entry.id) + ".tsx"), mount = previewEntryCode(entry, { root: options.root, tree: emittedTree, foundation: origin.foundation }, projectMount, inputs), sheet = origin.foundation, code = `${sheet === null ? "" : `import ${JSON.stringify(sheet)};
|
|
337
337
|
`}import ${JSON.stringify(bootstrapId)};
|
|
338
338
|
` + mount;
|
|
339
339
|
if (generated.get(file) !== code) {
|
package/dist/preview-source.mjs
CHANGED
|
@@ -97,8 +97,8 @@ export function sourcePathOf(source, dsRoot, file) {
|
|
|
97
97
|
}
|
|
98
98
|
export function generatedMount(framework, foundation) {
|
|
99
99
|
const sheet = foundation === null ? "" : `import ${JSON.stringify(foundation)};
|
|
100
|
-
`, page = `export function mountScenario(scenario, container) {
|
|
101
|
-
return mountScenarioPage(container, scenario, mountSpecimen);
|
|
100
|
+
`, page = `export function mountScenario(scenario, container, controls) {
|
|
101
|
+
return mountScenarioPage(container, scenario, mountSpecimen, controls);
|
|
102
102
|
}
|
|
103
103
|
`;
|
|
104
104
|
switch (framework) {
|
package/dist/profile-macro.d.mts
CHANGED
|
@@ -34,6 +34,21 @@ export interface ProfileSpec {
|
|
|
34
34
|
readonly below?: Token;
|
|
35
35
|
readonly above?: Token;
|
|
36
36
|
}>>;
|
|
37
|
+
/**
|
|
38
|
+
* A `sequence` profile's steps, each at a whole percentage of the run from 0 to 100. A step states
|
|
39
|
+
* what the part looks like there: `opacity`, travel (`translateInline`, `translateBlock`), one scale
|
|
40
|
+
* (`scale`, or `scaleInline` / `scaleBlock` for one axis) and `rotate`, each from a token of its role.
|
|
41
|
+
*/
|
|
42
|
+
readonly steps?: readonly {
|
|
43
|
+
readonly at: number;
|
|
44
|
+
readonly opacity?: Token;
|
|
45
|
+
readonly translateInline?: Token;
|
|
46
|
+
readonly translateBlock?: Token;
|
|
47
|
+
readonly scale?: Token;
|
|
48
|
+
readonly scaleInline?: Token;
|
|
49
|
+
readonly scaleBlock?: Token;
|
|
50
|
+
readonly rotate?: Token;
|
|
51
|
+
}[];
|
|
37
52
|
}
|
|
38
53
|
export interface Profile {
|
|
39
54
|
readonly spec: ProfileSpec;
|
package/dist/profile-model.mjs
CHANGED
|
@@ -63,10 +63,10 @@ function readDefinition(node, metadata) {
|
|
|
63
63
|
}
|
|
64
64
|
choices.set(child.params, { default: fields.default, options });
|
|
65
65
|
} else {
|
|
66
|
-
check(kind === "spatial" && ["ads-breakpoint", "ads-gutter", "ads-condition"].includes(child.name), `Unknown profile clause: ${child.name}`);
|
|
67
|
-
check(fieldsOnly(child), "
|
|
66
|
+
check(kind === "spatial" && ["ads-breakpoint", "ads-gutter", "ads-condition"].includes(child.name) || kind === "sequence" && child.name === "ads-step", `Unknown profile clause: ${child.name}`);
|
|
67
|
+
check(fieldsOnly(child), "Profile clauses contain fields only");
|
|
68
68
|
const key = `${child.name} ${child.params}`;
|
|
69
|
-
check(!clauses.has(key), `Duplicate
|
|
69
|
+
check(!clauses.has(key), `Duplicate profile clause: ${key}`);
|
|
70
70
|
clauses.set(key, declarations(child));
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { references } from "./design-foundation.mjs";
|
|
1
|
+
import { references, tokenValueContexts } from "./design-foundation.mjs";
|
|
2
2
|
import { roleShape } from "./role-vocabulary.mjs";
|
|
3
3
|
import { tokenSpecimen } from "./token-view-facts.mjs";
|
|
4
4
|
const byName = (a, b) => a < b ? -1 : a > b ? 1 : 0;
|
|
5
5
|
export const authoredField = (field) => field.replace(/-([a-z0-9])/g, (_, letter) => letter.toUpperCase());
|
|
6
|
-
const kindOrder = ["text", "frame", "surface", "visual", "spacing", "motion", "focus", "spatial", "layer", "composite"], byKind = (a, b) => {
|
|
6
|
+
const kindOrder = ["text", "frame", "surface", "visual", "spacing", "motion", "sequence", "focus", "spatial", "layer", "composite"], byKind = (a, b) => {
|
|
7
7
|
const at = (kind) => kindOrder.includes(kind) ? kindOrder.indexOf(kind) : kindOrder.length;
|
|
8
8
|
return at(a) - at(b) || byName(a, b);
|
|
9
9
|
};
|
|
@@ -11,6 +11,53 @@ export function profileGroup(file) {
|
|
|
11
11
|
const parts = file?.split("/") ?? [], at = parts.indexOf("profiles");
|
|
12
12
|
return at >= 0 && parts.length > at + 2 ? parts[at + 1] ?? null : null;
|
|
13
13
|
}
|
|
14
|
+
const APPLIED_PROPERTIES = {
|
|
15
|
+
text: { fontFamily: "font-family", fontSize: "font-size", lineHeight: "line-height", fontWeight: "font-weight", fontStretch: "font-stretch", letterSpacing: "letter-spacing", wordSpacing: "word-spacing", fontFeatureSettings: "font-feature-settings", fontVariationSettings: "font-variation-settings", textTransform: "text-transform" },
|
|
16
|
+
surface: { background: "background-color", color: "color", borderColor: "border-color", boxShadow: "box-shadow", backgroundImage: "background-image", opacity: "opacity" },
|
|
17
|
+
frame: { borderWidth: "border-width", borderStyle: "border-style", radius: "border-radius", padding: "padding", paddingInline: "padding-inline", paddingBlock: "padding-block", paddingInlineStart: "padding-inline-start", paddingInlineEnd: "padding-inline-end", paddingBlockStart: "padding-block-start", paddingBlockEnd: "padding-block-end", minBlockSize: "min-block-size", minInlineSize: "min-inline-size" },
|
|
18
|
+
spacing: { contentGap: "gap" },
|
|
19
|
+
focus: { color: "outline-color", width: "outline-width", offset: "outline-offset" }
|
|
20
|
+
}, SLOT_KINDS = { textProfile: "text", surfaceProfile: "surface", frameProfile: "frame", spacingProfile: "spacing", focusProfile: "focus", visualProfile: "visual" }, NOTED = {
|
|
21
|
+
frame: ["minBlockSize", "blockSize", "inlineSize", "minInlineSize", "maxInlineSize", "padding", "paddingInline", "paddingBlock", "paddingInlineStart", "paddingInlineEnd", "minimumBlockInset", "borderWidth", "radius"],
|
|
22
|
+
text: ["fontSize", "lineHeight", "fontWeight"],
|
|
23
|
+
visual: ["size"],
|
|
24
|
+
spacing: ["contentGap"],
|
|
25
|
+
surface: ["background", "color", "borderColor"],
|
|
26
|
+
focus: ["width", "offset", "color"]
|
|
27
|
+
};
|
|
28
|
+
export function profileApplied(profile, selected, tokenValue) {
|
|
29
|
+
const sources = profile.kind === "composite" ? profile.fields.flatMap((field) => Object.hasOwn(SLOT_KINDS, field.field) && field.profile !== null ? [selected(field.profile)].flatMap((item) => item === void 0 ? [] : [item]) : []) : [profile], of = (kind) => sources.find((source) => source.kind === kind), stated = (kind, field) => of(kind)?.fields.find((item) => item.field === field)?.value, declarations = (kind) => {
|
|
30
|
+
const properties = APPLIED_PROPERTIES[kind] ?? {};
|
|
31
|
+
return (of(kind)?.fields ?? []).flatMap((field) => Object.hasOwn(properties, field.field) ? [[properties[field.field] ?? "", field.value]] : []);
|
|
32
|
+
}, css = (value) => /^--[\w-]+$/.test(value) ? `var(${value})` : value, frame = declarations("frame"), surface = declarations("surface"), shadow = stated("surface", "shapeShadow") ?? stated("surface", "groupShadow"), filter = [...stated("surface", "brightness") === void 0 ? [] : [`brightness(${css(stated("surface", "brightness") ?? "")})`], ...stated("surface", "blur") === void 0 ? [] : [`blur(${css(stated("surface", "blur") ?? "")})`], ...shadow === void 0 ? [] : [`drop-shadow(${css(shadow)})`]], backdrop = [...stated("surface", "backdropBlur") === void 0 ? [] : [`blur(${css(stated("surface", "backdropBlur") ?? "")})`], ...stated("surface", "backdropSaturate") === void 0 ? [] : [`saturate(${css(stated("surface", "backdropSaturate") ?? "")})`]];
|
|
33
|
+
if (filter.length > 0)
|
|
34
|
+
surface.push(["filter", filter.join(" ")]);
|
|
35
|
+
if (backdrop.length > 0)
|
|
36
|
+
surface.push(["backdrop-filter", backdrop.join(" ")]);
|
|
37
|
+
if (frame.some(([property]) => property === "border-width") && !frame.some(([property]) => property === "border-style"))
|
|
38
|
+
frame.push(["border-style", "solid"]);
|
|
39
|
+
const focus = profile.kind === "focus" ? [...declarations("focus"), ["outline-style", "solid"]] : [], text = declarations("text"), gap = declarations("spacing"), glyph = stated("visual", "size") ?? null, inline = stated("frame", "inlineSize") ?? null, block = stated("frame", "blockSize") ?? null, resolved = (value) => {
|
|
40
|
+
const token = /--[\w-]+/.exec(value)?.[0];
|
|
41
|
+
return token === void 0 ? value : tokenValue(token) ?? "";
|
|
42
|
+
}, relative = [inline, block].some((value) => value !== null && resolved(value).includes("%")), extent = inline === null && block === null ? null : { inline: inline === null ? null : css(inline), block: block === null ? null : css(block), relative }, controlFrame = of("frame") !== void 0 && (stated("frame", "minBlockSize") !== void 0 || stated("frame", "minimumBlockInset") !== void 0) && ["paddingInline", "paddingInlineStart", "padding"].some((field) => stated("frame", field) !== void 0), boxed = frame.length > 0 || surface.length > 0 || extent !== null, lockup = !boxed && glyph !== null && text.length > 0, gaps = (of("spacing")?.fields ?? []).filter((field) => field.profile === null).map((field) => ({ field: field.field, value: css(field.value) })), shape = profile.kind === "focus" ? "focus" : controlFrame && (of("text") !== void 0 || glyph !== null) ? "control" : boxed ? "box" : lockup ? "text" : gap.length > 0 ? "gap" : text.length > 0 ? "text" : glyph !== null ? "visual" : null;
|
|
43
|
+
if (shape === null)
|
|
44
|
+
return null;
|
|
45
|
+
const inset = frame.some(([property]) => property.startsWith("padding")), sized = extent !== null && !(extent.relative && inset), content = shape === "control" || lockup ? "label" : sized && gap.length === 0 && text.length === 0 ? "empty" : gap.length > 0 ? "blocks" : text.length > 0 ? "text" : frame.length > 0 || extent !== null ? "block" : "label", notes = sources.filter((source) => source.kind !== "focus").flatMap((source) => (NOTED[source.kind] ?? []).flatMap((field) => {
|
|
46
|
+
const value = source.fields.find((item) => item.field === field)?.value;
|
|
47
|
+
return value === void 0 ? [] : [{ kind: source.kind, field, value: value.replace(/^var\(\s*(--[\w-]+)\s*\)$/, "$1") }];
|
|
48
|
+
})), values = (list) => list.map(([property, value]) => [property, css(value)]);
|
|
49
|
+
return {
|
|
50
|
+
shape,
|
|
51
|
+
content,
|
|
52
|
+
outlined: shape !== "control" && (surface.length > 0 || focus.length > 0),
|
|
53
|
+
box: values([...frame, ...surface, ...shape === "control" || lockup || content === "blocks" ? gap : [], ...focus]),
|
|
54
|
+
text: values(text),
|
|
55
|
+
glyph: glyph === null ? null : css(glyph),
|
|
56
|
+
extent,
|
|
57
|
+
gaps,
|
|
58
|
+
notes: profile.kind === "composite" ? notes : []
|
|
59
|
+
};
|
|
60
|
+
}
|
|
14
61
|
export function profileViewFacts(foundation) {
|
|
15
62
|
const fields = (entries) => Object.entries(entries).sort(([a], [b]) => byName(a, b)).map(([field, { value, origin }]) => {
|
|
16
63
|
const tokens = references(value).map((name) => ({ name, role: foundation.tokens.get(name)?.role ?? null })), [only] = tokens, role = tokens.length === 1 ? only?.role ?? null : null, stated = origin.includes(".") ? origin.slice(0, origin.lastIndexOf(".")) : origin;
|
|
@@ -26,7 +73,11 @@ export function profileViewFacts(foundation) {
|
|
|
26
73
|
name: choice,
|
|
27
74
|
default: chosen,
|
|
28
75
|
options: Object.entries(options).map(([option, entries]) => ({ name: option, fields: fields(entries) }))
|
|
29
|
-
}))
|
|
76
|
+
})),
|
|
77
|
+
steps: Object.entries(summary.clauses).flatMap(([key, values]) => {
|
|
78
|
+
const at = /^ads-step at-(\d+)$/.exec(key)?.[1];
|
|
79
|
+
return at === void 0 ? [] : [{ at: Number(at), fields: fields(Object.fromEntries(Object.entries(values).map(([field, value]) => [field, { value, origin: name }]))) }];
|
|
80
|
+
}).sort((a, b) => a.at - b.at)
|
|
30
81
|
})), users = new Map, use = (used, user) => void (users.get(used) ?? users.set(used, new Set).get(used))?.add(user);
|
|
31
82
|
for (const profile of profiles) {
|
|
32
83
|
for (const input of profile.inputs)
|
|
@@ -35,7 +86,7 @@ export function profileViewFacts(foundation) {
|
|
|
35
86
|
if (field.profile !== null)
|
|
36
87
|
use(field.profile, profile.name);
|
|
37
88
|
}
|
|
38
|
-
const sorted = profiles.map((profile) => ({ ...profile, usedBy: [...users.get(profile.name) ?? []].sort(byName) })).sort((a, b) => byKind(a.kind, b.kind) || byName(a.name, b.name)), counts = new Map;
|
|
89
|
+
const named = new Map(profiles.map((profile) => [profile.name, profile])), [base] = tokenValueContexts(foundation), tokenValue = (name) => base?.values.get(name), sorted = profiles.map((profile) => ({ ...profile, usedBy: [...users.get(profile.name) ?? []].sort(byName), applied: profileApplied(profile, (name) => named.get(name), tokenValue) })).sort((a, b) => byKind(a.kind, b.kind) || byName(a.name, b.name)), counts = new Map;
|
|
39
90
|
for (const profile of sorted)
|
|
40
91
|
counts.set(profile.kind, (counts.get(profile.kind) ?? 0) + 1);
|
|
41
92
|
return { kinds: [...counts].map(([kind, count]) => ({ kind, count })), profiles: sorted };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/** A prose element's name in a recipe, with the tags it selects. */
|
|
2
|
+
export declare const PROSE_ELEMENTS: {
|
|
3
|
+
readonly paragraph: readonly ["p"];
|
|
4
|
+
readonly heading1: readonly ["h1"];
|
|
5
|
+
readonly heading2: readonly ["h2"];
|
|
6
|
+
readonly heading3: readonly ["h3"];
|
|
7
|
+
readonly heading4: readonly ["h4"];
|
|
8
|
+
readonly heading5: readonly ["h5"];
|
|
9
|
+
readonly heading6: readonly ["h6"];
|
|
10
|
+
readonly list: readonly ["ul", "ol"];
|
|
11
|
+
readonly item: readonly ["li"];
|
|
12
|
+
readonly quote: readonly ["blockquote"];
|
|
13
|
+
readonly rule: readonly ["hr"];
|
|
14
|
+
readonly pre: readonly ["pre"];
|
|
15
|
+
readonly table: readonly ["table"];
|
|
16
|
+
readonly headerCell: readonly ["th"];
|
|
17
|
+
readonly cell: readonly ["td"];
|
|
18
|
+
readonly figure: readonly ["figure"];
|
|
19
|
+
readonly caption: readonly ["figcaption"];
|
|
20
|
+
readonly media: readonly ["img", "video", "iframe"];
|
|
21
|
+
readonly descriptions: readonly ["dl"];
|
|
22
|
+
readonly term: readonly ["dt"];
|
|
23
|
+
readonly definition: readonly ["dd"];
|
|
24
|
+
readonly link: readonly ["a"];
|
|
25
|
+
readonly strong: readonly ["strong", "b"];
|
|
26
|
+
readonly emphasis: readonly ["em", "i"];
|
|
27
|
+
readonly deleted: readonly ["del", "s"];
|
|
28
|
+
readonly code: readonly ["code"];
|
|
29
|
+
readonly sub: readonly ["sub"];
|
|
30
|
+
readonly sup: readonly ["sup"];
|
|
31
|
+
readonly kbd: readonly ["kbd"];
|
|
32
|
+
readonly mark: readonly ["mark"];
|
|
33
|
+
};
|
|
34
|
+
export type ProseElementName = keyof typeof PROSE_ELEMENTS;
|
|
35
|
+
export declare const PROSE_ELEMENT_NAMES: readonly ProseElementName[];
|
|
36
|
+
/** Every tag prose styles, with the element it belongs to. */
|
|
37
|
+
export declare const PROSE_TAGS: ReadonlyMap<string, ProseElementName>;
|
|
38
|
+
/**
|
|
39
|
+
* Tags that carry no design of their own but are part of content: a table's row groups and rows belong
|
|
40
|
+
* to its `table` element, and a line break belongs to any prose. The markup checks accept them as
|
|
41
|
+
* content; no rule is written for them.
|
|
42
|
+
*/
|
|
43
|
+
export declare const PROSE_STRUCTURE: ReadonlyMap<string, ProseElementName | null>;
|
|
44
|
+
/** Whether a tag can be content of a prose owner: a styled tag or a structural one. */
|
|
45
|
+
export declare const isProseTag: (tag: string) => boolean;
|
|
46
|
+
/** The content tags a recipe that declares `names` accepts: their own tags, and the structure that comes with them. */
|
|
47
|
+
export declare function proseContentTags(names: Iterable<ProseElementName>): ReadonlySet<string>;
|
|
48
|
+
/** Elements that stand as blocks in the flow: they take the rhythm before them. */
|
|
49
|
+
export declare const PROSE_BLOCKS: readonly ProseElementName[];
|
|
50
|
+
/** The elements whose text can sit directly inside `container`: what its background must carry. */
|
|
51
|
+
export declare function proseContents(container: ProseElementName): readonly ProseElementName[];
|
|
52
|
+
/** The selector of one tag inside the prose root: plain markup only. */
|
|
53
|
+
export declare const proseSelector: (tag: string) => string;
|
|
54
|
+
/** `&:hover` on an element's selector: the state is the element's own. */
|
|
55
|
+
export declare const proseState: (selector: string, condition: string) => string;
|
|
56
|
+
/** The first plain element of the root and of a plain container: its start margin is cancelled. */
|
|
57
|
+
export declare const PROSE_FIRST: readonly string[];
|
|
58
|
+
/**
|
|
59
|
+
* A component placed directly in the prose root (it has a class) is a block of the flow like any
|
|
60
|
+
* other: it takes the rhythm before it, unless it comes first. Space between siblings is the
|
|
61
|
+
* container's to give; the component's own design is untouched. A component inside a paragraph or
|
|
62
|
+
* another plain element is inline content and is left alone.
|
|
63
|
+
*/
|
|
64
|
+
export declare const PROSE_COMPONENT = "& > :not(:first-child)[class]";
|
|
65
|
+
type Values = Readonly<Record<string, string>>;
|
|
66
|
+
/**
|
|
67
|
+
* The browser defaults ADS replaces on an element, whatever the recipe declares for it: margins
|
|
68
|
+
* (the rhythm owns the space between blocks), a quote's and a figure's indent, a rule's inset border,
|
|
69
|
+
* media wider than its column, a table's doubled borders.
|
|
70
|
+
*/
|
|
71
|
+
export declare function proseDefaults(name: ProseElementName): Values;
|
|
72
|
+
/**
|
|
73
|
+
* The emitted record of a design system's prose owners, beside its public entry: exported name → the
|
|
74
|
+
* plain tags its recipe declares. The design-use check of application source reads it, because an
|
|
75
|
+
* emitted owner no longer carries its recipe.
|
|
76
|
+
*/
|
|
77
|
+
export declare const PROSE_MANIFEST = "ads-prose.json";
|
|
78
|
+
export declare const proseManifestText: (owners: ReadonlyMap<string, ReadonlySet<string>>) => string;
|
|
79
|
+
/** The owners a manifest text records; entries that are not a list of prose tags are dropped. */
|
|
80
|
+
export declare function parseProseManifest(text: string): ReadonlyMap<string, ReadonlySet<string>>;
|
|
81
|
+
export {};
|