@ds-mo/ui 14.29.0 → 14.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"schemaVersion":1,"package":"@ds-mo/ui","version":"14.29.0","components":81,"digest":"a6bac8343e279f3c65ca013b620cd8ce2c9486a0a4cf2b82bdbf21551e7d9fe3","completedAt":"2026-09-04T16:44:56.274Z"}
1
+ {"schemaVersion":1,"package":"@ds-mo/ui","version":"14.29.1","components":81,"digest":"6357232c9a02c8b3a53d58bbd69a854421505138be35b4e61c96ab82ef5eb033","completedAt":"2026-09-04T18:26:21.380Z"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
3
  "package": "@ds-mo/ui",
4
- "packageVersion": "14.29.0",
4
+ "packageVersion": "14.29.1",
5
5
  "kind": "patterns",
6
6
  "entries": [
7
7
  {
package/dist/agent.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
3
  "package": "@ds-mo/ui",
4
- "packageVersion": "14.29.0",
4
+ "packageVersion": "14.29.1",
5
5
  "kind": "components",
6
6
  "entries": [
7
7
  {
@@ -8511,6 +8511,7 @@
8511
8511
  "The flow-preservation spacer follows contentSurface so compacting a secondary page cannot expose a primary strip before its content.",
8512
8512
  "On roomy pages, the expanded header scrolls upward until its title and action row reaches the compact row position, while its bottom divider progressively extends from the expanded inset to edge-to-edge; it then snaps variants without moving that shared visual anchor.",
8513
8513
  "Scroll compaction preserves the expanded page flow offset so content never jumps beneath the sticky header.",
8514
+ "The sticky header paints above the isolated routed-content layer, so product surfaces and callouts scroll beneath its opaque boundary instead of covering page chrome.",
8514
8515
  "ShellPage relies on ShellApp's content scroller and never introduces nested scrolling.",
8515
8516
  "BarWorkflow remains compact and is not assigned BarTitle's capacity or scroll variants."
8516
8517
  ],
@@ -1,2 +1,2 @@
1
- import{p as e,H as s,c as t,h as i,a,t as n}from"./index.js";import{c as l,d as o}from"./p-B5eMVBlz.js";import{f as h,v as r,r as d,o as p,d as c}from"./p-CLcwh1kq.js";import{C as u,c as b,a as m,b as f,r as g,d as v}from"./p-K39w53Bw.js";import{i as _,b as y,c as w,r as k,S as x,d as C}from"./p-CgGcgMjs.js";import{c as S}from"./p-D_QtZZR8.js";import{d as M}from"./p-rSC7ZUpy.js";import{d as D}from"./p-BpB2EF9g.js";import{d as L}from"./p-GbtafFds.js";import{d as P}from"./p--yvQzZoO.js";import{d as A}from"./p-DbDYEEWq.js";import{d as B}from"./p-Cea7rROU.js";import{d as T}from"./p-0XTyQNRG.js";import{d as E}from"./p-D1pPq-y0.js";import{d as z}from"./p-CDXcINTO.js";import{d as N}from"./p-Cx2dWjaW.js";import{d as j}from"./p-CyoLh8su.js";import{d as I}from"./p-frKsmPQn.js";import{d as $}from"./p-BZDQLjE0.js";import{d as F}from"./p-BmRHJ_jo.js";import{d as O}from"./p-DnQN0pLp.js";import{d as R}from"./p-Hzz2j1Je.js";import{d as G}from"./p-B5AZd41L.js";import{d as H}from"./p-BCFpqnAg.js";import{d as V}from"./p-Bl5wd3v3.js";import{d as q}from"./p-Crd3PEUx.js";import{d as U}from"./p-BGnRFtBa.js";import{d as W}from"./p-aMyflqva.js";import{d as Z}from"./p-CN8PQLZu.js";const Q={k:"search",a:"agents",s:"stacks",m:"messages",n:"activity","/":"help"};function K(e){return!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function J(e){if(!e||typeof e!=="object")return false;if(!("closest"in e)||typeof e.closest!=="function")return false;const s=e;const t=s.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]');if(t)return true;const i=s.getAttribute("role");if(i==="textbox"||i==="combobox"||i==="searchbox")return true;return Boolean(s.isContentEditable)}function X(e){if(e.key==="["||e.code==="BracketLeft")return"[";if(e.key==="]"||e.code==="BracketRight")return"]";return e.key.length===1?e.key.toLowerCase():e.key.toLowerCase()}function Y(e){if(!K(e))return null;const s=X(e);if(s==="[")return"toggle-panel-nav";if(s==="]")return"close-panel-tools";const t=Q[s];if(t)return`open-tool:${t}`;return null}const ee=["none","cool","neutral","warm","fresh"];const se="neutral";const te={cool:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-blue-strong-background)",position:100}]},neutral:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-grey-strong-background)",position:100}]},warm:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-yellow-strong-background)",position:100}]},fresh:{opacity:.4,stops:[{color:"var(--color-color-intent-cyan-faint-background)",position:0},{color:"var(--color-background-transparent)",position:47},{color:"var(--color-background-transparent)",position:58},{color:"var(--color-color-intent-red-faint-background)",position:83},{color:"var(--color-color-intent-pink-faint-background)",position:100}]}};const ie="100% 100% at 0% 0%";function ae(e){const s=oe(e);return s==="none"?null:te[s]}function ne(e){return String(ae(e)?.opacity??0)}function le(e){return ee.includes(e)}function oe(e){return e!=null&&le(e)?e:se}function he(e){const s=oe(e);if(s==="none")return"none";return re(te[s].stops)}function re(e){const s=e.map((e=>`${e.color} ${e.position}%`)).join(", ");return`radial-gradient(${ie}, ${s})`}const de="--ds-shell-gradient-image";const pe="--ds-shell-gradient-size";const ce="--ds-shell-gradient-position-panel";const ue="--ds-shell-gradient-position-bar";const be="--ds-shell-gradient-opacity";function me(e=se){return he(e)}function fe(e){const s=typeof globalThis.window!=="undefined"?globalThis.window:undefined;if(!s)return{width:0,height:0};const t=s.visualViewport;return{width:Math.round(t?.width??s.innerWidth),height:Math.round(t?.height??s.innerHeight)}}function ge(e){return`${Math.round(e.width)}px ${Math.round(e.height)}px`}function ve(){return"0 0"}function _e(e){return`${-Math.round(e)}px 0`}function ye(e,s){if(typeof document==="undefined")return 0;const t=document.createElement("div");t.style.cssText="position:absolute;visibility:hidden;pointer-events:none;height:0;width:var("+s+");";e.appendChild(t);const i=t.getBoundingClientRect().width;e.removeChild(t);return i}function we(e){return{expandedPx:ye(e,"--_nav-width"),collapsedPx:ye(e,"--_nav-width-collapsed")}}function ke(e,s){if(s?.classList.contains("panel-nav--collapsed"))return true;const t=e?.collapsed;return t===true}function xe(e,s){return s?e.collapsedPx:e.expandedPx}const Ce=()=>`.sc-ds-shell-app-h{display:flex;flex-direction:column;height:100%;min-height:0;box-sizing:border-box;overflow:hidden;overscroll-behavior:none;font-family:var(--typography-font-family-ui, system-ui);--ds-shell-panel-tools-width:var(--dimension-panel-width-xs);--ds-shell-gradient-context:flat}.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-secondary)}.shell-app--gradient.sc-ds-shell-app-h{--ds-shell-gradient-context:gradient}.shell-app__row.sc-ds-shell-app{display:flex;flex:1 1 0;min-height:0;position:relative}.shell-app__banner.sc-ds-shell-app{flex:0 0 auto;min-width:0;position:relative;z-index:5}.shell-app__banner.sc-ds-shell-app-s>ds-banner,.shell-app__banner .sc-ds-shell-app-s>ds-banner{display:grid;width:100%}.shell-app__chrome.sc-ds-shell-app{position:absolute;inset:0;pointer-events:none;z-index:0;overflow:hidden;background-color:var(--_shell-chrome-bg)}.shell-app--gradient.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app::before{content:'';position:absolute;inset:0;pointer-events:none;background-position:0 0;background-attachment:fixed;z-index:1;opacity:var(--ds-shell-gradient-opacity, 1);background-image:var(--ds-shell-gradient-image, none);background-size:var(--ds-shell-gradient-size, auto);background-repeat:no-repeat}.shell-app__paper-texture.sc-ds-shell-app{z-index:2}.shell-app__panel.sc-ds-shell-app{flex:0 0 auto;min-height:0;height:100%;position:relative;z-index:2}.shell-app__panel.sc-ds-shell-app-s>ds-panel-nav,.shell-app__panel .sc-ds-shell-app-s>ds-panel-nav{display:block;height:100%}.shell-app__panel.sc-ds-shell-app>ds-panel-nav.sc-ds-shell-app{display:block;height:100%}.shell-app__main.sc-ds-shell-app{flex:1 1 auto;min-width:0;min-height:0;display:grid;grid-template-columns:minmax(0, 1fr) auto;grid-template-rows:auto minmax(0, 1fr);grid-template-areas:'bar tools' 'content tools';position:relative;z-index:1}.shell-app__mobile-sheet-nav.sc-ds-shell-app,.shell-app__mobile-bar-nav.sc-ds-shell-app{display:none}.shell-app__bar.sc-ds-shell-app{grid-area:bar;flex:0 0 auto;min-width:0}.shell-app__bar.sc-ds-shell-app-s>ds-bar-nav,.shell-app__bar .sc-ds-shell-app-s>ds-bar-nav{display:block}.shell-app__bar.sc-ds-shell-app-s>ds-bar-title,.shell-app__bar .sc-ds-shell-app-s>ds-bar-title{display:block}.shell-app__bar.sc-ds-shell-app>ds-bar-nav.sc-ds-shell-app{display:block}.shell-app__bar.sc-ds-shell-app>ds-bar-title.sc-ds-shell-app{display:block}.shell-app__content.sc-ds-shell-app{grid-area:content;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:none;contain:layout}.shell-app__content.sc-ds-shell-app:focus,.shell-app__content.sc-ds-shell-app:focus-visible{outline:none}.shell-app__content.sc-ds-shell-app{position:relative;z-index:1;background-color:var(--color-background-primary)}.shell-app__tools.sc-ds-shell-app{grid-area:tools;flex:0 0 auto;min-width:0;min-height:0;height:100%;display:flex;position:relative;z-index:0;overflow:hidden}.shell-app__tools.sc-ds-shell-app-s>ds-panel-tools,.shell-app__tools .sc-ds-shell-app-s>ds-panel-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app-s>ds-shell-tools,.shell-app__tools .sc-ds-shell-app-s>ds-shell-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app>ds-shell-tools.sc-ds-shell-app{display:block;height:100%;min-height:0}.shell-app__tool-slot-proxy.sc-ds-shell-app{display:block;width:100%;height:100%;min-width:0;min-height:0}.shell-app__content.sc-ds-shell-app>ds-shell-page.sc-ds-shell-app{display:block;min-height:100%}.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{visibility:hidden}.shell-app--mobile.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-primary);padding-block-start:env(safe-area-inset-top)}.shell-app--mobile.shell-app--foreground-refresh.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{transform:translateZ(0)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app{display:none}.shell-app--mobile.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{width:100%;box-sizing:border-box;grid-template-columns:minmax(0, 1fr);grid-template-rows:minmax(0, 1fr) auto;grid-template-areas:'stage' 'mobile-bar-nav';background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{grid-area:stage;min-width:0;min-height:0;height:100%;position:relative}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{z-index:1;overflow:auto}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{z-index:2;width:100%;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{display:block;z-index:3;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav.sc-ds-shell-app{grid-area:mobile-bar-nav;display:block;min-width:0;position:relative;z-index:4}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav[hidden].sc-ds-shell-app{display:none}.shell-app--mobile-tool-active.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{visibility:hidden}`;let Se=0;const Me=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.dsResponsiveModeChange=t(this,"dsResponsiveModeChange",7);this.dsNavSelect=t(this,"dsNavSelect",7);this.dsTabChange=t(this,"dsTabChange",7);this.dsNavChildSelect=t(this,"dsNavChildSelect",7);this.dsSubsectionChange=t(this,"dsSubsectionChange",7);this.dsPageBack=t(this,"dsPageBack",7);this.dsBreadcrumbSelect=t(this,"dsBreadcrumbSelect",7);this.dsPageAction=t(this,"dsPageAction",7);this.dsToolChange=t(this,"dsToolChange",7);this.dsHeaderBack=t(this,"dsHeaderBack",7);this.dsHeaderAction=t(this,"dsHeaderAction",7);this.dsRailAccessoryAction=t(this,"dsRailAccessoryAction",7);this.dsPresentationChange=t(this,"dsPresentationChange",7);this.dsBrowseContextChange=t(this,"dsBrowseContextChange",7);this.dsNavFooterAction=t(this,"dsNavFooterAction",7);this.dsNavUserAction=t(this,"dsNavUserAction",7);this.composition="managed";this.navigation={};this.sectionNavigation="bar";this.pageChrome={};this.tools={};this.navStyle="dashboard";this.gradientPreset=se;this.shortcutsEnabled=true;this.mobileDestination="area";this.mobileSheetNavOpen=false;this.toolsFullscreen=false;this.resolvedMode="desktop";this.managedToolsOpen=false;this.managedActiveTool="";this.managedToolPresentation="drawer";this.managedMobileDestination="area";this.managedMobilePrimaryDestination="area";this.managedMobileSheetNavOpen=false;this.managedInboxTool="";this.managedBrowseContext="dashboard";this.mobileActionMenuOpen=false;this.mobileActionSurfaceOpen=false;this.mobileActionMenuInitialFocusVisible=false;this.instanceId=Se++;this.mobileActionMenuTriggerId=`shell-app-mobile-action-trigger-${this.instanceId}`;this.mobileActionMenuId=`shell-app-mobile-action-menu-${this.instanceId}`;this.mobileActionTriggerEl=null;this.resizeObserver=null;this.hasLoaded=false;this.foregroundRefreshTimer=null;this.panelNavTransition=new u;this.chromeSyncCoalescer=b((()=>this.syncChrome()));this.panelWidthTokens={expandedPx:0,collapsedPx:0};this.cachedViewportWidth=0;this.cachedViewportHeight=0;this.onWindowResize=()=>{this.updateResponsiveMode();if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onVisualViewportChange=()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onChromeTransitionStart=e=>{const s=g(e);if(s!=="panel-nav")return;this.panelNavTransition.enter();const t=fe();this.cachedViewportWidth=t.width;this.cachedViewportHeight=t.height;this.syncChrome()};this.onChromeTransitionEnd=e=>{const s=g(e);if(s!=="panel-nav")return;this.panelNavTransition.exit();if(!this.panelNavTransition.isActive){this.scheduleChromeSync()}};this.onDocumentVisibilityChange=()=>{if(!document.hidden)this.refreshAfterForegroundRestore()};this.onPageShow=e=>{if(e.persisted)this.refreshAfterForegroundRestore()};this.handleManagedNavSelect=e=>{e.stopPropagation();this.dsNavSelect.emit(e.detail)};this.handleManagedNavChildSelect=e=>{e.stopPropagation();this.dsNavChildSelect.emit(e.detail)};this.handleManagedTabChange=e=>{e.stopPropagation();this.dsTabChange.emit(e.detail)};this.handleManagedPageBack=e=>{e.stopPropagation();this.dsPageBack.emit(e.detail)};this.handleManagedBreadcrumbSelect=e=>{e.stopPropagation();const s=this.dsBreadcrumbSelect.emit(e.detail);if(s.defaultPrevented)e.preventDefault()};this.handleManagedSubsectionChange=e=>{e.stopPropagation();this.dsSubsectionChange.emit(e.detail)};this.handleManagedPageAction=e=>{e.stopPropagation();this.dsPageAction.emit(e.detail)};this.handleManagedToolChange=e=>{e.stopPropagation();const{id:s,selected:t}=e.detail;this.managedActiveTool=s;this.managedToolsOpen=t;const i=this.resolvedToolItems.find((e=>e.id===s));if(i&&_(i)){this.managedInboxTool=s}this.managedMobileDestination=t?i?.mobileDestination??y(true,s):"area";this.managedMobileSheetNavOpen=false;this.dsToolChange.emit(e.detail)};this.handleManagedPresentationChange=e=>{e.stopPropagation();this.managedToolPresentation=e.detail.presentation;this.toolsFullscreen=e.detail.presentation==="fullscreen";this.dsPresentationChange.emit(e.detail)};this.handleManagedHeaderBack=e=>{e.stopPropagation();this.dsHeaderBack.emit(e.detail)};this.handleManagedHeaderAction=e=>{e.stopPropagation();this.dsHeaderAction.emit(e.detail)};this.handleManagedRailAccessoryAction=e=>{e.stopPropagation();this.dsRailAccessoryAction.emit(e.detail)};this.handleManagedSheetToggle=e=>{e.stopPropagation();this.managedMobileSheetNavOpen=e.detail};this.handleManagedMobileDestination=e=>{e.stopPropagation();const s=e.detail.destination;this.managedMobileSheetNavOpen=false;this.managedMobileDestination=s;if(s==="area"){this.managedToolsOpen=false;return}this.activateManagedMobileTool(s)};this.handleManagedAreaSelect=e=>{e.stopPropagation();if(e.detail==="help"){this.managedMobileSheetNavOpen=false;this.managedMobileDestination="help";if(this.activateManagedMobileTool("help"))return}this.managedMobileSheetNavOpen=false;this.managedMobileDestination="area";this.managedMobilePrimaryDestination="area";this.managedToolsOpen=false;this.dsNavSelect.emit(e.detail)};this.handleManagedMobileChildSelect=e=>{e.stopPropagation();this.managedMobileSheetNavOpen=false;this.managedMobileDestination="area";this.managedMobilePrimaryDestination="area";this.managedToolsOpen=false;this.dsNavChildSelect.emit(e.detail)};this.handleManagedBrowseContext=e=>{e.stopPropagation();this.managedBrowseContext=e.detail;this.dsBrowseContextChange.emit(e.detail)};this.handleManagedSheetClose=e=>{e.stopPropagation();this.managedMobileSheetNavOpen=false};this.handleManagedNavFooterAction=e=>{e.stopPropagation();this.dsNavFooterAction.emit()};this.handleManagedNavUserAction=e=>{e.stopPropagation();this.dsNavUserAction.emit(e.detail)};this.closeMobileActionMenu=()=>{this.mobileActionMenuOpen=false};this.handleMobileActionSelect=e=>{const s=String(e.detail.value??"");const t=h(this.resolvedHeaderActions,s);if(!t||t.isInactive||"isLoading"in t&&t.isLoading)return;this.mobileActionMenuOpen=false;this.dsPageAction.emit(s);requestAnimationFrame((()=>void this.mobileActionTriggerEl?.setFocus?.()))}}get managed(){return this.composition==="managed"}get effectiveMobileDestination(){return this.managed?this.managedMobileDestination:this.mobileDestination}get effectiveMobileSheetNavOpen(){return this.managed?this.managedMobileSheetNavOpen:this.mobileSheetNavOpen}get resolvedNavigationGroups(){if(this.navigation.groups?.length)return this.navigation.groups;return this.managedBrowseContext==="settings"?this.navigation.settingsGroups??[]:this.navigation.dashboardGroups??[]}get resolvedToolItems(){return this.tools.items??l}get resolvedPageTabs(){const e=this.currentArea.children;if(!e?.length)return this.pageChrome.tabs??[];return e.map((e=>({id:e.id,label:e.label,dot:e.dot,isInactive:e.isInactive})))}get availableInboxTools(){return this.resolvedToolItems.filter((e=>!e.isInactive&&_(e))).map((e=>e.id))}componentWillLoad(){if(typeof window!=="undefined"){this.resolvedMode=w(window.innerWidth)}this.managedBrowseContext=this.navigation.browseContext??this.navStyle;this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen;this.managedInboxTool=k("",this.availableInboxTools)}componentDidLoad(){this.hasLoaded=true;this.syncSlottedNavStyle();this.syncSlottedMobileState();this.connectMetricsObserver();this.connectViewportListeners();this.connectPageLifecycleListeners();this.el.addEventListener(m,this.onChromeTransitionStart);this.el.addEventListener(f,this.onChromeTransitionEnd);requestAnimationFrame((()=>{this.cachePanelWidthTokens();this.scheduleChromeSync()}));const e=this.el.querySelector("ds-shell-tools, ds-panel-tools");this.toolsFullscreen=e?.getAttribute("presentation")==="fullscreen"}handleToolsPresentation(e){this.toolsFullscreen=e.detail?.presentation==="fullscreen"}disconnectedCallback(){this.resizeObserver?.disconnect();this.resizeObserver=null;this.disconnectViewportListeners();this.disconnectPageLifecycleListeners();this.cancelForegroundRefresh();this.chromeSyncCoalescer.cancel();this.el.removeEventListener(m,this.onChromeTransitionStart);this.el.removeEventListener(f,this.onChromeTransitionEnd)}onShellPropsChange(){this.syncSlottedNavStyle();this.scheduleChromeSync()}handleNavigationChange(e,s){this.managedBrowseContext=this.navigation.browseContext??this.navStyle;if(e.currentUrl!==s.currentUrl||e.activeId!==s.activeId){this.managedMobilePrimaryDestination="area"}}handlePageChromeChange(){if(this.mobileActionMenuSections.length===0){this.mobileActionMenuOpen=false;this.mobileActionSurfaceOpen=false}}handleToolsChange(){if(!this.resolvedToolItems.some((e=>e.id==="help"&&!e.isInactive))){this.managedMobilePrimaryDestination="area"}if(this.managedActiveTool&&!this.resolvedToolItems.some((e=>e.id===this.managedActiveTool))){this.managedToolsOpen=false;this.managedActiveTool="";this.managedMobileDestination="area"}this.managedInboxTool=k(this.managedInboxTool,this.availableInboxTools)}onMobileStateChange(e,t){if(this.managed){this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen}this.syncSlottedMobileState();if(t===true&&!this.effectiveMobileSheetNavOpen&&this.resolvedMode==="mobile"){requestAnimationFrame((()=>{const e=this.el.querySelector("ds-mobile-bar-nav");const t=document.activeElement;if(t instanceof s&&e?.contains(t))return;void e?.focusDestination?.("sheet-nav")}))}}updateResponsiveMode(){if(typeof window==="undefined")return;const e=w(window.innerWidth);if(e===this.resolvedMode)return;this.resolvedMode=e;this.syncSlottedMobileState();this.scheduleChromeSync();if(this.hasLoaded)this.dsResponsiveModeChange.emit({mode:e})}scheduleChromeSync(){this.chromeSyncCoalescer.schedule()}syncSlottedNavStyle(){const e=this.el.querySelector("ds-panel-nav");const s=this.el.querySelector("ds-bar-nav");if(e){e.setAttribute("nav-style",this.navStyle);e.navStyle=this.navStyle}if(s){s.setAttribute("nav-style",this.navStyle);s.navStyle=this.navStyle}}syncSlottedMobileState(){const e=this.el.querySelector("ds-shell-tools");const s=this.el.querySelector("ds-mobile-bar-nav");const t=this.el.querySelector("ds-mobile-sheet-nav");if(e){e.setAttribute("responsive-mode",this.resolvedMode);e.responsiveMode=this.resolvedMode}if(s){s.activeDestination=this.effectiveMobileDestination;s.sheetNavExpanded=this.effectiveMobileSheetNavOpen}if(t){t.open=this.effectiveMobileSheetNavOpen}}connectMetricsObserver(){this.resizeObserver=new ResizeObserver((()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()}));this.resizeObserver.observe(this.el);const e=this.el.querySelector(".shell-app__panel");if(e)this.resizeObserver.observe(e)}connectViewportListeners(){if(typeof window==="undefined")return;window.addEventListener("resize",this.onWindowResize,{passive:true});const e=window.visualViewport;if(e){e.addEventListener("resize",this.onVisualViewportChange,{passive:true});e.addEventListener("scroll",this.onVisualViewportChange,{passive:true})}}disconnectViewportListeners(){if(typeof window==="undefined")return;window.removeEventListener("resize",this.onWindowResize);const e=window.visualViewport;if(e){e.removeEventListener("resize",this.onVisualViewportChange);e.removeEventListener("scroll",this.onVisualViewportChange)}}connectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.addEventListener("visibilitychange",this.onDocumentVisibilityChange);window.addEventListener("pageshow",this.onPageShow)}disconnectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.removeEventListener("visibilitychange",this.onDocumentVisibilityChange);window.removeEventListener("pageshow",this.onPageShow)}cancelForegroundRefresh(){if(this.foregroundRefreshTimer!==null){window.clearTimeout(this.foregroundRefreshTimer);this.foregroundRefreshTimer=null}this.el.classList.remove("shell-app--foreground-refresh")}refreshAfterForegroundRestore(){this.updateResponsiveMode();this.syncSlottedMobileState();this.scheduleChromeSync();if(this.resolvedMode!=="mobile")return;this.cancelForegroundRefresh();this.el.classList.add("shell-app--foreground-refresh");this.foregroundRefreshTimer=window.setTimeout((()=>{this.foregroundRefreshTimer=null;this.el.classList.remove("shell-app--foreground-refresh");void this.el.querySelector(".shell-app__main")?.offsetHeight}),e.FOREGROUND_REFRESH_MS)}cachePanelWidthTokens(){const e=this.el.querySelector("ds-panel-nav .panel-nav");if(!e)return;this.panelWidthTokens=we(e)}applyGradientVars(e,s){const t=e.style;for(const[e,i]of Object.entries(s)){if(i===null)t.removeProperty(e);else t.setProperty(e,i)}}clearGradientPaintVars(e){const s=[de,pe,be];for(const t of e){for(const e of s)t.style.removeProperty(e)}}syncChromeLayoutVars(e,s,t,i){if(e){e.style.setProperty(ce,t)}if(s){s.style.setProperty(ue,i)}}resolvePanelWidthPx(e){const s=e?.querySelector(".panel-nav");if(this.panelNavTransition.isActive&&this.panelWidthTokens.expandedPx>0){const t=ke(e,s);return xe(this.panelWidthTokens,t)}const t=this.el.querySelector(".shell-app__panel");const i=t?.getBoundingClientRect().width??0;if(i>0)return i;if(this.panelWidthTokens.expandedPx>0){const t=ke(e,s);return xe(this.panelWidthTokens,t)}return 0}resolveViewportDimensions(){if(this.panelNavTransition.isActive&&this.cachedViewportWidth>0){return{width:this.cachedViewportWidth,height:this.cachedViewportHeight}}return fe()}chromeLayerActive(){return this.gradientLayerActive()||this.paperTextureLayerActive()}gradientLayerActive(){return this.resolvedMode!=="mobile"&&oe(this.gradientPreset)!=="none"}paperTextureLayerActive(){return this.resolvedMode!=="mobile"&&this.paperTexture!=null}handleWindowKeyDown(e){if(!this.shortcutsEnabled)return;if(J(e.target))return;const s=Y(e);if(!s)return;e.preventDefault();const t=this.el.querySelector("ds-panel-nav");const i=this.el.querySelector("ds-shell-tools, ds-panel-tools");if(s==="toggle-panel-nav"){void t?.toggleCollapsed();return}if(s==="close-panel-tools"){void i?.closeDrawer?.();return}if(s.startsWith("open-tool:")&&i){const e=s.slice("open-tool:".length);void i.activateTool?.(e)}}async activateTool(e){const s=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(s?.activateTool?.(e))}async closeGlobalSurface(){if(this.managedMobileSheetNavOpen){this.managedMobileSheetNavOpen=false;return}const e=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(e?.closeDrawer?.())}async setToolPresentation(e){this.managedToolPresentation=e;this.toolsFullscreen=e==="fullscreen"}activateManagedMobileTool(e){const s=e==="inbox"?k(this.managedInboxTool,this.availableInboxTools):e;if(!s)return false;const t=this.resolvedToolItems.find((t=>t.id===s||e!=="inbox"&&t.mobileDestination===e));if(!t||t.isInactive)return false;const i=t.id;this.managedActiveTool=i;this.managedToolsOpen=true;if(_(t))this.managedInboxTool=i;if(e==="help")this.managedMobilePrimaryDestination="help";this.dsToolChange.emit({id:i,selected:true});return true}get currentArea(){const e=[...this.navigation.dashboardGroups??[],...this.navigation.settingsGroups??[],...this.resolvedNavigationGroups];const s=e.flatMap((e=>e.items));const t=this.navigation.activeId||S(this.navigation.currentUrl??this.pageChrome.currentUrl??"",s);return s.find((e=>e.id===t))??s[0]??{id:"area",icon:"MapPage",label:this.pageChrome.heading||"Area"}}toolDot(e){return this.resolvedToolItems.find((s=>s.id===e))?.dot??false}syncChrome(){const e=this.el.querySelector("ds-panel-nav");const s=this.el.querySelector('ds-bar-nav, ds-bar-title[placement="shell-bar"]');const t=[this.el,e,s].filter((e=>e!==null));const i=()=>{if(e)e.style.removeProperty(ce);if(s)s.style.removeProperty(ue)};const a=oe(this.gradientPreset);if(this.resolvedMode==="mobile"){this.clearGradientPaintVars(t);i();return}const n=this.resolveViewportDimensions();if(a==="none"){this.clearGradientPaintVars(t);i();this.syncPaperTextureLayout(n);return}const l=this.resolvePanelWidthPx(e);const o=ve();const h=_e(l);this.syncChromeLayoutVars(e,s,o,h);const r=me(a);const d=ge({width:n.width,height:n.height});const p=ne(a);for(const e of t){if(e===this.el){this.applyGradientVars(e,{[de]:r,[pe]:d,[ce]:o,[ue]:h,[be]:p});continue}const t=e===s;this.applyGradientVars(e,{[de]:r,[pe]:d,[be]:p,[ce]:t?null:o,[ue]:t?h:null})}this.syncPaperTextureLayout(n)}syncPaperTextureLayout(e){const s=this.el.querySelector(".shell-app__chrome");const t=this.el.querySelector(".shell-app__chrome > ds-paper-texture");if(!s||!t)return;const i=s.getBoundingClientRect();t.style.setProperty("width",`${Math.round(e.width)}px`);t.style.setProperty("height",`${Math.round(e.height)}px`);t.style.setProperty("left",`${-Math.round(i.left)}px`);t.style.setProperty("top",`${-Math.round(i.top)}px`)}renderPaperTexture(){if(!this.paperTextureLayerActive())return null;return i("ds-paper-texture",{class:"shell-app__paper-texture",config:this.paperTexture})}renderManagedPanelNav(){const e=this.navigation;return i("ds-panel-nav",{navStyle:this.navStyle,presentation:this.sectionNavigation==="panel"?"nested":"flat",groups:this.resolvedNavigationGroups,breakpoint:x,routerMode:e.routerMode??"event",activeId:e.activeId??"",activeChildId:this.pageChrome.value??"",currentUrl:e.currentUrl??this.pageChrome.currentUrl??"",storageKey:e.storageKey??"",userName:e.userName??"",userInitial:e.userInitial??"",accountMenuExpanded:e.accountMenuExpanded??false,accountMenuSurfaceOpen:e.accountMenuSurfaceOpen,dashboardLabel:e.dashboardLabel??"Dashboard",settingsLabel:e.settingsLabel??"Settings",accountLabel:e.accountLabel??"Account",dashboardNavigationLabel:e.dashboardNavigationLabel??"Dashboard navigation",settingsNavigationLabel:e.settingsNavigationLabel??"Settings navigation",navigationItemsLabel:e.navigationLabel??"Navigation items",onDsNavSelect:this.handleManagedNavSelect,onDsNavChildSelect:this.handleManagedNavChildSelect,onDsNavFooterAction:this.handleManagedNavFooterAction,onDsNavUserAction:this.handleManagedNavUserAction})}renderManagedBarNav(){return i("ds-bar-nav",{navStyle:this.navStyle,tabs:this.resolvedPageTabs,value:this.pageChrome.value??"",heading:this.pageChrome.routeHeading??this.pageChrome.heading,basePath:this.pageChrome.basePath??"",currentUrl:this.pageChrome.currentUrl??this.navigation.currentUrl??"",onDsTabChange:this.handleManagedTabChange})}renderManagedTopBar(){return this.sectionNavigation==="panel"?this.renderManagedBarTitle("shell-bar"):this.renderManagedBarNav()}renderManagedToolSlots(){const e=[...new Set(this.resolvedToolItems.map((e=>e.id)))].sort();return e.flatMap((e=>[i("div",{key:`tool:${e}`,class:"shell-app__tool-slot-proxy",slot:e},i("slot",{name:e})),i("div",{key:`tool-view:${e}`,class:"shell-app__tool-slot-proxy",slot:`${e}-view`},i("slot",{name:`${e}-view`}))]))}renderManagedTools(){const e=this.tools;return i("ds-shell-tools",{responsiveMode:this.resolvedMode,open:this.managedToolsOpen,activeTool:this.managedActiveTool,presentation:this.managedToolPresentation,fullscreenHeaderMode:e.fullscreenHeaderMode??"shared",items:this.resolvedToolItems,accessories:e.accessories??[],headers:e.headers??{},storageKey:e.storageKey??"",toolsLabel:e.toolsLabel??"Tools",toolShortcutsLabel:e.toolShortcutsLabel??"Tool shortcuts",inboxLabel:e.inboxLabel??"Inbox",inboxNavigationLabel:e.inboxNavigationLabel??"Inbox sections",onDsToolChange:this.handleManagedToolChange,onDsPresentationChange:this.handleManagedPresentationChange,onDsHeaderBack:this.handleManagedHeaderBack,onDsHeaderAction:this.handleManagedHeaderAction,onDsRailAccessoryAction:this.handleManagedRailAccessoryAction},this.renderManagedToolSlots())}renderManagedMobileSheetNav(){const e=this.navigation;return i("ds-mobile-sheet-nav",{open:this.managedMobileSheetNavOpen,presentation:this.sectionNavigation==="panel"?"nested":"flat",browseContext:this.managedBrowseContext,dashboardGroups:e.dashboardGroups??e.groups??[],settingsGroups:e.settingsGroups??[],currentUrl:e.currentUrl??this.pageChrome.currentUrl??"",routeSelectionActive:this.managedMobileDestination==="area",navigationLabel:e.navigationLabel??"Application navigation",dashboardLabel:e.dashboardLabel??"Dashboard",settingsLabel:e.settingsLabel??"Settings",accountLabel:e.accountLabel??"Account",showAccount:e.showMobileAccount??true,onDsAreaSelect:this.handleManagedAreaSelect,onDsNavChildSelect:this.handleManagedMobileChildSelect,onDsBrowseContextChange:this.handleManagedBrowseContext,onDsClose:this.handleManagedSheetClose})}renderManagedMobileBarNav(){const e=e=>this.resolvedToolItems.find((s=>s.id===e));const s=(s,t)=>e(s)?.ariaLabel??e(s)?.label??t;const t=this.resolvedToolItems.some((e=>!e.isInactive&&e.mobileDestination==="activity"));return i("ds-mobile-bar-nav",{hidden:this.tools.mobileBarHidden??false,activeDestination:this.managedMobileDestination,primaryDestination:this.managedMobilePrimaryDestination,currentArea:this.currentArea,sheetNavExpanded:this.managedMobileSheetNavOpen,searchLabel:s("search","Search"),activityMode:t?"direct":"inbox",activityLabel:s("activity","Activity"),inboxLabel:this.tools.inboxLabel??"Inbox",messagesLabel:s("messages","Messages"),agentsLabel:s("agents","Agents"),helpLabel:s("help","Help & Support"),searchDot:this.toolDot("search"),activityDot:this.toolDot("activity"),inboxDot:this.toolDot("stacks")||this.toolDot("activity"),messagesDot:this.toolDot("messages"),agentsDot:this.toolDot("agents"),onDsSheetNavToggle:this.handleManagedSheetToggle,onDsDestinationChange:this.handleManagedMobileDestination})}renderManagedMobileLeading(){if(!this.pageChrome.showBack){return i("slot",{name:"page-header-leading",slot:"leading"})}return[i("ds-tooltip",{slot:"leading",label:this.pageChrome.backAriaLabel??"Back",side:"bottom",size:"sm"},i("ds-button-unfilled",{variant:"icon",icon:this.pageChrome.backIcon??"ChevronLeft",size:"lg","aria-label":this.pageChrome.backAriaLabel??"Back",activeFill:false,hasBorder:false,onDsClick:e=>this.dsPageBack.emit(e.detail)})),i("slot",{name:"page-header-leading",slot:"leading"})]}renderManagedMobileActions(){const e=this.pageChrome.mobileActions??[];const s=r(this.resolvedHeaderActions,"mobile");return[...e.map((e=>i("ds-tooltip",{slot:"trailing",key:e.id,label:e.ariaLabel,side:"bottom",size:"sm"},i("ds-button-unfilled",{id:e.triggerId||undefined,variant:"icon",icon:e.icon,size:"lg","aria-label":e.ariaLabel,haspopup:e.haspopup,controls:e.controls,expanded:e.expanded,surfaceOpen:e.surfaceOpen,pressed:e.pressed,isInactive:e.isInactive,activeFill:false,hasBorder:false,onDsClick:()=>this.dsPageAction.emit(e.id)})))),...s.map((e=>{if(e.type!=="icon")return null;const s=(e.appearance??"unfilled")==="filled"?i("ds-button-filled",{variant:"icon",icon:e.icon,"aria-label":e.ariaLabel,size:"lg",intent:e.intent??"brand",contrast:e.contrast??"bold",isInactive:e.isInactive,isLoading:e.isLoading,onDsClick:()=>this.dsPageAction.emit(e.id)}):i("ds-button-unfilled",{variant:"icon",icon:e.icon,"aria-label":e.ariaLabel,size:"lg",isInactive:e.isInactive,isLoading:e.isLoading,activeFill:false,hasBorder:false,onDsClick:()=>this.dsPageAction.emit(e.id)});return i("ds-tooltip",{slot:"trailing",key:e.id,label:e.label,side:"bottom",size:"sm"},s)})),...this.mobileActionMenuSections.length>0?[i("ds-tooltip",{slot:"trailing",label:"Page options",side:"bottom",size:"sm"},i("ds-button-unfilled",{ref:e=>{this.mobileActionTriggerEl=e??null},id:this.mobileActionMenuTriggerId,variant:"icon",icon:"Ellipses","aria-label":this.pageChrome.actionsAriaLabel??"More page actions",size:"lg",activeFill:false,hasBorder:false,haspopup:"menu",controls:this.mobileActionMenuId,expanded:this.mobileActionMenuOpen,surfaceOpen:this.mobileActionSurfaceOpen,onDsClick:e=>{this.mobileActionMenuInitialFocusVisible=e.detail.detail===0;this.mobileActionMenuOpen=!this.mobileActionMenuOpen;if(this.mobileActionMenuOpen)this.mobileActionSurfaceOpen=true}}))]:[],i("slot",{name:"page-header-trailing",slot:"trailing"})]}get resolvedHeaderActions(){return d(this.pageChrome.actionItems,this.pageChrome.primaryAction??null,this.pageChrome.actions??[])}get mobileActionMenuSections(){return p(this.resolvedHeaderActions,"mobile")}renderManagedMobileActionMenu(){if(this.mobileActionMenuSections.length===0)return null;return i("ds-menu",{id:this.mobileActionMenuId,anchorId:this.mobileActionMenuTriggerId,align:"end",menuLabel:this.pageChrome.actionsAriaLabel??"More page actions",open:this.mobileActionMenuOpen,initialFocusVisible:this.mobileActionMenuInitialFocusVisible,sections:this.mobileActionMenuSections,onDsClose:this.closeMobileActionMenu,onDsAfterClose:()=>{if(!this.mobileActionMenuOpen)this.mobileActionSurfaceOpen=false},onDsSelect:this.handleMobileActionSelect})}get barTitleSections(){return(this.pageChrome.subsections??[]).map((e=>"type"in e?{type:"divider"}:{id:e.id,label:e.label,isInactive:e.isInactive}))}renderManagedBarTitle(e){const s=this.pageChrome;return i("ds-bar-title",{ref:e=>{if(e){e.actionItems=s.actionItems}},slot:e==="page"?"header":undefined,placement:e,variant:e==="shell-bar"?"compact":"expanded",heading:s.heading??"",description:s.description??"",showBack:s.showBack??false,backAriaLabel:s.backAriaLabel??"Back",backLabel:s.backLabel??"Back",breadcrumbs:s.breadcrumbs??[],breadcrumbAriaLabel:s.breadcrumbAriaLabel??"Breadcrumb",sections:this.barTitleSections,value:s.subvalue??"",sectionsAriaLabel:s.subsectionsAriaLabel??"Change page subsection",primaryAction:s.primaryAction??null,actions:s.actions??[],actionsAriaLabel:s.actionsAriaLabel??"More page actions",showDivider:s.showHeaderDivider??true,showCompactDivider:s.showCompactHeaderDivider,onDsBack:this.handleManagedPageBack,onDsBreadcrumbSelect:this.handleManagedBreadcrumbSelect,onDsSectionChange:this.handleManagedSubsectionChange,onDsAction:this.handleManagedPageAction})}renderManagedPage(){const e=this.pageChrome;const s=this.sectionNavigation==="panel";const t=e.showBack||s?[]:this.resolvedPageTabs;return[i("ds-shell-page",{responsiveMode:this.resolvedMode,headerCapacity:C(this.resolvedMode),desktopHeaderPlacement:this.sectionNavigation==="panel"?"shell-bar":"page",contentInset:e.contentInset??"default",contentInsetBlockStart:e.contentInsetBlockStart??"default",contentInsetBlockStartSize:e.contentInsetBlockStartSize,compactContentInsetBlockStartSize:e.compactContentInsetBlockStartSize,scrollCompaction:e.scrollCompaction??true,contentSurface:e.contentSurface??"primary"},this.sectionNavigation==="bar"?this.renderManagedBarTitle("page"):null,i("ds-mobile-header",{slot:"mobile-header",heading:e.heading??"",headingLevel:e.headingLevel??"h1",sections:t,value:e.showBack?"":e.value??"",sectionsAriaLabel:e.sectionsAriaLabel??"Change page section",subsections:e.subsections??[],subsectionsPlacement:e.showBack||s?"combined":"below",subvalue:e.subvalue??"",subsectionsAriaLabel:e.subsectionsAriaLabel??"Change page subsection",tone:e.tone??"default",onDsSectionChange:this.handleManagedTabChange,onDsSubsectionChange:this.handleManagedSubsectionChange},this.renderManagedMobileLeading(),this.renderManagedMobileActions()),i("slot",null)),this.renderManagedMobileActionMenu()]}renderSlottedShell(e,s,t,n,l){return i(a,{class:e,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"},this.renderPaperTexture()),i("div",{class:"shell-app__panel","aria-hidden":l?"true":undefined,inert:l?true:undefined},i("slot",{name:"panel"})),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":l?"true":undefined,inert:l?true:undefined},i("slot",{name:"bar"})),i("div",{class:"shell-app__tools","data-ds-overlay-boundary":true,"aria-hidden":s&&(!t||this.mobileSheetNavOpen)?"true":undefined,inert:s&&(!t||this.mobileSheetNavOpen)?true:undefined,hidden:s&&!t},i("slot",{name:"tools"})),i("div",{class:"shell-app__content","data-ds-overlay-boundary":true,"aria-hidden":l||n?"true":undefined,inert:l||n?true:undefined,tabIndex:0},i("slot",null)),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!s||!this.mobileSheetNavOpen,"aria-hidden":s&&this.mobileSheetNavOpen?undefined:"true",inert:s&&this.mobileSheetNavOpen?undefined:true},i("slot",{name:"mobile-sheet-nav"})),i("div",{class:"shell-app__mobile-bar-nav",hidden:!s},i("slot",{name:"mobile-bar-nav"})))))}render(){const e=this.chromeLayerActive();const s=this.gradientLayerActive();const t=this.paperTextureLayerActive();const n=this.resolvedMode==="mobile";const l=n&&this.effectiveMobileDestination!=="area";const o=n&&(l||this.effectiveMobileSheetNavOpen);const h=!n&&this.toolsFullscreen;const r={"shell-app":true,"shell-app--chrome":e,"shell-app--gradient":s,"shell-app--paper-texture":t,[`shell-app--${this.navStyle}`]:true,[`shell-app--${this.resolvedMode}`]:true,"shell-app--tools-fullscreen":h,"shell-app--mobile-tool-active":l,"shell-app--mobile-sheet-nav-open":n&&this.effectiveMobileSheetNavOpen,"shell-app--managed":this.managed,"shell-app--slotted":!this.managed};if(!this.managed){return this.renderSlottedShell(r,n,l,o,h)}return i(a,{class:r,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"},this.renderPaperTexture()),i("div",{class:"shell-app__panel","aria-hidden":h?"true":undefined,inert:h?true:undefined},this.renderManagedPanelNav()),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":h?"true":undefined,inert:h?true:undefined},this.renderManagedTopBar()),i("div",{class:"shell-app__tools","data-ds-overlay-boundary":true,"aria-hidden":n&&(!l||this.effectiveMobileSheetNavOpen)?"true":undefined,inert:n&&(!l||this.effectiveMobileSheetNavOpen)?true:undefined,hidden:n&&!l},this.renderManagedTools()),i("div",{class:"shell-app__content","data-ds-overlay-boundary":true,"aria-hidden":h||o?"true":undefined,inert:h||o?true:undefined,tabIndex:0},this.renderManagedPage()),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!n||!this.effectiveMobileSheetNavOpen,"aria-hidden":n&&this.effectiveMobileSheetNavOpen?undefined:"true",inert:n&&this.effectiveMobileSheetNavOpen?undefined:true},this.renderManagedMobileSheetNav()),i("div",{class:"shell-app__mobile-bar-nav",hidden:!n},this.renderManagedMobileBarNav()))))}get el(){return this}static get watchers(){return{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],paperTexture:[{onShellPropsChange:0}],sectionNavigation:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],pageChrome:[{handlePageChromeChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}}static get style(){return Ce()}},[262,"ds-shell-app",{composition:[513],navigation:[16],sectionNavigation:[513,"section-navigation"],pageChrome:[16],tools:[16],navStyle:[513,"nav-style"],gradientPreset:[513,"gradient-preset"],paperTexture:[16],shortcutsEnabled:[4,"shortcuts-enabled"],mobileDestination:[1,"mobile-destination"],mobileSheetNavOpen:[4,"mobile-sheet-nav-open"],toolsFullscreen:[32],resolvedMode:[32],managedToolsOpen:[32],managedActiveTool:[32],managedToolPresentation:[32],managedMobileDestination:[32],managedMobilePrimaryDestination:[32],managedMobileSheetNavOpen:[32],managedInboxTool:[32],managedBrowseContext:[32],mobileActionMenuOpen:[32],mobileActionSurfaceOpen:[32],mobileActionMenuInitialFocusVisible:[32],activateTool:[64],closeGlobalSurface:[64],setToolPresentation:[64]},[[0,"dsPresentationChange","handleToolsPresentation"],[10,"keydown","handleWindowKeyDown"]],{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],paperTexture:[{onShellPropsChange:0}],sectionNavigation:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],pageChrome:[{handlePageChromeChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}]);Me.FOREGROUND_REFRESH_MS=50;function De(){if(typeof customElements==="undefined"){return}const e=["ds-shell-app","ds-badge","ds-bar-nav","ds-bar-title","ds-breadcrumb","ds-button-filled","ds-button-unfilled","ds-divider","ds-icon","ds-loader","ds-menu","ds-mobile-bar-nav","ds-mobile-header","ds-mobile-section-switcher","ds-mobile-sheet-nav","ds-panel-nav","ds-panel-tool-header","ds-panel-tools","ds-paper-texture","ds-shell-page","ds-shell-tools","ds-swatch-picker","ds-switch","ds-tab-group","ds-tag","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-shell-app":if(!customElements.get(n(e))){customElements.define(n(e),Me)}break;case"ds-badge":if(!customElements.get(n(e))){M()}break;case"ds-bar-nav":if(!customElements.get(n(e))){v()}break;case"ds-bar-title":if(!customElements.get(n(e))){c()}break;case"ds-breadcrumb":if(!customElements.get(n(e))){D()}break;case"ds-button-filled":if(!customElements.get(n(e))){L()}break;case"ds-button-unfilled":if(!customElements.get(n(e))){P()}break;case"ds-divider":if(!customElements.get(n(e))){A()}break;case"ds-icon":if(!customElements.get(n(e))){B()}break;case"ds-loader":if(!customElements.get(n(e))){T()}break;case"ds-menu":if(!customElements.get(n(e))){E()}break;case"ds-mobile-bar-nav":if(!customElements.get(n(e))){z()}break;case"ds-mobile-header":if(!customElements.get(n(e))){N()}break;case"ds-mobile-section-switcher":if(!customElements.get(n(e))){j()}break;case"ds-mobile-sheet-nav":if(!customElements.get(n(e))){I()}break;case"ds-panel-nav":if(!customElements.get(n(e))){$()}break;case"ds-panel-tool-header":if(!customElements.get(n(e))){F()}break;case"ds-panel-tools":if(!customElements.get(n(e))){o()}break;case"ds-paper-texture":if(!customElements.get(n(e))){O()}break;case"ds-shell-page":if(!customElements.get(n(e))){R()}break;case"ds-shell-tools":if(!customElements.get(n(e))){G()}break;case"ds-swatch-picker":if(!customElements.get(n(e))){H()}break;case"ds-switch":if(!customElements.get(n(e))){V()}break;case"ds-tab-group":if(!customElements.get(n(e))){q()}break;case"ds-tag":if(!customElements.get(n(e))){U()}break;case"ds-text":if(!customElements.get(n(e))){W()}break;case"ds-tooltip":if(!customElements.get(n(e))){Z()}break}}))}De();const Le=Me;const Pe=De;export{Le as DsShellApp,Pe as defineCustomElement};
1
+ import{p as e,H as s,c as t,h as i,a,t as n}from"./index.js";import{c as l,d as o}from"./p-B5eMVBlz.js";import{f as h,v as r,r as d,o as p,d as c}from"./p-CLcwh1kq.js";import{C as u,c as b,a as m,b as f,r as g,d as v}from"./p-K39w53Bw.js";import{i as _,b as y,c as w,r as k,S as x,d as C}from"./p-CgGcgMjs.js";import{c as S}from"./p-D_QtZZR8.js";import{d as D}from"./p-rSC7ZUpy.js";import{d as M}from"./p-BpB2EF9g.js";import{d as L}from"./p-GbtafFds.js";import{d as P}from"./p--yvQzZoO.js";import{d as A}from"./p-DbDYEEWq.js";import{d as B}from"./p-Cea7rROU.js";import{d as T}from"./p-0XTyQNRG.js";import{d as E}from"./p-D1pPq-y0.js";import{d as N}from"./p-CDXcINTO.js";import{d as j}from"./p-Cx2dWjaW.js";import{d as z}from"./p-CyoLh8su.js";import{d as I}from"./p-frKsmPQn.js";import{d as $}from"./p-BZDQLjE0.js";import{d as F}from"./p-BmRHJ_jo.js";import{d as O}from"./p-DnQN0pLp.js";import{d as R}from"./p-DZBB8BVn.js";import{d as G}from"./p-B5AZd41L.js";import{d as V}from"./p-BCFpqnAg.js";import{d as H}from"./p-Bl5wd3v3.js";import{d as Z}from"./p-Crd3PEUx.js";import{d as q}from"./p-BGnRFtBa.js";import{d as U}from"./p-aMyflqva.js";import{d as W}from"./p-CN8PQLZu.js";const Q={k:"search",a:"agents",s:"stacks",m:"messages",n:"activity","/":"help"};function K(e){return!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function X(e){if(!e||typeof e!=="object")return false;if(!("closest"in e)||typeof e.closest!=="function")return false;const s=e;const t=s.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]');if(t)return true;const i=s.getAttribute("role");if(i==="textbox"||i==="combobox"||i==="searchbox")return true;return Boolean(s.isContentEditable)}function J(e){if(e.key==="["||e.code==="BracketLeft")return"[";if(e.key==="]"||e.code==="BracketRight")return"]";return e.key.length===1?e.key.toLowerCase():e.key.toLowerCase()}function Y(e){if(!K(e))return null;const s=J(e);if(s==="[")return"toggle-panel-nav";if(s==="]")return"close-panel-tools";const t=Q[s];if(t)return`open-tool:${t}`;return null}const ee=["none","cool","neutral","warm","fresh"];const se="neutral";const te={cool:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-blue-strong-background)",position:100}]},neutral:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-grey-strong-background)",position:100}]},warm:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-yellow-strong-background)",position:100}]},fresh:{opacity:.4,stops:[{color:"var(--color-color-intent-cyan-faint-background)",position:0},{color:"var(--color-background-transparent)",position:47},{color:"var(--color-background-transparent)",position:58},{color:"var(--color-color-intent-red-faint-background)",position:83},{color:"var(--color-color-intent-pink-faint-background)",position:100}]}};const ie="100% 100% at 0% 0%";function ae(e){const s=oe(e);return s==="none"?null:te[s]}function ne(e){return String(ae(e)?.opacity??0)}function le(e){return ee.includes(e)}function oe(e){return e!=null&&le(e)?e:se}function he(e){const s=oe(e);if(s==="none")return"none";return re(te[s].stops)}function re(e){const s=e.map((e=>`${e.color} ${e.position}%`)).join(", ");return`radial-gradient(${ie}, ${s})`}const de="--ds-shell-gradient-image";const pe="--ds-shell-gradient-size";const ce="--ds-shell-gradient-position-panel";const ue="--ds-shell-gradient-position-bar";const be="--ds-shell-gradient-opacity";function me(e=se){return he(e)}function fe(e){const s=typeof globalThis.window!=="undefined"?globalThis.window:undefined;if(!s)return{width:0,height:0};const t=s.visualViewport;return{width:Math.round(t?.width??s.innerWidth),height:Math.round(t?.height??s.innerHeight)}}function ge(e){return`${Math.round(e.width)}px ${Math.round(e.height)}px`}function ve(){return"0 0"}function _e(e){return`${-Math.round(e)}px 0`}function ye(e,s){if(typeof document==="undefined")return 0;const t=document.createElement("div");t.style.cssText="position:absolute;visibility:hidden;pointer-events:none;height:0;width:var("+s+");";e.appendChild(t);const i=t.getBoundingClientRect().width;e.removeChild(t);return i}function we(e){return{expandedPx:ye(e,"--_nav-width"),collapsedPx:ye(e,"--_nav-width-collapsed")}}function ke(e,s){if(s?.classList.contains("panel-nav--collapsed"))return true;const t=e?.collapsed;return t===true}function xe(e,s){return s?e.collapsedPx:e.expandedPx}const Ce=()=>`.sc-ds-shell-app-h{display:flex;flex-direction:column;height:100%;min-height:0;box-sizing:border-box;overflow:hidden;overscroll-behavior:none;font-family:var(--typography-font-family-ui, system-ui);--ds-shell-panel-tools-width:var(--dimension-panel-width-xs);--ds-shell-gradient-context:flat}.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-secondary)}.shell-app--gradient.sc-ds-shell-app-h{--ds-shell-gradient-context:gradient}.shell-app__row.sc-ds-shell-app{display:flex;flex:1 1 0;min-height:0;position:relative}.shell-app__banner.sc-ds-shell-app{flex:0 0 auto;min-width:0;position:relative;z-index:5}.shell-app__banner.sc-ds-shell-app-s>ds-banner,.shell-app__banner .sc-ds-shell-app-s>ds-banner{display:grid;width:100%}.shell-app__chrome.sc-ds-shell-app{position:absolute;inset:0;pointer-events:none;z-index:0;overflow:hidden;background-color:var(--_shell-chrome-bg)}.shell-app--gradient.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app::before{content:'';position:absolute;inset:0;pointer-events:none;background-position:0 0;background-attachment:fixed;z-index:1;opacity:var(--ds-shell-gradient-opacity, 1);background-image:var(--ds-shell-gradient-image, none);background-size:var(--ds-shell-gradient-size, auto);background-repeat:no-repeat}.shell-app__paper-texture.sc-ds-shell-app{z-index:2}.shell-app__panel.sc-ds-shell-app{flex:0 0 auto;min-height:0;height:100%;position:relative;z-index:2}.shell-app__panel.sc-ds-shell-app-s>ds-panel-nav,.shell-app__panel .sc-ds-shell-app-s>ds-panel-nav{display:block;height:100%}.shell-app__panel.sc-ds-shell-app>ds-panel-nav.sc-ds-shell-app{display:block;height:100%}.shell-app__main.sc-ds-shell-app{flex:1 1 auto;min-width:0;min-height:0;display:grid;grid-template-columns:minmax(0, 1fr) auto;grid-template-rows:auto minmax(0, 1fr);grid-template-areas:'bar tools' 'content tools';position:relative;z-index:1}.shell-app__mobile-sheet-nav.sc-ds-shell-app,.shell-app__mobile-bar-nav.sc-ds-shell-app{display:none}.shell-app__bar.sc-ds-shell-app{grid-area:bar;flex:0 0 auto;min-width:0}.shell-app__bar.sc-ds-shell-app-s>ds-bar-nav,.shell-app__bar .sc-ds-shell-app-s>ds-bar-nav{display:block}.shell-app__bar.sc-ds-shell-app-s>ds-bar-title,.shell-app__bar .sc-ds-shell-app-s>ds-bar-title{display:block}.shell-app__bar.sc-ds-shell-app>ds-bar-nav.sc-ds-shell-app{display:block}.shell-app__bar.sc-ds-shell-app>ds-bar-title.sc-ds-shell-app{display:block}.shell-app__content.sc-ds-shell-app{grid-area:content;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:none;contain:layout}.shell-app__content.sc-ds-shell-app:focus,.shell-app__content.sc-ds-shell-app:focus-visible{outline:none}.shell-app__content.sc-ds-shell-app{position:relative;z-index:1;background-color:var(--color-background-primary)}.shell-app__tools.sc-ds-shell-app{grid-area:tools;flex:0 0 auto;min-width:0;min-height:0;height:100%;display:flex;position:relative;z-index:0;overflow:hidden}.shell-app__tools.sc-ds-shell-app-s>ds-panel-tools,.shell-app__tools .sc-ds-shell-app-s>ds-panel-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app-s>ds-shell-tools,.shell-app__tools .sc-ds-shell-app-s>ds-shell-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app>ds-shell-tools.sc-ds-shell-app{display:block;height:100%;min-height:0}.shell-app__tool-slot-proxy.sc-ds-shell-app{display:block;width:100%;height:100%;min-width:0;min-height:0}.shell-app__content.sc-ds-shell-app>ds-shell-page.sc-ds-shell-app{display:block;min-height:100%}.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{visibility:hidden}.shell-app--mobile.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-primary);padding-block-start:env(safe-area-inset-top)}.shell-app--mobile.shell-app--foreground-refresh.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{transform:translateZ(0)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app{display:none}.shell-app--mobile.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{width:100%;box-sizing:border-box;grid-template-columns:minmax(0, 1fr);grid-template-rows:minmax(0, 1fr) auto;grid-template-areas:'stage' 'mobile-bar-nav';background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{grid-area:stage;min-width:0;min-height:0;height:100%;position:relative}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{z-index:1;overflow:auto}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{z-index:2;width:100%;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{display:block;z-index:3;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav.sc-ds-shell-app{grid-area:mobile-bar-nav;display:block;min-width:0;position:relative;z-index:4}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav[hidden].sc-ds-shell-app{display:none}.shell-app--mobile-tool-active.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{visibility:hidden}`;let Se=0;const De=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.dsResponsiveModeChange=t(this,"dsResponsiveModeChange",7);this.dsNavSelect=t(this,"dsNavSelect",7);this.dsTabChange=t(this,"dsTabChange",7);this.dsNavChildSelect=t(this,"dsNavChildSelect",7);this.dsSubsectionChange=t(this,"dsSubsectionChange",7);this.dsPageBack=t(this,"dsPageBack",7);this.dsBreadcrumbSelect=t(this,"dsBreadcrumbSelect",7);this.dsPageAction=t(this,"dsPageAction",7);this.dsToolChange=t(this,"dsToolChange",7);this.dsHeaderBack=t(this,"dsHeaderBack",7);this.dsHeaderAction=t(this,"dsHeaderAction",7);this.dsRailAccessoryAction=t(this,"dsRailAccessoryAction",7);this.dsPresentationChange=t(this,"dsPresentationChange",7);this.dsBrowseContextChange=t(this,"dsBrowseContextChange",7);this.dsNavFooterAction=t(this,"dsNavFooterAction",7);this.dsNavUserAction=t(this,"dsNavUserAction",7);this.composition="managed";this.navigation={};this.sectionNavigation="bar";this.pageChrome={};this.tools={};this.navStyle="dashboard";this.gradientPreset=se;this.shortcutsEnabled=true;this.mobileDestination="area";this.mobileSheetNavOpen=false;this.toolsFullscreen=false;this.resolvedMode="desktop";this.managedToolsOpen=false;this.managedActiveTool="";this.managedToolPresentation="drawer";this.managedMobileDestination="area";this.managedMobilePrimaryDestination="area";this.managedMobileSheetNavOpen=false;this.managedInboxTool="";this.managedBrowseContext="dashboard";this.mobileActionMenuOpen=false;this.mobileActionSurfaceOpen=false;this.mobileActionMenuInitialFocusVisible=false;this.instanceId=Se++;this.mobileActionMenuTriggerId=`shell-app-mobile-action-trigger-${this.instanceId}`;this.mobileActionMenuId=`shell-app-mobile-action-menu-${this.instanceId}`;this.mobileActionTriggerEl=null;this.resizeObserver=null;this.hasLoaded=false;this.foregroundRefreshTimer=null;this.panelNavTransition=new u;this.chromeSyncCoalescer=b((()=>this.syncChrome()));this.panelWidthTokens={expandedPx:0,collapsedPx:0};this.cachedViewportWidth=0;this.cachedViewportHeight=0;this.onWindowResize=()=>{this.updateResponsiveMode();if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onVisualViewportChange=()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onChromeTransitionStart=e=>{const s=g(e);if(s!=="panel-nav")return;this.panelNavTransition.enter();const t=fe();this.cachedViewportWidth=t.width;this.cachedViewportHeight=t.height;this.syncChrome()};this.onChromeTransitionEnd=e=>{const s=g(e);if(s!=="panel-nav")return;this.panelNavTransition.exit();if(!this.panelNavTransition.isActive){this.scheduleChromeSync()}};this.onDocumentVisibilityChange=()=>{if(!document.hidden)this.refreshAfterForegroundRestore()};this.onPageShow=e=>{if(e.persisted)this.refreshAfterForegroundRestore()};this.handleManagedNavSelect=e=>{e.stopPropagation();this.dsNavSelect.emit(e.detail)};this.handleManagedNavChildSelect=e=>{e.stopPropagation();this.dsNavChildSelect.emit(e.detail)};this.handleManagedTabChange=e=>{e.stopPropagation();this.dsTabChange.emit(e.detail)};this.handleManagedPageBack=e=>{e.stopPropagation();this.dsPageBack.emit(e.detail)};this.handleManagedBreadcrumbSelect=e=>{e.stopPropagation();const s=this.dsBreadcrumbSelect.emit(e.detail);if(s.defaultPrevented)e.preventDefault()};this.handleManagedSubsectionChange=e=>{e.stopPropagation();this.dsSubsectionChange.emit(e.detail)};this.handleManagedPageAction=e=>{e.stopPropagation();this.dsPageAction.emit(e.detail)};this.handleManagedToolChange=e=>{e.stopPropagation();const{id:s,selected:t}=e.detail;this.managedActiveTool=s;this.managedToolsOpen=t;const i=this.resolvedToolItems.find((e=>e.id===s));if(i&&_(i)){this.managedInboxTool=s}this.managedMobileDestination=t?i?.mobileDestination??y(true,s):"area";this.managedMobileSheetNavOpen=false;this.dsToolChange.emit(e.detail)};this.handleManagedPresentationChange=e=>{e.stopPropagation();this.managedToolPresentation=e.detail.presentation;this.toolsFullscreen=e.detail.presentation==="fullscreen";this.dsPresentationChange.emit(e.detail)};this.handleManagedHeaderBack=e=>{e.stopPropagation();this.dsHeaderBack.emit(e.detail)};this.handleManagedHeaderAction=e=>{e.stopPropagation();this.dsHeaderAction.emit(e.detail)};this.handleManagedRailAccessoryAction=e=>{e.stopPropagation();this.dsRailAccessoryAction.emit(e.detail)};this.handleManagedSheetToggle=e=>{e.stopPropagation();this.managedMobileSheetNavOpen=e.detail};this.handleManagedMobileDestination=e=>{e.stopPropagation();const s=e.detail.destination;this.managedMobileSheetNavOpen=false;this.managedMobileDestination=s;if(s==="area"){this.managedToolsOpen=false;return}this.activateManagedMobileTool(s)};this.handleManagedAreaSelect=e=>{e.stopPropagation();if(e.detail==="help"){this.managedMobileSheetNavOpen=false;this.managedMobileDestination="help";if(this.activateManagedMobileTool("help"))return}this.managedMobileSheetNavOpen=false;this.managedMobileDestination="area";this.managedMobilePrimaryDestination="area";this.managedToolsOpen=false;this.dsNavSelect.emit(e.detail)};this.handleManagedMobileChildSelect=e=>{e.stopPropagation();this.managedMobileSheetNavOpen=false;this.managedMobileDestination="area";this.managedMobilePrimaryDestination="area";this.managedToolsOpen=false;this.dsNavChildSelect.emit(e.detail)};this.handleManagedBrowseContext=e=>{e.stopPropagation();this.managedBrowseContext=e.detail;this.dsBrowseContextChange.emit(e.detail)};this.handleManagedSheetClose=e=>{e.stopPropagation();this.managedMobileSheetNavOpen=false};this.handleManagedNavFooterAction=e=>{e.stopPropagation();this.dsNavFooterAction.emit()};this.handleManagedNavUserAction=e=>{e.stopPropagation();this.dsNavUserAction.emit(e.detail)};this.closeMobileActionMenu=()=>{this.mobileActionMenuOpen=false};this.handleMobileActionSelect=e=>{const s=String(e.detail.value??"");const t=h(this.resolvedHeaderActions,s);if(!t||t.isInactive||"isLoading"in t&&t.isLoading)return;this.mobileActionMenuOpen=false;this.dsPageAction.emit(s);requestAnimationFrame((()=>void this.mobileActionTriggerEl?.setFocus?.()))}}get managed(){return this.composition==="managed"}get effectiveMobileDestination(){return this.managed?this.managedMobileDestination:this.mobileDestination}get effectiveMobileSheetNavOpen(){return this.managed?this.managedMobileSheetNavOpen:this.mobileSheetNavOpen}get resolvedNavigationGroups(){if(this.navigation.groups?.length)return this.navigation.groups;return this.managedBrowseContext==="settings"?this.navigation.settingsGroups??[]:this.navigation.dashboardGroups??[]}get resolvedToolItems(){return this.tools.items??l}get resolvedPageTabs(){const e=this.currentArea.children;if(!e?.length)return this.pageChrome.tabs??[];return e.map((e=>({id:e.id,label:e.label,dot:e.dot,isInactive:e.isInactive})))}get availableInboxTools(){return this.resolvedToolItems.filter((e=>!e.isInactive&&_(e))).map((e=>e.id))}componentWillLoad(){if(typeof window!=="undefined"){this.resolvedMode=w(window.innerWidth)}this.managedBrowseContext=this.navigation.browseContext??this.navStyle;this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen;this.managedInboxTool=k("",this.availableInboxTools)}componentDidLoad(){this.hasLoaded=true;this.syncSlottedNavStyle();this.syncSlottedMobileState();this.connectMetricsObserver();this.connectViewportListeners();this.connectPageLifecycleListeners();this.el.addEventListener(m,this.onChromeTransitionStart);this.el.addEventListener(f,this.onChromeTransitionEnd);requestAnimationFrame((()=>{this.cachePanelWidthTokens();this.scheduleChromeSync()}));const e=this.el.querySelector("ds-shell-tools, ds-panel-tools");this.toolsFullscreen=e?.getAttribute("presentation")==="fullscreen"}handleToolsPresentation(e){this.toolsFullscreen=e.detail?.presentation==="fullscreen"}disconnectedCallback(){this.resizeObserver?.disconnect();this.resizeObserver=null;this.disconnectViewportListeners();this.disconnectPageLifecycleListeners();this.cancelForegroundRefresh();this.chromeSyncCoalescer.cancel();this.el.removeEventListener(m,this.onChromeTransitionStart);this.el.removeEventListener(f,this.onChromeTransitionEnd)}onShellPropsChange(){this.syncSlottedNavStyle();this.scheduleChromeSync()}handleNavigationChange(e,s){this.managedBrowseContext=this.navigation.browseContext??this.navStyle;if(e.currentUrl!==s.currentUrl||e.activeId!==s.activeId){this.managedMobilePrimaryDestination="area"}}handlePageChromeChange(){if(this.mobileActionMenuSections.length===0){this.mobileActionMenuOpen=false;this.mobileActionSurfaceOpen=false}}handleToolsChange(){if(!this.resolvedToolItems.some((e=>e.id==="help"&&!e.isInactive))){this.managedMobilePrimaryDestination="area"}if(this.managedActiveTool&&!this.resolvedToolItems.some((e=>e.id===this.managedActiveTool))){this.managedToolsOpen=false;this.managedActiveTool="";this.managedMobileDestination="area"}this.managedInboxTool=k(this.managedInboxTool,this.availableInboxTools)}onMobileStateChange(e,t){if(this.managed){this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen}this.syncSlottedMobileState();if(t===true&&!this.effectiveMobileSheetNavOpen&&this.resolvedMode==="mobile"){requestAnimationFrame((()=>{const e=this.el.querySelector("ds-mobile-bar-nav");const t=document.activeElement;if(t instanceof s&&e?.contains(t))return;void e?.focusDestination?.("sheet-nav")}))}}updateResponsiveMode(){if(typeof window==="undefined")return;const e=w(window.innerWidth);if(e===this.resolvedMode)return;this.resolvedMode=e;this.syncSlottedMobileState();this.scheduleChromeSync();if(this.hasLoaded)this.dsResponsiveModeChange.emit({mode:e})}scheduleChromeSync(){this.chromeSyncCoalescer.schedule()}syncSlottedNavStyle(){const e=this.el.querySelector("ds-panel-nav");const s=this.el.querySelector("ds-bar-nav");if(e){e.setAttribute("nav-style",this.navStyle);e.navStyle=this.navStyle}if(s){s.setAttribute("nav-style",this.navStyle);s.navStyle=this.navStyle}}syncSlottedMobileState(){const e=this.el.querySelector("ds-shell-tools");const s=this.el.querySelector("ds-mobile-bar-nav");const t=this.el.querySelector("ds-mobile-sheet-nav");if(e){e.setAttribute("responsive-mode",this.resolvedMode);e.responsiveMode=this.resolvedMode}if(s){s.activeDestination=this.effectiveMobileDestination;s.sheetNavExpanded=this.effectiveMobileSheetNavOpen}if(t){t.open=this.effectiveMobileSheetNavOpen}}connectMetricsObserver(){this.resizeObserver=new ResizeObserver((()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()}));this.resizeObserver.observe(this.el);const e=this.el.querySelector(".shell-app__panel");if(e)this.resizeObserver.observe(e)}connectViewportListeners(){if(typeof window==="undefined")return;window.addEventListener("resize",this.onWindowResize,{passive:true});const e=window.visualViewport;if(e){e.addEventListener("resize",this.onVisualViewportChange,{passive:true});e.addEventListener("scroll",this.onVisualViewportChange,{passive:true})}}disconnectViewportListeners(){if(typeof window==="undefined")return;window.removeEventListener("resize",this.onWindowResize);const e=window.visualViewport;if(e){e.removeEventListener("resize",this.onVisualViewportChange);e.removeEventListener("scroll",this.onVisualViewportChange)}}connectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.addEventListener("visibilitychange",this.onDocumentVisibilityChange);window.addEventListener("pageshow",this.onPageShow)}disconnectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.removeEventListener("visibilitychange",this.onDocumentVisibilityChange);window.removeEventListener("pageshow",this.onPageShow)}cancelForegroundRefresh(){if(this.foregroundRefreshTimer!==null){window.clearTimeout(this.foregroundRefreshTimer);this.foregroundRefreshTimer=null}this.el.classList.remove("shell-app--foreground-refresh")}refreshAfterForegroundRestore(){this.updateResponsiveMode();this.syncSlottedMobileState();this.scheduleChromeSync();if(this.resolvedMode!=="mobile")return;this.cancelForegroundRefresh();this.el.classList.add("shell-app--foreground-refresh");this.foregroundRefreshTimer=window.setTimeout((()=>{this.foregroundRefreshTimer=null;this.el.classList.remove("shell-app--foreground-refresh");void this.el.querySelector(".shell-app__main")?.offsetHeight}),e.FOREGROUND_REFRESH_MS)}cachePanelWidthTokens(){const e=this.el.querySelector("ds-panel-nav .panel-nav");if(!e)return;this.panelWidthTokens=we(e)}applyGradientVars(e,s){const t=e.style;for(const[e,i]of Object.entries(s)){if(i===null)t.removeProperty(e);else t.setProperty(e,i)}}clearGradientPaintVars(e){const s=[de,pe,be];for(const t of e){for(const e of s)t.style.removeProperty(e)}}syncChromeLayoutVars(e,s,t,i){if(e){e.style.setProperty(ce,t)}if(s){s.style.setProperty(ue,i)}}resolvePanelWidthPx(e){const s=e?.querySelector(".panel-nav");if(this.panelNavTransition.isActive&&this.panelWidthTokens.expandedPx>0){const t=ke(e,s);return xe(this.panelWidthTokens,t)}const t=this.el.querySelector(".shell-app__panel");const i=t?.getBoundingClientRect().width??0;if(i>0)return i;if(this.panelWidthTokens.expandedPx>0){const t=ke(e,s);return xe(this.panelWidthTokens,t)}return 0}resolveViewportDimensions(){if(this.panelNavTransition.isActive&&this.cachedViewportWidth>0){return{width:this.cachedViewportWidth,height:this.cachedViewportHeight}}return fe()}chromeLayerActive(){return this.gradientLayerActive()||this.paperTextureLayerActive()}gradientLayerActive(){return this.resolvedMode!=="mobile"&&oe(this.gradientPreset)!=="none"}paperTextureLayerActive(){return this.resolvedMode!=="mobile"&&this.paperTexture!=null}handleWindowKeyDown(e){if(!this.shortcutsEnabled)return;if(X(e.target))return;const s=Y(e);if(!s)return;e.preventDefault();const t=this.el.querySelector("ds-panel-nav");const i=this.el.querySelector("ds-shell-tools, ds-panel-tools");if(s==="toggle-panel-nav"){void t?.toggleCollapsed();return}if(s==="close-panel-tools"){void i?.closeDrawer?.();return}if(s.startsWith("open-tool:")&&i){const e=s.slice("open-tool:".length);void i.activateTool?.(e)}}async activateTool(e){const s=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(s?.activateTool?.(e))}async closeGlobalSurface(){if(this.managedMobileSheetNavOpen){this.managedMobileSheetNavOpen=false;return}const e=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(e?.closeDrawer?.())}async setToolPresentation(e){this.managedToolPresentation=e;this.toolsFullscreen=e==="fullscreen"}activateManagedMobileTool(e){const s=e==="inbox"?k(this.managedInboxTool,this.availableInboxTools):e;if(!s)return false;const t=this.resolvedToolItems.find((t=>t.id===s||e!=="inbox"&&t.mobileDestination===e));if(!t||t.isInactive)return false;const i=t.id;this.managedActiveTool=i;this.managedToolsOpen=true;if(_(t))this.managedInboxTool=i;if(e==="help")this.managedMobilePrimaryDestination="help";this.dsToolChange.emit({id:i,selected:true});return true}get currentArea(){const e=[...this.navigation.dashboardGroups??[],...this.navigation.settingsGroups??[],...this.resolvedNavigationGroups];const s=e.flatMap((e=>e.items));const t=this.navigation.activeId||S(this.navigation.currentUrl??this.pageChrome.currentUrl??"",s);return s.find((e=>e.id===t))??s[0]??{id:"area",icon:"MapPage",label:this.pageChrome.heading||"Area"}}toolDot(e){return this.resolvedToolItems.find((s=>s.id===e))?.dot??false}syncChrome(){const e=this.el.querySelector("ds-panel-nav");const s=this.el.querySelector('ds-bar-nav, ds-bar-title[placement="shell-bar"]');const t=[this.el,e,s].filter((e=>e!==null));const i=()=>{if(e)e.style.removeProperty(ce);if(s)s.style.removeProperty(ue)};const a=oe(this.gradientPreset);if(this.resolvedMode==="mobile"){this.clearGradientPaintVars(t);i();return}const n=this.resolveViewportDimensions();if(a==="none"){this.clearGradientPaintVars(t);i();this.syncPaperTextureLayout(n);return}const l=this.resolvePanelWidthPx(e);const o=ve();const h=_e(l);this.syncChromeLayoutVars(e,s,o,h);const r=me(a);const d=ge({width:n.width,height:n.height});const p=ne(a);for(const e of t){if(e===this.el){this.applyGradientVars(e,{[de]:r,[pe]:d,[ce]:o,[ue]:h,[be]:p});continue}const t=e===s;this.applyGradientVars(e,{[de]:r,[pe]:d,[be]:p,[ce]:t?null:o,[ue]:t?h:null})}this.syncPaperTextureLayout(n)}syncPaperTextureLayout(e){const s=this.el.querySelector(".shell-app__chrome");const t=this.el.querySelector(".shell-app__chrome > ds-paper-texture");if(!s||!t)return;const i=s.getBoundingClientRect();t.style.setProperty("width",`${Math.round(e.width)}px`);t.style.setProperty("height",`${Math.round(e.height)}px`);t.style.setProperty("left",`${-Math.round(i.left)}px`);t.style.setProperty("top",`${-Math.round(i.top)}px`)}renderPaperTexture(){if(!this.paperTextureLayerActive())return null;return i("ds-paper-texture",{class:"shell-app__paper-texture",config:this.paperTexture})}renderManagedPanelNav(){const e=this.navigation;return i("ds-panel-nav",{navStyle:this.navStyle,presentation:this.sectionNavigation==="panel"?"nested":"flat",groups:this.resolvedNavigationGroups,breakpoint:x,routerMode:e.routerMode??"event",activeId:e.activeId??"",activeChildId:this.pageChrome.value??"",currentUrl:e.currentUrl??this.pageChrome.currentUrl??"",storageKey:e.storageKey??"",userName:e.userName??"",userInitial:e.userInitial??"",accountMenuExpanded:e.accountMenuExpanded??false,accountMenuSurfaceOpen:e.accountMenuSurfaceOpen,dashboardLabel:e.dashboardLabel??"Dashboard",settingsLabel:e.settingsLabel??"Settings",accountLabel:e.accountLabel??"Account",dashboardNavigationLabel:e.dashboardNavigationLabel??"Dashboard navigation",settingsNavigationLabel:e.settingsNavigationLabel??"Settings navigation",navigationItemsLabel:e.navigationLabel??"Navigation items",onDsNavSelect:this.handleManagedNavSelect,onDsNavChildSelect:this.handleManagedNavChildSelect,onDsNavFooterAction:this.handleManagedNavFooterAction,onDsNavUserAction:this.handleManagedNavUserAction})}renderManagedBarNav(){return i("ds-bar-nav",{navStyle:this.navStyle,tabs:this.resolvedPageTabs,value:this.pageChrome.value??"",heading:this.pageChrome.routeHeading??this.pageChrome.heading,basePath:this.pageChrome.basePath??"",currentUrl:this.pageChrome.currentUrl??this.navigation.currentUrl??"",onDsTabChange:this.handleManagedTabChange})}renderManagedTopBar(){return this.sectionNavigation==="panel"?this.renderManagedBarTitle("shell-bar"):this.renderManagedBarNav()}renderManagedToolSlots(){const e=[...new Set(this.resolvedToolItems.map((e=>e.id)))].sort();return e.flatMap((e=>[i("div",{key:`tool:${e}`,class:"shell-app__tool-slot-proxy",slot:e},i("slot",{name:e})),i("div",{key:`tool-view:${e}`,class:"shell-app__tool-slot-proxy",slot:`${e}-view`},i("slot",{name:`${e}-view`}))]))}renderManagedTools(){const e=this.tools;return i("ds-shell-tools",{responsiveMode:this.resolvedMode,open:this.managedToolsOpen,activeTool:this.managedActiveTool,presentation:this.managedToolPresentation,fullscreenHeaderMode:e.fullscreenHeaderMode??"shared",items:this.resolvedToolItems,accessories:e.accessories??[],headers:e.headers??{},storageKey:e.storageKey??"",toolsLabel:e.toolsLabel??"Tools",toolShortcutsLabel:e.toolShortcutsLabel??"Tool shortcuts",inboxLabel:e.inboxLabel??"Inbox",inboxNavigationLabel:e.inboxNavigationLabel??"Inbox sections",onDsToolChange:this.handleManagedToolChange,onDsPresentationChange:this.handleManagedPresentationChange,onDsHeaderBack:this.handleManagedHeaderBack,onDsHeaderAction:this.handleManagedHeaderAction,onDsRailAccessoryAction:this.handleManagedRailAccessoryAction},this.renderManagedToolSlots())}renderManagedMobileSheetNav(){const e=this.navigation;return i("ds-mobile-sheet-nav",{open:this.managedMobileSheetNavOpen,presentation:this.sectionNavigation==="panel"?"nested":"flat",browseContext:this.managedBrowseContext,dashboardGroups:e.dashboardGroups??e.groups??[],settingsGroups:e.settingsGroups??[],currentUrl:e.currentUrl??this.pageChrome.currentUrl??"",routeSelectionActive:this.managedMobileDestination==="area",navigationLabel:e.navigationLabel??"Application navigation",dashboardLabel:e.dashboardLabel??"Dashboard",settingsLabel:e.settingsLabel??"Settings",accountLabel:e.accountLabel??"Account",showAccount:e.showMobileAccount??true,onDsAreaSelect:this.handleManagedAreaSelect,onDsNavChildSelect:this.handleManagedMobileChildSelect,onDsBrowseContextChange:this.handleManagedBrowseContext,onDsClose:this.handleManagedSheetClose})}renderManagedMobileBarNav(){const e=e=>this.resolvedToolItems.find((s=>s.id===e));const s=(s,t)=>e(s)?.ariaLabel??e(s)?.label??t;const t=this.resolvedToolItems.some((e=>!e.isInactive&&e.mobileDestination==="activity"));return i("ds-mobile-bar-nav",{hidden:this.tools.mobileBarHidden??false,activeDestination:this.managedMobileDestination,primaryDestination:this.managedMobilePrimaryDestination,currentArea:this.currentArea,sheetNavExpanded:this.managedMobileSheetNavOpen,searchLabel:s("search","Search"),activityMode:t?"direct":"inbox",activityLabel:s("activity","Activity"),inboxLabel:this.tools.inboxLabel??"Inbox",messagesLabel:s("messages","Messages"),agentsLabel:s("agents","Agents"),helpLabel:s("help","Help & Support"),searchDot:this.toolDot("search"),activityDot:this.toolDot("activity"),inboxDot:this.toolDot("stacks")||this.toolDot("activity"),messagesDot:this.toolDot("messages"),agentsDot:this.toolDot("agents"),onDsSheetNavToggle:this.handleManagedSheetToggle,onDsDestinationChange:this.handleManagedMobileDestination})}renderManagedMobileLeading(){if(!this.pageChrome.showBack){return i("slot",{name:"page-header-leading",slot:"leading"})}return[i("ds-tooltip",{slot:"leading",label:this.pageChrome.backAriaLabel??"Back",side:"bottom",size:"sm"},i("ds-button-unfilled",{variant:"icon",icon:this.pageChrome.backIcon??"ChevronLeft",size:"lg","aria-label":this.pageChrome.backAriaLabel??"Back",activeFill:false,hasBorder:false,onDsClick:e=>this.dsPageBack.emit(e.detail)})),i("slot",{name:"page-header-leading",slot:"leading"})]}renderManagedMobileActions(){const e=this.pageChrome.mobileActions??[];const s=r(this.resolvedHeaderActions,"mobile");return[...e.map((e=>i("ds-tooltip",{slot:"trailing",key:e.id,label:e.ariaLabel,side:"bottom",size:"sm"},i("ds-button-unfilled",{id:e.triggerId||undefined,variant:"icon",icon:e.icon,size:"lg","aria-label":e.ariaLabel,haspopup:e.haspopup,controls:e.controls,expanded:e.expanded,surfaceOpen:e.surfaceOpen,pressed:e.pressed,isInactive:e.isInactive,activeFill:false,hasBorder:false,onDsClick:()=>this.dsPageAction.emit(e.id)})))),...s.map((e=>{if(e.type!=="icon")return null;const s=(e.appearance??"unfilled")==="filled"?i("ds-button-filled",{variant:"icon",icon:e.icon,"aria-label":e.ariaLabel,size:"lg",intent:e.intent??"brand",contrast:e.contrast??"bold",isInactive:e.isInactive,isLoading:e.isLoading,onDsClick:()=>this.dsPageAction.emit(e.id)}):i("ds-button-unfilled",{variant:"icon",icon:e.icon,"aria-label":e.ariaLabel,size:"lg",isInactive:e.isInactive,isLoading:e.isLoading,activeFill:false,hasBorder:false,onDsClick:()=>this.dsPageAction.emit(e.id)});return i("ds-tooltip",{slot:"trailing",key:e.id,label:e.label,side:"bottom",size:"sm"},s)})),...this.mobileActionMenuSections.length>0?[i("ds-tooltip",{slot:"trailing",label:"Page options",side:"bottom",size:"sm"},i("ds-button-unfilled",{ref:e=>{this.mobileActionTriggerEl=e??null},id:this.mobileActionMenuTriggerId,variant:"icon",icon:"Ellipses","aria-label":this.pageChrome.actionsAriaLabel??"More page actions",size:"lg",activeFill:false,hasBorder:false,haspopup:"menu",controls:this.mobileActionMenuId,expanded:this.mobileActionMenuOpen,surfaceOpen:this.mobileActionSurfaceOpen,onDsClick:e=>{this.mobileActionMenuInitialFocusVisible=e.detail.detail===0;this.mobileActionMenuOpen=!this.mobileActionMenuOpen;if(this.mobileActionMenuOpen)this.mobileActionSurfaceOpen=true}}))]:[],i("slot",{name:"page-header-trailing",slot:"trailing"})]}get resolvedHeaderActions(){return d(this.pageChrome.actionItems,this.pageChrome.primaryAction??null,this.pageChrome.actions??[])}get mobileActionMenuSections(){return p(this.resolvedHeaderActions,"mobile")}renderManagedMobileActionMenu(){if(this.mobileActionMenuSections.length===0)return null;return i("ds-menu",{id:this.mobileActionMenuId,anchorId:this.mobileActionMenuTriggerId,align:"end",menuLabel:this.pageChrome.actionsAriaLabel??"More page actions",open:this.mobileActionMenuOpen,initialFocusVisible:this.mobileActionMenuInitialFocusVisible,sections:this.mobileActionMenuSections,onDsClose:this.closeMobileActionMenu,onDsAfterClose:()=>{if(!this.mobileActionMenuOpen)this.mobileActionSurfaceOpen=false},onDsSelect:this.handleMobileActionSelect})}get barTitleSections(){return(this.pageChrome.subsections??[]).map((e=>"type"in e?{type:"divider"}:{id:e.id,label:e.label,isInactive:e.isInactive}))}renderManagedBarTitle(e){const s=this.pageChrome;return i("ds-bar-title",{ref:e=>{if(e){e.actionItems=s.actionItems}},slot:e==="page"?"header":undefined,placement:e,variant:e==="shell-bar"?"compact":"expanded",heading:s.heading??"",description:s.description??"",showBack:s.showBack??false,backAriaLabel:s.backAriaLabel??"Back",backLabel:s.backLabel??"Back",breadcrumbs:s.breadcrumbs??[],breadcrumbAriaLabel:s.breadcrumbAriaLabel??"Breadcrumb",sections:this.barTitleSections,value:s.subvalue??"",sectionsAriaLabel:s.subsectionsAriaLabel??"Change page subsection",primaryAction:s.primaryAction??null,actions:s.actions??[],actionsAriaLabel:s.actionsAriaLabel??"More page actions",showDivider:s.showHeaderDivider??true,showCompactDivider:s.showCompactHeaderDivider,onDsBack:this.handleManagedPageBack,onDsBreadcrumbSelect:this.handleManagedBreadcrumbSelect,onDsSectionChange:this.handleManagedSubsectionChange,onDsAction:this.handleManagedPageAction})}renderManagedPage(){const e=this.pageChrome;const s=this.sectionNavigation==="panel";const t=e.showBack||s?[]:this.resolvedPageTabs;return[i("ds-shell-page",{responsiveMode:this.resolvedMode,headerCapacity:C(this.resolvedMode),desktopHeaderPlacement:this.sectionNavigation==="panel"?"shell-bar":"page",contentInset:e.contentInset??"default",contentInsetBlockStart:e.contentInsetBlockStart??"default",contentInsetBlockStartSize:e.contentInsetBlockStartSize,compactContentInsetBlockStartSize:e.compactContentInsetBlockStartSize,scrollCompaction:e.scrollCompaction??true,contentSurface:e.contentSurface??"primary"},this.sectionNavigation==="bar"?this.renderManagedBarTitle("page"):null,i("ds-mobile-header",{slot:"mobile-header",heading:e.heading??"",headingLevel:e.headingLevel??"h1",sections:t,value:e.showBack?"":e.value??"",sectionsAriaLabel:e.sectionsAriaLabel??"Change page section",subsections:e.subsections??[],subsectionsPlacement:e.showBack||s?"combined":"below",subvalue:e.subvalue??"",subsectionsAriaLabel:e.subsectionsAriaLabel??"Change page subsection",tone:e.tone??"default",onDsSectionChange:this.handleManagedTabChange,onDsSubsectionChange:this.handleManagedSubsectionChange},this.renderManagedMobileLeading(),this.renderManagedMobileActions()),i("slot",null)),this.renderManagedMobileActionMenu()]}renderSlottedShell(e,s,t,n,l){return i(a,{class:e,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"},this.renderPaperTexture()),i("div",{class:"shell-app__panel","aria-hidden":l?"true":undefined,inert:l?true:undefined},i("slot",{name:"panel"})),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":l?"true":undefined,inert:l?true:undefined},i("slot",{name:"bar"})),i("div",{class:"shell-app__tools","data-ds-overlay-boundary":true,"aria-hidden":s&&(!t||this.mobileSheetNavOpen)?"true":undefined,inert:s&&(!t||this.mobileSheetNavOpen)?true:undefined,hidden:s&&!t},i("slot",{name:"tools"})),i("div",{class:"shell-app__content","data-ds-overlay-boundary":true,"aria-hidden":l||n?"true":undefined,inert:l||n?true:undefined,tabIndex:0},i("slot",null)),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!s||!this.mobileSheetNavOpen,"aria-hidden":s&&this.mobileSheetNavOpen?undefined:"true",inert:s&&this.mobileSheetNavOpen?undefined:true},i("slot",{name:"mobile-sheet-nav"})),i("div",{class:"shell-app__mobile-bar-nav",hidden:!s},i("slot",{name:"mobile-bar-nav"})))))}render(){const e=this.chromeLayerActive();const s=this.gradientLayerActive();const t=this.paperTextureLayerActive();const n=this.resolvedMode==="mobile";const l=n&&this.effectiveMobileDestination!=="area";const o=n&&(l||this.effectiveMobileSheetNavOpen);const h=!n&&this.toolsFullscreen;const r={"shell-app":true,"shell-app--chrome":e,"shell-app--gradient":s,"shell-app--paper-texture":t,[`shell-app--${this.navStyle}`]:true,[`shell-app--${this.resolvedMode}`]:true,"shell-app--tools-fullscreen":h,"shell-app--mobile-tool-active":l,"shell-app--mobile-sheet-nav-open":n&&this.effectiveMobileSheetNavOpen,"shell-app--managed":this.managed,"shell-app--slotted":!this.managed};if(!this.managed){return this.renderSlottedShell(r,n,l,o,h)}return i(a,{class:r,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"},this.renderPaperTexture()),i("div",{class:"shell-app__panel","aria-hidden":h?"true":undefined,inert:h?true:undefined},this.renderManagedPanelNav()),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":h?"true":undefined,inert:h?true:undefined},this.renderManagedTopBar()),i("div",{class:"shell-app__tools","data-ds-overlay-boundary":true,"aria-hidden":n&&(!l||this.effectiveMobileSheetNavOpen)?"true":undefined,inert:n&&(!l||this.effectiveMobileSheetNavOpen)?true:undefined,hidden:n&&!l},this.renderManagedTools()),i("div",{class:"shell-app__content","data-ds-overlay-boundary":true,"aria-hidden":h||o?"true":undefined,inert:h||o?true:undefined,tabIndex:0},this.renderManagedPage()),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!n||!this.effectiveMobileSheetNavOpen,"aria-hidden":n&&this.effectiveMobileSheetNavOpen?undefined:"true",inert:n&&this.effectiveMobileSheetNavOpen?undefined:true},this.renderManagedMobileSheetNav()),i("div",{class:"shell-app__mobile-bar-nav",hidden:!n},this.renderManagedMobileBarNav()))))}get el(){return this}static get watchers(){return{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],paperTexture:[{onShellPropsChange:0}],sectionNavigation:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],pageChrome:[{handlePageChromeChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}}static get style(){return Ce()}},[262,"ds-shell-app",{composition:[513],navigation:[16],sectionNavigation:[513,"section-navigation"],pageChrome:[16],tools:[16],navStyle:[513,"nav-style"],gradientPreset:[513,"gradient-preset"],paperTexture:[16],shortcutsEnabled:[4,"shortcuts-enabled"],mobileDestination:[1,"mobile-destination"],mobileSheetNavOpen:[4,"mobile-sheet-nav-open"],toolsFullscreen:[32],resolvedMode:[32],managedToolsOpen:[32],managedActiveTool:[32],managedToolPresentation:[32],managedMobileDestination:[32],managedMobilePrimaryDestination:[32],managedMobileSheetNavOpen:[32],managedInboxTool:[32],managedBrowseContext:[32],mobileActionMenuOpen:[32],mobileActionSurfaceOpen:[32],mobileActionMenuInitialFocusVisible:[32],activateTool:[64],closeGlobalSurface:[64],setToolPresentation:[64]},[[0,"dsPresentationChange","handleToolsPresentation"],[10,"keydown","handleWindowKeyDown"]],{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],paperTexture:[{onShellPropsChange:0}],sectionNavigation:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],pageChrome:[{handlePageChromeChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}]);De.FOREGROUND_REFRESH_MS=50;function Me(){if(typeof customElements==="undefined"){return}const e=["ds-shell-app","ds-badge","ds-bar-nav","ds-bar-title","ds-breadcrumb","ds-button-filled","ds-button-unfilled","ds-divider","ds-icon","ds-loader","ds-menu","ds-mobile-bar-nav","ds-mobile-header","ds-mobile-section-switcher","ds-mobile-sheet-nav","ds-panel-nav","ds-panel-tool-header","ds-panel-tools","ds-paper-texture","ds-shell-page","ds-shell-tools","ds-swatch-picker","ds-switch","ds-tab-group","ds-tag","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-shell-app":if(!customElements.get(n(e))){customElements.define(n(e),De)}break;case"ds-badge":if(!customElements.get(n(e))){D()}break;case"ds-bar-nav":if(!customElements.get(n(e))){v()}break;case"ds-bar-title":if(!customElements.get(n(e))){c()}break;case"ds-breadcrumb":if(!customElements.get(n(e))){M()}break;case"ds-button-filled":if(!customElements.get(n(e))){L()}break;case"ds-button-unfilled":if(!customElements.get(n(e))){P()}break;case"ds-divider":if(!customElements.get(n(e))){A()}break;case"ds-icon":if(!customElements.get(n(e))){B()}break;case"ds-loader":if(!customElements.get(n(e))){T()}break;case"ds-menu":if(!customElements.get(n(e))){E()}break;case"ds-mobile-bar-nav":if(!customElements.get(n(e))){N()}break;case"ds-mobile-header":if(!customElements.get(n(e))){j()}break;case"ds-mobile-section-switcher":if(!customElements.get(n(e))){z()}break;case"ds-mobile-sheet-nav":if(!customElements.get(n(e))){I()}break;case"ds-panel-nav":if(!customElements.get(n(e))){$()}break;case"ds-panel-tool-header":if(!customElements.get(n(e))){F()}break;case"ds-panel-tools":if(!customElements.get(n(e))){o()}break;case"ds-paper-texture":if(!customElements.get(n(e))){O()}break;case"ds-shell-page":if(!customElements.get(n(e))){R()}break;case"ds-shell-tools":if(!customElements.get(n(e))){G()}break;case"ds-swatch-picker":if(!customElements.get(n(e))){V()}break;case"ds-switch":if(!customElements.get(n(e))){H()}break;case"ds-tab-group":if(!customElements.get(n(e))){Z()}break;case"ds-tag":if(!customElements.get(n(e))){q()}break;case"ds-text":if(!customElements.get(n(e))){U()}break;case"ds-tooltip":if(!customElements.get(n(e))){W()}break}}))}Me();const Le=De;const Pe=Me;export{Le as DsShellApp,Pe as defineCustomElement};
2
2
  //# sourceMappingURL=ds-shell-app.js.map
@@ -1,2 +1,2 @@
1
- import{S as o,d as s}from"./p-Hzz2j1Je.js";const t=o;const p=s;export{t as DsShellPage,p as defineCustomElement};
1
+ import{S as o,d as s}from"./p-DZBB8BVn.js";const t=o;const n=s;export{t as DsShellPage,n as defineCustomElement};
2
2
  //# sourceMappingURL=ds-shell-page.js.map
@@ -0,0 +1,2 @@
1
+ import{p as e,H as s,h as t,a as i,t as a}from"./index.js";import{r as l}from"./p-CochmPyg.js";function h(e,s,t){if(e!=="auto")return e;if(s==="constrained")return"constrained";if(s==="compact"||!t)return"compact";return"expanded"}const n=()=>`.sc-ds-shell-page-h{--_shell-page-content-background:var(--color-background-primary);--_shell-page-header-background:var(--color-background-primary);--_shell-page-responsive-content-block-start-inset:var(--dimension-space-400);--_shell-page-content-block-start-inset:var( --ds-shell-page-content-block-start-inset, var(--_shell-page-responsive-content-block-start-inset) );--ds-shell-page-sticky-header-block-size:var(--dimension-size-600);--ds-shell-page-content-block-start-offset:calc( var(--ds-shell-page-sticky-header-block-size) + var(--_shell-page-content-block-start-inset) );display:block;position:relative;min-width:0;min-height:100%;box-sizing:border-box;background:var(--_shell-page-content-background)}.shell-page-host--surface-secondary.sc-ds-shell-page-h{--_shell-page-content-background:var(--color-background-secondary)}.shell-page-host--surface-secondary[responsive-mode='desktop'].sc-ds-shell-page-h,.shell-page-host--surface-secondary[responsive-mode='tablet'].sc-ds-shell-page-h{--_shell-page-header-background:var(--color-background-secondary)}[responsive-mode='tablet'].sc-ds-shell-page-h,[responsive-mode='mobile'].sc-ds-shell-page-h{--_shell-page-responsive-content-block-start-inset:var(--dimension-space-200)}[responsive-mode='mobile'].sc-ds-shell-page-h{--ds-shell-page-sticky-header-block-size:calc( var(--dimension-size-500) + var(--dimension-space-200) )}.shell-page-host--header-compact.sc-ds-shell-page-h,.shell-page-host--header-constrained.sc-ds-shell-page-h{--_shell-page-content-block-start-inset:var( --ds-shell-page-compact-content-block-start-inset, var(--_shell-page-responsive-content-block-start-inset) )}.shell-page-host--inset-none.sc-ds-shell-page-h,.shell-page-host--block-start-inset-none.sc-ds-shell-page-h{--_shell-page-content-block-start-inset:0px}.shell-page-host--desktop-header-shell-bar.sc-ds-shell-page-h{--ds-shell-page-sticky-header-block-size:0px}.shell-page-host--desktop-header-shell-bar.shell-page-host--inset-default.sc-ds-shell-page-h{--_shell-page-content-block-start-inset:var(--_shell-page-responsive-content-block-start-inset)}.shell-page__scroll-sentinel.sc-ds-shell-page{position:absolute;inset-block-start:var(--ds-shell-page-header-travel, 0);inset-inline-start:0;width:var(--dimension-stroke-width-012);height:var(--dimension-stroke-width-012);pointer-events:none}.shell-page__sticky-header.sc-ds-shell-page{position:sticky;inset-block-start:var(--ds-shell-page-sticky-offset, 0);z-index:var(--dimension-z-index-raised);min-width:0;background:var(--_shell-page-header-background);overflow:visible;overflow-anchor:none}.shell-page__desktop-header.sc-ds-shell-page-s>ds-bar-title,.shell-page__desktop-header .sc-ds-shell-page-s>ds-bar-title,.shell-page__desktop-header.sc-ds-shell-page-s>ds-bar-workflow,.shell-page__desktop-header .sc-ds-shell-page-s>ds-bar-workflow,.shell-page__mobile-header.sc-ds-shell-page-s>ds-mobile-header,.shell-page__mobile-header .sc-ds-shell-page-s>ds-mobile-header{display:block;min-width:0}.shell-page__desktop-header[hidden].sc-ds-shell-page,.shell-page__mobile-header[hidden].sc-ds-shell-page{display:none}.shell-page-host--mobile.sc-ds-shell-page-h .shell-page__scroll-sentinel.sc-ds-shell-page,.shell-page-host--mobile.sc-ds-shell-page-h .shell-page__flow-spacer.sc-ds-shell-page{display:none}.shell-page__flow-spacer.sc-ds-shell-page{height:var(--ds-shell-page-flow-spacer, 0);background:var(--_shell-page-content-background)}.shell-page__content.sc-ds-shell-page{min-width:0;box-sizing:border-box;background:var(--_shell-page-content-background);isolation:isolate}.shell-page-host--inset-default.sc-ds-shell-page-h .shell-page__content.sc-ds-shell-page{padding:var(--dimension-space-400);padding-block-start:var(--_shell-page-content-block-start-inset)}.shell-page-host--inset-default[responsive-mode='tablet'].sc-ds-shell-page-h .shell-page__content.sc-ds-shell-page,.shell-page-host--inset-default[responsive-mode='mobile'].sc-ds-shell-page-h .shell-page__content.sc-ds-shell-page{padding:var(--dimension-space-200);padding-block-start:var(--_shell-page-content-block-start-inset)}.shell-page-host--inset-none.sc-ds-shell-page-h .shell-page__content.sc-ds-shell-page{padding:0}`;const r=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.headerPresentation="auto";this.desktopHeaderPlacement="page";this.contentInset="default";this.contentInsetBlockStart="default";this.scrollCompaction=true;this.contentSurface="primary";this.responsiveMode="desktop";this.pageTopVisible=true;this.sentinelEl=null;this.spacerEl=null;this.stickyHeaderEl=null;this.headerEl=null;this.expandedHeaderHeight=0;this.headerTravel=0;this.expandedGeometryFrozen=false;this.pageHeaderResizeObserver=null;this.headerResizeObserver=null;this.headerMutationObserver=null;this.headerRevealFrame=null;this.headerGeometryFrame=null;this.reconnectFrame=null;this.scrollRoot=null;this.hasLoaded=false;this.handleScroll=()=>{if(!this.sentinelEl||!this.scrollRoot)return;const e=this.scrollRoot===window?0:this.scrollRoot.getBoundingClientRect().top;this.syncHeaderDividerInset(e);const s=this.sentinelEl.getBoundingClientRect().top>=e;if(this.effectiveScrollCompaction&&!s&&this.pageTopVisible&&this.headerEl?.classList.contains(this.variantClass("expanded"))){this.captureExpandedHeaderGeometry(this.headerEl);this.expandedGeometryFrozen=true}if(s&&this.expandedGeometryFrozen&&this.el.getBoundingClientRect().top>=e){this.expandedGeometryFrozen=false;if(this.headerEl?.classList.contains(this.variantClass("expanded"))){this.captureExpandedHeaderGeometry(this.headerEl)}}this.pageTopVisible=s};this.handleHeaderSlotChange=e=>{if(this.responsiveMode==="mobile")return;const s=e.target;const t=s.assignedElements().find((e=>e.tagName.toLowerCase()==="ds-bar-title"));this.observeHeader(t??null)}}handleHeaderContractChange(){this.syncHeaderVariant(true)}handleResponsiveModeChange(){this.el.style.removeProperty("--ds-shell-page-sticky-header-block-size");this.observeHeader(this.responsiveMode==="mobile"||this.desktopHeaderExternal?null:this.findHeader());this.syncPageHeaderBlockSize()}handleDesktopHeaderPlacementChange(){this.observeHeader(this.desktopHeaderExternal?null:this.findHeader());this.syncPageHeaderBlockSize()}componentDidLoad(){this.hasLoaded=true;this.connectRuntime()}componentDidRender(){this.syncHeaderVariant();this.syncPageHeaderBlockSize()}connectedCallback(){if(!this.hasLoaded)return;if(this.reconnectFrame!==null)cancelAnimationFrame(this.reconnectFrame);this.reconnectFrame=requestAnimationFrame((()=>{this.reconnectFrame=null;if(this.el.isConnected)this.connectRuntime()}))}disconnectedCallback(){if(this.reconnectFrame!==null)cancelAnimationFrame(this.reconnectFrame);this.reconnectFrame=null;this.headerResizeObserver?.disconnect();this.headerResizeObserver=null;this.pageHeaderResizeObserver?.disconnect();this.pageHeaderResizeObserver=null;this.headerMutationObserver?.disconnect();this.headerMutationObserver=null;this.cancelHeaderReveal();this.cancelHeaderGeometrySync();this.headerEl?.style.removeProperty("--ds-bar-title-divider-inset");this.scrollRoot?.removeEventListener("scroll",this.handleScroll);this.scrollRoot=null}connectRuntime(){this.observePageHeaderGeometry();this.observeHeader(this.responsiveMode==="mobile"?null:this.findHeader());this.connectScrollRoot()}get effectiveVariant(){if(this.desktopHeaderExternal)return"compact";return h(this.headerPresentation,this.headerCapacity??"roomy",this.effectiveScrollCompaction?this.pageTopVisible:true)}get desktopHeaderExternal(){return this.responsiveMode!=="mobile"&&this.desktopHeaderPlacement==="shell-bar"}get effectiveScrollCompaction(){return this.scrollCompaction&&!this.desktopHeaderExternal}get headerContractResolved(){return this.headerPresentation!=="auto"||this.headerCapacity!==undefined}get isScrollCompacted(){return this.effectiveScrollCompaction&&this.headerPresentation==="auto"&&this.headerCapacity==="roomy"&&!this.pageTopVisible}get contentInsetStyles(){const e={};const s=this.contentInsetBlockStartSize?.trim();const t=this.compactContentInsetBlockStartSize?.trim();if(s)e["--ds-shell-page-content-block-start-inset"]=s;if(t)e["--ds-shell-page-compact-content-block-start-inset"]=t;return e}composedParent(e){return e.assignedSlot?.parentElement??e.parentElement}findScrollRoot(){let e=this.composedParent(this.el);while(e&&e!==document.documentElement){const s=getComputedStyle(e).overflowY;if(s==="auto"||s==="scroll"||s==="overlay"){return e}e=this.composedParent(e)}return window}connectScrollRoot(){const e=this.findScrollRoot();if(e===this.scrollRoot)return;this.scrollRoot?.removeEventListener("scroll",this.handleScroll);this.scrollRoot=e;this.scrollRoot.addEventListener("scroll",this.handleScroll,{passive:true});this.handleScroll()}get scrollRootResolved(){const e=this.el.closest("ds-shell-app");if(!e)return true;const s=e.querySelector(".shell-app__content");return s!==null&&this.scrollRoot===s}findHeader(){return this.el.querySelector("ds-bar-title")}get compactHeaderHeight(){return l("--dimension-size-600",0)}syncHeaderDividerInset(e){const s=this.headerEl;if(!s)return;const t=this.effectiveScrollCompaction&&this.headerPresentation==="auto"&&this.headerCapacity==="roomy";const i=l("--dimension-space-400",0);if(!t||!this.sentinelEl||!this.scrollRoot||this.headerTravel<=0||i<=0){s.style.removeProperty("--ds-bar-title-divider-inset");return}const a=e??(this.scrollRoot===window?0:this.scrollRoot.getBoundingClientRect().top);const h=this.sentinelEl.getBoundingClientRect().top-a;const n=Math.min(1,Math.max(0,1-h/this.headerTravel));s.style.setProperty("--ds-bar-title-divider-inset",`${i*(1-n)}px`)}setHeaderTravel(e){const s=Math.max(0,e);if(Math.abs(s-this.headerTravel)<.5)return;this.headerTravel=s;this.el.style.setProperty("--ds-shell-page-header-travel",`${s}px`);this.handleScroll()}measureHeaderTravel(e){const s=e.querySelector("[data-shell-page-header-anchor]");const t=this.compactHeaderHeight;if(!s||t<=0)return;const i=e.getBoundingClientRect();const a=s.getBoundingClientRect();if(i.height<=0||a.height<=0)return;const l=a.top-i.top;const h=Math.max(0,(t-a.height)/2);this.setHeaderTravel(l-h)}captureExpandedHeaderGeometry(e){this.expandedHeaderHeight=Math.max(this.expandedHeaderHeight,e.getBoundingClientRect().height);this.measureHeaderTravel(e)}setSpacerHeight(e){if(!this.spacerEl)return;this.spacerEl.style.setProperty("--ds-shell-page-flow-spacer",`${Math.max(0,e)}px`)}variantClass(e){return`bar-title-host--${e}`}setStickyHeaderOffset(e){this.stickyHeaderEl?.style.setProperty("--ds-shell-page-sticky-offset",e==="expanded"&&this.effectiveScrollCompaction&&this.headerPresentation==="auto"&&this.headerCapacity==="roomy"?`${-this.headerTravel}px`:"0px")}syncPageHeaderBlockSize(){if(this.desktopHeaderExternal){this.el.style.setProperty("--ds-shell-page-sticky-header-block-size","0px");return}const e=this.stickyHeaderEl?.getBoundingClientRect().height??0;if(e>0){this.el.style.setProperty("--ds-shell-page-sticky-header-block-size",`${e}px`)}else{this.el.style.removeProperty("--ds-shell-page-sticky-header-block-size")}}observePageHeaderGeometry(){this.pageHeaderResizeObserver?.disconnect();this.pageHeaderResizeObserver=null;this.syncPageHeaderBlockSize();if(!this.stickyHeaderEl||typeof ResizeObserver==="undefined")return;this.pageHeaderResizeObserver=new ResizeObserver((()=>{this.syncPageHeaderBlockSize()}));this.pageHeaderResizeObserver.observe(this.stickyHeaderEl)}syncRenderedHeaderGeometry(e){const s=this.effectiveVariant;if(!e.classList.contains(this.variantClass(s)))return;this.syncPageHeaderBlockSize();this.setSpacerHeight(this.isScrollCompacted?this.expandedHeaderHeight-this.compactHeaderHeight:0);this.setStickyHeaderOffset(s);if(s==="expanded"&&!this.expandedGeometryFrozen){this.captureExpandedHeaderGeometry(e);this.setStickyHeaderOffset(s)}}cancelHeaderGeometrySync(){if(this.headerGeometryFrame!==null)cancelAnimationFrame(this.headerGeometryFrame);this.headerGeometryFrame=null}scheduleHeaderGeometrySync(s){this.cancelHeaderGeometrySync();let t=e.MAX_HEADER_GEOMETRY_FRAMES;let i=0;const a=()=>{if(this.headerEl!==s)return;t-=1;i+=1;this.connectScrollRoot();this.syncRenderedHeaderGeometry(s);const e=this.effectiveVariant!=="expanded"||this.expandedHeaderHeight>0&&this.headerTravel>0;if(e&&this.scrollRootResolved&&i>=2||t<=0){this.headerGeometryFrame=null;return}this.headerGeometryFrame=requestAnimationFrame(a)};this.headerGeometryFrame=requestAnimationFrame(a)}cancelHeaderReveal(){if(this.headerRevealFrame!==null)cancelAnimationFrame(this.headerRevealFrame);this.headerRevealFrame=null;this.headerEl?.removeAttribute("data-shell-page-syncing")}revealHeaderWhenSynced(s,t){let i=e.MAX_HEADER_REVEAL_FRAMES;const a=()=>{if(this.headerEl!==s){s.removeAttribute("data-shell-page-syncing");return}i-=1;if(s.classList.contains(this.variantClass(t))){s.removeAttribute("data-shell-page-syncing");this.headerRevealFrame=null;return}if(i<=0){this.headerRevealFrame=null;return}this.headerRevealFrame=requestAnimationFrame(a)};this.headerRevealFrame=requestAnimationFrame(a)}syncHeaderVariant(e=false){const s=this.headerEl;if(!s)return;this.syncHeaderDividerInset();if(!this.headerContractResolved){this.cancelHeaderReveal();s.setAttribute("data-shell-page-syncing","");return}const t=this.effectiveVariant;const i=!s.classList.contains(this.variantClass(t));if(!i)this.syncRenderedHeaderGeometry(s);if(i&&this.isScrollCompacted){this.setSpacerHeight(this.expandedHeaderHeight-this.compactHeaderHeight);this.setStickyHeaderOffset(t)}if(e){this.cancelHeaderReveal();s.setAttribute("data-shell-page-syncing","")}if(s.variant!==t){s.variant=t;this.scheduleHeaderGeometrySync(s)}if(e){this.revealHeaderWhenSynced(s,t)}}observeHeader(e){this.cancelHeaderReveal();this.cancelHeaderGeometrySync();this.headerResizeObserver?.disconnect();this.headerResizeObserver=null;this.headerMutationObserver?.disconnect();this.headerMutationObserver=null;this.headerEl?.style.removeProperty("--ds-bar-title-divider-inset");this.headerEl=e;this.expandedHeaderHeight=0;this.expandedGeometryFrozen=false;this.setHeaderTravel(0);this.setSpacerHeight(0);this.stickyHeaderEl?.style.setProperty("--ds-shell-page-sticky-offset","0px");if(!e)return;if(e.classList.contains(this.variantClass("expanded"))){this.captureExpandedHeaderGeometry(e)}if(typeof ResizeObserver!=="undefined"){this.headerResizeObserver=new ResizeObserver((()=>{this.syncRenderedHeaderGeometry(e)}));this.headerResizeObserver.observe(e)}if(typeof MutationObserver!=="undefined"){this.headerMutationObserver=new MutationObserver((()=>{this.syncRenderedHeaderGeometry(e)}));this.headerMutationObserver.observe(e,{attributes:true,attributeFilter:["class"],childList:true,subtree:true})}this.syncHeaderVariant(true);this.scheduleHeaderGeometrySync(e)}render(){const e=this.responsiveMode==="mobile";return t(i,{key:"7c13dabffbbb738499a9a3e372c9f4b6ff577711",role:"main",style:this.contentInsetStyles,class:{"shell-page-host--inset-default":this.contentInset==="default","shell-page-host--inset-none":this.contentInset==="none","shell-page-host--block-start-inset-none":this.contentInsetBlockStart==="none","shell-page-host--surface-primary":this.contentSurface==="primary","shell-page-host--surface-secondary":this.contentSurface==="secondary","shell-page-host--mobile":e,"shell-page-host--desktop-header-shell-bar":this.desktopHeaderExternal,[`shell-page-host--header-${this.effectiveVariant}`]:true}},t("div",{key:"20d0d95b72671a54a049554e12bdc50c9c6f86da",ref:e=>{this.sentinelEl=e??null},class:"shell-page__scroll-sentinel","aria-hidden":"true"}),t("div",{key:"fc7f145d9b239ae2969c1228bc3729ed0054b283",ref:e=>{this.stickyHeaderEl=e??null},class:"shell-page__sticky-header"},t("div",{key:"5194335b60a48e6278886768b830ab9bae5afa26",class:"shell-page__desktop-header",hidden:e,"aria-hidden":e?"true":undefined,inert:e?true:undefined},t("slot",{key:"ad11eb070bb24230a2cf0396f5252411c9a4ef03",name:"header",onSlotchange:this.handleHeaderSlotChange})),t("div",{key:"c017c662a11a63b96c7e72ed06d64cc436a4afce",class:"shell-page__mobile-header",hidden:!e,"aria-hidden":!e?"true":undefined,inert:!e?true:undefined},t("slot",{key:"2928bc4f2fae9cd118794839263bc67eb3139c74",name:"mobile-header"}))),t("div",{key:"6a70612a414eacf3983f3ce69628fa230d28b086",ref:e=>{this.spacerEl=e??null},class:"shell-page__flow-spacer","aria-hidden":"true"}),t("div",{key:"d62779daba97d4339a6971f014d282c52942e5af",class:"shell-page__content"},t("slot",{key:"526ab84d232001c3c4919d5fd26b4b2a4dda7daf"})))}get el(){return this}static get watchers(){return{headerCapacity:[{handleHeaderContractChange:0}],headerPresentation:[{handleHeaderContractChange:0}],scrollCompaction:[{handleHeaderContractChange:0}],responsiveMode:[{handleResponsiveModeChange:0}],desktopHeaderPlacement:[{handleDesktopHeaderPlacementChange:0}]}}static get style(){return n()}},[262,"ds-shell-page",{headerPresentation:[1,"header-presentation"],headerCapacity:[1,"header-capacity"],desktopHeaderPlacement:[513,"desktop-header-placement"],contentInset:[1,"content-inset"],contentInsetBlockStart:[1,"content-inset-block-start"],contentInsetBlockStartSize:[1,"content-inset-block-start-size"],compactContentInsetBlockStartSize:[1,"compact-content-inset-block-start-size"],scrollCompaction:[4,"scroll-compaction"],contentSurface:[1,"content-surface"],responsiveMode:[513,"responsive-mode"],pageTopVisible:[32]},undefined,{headerCapacity:[{handleHeaderContractChange:0}],headerPresentation:[{handleHeaderContractChange:0}],scrollCompaction:[{handleHeaderContractChange:0}],responsiveMode:[{handleResponsiveModeChange:0}],desktopHeaderPlacement:[{handleDesktopHeaderPlacementChange:0}]}]);r.MAX_HEADER_REVEAL_FRAMES=12;r.MAX_HEADER_GEOMETRY_FRAMES=12;function o(){if(typeof customElements==="undefined"){return}const e=["ds-shell-page"];e.forEach((e=>{switch(e){case"ds-shell-page":if(!customElements.get(a(e))){customElements.define(a(e),r)}break}}))}o();export{r as S,o as d};
2
+ //# sourceMappingURL=p-DZBB8BVn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["resolveShellPageHeaderVariant","presentation","capacity","pageTopVisible","shellPageCss","ShellPage","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","headerPresentation","desktopHeaderPlacement","contentInset","contentInsetBlockStart","scrollCompaction","contentSurface","responsiveMode","sentinelEl","spacerEl","stickyHeaderEl","headerEl","expandedHeaderHeight","headerTravel","expandedGeometryFrozen","pageHeaderResizeObserver","headerResizeObserver","headerMutationObserver","headerRevealFrame","headerGeometryFrame","reconnectFrame","scrollRoot","hasLoaded","handleScroll","rootTop","window","getBoundingClientRect","top","syncHeaderDividerInset","nextPageTopVisible","effectiveScrollCompaction","classList","contains","variantClass","captureExpandedHeaderGeometry","el","handleHeaderSlotChange","event","slot","target","header","assignedElements","find","element","tagName","toLowerCase","observeHeader","handleHeaderContractChange","syncHeaderVariant","handleResponsiveModeChange","style","removeProperty","desktopHeaderExternal","findHeader","syncPageHeaderBlockSize","handleDesktopHeaderPlacementChange","componentDidLoad","connectRuntime","componentDidRender","connectedCallback","cancelAnimationFrame","requestAnimationFrame","isConnected","disconnectedCallback","disconnect","cancelHeaderReveal","cancelHeaderGeometrySync","removeEventListener","observePageHeaderGeometry","connectScrollRoot","effectiveVariant","headerCapacity","headerContractResolved","undefined","isScrollCompacted","contentInsetStyles","styles","expanded","contentInsetBlockStartSize","trim","compact","compactContentInsetBlockStartSize","composedParent","assignedSlot","parentElement","findScrollRoot","ancestor","document","documentElement","overflow","getComputedStyle","overflowY","next","addEventListener","passive","scrollRootResolved","shell","closest","expected","querySelector","compactHeaderHeight","resolveCssLengthPx","ownsScrollTransition","expandedInset","scrollRootTop","remainingTravel","progress","Math","min","max","setProperty","setHeaderTravel","distance","abs","measureHeaderTravel","anchor","compactHeight","headerRect","anchorRect","height","expandedAnchorTop","compactAnchorTop","setSpacerHeight","variant","setStickyHeaderOffset","renderedVariant","renderedHeight","ResizeObserver","observe","syncRenderedHeaderGeometry","scheduleHeaderGeometrySync","framesRemaining","MAX_HEADER_GEOMETRY_FRAMES","framesElapsed","sync","geometryReady","removeAttribute","revealHeaderWhenSynced","MAX_HEADER_REVEAL_FRAMES","reveal","concealUntilSynced","setAttribute","renderedVariantIsStale","MutationObserver","attributes","attributeFilter","childList","subtree","render","mobile","h","Host","key","role","class","ref","hidden","inert","name","onSlotchange"],"sources":["src/wc/components/ShellPage/shell-page-responsive.ts","src/wc/components/ShellPage/ShellPage.css?tag=ds-shell-page&encapsulation=scoped","src/wc/components/ShellPage/ShellPage.tsx"],"sourcesContent":["import type { ShellPageCapacity, ShellPageHeaderPresentation } from './shell-page-types';\nimport type { BarTitleVariant } from '../BarTitle/bar-title-types';\n\nexport function resolveShellPageHeaderVariant(\n presentation: ShellPageHeaderPresentation,\n capacity: ShellPageCapacity,\n pageTopVisible: boolean\n): BarTitleVariant {\n if (presentation !== 'auto') return presentation;\n if (capacity === 'constrained') return 'constrained';\n if (capacity === 'compact' || !pageTopVisible) return 'compact';\n return 'expanded';\n}\n",":host {\n --_shell-page-content-background: var(--color-background-primary);\n --_shell-page-header-background: var(--color-background-primary);\n --_shell-page-responsive-content-block-start-inset: var(--dimension-space-400);\n --_shell-page-content-block-start-inset: var(\n --ds-shell-page-content-block-start-inset,\n var(--_shell-page-responsive-content-block-start-inset)\n );\n --ds-shell-page-sticky-header-block-size: var(--dimension-size-600);\n --ds-shell-page-content-block-start-offset: calc(\n var(--ds-shell-page-sticky-header-block-size) + var(--_shell-page-content-block-start-inset)\n );\n display: block;\n position: relative;\n min-width: 0;\n min-height: 100%;\n box-sizing: border-box;\n background: var(--_shell-page-content-background);\n}\n\n:host(.shell-page-host--surface-secondary) {\n --_shell-page-content-background: var(--color-background-secondary);\n}\n\n:host(.shell-page-host--surface-secondary[responsive-mode='desktop']),\n:host(.shell-page-host--surface-secondary[responsive-mode='tablet']) {\n --_shell-page-header-background: var(--color-background-secondary);\n}\n\n:host([responsive-mode='tablet']),\n:host([responsive-mode='mobile']) {\n --_shell-page-responsive-content-block-start-inset: var(--dimension-space-200);\n}\n\n:host([responsive-mode='mobile']) {\n --ds-shell-page-sticky-header-block-size: calc(\n var(--dimension-size-500) + var(--dimension-space-200)\n );\n}\n\n:host(.shell-page-host--header-compact),\n:host(.shell-page-host--header-constrained) {\n --_shell-page-content-block-start-inset: var(\n --ds-shell-page-compact-content-block-start-inset,\n var(--_shell-page-responsive-content-block-start-inset)\n );\n}\n\n:host(.shell-page-host--inset-none),\n:host(.shell-page-host--block-start-inset-none) {\n --_shell-page-content-block-start-inset: 0px;\n}\n\n:host(.shell-page-host--desktop-header-shell-bar) {\n --ds-shell-page-sticky-header-block-size: 0px;\n}\n\n:host(.shell-page-host--desktop-header-shell-bar.shell-page-host--inset-default) {\n --_shell-page-content-block-start-inset: var(--_shell-page-responsive-content-block-start-inset);\n}\n\n.shell-page__scroll-sentinel {\n position: absolute;\n inset-block-start: var(--ds-shell-page-header-travel, 0);\n inset-inline-start: 0;\n width: var(--dimension-stroke-width-012);\n height: var(--dimension-stroke-width-012);\n pointer-events: none;\n}\n\n.shell-page__sticky-header {\n position: sticky;\n inset-block-start: var(--ds-shell-page-sticky-offset, 0);\n z-index: var(--dimension-z-index-raised);\n min-width: 0;\n background: var(--_shell-page-header-background);\n overflow: visible;\n overflow-anchor: none;\n}\n\n.shell-page__desktop-header ::slotted(ds-bar-title),\n.shell-page__desktop-header ::slotted(ds-bar-workflow),\n.shell-page__mobile-header ::slotted(ds-mobile-header) {\n display: block;\n min-width: 0;\n}\n\n.shell-page__desktop-header[hidden],\n.shell-page__mobile-header[hidden] {\n display: none;\n}\n\n:host(.shell-page-host--mobile) .shell-page__scroll-sentinel,\n:host(.shell-page-host--mobile) .shell-page__flow-spacer {\n display: none;\n}\n\n.shell-page__flow-spacer {\n height: var(--ds-shell-page-flow-spacer, 0);\n background: var(--_shell-page-content-background);\n}\n\n.shell-page__content {\n min-width: 0;\n box-sizing: border-box;\n background: var(--_shell-page-content-background);\n isolation: isolate;\n}\n\n:host(.shell-page-host--inset-default) .shell-page__content {\n padding: var(--dimension-space-400);\n padding-block-start: var(--_shell-page-content-block-start-inset);\n}\n\n:host(.shell-page-host--inset-default[responsive-mode='tablet']) .shell-page__content,\n:host(.shell-page-host--inset-default[responsive-mode='mobile']) .shell-page__content {\n padding: var(--dimension-space-200);\n padding-block-start: var(--_shell-page-content-block-start-inset);\n}\n\n:host(.shell-page-host--inset-none) .shell-page__content {\n padding: 0;\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport type { ShellResponsiveMode } from '../../shell/shell-responsive';\nimport { resolveCssLengthPx } from '../../utils/resolve-css-length-px';\nimport type { BarTitleVariant } from '../BarTitle/bar-title-types';\nimport { resolveShellPageHeaderVariant } from './shell-page-responsive';\nimport type {\n ShellPageCapacity,\n ShellPageContentInset,\n ShellPageContentSurface,\n ShellPageDesktopHeaderPlacement,\n ShellPageHeaderPresentation,\n} from './shell-page-types';\n\ntype BarTitleElement = HTMLElement & { variant: BarTitleVariant };\n\n@Component({\n tag: 'ds-shell-page',\n styleUrl: 'ShellPage.css',\n scoped: true,\n})\nexport class ShellPage {\n private static readonly MAX_HEADER_REVEAL_FRAMES = 12;\n private static readonly MAX_HEADER_GEOMETRY_FRAMES = 12;\n\n @Element() el!: HTMLElement;\n\n /** Automatic capacity/scroll behavior, or an explicit header variant override. */\n @Prop() headerPresentation: ShellPageHeaderPresentation = 'auto';\n\n /** Available page-header capacity supplied by the owning application shell. */\n @Prop() headerCapacity?: ShellPageCapacity;\n\n /** Desktop title chrome is rendered in this page or externally in the shell bar. */\n @Prop({ attribute: 'desktop-header-placement', reflect: true })\n desktopHeaderPlacement: ShellPageDesktopHeaderPlacement = 'page';\n\n /** Standard page gutters, or no inset for full-bleed page content. */\n @Prop() contentInset: ShellPageContentInset = 'default';\n\n /** Preserve the responsive side/end gutters while allowing content to meet the header. */\n @Prop() contentInsetBlockStart: ShellPageContentInset = 'default';\n\n /** Exact block-start content inset, overriding the responsive default when provided. */\n @Prop() contentInsetBlockStartSize?: string;\n\n /** Exact block-start content inset while the header is compact or constrained. */\n @Prop() compactContentInsetBlockStartSize?: string;\n\n /** Allow roomy automatic headers to compact as the page scrolls. */\n @Prop() scrollCompaction: boolean = true;\n\n /** Canvas surface painted around and beneath routed page content. */\n @Prop() contentSurface: ShellPageContentSurface = 'primary';\n\n /** Explicit shell breakpoint presentation. Mobile uses the dedicated mobile-header slot. */\n @Prop({ attribute: 'responsive-mode', reflect: true })\n responsiveMode: ShellResponsiveMode = 'desktop';\n\n @State() private pageTopVisible = true;\n\n private sentinelEl: HTMLElement | null = null;\n private spacerEl: HTMLElement | null = null;\n private stickyHeaderEl: HTMLElement | null = null;\n private headerEl: BarTitleElement | null = null;\n private expandedHeaderHeight = 0;\n private headerTravel = 0;\n private expandedGeometryFrozen = false;\n private pageHeaderResizeObserver: ResizeObserver | null = null;\n private headerResizeObserver: ResizeObserver | null = null;\n private headerMutationObserver: MutationObserver | null = null;\n private headerRevealFrame: number | null = null;\n private headerGeometryFrame: number | null = null;\n private reconnectFrame: number | null = null;\n private scrollRoot: HTMLElement | Window | null = null;\n private hasLoaded = false;\n\n @Watch('headerCapacity')\n @Watch('headerPresentation')\n @Watch('scrollCompaction')\n handleHeaderContractChange() {\n this.syncHeaderVariant(true);\n }\n\n @Watch('responsiveMode')\n handleResponsiveModeChange() {\n this.el.style.removeProperty('--ds-shell-page-sticky-header-block-size');\n this.observeHeader(\n this.responsiveMode === 'mobile' || this.desktopHeaderExternal ? null : this.findHeader()\n );\n this.syncPageHeaderBlockSize();\n }\n\n @Watch('desktopHeaderPlacement')\n handleDesktopHeaderPlacementChange() {\n this.observeHeader(this.desktopHeaderExternal ? null : this.findHeader());\n this.syncPageHeaderBlockSize();\n }\n\n componentDidLoad() {\n this.hasLoaded = true;\n this.connectRuntime();\n }\n\n componentDidRender() {\n this.syncHeaderVariant();\n this.syncPageHeaderBlockSize();\n }\n\n connectedCallback() {\n if (!this.hasLoaded) return;\n if (this.reconnectFrame !== null) cancelAnimationFrame(this.reconnectFrame);\n this.reconnectFrame = requestAnimationFrame(() => {\n this.reconnectFrame = null;\n if (this.el.isConnected) this.connectRuntime();\n });\n }\n\n disconnectedCallback() {\n if (this.reconnectFrame !== null) cancelAnimationFrame(this.reconnectFrame);\n this.reconnectFrame = null;\n this.headerResizeObserver?.disconnect();\n this.headerResizeObserver = null;\n this.pageHeaderResizeObserver?.disconnect();\n this.pageHeaderResizeObserver = null;\n this.headerMutationObserver?.disconnect();\n this.headerMutationObserver = null;\n this.cancelHeaderReveal();\n this.cancelHeaderGeometrySync();\n this.headerEl?.style.removeProperty('--ds-bar-title-divider-inset');\n this.scrollRoot?.removeEventListener('scroll', this.handleScroll);\n this.scrollRoot = null;\n }\n\n private connectRuntime() {\n this.observePageHeaderGeometry();\n this.observeHeader(this.responsiveMode === 'mobile' ? null : this.findHeader());\n this.connectScrollRoot();\n }\n\n private get effectiveVariant(): BarTitleVariant {\n if (this.desktopHeaderExternal) return 'compact';\n return resolveShellPageHeaderVariant(\n this.headerPresentation,\n this.headerCapacity ?? 'roomy',\n this.effectiveScrollCompaction ? this.pageTopVisible : true\n );\n }\n\n private get desktopHeaderExternal(): boolean {\n return this.responsiveMode !== 'mobile' && this.desktopHeaderPlacement === 'shell-bar';\n }\n\n private get effectiveScrollCompaction(): boolean {\n return this.scrollCompaction && !this.desktopHeaderExternal;\n }\n\n private get headerContractResolved(): boolean {\n return this.headerPresentation !== 'auto' || this.headerCapacity !== undefined;\n }\n\n private get isScrollCompacted(): boolean {\n return (\n this.effectiveScrollCompaction &&\n this.headerPresentation === 'auto' &&\n this.headerCapacity === 'roomy' &&\n !this.pageTopVisible\n );\n }\n\n private get contentInsetStyles(): { [name: string]: string } {\n const styles: { [name: string]: string } = {};\n const expanded = this.contentInsetBlockStartSize?.trim();\n const compact = this.compactContentInsetBlockStartSize?.trim();\n if (expanded) styles['--ds-shell-page-content-block-start-inset'] = expanded;\n if (compact) styles['--ds-shell-page-compact-content-block-start-inset'] = compact;\n return styles;\n }\n\n private composedParent(element: Element): Element | null {\n return (element as HTMLElement).assignedSlot?.parentElement ?? element.parentElement;\n }\n\n private findScrollRoot(): HTMLElement | Window {\n let ancestor = this.composedParent(this.el);\n while (ancestor && ancestor !== document.documentElement) {\n const overflow = getComputedStyle(ancestor).overflowY;\n if (overflow === 'auto' || overflow === 'scroll' || overflow === 'overlay') {\n return ancestor as HTMLElement;\n }\n ancestor = this.composedParent(ancestor);\n }\n return window;\n }\n\n private connectScrollRoot() {\n const next = this.findScrollRoot();\n if (next === this.scrollRoot) return;\n this.scrollRoot?.removeEventListener('scroll', this.handleScroll);\n this.scrollRoot = next;\n this.scrollRoot.addEventListener('scroll', this.handleScroll, { passive: true });\n this.handleScroll();\n }\n\n private get scrollRootResolved(): boolean {\n const shell = this.el.closest('ds-shell-app');\n if (!shell) return true;\n const expected = shell.querySelector<HTMLElement>('.shell-app__content');\n return expected !== null && this.scrollRoot === expected;\n }\n\n private handleScroll = () => {\n if (!this.sentinelEl || !this.scrollRoot) return;\n const rootTop =\n this.scrollRoot === window ? 0 : (this.scrollRoot as HTMLElement).getBoundingClientRect().top;\n this.syncHeaderDividerInset(rootTop);\n const nextPageTopVisible = this.sentinelEl.getBoundingClientRect().top >= rootTop;\n if (\n this.effectiveScrollCompaction &&\n !nextPageTopVisible &&\n this.pageTopVisible &&\n this.headerEl?.classList.contains(this.variantClass('expanded'))\n ) {\n this.captureExpandedHeaderGeometry(this.headerEl);\n this.expandedGeometryFrozen = true;\n }\n if (\n nextPageTopVisible &&\n this.expandedGeometryFrozen &&\n this.el.getBoundingClientRect().top >= rootTop\n ) {\n this.expandedGeometryFrozen = false;\n if (this.headerEl?.classList.contains(this.variantClass('expanded'))) {\n this.captureExpandedHeaderGeometry(this.headerEl);\n }\n }\n this.pageTopVisible = nextPageTopVisible;\n };\n\n private findHeader(): BarTitleElement | null {\n return this.el.querySelector<BarTitleElement>('ds-bar-title');\n }\n\n private get compactHeaderHeight(): number {\n return resolveCssLengthPx('--dimension-size-600', 0);\n }\n\n private syncHeaderDividerInset(rootTop?: number) {\n const header = this.headerEl;\n if (!header) return;\n\n const ownsScrollTransition =\n this.effectiveScrollCompaction &&\n this.headerPresentation === 'auto' &&\n this.headerCapacity === 'roomy';\n const expandedInset = resolveCssLengthPx('--dimension-space-400', 0);\n if (\n !ownsScrollTransition ||\n !this.sentinelEl ||\n !this.scrollRoot ||\n this.headerTravel <= 0 ||\n expandedInset <= 0\n ) {\n header.style.removeProperty('--ds-bar-title-divider-inset');\n return;\n }\n\n const scrollRootTop =\n rootTop ??\n (this.scrollRoot === window\n ? 0\n : (this.scrollRoot as HTMLElement).getBoundingClientRect().top);\n const remainingTravel = this.sentinelEl.getBoundingClientRect().top - scrollRootTop;\n const progress = Math.min(1, Math.max(0, 1 - remainingTravel / this.headerTravel));\n header.style.setProperty('--ds-bar-title-divider-inset', `${expandedInset * (1 - progress)}px`);\n }\n\n private setHeaderTravel(distance: number) {\n const next = Math.max(0, distance);\n if (Math.abs(next - this.headerTravel) < 0.5) return;\n this.headerTravel = next;\n this.el.style.setProperty('--ds-shell-page-header-travel', `${next}px`);\n this.handleScroll();\n }\n\n private measureHeaderTravel(header: BarTitleElement) {\n const anchor = header.querySelector<HTMLElement>('[data-shell-page-header-anchor]');\n const compactHeight = this.compactHeaderHeight;\n if (!anchor || compactHeight <= 0) return;\n\n const headerRect = header.getBoundingClientRect();\n const anchorRect = anchor.getBoundingClientRect();\n if (headerRect.height <= 0 || anchorRect.height <= 0) return;\n\n const expandedAnchorTop = anchorRect.top - headerRect.top;\n const compactAnchorTop = Math.max(0, (compactHeight - anchorRect.height) / 2);\n this.setHeaderTravel(expandedAnchorTop - compactAnchorTop);\n }\n\n private captureExpandedHeaderGeometry(header: BarTitleElement) {\n // Keep the largest observed expanded geometry for this header instance.\n // During a variant handoff Chromium can briefly report the compact box\n // before the child host class mutation is delivered; that transient must\n // not erase the flow reservation captured at the roomy page top.\n this.expandedHeaderHeight = Math.max(\n this.expandedHeaderHeight,\n header.getBoundingClientRect().height\n );\n this.measureHeaderTravel(header);\n }\n\n private setSpacerHeight(height: number) {\n if (!this.spacerEl) return;\n this.spacerEl.style.setProperty('--ds-shell-page-flow-spacer', `${Math.max(0, height)}px`);\n }\n\n private variantClass(variant: BarTitleVariant): string {\n return `bar-title-host--${variant}`;\n }\n\n private setStickyHeaderOffset(renderedVariant: BarTitleVariant) {\n this.stickyHeaderEl?.style.setProperty(\n '--ds-shell-page-sticky-offset',\n renderedVariant === 'expanded' &&\n this.effectiveScrollCompaction &&\n this.headerPresentation === 'auto' &&\n this.headerCapacity === 'roomy'\n ? `${-this.headerTravel}px`\n : '0px'\n );\n }\n\n private syncPageHeaderBlockSize() {\n if (this.desktopHeaderExternal) {\n this.el.style.setProperty('--ds-shell-page-sticky-header-block-size', '0px');\n return;\n }\n const renderedHeight = this.stickyHeaderEl?.getBoundingClientRect().height ?? 0;\n if (renderedHeight > 0) {\n this.el.style.setProperty('--ds-shell-page-sticky-header-block-size', `${renderedHeight}px`);\n } else {\n this.el.style.removeProperty('--ds-shell-page-sticky-header-block-size');\n }\n }\n\n private observePageHeaderGeometry() {\n this.pageHeaderResizeObserver?.disconnect();\n this.pageHeaderResizeObserver = null;\n this.syncPageHeaderBlockSize();\n\n if (!this.stickyHeaderEl || typeof ResizeObserver === 'undefined') return;\n this.pageHeaderResizeObserver = new ResizeObserver(() => {\n this.syncPageHeaderBlockSize();\n });\n this.pageHeaderResizeObserver.observe(this.stickyHeaderEl);\n }\n\n private syncRenderedHeaderGeometry(header: BarTitleElement) {\n const renderedVariant = this.effectiveVariant;\n if (!header.classList.contains(this.variantClass(renderedVariant))) return;\n\n this.syncPageHeaderBlockSize();\n\n // Update both flow-preservation pieces before reading layout. Otherwise a\n // reverse compact → expanded render can briefly contain the tall header and\n // the compact spacer together, giving browser scroll anchoring a transient\n // height change to compensate.\n this.setSpacerHeight(\n this.isScrollCompacted ? this.expandedHeaderHeight - this.compactHeaderHeight : 0\n );\n this.setStickyHeaderOffset(renderedVariant);\n\n if (renderedVariant === 'expanded' && !this.expandedGeometryFrozen) {\n this.captureExpandedHeaderGeometry(header);\n this.setStickyHeaderOffset(renderedVariant);\n }\n }\n\n private cancelHeaderGeometrySync() {\n if (this.headerGeometryFrame !== null) cancelAnimationFrame(this.headerGeometryFrame);\n this.headerGeometryFrame = null;\n }\n\n private scheduleHeaderGeometrySync(header: BarTitleElement) {\n this.cancelHeaderGeometrySync();\n let framesRemaining = ShellPage.MAX_HEADER_GEOMETRY_FRAMES;\n let framesElapsed = 0;\n const sync = () => {\n if (this.headerEl !== header) return;\n framesRemaining -= 1;\n framesElapsed += 1;\n // In WebKit a child's componentDidLoad can precede its assignment into\n // the parent's rendered slot. Revalidate after ShellApp has had a frame\n // to expose the actual content scroller.\n this.connectScrollRoot();\n this.syncRenderedHeaderGeometry(header);\n const geometryReady =\n this.effectiveVariant !== 'expanded' ||\n (this.expandedHeaderHeight > 0 && this.headerTravel > 0);\n if (\n (geometryReady && this.scrollRootResolved && framesElapsed >= 2) ||\n framesRemaining <= 0\n ) {\n this.headerGeometryFrame = null;\n return;\n }\n this.headerGeometryFrame = requestAnimationFrame(sync);\n };\n this.headerGeometryFrame = requestAnimationFrame(sync);\n }\n\n private cancelHeaderReveal() {\n if (this.headerRevealFrame !== null) cancelAnimationFrame(this.headerRevealFrame);\n this.headerRevealFrame = null;\n this.headerEl?.removeAttribute('data-shell-page-syncing');\n }\n\n private revealHeaderWhenSynced(header: BarTitleElement, variant: BarTitleVariant) {\n // Stencil normally re-renders within a frame or two of a prop change. Stop\n // polling at the cap, but fail closed: a stale variant must never paint.\n let framesRemaining = ShellPage.MAX_HEADER_REVEAL_FRAMES;\n const reveal = () => {\n if (this.headerEl !== header) {\n header.removeAttribute('data-shell-page-syncing');\n return;\n }\n framesRemaining -= 1;\n if (header.classList.contains(this.variantClass(variant))) {\n header.removeAttribute('data-shell-page-syncing');\n this.headerRevealFrame = null;\n return;\n }\n if (framesRemaining <= 0) {\n this.headerRevealFrame = null;\n return;\n }\n this.headerRevealFrame = requestAnimationFrame(reveal);\n };\n this.headerRevealFrame = requestAnimationFrame(reveal);\n }\n\n private syncHeaderVariant(concealUntilSynced = false) {\n const header = this.headerEl;\n if (!header) return;\n\n this.syncHeaderDividerInset();\n if (!this.headerContractResolved) {\n this.cancelHeaderReveal();\n header.setAttribute('data-shell-page-syncing', '');\n return;\n }\n\n const next = this.effectiveVariant;\n const renderedVariantIsStale = !header.classList.contains(this.variantClass(next));\n if (!renderedVariantIsStale) this.syncRenderedHeaderGeometry(header);\n if (renderedVariantIsStale && this.isScrollCompacted) {\n // Preserve the expanded flow before asking BarTitle to become compact.\n // This prevents the sentinel from moving back into view during the\n // parent/child render handoff and keeps the variant transition stable.\n this.setSpacerHeight(this.expandedHeaderHeight - this.compactHeaderHeight);\n this.setStickyHeaderOffset(next);\n }\n if (concealUntilSynced) {\n this.cancelHeaderReveal();\n header.setAttribute('data-shell-page-syncing', '');\n }\n if (header.variant !== next) {\n header.variant = next;\n // The child update and its MutationObserver callback can land in\n // different phases across engines. Poll the rendered class as the\n // authoritative handoff before committing sticky/spacer geometry.\n this.scheduleHeaderGeometrySync(header);\n }\n if (concealUntilSynced) {\n this.revealHeaderWhenSynced(header, next);\n }\n }\n\n private observeHeader(header: BarTitleElement | null) {\n this.cancelHeaderReveal();\n this.cancelHeaderGeometrySync();\n this.headerResizeObserver?.disconnect();\n this.headerResizeObserver = null;\n this.headerMutationObserver?.disconnect();\n this.headerMutationObserver = null;\n this.headerEl?.style.removeProperty('--ds-bar-title-divider-inset');\n this.headerEl = header;\n this.expandedHeaderHeight = 0;\n this.expandedGeometryFrozen = false;\n this.setHeaderTravel(0);\n this.setSpacerHeight(0);\n this.stickyHeaderEl?.style.setProperty('--ds-shell-page-sticky-offset', '0px');\n\n if (!header) return;\n if (header.classList.contains(this.variantClass('expanded'))) {\n this.captureExpandedHeaderGeometry(header);\n }\n if (typeof ResizeObserver !== 'undefined') {\n this.headerResizeObserver = new ResizeObserver(() => {\n this.syncRenderedHeaderGeometry(header);\n });\n this.headerResizeObserver.observe(header);\n }\n if (typeof MutationObserver !== 'undefined') {\n this.headerMutationObserver = new MutationObserver(() => {\n this.syncRenderedHeaderGeometry(header);\n });\n this.headerMutationObserver.observe(header, {\n attributes: true,\n attributeFilter: ['class'],\n childList: true,\n subtree: true,\n });\n }\n this.syncHeaderVariant(true);\n this.scheduleHeaderGeometrySync(header);\n }\n\n private handleHeaderSlotChange = (event: Event) => {\n if (this.responsiveMode === 'mobile') return;\n const slot = event.target as HTMLSlotElement;\n const header = slot\n .assignedElements()\n .find(element => element.tagName.toLowerCase() === 'ds-bar-title');\n this.observeHeader((header as BarTitleElement | undefined) ?? null);\n };\n\n render() {\n const mobile = this.responsiveMode === 'mobile';\n return (\n <Host\n role=\"main\"\n style={this.contentInsetStyles}\n class={{\n 'shell-page-host--inset-default': this.contentInset === 'default',\n 'shell-page-host--inset-none': this.contentInset === 'none',\n 'shell-page-host--block-start-inset-none': this.contentInsetBlockStart === 'none',\n 'shell-page-host--surface-primary': this.contentSurface === 'primary',\n 'shell-page-host--surface-secondary': this.contentSurface === 'secondary',\n 'shell-page-host--mobile': mobile,\n 'shell-page-host--desktop-header-shell-bar': this.desktopHeaderExternal,\n [`shell-page-host--header-${this.effectiveVariant}`]: true,\n }}\n >\n <div\n ref={el => {\n this.sentinelEl = el ?? null;\n }}\n class=\"shell-page__scroll-sentinel\"\n aria-hidden=\"true\"\n />\n <div\n ref={el => {\n this.stickyHeaderEl = el ?? null;\n }}\n class=\"shell-page__sticky-header\"\n >\n <div\n class=\"shell-page__desktop-header\"\n hidden={mobile}\n aria-hidden={mobile ? 'true' : undefined}\n inert={mobile ? true : undefined}\n >\n <slot name=\"header\" onSlotchange={this.handleHeaderSlotChange} />\n </div>\n <div\n class=\"shell-page__mobile-header\"\n hidden={!mobile}\n aria-hidden={!mobile ? 'true' : undefined}\n inert={!mobile ? true : undefined}\n >\n <slot name=\"mobile-header\" />\n </div>\n </div>\n <div\n ref={el => {\n this.spacerEl = el ?? null;\n }}\n class=\"shell-page__flow-spacer\"\n aria-hidden=\"true\"\n />\n <div class=\"shell-page__content\">\n <slot />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8BAA+BH,KAAKG,eAAiB,OACrD,0CAA2CH,KAAKI,yBAA2B,OAC3E,mCAAoCJ,KAAKM,iBAAmB,UAC5D,qCAAsCN,KAAKM,iBAAmB,YAC9D,0BAA2B+I,EAC3B,4CAA6CrJ,KAAKoD,sBAClD,CAAC,2BAA2BpD,KAAKsE,oBAAqB,OAGxDgF,EAAA,OAAAE,IAAA,2CACEG,IAAKxH,IACHnC,KAAKQ,WAAa2B,GAAM,IAAI,EAE9BuH,MAAM,8BAA6B,cACvB,SAEdJ,EAAA,OAAAE,IAAA,2CACEG,IAAKxH,IACHnC,KAAKU,eAAiByB,GAAM,IAAI,EAElCuH,MAAM,6BAENJ,EAAA,OAAAE,IAAA,2CACEE,MAAM,6BACNE,OAAQP,EAAM,cACDA,EAAS,OAAS5E,UAC/BoF,MAAOR,EAAS,KAAO5E,WAEvB6E,EAAA,QAAAE,IAAA,2CAAMM,KAAK,SAASC,aAAc/J,KAAKoC,0BAEzCkH,EAAA,OAAAE,IAAA,2CACEE,MAAM,4BACNE,QAASP,EAAM,eACDA,EAAS,OAAS5E,UAChCoF,OAAQR,EAAS,KAAO5E,WAExB6E,EAAA,QAAAE,IAAA,2CAAMM,KAAK,oBAGfR,EAAA,OAAAE,IAAA,2CACEG,IAAKxH,IACHnC,KAAKS,SAAW0B,GAAM,IAAI,EAE5BuH,MAAM,0BAAyB,cACnB,SAEdJ,EAAA,OAAAE,IAAA,2CAAKE,MAAM,uBACTJ,EAAA,QAAAE,IAAA,8C,+nCAhjBgB7J,EAAA+I,yBAA2B,GAC3B/I,EAAAyI,2BAA6B,G","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-09-04T16:44:28",
2
+ "timestamp": "2026-09-04T18:25:52",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.43.5",
@@ -8711,6 +8711,7 @@
8711
8711
  "The flow-preservation spacer follows contentSurface so compacting a secondary page cannot expose a primary strip before its content.",
8712
8712
  "On roomy pages, the expanded header scrolls upward until its title and action row reaches the compact row position, while its bottom divider progressively extends from the expanded inset to edge-to-edge; it then snaps variants without moving that shared visual anchor.",
8713
8713
  "Scroll compaction preserves the expanded page flow offset so content never jumps beneath the sticky header.",
8714
+ "The sticky header paints above the isolated routed-content layer, so product surfaces and callouts scroll beneath its opaque boundary instead of covering page chrome.",
8714
8715
  "ShellPage relies on ShellApp's content scroller and never introduces nested scrolling.",
8715
8716
  "BarWorkflow remains compact and is not assigned BarTitle's capacity or scroll variants."
8716
8717
  ],
@@ -81,6 +81,7 @@
81
81
  "The flow-preservation spacer follows contentSurface so compacting a secondary page cannot expose a primary strip before its content.",
82
82
  "On roomy pages, the expanded header scrolls upward until its title and action row reaches the compact row position, while its bottom divider progressively extends from the expanded inset to edge-to-edge; it then snaps variants without moving that shared visual anchor.",
83
83
  "Scroll compaction preserves the expanded page flow offset so content never jumps beneath the sticky header.",
84
+ "The sticky header paints above the isolated routed-content layer, so product surfaces and callouts scroll beneath its opaque boundary instead of covering page chrome.",
84
85
  "ShellPage relies on ShellApp's content scroller and never introduces nested scrolling.",
85
86
  "BarWorkflow remains compact and is not assigned BarTitle's capacity or scroll variants."
86
87
  ],
@@ -341,7 +342,7 @@
341
342
  "files": [
342
343
  {
343
344
  "path": "src/wc/components/ShellPage/ShellPage.css",
344
- "content": ":host {\n --_shell-page-content-background: var(--color-background-primary);\n --_shell-page-header-background: var(--color-background-primary);\n --_shell-page-responsive-content-block-start-inset: var(--dimension-space-400);\n --_shell-page-content-block-start-inset: var(\n --ds-shell-page-content-block-start-inset,\n var(--_shell-page-responsive-content-block-start-inset)\n );\n --ds-shell-page-sticky-header-block-size: var(--dimension-size-600);\n --ds-shell-page-content-block-start-offset: calc(\n var(--ds-shell-page-sticky-header-block-size) + var(--_shell-page-content-block-start-inset)\n );\n display: block;\n position: relative;\n min-width: 0;\n min-height: 100%;\n box-sizing: border-box;\n background: var(--_shell-page-content-background);\n}\n\n:host(.shell-page-host--surface-secondary) {\n --_shell-page-content-background: var(--color-background-secondary);\n}\n\n:host(.shell-page-host--surface-secondary[responsive-mode='desktop']),\n:host(.shell-page-host--surface-secondary[responsive-mode='tablet']) {\n --_shell-page-header-background: var(--color-background-secondary);\n}\n\n:host([responsive-mode='tablet']),\n:host([responsive-mode='mobile']) {\n --_shell-page-responsive-content-block-start-inset: var(--dimension-space-200);\n}\n\n:host([responsive-mode='mobile']) {\n --ds-shell-page-sticky-header-block-size: calc(\n var(--dimension-size-500) + var(--dimension-space-200)\n );\n}\n\n:host(.shell-page-host--header-compact),\n:host(.shell-page-host--header-constrained) {\n --_shell-page-content-block-start-inset: var(\n --ds-shell-page-compact-content-block-start-inset,\n var(--_shell-page-responsive-content-block-start-inset)\n );\n}\n\n:host(.shell-page-host--inset-none),\n:host(.shell-page-host--block-start-inset-none) {\n --_shell-page-content-block-start-inset: 0px;\n}\n\n:host(.shell-page-host--desktop-header-shell-bar) {\n --ds-shell-page-sticky-header-block-size: 0px;\n}\n\n:host(.shell-page-host--desktop-header-shell-bar.shell-page-host--inset-default) {\n --_shell-page-content-block-start-inset: var(--_shell-page-responsive-content-block-start-inset);\n}\n\n.shell-page__scroll-sentinel {\n position: absolute;\n inset-block-start: var(--ds-shell-page-header-travel, 0);\n inset-inline-start: 0;\n width: var(--dimension-stroke-width-012);\n height: var(--dimension-stroke-width-012);\n pointer-events: none;\n}\n\n.shell-page__sticky-header {\n position: sticky;\n inset-block-start: var(--ds-shell-page-sticky-offset, 0);\n z-index: var(--dimension-z-index-raised);\n min-width: 0;\n background: var(--_shell-page-header-background);\n overflow: visible;\n overflow-anchor: none;\n}\n\n.shell-page__desktop-header ::slotted(ds-bar-title),\n.shell-page__desktop-header ::slotted(ds-bar-workflow),\n.shell-page__mobile-header ::slotted(ds-mobile-header) {\n display: block;\n min-width: 0;\n}\n\n.shell-page__desktop-header[hidden],\n.shell-page__mobile-header[hidden] {\n display: none;\n}\n\n:host(.shell-page-host--mobile) .shell-page__scroll-sentinel,\n:host(.shell-page-host--mobile) .shell-page__flow-spacer {\n display: none;\n}\n\n.shell-page__flow-spacer {\n height: var(--ds-shell-page-flow-spacer, 0);\n background: var(--_shell-page-content-background);\n}\n\n.shell-page__content {\n min-width: 0;\n box-sizing: border-box;\n background: var(--_shell-page-content-background);\n}\n\n:host(.shell-page-host--inset-default) .shell-page__content {\n padding: var(--dimension-space-400);\n padding-block-start: var(--_shell-page-content-block-start-inset);\n}\n\n:host(.shell-page-host--inset-default[responsive-mode='tablet']) .shell-page__content,\n:host(.shell-page-host--inset-default[responsive-mode='mobile']) .shell-page__content {\n padding: var(--dimension-space-200);\n padding-block-start: var(--_shell-page-content-block-start-inset);\n}\n\n:host(.shell-page-host--inset-none) .shell-page__content {\n padding: 0;\n}\n",
345
+ "content": ":host {\n --_shell-page-content-background: var(--color-background-primary);\n --_shell-page-header-background: var(--color-background-primary);\n --_shell-page-responsive-content-block-start-inset: var(--dimension-space-400);\n --_shell-page-content-block-start-inset: var(\n --ds-shell-page-content-block-start-inset,\n var(--_shell-page-responsive-content-block-start-inset)\n );\n --ds-shell-page-sticky-header-block-size: var(--dimension-size-600);\n --ds-shell-page-content-block-start-offset: calc(\n var(--ds-shell-page-sticky-header-block-size) + var(--_shell-page-content-block-start-inset)\n );\n display: block;\n position: relative;\n min-width: 0;\n min-height: 100%;\n box-sizing: border-box;\n background: var(--_shell-page-content-background);\n}\n\n:host(.shell-page-host--surface-secondary) {\n --_shell-page-content-background: var(--color-background-secondary);\n}\n\n:host(.shell-page-host--surface-secondary[responsive-mode='desktop']),\n:host(.shell-page-host--surface-secondary[responsive-mode='tablet']) {\n --_shell-page-header-background: var(--color-background-secondary);\n}\n\n:host([responsive-mode='tablet']),\n:host([responsive-mode='mobile']) {\n --_shell-page-responsive-content-block-start-inset: var(--dimension-space-200);\n}\n\n:host([responsive-mode='mobile']) {\n --ds-shell-page-sticky-header-block-size: calc(\n var(--dimension-size-500) + var(--dimension-space-200)\n );\n}\n\n:host(.shell-page-host--header-compact),\n:host(.shell-page-host--header-constrained) {\n --_shell-page-content-block-start-inset: var(\n --ds-shell-page-compact-content-block-start-inset,\n var(--_shell-page-responsive-content-block-start-inset)\n );\n}\n\n:host(.shell-page-host--inset-none),\n:host(.shell-page-host--block-start-inset-none) {\n --_shell-page-content-block-start-inset: 0px;\n}\n\n:host(.shell-page-host--desktop-header-shell-bar) {\n --ds-shell-page-sticky-header-block-size: 0px;\n}\n\n:host(.shell-page-host--desktop-header-shell-bar.shell-page-host--inset-default) {\n --_shell-page-content-block-start-inset: var(--_shell-page-responsive-content-block-start-inset);\n}\n\n.shell-page__scroll-sentinel {\n position: absolute;\n inset-block-start: var(--ds-shell-page-header-travel, 0);\n inset-inline-start: 0;\n width: var(--dimension-stroke-width-012);\n height: var(--dimension-stroke-width-012);\n pointer-events: none;\n}\n\n.shell-page__sticky-header {\n position: sticky;\n inset-block-start: var(--ds-shell-page-sticky-offset, 0);\n z-index: var(--dimension-z-index-raised);\n min-width: 0;\n background: var(--_shell-page-header-background);\n overflow: visible;\n overflow-anchor: none;\n}\n\n.shell-page__desktop-header ::slotted(ds-bar-title),\n.shell-page__desktop-header ::slotted(ds-bar-workflow),\n.shell-page__mobile-header ::slotted(ds-mobile-header) {\n display: block;\n min-width: 0;\n}\n\n.shell-page__desktop-header[hidden],\n.shell-page__mobile-header[hidden] {\n display: none;\n}\n\n:host(.shell-page-host--mobile) .shell-page__scroll-sentinel,\n:host(.shell-page-host--mobile) .shell-page__flow-spacer {\n display: none;\n}\n\n.shell-page__flow-spacer {\n height: var(--ds-shell-page-flow-spacer, 0);\n background: var(--_shell-page-content-background);\n}\n\n.shell-page__content {\n min-width: 0;\n box-sizing: border-box;\n background: var(--_shell-page-content-background);\n isolation: isolate;\n}\n\n:host(.shell-page-host--inset-default) .shell-page__content {\n padding: var(--dimension-space-400);\n padding-block-start: var(--_shell-page-content-block-start-inset);\n}\n\n:host(.shell-page-host--inset-default[responsive-mode='tablet']) .shell-page__content,\n:host(.shell-page-host--inset-default[responsive-mode='mobile']) .shell-page__content {\n padding: var(--dimension-space-200);\n padding-block-start: var(--_shell-page-content-block-start-inset);\n}\n\n:host(.shell-page-host--inset-none) .shell-page__content {\n padding: 0;\n}\n",
345
346
  "type": "registry:ui"
346
347
  },
347
348
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ds-mo/ui",
3
- "version": "14.29.0",
3
+ "version": "14.29.1",
4
4
  "description": "CompoMo — composable web components styled with TokoMo design tokens",
5
5
  "keywords": [
6
6
  "web-components",
@@ -1,2 +0,0 @@
1
- import{p as e,H as s,h as t,a as i,t as a}from"./index.js";import{r as l}from"./p-CochmPyg.js";function h(e,s,t){if(e!=="auto")return e;if(s==="constrained")return"constrained";if(s==="compact"||!t)return"compact";return"expanded"}const n=()=>`.sc-ds-shell-page-h{--_shell-page-content-background:var(--color-background-primary);--_shell-page-header-background:var(--color-background-primary);--_shell-page-responsive-content-block-start-inset:var(--dimension-space-400);--_shell-page-content-block-start-inset:var( --ds-shell-page-content-block-start-inset, var(--_shell-page-responsive-content-block-start-inset) );--ds-shell-page-sticky-header-block-size:var(--dimension-size-600);--ds-shell-page-content-block-start-offset:calc( var(--ds-shell-page-sticky-header-block-size) + var(--_shell-page-content-block-start-inset) );display:block;position:relative;min-width:0;min-height:100%;box-sizing:border-box;background:var(--_shell-page-content-background)}.shell-page-host--surface-secondary.sc-ds-shell-page-h{--_shell-page-content-background:var(--color-background-secondary)}.shell-page-host--surface-secondary[responsive-mode='desktop'].sc-ds-shell-page-h,.shell-page-host--surface-secondary[responsive-mode='tablet'].sc-ds-shell-page-h{--_shell-page-header-background:var(--color-background-secondary)}[responsive-mode='tablet'].sc-ds-shell-page-h,[responsive-mode='mobile'].sc-ds-shell-page-h{--_shell-page-responsive-content-block-start-inset:var(--dimension-space-200)}[responsive-mode='mobile'].sc-ds-shell-page-h{--ds-shell-page-sticky-header-block-size:calc( var(--dimension-size-500) + var(--dimension-space-200) )}.shell-page-host--header-compact.sc-ds-shell-page-h,.shell-page-host--header-constrained.sc-ds-shell-page-h{--_shell-page-content-block-start-inset:var( --ds-shell-page-compact-content-block-start-inset, var(--_shell-page-responsive-content-block-start-inset) )}.shell-page-host--inset-none.sc-ds-shell-page-h,.shell-page-host--block-start-inset-none.sc-ds-shell-page-h{--_shell-page-content-block-start-inset:0px}.shell-page-host--desktop-header-shell-bar.sc-ds-shell-page-h{--ds-shell-page-sticky-header-block-size:0px}.shell-page-host--desktop-header-shell-bar.shell-page-host--inset-default.sc-ds-shell-page-h{--_shell-page-content-block-start-inset:var(--_shell-page-responsive-content-block-start-inset)}.shell-page__scroll-sentinel.sc-ds-shell-page{position:absolute;inset-block-start:var(--ds-shell-page-header-travel, 0);inset-inline-start:0;width:var(--dimension-stroke-width-012);height:var(--dimension-stroke-width-012);pointer-events:none}.shell-page__sticky-header.sc-ds-shell-page{position:sticky;inset-block-start:var(--ds-shell-page-sticky-offset, 0);z-index:var(--dimension-z-index-raised);min-width:0;background:var(--_shell-page-header-background);overflow:visible;overflow-anchor:none}.shell-page__desktop-header.sc-ds-shell-page-s>ds-bar-title,.shell-page__desktop-header .sc-ds-shell-page-s>ds-bar-title,.shell-page__desktop-header.sc-ds-shell-page-s>ds-bar-workflow,.shell-page__desktop-header .sc-ds-shell-page-s>ds-bar-workflow,.shell-page__mobile-header.sc-ds-shell-page-s>ds-mobile-header,.shell-page__mobile-header .sc-ds-shell-page-s>ds-mobile-header{display:block;min-width:0}.shell-page__desktop-header[hidden].sc-ds-shell-page,.shell-page__mobile-header[hidden].sc-ds-shell-page{display:none}.shell-page-host--mobile.sc-ds-shell-page-h .shell-page__scroll-sentinel.sc-ds-shell-page,.shell-page-host--mobile.sc-ds-shell-page-h .shell-page__flow-spacer.sc-ds-shell-page{display:none}.shell-page__flow-spacer.sc-ds-shell-page{height:var(--ds-shell-page-flow-spacer, 0);background:var(--_shell-page-content-background)}.shell-page__content.sc-ds-shell-page{min-width:0;box-sizing:border-box;background:var(--_shell-page-content-background)}.shell-page-host--inset-default.sc-ds-shell-page-h .shell-page__content.sc-ds-shell-page{padding:var(--dimension-space-400);padding-block-start:var(--_shell-page-content-block-start-inset)}.shell-page-host--inset-default[responsive-mode='tablet'].sc-ds-shell-page-h .shell-page__content.sc-ds-shell-page,.shell-page-host--inset-default[responsive-mode='mobile'].sc-ds-shell-page-h .shell-page__content.sc-ds-shell-page{padding:var(--dimension-space-200);padding-block-start:var(--_shell-page-content-block-start-inset)}.shell-page-host--inset-none.sc-ds-shell-page-h .shell-page__content.sc-ds-shell-page{padding:0}`;const r=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.headerPresentation="auto";this.desktopHeaderPlacement="page";this.contentInset="default";this.contentInsetBlockStart="default";this.scrollCompaction=true;this.contentSurface="primary";this.responsiveMode="desktop";this.pageTopVisible=true;this.sentinelEl=null;this.spacerEl=null;this.stickyHeaderEl=null;this.headerEl=null;this.expandedHeaderHeight=0;this.headerTravel=0;this.expandedGeometryFrozen=false;this.pageHeaderResizeObserver=null;this.headerResizeObserver=null;this.headerMutationObserver=null;this.headerRevealFrame=null;this.headerGeometryFrame=null;this.reconnectFrame=null;this.scrollRoot=null;this.hasLoaded=false;this.handleScroll=()=>{if(!this.sentinelEl||!this.scrollRoot)return;const e=this.scrollRoot===window?0:this.scrollRoot.getBoundingClientRect().top;this.syncHeaderDividerInset(e);const s=this.sentinelEl.getBoundingClientRect().top>=e;if(this.effectiveScrollCompaction&&!s&&this.pageTopVisible&&this.headerEl?.classList.contains(this.variantClass("expanded"))){this.captureExpandedHeaderGeometry(this.headerEl);this.expandedGeometryFrozen=true}if(s&&this.expandedGeometryFrozen&&this.el.getBoundingClientRect().top>=e){this.expandedGeometryFrozen=false;if(this.headerEl?.classList.contains(this.variantClass("expanded"))){this.captureExpandedHeaderGeometry(this.headerEl)}}this.pageTopVisible=s};this.handleHeaderSlotChange=e=>{if(this.responsiveMode==="mobile")return;const s=e.target;const t=s.assignedElements().find((e=>e.tagName.toLowerCase()==="ds-bar-title"));this.observeHeader(t??null)}}handleHeaderContractChange(){this.syncHeaderVariant(true)}handleResponsiveModeChange(){this.el.style.removeProperty("--ds-shell-page-sticky-header-block-size");this.observeHeader(this.responsiveMode==="mobile"||this.desktopHeaderExternal?null:this.findHeader());this.syncPageHeaderBlockSize()}handleDesktopHeaderPlacementChange(){this.observeHeader(this.desktopHeaderExternal?null:this.findHeader());this.syncPageHeaderBlockSize()}componentDidLoad(){this.hasLoaded=true;this.connectRuntime()}componentDidRender(){this.syncHeaderVariant();this.syncPageHeaderBlockSize()}connectedCallback(){if(!this.hasLoaded)return;if(this.reconnectFrame!==null)cancelAnimationFrame(this.reconnectFrame);this.reconnectFrame=requestAnimationFrame((()=>{this.reconnectFrame=null;if(this.el.isConnected)this.connectRuntime()}))}disconnectedCallback(){if(this.reconnectFrame!==null)cancelAnimationFrame(this.reconnectFrame);this.reconnectFrame=null;this.headerResizeObserver?.disconnect();this.headerResizeObserver=null;this.pageHeaderResizeObserver?.disconnect();this.pageHeaderResizeObserver=null;this.headerMutationObserver?.disconnect();this.headerMutationObserver=null;this.cancelHeaderReveal();this.cancelHeaderGeometrySync();this.headerEl?.style.removeProperty("--ds-bar-title-divider-inset");this.scrollRoot?.removeEventListener("scroll",this.handleScroll);this.scrollRoot=null}connectRuntime(){this.observePageHeaderGeometry();this.observeHeader(this.responsiveMode==="mobile"?null:this.findHeader());this.connectScrollRoot()}get effectiveVariant(){if(this.desktopHeaderExternal)return"compact";return h(this.headerPresentation,this.headerCapacity??"roomy",this.effectiveScrollCompaction?this.pageTopVisible:true)}get desktopHeaderExternal(){return this.responsiveMode!=="mobile"&&this.desktopHeaderPlacement==="shell-bar"}get effectiveScrollCompaction(){return this.scrollCompaction&&!this.desktopHeaderExternal}get headerContractResolved(){return this.headerPresentation!=="auto"||this.headerCapacity!==undefined}get isScrollCompacted(){return this.effectiveScrollCompaction&&this.headerPresentation==="auto"&&this.headerCapacity==="roomy"&&!this.pageTopVisible}get contentInsetStyles(){const e={};const s=this.contentInsetBlockStartSize?.trim();const t=this.compactContentInsetBlockStartSize?.trim();if(s)e["--ds-shell-page-content-block-start-inset"]=s;if(t)e["--ds-shell-page-compact-content-block-start-inset"]=t;return e}composedParent(e){return e.assignedSlot?.parentElement??e.parentElement}findScrollRoot(){let e=this.composedParent(this.el);while(e&&e!==document.documentElement){const s=getComputedStyle(e).overflowY;if(s==="auto"||s==="scroll"||s==="overlay"){return e}e=this.composedParent(e)}return window}connectScrollRoot(){const e=this.findScrollRoot();if(e===this.scrollRoot)return;this.scrollRoot?.removeEventListener("scroll",this.handleScroll);this.scrollRoot=e;this.scrollRoot.addEventListener("scroll",this.handleScroll,{passive:true});this.handleScroll()}get scrollRootResolved(){const e=this.el.closest("ds-shell-app");if(!e)return true;const s=e.querySelector(".shell-app__content");return s!==null&&this.scrollRoot===s}findHeader(){return this.el.querySelector("ds-bar-title")}get compactHeaderHeight(){return l("--dimension-size-600",0)}syncHeaderDividerInset(e){const s=this.headerEl;if(!s)return;const t=this.effectiveScrollCompaction&&this.headerPresentation==="auto"&&this.headerCapacity==="roomy";const i=l("--dimension-space-400",0);if(!t||!this.sentinelEl||!this.scrollRoot||this.headerTravel<=0||i<=0){s.style.removeProperty("--ds-bar-title-divider-inset");return}const a=e??(this.scrollRoot===window?0:this.scrollRoot.getBoundingClientRect().top);const h=this.sentinelEl.getBoundingClientRect().top-a;const n=Math.min(1,Math.max(0,1-h/this.headerTravel));s.style.setProperty("--ds-bar-title-divider-inset",`${i*(1-n)}px`)}setHeaderTravel(e){const s=Math.max(0,e);if(Math.abs(s-this.headerTravel)<.5)return;this.headerTravel=s;this.el.style.setProperty("--ds-shell-page-header-travel",`${s}px`);this.handleScroll()}measureHeaderTravel(e){const s=e.querySelector("[data-shell-page-header-anchor]");const t=this.compactHeaderHeight;if(!s||t<=0)return;const i=e.getBoundingClientRect();const a=s.getBoundingClientRect();if(i.height<=0||a.height<=0)return;const l=a.top-i.top;const h=Math.max(0,(t-a.height)/2);this.setHeaderTravel(l-h)}captureExpandedHeaderGeometry(e){this.expandedHeaderHeight=Math.max(this.expandedHeaderHeight,e.getBoundingClientRect().height);this.measureHeaderTravel(e)}setSpacerHeight(e){if(!this.spacerEl)return;this.spacerEl.style.setProperty("--ds-shell-page-flow-spacer",`${Math.max(0,e)}px`)}variantClass(e){return`bar-title-host--${e}`}setStickyHeaderOffset(e){this.stickyHeaderEl?.style.setProperty("--ds-shell-page-sticky-offset",e==="expanded"&&this.effectiveScrollCompaction&&this.headerPresentation==="auto"&&this.headerCapacity==="roomy"?`${-this.headerTravel}px`:"0px")}syncPageHeaderBlockSize(){if(this.desktopHeaderExternal){this.el.style.setProperty("--ds-shell-page-sticky-header-block-size","0px");return}const e=this.stickyHeaderEl?.getBoundingClientRect().height??0;if(e>0){this.el.style.setProperty("--ds-shell-page-sticky-header-block-size",`${e}px`)}else{this.el.style.removeProperty("--ds-shell-page-sticky-header-block-size")}}observePageHeaderGeometry(){this.pageHeaderResizeObserver?.disconnect();this.pageHeaderResizeObserver=null;this.syncPageHeaderBlockSize();if(!this.stickyHeaderEl||typeof ResizeObserver==="undefined")return;this.pageHeaderResizeObserver=new ResizeObserver((()=>{this.syncPageHeaderBlockSize()}));this.pageHeaderResizeObserver.observe(this.stickyHeaderEl)}syncRenderedHeaderGeometry(e){const s=this.effectiveVariant;if(!e.classList.contains(this.variantClass(s)))return;this.syncPageHeaderBlockSize();this.setSpacerHeight(this.isScrollCompacted?this.expandedHeaderHeight-this.compactHeaderHeight:0);this.setStickyHeaderOffset(s);if(s==="expanded"&&!this.expandedGeometryFrozen){this.captureExpandedHeaderGeometry(e);this.setStickyHeaderOffset(s)}}cancelHeaderGeometrySync(){if(this.headerGeometryFrame!==null)cancelAnimationFrame(this.headerGeometryFrame);this.headerGeometryFrame=null}scheduleHeaderGeometrySync(s){this.cancelHeaderGeometrySync();let t=e.MAX_HEADER_GEOMETRY_FRAMES;let i=0;const a=()=>{if(this.headerEl!==s)return;t-=1;i+=1;this.connectScrollRoot();this.syncRenderedHeaderGeometry(s);const e=this.effectiveVariant!=="expanded"||this.expandedHeaderHeight>0&&this.headerTravel>0;if(e&&this.scrollRootResolved&&i>=2||t<=0){this.headerGeometryFrame=null;return}this.headerGeometryFrame=requestAnimationFrame(a)};this.headerGeometryFrame=requestAnimationFrame(a)}cancelHeaderReveal(){if(this.headerRevealFrame!==null)cancelAnimationFrame(this.headerRevealFrame);this.headerRevealFrame=null;this.headerEl?.removeAttribute("data-shell-page-syncing")}revealHeaderWhenSynced(s,t){let i=e.MAX_HEADER_REVEAL_FRAMES;const a=()=>{if(this.headerEl!==s){s.removeAttribute("data-shell-page-syncing");return}i-=1;if(s.classList.contains(this.variantClass(t))){s.removeAttribute("data-shell-page-syncing");this.headerRevealFrame=null;return}if(i<=0){this.headerRevealFrame=null;return}this.headerRevealFrame=requestAnimationFrame(a)};this.headerRevealFrame=requestAnimationFrame(a)}syncHeaderVariant(e=false){const s=this.headerEl;if(!s)return;this.syncHeaderDividerInset();if(!this.headerContractResolved){this.cancelHeaderReveal();s.setAttribute("data-shell-page-syncing","");return}const t=this.effectiveVariant;const i=!s.classList.contains(this.variantClass(t));if(!i)this.syncRenderedHeaderGeometry(s);if(i&&this.isScrollCompacted){this.setSpacerHeight(this.expandedHeaderHeight-this.compactHeaderHeight);this.setStickyHeaderOffset(t)}if(e){this.cancelHeaderReveal();s.setAttribute("data-shell-page-syncing","")}if(s.variant!==t){s.variant=t;this.scheduleHeaderGeometrySync(s)}if(e){this.revealHeaderWhenSynced(s,t)}}observeHeader(e){this.cancelHeaderReveal();this.cancelHeaderGeometrySync();this.headerResizeObserver?.disconnect();this.headerResizeObserver=null;this.headerMutationObserver?.disconnect();this.headerMutationObserver=null;this.headerEl?.style.removeProperty("--ds-bar-title-divider-inset");this.headerEl=e;this.expandedHeaderHeight=0;this.expandedGeometryFrozen=false;this.setHeaderTravel(0);this.setSpacerHeight(0);this.stickyHeaderEl?.style.setProperty("--ds-shell-page-sticky-offset","0px");if(!e)return;if(e.classList.contains(this.variantClass("expanded"))){this.captureExpandedHeaderGeometry(e)}if(typeof ResizeObserver!=="undefined"){this.headerResizeObserver=new ResizeObserver((()=>{this.syncRenderedHeaderGeometry(e)}));this.headerResizeObserver.observe(e)}if(typeof MutationObserver!=="undefined"){this.headerMutationObserver=new MutationObserver((()=>{this.syncRenderedHeaderGeometry(e)}));this.headerMutationObserver.observe(e,{attributes:true,attributeFilter:["class"],childList:true,subtree:true})}this.syncHeaderVariant(true);this.scheduleHeaderGeometrySync(e)}render(){const e=this.responsiveMode==="mobile";return t(i,{key:"7c13dabffbbb738499a9a3e372c9f4b6ff577711",role:"main",style:this.contentInsetStyles,class:{"shell-page-host--inset-default":this.contentInset==="default","shell-page-host--inset-none":this.contentInset==="none","shell-page-host--block-start-inset-none":this.contentInsetBlockStart==="none","shell-page-host--surface-primary":this.contentSurface==="primary","shell-page-host--surface-secondary":this.contentSurface==="secondary","shell-page-host--mobile":e,"shell-page-host--desktop-header-shell-bar":this.desktopHeaderExternal,[`shell-page-host--header-${this.effectiveVariant}`]:true}},t("div",{key:"20d0d95b72671a54a049554e12bdc50c9c6f86da",ref:e=>{this.sentinelEl=e??null},class:"shell-page__scroll-sentinel","aria-hidden":"true"}),t("div",{key:"fc7f145d9b239ae2969c1228bc3729ed0054b283",ref:e=>{this.stickyHeaderEl=e??null},class:"shell-page__sticky-header"},t("div",{key:"5194335b60a48e6278886768b830ab9bae5afa26",class:"shell-page__desktop-header",hidden:e,"aria-hidden":e?"true":undefined,inert:e?true:undefined},t("slot",{key:"ad11eb070bb24230a2cf0396f5252411c9a4ef03",name:"header",onSlotchange:this.handleHeaderSlotChange})),t("div",{key:"c017c662a11a63b96c7e72ed06d64cc436a4afce",class:"shell-page__mobile-header",hidden:!e,"aria-hidden":!e?"true":undefined,inert:!e?true:undefined},t("slot",{key:"2928bc4f2fae9cd118794839263bc67eb3139c74",name:"mobile-header"}))),t("div",{key:"6a70612a414eacf3983f3ce69628fa230d28b086",ref:e=>{this.spacerEl=e??null},class:"shell-page__flow-spacer","aria-hidden":"true"}),t("div",{key:"d62779daba97d4339a6971f014d282c52942e5af",class:"shell-page__content"},t("slot",{key:"526ab84d232001c3c4919d5fd26b4b2a4dda7daf"})))}get el(){return this}static get watchers(){return{headerCapacity:[{handleHeaderContractChange:0}],headerPresentation:[{handleHeaderContractChange:0}],scrollCompaction:[{handleHeaderContractChange:0}],responsiveMode:[{handleResponsiveModeChange:0}],desktopHeaderPlacement:[{handleDesktopHeaderPlacementChange:0}]}}static get style(){return n()}},[262,"ds-shell-page",{headerPresentation:[1,"header-presentation"],headerCapacity:[1,"header-capacity"],desktopHeaderPlacement:[513,"desktop-header-placement"],contentInset:[1,"content-inset"],contentInsetBlockStart:[1,"content-inset-block-start"],contentInsetBlockStartSize:[1,"content-inset-block-start-size"],compactContentInsetBlockStartSize:[1,"compact-content-inset-block-start-size"],scrollCompaction:[4,"scroll-compaction"],contentSurface:[1,"content-surface"],responsiveMode:[513,"responsive-mode"],pageTopVisible:[32]},undefined,{headerCapacity:[{handleHeaderContractChange:0}],headerPresentation:[{handleHeaderContractChange:0}],scrollCompaction:[{handleHeaderContractChange:0}],responsiveMode:[{handleResponsiveModeChange:0}],desktopHeaderPlacement:[{handleDesktopHeaderPlacementChange:0}]}]);r.MAX_HEADER_REVEAL_FRAMES=12;r.MAX_HEADER_GEOMETRY_FRAMES=12;function o(){if(typeof customElements==="undefined"){return}const e=["ds-shell-page"];e.forEach((e=>{switch(e){case"ds-shell-page":if(!customElements.get(a(e))){customElements.define(a(e),r)}break}}))}o();export{r as S,o as d};
2
- //# sourceMappingURL=p-Hzz2j1Je.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["resolveShellPageHeaderVariant","presentation","capacity","pageTopVisible","shellPageCss","ShellPage","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","headerPresentation","desktopHeaderPlacement","contentInset","contentInsetBlockStart","scrollCompaction","contentSurface","responsiveMode","sentinelEl","spacerEl","stickyHeaderEl","headerEl","expandedHeaderHeight","headerTravel","expandedGeometryFrozen","pageHeaderResizeObserver","headerResizeObserver","headerMutationObserver","headerRevealFrame","headerGeometryFrame","reconnectFrame","scrollRoot","hasLoaded","handleScroll","rootTop","window","getBoundingClientRect","top","syncHeaderDividerInset","nextPageTopVisible","effectiveScrollCompaction","classList","contains","variantClass","captureExpandedHeaderGeometry","el","handleHeaderSlotChange","event","slot","target","header","assignedElements","find","element","tagName","toLowerCase","observeHeader","handleHeaderContractChange","syncHeaderVariant","handleResponsiveModeChange","style","removeProperty","desktopHeaderExternal","findHeader","syncPageHeaderBlockSize","handleDesktopHeaderPlacementChange","componentDidLoad","connectRuntime","componentDidRender","connectedCallback","cancelAnimationFrame","requestAnimationFrame","isConnected","disconnectedCallback","disconnect","cancelHeaderReveal","cancelHeaderGeometrySync","removeEventListener","observePageHeaderGeometry","connectScrollRoot","effectiveVariant","headerCapacity","headerContractResolved","undefined","isScrollCompacted","contentInsetStyles","styles","expanded","contentInsetBlockStartSize","trim","compact","compactContentInsetBlockStartSize","composedParent","assignedSlot","parentElement","findScrollRoot","ancestor","document","documentElement","overflow","getComputedStyle","overflowY","next","addEventListener","passive","scrollRootResolved","shell","closest","expected","querySelector","compactHeaderHeight","resolveCssLengthPx","ownsScrollTransition","expandedInset","scrollRootTop","remainingTravel","progress","Math","min","max","setProperty","setHeaderTravel","distance","abs","measureHeaderTravel","anchor","compactHeight","headerRect","anchorRect","height","expandedAnchorTop","compactAnchorTop","setSpacerHeight","variant","setStickyHeaderOffset","renderedVariant","renderedHeight","ResizeObserver","observe","syncRenderedHeaderGeometry","scheduleHeaderGeometrySync","framesRemaining","MAX_HEADER_GEOMETRY_FRAMES","framesElapsed","sync","geometryReady","removeAttribute","revealHeaderWhenSynced","MAX_HEADER_REVEAL_FRAMES","reveal","concealUntilSynced","setAttribute","renderedVariantIsStale","MutationObserver","attributes","attributeFilter","childList","subtree","render","mobile","h","Host","key","role","class","ref","hidden","inert","name","onSlotchange"],"sources":["src/wc/components/ShellPage/shell-page-responsive.ts","src/wc/components/ShellPage/ShellPage.css?tag=ds-shell-page&encapsulation=scoped","src/wc/components/ShellPage/ShellPage.tsx"],"sourcesContent":["import type { ShellPageCapacity, ShellPageHeaderPresentation } from './shell-page-types';\nimport type { BarTitleVariant } from '../BarTitle/bar-title-types';\n\nexport function resolveShellPageHeaderVariant(\n presentation: ShellPageHeaderPresentation,\n capacity: ShellPageCapacity,\n pageTopVisible: boolean\n): BarTitleVariant {\n if (presentation !== 'auto') return presentation;\n if (capacity === 'constrained') return 'constrained';\n if (capacity === 'compact' || !pageTopVisible) return 'compact';\n return 'expanded';\n}\n",":host {\n --_shell-page-content-background: var(--color-background-primary);\n --_shell-page-header-background: var(--color-background-primary);\n --_shell-page-responsive-content-block-start-inset: var(--dimension-space-400);\n --_shell-page-content-block-start-inset: var(\n --ds-shell-page-content-block-start-inset,\n var(--_shell-page-responsive-content-block-start-inset)\n );\n --ds-shell-page-sticky-header-block-size: var(--dimension-size-600);\n --ds-shell-page-content-block-start-offset: calc(\n var(--ds-shell-page-sticky-header-block-size) + var(--_shell-page-content-block-start-inset)\n );\n display: block;\n position: relative;\n min-width: 0;\n min-height: 100%;\n box-sizing: border-box;\n background: var(--_shell-page-content-background);\n}\n\n:host(.shell-page-host--surface-secondary) {\n --_shell-page-content-background: var(--color-background-secondary);\n}\n\n:host(.shell-page-host--surface-secondary[responsive-mode='desktop']),\n:host(.shell-page-host--surface-secondary[responsive-mode='tablet']) {\n --_shell-page-header-background: var(--color-background-secondary);\n}\n\n:host([responsive-mode='tablet']),\n:host([responsive-mode='mobile']) {\n --_shell-page-responsive-content-block-start-inset: var(--dimension-space-200);\n}\n\n:host([responsive-mode='mobile']) {\n --ds-shell-page-sticky-header-block-size: calc(\n var(--dimension-size-500) + var(--dimension-space-200)\n );\n}\n\n:host(.shell-page-host--header-compact),\n:host(.shell-page-host--header-constrained) {\n --_shell-page-content-block-start-inset: var(\n --ds-shell-page-compact-content-block-start-inset,\n var(--_shell-page-responsive-content-block-start-inset)\n );\n}\n\n:host(.shell-page-host--inset-none),\n:host(.shell-page-host--block-start-inset-none) {\n --_shell-page-content-block-start-inset: 0px;\n}\n\n:host(.shell-page-host--desktop-header-shell-bar) {\n --ds-shell-page-sticky-header-block-size: 0px;\n}\n\n:host(.shell-page-host--desktop-header-shell-bar.shell-page-host--inset-default) {\n --_shell-page-content-block-start-inset: var(--_shell-page-responsive-content-block-start-inset);\n}\n\n.shell-page__scroll-sentinel {\n position: absolute;\n inset-block-start: var(--ds-shell-page-header-travel, 0);\n inset-inline-start: 0;\n width: var(--dimension-stroke-width-012);\n height: var(--dimension-stroke-width-012);\n pointer-events: none;\n}\n\n.shell-page__sticky-header {\n position: sticky;\n inset-block-start: var(--ds-shell-page-sticky-offset, 0);\n z-index: var(--dimension-z-index-raised);\n min-width: 0;\n background: var(--_shell-page-header-background);\n overflow: visible;\n overflow-anchor: none;\n}\n\n.shell-page__desktop-header ::slotted(ds-bar-title),\n.shell-page__desktop-header ::slotted(ds-bar-workflow),\n.shell-page__mobile-header ::slotted(ds-mobile-header) {\n display: block;\n min-width: 0;\n}\n\n.shell-page__desktop-header[hidden],\n.shell-page__mobile-header[hidden] {\n display: none;\n}\n\n:host(.shell-page-host--mobile) .shell-page__scroll-sentinel,\n:host(.shell-page-host--mobile) .shell-page__flow-spacer {\n display: none;\n}\n\n.shell-page__flow-spacer {\n height: var(--ds-shell-page-flow-spacer, 0);\n background: var(--_shell-page-content-background);\n}\n\n.shell-page__content {\n min-width: 0;\n box-sizing: border-box;\n background: var(--_shell-page-content-background);\n}\n\n:host(.shell-page-host--inset-default) .shell-page__content {\n padding: var(--dimension-space-400);\n padding-block-start: var(--_shell-page-content-block-start-inset);\n}\n\n:host(.shell-page-host--inset-default[responsive-mode='tablet']) .shell-page__content,\n:host(.shell-page-host--inset-default[responsive-mode='mobile']) .shell-page__content {\n padding: var(--dimension-space-200);\n padding-block-start: var(--_shell-page-content-block-start-inset);\n}\n\n:host(.shell-page-host--inset-none) .shell-page__content {\n padding: 0;\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport type { ShellResponsiveMode } from '../../shell/shell-responsive';\nimport { resolveCssLengthPx } from '../../utils/resolve-css-length-px';\nimport type { BarTitleVariant } from '../BarTitle/bar-title-types';\nimport { resolveShellPageHeaderVariant } from './shell-page-responsive';\nimport type {\n ShellPageCapacity,\n ShellPageContentInset,\n ShellPageContentSurface,\n ShellPageDesktopHeaderPlacement,\n ShellPageHeaderPresentation,\n} from './shell-page-types';\n\ntype BarTitleElement = HTMLElement & { variant: BarTitleVariant };\n\n@Component({\n tag: 'ds-shell-page',\n styleUrl: 'ShellPage.css',\n scoped: true,\n})\nexport class ShellPage {\n private static readonly MAX_HEADER_REVEAL_FRAMES = 12;\n private static readonly MAX_HEADER_GEOMETRY_FRAMES = 12;\n\n @Element() el!: HTMLElement;\n\n /** Automatic capacity/scroll behavior, or an explicit header variant override. */\n @Prop() headerPresentation: ShellPageHeaderPresentation = 'auto';\n\n /** Available page-header capacity supplied by the owning application shell. */\n @Prop() headerCapacity?: ShellPageCapacity;\n\n /** Desktop title chrome is rendered in this page or externally in the shell bar. */\n @Prop({ attribute: 'desktop-header-placement', reflect: true })\n desktopHeaderPlacement: ShellPageDesktopHeaderPlacement = 'page';\n\n /** Standard page gutters, or no inset for full-bleed page content. */\n @Prop() contentInset: ShellPageContentInset = 'default';\n\n /** Preserve the responsive side/end gutters while allowing content to meet the header. */\n @Prop() contentInsetBlockStart: ShellPageContentInset = 'default';\n\n /** Exact block-start content inset, overriding the responsive default when provided. */\n @Prop() contentInsetBlockStartSize?: string;\n\n /** Exact block-start content inset while the header is compact or constrained. */\n @Prop() compactContentInsetBlockStartSize?: string;\n\n /** Allow roomy automatic headers to compact as the page scrolls. */\n @Prop() scrollCompaction: boolean = true;\n\n /** Canvas surface painted around and beneath routed page content. */\n @Prop() contentSurface: ShellPageContentSurface = 'primary';\n\n /** Explicit shell breakpoint presentation. Mobile uses the dedicated mobile-header slot. */\n @Prop({ attribute: 'responsive-mode', reflect: true })\n responsiveMode: ShellResponsiveMode = 'desktop';\n\n @State() private pageTopVisible = true;\n\n private sentinelEl: HTMLElement | null = null;\n private spacerEl: HTMLElement | null = null;\n private stickyHeaderEl: HTMLElement | null = null;\n private headerEl: BarTitleElement | null = null;\n private expandedHeaderHeight = 0;\n private headerTravel = 0;\n private expandedGeometryFrozen = false;\n private pageHeaderResizeObserver: ResizeObserver | null = null;\n private headerResizeObserver: ResizeObserver | null = null;\n private headerMutationObserver: MutationObserver | null = null;\n private headerRevealFrame: number | null = null;\n private headerGeometryFrame: number | null = null;\n private reconnectFrame: number | null = null;\n private scrollRoot: HTMLElement | Window | null = null;\n private hasLoaded = false;\n\n @Watch('headerCapacity')\n @Watch('headerPresentation')\n @Watch('scrollCompaction')\n handleHeaderContractChange() {\n this.syncHeaderVariant(true);\n }\n\n @Watch('responsiveMode')\n handleResponsiveModeChange() {\n this.el.style.removeProperty('--ds-shell-page-sticky-header-block-size');\n this.observeHeader(\n this.responsiveMode === 'mobile' || this.desktopHeaderExternal ? null : this.findHeader()\n );\n this.syncPageHeaderBlockSize();\n }\n\n @Watch('desktopHeaderPlacement')\n handleDesktopHeaderPlacementChange() {\n this.observeHeader(this.desktopHeaderExternal ? null : this.findHeader());\n this.syncPageHeaderBlockSize();\n }\n\n componentDidLoad() {\n this.hasLoaded = true;\n this.connectRuntime();\n }\n\n componentDidRender() {\n this.syncHeaderVariant();\n this.syncPageHeaderBlockSize();\n }\n\n connectedCallback() {\n if (!this.hasLoaded) return;\n if (this.reconnectFrame !== null) cancelAnimationFrame(this.reconnectFrame);\n this.reconnectFrame = requestAnimationFrame(() => {\n this.reconnectFrame = null;\n if (this.el.isConnected) this.connectRuntime();\n });\n }\n\n disconnectedCallback() {\n if (this.reconnectFrame !== null) cancelAnimationFrame(this.reconnectFrame);\n this.reconnectFrame = null;\n this.headerResizeObserver?.disconnect();\n this.headerResizeObserver = null;\n this.pageHeaderResizeObserver?.disconnect();\n this.pageHeaderResizeObserver = null;\n this.headerMutationObserver?.disconnect();\n this.headerMutationObserver = null;\n this.cancelHeaderReveal();\n this.cancelHeaderGeometrySync();\n this.headerEl?.style.removeProperty('--ds-bar-title-divider-inset');\n this.scrollRoot?.removeEventListener('scroll', this.handleScroll);\n this.scrollRoot = null;\n }\n\n private connectRuntime() {\n this.observePageHeaderGeometry();\n this.observeHeader(this.responsiveMode === 'mobile' ? null : this.findHeader());\n this.connectScrollRoot();\n }\n\n private get effectiveVariant(): BarTitleVariant {\n if (this.desktopHeaderExternal) return 'compact';\n return resolveShellPageHeaderVariant(\n this.headerPresentation,\n this.headerCapacity ?? 'roomy',\n this.effectiveScrollCompaction ? this.pageTopVisible : true\n );\n }\n\n private get desktopHeaderExternal(): boolean {\n return this.responsiveMode !== 'mobile' && this.desktopHeaderPlacement === 'shell-bar';\n }\n\n private get effectiveScrollCompaction(): boolean {\n return this.scrollCompaction && !this.desktopHeaderExternal;\n }\n\n private get headerContractResolved(): boolean {\n return this.headerPresentation !== 'auto' || this.headerCapacity !== undefined;\n }\n\n private get isScrollCompacted(): boolean {\n return (\n this.effectiveScrollCompaction &&\n this.headerPresentation === 'auto' &&\n this.headerCapacity === 'roomy' &&\n !this.pageTopVisible\n );\n }\n\n private get contentInsetStyles(): { [name: string]: string } {\n const styles: { [name: string]: string } = {};\n const expanded = this.contentInsetBlockStartSize?.trim();\n const compact = this.compactContentInsetBlockStartSize?.trim();\n if (expanded) styles['--ds-shell-page-content-block-start-inset'] = expanded;\n if (compact) styles['--ds-shell-page-compact-content-block-start-inset'] = compact;\n return styles;\n }\n\n private composedParent(element: Element): Element | null {\n return (element as HTMLElement).assignedSlot?.parentElement ?? element.parentElement;\n }\n\n private findScrollRoot(): HTMLElement | Window {\n let ancestor = this.composedParent(this.el);\n while (ancestor && ancestor !== document.documentElement) {\n const overflow = getComputedStyle(ancestor).overflowY;\n if (overflow === 'auto' || overflow === 'scroll' || overflow === 'overlay') {\n return ancestor as HTMLElement;\n }\n ancestor = this.composedParent(ancestor);\n }\n return window;\n }\n\n private connectScrollRoot() {\n const next = this.findScrollRoot();\n if (next === this.scrollRoot) return;\n this.scrollRoot?.removeEventListener('scroll', this.handleScroll);\n this.scrollRoot = next;\n this.scrollRoot.addEventListener('scroll', this.handleScroll, { passive: true });\n this.handleScroll();\n }\n\n private get scrollRootResolved(): boolean {\n const shell = this.el.closest('ds-shell-app');\n if (!shell) return true;\n const expected = shell.querySelector<HTMLElement>('.shell-app__content');\n return expected !== null && this.scrollRoot === expected;\n }\n\n private handleScroll = () => {\n if (!this.sentinelEl || !this.scrollRoot) return;\n const rootTop =\n this.scrollRoot === window ? 0 : (this.scrollRoot as HTMLElement).getBoundingClientRect().top;\n this.syncHeaderDividerInset(rootTop);\n const nextPageTopVisible = this.sentinelEl.getBoundingClientRect().top >= rootTop;\n if (\n this.effectiveScrollCompaction &&\n !nextPageTopVisible &&\n this.pageTopVisible &&\n this.headerEl?.classList.contains(this.variantClass('expanded'))\n ) {\n this.captureExpandedHeaderGeometry(this.headerEl);\n this.expandedGeometryFrozen = true;\n }\n if (\n nextPageTopVisible &&\n this.expandedGeometryFrozen &&\n this.el.getBoundingClientRect().top >= rootTop\n ) {\n this.expandedGeometryFrozen = false;\n if (this.headerEl?.classList.contains(this.variantClass('expanded'))) {\n this.captureExpandedHeaderGeometry(this.headerEl);\n }\n }\n this.pageTopVisible = nextPageTopVisible;\n };\n\n private findHeader(): BarTitleElement | null {\n return this.el.querySelector<BarTitleElement>('ds-bar-title');\n }\n\n private get compactHeaderHeight(): number {\n return resolveCssLengthPx('--dimension-size-600', 0);\n }\n\n private syncHeaderDividerInset(rootTop?: number) {\n const header = this.headerEl;\n if (!header) return;\n\n const ownsScrollTransition =\n this.effectiveScrollCompaction &&\n this.headerPresentation === 'auto' &&\n this.headerCapacity === 'roomy';\n const expandedInset = resolveCssLengthPx('--dimension-space-400', 0);\n if (\n !ownsScrollTransition ||\n !this.sentinelEl ||\n !this.scrollRoot ||\n this.headerTravel <= 0 ||\n expandedInset <= 0\n ) {\n header.style.removeProperty('--ds-bar-title-divider-inset');\n return;\n }\n\n const scrollRootTop =\n rootTop ??\n (this.scrollRoot === window\n ? 0\n : (this.scrollRoot as HTMLElement).getBoundingClientRect().top);\n const remainingTravel = this.sentinelEl.getBoundingClientRect().top - scrollRootTop;\n const progress = Math.min(1, Math.max(0, 1 - remainingTravel / this.headerTravel));\n header.style.setProperty('--ds-bar-title-divider-inset', `${expandedInset * (1 - progress)}px`);\n }\n\n private setHeaderTravel(distance: number) {\n const next = Math.max(0, distance);\n if (Math.abs(next - this.headerTravel) < 0.5) return;\n this.headerTravel = next;\n this.el.style.setProperty('--ds-shell-page-header-travel', `${next}px`);\n this.handleScroll();\n }\n\n private measureHeaderTravel(header: BarTitleElement) {\n const anchor = header.querySelector<HTMLElement>('[data-shell-page-header-anchor]');\n const compactHeight = this.compactHeaderHeight;\n if (!anchor || compactHeight <= 0) return;\n\n const headerRect = header.getBoundingClientRect();\n const anchorRect = anchor.getBoundingClientRect();\n if (headerRect.height <= 0 || anchorRect.height <= 0) return;\n\n const expandedAnchorTop = anchorRect.top - headerRect.top;\n const compactAnchorTop = Math.max(0, (compactHeight - anchorRect.height) / 2);\n this.setHeaderTravel(expandedAnchorTop - compactAnchorTop);\n }\n\n private captureExpandedHeaderGeometry(header: BarTitleElement) {\n // Keep the largest observed expanded geometry for this header instance.\n // During a variant handoff Chromium can briefly report the compact box\n // before the child host class mutation is delivered; that transient must\n // not erase the flow reservation captured at the roomy page top.\n this.expandedHeaderHeight = Math.max(\n this.expandedHeaderHeight,\n header.getBoundingClientRect().height\n );\n this.measureHeaderTravel(header);\n }\n\n private setSpacerHeight(height: number) {\n if (!this.spacerEl) return;\n this.spacerEl.style.setProperty('--ds-shell-page-flow-spacer', `${Math.max(0, height)}px`);\n }\n\n private variantClass(variant: BarTitleVariant): string {\n return `bar-title-host--${variant}`;\n }\n\n private setStickyHeaderOffset(renderedVariant: BarTitleVariant) {\n this.stickyHeaderEl?.style.setProperty(\n '--ds-shell-page-sticky-offset',\n renderedVariant === 'expanded' &&\n this.effectiveScrollCompaction &&\n this.headerPresentation === 'auto' &&\n this.headerCapacity === 'roomy'\n ? `${-this.headerTravel}px`\n : '0px'\n );\n }\n\n private syncPageHeaderBlockSize() {\n if (this.desktopHeaderExternal) {\n this.el.style.setProperty('--ds-shell-page-sticky-header-block-size', '0px');\n return;\n }\n const renderedHeight = this.stickyHeaderEl?.getBoundingClientRect().height ?? 0;\n if (renderedHeight > 0) {\n this.el.style.setProperty('--ds-shell-page-sticky-header-block-size', `${renderedHeight}px`);\n } else {\n this.el.style.removeProperty('--ds-shell-page-sticky-header-block-size');\n }\n }\n\n private observePageHeaderGeometry() {\n this.pageHeaderResizeObserver?.disconnect();\n this.pageHeaderResizeObserver = null;\n this.syncPageHeaderBlockSize();\n\n if (!this.stickyHeaderEl || typeof ResizeObserver === 'undefined') return;\n this.pageHeaderResizeObserver = new ResizeObserver(() => {\n this.syncPageHeaderBlockSize();\n });\n this.pageHeaderResizeObserver.observe(this.stickyHeaderEl);\n }\n\n private syncRenderedHeaderGeometry(header: BarTitleElement) {\n const renderedVariant = this.effectiveVariant;\n if (!header.classList.contains(this.variantClass(renderedVariant))) return;\n\n this.syncPageHeaderBlockSize();\n\n // Update both flow-preservation pieces before reading layout. Otherwise a\n // reverse compact → expanded render can briefly contain the tall header and\n // the compact spacer together, giving browser scroll anchoring a transient\n // height change to compensate.\n this.setSpacerHeight(\n this.isScrollCompacted ? this.expandedHeaderHeight - this.compactHeaderHeight : 0\n );\n this.setStickyHeaderOffset(renderedVariant);\n\n if (renderedVariant === 'expanded' && !this.expandedGeometryFrozen) {\n this.captureExpandedHeaderGeometry(header);\n this.setStickyHeaderOffset(renderedVariant);\n }\n }\n\n private cancelHeaderGeometrySync() {\n if (this.headerGeometryFrame !== null) cancelAnimationFrame(this.headerGeometryFrame);\n this.headerGeometryFrame = null;\n }\n\n private scheduleHeaderGeometrySync(header: BarTitleElement) {\n this.cancelHeaderGeometrySync();\n let framesRemaining = ShellPage.MAX_HEADER_GEOMETRY_FRAMES;\n let framesElapsed = 0;\n const sync = () => {\n if (this.headerEl !== header) return;\n framesRemaining -= 1;\n framesElapsed += 1;\n // In WebKit a child's componentDidLoad can precede its assignment into\n // the parent's rendered slot. Revalidate after ShellApp has had a frame\n // to expose the actual content scroller.\n this.connectScrollRoot();\n this.syncRenderedHeaderGeometry(header);\n const geometryReady =\n this.effectiveVariant !== 'expanded' ||\n (this.expandedHeaderHeight > 0 && this.headerTravel > 0);\n if (\n (geometryReady && this.scrollRootResolved && framesElapsed >= 2) ||\n framesRemaining <= 0\n ) {\n this.headerGeometryFrame = null;\n return;\n }\n this.headerGeometryFrame = requestAnimationFrame(sync);\n };\n this.headerGeometryFrame = requestAnimationFrame(sync);\n }\n\n private cancelHeaderReveal() {\n if (this.headerRevealFrame !== null) cancelAnimationFrame(this.headerRevealFrame);\n this.headerRevealFrame = null;\n this.headerEl?.removeAttribute('data-shell-page-syncing');\n }\n\n private revealHeaderWhenSynced(header: BarTitleElement, variant: BarTitleVariant) {\n // Stencil normally re-renders within a frame or two of a prop change. Stop\n // polling at the cap, but fail closed: a stale variant must never paint.\n let framesRemaining = ShellPage.MAX_HEADER_REVEAL_FRAMES;\n const reveal = () => {\n if (this.headerEl !== header) {\n header.removeAttribute('data-shell-page-syncing');\n return;\n }\n framesRemaining -= 1;\n if (header.classList.contains(this.variantClass(variant))) {\n header.removeAttribute('data-shell-page-syncing');\n this.headerRevealFrame = null;\n return;\n }\n if (framesRemaining <= 0) {\n this.headerRevealFrame = null;\n return;\n }\n this.headerRevealFrame = requestAnimationFrame(reveal);\n };\n this.headerRevealFrame = requestAnimationFrame(reveal);\n }\n\n private syncHeaderVariant(concealUntilSynced = false) {\n const header = this.headerEl;\n if (!header) return;\n\n this.syncHeaderDividerInset();\n if (!this.headerContractResolved) {\n this.cancelHeaderReveal();\n header.setAttribute('data-shell-page-syncing', '');\n return;\n }\n\n const next = this.effectiveVariant;\n const renderedVariantIsStale = !header.classList.contains(this.variantClass(next));\n if (!renderedVariantIsStale) this.syncRenderedHeaderGeometry(header);\n if (renderedVariantIsStale && this.isScrollCompacted) {\n // Preserve the expanded flow before asking BarTitle to become compact.\n // This prevents the sentinel from moving back into view during the\n // parent/child render handoff and keeps the variant transition stable.\n this.setSpacerHeight(this.expandedHeaderHeight - this.compactHeaderHeight);\n this.setStickyHeaderOffset(next);\n }\n if (concealUntilSynced) {\n this.cancelHeaderReveal();\n header.setAttribute('data-shell-page-syncing', '');\n }\n if (header.variant !== next) {\n header.variant = next;\n // The child update and its MutationObserver callback can land in\n // different phases across engines. Poll the rendered class as the\n // authoritative handoff before committing sticky/spacer geometry.\n this.scheduleHeaderGeometrySync(header);\n }\n if (concealUntilSynced) {\n this.revealHeaderWhenSynced(header, next);\n }\n }\n\n private observeHeader(header: BarTitleElement | null) {\n this.cancelHeaderReveal();\n this.cancelHeaderGeometrySync();\n this.headerResizeObserver?.disconnect();\n this.headerResizeObserver = null;\n this.headerMutationObserver?.disconnect();\n this.headerMutationObserver = null;\n this.headerEl?.style.removeProperty('--ds-bar-title-divider-inset');\n this.headerEl = header;\n this.expandedHeaderHeight = 0;\n this.expandedGeometryFrozen = false;\n this.setHeaderTravel(0);\n this.setSpacerHeight(0);\n this.stickyHeaderEl?.style.setProperty('--ds-shell-page-sticky-offset', '0px');\n\n if (!header) return;\n if (header.classList.contains(this.variantClass('expanded'))) {\n this.captureExpandedHeaderGeometry(header);\n }\n if (typeof ResizeObserver !== 'undefined') {\n this.headerResizeObserver = new ResizeObserver(() => {\n this.syncRenderedHeaderGeometry(header);\n });\n this.headerResizeObserver.observe(header);\n }\n if (typeof MutationObserver !== 'undefined') {\n this.headerMutationObserver = new MutationObserver(() => {\n this.syncRenderedHeaderGeometry(header);\n });\n this.headerMutationObserver.observe(header, {\n attributes: true,\n attributeFilter: ['class'],\n childList: true,\n subtree: true,\n });\n }\n this.syncHeaderVariant(true);\n this.scheduleHeaderGeometrySync(header);\n }\n\n private handleHeaderSlotChange = (event: Event) => {\n if (this.responsiveMode === 'mobile') return;\n const slot = event.target as HTMLSlotElement;\n const header = slot\n .assignedElements()\n .find(element => element.tagName.toLowerCase() === 'ds-bar-title');\n this.observeHeader((header as BarTitleElement | undefined) ?? null);\n };\n\n render() {\n const mobile = this.responsiveMode === 'mobile';\n return (\n <Host\n role=\"main\"\n style={this.contentInsetStyles}\n class={{\n 'shell-page-host--inset-default': this.contentInset === 'default',\n 'shell-page-host--inset-none': this.contentInset === 'none',\n 'shell-page-host--block-start-inset-none': this.contentInsetBlockStart === 'none',\n 'shell-page-host--surface-primary': this.contentSurface === 'primary',\n 'shell-page-host--surface-secondary': this.contentSurface === 'secondary',\n 'shell-page-host--mobile': mobile,\n 'shell-page-host--desktop-header-shell-bar': this.desktopHeaderExternal,\n [`shell-page-host--header-${this.effectiveVariant}`]: true,\n }}\n >\n <div\n ref={el => {\n this.sentinelEl = el ?? null;\n }}\n class=\"shell-page__scroll-sentinel\"\n aria-hidden=\"true\"\n />\n <div\n ref={el => {\n this.stickyHeaderEl = el ?? null;\n }}\n class=\"shell-page__sticky-header\"\n >\n <div\n class=\"shell-page__desktop-header\"\n hidden={mobile}\n aria-hidden={mobile ? 'true' : undefined}\n inert={mobile ? true : undefined}\n >\n <slot name=\"header\" onSlotchange={this.handleHeaderSlotChange} />\n </div>\n <div\n class=\"shell-page__mobile-header\"\n hidden={!mobile}\n aria-hidden={!mobile ? 'true' : undefined}\n inert={!mobile ? true : undefined}\n >\n <slot name=\"mobile-header\" />\n </div>\n </div>\n <div\n ref={el => {\n this.spacerEl = el ?? null;\n }}\n class=\"shell-page__flow-spacer\"\n aria-hidden=\"true\"\n />\n <div class=\"shell-page__content\">\n <slot />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"wGAGgBA,EACdC,EACAC,EACAC,GAEA,GAAIF,IAAiB,OAAQ,OAAOA,EACpC,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