@wildo-ai/saas-frontend-lib 1.1.13 → 1.1.15
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/dist/esm/components/ai-elements/meta/agent-wrappers.d.ts +1 -0
- package/dist/esm/components/ai-elements/meta/agent-wrappers.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/meta/agent-wrappers.js.map +1 -1
- package/dist/esm/components/compliance/EmbeddedSigningFrame.d.ts +38 -0
- package/dist/esm/components/compliance/EmbeddedSigningFrame.d.ts.map +1 -0
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js +106 -0
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js.map +1 -0
- package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.js +17 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.js.map +1 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js +22 -0
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.d.ts.map +1 -1
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js +5 -2
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js.map +1 -1
- package/dist/esm/components/flows-actors/agent-config.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/agent-config.labels.js +2 -0
- package/dist/esm/components/flows-actors/agent-config.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.d.ts +7 -1
- package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.js +22 -5
- package/dist/esm/components/flows-actors/approval.js.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js +20 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
- package/dist/esm/components/form/chromes/FormFieldChrome.js +1 -1
- package/dist/esm/components/form/chromes/FormFieldChrome.js.map +1 -1
- package/dist/esm/components/form/chromes/field-control-aria.d.ts +8 -1
- package/dist/esm/components/form/chromes/field-control-aria.d.ts.map +1 -1
- package/dist/esm/components/form/chromes/field-control-aria.js +19 -2
- package/dist/esm/components/form/chromes/field-control-aria.js.map +1 -1
- package/dist/esm/components/form/validation-errors/validate-field-url.frontend.d.ts +5 -0
- package/dist/esm/components/form/validation-errors/validate-field-url.frontend.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/validate-field-url.frontend.js +6 -2
- package/dist/esm/components/form/validation-errors/validate-field-url.frontend.js.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionBody_Table.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionBody_Table.js +8 -1
- package/dist/esm/components/resources/ResourceCollectionBody_Table.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js +2 -2
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js +2 -2
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
- package/dist/esm/components/resources/ResourceListItemRenderer.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceListItemRenderer.js +6 -1
- package/dist/esm/components/resources/ResourceListItemRenderer.js.map +1 -1
- package/dist/esm/components/resources/skeleton/DisplayLayout.js +2 -2
- package/dist/esm/components/resources/skeleton/DisplayLayout.js.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.d.ts.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js +71 -16
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js.map +1 -1
- package/dist/esm/components/sections/surface.d.ts +12 -0
- package/dist/esm/components/sections/surface.d.ts.map +1 -1
- package/dist/esm/components/sections/surface.js +14 -0
- package/dist/esm/components/sections/surface.js.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.d.ts.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.js +3 -2
- package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.js.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts +15 -0
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js +29 -0
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/use-shell-motion.d.ts.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/use-shell-motion.js +2 -2
- package/dist/esm/core/app-shell/shell-motion/use-shell-motion.js.map +1 -1
- package/dist/esm/core/branding/useBrandPresentation.d.ts.map +1 -1
- package/dist/esm/core/branding/useBrandPresentation.js +17 -6
- package/dist/esm/core/branding/useBrandPresentation.js.map +1 -1
- package/dist/esm/core/events/events.frontend.schemas.d.ts +40 -0
- package/dist/esm/core/events/events.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/events/events.frontend.schemas.js +24 -1
- package/dist/esm/core/events/events.frontend.schemas.js.map +1 -1
- package/dist/esm/core/execution/useExecutionResourceOperationContextBuilder.d.ts.map +1 -1
- package/dist/esm/core/execution/useExecutionResourceOperationContextBuilder.js +11 -1
- package/dist/esm/core/execution/useExecutionResourceOperationContextBuilder.js.map +1 -1
- package/dist/esm/core/i18n/I18nContext.d.ts.map +1 -1
- package/dist/esm/core/i18n/I18nContext.js +8 -2
- package/dist/esm/core/i18n/I18nContext.js.map +1 -1
- package/dist/esm/core/i18n/component-label-resolution.utils.d.ts.map +1 -1
- package/dist/esm/core/i18n/component-label-resolution.utils.js +6 -1
- package/dist/esm/core/i18n/component-label-resolution.utils.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts +0 -15
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.js +102 -5
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js +12 -3
- package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContext.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContext.js +60 -17
- package/dist/esm/core/navigation/NavigationContext.js.map +1 -1
- package/dist/esm/core/navigation/launcher-resolution.d.ts +29 -0
- package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-resolution.js +31 -0
- package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
- package/dist/esm/core/navigation/navigation-controller-internals.d.ts +48 -0
- package/dist/esm/core/navigation/navigation-controller-internals.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation-controller-internals.js +56 -3
- package/dist/esm/core/navigation/navigation-controller-internals.js.map +1 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.d.ts.map +1 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.js +30 -2
- package/dist/esm/core/navigation/useNavigationRouterSync.js.map +1 -1
- package/dist/esm/core/resources/resource-read-cache.frontend.service.d.ts +6 -1
- package/dist/esm/core/resources/resource-read-cache.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/resources/resource-read-cache.frontend.service.js +11 -1
- package/dist/esm/core/resources/resource-read-cache.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/route-parent-relocation.frontend.utils.d.ts +44 -0
- package/dist/esm/core/resources/route-parent-relocation.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/resources/route-parent-relocation.frontend.utils.js +63 -0
- package/dist/esm/core/resources/route-parent-relocation.frontend.utils.js.map +1 -0
- package/dist/esm/core/resources/useOperationDirectExecution.d.ts.map +1 -1
- package/dist/esm/core/resources/useOperationDirectExecution.js +45 -6
- package/dist/esm/core/resources/useOperationDirectExecution.js.map +1 -1
- package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
- package/dist/esm/core/runtime/AppRouter.js +18 -1
- package/dist/esm/core/runtime/AppRouter.js.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.js +12 -3
- package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
- package/dist/esm/core/security/UserOrgsContext.d.ts +6 -1
- package/dist/esm/core/security/UserOrgsContext.d.ts.map +1 -1
- package/dist/esm/core/security/UserOrgsContext.js +87 -10
- package/dist/esm/core/security/UserOrgsContext.js.map +1 -1
- package/dist/esm/core/security/consent-gate.frontend.utils.d.ts +17 -5
- package/dist/esm/core/security/consent-gate.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/security/consent-gate.frontend.utils.js +16 -7
- package/dist/esm/core/security/consent-gate.frontend.utils.js.map +1 -1
- package/dist/esm/core/security/useConsentGateBehavior.js +1 -1
- package/dist/esm/core/security/useConsentGateBehavior.js.map +1 -1
- package/dist/esm/core/security/useGrantedConsentPurposes.js +1 -1
- package/dist/esm/core/security/useGrantedConsentPurposes.js.map +1 -1
- package/dist/esm/core/ui/inner-control-activation.utils.d.ts +16 -0
- package/dist/esm/core/ui/inner-control-activation.utils.d.ts.map +1 -0
- package/dist/esm/core/ui/inner-control-activation.utils.js +44 -0
- package/dist/esm/core/ui/inner-control-activation.utils.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.js","sourceRoot":"","sources":["../../../../src/components/sections/surface.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EACL,kCAAkC,EAClC,cAAc,EACd,UAAU,GAIX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;AACpG,OAAO,EACL,gCAAgC,EAChC,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAwD/G,MAAM,8BAA8B,GAAG,mJAAmJ,CAAC;AAC3L,MAAM,MAAM,GAAG,qBAAqB,CAAC,SAAS,EAAE,CAAC;AAEjD,SAAS,qBAAqB,CAAC,KAAyB;IACtD,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,MAAM;YACT,OAAO,KAAK,CAAC;QACf,KAAK,OAAO;YACV,OAAO,iBAAiB,CAAC;QAC3B,KAAK,SAAS;YACZ,OAAO,wBAAwB,CAAC;QAClC,KAAK,MAAM;YACT,OAAO,gBAAgB,CAAC;QAC1B,KAAK,WAAW;YACd,OAAO,qBAAqB,CAAC;QAC/B;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED,SAAS,iBA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,CAAC;gBAC7D,CAAC,CAAC,SAAS;YACb,0CAA0C,EAAE,kBAAkB;gBAC5D,CAAC,CAAC,+BAA+B,CAAC,MAAM,CAAC,QAAQ,EAAE,eAAe,CAAC;gBACnE,CAAC,CAAC,SAAS;YACb,GAAG,KAAK;SACc,KACpB,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAa,CAAC,WAAW,GAAG,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAAwD,SAAS,aAAa,CACzH,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EACvB,GAAG;IAEH,OAAO,CACL,cACE,GAAG,EAAE,GAAG,eACE,gBAAgB,EAC1B,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KACpB,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAa,CAAC,WAAW,GAAG,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE;IAChD,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,aAAa;CACtB,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n FRAMEWORK_DEFAULT_SURFACE_POLICIES,\n SurfaceVariant,\n UIBehavior,\n type DeepPartialSurfacePolicy,\n type MaterialProfileRole,\n type SurfacePolicy,\n} from '@wildo-ai/presets-components-models';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\nimport {\n computeSurfacePolicyContextValue,\n mergeSurfacePolicy,\n SurfacePolicyContext,\n useSurfacePolicy,\n} from '~wildo-frontend-lib/core/ui/SurfacePolicyContext';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { useMaterialRuntime } from '~wildo-frontend-lib/core/ui/material-runtime';\nimport { SurfaceErrorBoundary } from '~wildo-frontend-lib/core/ui/SurfaceErrorBoundary';\nimport { useSurfaceBodyScrollLock, useSurfaceFocusTrap } from '~wildo-frontend-lib/core/ui/surface-a11y.utils';\n\ntype SurfaceStyle = React.CSSProperties & Record<`--surface-policy-${string}`, string | undefined>;\n\nexport interface SurfaceProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Semantic container role. Surface always composes the active theme's\n * matching `UIBehavior.SURFACE` recipe onto the rendered node; callers only\n * supply local structural classes and must not repeat the theme lookup.\n */\n variant?: SurfaceVariant;\n /**\n * Selects a material profile independently from the semantic surface recipe.\n * Use this when a component's behavior/policy remains one SurfaceVariant but\n * its functional role requires different optics (for example, a raised\n * navigation toolbar versus a raised menu). Theme recipes remain the default.\n */\n materialRoleOverride?: MaterialProfileRole;\n policyOverride?: DeepPartialSurfacePolicy;\n asChild?: boolean;\n /**\n * Suppresses policy-owned CSS variables and selector attributes while\n * retaining the resolved policy in React context for child slots. This does\n * not suppress the visual theme recipe: policy and appearance are separate\n * channels, and the semantic `variant` remains visually authoritative.\n */\n emitPolicyVars?: boolean;\n /**\n * Marks this surface as a modal root for policy slots such as\n * `focusTrap: 'when-modal'` and `scrollContainment: 'lock-body'`.\n */\n modal?: boolean;\n /**\n * Set when the host primitive already owns focus trapping / body scroll lock\n * AND the accessible name/description (for example Radix Dialog Content, which\n * wires `aria-labelledby` from its own `Dialog.Title`). Surface still emits\n * policy context, but contributes NO a11y attribute of its own — see the\n * `a11yAttributes` note below, where passing an `undefined` key was deleting\n * the host's accessible name (#632) — and skips duplicate runtime side effects\n * (focus trap, body scroll lock) plus the `from-header` label-policing\n * warning: the host owns labelling, so a `Surface.Header` is never registered\n * here and the warning would be a guaranteed false positive on every\n * host-managed overlay.\n */\n a11yManagedByHost?: boolean;\n /**\n * The component that names this surface's host, for an `asChild` host whose title is part of its content: a\n * Radix or vaul `Title`. A crash replaces the content, title included, so without this the host points its\n * `aria-labelledby` at nothing and a crashed dialog has no accessible name (#3329). The fallback renders its own\n * heading through this component, visually hidden, because only the primitive's title takes the id the host names.\n */\n errorFallbackTitleAs?: React.ElementType;\n 'data-slot'?: string;\n 'data-surface'?: string;\n}\n\nconst POLICY_DRIVEN_UTILITY_PREFIXES = /(?:^|\\s)(?:p|pt|pr|pb|pl|pe|ps|px|py|gap|gap-x|gap-y|max-h|min-h|max-w|overflow|z|flex|grid|flex-col|flex-row|flex-col-reverse|flex-row-reverse)-/;\nconst logger = LoggerFrontendService.getLogger();\n\nfunction paddingTierToCssValue(value: string | undefined): string | undefined {\n switch (value) {\n case 'none':\n return '0px';\n case 'field':\n return 'var(--sp-field)';\n case 'card-sm':\n return 'var(--spacing-card-sm)';\n case 'card':\n return 'var(--sp-card)';\n case 'container':\n return 'var(--sp-container)';\n default:\n return undefined;\n }\n}\n\nfunction gapTierToCssValue(value: string | undefined): string | undefined {\n switch (value) {\n case 'none':\n return '0px';\n case 'item':\n return 'var(--sp-item)';\n case 'field':\n return 'var(--sp-field)';\n case 'section':\n return 'var(--sp-section)';\n case 'lane':\n return 'var(--sp-region)';\n default:\n return undefined;\n }\n}\n\nfunction textWrapToCssValue(value: SurfacePolicy['content'] extends infer Content ? Content extends { wrapStrategy?: infer Wrap } ? Wrap : never : never): string | undefined {\n switch (value) {\n case 'nowrap':\n return 'nowrap';\n case 'balance':\n return 'balance';\n case 'pretty':\n return 'pretty';\n case 'wrap':\n return 'wrap';\n default:\n return undefined;\n }\n}\n\nfunction numericAlignmentToCssValue(value: SurfacePolicy['content'] extends infer Content ? Content extends { numericAlignment?: infer Numeric } ? Numeric : never : never): string | undefined {\n switch (value) {\n case 'tabular':\n return 'tabular-nums';\n case 'lining':\n return 'lining-nums';\n case 'inherit':\n return 'inherit';\n default:\n return undefined;\n }\n}\n\nfunction overlongTokenStrategyToCssValue(value: SurfacePolicy['content'] extends infer Content ? Content extends { overlongTokenStrategy?: infer Strategy } ? Strategy : never : never): string | undefined {\n switch (value) {\n case 'break-word':\n // CSS `overflow-wrap: break-word` (the framework default): emergency\n // character-boundary breaking when a token would otherwise overflow,\n // WITHOUT feeding those break opportunities into min-content sizing.\n // Catches URLs, dev-time i18n keys, hex hashes, file paths, error\n // messages with embedded paths.\n return 'break-word';\n case 'break-anywhere':\n // CSS `overflow-wrap: anywhere` — same emergency breaking as\n // `break-word`, but the break opportunities ALSO shrink the surface's\n // intrinsic min-content width to one character (which collapses\n // intrinsically-sized layouts like stat tiles to one letter per line).\n // Per-surface opt-in only; see `OverlongTokenStrategy` JSDoc.\n return 'anywhere';\n case 'overflow':\n // CSS `overflow-wrap: normal` = browser default. Long tokens\n // visibly overflow the surface. Useful for code blocks that\n // intentionally scroll horizontally, or any surface where the\n // design specifically calls for visible overflow.\n return 'normal';\n case 'inherit':\n return 'inherit';\n default:\n return undefined;\n }\n}\n\nfunction stackingTierToCssValue(value: SurfacePolicy['stacking'] extends infer Stacking ? Stacking extends { stackingTier?: infer Tier } ? Tier : never : never): string | undefined {\n switch (value) {\n case 'content':\n return 'var(--z-content)';\n case 'overlay':\n return 'var(--z-overlay)';\n case 'transient':\n return 'var(--z-transient)';\n case 'guidance':\n return 'var(--z-guidance)';\n case 'critical':\n return 'var(--z-critical)';\n default:\n return undefined;\n }\n}\n\nfunction actionAlignmentToCssValue(value: SurfacePolicy['geometry'] extends infer Geometry ? Geometry extends { actionAlignment?: infer Alignment } ? Alignment : never : never): string | undefined {\n switch (value) {\n case 'stack':\n return 'column';\n case 'row':\n case 'inherit':\n return value;\n case 'column-reverse-on-mobile':\n return 'row';\n default:\n return undefined;\n }\n}\n\nfunction actionAlignmentToMobileCssValue(value: SurfacePolicy['geometry'] extends infer Geometry ? Geometry extends { actionAlignment?: infer Alignment } ? Alignment : never : never): string | undefined {\n switch (value) {\n case 'column-reverse-on-mobile':\n return 'column-reverse';\n case 'stack':\n return 'column';\n case 'row':\n case 'inherit':\n return value;\n default:\n return undefined;\n }\n}\n\n/**\n * The CSS `max-inline-size` a {@link ResponsiveMaxWidth} tier resolves to.\n *\n * Exported so the two LAYOUT ROOTS that cap their own content — `DisplayLayout` and `FormLayout` —\n * resolve their measure through the same vocabulary a Surface does, instead of hand-writing the tier's\n * value. They used to carry the literal `max-w-[var(--measure-max-width,42rem)]`, which is byte-for-byte\n * what the `'measure'` tier returns here: the same decision, spelled two ways, with only one of the two\n * spellings reachable by a host that wanted to change it.\n */\nexport function responsiveMaxWidthToCssValue(value: SurfacePolicy['geometry'] extends infer Geometry ? Geometry extends { responsiveMaxWidth?: infer MaxWidth } ? MaxWidth : never : never): string | undefined {\n switch (value) {\n case 'full':\n return '100%';\n case 'sm':\n return '24rem';\n case 'md':\n return '28rem';\n case 'lg':\n return '32rem';\n case 'xl':\n return '36rem';\n case 'measure':\n // Reading-measure cap for single-column form/field stacks (T4c).\n // Themeable via `--measure-max-width`; defaults to 42rem (~672px).\n return 'var(--measure-max-width, 42rem)';\n case 'centered-readable':\n return '72ch';\n case 'content':\n // Page-content cap for primary content areas. Themeable via the\n // `--content-max-width` CSS variable; defaults to 80rem (~1280px).\n return 'var(--content-max-width, 80rem)';\n case 'none':\n default:\n // `none` is both the explicit tier AND the neutral, for the same reason the\n // margin companion below returns `0px` rather than `undefined`: policy vars\n // inherit, so an omitted cap adopts the nearest ancestor surface's cap. Every\n // tier of the union already returned explicitly, so folding the default in is\n // inert for every reachable value and only closes the inheritance hole.\n return 'none';\n }\n}\n\n/**\n * Centering companion to {@link responsiveMaxWidthToCssValue}: a surface capped\n * to a finite max inline-size is centered in its container via\n * `margin-inline: auto`. `full`/`none`/unset surfaces fill their container and\n * are explicitly RESET to `0px`. Applied by the Tailwind base layer at ≥ 640px\n * alongside the inline-size cap, so the `centered-readable`/`content` tiers\n * actually center (the cap alone would leave the surface flush to the\n * inline-start edge).\n *\n * The uncapped tiers MUST emit `0px` rather than `undefined`. Policy vars are\n * CSS custom properties, so they INHERIT: an omitted value is not \"no\n * centering\", it is \"whatever the nearest ancestor surface asked for\". Since\n * `OVERLAY` is capped (`lg`) and therefore publishes `auto`, every uncapped\n * surface nested inside a dialog silently inherited `margin-inline: auto` — and\n * an auto cross-axis margin in a flex column ALSO suppresses the item's\n * stretch, so those surfaces shrink-wrapped to their content and drifted to the\n * centre. In the settings hub that turned a column of cards into a ragged\n * staircase, each card as wide as its longest sentence. The inline-size\n * companion never showed the defect because its uncapped tier emits an explicit\n * `'none'`; this one returned `undefined` and inherited instead. Same neutral\n * -emission discipline as `--surface-policy-safe-area`, which publishes `0px`\n * rather than omitting itself.\n */\nfunction responsiveMaxWidthToMarginCssValue(value: SurfacePolicy['geometry'] extends infer Geometry ? Geometry extends { responsiveMaxWidth?: infer MaxWidth } ? MaxWidth : never : never): string | undefined {\n switch (value) {\n case 'sm':\n case 'md':\n case 'lg':\n case 'xl':\n case 'measure':\n case 'centered-readable':\n case 'content':\n return 'auto';\n case 'full':\n case 'none':\n default:\n // Explicit reset, never `undefined` — see the note above on inheritance.\n return '0px';\n }\n}\n\nfunction embeddedTablePaddingToCssValue(value: SurfacePolicy['composition'] extends infer Composition ? Composition extends { embeddedTablePadding?: infer Padding } ? Padding : never : never): string | undefined {\n switch (value) {\n case 'strip':\n return '0px';\n case 'preserve':\n default:\n // `preserve` is also the neutral: \"no opinion\" means keep the surface's own\n // inline padding. The Tailwind rule spells the same intent as a fallback\n // (`var(--…-embedded-table-padding-inline, var(--…-padding-inline))`), but a\n // fallback only fires when the var is UNSET — an inherited value that IS set\n // wins over it, so a table-bearing surface nested inside a `strip` ancestor\n // would have inherited `0px`. Emitting it here is what actually shadows that.\n return 'var(--surface-policy-padding-inline)';\n }\n}\n\nfunction framingModeToAttribute(value: SurfacePolicy['nesting'] extends infer Nesting ? Nesting extends { framingMode?: infer Framing } ? Framing : never : never): string | undefined {\n switch (value) {\n case 'always':\n case 'when-orphan':\n case 'never':\n return value;\n default:\n return undefined;\n }\n}\n\nfunction nestedRadiusStrategyToAttribute(value: SurfacePolicy['nesting'] extends infer Nesting ? Nesting extends { nestedRadiusStrategy?: infer Strategy } ? Strategy : never : never): string | undefined {\n switch (value) {\n case 'inherit':\n case 'one-tier-tighter':\n case 'fixed':\n return value;\n default:\n return undefined;\n }\n}\n\nfunction firstChildEdgeStrategyToAttribute(value: SurfacePolicy['nesting'] extends infer Nesting ? Nesting extends { firstChildEdgeStrategy?: infer Strategy } ? Strategy : never : never): string | undefined {\n switch (value) {\n case 'collapse':\n case 'preserve':\n return value;\n default:\n return undefined;\n }\n}\n\nfunction dividerStrategyToAttribute(value: SurfacePolicy['nesting'] extends infer Nesting ? Nesting extends { dividerStrategy?: infer Strategy } ? Strategy : never : never): string | undefined {\n switch (value) {\n case 'border':\n case 'gap':\n case 'rule':\n case 'none':\n return value;\n default:\n return undefined;\n }\n}\n\nfunction nestedRadiusToCssValue(\n strategy: SurfacePolicy['nesting'] extends infer Nesting ? Nesting extends { nestedRadiusStrategy?: infer Strategy } ? Strategy : never : never,\n isNestedInFramedAncestor: boolean,\n): string | undefined {\n if (!isNestedInFramedAncestor) {\n return undefined;\n }\n\n switch (strategy) {\n case 'inherit':\n return 'inherit';\n case 'one-tier-tighter':\n return 'var(--surface-nested-radius-one-tier-tighter, var(--radius-lg, 0.5rem))';\n case 'fixed':\n default:\n return undefined;\n }\n}\n\nfunction selectableSemanticsToAttribute(value: SurfacePolicy['interactiveState'] extends infer InteractiveState ? InteractiveState extends { selectableSemantics?: infer Semantics } ? Semantics : never : never): string | undefined {\n switch (value) {\n case 'wrap-children':\n case 'self-selectable':\n case 'forbidden':\n return value;\n default:\n return undefined;\n }\n}\n\nfunction gestureOptInToAttribute(value: SurfacePolicy['interactiveState'] extends infer InteractiveState ? InteractiveState extends { gestureOptIn?: infer OptIn } ? OptIn : never : never): string | undefined {\n switch (value) {\n case 'self':\n case 'children':\n case 'none':\n return value;\n default:\n return undefined;\n }\n}\n\nfunction landmarkRoleToAttribute(value: SurfacePolicy['a11y'] extends infer A11y ? A11y extends { landmarkRole?: infer Role } ? Role : never : never): React.AriaRole | undefined {\n switch (value) {\n case 'region':\n case 'dialog':\n case 'alertdialog':\n case 'complementary':\n case 'navigation':\n case 'status':\n case 'main':\n return value;\n case 'none':\n case 'reset':\n default:\n return undefined;\n }\n}\n\nfunction shouldActivateStackLayout(gap: string | undefined): boolean {\n return Boolean(gap && gap !== 'none');\n}\n\n/**\n * Stack-layout channel for `display` / `flex-direction`, on both the surface\n * root (`--surface-policy-display`) and its slots (`--surface-policy-slot-display`).\n *\n * The NON-stacking branch MUST return a concrete value rather than `undefined`,\n * for two independent reasons — the second one shipped as a live defect:\n *\n * 1. Policy vars are CSS custom properties, so they INHERIT. An omitted value is\n * not \"no opinion\", it is \"adopt the nearest ancestor surface's opinion\". A\n * non-stacking surface nested inside a stacking one therefore picked up\n * `display: flex; flex-direction: column` from its ancestor — the same\n * inheritance class as the `--surface-policy-responsive-max-width-margin`\n * defect (see `responsiveMaxWidthToMarginCssValue`).\n * 2. Even with NO ancestor to inherit from, omitting the var does not leave the\n * element alone. `display: var(--surface-policy-display)` with the var unset\n * is invalid at computed-value time, which resolves to `unset` — and `display`\n * is not inherited, so that is its INITIAL value, `inline`. The base-layer\n * declaration still wins the cascade, so it overrides the UA stylesheet's\n * `div { display: block }`. Measured on the running app: the framework's own\n * `PrimaryContentWidthBoundary` (a SHELL surface whose `containment.gap` is\n * flattened to `'none'` precisely so it stays \"a plain block\") computed\n * `display: inline`, which made its `max-inline-size` cap and `margin-inline:\n * auto` centering inert — `max-inline-size` does not apply to non-replaced\n * inline boxes. With a 400px cap forced inside a 976px container the surface\n * measured 976px wide; publishing `block` measured 400px, centered. The entire\n * page-content width cap was silently doing nothing.\n *\n * A CSS-wide keyword cannot express \"no opinion\" here: `revert-layer`, `revert`\n * and `initial` were each measured through this var in the running app and all\n * three behaved exactly like the unset case (`display: inline`), because a\n * CSS-wide keyword arriving via `var()` substitution is not honoured as one. A\n * consumer-side fallback (`var(--x, block)`) does not help either — an inherited\n * value that IS set wins over the fallback, which is the whole of reason 1.\n *\n * `block` / `row` are the initial-ish values a block container wants. Utility\n * classes still win: they live in a later cascade layer than this base rule.\n */\nfunction stackDisplayCssValue(isStacking: boolean): string {\n return isStacking ? 'flex' : 'block';\n}\n\n/** Companion to {@link stackDisplayCssValue} — see its note on explicit neutrals. */\nfunction stackFlexDirectionCssValue(isStacking: boolean): string {\n return isStacking ? 'column' : 'row';\n}\n\n/**\n * Every var below is read by a Tailwind base-layer rule that can match a NESTED\n * surface, so any `undefined` here is not \"neutral\" — it is \"inherit the nearest\n * ancestor surface's value\". The vars were enumerated against that rule set\n * (`src/tailwind/index.ts`) and classified; the residuals are recorded so the next\n * author does not have to re-derive them:\n *\n * - SAFE BY CONSTRUCTION — `safe-area` always emits `0px`/`env()`;\n * `child-adaptive-gap` is gated by the same boolean as the\n * `data-surface-child-adaptive-density` attribute its selector requires, so the\n * read is unreachable when the emission is absent.\n * - BENIGN — `numeric-align`, `text-wrap` and `overflow-wrap` drive CSS properties\n * that are THEMSELVES inherited, so inheriting the var is equivalent to\n * inheriting the property. No shadowing needed.\n * - INERT — `framing-mode`, `nested-radius{,-strategy}`, `first-child-edge-strategy`,\n * `divider-strategy`, `selectable-semantics` and `gesture-opt-in` are republished\n * as `--surface-*` custom properties that NOTHING reads (verified repo-wide);\n * behaviour is driven by the matching `data-surface-*` attributes, which do not\n * inherit.\n * - LATENT — the remaining tier-mapped vars (`padding-*`, `overflow`, `max-height`,\n * `gap`, `z-tier`, the per-slot gaps, `action-alignment{,-mobile}`) can only reach\n * their `undefined` branch through an override that sets the slot explicitly to\n * `undefined`: every variant's framework default populates them, and both `'reset'`\n * and `'inherit'` resolve to a concrete value (`'reset'` additionally logs an error\n * when it cannot). Left as-is rather than changed blind — if one becomes reachable,\n * it belongs in the explicit-neutral treatment above.\n */\nfunction buildSurfacePolicyStyle(policy: SurfacePolicy): SurfaceStyle {\n const containment = policy.containment;\n const nesting = policy.nesting;\n const content = policy.content;\n const interactiveState = policy.interactiveState;\n const geometry = policy.geometry;\n const stacking = policy.stacking;\n const composition = policy.composition;\n const shouldStack = shouldActivateStackLayout(containment?.gap);\n\n return {\n '--surface-policy-display': stackDisplayCssValue(shouldStack),\n '--surface-policy-flex-direction': stackFlexDirectionCssValue(shouldStack),\n '--surface-policy-padding-block': paddingTierToCssValue(containment?.paddingBlock),\n '--surface-policy-padding-inline': paddingTierToCssValue(containment?.paddingInline),\n '--surface-policy-overflow': containment?.overflow,\n '--surface-policy-max-height': containment?.maxHeight === 'none' ? 'none' : containment?.maxHeight,\n '--surface-policy-gap': gapTierToCssValue(containment?.gap),\n '--surface-policy-header-gap': gapTierToCssValue(containment?.slotGap?.header ?? containment?.gap),\n '--surface-policy-body-gap': gapTierToCssValue(containment?.slotGap?.body ?? containment?.gap),\n '--surface-policy-footer-gap': gapTierToCssValue(containment?.slotGap?.footer ?? containment?.gap),\n '--surface-policy-framing-mode': framingModeToAttribute(nesting?.framingMode),\n '--surface-policy-nested-radius-strategy': nestedRadiusStrategyToAttribute(nesting?.nestedRadiusStrategy),\n '--surface-policy-first-child-edge-strategy': firstChildEdgeStrategyToAttribute(nesting?.firstChildEdgeStrategy),\n '--surface-policy-divider-strategy': dividerStrategyToAttribute(nesting?.dividerStrategy),\n '--surface-policy-z-tier': stackingTierToCssValue(stacking?.stackingTier),\n '--surface-policy-numeric-align': numericAlignmentToCssValue(content?.numericAlignment),\n '--surface-policy-text-wrap': textWrapToCssValue(content?.wrapStrategy),\n '--surface-policy-overflow-wrap': overlongTokenStrategyToCssValue(content?.overlongTokenStrategy),\n '--surface-policy-safe-area': geometry?.safeAreaPadding ? 'env(safe-area-inset-bottom)' : '0px',\n '--surface-policy-action-alignment': actionAlignmentToCssValue(geometry?.actionAlignment),\n '--surface-policy-action-alignment-mobile': actionAlignmentToMobileCssValue(geometry?.actionAlignment),\n '--surface-policy-responsive-max-width': responsiveMaxWidthToCssValue(geometry?.responsiveMaxWidth),\n '--surface-policy-responsive-max-width-margin': responsiveMaxWidthToMarginCssValue(geometry?.responsiveMaxWidth),\n '--surface-policy-embedded-table-padding-inline': embeddedTablePaddingToCssValue(composition?.embeddedTablePadding),\n '--surface-policy-child-adaptive-gap': composition?.childAdaptiveDensity ? 'var(--sp-field)' : undefined,\n '--surface-policy-selectable-semantics': selectableSemanticsToAttribute(interactiveState?.selectableSemantics),\n '--surface-policy-gesture-opt-in': gestureOptInToAttribute(interactiveState?.gestureOptIn),\n };\n}\n\n/**\n * Policy families whose values DO produce CSS — `containment` (padding,\n * overflow, max-height, gap), `nesting` (framing mode → frame visibility),\n * `content` (text-wrap, numeric alignment), `geometry` (responsiveMaxWidth →\n * max-inline-size), `stacking` (z-tier). The remaining families (`a11y`,\n * `interactiveState`, `autoRender`, `skeleton`, `composition`) emit only ARIA\n * attributes / behavioral data-attributes / runtime hooks and CANNOT\n * visually conflict with a Tailwind utility class.\n *\n * Restricting the collision check to these families eliminates a noisy\n * false-positive: a Surface that overrides ONLY `a11y.landmarkRole`\n * (e.g., the public shell using `NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE`)\n * combined with an `overflow-auto` Tailwind utility on the same node is NOT\n * a collision — `a11y.landmarkRole` does not emit any CSS property the\n * utility could fight with.\n */\nconst VISUALLY_IMPACTFUL_POLICY_FAMILIES: ReadonlySet<string> = new Set([\n 'containment',\n 'nesting',\n 'content',\n 'geometry',\n 'stacking',\n]);\n\nfunction hasPolicyDrivenOverride(policyOverride: DeepPartialSurfacePolicy | undefined): boolean {\n if (!policyOverride) {\n return false;\n }\n\n return Object.entries(policyOverride).some(([familyName, familyOverride]) => {\n if (!VISUALLY_IMPACTFUL_POLICY_FAMILIES.has(familyName)) {\n return false;\n }\n return familyOverride !== undefined\n && familyOverride !== null\n && typeof familyOverride === 'object'\n && Object.keys(familyOverride).length > 0;\n });\n}\n\nfunction usePolicyChannelCollisionWarning(\n className: string | undefined,\n childClassName: string | undefined,\n policyOverride: DeepPartialSurfacePolicy | undefined,\n emitPolicyVars: boolean,\n): void {\n const warnedRef = React.useRef(false);\n\n // The collision this warns about — a className layout utility (padding / gap /\n // flex / …) visually overriding a policy-driven CSS var while children still\n // read the policy value — can only happen when the policy vars are actually\n // emitted. A surface with `emitPolicyVars={false}` (e.g. ContentSection section\n // chrome, which owns layout via recipe classes and may set only a\n // `nesting.framingMode` override) emits NO vars, so there is nothing for a\n // utility to override. Skipping the check here removes a guaranteed\n // false-positive on every such surface.\n if (!emitPolicyVars) {\n return;\n }\n\n const conflictingClassName = [className, childClassName].filter(Boolean).join(' ');\n\n if (\n process.env.NODE_ENV !== 'production'\n && !warnedRef.current\n && conflictingClassName\n && hasPolicyDrivenOverride(policyOverride)\n && POLICY_DRIVEN_UTILITY_PREFIXES.test(conflictingClassName)\n ) {\n warnedRef.current = true;\n logger.warn('[Surface] className utilities can visually override policyOverride while child policy context still sees the policy value', {\n className: conflictingClassName,\n });\n }\n}\n\nfunction mergeSurfaceStyle(\n policy: SurfacePolicy,\n materialStyle: React.CSSProperties | undefined,\n style: React.CSSProperties | undefined,\n emitPolicyVars: boolean,\n rendersOwnFrame: boolean,\n nestedRadius: string | undefined,\n): SurfaceStyle | React.CSSProperties | undefined {\n if (!emitPolicyVars) {\n return { ...materialStyle, ...style };\n }\n\n return {\n ...buildSurfacePolicyStyle(policy),\n '--surface-policy-nested-radius': nestedRadius,\n borderWidth: rendersOwnFrame ? undefined : '0px',\n boxShadow: rendersOwnFrame ? undefined : 'none',\n borderRadius: nestedRadius ? 'var(--surface-policy-nested-radius)' : undefined,\n ...materialStyle,\n ...style,\n } as SurfaceStyle;\n}\n\nconst SurfaceRoot = React.forwardRef<HTMLDivElement, SurfaceProps>(function SurfaceRoot(\n {\n variant = SurfaceVariant.BASE,\n materialRoleOverride,\n policyOverride,\n asChild = false,\n emitPolicyVars = true,\n modal = false,\n a11yManagedByHost = false,\n errorFallbackTitleAs,\n className,\n style,\n children,\n role,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'data-slot': _dataSlot,\n 'data-surface': _dataSurface,\n tabIndex,\n ...props\n },\n ref,\n): React.JSX.Element {\n const {\n getComposedClasses,\n getMaterialProfile,\n getRecipe,\n getSurfacePolicy,\n } = useUI();\n // Optional calls keep the primitive resilient in isolated tests and custom\n // host adapters that provide the legacy minimal UI context surface.\n const visualRecipe = getRecipe?.(UIBehavior.SURFACE, variant);\n const visualRecipeClasses = getComposedClasses?.(UIBehavior.SURFACE, variant);\n const materialProfile = getMaterialProfile?.(materialRoleOverride ?? visualRecipe?.material);\n const parentContext = React.useContext(SurfacePolicyContext);\n const policy = React.useMemo(\n () => getSurfacePolicy\n ? getSurfacePolicy(variant, policyOverride, parentContext?.policy)\n : mergeSurfacePolicy(\n FRAMEWORK_DEFAULT_SURFACE_POLICIES[variant],\n undefined,\n undefined,\n policyOverride,\n {\n variant,\n parentPolicy: parentContext?.policy,\n logger,\n },\n ),\n [getSurfacePolicy, parentContext?.policy, policyOverride, variant],\n );\n const [headerId, setHeaderId] = React.useState<string | undefined>();\n const registerHeaderId = React.useCallback((id: string): void => {\n setHeaderId(id);\n }, []);\n const unregisterHeaderId = React.useCallback((id: string): void => {\n setHeaderId((current) => (current === id ? undefined : current));\n }, []);\n const headerRegistration = React.useMemo(\n () => ({ headerId, registerHeaderId, unregisterHeaderId }),\n [headerId, registerHeaderId, unregisterHeaderId],\n );\n const contextValue = React.useMemo(\n () => computeSurfacePolicyContextValue(variant, policy, parentContext, headerRegistration),\n [headerRegistration, parentContext, policy, variant],\n );\n const isNestedInFramedAncestor = Boolean(parentContext?.isInFramedAncestor);\n const nearestFramedAncestorVariant = isNestedInFramedAncestor\n ? parentContext?.nearestFramedAncestorVariant ?? undefined\n : undefined;\n const nestedRadius = nestedRadiusToCssValue(policy.nesting?.nestedRadiusStrategy, isNestedInFramedAncestor);\n\n const childClassName = asChild && React.isValidElement<{ className?: string }>(children)\n ? children.props.className\n : undefined;\n usePolicyChannelCollisionWarning(className, childClassName, policyOverride, emitPolicyVars);\n const Comp = asChild ? Slot : 'div';\n const surfaceNodeRef = React.useRef<HTMLElement | null>(null);\n const materialRuntime = useMaterialRuntime(materialProfile, surfaceNodeRef);\n const composedRef = React.useCallback((node: HTMLElement | null): void => {\n surfaceNodeRef.current = node;\n\n if (typeof ref === 'function') {\n ref(node as HTMLDivElement | null);\n return;\n }\n\n if (ref) {\n ref.current = node as HTMLDivElement | null;\n }\n }, [ref]);\n const resolvedRole = role ?? landmarkRoleToAttribute(policy.a11y?.landmarkRole);\n const resolvedAriaLabelledBy = ariaLabelledBy\n ?? (policy.a11y?.labelStrategy === 'from-header' ? headerId : undefined);\n\n /*\n * The a11y attributes Surface puts on the merged element — and under `a11yManagedByHost`, the\n * KEYS it must not put there at all.\n *\n * An `asChild` Surface is a Slot: its props are merged into the host primitive's, and the host\n * then spreads that merged object AFTER its own attributes. So a key present with an\n * `undefined` value does not mean \"Surface contributes nothing\" — it means \"delete whatever the\n * host set\". Radix `Dialog.Content` renders\n * `<div role=\"dialog\" aria-labelledby={context.titleId} {...contentProps}>`, so Surface passing\n * `aria-labelledby: undefined` REMOVED the accessible name the host had just wired from its own\n * `Dialog.Title` (#632).\n *\n * Measured on the command palette: `aria-describedby` survived (Surface never emits it) while\n * `aria-labelledby` was absent, with a correctly-rendered `Dialog.Title` sitting inside carrying\n * the very id that should have been referenced. The defect hid behind the common path —\n * `OverlayContainer` passes `aria-labelledby` EXPLICITLY, so its dialogs were named and only\n * overlays relying on the host's own title wiring lost it.\n *\n * Hence: when the host owns a11y, forward only what the CALLER explicitly supplied, as present\n * keys, and omit the rest entirely rather than passing `undefined`. Synthesizing a value is\n * equally wrong here — Surface's own `landmarkRole` would overwrite an `alertdialog` role with\n * `dialog`, which is the same defect one attribute over.\n */\n const hostManagedA11yAttributes = {\n ...(role !== undefined ? { role } : {}),\n ...(ariaLabel !== undefined ? { 'aria-label': ariaLabel } : {}),\n ...(ariaLabelledBy !== undefined ? { 'aria-labelledby': ariaLabelledBy } : {}),\n };\n /*\n * Without `a11yManagedByHost`, Surface contributes the role and name IT resolved — but still only the keys\n * it has a VALUE for. The same Slot rule applies here as above: an `undefined` key deletes the host's\n * attribute. Emitting `role: undefined` stripped the role from every wrapped Radix primitive that sets one\n * and was not given the opt-in — dropdown and context menus (`menu`), select (`listbox`), menubar\n * (`menubar`), tabs content (`tabpanel`) — measured on the running app as a dropdown with no `role=\"menu\"`\n * (#1903). A role or name Surface DOES resolve (an explicit prop, a policy landmark) still wins over the\n * host's, exactly as before; only the deletion is gone. Pinned in `Surface.host-role.test.tsx`.\n */\n const a11yAttributes = a11yManagedByHost\n ? hostManagedA11yAttributes\n : {\n ...(resolvedRole !== undefined ? { role: resolvedRole } : {}),\n ...(ariaLabel !== undefined ? { 'aria-label': ariaLabel } : {}),\n ...(resolvedAriaLabelledBy !== undefined ? { 'aria-labelledby': resolvedAriaLabelledBy } : {}),\n };\n const shouldActivateFocusTrap = !a11yManagedByHost\n && (policy.a11y?.focusTrap === 'on-mount' || (modal && policy.a11y?.focusTrap === 'when-modal'));\n const shouldActivateScrollContainment = !a11yManagedByHost\n && modal\n && policy.a11y?.scrollContainment === 'lock-body';\n /*\n * `tabIndex` follows the same Slot rule: only a key with a VALUE. Passing `tabIndex={undefined}` deleted the\n * host's own tab stop. Radix's roving-focus group gives its root `tabIndex: 0` (the group's only Tab entry,\n * every item being -1), so a toggle group wrapped in a Surface track was skipped by Tab entirely, and so\n * was the menubar. The value is the caller's, or -1 when the focus trap needs the surface itself focusable.\n */\n const resolvedTabIndex = shouldActivateFocusTrap && tabIndex == null ? -1 : tabIndex;\n const tabIndexAttribute = resolvedTabIndex === undefined ? {} : { tabIndex: resolvedTabIndex };\n\n useSurfaceFocusTrap(surfaceNodeRef, shouldActivateFocusTrap);\n useSurfaceBodyScrollLock(shouldActivateScrollContainment);\n React.useEffect(() => {\n if (\n process.env.NODE_ENV === 'production'\n // When the host primitive owns a11y (Radix Dialog / Drawer / Sheet /\n // AlertDialog), the accessible name comes from the host's own title\n // (e.g. `Dialog.Title` → `aria-labelledby`), NOT from a `Surface.Header`.\n // The `from-header` strategy is structurally inactive here, so this\n // warning would fire for EVERY host-managed overlay regardless of whether\n // it is correctly titled. Defer labelling validation to the host — Radix\n // emits its own (authoritative) warning when the title is genuinely absent.\n || a11yManagedByHost\n || policy.a11y?.labelStrategy !== 'from-header'\n || !resolvedRole\n || ariaLabel\n || ariaLabelledBy\n || headerId\n ) {\n return undefined;\n }\n\n const timeout = window.setTimeout(() => {\n logger.warn('[Surface] labelStrategy \"from-header\" produced an unlabelled landmark surface', {\n variant,\n role: resolvedRole,\n });\n }, 0);\n\n return () => window.clearTimeout(timeout);\n }, [a11yManagedByHost, ariaLabel, ariaLabelledBy, headerId, policy.a11y?.labelStrategy, resolvedRole, variant]);\n const policyStyleAttrs = emitPolicyVars\n ? {\n 'data-slot': 'surface',\n 'data-surface': '',\n /*\n * The width tier this surface applies, announced so the CAP is legible in the DOM.\n *\n * Width is a chain — a zone boundary, a pane, a layout root's reading measure — and until\n * every level said which tier it was applying, diagnosing \"why is this narrow\" meant walking\n * the ancestors reading computed styles, which is how the wrong cap got fixed twice in a row.\n * With this, `document.querySelectorAll('[data-inline-size-tier]')` names every cap in the\n * page and its owner in one call. Absent when no tier is declared, so it marks the elements\n * that actually decide something rather than every surface.\n */\n 'data-inline-size-tier': policy.geometry?.responsiveMaxWidth,\n }\n : {};\n const shouldWrapErrorBoundary = policy.interactiveState?.errorBoundary === 'self';\n const boundedChildren = shouldWrapErrorBoundary ? boundSurfaceContent(children, asChild, errorFallbackTitleAs) : { children, boundsContent: false };\n const surfaceElement = (\n <Comp\n ref={composedRef}\n {...props}\n {...policyStyleAttrs}\n data-material-kind={materialRuntime['data-material-kind']}\n data-material-tier={materialRuntime['data-material-tier']}\n data-material-variant={materialRuntime['data-material-variant']}\n data-material-depth={materialRuntime['data-material-depth']}\n data-material-composition={materialRuntime['data-material-composition']}\n data-material-group={materialRuntime['data-material-group']}\n data-material-refractive-budget={materialRuntime['data-material-refractive-budget']}\n {...tabIndexAttribute}\n data-surface-focus-trap={shouldActivateFocusTrap ? '' : undefined}\n data-surface-scroll-containment={shouldActivateScrollContainment ? '' : undefined}\n data-surface-framing-mode={emitPolicyVars ? framingModeToAttribute(policy.nesting?.framingMode) : undefined}\n data-surface-frame={emitPolicyVars ? (contextValue.rendersOwnFrame ? 'rendered' : 'suppressed') : undefined}\n data-surface-in-framed-ancestor={emitPolicyVars && isNestedInFramedAncestor ? '' : undefined}\n data-surface-nearest-framed-ancestor={emitPolicyVars ? nearestFramedAncestorVariant : undefined}\n data-surface-nested-radius-strategy={emitPolicyVars ? nestedRadiusStrategyToAttribute(policy.nesting?.nestedRadiusStrategy) : undefined}\n data-surface-first-child-edge-strategy={emitPolicyVars ? firstChildEdgeStrategyToAttribute(policy.nesting?.firstChildEdgeStrategy) : undefined}\n data-surface-divider-strategy={emitPolicyVars ? dividerStrategyToAttribute(policy.nesting?.dividerStrategy) : undefined}\n data-surface-selectable-semantics={emitPolicyVars ? selectableSemanticsToAttribute(policy.interactiveState?.selectableSemantics) : undefined}\n data-surface-gesture-opt-in={emitPolicyVars ? gestureOptInToAttribute(policy.interactiveState?.gestureOptIn) : undefined}\n data-surface-child-adaptive-density={emitPolicyVars && policy.composition?.childAdaptiveDensity === true ? '' : undefined}\n data-surface-selection-column-aware={emitPolicyVars && policy.composition?.selectionColumnAware === true ? '' : undefined}\n {...a11yAttributes}\n data-surface-variant={variant}\n className={cn(visualRecipeClasses, className)}\n style={mergeSurfaceStyle(policy, materialRuntime.style, style, emitPolicyVars, contextValue.rendersOwnFrame, nestedRadius)}\n >\n {boundedChildren.children}\n </Comp>\n );\n\n return (\n <SurfacePolicyContext.Provider value={contextValue}>\n {shouldWrapErrorBoundary && !boundedChildren.boundsContent ? (\n <SurfaceErrorBoundary>{surfaceElement}</SurfaceErrorBoundary>\n ) : surfaceElement}\n </SurfacePolicyContext.Provider>\n );\n});\n\n/**\n * Puts a `policy.interactiveState.errorBoundary: 'self'` boundary INSIDE the surface's own element, around its content.\n *\n * The boundary used to wrap the whole surface element, so a crash replaced the FRAME along with the content. For a\n * dialog that frame is the `asChild` host — Radix `Dialog.Content`, which carries the `fixed` centring and the dialog\n * role — so the fallback rendered as a bare block in the portal, behind the still-open backdrop: the page dimmed and\n * nothing appeared (#2003, a custom view whose first hook threw). Bounding the content keeps the frame standing and\n * shows the fallback where the content was.\n *\n * \"Content\" is every child of the host, so a dialog's close button (a child of `Dialog.Content`, rendered beside the\n * body) is replaced with the rest. A plain dialog still closes: Escape and a click outside are handled by\n * `Dialog.Content` itself, which stays mounted. An ALERT dialog ignores a click outside, so a crashed one closes on\n * Escape only, and not at all where its host turns Escape off. Keeping the button outside the boundary would mean\n * moving it out of the host, which positions it and holds it inside the focus trap, so that was not done.\n *\n * - Not `asChild`: the surface's own `div` is the frame, so its children are wrapped directly.\n * - `asChild` with an element whose `children` are nodes: the host element is the frame, so ITS children are wrapped\n * (one level down, through `cloneElement`), and the Slot still merges the surface's props onto the host.\n * - `asChild` with a host whose content is not passed as node children (none, or a render function): the content is\n * produced inside the host's own render, where no wrapper can reach, so the boundary stays around the whole element\n * (`boundsContent: false`) — the previous behaviour, which still isolates the crash, only without the frame.\n */\nfunction boundSurfaceContent(\n children: React.ReactNode,\n asChild: boolean,\n fallbackTitleAs: React.ElementType | undefined,\n): { children: React.ReactNode; boundsContent: boolean } {\n if (!asChild) {\n return { children: <SurfaceErrorBoundary>{children}</SurfaceErrorBoundary>, boundsContent: true };\n }\n if (!React.isValidElement<{ children?: React.ReactNode }>(children)) {\n return { children, boundsContent: false };\n }\n const hostContent = children.props.children;\n if (hostContent === undefined || hostContent === null || typeof hostContent === 'function') {\n return { children, boundsContent: false };\n }\n return {\n children: React.cloneElement(children, undefined, <SurfaceErrorBoundary titleAs={fallbackTitleAs}>{hostContent}</SurfaceErrorBoundary>),\n boundsContent: true,\n };\n}\n\nSurfaceRoot.displayName = 'Surface';\n\nfunction surfaceSlotStyle(\n slot: 'header' | 'body' | 'footer',\n policy: SurfacePolicy,\n style: React.CSSProperties | undefined,\n): React.CSSProperties {\n const gap = policy.containment?.slotGap?.[slot] ?? policy.containment?.gap;\n const shouldStack = shouldActivateStackLayout(gap);\n\n return {\n '--surface-policy-slot-display': stackDisplayCssValue(shouldStack),\n '--surface-policy-slot-flex-direction': stackFlexDirectionCssValue(shouldStack),\n [`--surface-policy-${slot}-gap`]: gapTierToCssValue(gap),\n ...style,\n } as React.CSSProperties;\n}\n\nexport const SurfaceHeader = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(function SurfaceHeader(\n { className, id, style, ...props },\n ref,\n): React.JSX.Element {\n const policy = useSurfacePolicy();\n const surfaceContext = React.useContext(SurfacePolicyContext);\n const registerHeaderId = surfaceContext?.registerHeaderId;\n const unregisterHeaderId = surfaceContext?.unregisterHeaderId;\n const generatedId = React.useId();\n const resolvedId = id ?? generatedId;\n\n React.useEffect(() => {\n registerHeaderId?.(resolvedId);\n return () => unregisterHeaderId?.(resolvedId);\n }, [registerHeaderId, resolvedId, unregisterHeaderId]);\n\n return (\n <div\n ref={ref}\n id={resolvedId}\n data-slot=\"surface-header\"\n className={cn(className)}\n style={surfaceSlotStyle('header', policy, style)}\n {...props}\n />\n );\n});\n\nSurfaceHeader.displayName = 'Surface.Header';\n\nexport const SurfaceBody = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(function SurfaceBody(\n { className, style, ...props },\n ref,\n): React.JSX.Element {\n const policy = useSurfacePolicy();\n\n return (\n <div\n ref={ref}\n data-slot=\"surface-body\"\n className={cn(className)}\n style={surfaceSlotStyle('body', policy, style)}\n {...props}\n />\n );\n});\n\nSurfaceBody.displayName = 'Surface.Body';\n\nexport const SurfaceFooter = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(function SurfaceFooter(\n { className, style, ...props },\n ref,\n): React.JSX.Element {\n const policy = useSurfacePolicy();\n const gap = policy.containment?.slotGap?.footer ?? policy.containment?.gap;\n const shouldStack = shouldActivateStackLayout(gap);\n const shouldAlignActions = Boolean(policy.geometry?.actionAlignment && policy.geometry.actionAlignment !== 'inherit');\n\n return (\n <div\n ref={ref}\n data-slot=\"surface-footer\"\n className={cn(className)}\n style={{\n '--surface-policy-slot-display': stackDisplayCssValue(shouldStack || shouldAlignActions),\n '--surface-policy-slot-flex-direction': stackFlexDirectionCssValue(shouldStack),\n '--surface-policy-footer-gap': gapTierToCssValue(gap),\n '--surface-policy-action-alignment': shouldAlignActions\n ? actionAlignmentToCssValue(policy.geometry?.actionAlignment)\n : undefined,\n '--surface-policy-action-alignment-mobile': shouldAlignActions\n ? actionAlignmentToMobileCssValue(policy.geometry?.actionAlignment)\n : undefined,\n ...style,\n } as React.CSSProperties}\n {...props}\n />\n );\n});\n\nSurfaceFooter.displayName = 'Surface.Footer';\n\nexport const SurfaceAction = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(function SurfaceAction(\n { className, ...props },\n ref,\n): React.JSX.Element {\n return (\n <div\n ref={ref}\n data-slot=\"surface-action\"\n className={cn(className)}\n {...props}\n />\n );\n});\n\nSurfaceAction.displayName = 'Surface.Action';\n\nexport const Surface = Object.assign(SurfaceRoot, {\n Header: SurfaceHeader,\n Body: SurfaceBody,\n Footer: SurfaceFooter,\n Action: SurfaceAction,\n});\n"]}
|
|
1
|
+
{"version":3,"file":"surface.js","sourceRoot":"","sources":["../../../../src/components/sections/surface.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EACL,kCAAkC,EAClC,cAAc,EACd,UAAU,GAIX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;AACpG,OAAO,EACL,gCAAgC,EAChC,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,GACjB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CAAwD,SAAS,aAAa,CACzH,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EACvB,GAAG;IAEH,OAAO,CACL,cACE,GAAG,EAAE,GAAG,eACE,gBAAgB,EAC1B,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KACpB,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAa,CAAC,WAAW,GAAG,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE;IAChD,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,aAAa;CACtB,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n FRAMEWORK_DEFAULT_SURFACE_POLICIES,\n SurfaceVariant,\n UIBehavior,\n type DeepPartialSurfacePolicy,\n type MaterialProfileRole,\n type SurfacePolicy,\n} from '@wildo-ai/presets-components-models';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\nimport {\n computeSurfacePolicyContextValue,\n mergeSurfacePolicy,\n SurfacePolicyContext,\n useSurfacePolicy,\n} from '~wildo-frontend-lib/core/ui/SurfacePolicyContext';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { useMaterialRuntime } from '~wildo-frontend-lib/core/ui/material-runtime';\nimport { SurfaceErrorBoundary } from '~wildo-frontend-lib/core/ui/SurfaceErrorBoundary';\nimport { useSurfaceBodyScrollLock, useSurfaceFocusTrap } from '~wildo-frontend-lib/core/ui/surface-a11y.utils';\n\ntype SurfaceStyle = React.CSSProperties & Record<`--surface-policy-${string}`, string | undefined>;\n\nexport interface SurfaceProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Semantic container role. Surface always composes the active theme's\n * matching `UIBehavior.SURFACE` recipe onto the rendered node; callers only\n * supply local structural classes and must not repeat the theme lookup.\n */\n variant?: SurfaceVariant;\n /**\n * Selects a material profile independently from the semantic surface recipe.\n * Use this when a component's behavior/policy remains one SurfaceVariant but\n * its functional role requires different optics (for example, a raised\n * navigation toolbar versus a raised menu). Theme recipes remain the default.\n */\n materialRoleOverride?: MaterialProfileRole;\n policyOverride?: DeepPartialSurfacePolicy;\n asChild?: boolean;\n /**\n * Suppresses policy-owned CSS variables and selector attributes while\n * retaining the resolved policy in React context for child slots. This does\n * not suppress the visual theme recipe: policy and appearance are separate\n * channels, and the semantic `variant` remains visually authoritative.\n */\n emitPolicyVars?: boolean;\n /**\n * Marks this surface as a modal root for policy slots such as\n * `focusTrap: 'when-modal'` and `scrollContainment: 'lock-body'`.\n */\n modal?: boolean;\n /**\n * Set when the host primitive already owns focus trapping / body scroll lock\n * AND the accessible name/description (for example Radix Dialog Content, which\n * wires `aria-labelledby` from its own `Dialog.Title`). Surface still emits\n * policy context, but contributes NO a11y attribute of its own — see the\n * `a11yAttributes` note below, where passing an `undefined` key was deleting\n * the host's accessible name (#632) — and skips duplicate runtime side effects\n * (focus trap, body scroll lock) plus the `from-header` label-policing\n * warning: the host owns labelling, so a `Surface.Header` is never registered\n * here and the warning would be a guaranteed false positive on every\n * host-managed overlay.\n */\n a11yManagedByHost?: boolean;\n /**\n * The component that names this surface's host, for an `asChild` host whose title is part of its content: a\n * Radix or vaul `Title`. A crash replaces the content, title included, so without this the host points its\n * `aria-labelledby` at nothing and a crashed dialog has no accessible name (#3329). The fallback renders its own\n * heading through this component, visually hidden, because only the primitive's title takes the id the host names.\n */\n errorFallbackTitleAs?: React.ElementType;\n 'data-slot'?: string;\n 'data-surface'?: string;\n}\n\nconst POLICY_DRIVEN_UTILITY_PREFIXES = /(?:^|\\s)(?:p|pt|pr|pb|pl|pe|ps|px|py|gap|gap-x|gap-y|max-h|min-h|max-w|overflow|z|flex|grid|flex-col|flex-row|flex-col-reverse|flex-row-reverse)-/;\nconst logger = LoggerFrontendService.getLogger();\n\nfunction paddingTierToCssValue(value: string | undefined): string | undefined {\n switch (value) {\n case 'none':\n return '0px';\n case 'field':\n return 'var(--sp-field)';\n case 'card-sm':\n return 'var(--spacing-card-sm)';\n case 'card':\n return 'var(--sp-card)';\n case 'container':\n return 'var(--sp-container)';\n default:\n return undefined;\n }\n}\n\nfunction gapTierToCssValue(value: string | undefined): string | undefined {\n switch (value) {\n case 'none':\n return '0px';\n case 'item':\n return 'var(--sp-item)';\n case 'field':\n return 'var(--sp-field)';\n case 'section':\n return 'var(--sp-section)';\n case 'lane':\n return 'var(--sp-region)';\n default:\n return undefined;\n }\n}\n\nfunction textWrapToCssValue(value: SurfacePolicy['content'] extends infer Content ? Content extends { wrapStrategy?: infer Wrap } ? Wrap : never : never): string | undefined {\n switch (value) {\n case 'nowrap':\n return 'nowrap';\n case 'balance':\n return 'balance';\n case 'pretty':\n return 'pretty';\n case 'wrap':\n return 'wrap';\n default:\n return undefined;\n }\n}\n\nfunction numericAlignmentToCssValue(value: SurfacePolicy['content'] extends infer Content ? Content extends { numericAlignment?: infer Numeric } ? Numeric : never : never): string | undefined {\n switch (value) {\n case 'tabular':\n return 'tabular-nums';\n case 'lining':\n return 'lining-nums';\n case 'inherit':\n return 'inherit';\n default:\n return undefined;\n }\n}\n\nfunction overlongTokenStrategyToCssValue(value: SurfacePolicy['content'] extends infer Content ? Content extends { overlongTokenStrategy?: infer Strategy } ? Strategy : never : never): string | undefined {\n switch (value) {\n case 'break-word':\n // CSS `overflow-wrap: break-word` (the framework default): emergency\n // character-boundary breaking when a token would otherwise overflow,\n // WITHOUT feeding those break opportunities into min-content sizing.\n // Catches URLs, dev-time i18n keys, hex hashes, file paths, error\n // messages with embedded paths.\n return 'break-word';\n case 'break-anywhere':\n // CSS `overflow-wrap: anywhere` — same emergency breaking as\n // `break-word`, but the break opportunities ALSO shrink the surface's\n // intrinsic min-content width to one character (which collapses\n // intrinsically-sized layouts like stat tiles to one letter per line).\n // Per-surface opt-in only; see `OverlongTokenStrategy` JSDoc.\n return 'anywhere';\n case 'overflow':\n // CSS `overflow-wrap: normal` = browser default. Long tokens\n // visibly overflow the surface. Useful for code blocks that\n // intentionally scroll horizontally, or any surface where the\n // design specifically calls for visible overflow.\n return 'normal';\n case 'inherit':\n return 'inherit';\n default:\n return undefined;\n }\n}\n\nfunction stackingTierToCssValue(value: SurfacePolicy['stacking'] extends infer Stacking ? Stacking extends { stackingTier?: infer Tier } ? Tier : never : never): string | undefined {\n switch (value) {\n case 'content':\n return 'var(--z-content)';\n case 'overlay':\n return 'var(--z-overlay)';\n case 'transient':\n return 'var(--z-transient)';\n case 'guidance':\n return 'var(--z-guidance)';\n case 'critical':\n return 'var(--z-critical)';\n default:\n return undefined;\n }\n}\n\nfunction actionAlignmentToCssValue(value: SurfacePolicy['geometry'] extends infer Geometry ? Geometry extends { actionAlignment?: infer Alignment } ? Alignment : never : never): string | undefined {\n switch (value) {\n case 'stack':\n return 'column';\n case 'row':\n case 'inherit':\n return value;\n case 'column-reverse-on-mobile':\n return 'row';\n default:\n return undefined;\n }\n}\n\nfunction actionAlignmentToMobileCssValue(value: SurfacePolicy['geometry'] extends infer Geometry ? Geometry extends { actionAlignment?: infer Alignment } ? Alignment : never : never): string | undefined {\n switch (value) {\n case 'column-reverse-on-mobile':\n return 'column-reverse';\n case 'stack':\n return 'column';\n case 'row':\n case 'inherit':\n return value;\n default:\n return undefined;\n }\n}\n\n/**\n * The CSS `max-inline-size` a {@link ResponsiveMaxWidth} tier resolves to.\n *\n * Exported so the two LAYOUT ROOTS that cap their own content — `DisplayLayout` and `FormLayout` —\n * resolve their measure through the same vocabulary a Surface does, instead of hand-writing the tier's\n * value. They used to carry the literal `max-w-[var(--measure-max-width,42rem)]`, which is byte-for-byte\n * what the `'measure'` tier returns here: the same decision, spelled two ways, with only one of the two\n * spellings reachable by a host that wanted to change it.\n */\nexport function responsiveMaxWidthToCssValue(value: SurfacePolicy['geometry'] extends infer Geometry ? Geometry extends { responsiveMaxWidth?: infer MaxWidth } ? MaxWidth : never : never): string | undefined {\n switch (value) {\n case 'full':\n return '100%';\n case 'sm':\n return '24rem';\n case 'md':\n return '28rem';\n case 'lg':\n return '32rem';\n case 'xl':\n return '36rem';\n case 'measure':\n // Reading-measure cap for single-column form/field stacks (T4c).\n // Themeable via `--measure-max-width`; defaults to 42rem (~672px).\n return 'var(--measure-max-width, 42rem)';\n case 'centered-readable':\n return '72ch';\n case 'content':\n // Page-content cap for primary content areas. Themeable via the\n // `--content-max-width` CSS variable; defaults to 80rem (~1280px).\n return 'var(--content-max-width, 80rem)';\n case 'none':\n default:\n // `none` is both the explicit tier AND the neutral, for the same reason the\n // margin companion below returns `0px` rather than `undefined`: policy vars\n // inherit, so an omitted cap adopts the nearest ancestor surface's cap. Every\n // tier of the union already returned explicitly, so folding the default in is\n // inert for every reachable value and only closes the inheritance hole.\n return 'none';\n }\n}\n\n/**\n * The inline `style` of a block whose width tier is OPTIONAL: the tier's `max-inline-size` when one is declared, and NO\n * inline style when it is not, so the cap the HOST puts in `className` (or the block's own derived class) decides.\n *\n * `responsiveMaxWidthToCssValue(undefined)` is `'none'`, deliberately, for the Surface policy variable it feeds. As an\n * INLINE style that `'none'` outranks every class, so a block that left its tier unset to let the host decide was\n * uncapped whatever the host said. The record page's danger zone and sharing section were exactly that: the read\n * layout hands them `[max-inline-size:var(--record-body-max-inline-size)]` so they share the record body's edges\n * (060e526ea), and both rendered full width beside a body capped at the reading measure (#3751, measured on a\n * member's page in the Settings Hub: body 672px, danger zone 889px).\n */\nexport function optionalMaxInlineSizeStyle(\n value: Parameters<typeof responsiveMaxWidthToCssValue>[0] | undefined,\n): React.CSSProperties | undefined {\n return value === undefined ? undefined : { maxInlineSize: responsiveMaxWidthToCssValue(value) };\n}\n\n/**\n * Centering companion to {@link responsiveMaxWidthToCssValue}: a surface capped\n * to a finite max inline-size is centered in its container via\n * `margin-inline: auto`. `full`/`none`/unset surfaces fill their container and\n * are explicitly RESET to `0px`. Applied by the Tailwind base layer at ≥ 640px\n * alongside the inline-size cap, so the `centered-readable`/`content` tiers\n * actually center (the cap alone would leave the surface flush to the\n * inline-start edge).\n *\n * The uncapped tiers MUST emit `0px` rather than `undefined`. Policy vars are\n * CSS custom properties, so they INHERIT: an omitted value is not \"no\n * centering\", it is \"whatever the nearest ancestor surface asked for\". Since\n * `OVERLAY` is capped (`lg`) and therefore publishes `auto`, every uncapped\n * surface nested inside a dialog silently inherited `margin-inline: auto` — and\n * an auto cross-axis margin in a flex column ALSO suppresses the item's\n * stretch, so those surfaces shrink-wrapped to their content and drifted to the\n * centre. In the settings hub that turned a column of cards into a ragged\n * staircase, each card as wide as its longest sentence. The inline-size\n * companion never showed the defect because its uncapped tier emits an explicit\n * `'none'`; this one returned `undefined` and inherited instead. Same neutral\n * -emission discipline as `--surface-policy-safe-area`, which publishes `0px`\n * rather than omitting itself.\n */\nfunction responsiveMaxWidthToMarginCssValue(value: SurfacePolicy['geometry'] extends infer Geometry ? Geometry extends { responsiveMaxWidth?: infer MaxWidth } ? MaxWidth : never : never): string | undefined {\n switch (value) {\n case 'sm':\n case 'md':\n case 'lg':\n case 'xl':\n case 'measure':\n case 'centered-readable':\n case 'content':\n return 'auto';\n case 'full':\n case 'none':\n default:\n // Explicit reset, never `undefined` — see the note above on inheritance.\n return '0px';\n }\n}\n\nfunction embeddedTablePaddingToCssValue(value: SurfacePolicy['composition'] extends infer Composition ? Composition extends { embeddedTablePadding?: infer Padding } ? Padding : never : never): string | undefined {\n switch (value) {\n case 'strip':\n return '0px';\n case 'preserve':\n default:\n // `preserve` is also the neutral: \"no opinion\" means keep the surface's own\n // inline padding. The Tailwind rule spells the same intent as a fallback\n // (`var(--…-embedded-table-padding-inline, var(--…-padding-inline))`), but a\n // fallback only fires when the var is UNSET — an inherited value that IS set\n // wins over it, so a table-bearing surface nested inside a `strip` ancestor\n // would have inherited `0px`. Emitting it here is what actually shadows that.\n return 'var(--surface-policy-padding-inline)';\n }\n}\n\nfunction framingModeToAttribute(value: SurfacePolicy['nesting'] extends infer Nesting ? Nesting extends { framingMode?: infer Framing } ? Framing : never : never): string | undefined {\n switch (value) {\n case 'always':\n case 'when-orphan':\n case 'never':\n return value;\n default:\n return undefined;\n }\n}\n\nfunction nestedRadiusStrategyToAttribute(value: SurfacePolicy['nesting'] extends infer Nesting ? Nesting extends { nestedRadiusStrategy?: infer Strategy } ? Strategy : never : never): string | undefined {\n switch (value) {\n case 'inherit':\n case 'one-tier-tighter':\n case 'fixed':\n return value;\n default:\n return undefined;\n }\n}\n\nfunction firstChildEdgeStrategyToAttribute(value: SurfacePolicy['nesting'] extends infer Nesting ? Nesting extends { firstChildEdgeStrategy?: infer Strategy } ? Strategy : never : never): string | undefined {\n switch (value) {\n case 'collapse':\n case 'preserve':\n return value;\n default:\n return undefined;\n }\n}\n\nfunction dividerStrategyToAttribute(value: SurfacePolicy['nesting'] extends infer Nesting ? Nesting extends { dividerStrategy?: infer Strategy } ? Strategy : never : never): string | undefined {\n switch (value) {\n case 'border':\n case 'gap':\n case 'rule':\n case 'none':\n return value;\n default:\n return undefined;\n }\n}\n\nfunction nestedRadiusToCssValue(\n strategy: SurfacePolicy['nesting'] extends infer Nesting ? Nesting extends { nestedRadiusStrategy?: infer Strategy } ? Strategy : never : never,\n isNestedInFramedAncestor: boolean,\n): string | undefined {\n if (!isNestedInFramedAncestor) {\n return undefined;\n }\n\n switch (strategy) {\n case 'inherit':\n return 'inherit';\n case 'one-tier-tighter':\n return 'var(--surface-nested-radius-one-tier-tighter, var(--radius-lg, 0.5rem))';\n case 'fixed':\n default:\n return undefined;\n }\n}\n\nfunction selectableSemanticsToAttribute(value: SurfacePolicy['interactiveState'] extends infer InteractiveState ? InteractiveState extends { selectableSemantics?: infer Semantics } ? Semantics : never : never): string | undefined {\n switch (value) {\n case 'wrap-children':\n case 'self-selectable':\n case 'forbidden':\n return value;\n default:\n return undefined;\n }\n}\n\nfunction gestureOptInToAttribute(value: SurfacePolicy['interactiveState'] extends infer InteractiveState ? InteractiveState extends { gestureOptIn?: infer OptIn } ? OptIn : never : never): string | undefined {\n switch (value) {\n case 'self':\n case 'children':\n case 'none':\n return value;\n default:\n return undefined;\n }\n}\n\nfunction landmarkRoleToAttribute(value: SurfacePolicy['a11y'] extends infer A11y ? A11y extends { landmarkRole?: infer Role } ? Role : never : never): React.AriaRole | undefined {\n switch (value) {\n case 'region':\n case 'dialog':\n case 'alertdialog':\n case 'complementary':\n case 'navigation':\n case 'status':\n case 'main':\n return value;\n case 'none':\n case 'reset':\n default:\n return undefined;\n }\n}\n\nfunction shouldActivateStackLayout(gap: string | undefined): boolean {\n return Boolean(gap && gap !== 'none');\n}\n\n/**\n * Stack-layout channel for `display` / `flex-direction`, on both the surface\n * root (`--surface-policy-display`) and its slots (`--surface-policy-slot-display`).\n *\n * The NON-stacking branch MUST return a concrete value rather than `undefined`,\n * for two independent reasons — the second one shipped as a live defect:\n *\n * 1. Policy vars are CSS custom properties, so they INHERIT. An omitted value is\n * not \"no opinion\", it is \"adopt the nearest ancestor surface's opinion\". A\n * non-stacking surface nested inside a stacking one therefore picked up\n * `display: flex; flex-direction: column` from its ancestor — the same\n * inheritance class as the `--surface-policy-responsive-max-width-margin`\n * defect (see `responsiveMaxWidthToMarginCssValue`).\n * 2. Even with NO ancestor to inherit from, omitting the var does not leave the\n * element alone. `display: var(--surface-policy-display)` with the var unset\n * is invalid at computed-value time, which resolves to `unset` — and `display`\n * is not inherited, so that is its INITIAL value, `inline`. The base-layer\n * declaration still wins the cascade, so it overrides the UA stylesheet's\n * `div { display: block }`. Measured on the running app: the framework's own\n * `PrimaryContentWidthBoundary` (a SHELL surface whose `containment.gap` is\n * flattened to `'none'` precisely so it stays \"a plain block\") computed\n * `display: inline`, which made its `max-inline-size` cap and `margin-inline:\n * auto` centering inert — `max-inline-size` does not apply to non-replaced\n * inline boxes. With a 400px cap forced inside a 976px container the surface\n * measured 976px wide; publishing `block` measured 400px, centered. The entire\n * page-content width cap was silently doing nothing.\n *\n * A CSS-wide keyword cannot express \"no opinion\" here: `revert-layer`, `revert`\n * and `initial` were each measured through this var in the running app and all\n * three behaved exactly like the unset case (`display: inline`), because a\n * CSS-wide keyword arriving via `var()` substitution is not honoured as one. A\n * consumer-side fallback (`var(--x, block)`) does not help either — an inherited\n * value that IS set wins over the fallback, which is the whole of reason 1.\n *\n * `block` / `row` are the initial-ish values a block container wants. Utility\n * classes still win: they live in a later cascade layer than this base rule.\n */\nfunction stackDisplayCssValue(isStacking: boolean): string {\n return isStacking ? 'flex' : 'block';\n}\n\n/** Companion to {@link stackDisplayCssValue} — see its note on explicit neutrals. */\nfunction stackFlexDirectionCssValue(isStacking: boolean): string {\n return isStacking ? 'column' : 'row';\n}\n\n/**\n * Every var below is read by a Tailwind base-layer rule that can match a NESTED\n * surface, so any `undefined` here is not \"neutral\" — it is \"inherit the nearest\n * ancestor surface's value\". The vars were enumerated against that rule set\n * (`src/tailwind/index.ts`) and classified; the residuals are recorded so the next\n * author does not have to re-derive them:\n *\n * - SAFE BY CONSTRUCTION — `safe-area` always emits `0px`/`env()`;\n * `child-adaptive-gap` is gated by the same boolean as the\n * `data-surface-child-adaptive-density` attribute its selector requires, so the\n * read is unreachable when the emission is absent.\n * - BENIGN — `numeric-align`, `text-wrap` and `overflow-wrap` drive CSS properties\n * that are THEMSELVES inherited, so inheriting the var is equivalent to\n * inheriting the property. No shadowing needed.\n * - INERT — `framing-mode`, `nested-radius{,-strategy}`, `first-child-edge-strategy`,\n * `divider-strategy`, `selectable-semantics` and `gesture-opt-in` are republished\n * as `--surface-*` custom properties that NOTHING reads (verified repo-wide);\n * behaviour is driven by the matching `data-surface-*` attributes, which do not\n * inherit.\n * - LATENT — the remaining tier-mapped vars (`padding-*`, `overflow`, `max-height`,\n * `gap`, `z-tier`, the per-slot gaps, `action-alignment{,-mobile}`) can only reach\n * their `undefined` branch through an override that sets the slot explicitly to\n * `undefined`: every variant's framework default populates them, and both `'reset'`\n * and `'inherit'` resolve to a concrete value (`'reset'` additionally logs an error\n * when it cannot). Left as-is rather than changed blind — if one becomes reachable,\n * it belongs in the explicit-neutral treatment above.\n */\nfunction buildSurfacePolicyStyle(policy: SurfacePolicy): SurfaceStyle {\n const containment = policy.containment;\n const nesting = policy.nesting;\n const content = policy.content;\n const interactiveState = policy.interactiveState;\n const geometry = policy.geometry;\n const stacking = policy.stacking;\n const composition = policy.composition;\n const shouldStack = shouldActivateStackLayout(containment?.gap);\n\n return {\n '--surface-policy-display': stackDisplayCssValue(shouldStack),\n '--surface-policy-flex-direction': stackFlexDirectionCssValue(shouldStack),\n '--surface-policy-padding-block': paddingTierToCssValue(containment?.paddingBlock),\n '--surface-policy-padding-inline': paddingTierToCssValue(containment?.paddingInline),\n '--surface-policy-overflow': containment?.overflow,\n '--surface-policy-max-height': containment?.maxHeight === 'none' ? 'none' : containment?.maxHeight,\n '--surface-policy-gap': gapTierToCssValue(containment?.gap),\n '--surface-policy-header-gap': gapTierToCssValue(containment?.slotGap?.header ?? containment?.gap),\n '--surface-policy-body-gap': gapTierToCssValue(containment?.slotGap?.body ?? containment?.gap),\n '--surface-policy-footer-gap': gapTierToCssValue(containment?.slotGap?.footer ?? containment?.gap),\n '--surface-policy-framing-mode': framingModeToAttribute(nesting?.framingMode),\n '--surface-policy-nested-radius-strategy': nestedRadiusStrategyToAttribute(nesting?.nestedRadiusStrategy),\n '--surface-policy-first-child-edge-strategy': firstChildEdgeStrategyToAttribute(nesting?.firstChildEdgeStrategy),\n '--surface-policy-divider-strategy': dividerStrategyToAttribute(nesting?.dividerStrategy),\n '--surface-policy-z-tier': stackingTierToCssValue(stacking?.stackingTier),\n '--surface-policy-numeric-align': numericAlignmentToCssValue(content?.numericAlignment),\n '--surface-policy-text-wrap': textWrapToCssValue(content?.wrapStrategy),\n '--surface-policy-overflow-wrap': overlongTokenStrategyToCssValue(content?.overlongTokenStrategy),\n '--surface-policy-safe-area': geometry?.safeAreaPadding ? 'env(safe-area-inset-bottom)' : '0px',\n '--surface-policy-action-alignment': actionAlignmentToCssValue(geometry?.actionAlignment),\n '--surface-policy-action-alignment-mobile': actionAlignmentToMobileCssValue(geometry?.actionAlignment),\n '--surface-policy-responsive-max-width': responsiveMaxWidthToCssValue(geometry?.responsiveMaxWidth),\n '--surface-policy-responsive-max-width-margin': responsiveMaxWidthToMarginCssValue(geometry?.responsiveMaxWidth),\n '--surface-policy-embedded-table-padding-inline': embeddedTablePaddingToCssValue(composition?.embeddedTablePadding),\n '--surface-policy-child-adaptive-gap': composition?.childAdaptiveDensity ? 'var(--sp-field)' : undefined,\n '--surface-policy-selectable-semantics': selectableSemanticsToAttribute(interactiveState?.selectableSemantics),\n '--surface-policy-gesture-opt-in': gestureOptInToAttribute(interactiveState?.gestureOptIn),\n };\n}\n\n/**\n * Policy families whose values DO produce CSS — `containment` (padding,\n * overflow, max-height, gap), `nesting` (framing mode → frame visibility),\n * `content` (text-wrap, numeric alignment), `geometry` (responsiveMaxWidth →\n * max-inline-size), `stacking` (z-tier). The remaining families (`a11y`,\n * `interactiveState`, `autoRender`, `skeleton`, `composition`) emit only ARIA\n * attributes / behavioral data-attributes / runtime hooks and CANNOT\n * visually conflict with a Tailwind utility class.\n *\n * Restricting the collision check to these families eliminates a noisy\n * false-positive: a Surface that overrides ONLY `a11y.landmarkRole`\n * (e.g., the public shell using `NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE`)\n * combined with an `overflow-auto` Tailwind utility on the same node is NOT\n * a collision — `a11y.landmarkRole` does not emit any CSS property the\n * utility could fight with.\n */\nconst VISUALLY_IMPACTFUL_POLICY_FAMILIES: ReadonlySet<string> = new Set([\n 'containment',\n 'nesting',\n 'content',\n 'geometry',\n 'stacking',\n]);\n\nfunction hasPolicyDrivenOverride(policyOverride: DeepPartialSurfacePolicy | undefined): boolean {\n if (!policyOverride) {\n return false;\n }\n\n return Object.entries(policyOverride).some(([familyName, familyOverride]) => {\n if (!VISUALLY_IMPACTFUL_POLICY_FAMILIES.has(familyName)) {\n return false;\n }\n return familyOverride !== undefined\n && familyOverride !== null\n && typeof familyOverride === 'object'\n && Object.keys(familyOverride).length > 0;\n });\n}\n\nfunction usePolicyChannelCollisionWarning(\n className: string | undefined,\n childClassName: string | undefined,\n policyOverride: DeepPartialSurfacePolicy | undefined,\n emitPolicyVars: boolean,\n): void {\n const warnedRef = React.useRef(false);\n\n // The collision this warns about — a className layout utility (padding / gap /\n // flex / …) visually overriding a policy-driven CSS var while children still\n // read the policy value — can only happen when the policy vars are actually\n // emitted. A surface with `emitPolicyVars={false}` (e.g. ContentSection section\n // chrome, which owns layout via recipe classes and may set only a\n // `nesting.framingMode` override) emits NO vars, so there is nothing for a\n // utility to override. Skipping the check here removes a guaranteed\n // false-positive on every such surface.\n if (!emitPolicyVars) {\n return;\n }\n\n const conflictingClassName = [className, childClassName].filter(Boolean).join(' ');\n\n if (\n process.env.NODE_ENV !== 'production'\n && !warnedRef.current\n && conflictingClassName\n && hasPolicyDrivenOverride(policyOverride)\n && POLICY_DRIVEN_UTILITY_PREFIXES.test(conflictingClassName)\n ) {\n warnedRef.current = true;\n logger.warn('[Surface] className utilities can visually override policyOverride while child policy context still sees the policy value', {\n className: conflictingClassName,\n });\n }\n}\n\nfunction mergeSurfaceStyle(\n policy: SurfacePolicy,\n materialStyle: React.CSSProperties | undefined,\n style: React.CSSProperties | undefined,\n emitPolicyVars: boolean,\n rendersOwnFrame: boolean,\n nestedRadius: string | undefined,\n): SurfaceStyle | React.CSSProperties | undefined {\n if (!emitPolicyVars) {\n return { ...materialStyle, ...style };\n }\n\n return {\n ...buildSurfacePolicyStyle(policy),\n '--surface-policy-nested-radius': nestedRadius,\n borderWidth: rendersOwnFrame ? undefined : '0px',\n boxShadow: rendersOwnFrame ? undefined : 'none',\n borderRadius: nestedRadius ? 'var(--surface-policy-nested-radius)' : undefined,\n ...materialStyle,\n ...style,\n } as SurfaceStyle;\n}\n\nconst SurfaceRoot = React.forwardRef<HTMLDivElement, SurfaceProps>(function SurfaceRoot(\n {\n variant = SurfaceVariant.BASE,\n materialRoleOverride,\n policyOverride,\n asChild = false,\n emitPolicyVars = true,\n modal = false,\n a11yManagedByHost = false,\n errorFallbackTitleAs,\n className,\n style,\n children,\n role,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'data-slot': _dataSlot,\n 'data-surface': _dataSurface,\n tabIndex,\n ...props\n },\n ref,\n): React.JSX.Element {\n const {\n getComposedClasses,\n getMaterialProfile,\n getRecipe,\n getSurfacePolicy,\n } = useUI();\n // Optional calls keep the primitive resilient in isolated tests and custom\n // host adapters that provide the legacy minimal UI context surface.\n const visualRecipe = getRecipe?.(UIBehavior.SURFACE, variant);\n const visualRecipeClasses = getComposedClasses?.(UIBehavior.SURFACE, variant);\n const materialProfile = getMaterialProfile?.(materialRoleOverride ?? visualRecipe?.material);\n const parentContext = React.useContext(SurfacePolicyContext);\n const policy = React.useMemo(\n () => getSurfacePolicy\n ? getSurfacePolicy(variant, policyOverride, parentContext?.policy)\n : mergeSurfacePolicy(\n FRAMEWORK_DEFAULT_SURFACE_POLICIES[variant],\n undefined,\n undefined,\n policyOverride,\n {\n variant,\n parentPolicy: parentContext?.policy,\n logger,\n },\n ),\n [getSurfacePolicy, parentContext?.policy, policyOverride, variant],\n );\n const [headerId, setHeaderId] = React.useState<string | undefined>();\n const registerHeaderId = React.useCallback((id: string): void => {\n setHeaderId(id);\n }, []);\n const unregisterHeaderId = React.useCallback((id: string): void => {\n setHeaderId((current) => (current === id ? undefined : current));\n }, []);\n const headerRegistration = React.useMemo(\n () => ({ headerId, registerHeaderId, unregisterHeaderId }),\n [headerId, registerHeaderId, unregisterHeaderId],\n );\n const contextValue = React.useMemo(\n () => computeSurfacePolicyContextValue(variant, policy, parentContext, headerRegistration),\n [headerRegistration, parentContext, policy, variant],\n );\n const isNestedInFramedAncestor = Boolean(parentContext?.isInFramedAncestor);\n const nearestFramedAncestorVariant = isNestedInFramedAncestor\n ? parentContext?.nearestFramedAncestorVariant ?? undefined\n : undefined;\n const nestedRadius = nestedRadiusToCssValue(policy.nesting?.nestedRadiusStrategy, isNestedInFramedAncestor);\n\n const childClassName = asChild && React.isValidElement<{ className?: string }>(children)\n ? children.props.className\n : undefined;\n usePolicyChannelCollisionWarning(className, childClassName, policyOverride, emitPolicyVars);\n const Comp = asChild ? Slot : 'div';\n const surfaceNodeRef = React.useRef<HTMLElement | null>(null);\n const materialRuntime = useMaterialRuntime(materialProfile, surfaceNodeRef);\n const composedRef = React.useCallback((node: HTMLElement | null): void => {\n surfaceNodeRef.current = node;\n\n if (typeof ref === 'function') {\n ref(node as HTMLDivElement | null);\n return;\n }\n\n if (ref) {\n ref.current = node as HTMLDivElement | null;\n }\n }, [ref]);\n const resolvedRole = role ?? landmarkRoleToAttribute(policy.a11y?.landmarkRole);\n const resolvedAriaLabelledBy = ariaLabelledBy\n ?? (policy.a11y?.labelStrategy === 'from-header' ? headerId : undefined);\n\n /*\n * The a11y attributes Surface puts on the merged element — and under `a11yManagedByHost`, the\n * KEYS it must not put there at all.\n *\n * An `asChild` Surface is a Slot: its props are merged into the host primitive's, and the host\n * then spreads that merged object AFTER its own attributes. So a key present with an\n * `undefined` value does not mean \"Surface contributes nothing\" — it means \"delete whatever the\n * host set\". Radix `Dialog.Content` renders\n * `<div role=\"dialog\" aria-labelledby={context.titleId} {...contentProps}>`, so Surface passing\n * `aria-labelledby: undefined` REMOVED the accessible name the host had just wired from its own\n * `Dialog.Title` (#632).\n *\n * Measured on the command palette: `aria-describedby` survived (Surface never emits it) while\n * `aria-labelledby` was absent, with a correctly-rendered `Dialog.Title` sitting inside carrying\n * the very id that should have been referenced. The defect hid behind the common path —\n * `OverlayContainer` passes `aria-labelledby` EXPLICITLY, so its dialogs were named and only\n * overlays relying on the host's own title wiring lost it.\n *\n * Hence: when the host owns a11y, forward only what the CALLER explicitly supplied, as present\n * keys, and omit the rest entirely rather than passing `undefined`. Synthesizing a value is\n * equally wrong here — Surface's own `landmarkRole` would overwrite an `alertdialog` role with\n * `dialog`, which is the same defect one attribute over.\n */\n const hostManagedA11yAttributes = {\n ...(role !== undefined ? { role } : {}),\n ...(ariaLabel !== undefined ? { 'aria-label': ariaLabel } : {}),\n ...(ariaLabelledBy !== undefined ? { 'aria-labelledby': ariaLabelledBy } : {}),\n };\n /*\n * Without `a11yManagedByHost`, Surface contributes the role and name IT resolved — but still only the keys\n * it has a VALUE for. The same Slot rule applies here as above: an `undefined` key deletes the host's\n * attribute. Emitting `role: undefined` stripped the role from every wrapped Radix primitive that sets one\n * and was not given the opt-in — dropdown and context menus (`menu`), select (`listbox`), menubar\n * (`menubar`), tabs content (`tabpanel`) — measured on the running app as a dropdown with no `role=\"menu\"`\n * (#1903). A role or name Surface DOES resolve (an explicit prop, a policy landmark) still wins over the\n * host's, exactly as before; only the deletion is gone. Pinned in `Surface.host-role.test.tsx`.\n */\n const a11yAttributes = a11yManagedByHost\n ? hostManagedA11yAttributes\n : {\n ...(resolvedRole !== undefined ? { role: resolvedRole } : {}),\n ...(ariaLabel !== undefined ? { 'aria-label': ariaLabel } : {}),\n ...(resolvedAriaLabelledBy !== undefined ? { 'aria-labelledby': resolvedAriaLabelledBy } : {}),\n };\n const shouldActivateFocusTrap = !a11yManagedByHost\n && (policy.a11y?.focusTrap === 'on-mount' || (modal && policy.a11y?.focusTrap === 'when-modal'));\n const shouldActivateScrollContainment = !a11yManagedByHost\n && modal\n && policy.a11y?.scrollContainment === 'lock-body';\n /*\n * `tabIndex` follows the same Slot rule: only a key with a VALUE. Passing `tabIndex={undefined}` deleted the\n * host's own tab stop. Radix's roving-focus group gives its root `tabIndex: 0` (the group's only Tab entry,\n * every item being -1), so a toggle group wrapped in a Surface track was skipped by Tab entirely, and so\n * was the menubar. The value is the caller's, or -1 when the focus trap needs the surface itself focusable.\n */\n const resolvedTabIndex = shouldActivateFocusTrap && tabIndex == null ? -1 : tabIndex;\n const tabIndexAttribute = resolvedTabIndex === undefined ? {} : { tabIndex: resolvedTabIndex };\n\n useSurfaceFocusTrap(surfaceNodeRef, shouldActivateFocusTrap);\n useSurfaceBodyScrollLock(shouldActivateScrollContainment);\n React.useEffect(() => {\n if (\n process.env.NODE_ENV === 'production'\n // When the host primitive owns a11y (Radix Dialog / Drawer / Sheet /\n // AlertDialog), the accessible name comes from the host's own title\n // (e.g. `Dialog.Title` → `aria-labelledby`), NOT from a `Surface.Header`.\n // The `from-header` strategy is structurally inactive here, so this\n // warning would fire for EVERY host-managed overlay regardless of whether\n // it is correctly titled. Defer labelling validation to the host — Radix\n // emits its own (authoritative) warning when the title is genuinely absent.\n || a11yManagedByHost\n || policy.a11y?.labelStrategy !== 'from-header'\n || !resolvedRole\n || ariaLabel\n || ariaLabelledBy\n || headerId\n ) {\n return undefined;\n }\n\n const timeout = window.setTimeout(() => {\n logger.warn('[Surface] labelStrategy \"from-header\" produced an unlabelled landmark surface', {\n variant,\n role: resolvedRole,\n });\n }, 0);\n\n return () => window.clearTimeout(timeout);\n }, [a11yManagedByHost, ariaLabel, ariaLabelledBy, headerId, policy.a11y?.labelStrategy, resolvedRole, variant]);\n const policyStyleAttrs = emitPolicyVars\n ? {\n 'data-slot': 'surface',\n 'data-surface': '',\n /*\n * The width tier this surface applies, announced so the CAP is legible in the DOM.\n *\n * Width is a chain — a zone boundary, a pane, a layout root's reading measure — and until\n * every level said which tier it was applying, diagnosing \"why is this narrow\" meant walking\n * the ancestors reading computed styles, which is how the wrong cap got fixed twice in a row.\n * With this, `document.querySelectorAll('[data-inline-size-tier]')` names every cap in the\n * page and its owner in one call. Absent when no tier is declared, so it marks the elements\n * that actually decide something rather than every surface.\n */\n 'data-inline-size-tier': policy.geometry?.responsiveMaxWidth,\n }\n : {};\n const shouldWrapErrorBoundary = policy.interactiveState?.errorBoundary === 'self';\n const boundedChildren = shouldWrapErrorBoundary ? boundSurfaceContent(children, asChild, errorFallbackTitleAs) : { children, boundsContent: false };\n const surfaceElement = (\n <Comp\n ref={composedRef}\n {...props}\n {...policyStyleAttrs}\n data-material-kind={materialRuntime['data-material-kind']}\n data-material-tier={materialRuntime['data-material-tier']}\n data-material-variant={materialRuntime['data-material-variant']}\n data-material-depth={materialRuntime['data-material-depth']}\n data-material-composition={materialRuntime['data-material-composition']}\n data-material-group={materialRuntime['data-material-group']}\n data-material-refractive-budget={materialRuntime['data-material-refractive-budget']}\n {...tabIndexAttribute}\n data-surface-focus-trap={shouldActivateFocusTrap ? '' : undefined}\n data-surface-scroll-containment={shouldActivateScrollContainment ? '' : undefined}\n data-surface-framing-mode={emitPolicyVars ? framingModeToAttribute(policy.nesting?.framingMode) : undefined}\n data-surface-frame={emitPolicyVars ? (contextValue.rendersOwnFrame ? 'rendered' : 'suppressed') : undefined}\n data-surface-in-framed-ancestor={emitPolicyVars && isNestedInFramedAncestor ? '' : undefined}\n data-surface-nearest-framed-ancestor={emitPolicyVars ? nearestFramedAncestorVariant : undefined}\n data-surface-nested-radius-strategy={emitPolicyVars ? nestedRadiusStrategyToAttribute(policy.nesting?.nestedRadiusStrategy) : undefined}\n data-surface-first-child-edge-strategy={emitPolicyVars ? firstChildEdgeStrategyToAttribute(policy.nesting?.firstChildEdgeStrategy) : undefined}\n data-surface-divider-strategy={emitPolicyVars ? dividerStrategyToAttribute(policy.nesting?.dividerStrategy) : undefined}\n data-surface-selectable-semantics={emitPolicyVars ? selectableSemanticsToAttribute(policy.interactiveState?.selectableSemantics) : undefined}\n data-surface-gesture-opt-in={emitPolicyVars ? gestureOptInToAttribute(policy.interactiveState?.gestureOptIn) : undefined}\n data-surface-child-adaptive-density={emitPolicyVars && policy.composition?.childAdaptiveDensity === true ? '' : undefined}\n data-surface-selection-column-aware={emitPolicyVars && policy.composition?.selectionColumnAware === true ? '' : undefined}\n {...a11yAttributes}\n data-surface-variant={variant}\n className={cn(visualRecipeClasses, className)}\n style={mergeSurfaceStyle(policy, materialRuntime.style, style, emitPolicyVars, contextValue.rendersOwnFrame, nestedRadius)}\n >\n {boundedChildren.children}\n </Comp>\n );\n\n return (\n <SurfacePolicyContext.Provider value={contextValue}>\n {shouldWrapErrorBoundary && !boundedChildren.boundsContent ? (\n <SurfaceErrorBoundary>{surfaceElement}</SurfaceErrorBoundary>\n ) : surfaceElement}\n </SurfacePolicyContext.Provider>\n );\n});\n\n/**\n * Puts a `policy.interactiveState.errorBoundary: 'self'` boundary INSIDE the surface's own element, around its content.\n *\n * The boundary used to wrap the whole surface element, so a crash replaced the FRAME along with the content. For a\n * dialog that frame is the `asChild` host — Radix `Dialog.Content`, which carries the `fixed` centring and the dialog\n * role — so the fallback rendered as a bare block in the portal, behind the still-open backdrop: the page dimmed and\n * nothing appeared (#2003, a custom view whose first hook threw). Bounding the content keeps the frame standing and\n * shows the fallback where the content was.\n *\n * \"Content\" is every child of the host, so a dialog's close button (a child of `Dialog.Content`, rendered beside the\n * body) is replaced with the rest. A plain dialog still closes: Escape and a click outside are handled by\n * `Dialog.Content` itself, which stays mounted. An ALERT dialog ignores a click outside, so a crashed one closes on\n * Escape only, and not at all where its host turns Escape off. Keeping the button outside the boundary would mean\n * moving it out of the host, which positions it and holds it inside the focus trap, so that was not done.\n *\n * - Not `asChild`: the surface's own `div` is the frame, so its children are wrapped directly.\n * - `asChild` with an element whose `children` are nodes: the host element is the frame, so ITS children are wrapped\n * (one level down, through `cloneElement`), and the Slot still merges the surface's props onto the host.\n * - `asChild` with a host whose content is not passed as node children (none, or a render function): the content is\n * produced inside the host's own render, where no wrapper can reach, so the boundary stays around the whole element\n * (`boundsContent: false`) — the previous behaviour, which still isolates the crash, only without the frame.\n */\nfunction boundSurfaceContent(\n children: React.ReactNode,\n asChild: boolean,\n fallbackTitleAs: React.ElementType | undefined,\n): { children: React.ReactNode; boundsContent: boolean } {\n if (!asChild) {\n return { children: <SurfaceErrorBoundary>{children}</SurfaceErrorBoundary>, boundsContent: true };\n }\n if (!React.isValidElement<{ children?: React.ReactNode }>(children)) {\n return { children, boundsContent: false };\n }\n const hostContent = children.props.children;\n if (hostContent === undefined || hostContent === null || typeof hostContent === 'function') {\n return { children, boundsContent: false };\n }\n return {\n children: React.cloneElement(children, undefined, <SurfaceErrorBoundary titleAs={fallbackTitleAs}>{hostContent}</SurfaceErrorBoundary>),\n boundsContent: true,\n };\n}\n\nSurfaceRoot.displayName = 'Surface';\n\nfunction surfaceSlotStyle(\n slot: 'header' | 'body' | 'footer',\n policy: SurfacePolicy,\n style: React.CSSProperties | undefined,\n): React.CSSProperties {\n const gap = policy.containment?.slotGap?.[slot] ?? policy.containment?.gap;\n const shouldStack = shouldActivateStackLayout(gap);\n\n return {\n '--surface-policy-slot-display': stackDisplayCssValue(shouldStack),\n '--surface-policy-slot-flex-direction': stackFlexDirectionCssValue(shouldStack),\n [`--surface-policy-${slot}-gap`]: gapTierToCssValue(gap),\n ...style,\n } as React.CSSProperties;\n}\n\nexport const SurfaceHeader = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(function SurfaceHeader(\n { className, id, style, ...props },\n ref,\n): React.JSX.Element {\n const policy = useSurfacePolicy();\n const surfaceContext = React.useContext(SurfacePolicyContext);\n const registerHeaderId = surfaceContext?.registerHeaderId;\n const unregisterHeaderId = surfaceContext?.unregisterHeaderId;\n const generatedId = React.useId();\n const resolvedId = id ?? generatedId;\n\n React.useEffect(() => {\n registerHeaderId?.(resolvedId);\n return () => unregisterHeaderId?.(resolvedId);\n }, [registerHeaderId, resolvedId, unregisterHeaderId]);\n\n return (\n <div\n ref={ref}\n id={resolvedId}\n data-slot=\"surface-header\"\n className={cn(className)}\n style={surfaceSlotStyle('header', policy, style)}\n {...props}\n />\n );\n});\n\nSurfaceHeader.displayName = 'Surface.Header';\n\nexport const SurfaceBody = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(function SurfaceBody(\n { className, style, ...props },\n ref,\n): React.JSX.Element {\n const policy = useSurfacePolicy();\n\n return (\n <div\n ref={ref}\n data-slot=\"surface-body\"\n className={cn(className)}\n style={surfaceSlotStyle('body', policy, style)}\n {...props}\n />\n );\n});\n\nSurfaceBody.displayName = 'Surface.Body';\n\nexport const SurfaceFooter = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(function SurfaceFooter(\n { className, style, ...props },\n ref,\n): React.JSX.Element {\n const policy = useSurfacePolicy();\n const gap = policy.containment?.slotGap?.footer ?? policy.containment?.gap;\n const shouldStack = shouldActivateStackLayout(gap);\n const shouldAlignActions = Boolean(policy.geometry?.actionAlignment && policy.geometry.actionAlignment !== 'inherit');\n\n return (\n <div\n ref={ref}\n data-slot=\"surface-footer\"\n className={cn(className)}\n style={{\n '--surface-policy-slot-display': stackDisplayCssValue(shouldStack || shouldAlignActions),\n '--surface-policy-slot-flex-direction': stackFlexDirectionCssValue(shouldStack),\n '--surface-policy-footer-gap': gapTierToCssValue(gap),\n '--surface-policy-action-alignment': shouldAlignActions\n ? actionAlignmentToCssValue(policy.geometry?.actionAlignment)\n : undefined,\n '--surface-policy-action-alignment-mobile': shouldAlignActions\n ? actionAlignmentToMobileCssValue(policy.geometry?.actionAlignment)\n : undefined,\n ...style,\n } as React.CSSProperties}\n {...props}\n />\n );\n});\n\nSurfaceFooter.displayName = 'Surface.Footer';\n\nexport const SurfaceAction = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(function SurfaceAction(\n { className, ...props },\n ref,\n): React.JSX.Element {\n return (\n <div\n ref={ref}\n data-slot=\"surface-action\"\n className={cn(className)}\n {...props}\n />\n );\n});\n\nSurfaceAction.displayName = 'Surface.Action';\n\nexport const Surface = Object.assign(SurfaceRoot, {\n Header: SurfaceHeader,\n Body: SurfaceBody,\n Footer: SurfaceFooter,\n Action: SurfaceAction,\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-motion-origins.d.ts","sourceRoot":"","sources":["../../../../../src/core/app-shell/shell-motion/shell-motion-origins.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnE,OAAO,
|
|
1
|
+
{"version":3,"file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,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAoCvJ;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,GAAG,IAAI,CAYxH;AAED,0FAA0F;AAC1F,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,GAAG,IAAI,CAM7H;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,EAAE,CAkB9D;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,GAAG,MAAM,IAAI,CAiCrF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAqBnI"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef } from 'react';
|
|
2
|
-
import { SHELL_MODAL_POPUP_SLOTS, SHELL_PANE_SELECTOR, SHELL_PROXY_ATTRIBUTE, SHELL_PROXY_FLIGHT_SHARE, ShellDialogArrival, ShellPopupSlot, } from './shell-motion-vocabulary.js';
|
|
2
|
+
import { SHELL_MODAL_POPUP_SLOTS, SHELL_PANE_SELECTOR, SHELL_PICTURE_STRIPPED_ATTRIBUTES, SHELL_PROXY_ATTRIBUTE, SHELL_PROXY_FLIGHT_SHARE, ShellDialogArrival, ShellPopupSlot, } from './shell-motion-vocabulary.js';
|
|
3
3
|
/** A row is at least this high (a single line of text in a padded row) … */
|
|
4
4
|
const ROW_MIN_HEIGHT_PX = 24;
|
|
5
5
|
/** … at most this high (a two-line card row with meta) … */
|
|
@@ -24,7 +24,8 @@ function pictureOf(element) {
|
|
|
24
24
|
copy.setAttribute('aria-hidden', 'true');
|
|
25
25
|
copy.setAttribute('inert', '');
|
|
26
26
|
for (const node of [copy, ...copy.querySelectorAll('*')]) {
|
|
27
|
-
|
|
27
|
+
// The shared markers, and the row's own state hooks: the picture is a flat image of a row that is about to change.
|
|
28
|
+
for (const attribute of [...SHELL_PICTURE_STRIPPED_ATTRIBUTES, 'data-slot', 'data-state'])
|
|
28
29
|
node.removeAttribute(attribute);
|
|
29
30
|
}
|
|
30
31
|
for (const media of copy.querySelectorAll('iframe, video, audio'))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-motion-origins.js","sourceRoot":"","sources":["../../../../../src/core/app-shell/shell-motion/shell-motion-origins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAC;AAEnE,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,GAGf,MAAM,2BAA2B,CAAC;AAiBnC,4EAA4E;AAC5E,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,4DAA4D;AAC5D,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,qDAAqD;AACrD,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,iHAAiH;AACjH,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,8CAA8C;AAC9C,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,2GAA2G;AAC3G,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAEjD,MAAM,KAAK,GAAG,CAAC,IAAgC,EAAoB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EA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L_PROXY_ATTRIBUTE,\n SHELL_PROXY_FLIGHT_SHARE,\n ShellDialogArrival,\n ShellPopupSlot,\n type ShellMotionAxis,\n type ShellStageRect,\n} from './shell-motion-vocabulary';\n\n/**\n * The motion building blocks that start from WHERE something was pressed (#2055): a pane or a dialog growing out of the\n * row or button that opened it, an emphasized pane growing to its new width, and a pane's rows cascading in. Like the\n * rest of the motion core they write nothing on an engine element but WAAPI animations, which leave nothing behind, and\n * proxies of their own.\n */\n\n/** A box in viewport coordinates. */\nexport interface ShellViewportBox {\n left: number;\n top: number;\n width: number;\n height: number;\n}\n\n/** A row is at least this high (a single line of text in a padded row) … */\nconst ROW_MIN_HEIGHT_PX = 24;\n/** … at most this high (a two-line card row with meta) … */\nconst ROW_MAX_HEIGHT_PX = 220;\n/** … and at least this share of its pane's width. */\nconst ROW_MIN_WIDTH_SHARE = 0.5;\n/** How many rows a cascade animates at most: the rest are below the fold or too many to stagger meaningfully. */\nconst CASCADE_MAX_ROWS = 24;\n/** The stagger between two cascading rows. */\nconst CASCADE_STAGGER_MS = 28;\n/** How long a cascade keeps watching for rows that arrive after the place changed (data still loading). */\nconst CASCADE_WATCH_MS = 1500;\n/**\n * How recent a press must be to be what opened a pane or a dialog. Short on purpose: a modal that opens later than\n * this was not opened by that press (a timer, a websocket push), and must not fly from it.\n */\nexport const SHELL_PRESS_ORIGIN_MAX_AGE_MS = 800;\n\nconst toBox = (rect: DOMRect | ShellViewportBox): ShellViewportBox => ({ left: rect.left, top: rect.top, width: rect.width, height: rect.height });\n\n/** A pressed box, with — for a row — a still picture of it taken at the press, which a proxy carries as it grows. */\nexport interface ShellPressedBox extends ShellViewportBox {\n picture?: HTMLElement;\n /**\n * The pressed row itself, live — for a view-transition arrival, which names the row BEFORE the commit so the browser\n * captures it. It may have moved or unmounted since the press; the box above is where it was.\n */\n element?: HTMLElement;\n}\n\n/** An inert, unaddressable copy of an element: no ids, no focus, hidden from assistive technology, no engine markers. */\nfunction pictureOf(element: HTMLElement): HTMLElement {\n const copy = element.cloneNode(true) as HTMLElement;\n copy.setAttribute('aria-hidden', 'true');\n copy.setAttribute('inert', '');\n for (const node of [copy, ...copy.querySelectorAll<HTMLElement>('*')]) {\n for (const attribute of ['id', 'data-content-area', 'data-panel-id', 'data-component-area', 'data-slot', 'data-state']) node.removeAttribute(attribute);\n }\n for (const media of copy.querySelectorAll('iframe, video, audio')) media.remove();\n return copy;\n}\n\n/** Whether an element has the shape of a row inside a pane `paneWidth` wide. */\nfunction isRowShaped(element: Element, paneWidth: number): element is HTMLElement {\n if (!(element instanceof HTMLElement)) return false;\n const height = element.offsetHeight;\n return height >= ROW_MIN_HEIGHT_PX && height <= ROW_MAX_HEIGHT_PX && element.offsetWidth >= paneWidth * ROW_MIN_WIDTH_SHARE;\n}\n\n/**\n * Whether two elements are ALIKE — the same tag, and mostly the same classes (half their class tokens shared or more).\n * Rows rendered by one component share their classes, whatever state class one of them adds (`active`, `selected`); a\n * header, a toolbar and a filter bar are rendered by different components and do not.\n */\nfunction isAlike(a: Element, b: Element): boolean {\n if (a.tagName !== b.tagName) return false;\n const tokensA = new Set(a.classList);\n const tokensB = new Set(b.classList);\n if (tokensA.size === 0 && tokensB.size === 0) return true;\n const shared = [...tokensA].filter((token) => tokensB.has(token)).length;\n return shared / Math.max(tokensA.size, tokensB.size) >= 0.5;\n}\n\n/**\n * Whether a row-shaped element is one of a REPEATED group — at least one alike, row-shaped sibling: a list, even of two\n * items, and never a strip that is alone of its kind.\n */\nfunction isInRepeatedGroup(element: HTMLElement, paneWidth: number): boolean {\n const siblings = element.parentElement ? [...element.parentElement.children] : [];\n return siblings.some((sibling) => sibling !== element && isRowShaped(sibling, paneWidth) && isAlike(sibling, element));\n}\n\n/**\n * The row an element belongs to, recognised by SHAPE: the nearest ancestor inside the pane that is row-high, wide, and\n * one of a repeated group of such siblings. The engine renders no row marker, and its lists are tables, card lists or an\n * application's own rows, so a marker could never cover them all while a shape does. The repeated-group rule keeps a\n * full-width toolbar or header, which is alone of its kind, from passing for a row. `null` outside a pane, or when\n * nothing on the way qualifies (a multi-column card grid, whose cards are narrower than half the pane).\n */\nexport function shellRowBox(target: Element): HTMLElement | null {\n const pane = target.closest(SHELL_PANE_SELECTOR);\n if (!pane) return null;\n const paneWidth = pane.clientWidth;\n for (let element: Element | null = target; element && element !== pane; element = element.parentElement) {\n if (isRowShaped(element, paneWidth) && isInRepeatedGroup(element, paneWidth)) return element;\n }\n return null;\n}\n\nconst CONTROL_SELECTOR = 'button, a, [role=\"button\"], [role=\"menuitem\"], [role=\"option\"]';\n\ninterface ShellPress {\n row: ShellPressedBox | null;\n control: ShellViewportBox;\n at: number;\n}\n\n/** The last press, as boxes to grow from. Each `take…` CONSUMES it, so one press opens at most one thing. */\nexport interface ShellPressOrigin {\n /** The row pressed within `maxAgeMs`, if any, with its picture. */\n takeRow(maxAgeMs: number): ShellPressedBox | null;\n /** The row pressed within `maxAgeMs`, WITHOUT consuming the press — to decide before taking it. */\n peekRow(maxAgeMs: number): ShellPressedBox | null;\n /** The control (button, link, menu item) pressed within `maxAgeMs`, if any. */\n takeControl(maxAgeMs: number): ShellViewportBox | null;\n}\n\n/**\n * Remembers the last press — a pointer press, or Enter / Space on a focused element — as the box of the row and of the\n * control it happened in, measured AT the press, before anything re-renders (the row may move or unmount the moment what\n * it opens mounts). ANY other key press forgets it: whatever opens next was opened by that key (a shortcut such as the\n * command palette's), not by the earlier press, and must not grow out of it.\n *\n * Installs nothing while `enabled` is false — a layout whose axis never grows from a press pays no listener and no layout\n * read on every press.\n */\nexport function useShellPressOrigin(enabled: boolean): ShellPressOrigin {\n const last = useRef<ShellPress | null>(null);\n useEffect(() => {\n last.current = null;\n if (!enabled) return undefined;\n const record = (target: Element | null): void => {\n if (!target) return;\n const row = shellRowBox(target);\n const control = target.closest(CONTROL_SELECTOR) ?? target;\n last.current = {\n row: row ? { ...toBox(row.getBoundingClientRect()), picture: pictureOf(row), element: row } : null,\n control: toBox(control.getBoundingClientRect()),\n at: performance.now(),\n };\n };\n const onPointer = (event: PointerEvent): void => record(event.target instanceof Element ? event.target : null);\n const onKey = (event: KeyboardEvent): void => {\n if (event.key === 'Enter' || event.key === ' ') record(document.activeElement);\n else last.current = null;\n };\n document.addEventListener('pointerdown', onPointer, true);\n document.addEventListener('keydown', onKey, true);\n return () => {\n document.removeEventListener('pointerdown', onPointer, true);\n document.removeEventListener('keydown', onKey, true);\n };\n }, [enabled]);\n return useMemo<ShellPressOrigin>(() => {\n const take = <T extends ShellViewportBox>(pick: (press: ShellPress) => T | null, maxAgeMs: number): T | null => {\n const press = last.current;\n if (!press || performance.now() - press.at > maxAgeMs) return null;\n last.current = null;\n return pick(press);\n };\n const peek = (maxAgeMs: number): ShellPressedBox | null => {\n const press = last.current;\n return press && performance.now() - press.at <= maxAgeMs ? press.row : null;\n };\n return { takeRow: (maxAgeMs) => take((press) => press.row, maxAgeMs), peekRow: peek, takeControl: (maxAgeMs) => take((press) => press.control, maxAgeMs) };\n }, []);\n}\n\n/**\n * Flies a proxy box from one viewport box to another inside the stage, for `SHELL_PROXY_FLIGHT_SHARE` of the axis's\n * motion, then removes it. A pressed row's picture (`from.picture`) rides in it, fading as it grows. The proxy is the core's own element (`data-shell-proxy`, aria-hidden, no pointer events),\n * painted inline from the theme's tokens so it reads as the surface it becomes.\n *\n * `arriving` — the pane or dialog the proxy stands for — is revealed on the SAME clock: hidden for the flight, then faded\n * in over the rest of the motion, by a script animation that sits above whatever the layout's stylesheet plays on it.\n * Two clocks (a stylesheet hold started at mount, a flight started later) drift apart; one cannot.\n */\nexport function flyShellProxy(stage: HTMLElement, from: ShellPressedBox, to: ShellViewportBox, axis: ShellMotionAxis, arriving?: Element): Promise<void> {\n const duration = Math.round(axis.durationMs * SHELL_PROXY_FLIGHT_SHARE);\n if (duration === 0 || typeof HTMLElement.prototype.animate !== 'function') return Promise.resolve();\n const origin = stage.getBoundingClientRect();\n const frame = (box: ShellViewportBox, radius: number): Keyframe => ({\n left: `${box.left - origin.left}px`,\n top: `${box.top - origin.top}px`,\n width: `${box.width}px`,\n height: `${box.height}px`,\n borderRadius: `${radius}px`,\n });\n const proxy = document.createElement('div');\n proxy.setAttribute(SHELL_PROXY_ATTRIBUTE, '');\n proxy.setAttribute('aria-hidden', 'true');\n Object.assign(proxy.style, {\n position: 'absolute',\n zIndex: '400',\n pointerEvents: 'none',\n boxSizing: 'border-box',\n background: 'var(--card, var(--background))',\n border: '1px solid var(--primary, currentColor)',\n boxShadow: '0 18px 40px -18px rgb(0 0 0 / 0.35)',\n });\n Object.assign(proxy.style, frame(from, 10), { overflow: 'hidden' });\n // The pressed row rides in the proxy, fading as the box grows: the row visibly BECOMES the record.\n if (from.picture) {\n Object.assign(from.picture.style, { position: 'absolute', left: '0', top: '0', width: `${from.width}px`, height: `${from.height}px`, margin: '0', pointerEvents: 'none' });\n proxy.appendChild(from.picture);\n from.picture.animate([{ opacity: 1 }, { opacity: 0 }], { duration: Math.round(duration * 0.8), easing: 'ease-in', fill: 'forwards' });\n }\n stage.appendChild(proxy);\n if (arriving instanceof HTMLElement && typeof arriving.animate === 'function') {\n arriving.animate([{ opacity: 0 }, { opacity: 0, offset: SHELL_PROXY_FLIGHT_SHARE }, { opacity: 1 }], { duration: axis.durationMs, easing: 'linear' });\n }\n const animation = proxy.animate([frame(from, 10), frame(to, 14)], { duration, easing: axis.easing, fill: 'forwards' });\n return animation.finished.catch(() => undefined).then(() => proxy.remove());\n}\n\n/**\n * An emphasized pane grows from the box it had (`before`, in stage coordinates) to the box it now fills: it is\n * REVEALED through a clip that starts on the old box, so its content is never scaled or distorted on the way.\n */\nexport function growShellPane(pane: HTMLElement, before: ShellStageRect, stage: HTMLElement, axis: ShellMotionAxis): void {\n if (axis.durationMs === 0 || typeof pane.animate !== 'function') return;\n const origin = stage.getBoundingClientRect();\n const after = pane.getBoundingClientRect();\n const top = Math.max(0, origin.top + before.top - after.top);\n const left = Math.max(0, origin.left + before.left - after.left);\n const right = Math.max(0, after.right - (origin.left + before.left + before.width));\n const bottom = Math.max(0, after.bottom - (origin.top + before.top + before.height));\n pane.animate([{ clipPath: `inset(${top}px ${right}px ${bottom}px ${left}px round 12px)` }, { clipPath: 'inset(0px 0px 0px 0px round 0px)' }], {\n duration: axis.durationMs,\n easing: axis.easing,\n });\n}\n\n/** A pane given back its place slides home from where it stood while it had the width. */\nexport function slideShellPaneHome(pane: HTMLElement, before: ShellStageRect, stage: HTMLElement, axis: ShellMotionAxis): void {\n if (axis.durationMs === 0 || typeof pane.animate !== 'function') return;\n const origin = stage.getBoundingClientRect();\n const dx = origin.left + before.left - pane.getBoundingClientRect().left;\n if (Math.abs(dx) < 2) return;\n pane.animate([{ transform: `translateX(${dx}px)` }, { transform: 'none' }], { duration: axis.durationMs, easing: axis.easing });\n}\n\n/**\n * The rows of a pane: the largest group of ALIKE, row-shaped siblings in it (at least two — a list of two items is a\n * list — and most of their parent's children, so neither a toolbar of wide buttons nor a pane's own header strips pass\n * for a list).\n */\nexport function shellPaneRows(pane: HTMLElement): HTMLElement[] {\n const width = pane.clientWidth;\n let best: HTMLElement[] = [];\n for (const parent of [pane, ...pane.querySelectorAll<HTMLElement>('*')]) {\n if (parent.children.length < 2 || parent.children.length <= best.length) continue;\n const shaped = [...parent.children].filter((child): child is HTMLElement => isRowShaped(child, width));\n // The rows are the largest ALIKE subset of the row-shaped children (a list's header row is not one of them). Each\n // child joins the first group whose first member it is alike to: linear in the children, not quadratic.\n const groups: HTMLElement[][] = [];\n for (const child of shaped) {\n const group = groups.find((candidate) => isAlike(candidate[0]!, child));\n if (group) group.push(child);\n else groups.push([child]);\n }\n const rows = groups.reduce<HTMLElement[]>((largest, group) => (group.length > largest.length ? group : largest), []);\n if (rows.length >= 2 && rows.length > best.length && rows.length >= parent.children.length * 0.6) best = rows;\n }\n return best;\n}\n\n/**\n * Cascades a pane's rows in, one after another. Rows present now cascade at once. For `CASCADE_WATCH_MS` afterwards\n * the pane is re-scanned after mutations — at most once per frame, in an animation-frame callback, which runs before\n * that frame is painted — and rows not yet animated join the cascade. So rows that arrive with the data (after a loading\n * skeleton, in a different container) cascade too, and a row never shows and then vanishes to start its entrance.\n * Watching the WHOLE pane, not the first list found, is deliberate: the first list is often the skeleton.\n */\nexport function cascadeShellRows(pane: HTMLElement, axis: ShellMotionAxis): () => void {\n if (axis.durationMs === 0 || typeof pane.animate !== 'function') return () => undefined;\n const animated = new WeakSet<Element>();\n let staggerIndex = 0;\n const run = (): void => {\n scan = 0;\n for (const row of shellPaneRows(pane).slice(0, CASCADE_MAX_ROWS)) {\n if (animated.has(row)) continue;\n animated.add(row);\n row.animate([{ opacity: 0, transform: 'translateY(12px) scale(0.98)' }, { opacity: 1, transform: 'none' }], {\n duration: Math.round(axis.durationMs * 0.8),\n easing: axis.easing,\n delay: Math.min(staggerIndex, CASCADE_MAX_ROWS) * CASCADE_STAGGER_MS,\n fill: 'backwards',\n });\n staggerIndex += 1;\n }\n };\n let scan = 0;\n run();\n // A new batch staggers from its own first row, not after the rows already shown.\n const watch = new MutationObserver(() => {\n if (scan) return;\n staggerIndex = 0;\n scan = requestAnimationFrame(run);\n });\n watch.observe(pane, { childList: true, subtree: true });\n const stop = setTimeout(() => { cancelAnimationFrame(scan); watch.disconnect(); }, CASCADE_WATCH_MS);\n return () => {\n clearTimeout(stop);\n cancelAnimationFrame(scan);\n watch.disconnect();\n };\n}\n\n/**\n * A modal popup grows out of the control that opened it, for an axis whose `dialogArrival` says so: when a modal content\n * slot appears open in the stage's overlay layer, a proxy flies from the pressed control to the dialog's box, and the\n * dialog is revealed on the flight's clock. Only the overlay layer is watched. A drawer is left alone: its library\n * positions it with transforms of its own.\n */\nexport function useShellDialogArrival(rootRef: RefObject<HTMLElement | null>, axis: ShellMotionAxis, origin: ShellPressOrigin): void {\n useEffect(() => {\n const layer = rootRef.current?.querySelector('[data-shell-overlay-layer]');\n const stage = rootRef.current;\n if (!stage || !layer || axis.dialogArrival !== ShellDialogArrival.FROM_PRESSED_ELEMENT || axis.durationMs === 0) return undefined;\n const seen = new WeakSet<Element>();\n const openModal = SHELL_MODAL_POPUP_SLOTS.filter((slot) => slot !== ShellPopupSlot.DRAWER)\n .map((slot) => `[data-slot=\"${slot}\"][data-state=\"open\"]`)\n .join(', ');\n const check = (): void => {\n for (const dialog of layer.querySelectorAll(openModal)) {\n if (seen.has(dialog)) continue;\n seen.add(dialog);\n const from = origin.takeControl(SHELL_PRESS_ORIGIN_MAX_AGE_MS);\n if (from) void flyShellProxy(stage, from, toBox(dialog.getBoundingClientRect()), axis, dialog);\n }\n };\n const observer = new MutationObserver(check);\n observer.observe(layer, { childList: true, subtree: true, attributes: true, attributeFilter: ['data-state'] });\n return () => observer.disconnect();\n }, [rootRef, axis, origin]);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"shell-motion-origins.js","sourceRoot":"","sources":["../../../../../src/core/app-shell/shell-motion/shell-motion-origins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAC;AAEnE,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,iCAAiC,EACjC,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,GAGf,MAAM,2BAA2B,CAAC;AAiBnC,4EAA4E;AAC5E,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,4DAA4D;AAC5D,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,qDAAqD;AACrD,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,iHAAiH;AACjH,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,8CAA8C;AAC9C,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,2GAA2G;AAC3G,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAEjD,MAAM,KAAK,GAAG,CAAC,IAAgC,EAAoB,EAAE,CAAC,CAAC,EAAE,IAA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ELL_PANE_SELECTOR,\n SHELL_PICTURE_STRIPPED_ATTRIBUTES,\n SHELL_PROXY_ATTRIBUTE,\n SHELL_PROXY_FLIGHT_SHARE,\n ShellDialogArrival,\n ShellPopupSlot,\n type ShellMotionAxis,\n type ShellStageRect,\n} from './shell-motion-vocabulary';\n\n/**\n * The motion building blocks that start from WHERE something was pressed (#2055): a pane or a dialog growing out of the\n * row or button that opened it, an emphasized pane growing to its new width, and a pane's rows cascading in. Like the\n * rest of the motion core they write nothing on an engine element but WAAPI animations, which leave nothing behind, and\n * proxies of their own.\n */\n\n/** A box in viewport coordinates. */\nexport interface ShellViewportBox {\n left: number;\n top: number;\n width: number;\n height: number;\n}\n\n/** A row is at least this high (a single line of text in a padded row) … */\nconst ROW_MIN_HEIGHT_PX = 24;\n/** … at most this high (a two-line card row with meta) … */\nconst ROW_MAX_HEIGHT_PX = 220;\n/** … and at least this share of its pane's width. */\nconst ROW_MIN_WIDTH_SHARE = 0.5;\n/** How many rows a cascade animates at most: the rest are below the fold or too many to stagger meaningfully. */\nconst CASCADE_MAX_ROWS = 24;\n/** The stagger between two cascading rows. */\nconst CASCADE_STAGGER_MS = 28;\n/** How long a cascade keeps watching for rows that arrive after the place changed (data still loading). */\nconst CASCADE_WATCH_MS = 1500;\n/**\n * How recent a press must be to be what opened a pane or a dialog. Short on purpose: a modal that opens later than\n * this was not opened by that press (a timer, a websocket push), and must not fly from it.\n */\nexport const SHELL_PRESS_ORIGIN_MAX_AGE_MS = 800;\n\nconst toBox = (rect: DOMRect | ShellViewportBox): ShellViewportBox => ({ left: rect.left, top: rect.top, width: rect.width, height: rect.height });\n\n/** A pressed box, with — for a row — a still picture of it taken at the press, which a proxy carries as it grows. */\nexport interface ShellPressedBox extends ShellViewportBox {\n picture?: HTMLElement;\n /**\n * The pressed row itself, live — for a view-transition arrival, which names the row BEFORE the commit so the browser\n * captures it. It may have moved or unmounted since the press; the box above is where it was.\n */\n element?: HTMLElement;\n}\n\n/** An inert, unaddressable copy of an element: no ids, no focus, hidden from assistive technology, no engine markers. */\nfunction pictureOf(element: HTMLElement): HTMLElement {\n const copy = element.cloneNode(true) as HTMLElement;\n copy.setAttribute('aria-hidden', 'true');\n copy.setAttribute('inert', '');\n for (const node of [copy, ...copy.querySelectorAll<HTMLElement>('*')]) {\n // The shared markers, and the row's own state hooks: the picture is a flat image of a row that is about to change.\n for (const attribute of [...SHELL_PICTURE_STRIPPED_ATTRIBUTES, 'data-slot', 'data-state']) node.removeAttribute(attribute);\n }\n for (const media of copy.querySelectorAll('iframe, video, audio')) media.remove();\n return copy;\n}\n\n/** Whether an element has the shape of a row inside a pane `paneWidth` wide. */\nfunction isRowShaped(element: Element, paneWidth: number): element is HTMLElement {\n if (!(element instanceof HTMLElement)) return false;\n const height = element.offsetHeight;\n return height >= ROW_MIN_HEIGHT_PX && height <= ROW_MAX_HEIGHT_PX && element.offsetWidth >= paneWidth * ROW_MIN_WIDTH_SHARE;\n}\n\n/**\n * Whether two elements are ALIKE — the same tag, and mostly the same classes (half their class tokens shared or more).\n * Rows rendered by one component share their classes, whatever state class one of them adds (`active`, `selected`); a\n * header, a toolbar and a filter bar are rendered by different components and do not.\n */\nfunction isAlike(a: Element, b: Element): boolean {\n if (a.tagName !== b.tagName) return false;\n const tokensA = new Set(a.classList);\n const tokensB = new Set(b.classList);\n if (tokensA.size === 0 && tokensB.size === 0) return true;\n const shared = [...tokensA].filter((token) => tokensB.has(token)).length;\n return shared / Math.max(tokensA.size, tokensB.size) >= 0.5;\n}\n\n/**\n * Whether a row-shaped element is one of a REPEATED group — at least one alike, row-shaped sibling: a list, even of two\n * items, and never a strip that is alone of its kind.\n */\nfunction isInRepeatedGroup(element: HTMLElement, paneWidth: number): boolean {\n const siblings = element.parentElement ? [...element.parentElement.children] : [];\n return siblings.some((sibling) => sibling !== element && isRowShaped(sibling, paneWidth) && isAlike(sibling, element));\n}\n\n/**\n * The row an element belongs to, recognised by SHAPE: the nearest ancestor inside the pane that is row-high, wide, and\n * one of a repeated group of such siblings. The engine renders no row marker, and its lists are tables, card lists or an\n * application's own rows, so a marker could never cover them all while a shape does. The repeated-group rule keeps a\n * full-width toolbar or header, which is alone of its kind, from passing for a row. `null` outside a pane, or when\n * nothing on the way qualifies (a multi-column card grid, whose cards are narrower than half the pane).\n */\nexport function shellRowBox(target: Element): HTMLElement | null {\n const pane = target.closest(SHELL_PANE_SELECTOR);\n if (!pane) return null;\n const paneWidth = pane.clientWidth;\n for (let element: Element | null = target; element && element !== pane; element = element.parentElement) {\n if (isRowShaped(element, paneWidth) && isInRepeatedGroup(element, paneWidth)) return element;\n }\n return null;\n}\n\nconst CONTROL_SELECTOR = 'button, a, [role=\"button\"], [role=\"menuitem\"], [role=\"option\"]';\n\ninterface ShellPress {\n row: ShellPressedBox | null;\n control: ShellViewportBox;\n at: number;\n}\n\n/** The last press, as boxes to grow from. Each `take…` CONSUMES it, so one press opens at most one thing. */\nexport interface ShellPressOrigin {\n /** The row pressed within `maxAgeMs`, if any, with its picture. */\n takeRow(maxAgeMs: number): ShellPressedBox | null;\n /** The row pressed within `maxAgeMs`, WITHOUT consuming the press — to decide before taking it. */\n peekRow(maxAgeMs: number): ShellPressedBox | null;\n /** The control (button, link, menu item) pressed within `maxAgeMs`, if any. */\n takeControl(maxAgeMs: number): ShellViewportBox | null;\n}\n\n/**\n * Remembers the last press — a pointer press, or Enter / Space on a focused element — as the box of the row and of the\n * control it happened in, measured AT the press, before anything re-renders (the row may move or unmount the moment what\n * it opens mounts). ANY other key press forgets it: whatever opens next was opened by that key (a shortcut such as the\n * command palette's), not by the earlier press, and must not grow out of it.\n *\n * Installs nothing while `enabled` is false — a layout whose axis never grows from a press pays no listener and no layout\n * read on every press.\n */\nexport function useShellPressOrigin(enabled: boolean): ShellPressOrigin {\n const last = useRef<ShellPress | null>(null);\n useEffect(() => {\n last.current = null;\n if (!enabled) return undefined;\n const record = (target: Element | null): void => {\n if (!target) return;\n const row = shellRowBox(target);\n const control = target.closest(CONTROL_SELECTOR) ?? target;\n last.current = {\n row: row ? { ...toBox(row.getBoundingClientRect()), picture: pictureOf(row), element: row } : null,\n control: toBox(control.getBoundingClientRect()),\n at: performance.now(),\n };\n };\n const onPointer = (event: PointerEvent): void => record(event.target instanceof Element ? event.target : null);\n const onKey = (event: KeyboardEvent): void => {\n if (event.key === 'Enter' || event.key === ' ') record(document.activeElement);\n else last.current = null;\n };\n document.addEventListener('pointerdown', onPointer, true);\n document.addEventListener('keydown', onKey, true);\n return () => {\n document.removeEventListener('pointerdown', onPointer, true);\n document.removeEventListener('keydown', onKey, true);\n };\n }, [enabled]);\n return useMemo<ShellPressOrigin>(() => {\n const take = <T extends ShellViewportBox>(pick: (press: ShellPress) => T | null, maxAgeMs: number): T | null => {\n const press = last.current;\n if (!press || performance.now() - press.at > maxAgeMs) return null;\n last.current = null;\n return pick(press);\n };\n const peek = (maxAgeMs: number): ShellPressedBox | null => {\n const press = last.current;\n return press && performance.now() - press.at <= maxAgeMs ? press.row : null;\n };\n return { takeRow: (maxAgeMs) => take((press) => press.row, maxAgeMs), peekRow: peek, takeControl: (maxAgeMs) => take((press) => press.control, maxAgeMs) };\n }, []);\n}\n\n/**\n * Flies a proxy box from one viewport box to another inside the stage, for `SHELL_PROXY_FLIGHT_SHARE` of the axis's\n * motion, then removes it. A pressed row's picture (`from.picture`) rides in it, fading as it grows. The proxy is the core's own element (`data-shell-proxy`, aria-hidden, no pointer events),\n * painted inline from the theme's tokens so it reads as the surface it becomes.\n *\n * `arriving` — the pane or dialog the proxy stands for — is revealed on the SAME clock: hidden for the flight, then faded\n * in over the rest of the motion, by a script animation that sits above whatever the layout's stylesheet plays on it.\n * Two clocks (a stylesheet hold started at mount, a flight started later) drift apart; one cannot.\n */\nexport function flyShellProxy(stage: HTMLElement, from: ShellPressedBox, to: ShellViewportBox, axis: ShellMotionAxis, arriving?: Element): Promise<void> {\n const duration = Math.round(axis.durationMs * SHELL_PROXY_FLIGHT_SHARE);\n if (duration === 0 || typeof HTMLElement.prototype.animate !== 'function') return Promise.resolve();\n const origin = stage.getBoundingClientRect();\n const frame = (box: ShellViewportBox, radius: number): Keyframe => ({\n left: `${box.left - origin.left}px`,\n top: `${box.top - origin.top}px`,\n width: `${box.width}px`,\n height: `${box.height}px`,\n borderRadius: `${radius}px`,\n });\n const proxy = document.createElement('div');\n proxy.setAttribute(SHELL_PROXY_ATTRIBUTE, '');\n proxy.setAttribute('aria-hidden', 'true');\n Object.assign(proxy.style, {\n position: 'absolute',\n zIndex: '400',\n pointerEvents: 'none',\n boxSizing: 'border-box',\n background: 'var(--card, var(--background))',\n border: '1px solid var(--primary, currentColor)',\n boxShadow: '0 18px 40px -18px rgb(0 0 0 / 0.35)',\n });\n Object.assign(proxy.style, frame(from, 10), { overflow: 'hidden' });\n // The pressed row rides in the proxy, fading as the box grows: the row visibly BECOMES the record.\n if (from.picture) {\n Object.assign(from.picture.style, { position: 'absolute', left: '0', top: '0', width: `${from.width}px`, height: `${from.height}px`, margin: '0', pointerEvents: 'none' });\n proxy.appendChild(from.picture);\n from.picture.animate([{ opacity: 1 }, { opacity: 0 }], { duration: Math.round(duration * 0.8), easing: 'ease-in', fill: 'forwards' });\n }\n stage.appendChild(proxy);\n if (arriving instanceof HTMLElement && typeof arriving.animate === 'function') {\n arriving.animate([{ opacity: 0 }, { opacity: 0, offset: SHELL_PROXY_FLIGHT_SHARE }, { opacity: 1 }], { duration: axis.durationMs, easing: 'linear' });\n }\n const animation = proxy.animate([frame(from, 10), frame(to, 14)], { duration, easing: axis.easing, fill: 'forwards' });\n return animation.finished.catch(() => undefined).then(() => proxy.remove());\n}\n\n/**\n * An emphasized pane grows from the box it had (`before`, in stage coordinates) to the box it now fills: it is\n * REVEALED through a clip that starts on the old box, so its content is never scaled or distorted on the way.\n */\nexport function growShellPane(pane: HTMLElement, before: ShellStageRect, stage: HTMLElement, axis: ShellMotionAxis): void {\n if (axis.durationMs === 0 || typeof pane.animate !== 'function') return;\n const origin = stage.getBoundingClientRect();\n const after = pane.getBoundingClientRect();\n const top = Math.max(0, origin.top + before.top - after.top);\n const left = Math.max(0, origin.left + before.left - after.left);\n const right = Math.max(0, after.right - (origin.left + before.left + before.width));\n const bottom = Math.max(0, after.bottom - (origin.top + before.top + before.height));\n pane.animate([{ clipPath: `inset(${top}px ${right}px ${bottom}px ${left}px round 12px)` }, { clipPath: 'inset(0px 0px 0px 0px round 0px)' }], {\n duration: axis.durationMs,\n easing: axis.easing,\n });\n}\n\n/** A pane given back its place slides home from where it stood while it had the width. */\nexport function slideShellPaneHome(pane: HTMLElement, before: ShellStageRect, stage: HTMLElement, axis: ShellMotionAxis): void {\n if (axis.durationMs === 0 || typeof pane.animate !== 'function') return;\n const origin = stage.getBoundingClientRect();\n const dx = origin.left + before.left - pane.getBoundingClientRect().left;\n if (Math.abs(dx) < 2) return;\n pane.animate([{ transform: `translateX(${dx}px)` }, { transform: 'none' }], { duration: axis.durationMs, easing: axis.easing });\n}\n\n/**\n * The rows of a pane: the largest group of ALIKE, row-shaped siblings in it (at least two — a list of two items is a\n * list — and most of their parent's children, so neither a toolbar of wide buttons nor a pane's own header strips pass\n * for a list).\n */\nexport function shellPaneRows(pane: HTMLElement): HTMLElement[] {\n const width = pane.clientWidth;\n let best: HTMLElement[] = [];\n for (const parent of [pane, ...pane.querySelectorAll<HTMLElement>('*')]) {\n if (parent.children.length < 2 || parent.children.length <= best.length) continue;\n const shaped = [...parent.children].filter((child): child is HTMLElement => isRowShaped(child, width));\n // The rows are the largest ALIKE subset of the row-shaped children (a list's header row is not one of them). Each\n // child joins the first group whose first member it is alike to: linear in the children, not quadratic.\n const groups: HTMLElement[][] = [];\n for (const child of shaped) {\n const group = groups.find((candidate) => isAlike(candidate[0]!, child));\n if (group) group.push(child);\n else groups.push([child]);\n }\n const rows = groups.reduce<HTMLElement[]>((largest, group) => (group.length > largest.length ? group : largest), []);\n if (rows.length >= 2 && rows.length > best.length && rows.length >= parent.children.length * 0.6) best = rows;\n }\n return best;\n}\n\n/**\n * Cascades a pane's rows in, one after another. Rows present now cascade at once. For `CASCADE_WATCH_MS` afterwards\n * the pane is re-scanned after mutations — at most once per frame, in an animation-frame callback, which runs before\n * that frame is painted — and rows not yet animated join the cascade. So rows that arrive with the data (after a loading\n * skeleton, in a different container) cascade too, and a row never shows and then vanishes to start its entrance.\n * Watching the WHOLE pane, not the first list found, is deliberate: the first list is often the skeleton.\n */\nexport function cascadeShellRows(pane: HTMLElement, axis: ShellMotionAxis): () => void {\n if (axis.durationMs === 0 || typeof pane.animate !== 'function') return () => undefined;\n const animated = new WeakSet<Element>();\n let staggerIndex = 0;\n const run = (): void => {\n scan = 0;\n for (const row of shellPaneRows(pane).slice(0, CASCADE_MAX_ROWS)) {\n if (animated.has(row)) continue;\n animated.add(row);\n row.animate([{ opacity: 0, transform: 'translateY(12px) scale(0.98)' }, { opacity: 1, transform: 'none' }], {\n duration: Math.round(axis.durationMs * 0.8),\n easing: axis.easing,\n delay: Math.min(staggerIndex, CASCADE_MAX_ROWS) * CASCADE_STAGGER_MS,\n fill: 'backwards',\n });\n staggerIndex += 1;\n }\n };\n let scan = 0;\n run();\n // A new batch staggers from its own first row, not after the rows already shown.\n const watch = new MutationObserver(() => {\n if (scan) return;\n staggerIndex = 0;\n scan = requestAnimationFrame(run);\n });\n watch.observe(pane, { childList: true, subtree: true });\n const stop = setTimeout(() => { cancelAnimationFrame(scan); watch.disconnect(); }, CASCADE_WATCH_MS);\n return () => {\n clearTimeout(stop);\n cancelAnimationFrame(scan);\n watch.disconnect();\n };\n}\n\n/**\n * A modal popup grows out of the control that opened it, for an axis whose `dialogArrival` says so: when a modal content\n * slot appears open in the stage's overlay layer, a proxy flies from the pressed control to the dialog's box, and the\n * dialog is revealed on the flight's clock. Only the overlay layer is watched. A drawer is left alone: its library\n * positions it with transforms of its own.\n */\nexport function useShellDialogArrival(rootRef: RefObject<HTMLElement | null>, axis: ShellMotionAxis, origin: ShellPressOrigin): void {\n useEffect(() => {\n const layer = rootRef.current?.querySelector('[data-shell-overlay-layer]');\n const stage = rootRef.current;\n if (!stage || !layer || axis.dialogArrival !== ShellDialogArrival.FROM_PRESSED_ELEMENT || axis.durationMs === 0) return undefined;\n const seen = new WeakSet<Element>();\n const openModal = SHELL_MODAL_POPUP_SLOTS.filter((slot) => slot !== ShellPopupSlot.DRAWER)\n .map((slot) => `[data-slot=\"${slot}\"][data-state=\"open\"]`)\n .join(', ');\n const check = (): void => {\n for (const dialog of layer.querySelectorAll(openModal)) {\n if (seen.has(dialog)) continue;\n seen.add(dialog);\n const from = origin.takeControl(SHELL_PRESS_ORIGIN_MAX_AGE_MS);\n if (from) void flyShellProxy(stage, from, toBox(dialog.getBoundingClientRect()), axis, dialog);\n }\n };\n const observer = new MutationObserver(check);\n observer.observe(layer, { childList: true, subtree: true, attributes: true, attributeFilter: ['data-state'] });\n return () => observer.disconnect();\n }, [rootRef, axis, origin]);\n}\n"]}
|
|
@@ -139,6 +139,21 @@ export declare const SHELL_OBJECT_ATTRIBUTE = "data-shell-object";
|
|
|
139
139
|
export declare const SHELL_GHOST_LAYER_ATTRIBUTE = "data-shell-ghost-layer";
|
|
140
140
|
/** The attribute every ghost carries, with its kind (`ShellGhostKind`). */
|
|
141
141
|
export declare const SHELL_GHOST_ATTRIBUTE = "data-shell-ghost";
|
|
142
|
+
/**
|
|
143
|
+
* The markers a still picture of an engine element must NOT carry: everything a query for the real element, or for a
|
|
144
|
+
* control inside it, finds it by. A picture (a discarded pane leaving, an image behind an expanded pane, a pressed row
|
|
145
|
+
* flying into its pane) is inert and takes no pointer, but it is still in the document while it fades, and a picture
|
|
146
|
+
* that kept these was found by those queries as though it were the thing it shows.
|
|
147
|
+
*
|
|
148
|
+
* Measured 2026-11-14 on Wonder Todos (morph layout): a closed todo pane's picture kept `data-navigation-back` for the
|
|
149
|
+
* ~650ms it took to leave, so a lookup of the pane's back control found the picture's (#3764 had to wait it out in
|
|
150
|
+
* `browser-nav-zones`). It never took a click (inert, `pointer-events: none`: the point under it hit the list), but
|
|
151
|
+
* the zone's own back control is identified by that attribute, and a picture must not answer to it.
|
|
152
|
+
*
|
|
153
|
+
* Styling hooks (`data-slot`, `data-state`) are NOT here: a picture keeps the look of what it shows. A caller that
|
|
154
|
+
* needs a narrower picture strips more on its own.
|
|
155
|
+
*/
|
|
156
|
+
export declare const SHELL_PICTURE_STRIPPED_ATTRIBUTES: readonly string[];
|
|
142
157
|
/** The two kinds of ghost. */
|
|
143
158
|
export declare enum ShellGhostKind {
|
|
144
159
|
/** A dismissed side pane, flying away. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-motion-vocabulary.d.ts","sourceRoot":"","sources":["../../../../../src/core/app-shell/shell-motion/shell-motion-vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAGlE,sJAAsJ;AACtJ;;;;;;;;;GASG;AAEH,+DAA+D;AAC/D,oBAAY,gBAAgB;IAC1B,kEAAkE;IAClE,QAAQ,aAAa;IACrB,yEAAyE;IACzE,OAAO,YAAY;CACpB;AAED,mFAAmF;AACnF,oBAAY,cAAc;IACxB,wGAAwG;IACxG,IAAI,SAAS;IACb,6FAA6F;IAC7F,MAAM,WAAW;IACjB,yDAAyD;IACzD,SAAS,cAAc;CACxB;AAED,8DAA8D;AAC9D,oBAAY,cAAc;IACxB,6EAA6E;IAC7E,SAAS,cAAc;IACvB,+FAA+F;IAC/F,aAAa,kBAAkB;CAChC;AAED,6CAA6C;AAC7C,oBAAY,gBAAgB;IAC1B,uFAAuF;IACvF,UAAU,eAAe;IACzB;;;;;;OAMG;IACH,oBAAoB,yBAAyB;CAC9C;AAED,+FAA+F;AAC/F,oBAAY,eAAe;IACzB,0CAA0C;IAC1C,OAAO,YAAY;IACnB,iHAAiH;IACjH,IAAI,SAAS;CACd;AAED,qDAAqD;AACrD,oBAAY,kBAAkB;IAC5B,4EAA4E;IAC5E,UAAU,eAAe;IACzB;;;OAGG;IACH,oBAAoB,yBAAyB;CAC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O,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAA6C,CAAC;AAEnG;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AACD,2EAA2E"}
|
|
1
|
+
{"version":3,"file":"shell-motion-vocabulary.d.ts","sourceRoot":"","sources":["../../../../../src/core/app-shell/shell-motion/shell-motion-vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAGlE,sJAAsJ;AACtJ;;;;;;;;;GASG;AAEH,+DAA+D;AAC/D,oBAAY,gBAAgB;IAC1B,kEAAkE;IAClE,QAAQ,aAAa;IACrB,yEAAyE;IACzE,OAAO,YAAY;CACpB;AAED,mFAAmF;AACnF,oBAAY,cAAc;IACxB,wGAAwG;IACxG,IAAI,SAAS;IACb,6FAA6F;IAC7F,MAAM,WAAW;IACjB,yDAAyD;IACzD,SAAS,cAAc;CACxB;AAED,8DAA8D;AAC9D,oBAAY,cAAc;IACxB,6EAA6E;IAC7E,SAAS,cAAc;IACvB,+FAA+F;IAC/F,aAAa,kBAAkB;CAChC;AAED,6CAA6C;AAC7C,oBAAY,gBAAgB;IAC1B,uFAAuF;IACvF,UAAU,eAAe;IACzB;;;;;;OAMG;IACH,oBAAoB,yBAAyB;CAC9C;AAED,+FAA+F;AAC/F,oBAAY,eAAe;IACzB,0CAA0C;IAC1C,OAAO,YAAY;IACnB,iHAAiH;IACjH,IAAI,SAAS;CACd;AAED,qDAAqD;AACrD,oBAAY,kBAAkB;IAC5B,4EAA4E;IAC5E,UAAU,eAAe;IACzB;;;OAGG;IACH,oBAAoB,yBAAyB;CAC9C;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C,sHAAsH;AACtH,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD,gFAAgF;AAChF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,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