@lincyaw/aegis-ui 0.17.0 → 0.18.0

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.
Files changed (91) hide show
  1. package/dist/components/ui/AnchoredPopover.cjs +2 -0
  2. package/dist/components/ui/AnchoredPopover.cjs.map +1 -0
  3. package/dist/components/ui/AnchoredPopover.d.ts +35 -0
  4. package/dist/components/ui/AnchoredPopover.js +118 -0
  5. package/dist/components/ui/AnchoredPopover.js.map +1 -0
  6. package/dist/components/ui/Breadcrumb.cjs +1 -1
  7. package/dist/components/ui/Breadcrumb.cjs.map +1 -1
  8. package/dist/components/ui/Breadcrumb.d.ts +13 -1
  9. package/dist/components/ui/Breadcrumb.js +28 -19
  10. package/dist/components/ui/Breadcrumb.js.map +1 -1
  11. package/dist/components/ui/CodeBlock.cjs +2 -2
  12. package/dist/components/ui/CodeBlock.cjs.map +1 -1
  13. package/dist/components/ui/CodeBlock.d.ts +19 -1
  14. package/dist/components/ui/CodeBlock.js +86 -36
  15. package/dist/components/ui/CodeBlock.js.map +1 -1
  16. package/dist/components/ui/LineIcon.cjs +2 -0
  17. package/dist/components/ui/LineIcon.cjs.map +1 -0
  18. package/dist/components/ui/LineIcon.d.ts +15 -0
  19. package/dist/components/ui/LineIcon.js +33 -0
  20. package/dist/components/ui/LineIcon.js.map +1 -0
  21. package/dist/components/ui/PaneLayout.cjs +2 -0
  22. package/dist/components/ui/PaneLayout.cjs.map +1 -0
  23. package/dist/components/ui/PaneLayout.d.ts +33 -0
  24. package/dist/components/ui/PaneLayout.js +34 -0
  25. package/dist/components/ui/PaneLayout.js.map +1 -0
  26. package/dist/components/ui/Quote.cjs +2 -0
  27. package/dist/components/ui/Quote.cjs.map +1 -0
  28. package/dist/components/ui/Quote.d.ts +12 -0
  29. package/dist/components/ui/Quote.js +10 -0
  30. package/dist/components/ui/Quote.js.map +1 -0
  31. package/dist/components/ui/SectionDivider.cjs +1 -1
  32. package/dist/components/ui/SectionDivider.cjs.map +1 -1
  33. package/dist/components/ui/SectionDivider.d.ts +7 -1
  34. package/dist/components/ui/SectionDivider.js +9 -7
  35. package/dist/components/ui/SectionDivider.js.map +1 -1
  36. package/dist/components/ui/StatusDot.cjs.map +1 -1
  37. package/dist/components/ui/StatusDot.d.ts +3 -2
  38. package/dist/components/ui/StatusDot.js.map +1 -1
  39. package/dist/components/ui/Toolbar.cjs +1 -1
  40. package/dist/components/ui/Toolbar.cjs.map +1 -1
  41. package/dist/components/ui/Toolbar.d.ts +10 -1
  42. package/dist/components/ui/Toolbar.js +17 -7
  43. package/dist/components/ui/Toolbar.js.map +1 -1
  44. package/dist/components/ui/index.d.ts +9 -1
  45. package/dist/index.cjs +1 -1
  46. package/dist/index.d.ts +1 -1
  47. package/dist/index.js +343 -332
  48. package/dist/index.js.map +1 -1
  49. package/dist/layouts/PageWrapper.cjs +1 -1
  50. package/dist/layouts/PageWrapper.cjs.map +1 -1
  51. package/dist/layouts/PageWrapper.d.ts +7 -1
  52. package/dist/layouts/PageWrapper.js +13 -8
  53. package/dist/layouts/PageWrapper.js.map +1 -1
  54. package/dist/layouts/shell/AegisShell.cjs +1 -1
  55. package/dist/layouts/shell/AegisShell.cjs.map +1 -1
  56. package/dist/layouts/shell/AegisShell.d.ts +1 -1
  57. package/dist/layouts/shell/AegisShell.js +193 -150
  58. package/dist/layouts/shell/AegisShell.js.map +1 -1
  59. package/dist/layouts/shell/ShellMenuToggle.cjs +2 -0
  60. package/dist/layouts/shell/ShellMenuToggle.cjs.map +1 -0
  61. package/dist/layouts/shell/ShellMenuToggle.d.ts +8 -0
  62. package/dist/layouts/shell/ShellMenuToggle.js +23 -0
  63. package/dist/layouts/shell/ShellMenuToggle.js.map +1 -0
  64. package/dist/layouts/shell/Sidebar.cjs +1 -1
  65. package/dist/layouts/shell/Sidebar.cjs.map +1 -1
  66. package/dist/layouts/shell/Sidebar.d.ts +10 -4
  67. package/dist/layouts/shell/Sidebar.js +39 -32
  68. package/dist/layouts/shell/Sidebar.js.map +1 -1
  69. package/dist/layouts/shell/TopHeader.cjs +1 -1
  70. package/dist/layouts/shell/TopHeader.cjs.map +1 -1
  71. package/dist/layouts/shell/TopHeader.d.ts +14 -0
  72. package/dist/layouts/shell/TopHeader.js +127 -110
  73. package/dist/layouts/shell/TopHeader.js.map +1 -1
  74. package/dist/layouts/shell/buildRouteTree.cjs +1 -1
  75. package/dist/layouts/shell/buildRouteTree.cjs.map +1 -1
  76. package/dist/layouts/shell/buildRouteTree.js +5 -5
  77. package/dist/layouts/shell/buildRouteTree.js.map +1 -1
  78. package/dist/layouts/shell/index.d.ts +1 -0
  79. package/dist/layouts/shell/shellNavContext.cjs +2 -0
  80. package/dist/layouts/shell/shellNavContext.cjs.map +1 -0
  81. package/dist/layouts/shell/shellNavContext.d.ts +8 -0
  82. package/dist/layouts/shell/shellNavContext.js +6 -0
  83. package/dist/layouts/shell/shellNavContext.js.map +1 -0
  84. package/dist/layouts/shell/types.d.ts +21 -0
  85. package/dist/locale/strings.cjs +1 -1
  86. package/dist/locale/strings.cjs.map +1 -1
  87. package/dist/locale/strings.d.ts +2 -0
  88. package/dist/locale/strings.js +7 -5
  89. package/dist/locale/strings.js.map +1 -1
  90. package/dist/style.css +1 -1
  91. package/package.json +1 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");;/* empty css */function s({children:r,className:e,...a}){const p=e?`page-wrapper ${e}`:"page-wrapper";return t.jsx("div",{className:p,...a,children:r})}exports.PageWrapper=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime");;/* empty css */function i({children:e,bleed:r=!1,className:a,...s}){const t=["page-wrapper",r?"page-wrapper--bleed":"",a??""].filter(Boolean).join(" ");return p.jsx("div",{className:t,...s,children:e})}exports.PageWrapper=i;
2
2
  //# sourceMappingURL=PageWrapper.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageWrapper.cjs","sources":["../../src/layouts/PageWrapper.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport './PageWrapper.css';\n\nexport interface PageWrapperProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\n/**\n * Page root container. Owns `max-width`, `margin`, `padding`, and the\n * staggered fade-in animation. Sub-apps compose pages from this — they\n * must never redefine these properties.\n */\nexport function PageWrapper({\n children,\n className,\n ...rest\n}: PageWrapperProps) {\n const classes = className ? `page-wrapper ${className}` : 'page-wrapper';\n return (\n <div className={classes} {...rest}>\n {children}\n </div>\n );\n}\n"],"names":["PageWrapper","children","className","rest","classes"],"mappings":"sJAaO,SAASA,EAAY,CAC1B,SAAAC,EACA,UAAAC,EACA,GAAGC,CACL,EAAqB,CACnB,MAAMC,EAAUF,EAAY,gBAAgBA,CAAS,GAAK,eAC1D,aACG,MAAA,CAAI,UAAWE,EAAU,GAAGD,EAC1B,SAAAF,EACH,CAEJ"}
1
+ {"version":3,"file":"PageWrapper.cjs","sources":["../../src/layouts/PageWrapper.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport './PageWrapper.css';\n\nexport interface PageWrapperProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /**\n * Fills the view under the shell's header edge to edge, with no padding\n * and no gap between its blocks: a column of `Toolbar` bars over a\n * `PaneLayout` that takes the rest of the height.\n */\n bleed?: boolean;\n}\n\n/**\n * Page root container. Owns `max-width`, `margin`, `padding`, and the\n * staggered fade-in animation. Sub-apps compose pages from this — they\n * must never redefine these properties.\n */\nexport function PageWrapper({\n children,\n bleed = false,\n className,\n ...rest\n}: PageWrapperProps) {\n const classes = [\n 'page-wrapper',\n bleed ? 'page-wrapper--bleed' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div className={classes} {...rest}>\n {children}\n </div>\n );\n}\n"],"names":["PageWrapper","children","bleed","className","rest","classes"],"mappings":"sJAmBO,SAASA,EAAY,CAC1B,SAAAC,EACA,MAAAC,EAAQ,GACR,UAAAC,EACA,GAAGC,CACL,EAAqB,CACnB,MAAMC,EAAU,CACd,eACAH,EAAQ,sBAAwB,GAChCC,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EACX,aACG,MAAA,CAAI,UAAWE,EAAU,GAAGD,EAC1B,SAAAH,EACH,CAEJ"}
@@ -1,10 +1,16 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
2
  export interface PageWrapperProps extends HTMLAttributes<HTMLDivElement> {
3
3
  children: ReactNode;
4
+ /**
5
+ * Fills the view under the shell's header edge to edge, with no padding
6
+ * and no gap between its blocks: a column of `Toolbar` bars over a
7
+ * `PaneLayout` that takes the rest of the height.
8
+ */
9
+ bleed?: boolean;
4
10
  }
5
11
  /**
6
12
  * Page root container. Owns `max-width`, `margin`, `padding`, and the
7
13
  * staggered fade-in animation. Sub-apps compose pages from this — they
8
14
  * must never redefine these properties.
9
15
  */
10
- export declare function PageWrapper({ children, className, ...rest }: PageWrapperProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function PageWrapper({ children, bleed, className, ...rest }: PageWrapperProps): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,19 @@
1
- import { jsx as o } from "react/jsx-runtime";
1
+ import { jsx as s } from "react/jsx-runtime";
2
2
  /* empty css */
3
- function i({
4
- children: p,
5
- className: r,
6
- ...e
3
+ function l({
4
+ children: e,
5
+ bleed: r = !1,
6
+ className: a,
7
+ ...p
7
8
  }) {
8
- const a = r ? `page-wrapper ${r}` : "page-wrapper";
9
- return /* @__PURE__ */ o("div", { className: a, ...e, children: p });
9
+ const o = [
10
+ "page-wrapper",
11
+ r ? "page-wrapper--bleed" : "",
12
+ a ?? ""
13
+ ].filter(Boolean).join(" ");
14
+ return /* @__PURE__ */ s("div", { className: o, ...p, children: e });
10
15
  }
11
16
  export {
12
- i as PageWrapper
17
+ l as PageWrapper
13
18
  };
14
19
  //# sourceMappingURL=PageWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageWrapper.js","sources":["../../src/layouts/PageWrapper.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport './PageWrapper.css';\n\nexport interface PageWrapperProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\n/**\n * Page root container. Owns `max-width`, `margin`, `padding`, and the\n * staggered fade-in animation. Sub-apps compose pages from this — they\n * must never redefine these properties.\n */\nexport function PageWrapper({\n children,\n className,\n ...rest\n}: PageWrapperProps) {\n const classes = className ? `page-wrapper ${className}` : 'page-wrapper';\n return (\n <div className={classes} {...rest}>\n {children}\n </div>\n );\n}\n"],"names":["PageWrapper","children","className","rest","classes"],"mappings":";;AAaO,SAASA,EAAY;AAAA,EAC1B,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,GAAqB;AACnB,QAAMC,IAAUF,IAAY,gBAAgBA,CAAS,KAAK;AAC1D,2BACG,OAAA,EAAI,WAAWE,GAAU,GAAGD,GAC1B,UAAAF,GACH;AAEJ;"}
1
+ {"version":3,"file":"PageWrapper.js","sources":["../../src/layouts/PageWrapper.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport './PageWrapper.css';\n\nexport interface PageWrapperProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /**\n * Fills the view under the shell's header edge to edge, with no padding\n * and no gap between its blocks: a column of `Toolbar` bars over a\n * `PaneLayout` that takes the rest of the height.\n */\n bleed?: boolean;\n}\n\n/**\n * Page root container. Owns `max-width`, `margin`, `padding`, and the\n * staggered fade-in animation. Sub-apps compose pages from this — they\n * must never redefine these properties.\n */\nexport function PageWrapper({\n children,\n bleed = false,\n className,\n ...rest\n}: PageWrapperProps) {\n const classes = [\n 'page-wrapper',\n bleed ? 'page-wrapper--bleed' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div className={classes} {...rest}>\n {children}\n </div>\n );\n}\n"],"names":["PageWrapper","children","bleed","className","rest","classes"],"mappings":";;AAmBO,SAASA,EAAY;AAAA,EAC1B,UAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,GAAGC;AACL,GAAqB;AACnB,QAAMC,IAAU;AAAA,IACd;AAAA,IACAH,IAAQ,wBAAwB;AAAA,IAChCC,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AACX,2BACG,OAAA,EAAI,WAAWE,GAAU,GAAGD,GAC1B,UAAAH,GACH;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),se=require("react-dom"),d=require("react-router-dom"),te=require("../../components/ui/AmbientBackground.cjs"),re=require("../../components/ui/Button.cjs"),ne=require("../../hooks/useStorageItem.cjs"),oe=require("../../hooks/useWindowScrolled.cjs"),ie=require("../../theme/themeContext.cjs"),ae=require("../SkipLink.cjs");;/* empty css */const le=require("./BreadcrumbBar.cjs"),ue=require("./RouteErrorBoundary.cjs"),ce=require("./ShellCommandPalette.cjs"),de=require("./Sidebar.cjs"),he=require("./TopHeader.cjs"),ge=require("./activeAppContext.cjs"),S=require("./apps.cjs"),me=require("./buildRouteTree.cjs"),pe=require("./paths.cjs"),be=require("./useAgentPanel.cjs"),ve=require("./useAppCommands.cjs"),Se=require("./useMobileNav.cjs"),qe=require("./useShellUser.cjs"),Ae=require("./useWarnOnce.cjs"),xe=require("../../locale/useStrings.cjs"),fe=require("../../auth/useAuth.cjs"),je=require("../../commands/useCommands.cjs"),Ce=require("../../agent/core/AegisRuntimeProvider.cjs"),Re=require("./environments/EnvironmentProvider.cjs"),Pe=require("../../agent/ask/AskOverlay.cjs"),we="aegis-shell.sidebar-collapsed";function Be({brand:i,apps:t,rootRoutes:a=[],fallbackPath:l,notFoundElement:q,user:N,userMenu:_,headerCenter:O,headerActions:E,appSwitcher:H=!0,elevateHeaderOnScroll:W=!1,ambient:b,inboxPath:L,onAppSwitch:D,enableCommandPalette:A=!1,commandGroupOrder:U,agentPanel:x,agentRuntime:V}){const u=d.useLocation(),F=d.useNavigate(),f=xe.useStrings(),{pathname:c}=u,r=fe.useAuth(),j=n.useContext(ie.ThemeContext),[K,C]=ne.useStorageItem(we),h=K==="1",[R,z]=n.useState(null),Y=oe.useWindowScrolled(),G=W&&Y,P=n.useRef(null),J=qe.useShellUser(N,_,r),w=n.useMemo(()=>t.filter(p=>S.isAppVisible(p,r.status,r.user)),[t,r.status,r.user]),s=n.useMemo(()=>S.findActiveApp(t,c),[t,c]),Q=n.useMemo(()=>s?{id:s.id,basePath:pe.normalizeBasePath(s.basePath)}:null,[s]);n.useEffect(()=>{S.assertUniqueBasePaths(t)},[t]),ve.useAppCommands(w,s?.id);const B=je.useHasCommandProvider();Ae.useWarnOnce(A&&!B,"AegisShell: enableCommandPalette needs a <CommandProvider> above the shell; the command palette is not mounted.");const g=be.useAgentPanel(x),o=Se.useMobileNav(c),X=n.useCallback(()=>{C(h?"0":"1")},[C,h]),v=n.useMemo(()=>me.buildRouteTree({apps:t,rootRoutes:a,fallbackPath:l,notFoundElement:q,auth:r}),[t,a,l,q,r]),Z=d.useRoutes(v.routes),k=d.matchRoutes(v.routes,u),I=k?k[0].route:void 0,M=e.jsx(ue.RouteErrorBoundary,{resetKey:u.key,children:Z}),T=d.useHref("/"),y=T.startsWith("/")?T.replace(/\/+$/,""):void 0,$=n.useCallback(()=>{const p=typeof window<"u"?window:null;return{currentAppId:s?.id??null,route:{pathname:c,search:u.search,params:{},basename:y},breadcrumbs:[],theme:j?.resolved??"light",viewport:{width:p?.innerWidth??0,height:p?.innerHeight??0}}},[s,c,u.search,y,j]);if(I&&v.bareRoutes.has(I))return e.jsx("div",{children:M});const m=!!(s?.sidebar&&s.sidebar.length>0),ee=["aegis-shell",m&&!h?"aegis-shell--with-sidebar":"aegis-shell--no-sidebar",o.open?"aegis-shell--mobile-nav-open":"",g.open?"aegis-shell--with-agent-panel":"",b?"aegis-shell--ambient":""].filter(Boolean).join(" ");return e.jsx(Ce.AegisRuntimeProvider,{runtime:V,appId:s?.id??null,shellSnapshot:$,navigate:F,children:e.jsx(Re.EnvironmentProvider,{app:s,children:e.jsxs("div",{ref:o.shellRef,className:ee,children:[e.jsx(ae.SkipLink,{targetId:"aegis-main",targetRef:P}),b&&e.jsx(te.AmbientBackground,{variant:b}),e.jsx(he.TopHeader,{brand:i,apps:w,activeAppId:s?.id,onAppSwitch:D,appSwitcher:H,scrolled:G,user:J,headerCenter:O,headerActions:e.jsxs(e.Fragment,{children:[E,r.status==="unauthenticated"&&r.signIn&&e.jsx(re.Button,{onClick:()=>{r.signIn?.({})},children:f.signIn})]}),inboxPath:r.status==="authenticated"?L:void 0,onMobileMenuToggle:o.toggle,mobileMenuOpen:o.open,menuToggleRef:o.toggleRef,showMobileMenu:m,sidebarCollapsible:m,sidebarCollapsed:h,onSidebarToggle:X,inlineSlotRef:z,inlineSlotActive:!!s?.header,agentPanelOpen:g.open,onAgentPanelToggle:g.toggle}),m&&e.jsx(de.Sidebar,{activeApp:s,drawerRef:o.drawerRef}),e.jsx("button",{ref:o.backdropRef,type:"button",className:"aegis-shell__backdrop","aria-label":f.closeNavigation,tabIndex:-1,onClick:o.dismiss}),e.jsx("main",{id:"aegis-main",ref:P,tabIndex:-1,className:"aegis-shell__main",children:ke(s,Q,e.jsxs(e.Fragment,{children:[s?.header&&R&&se.createPortal(s.header,R),s?.breadcrumbBar!==!1&&e.jsx(le.BreadcrumbBar,{activeApp:s}),e.jsx("div",{className:"aegis-shell__content",children:M})]}))}),g.open&&e.jsx("div",{className:"aegis-shell__agent-panel",children:x}),e.jsx(Pe.AskOverlay,{}),A&&B&&e.jsx(ce.ShellCommandPalette,{groupOrder:U})]})})})}function ke(i,t,a){if(!i||!t)return a;const l=e.jsx(ge.ActiveAppContext.Provider,{value:t,children:a});return i.wrap?e.jsx(e.Fragment,{children:i.wrap(l)}):l}exports.AegisShell=Be;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),le=require("react-dom"),h=require("react-router-dom"),ue=require("../../components/ui/AmbientBackground.cjs"),ce=require("../../components/ui/Button.cjs"),de=require("../../hooks/useStorageItem.cjs"),ge=require("../../hooks/useWindowScrolled.cjs"),he=require("../../theme/themeContext.cjs"),me=require("../SkipLink.cjs");;/* empty css */const pe=require("./AppSwitcher.cjs"),be=require("./BreadcrumbBar.cjs"),ve=require("./RouteErrorBoundary.cjs"),xe=require("./ShellCommandPalette.cjs"),Se=require("./ShellNotificationBell.cjs"),D=require("./Sidebar.cjs"),m=require("./TopHeader.cjs"),fe=require("./activeAppContext.cjs"),j=require("./apps.cjs"),qe=require("./buildRouteTree.cjs"),Ae=require("./paths.cjs"),je=require("./shellNavContext.cjs"),Re=require("./useAgentPanel.cjs"),Ce=require("./useAppCommands.cjs"),we=require("./useMobileNav.cjs"),Be=require("./useShellUser.cjs"),Pe=require("./useWarnOnce.cjs"),Ie=require("../../locale/useStrings.cjs"),ke=require("../../auth/useAuth.cjs"),Me=require("../../commands/useCommands.cjs"),Ne=require("../../agent/core/AegisRuntimeProvider.cjs"),Te=require("./environments/EnvironmentProvider.cjs"),ye=require("../../agent/ask/AskOverlay.cjs"),_e="aegis-shell.sidebar-collapsed";function Oe({brand:a,apps:r,rootRoutes:u=[],fallbackPath:c,notFoundElement:R,user:V,userMenu:F,headerCenter:K,headerActions:C,appSwitcher:w=!0,elevateHeaderOnScroll:z=!1,ambient:x,inboxPath:S,onAppSwitch:B,enableCommandPalette:P=!1,commandGroupOrder:Y,agentPanel:I,agentRuntime:G,chrome:J="header"}){const d=h.useLocation(),Q=h.useNavigate(),k=Ie.useStrings(),{pathname:g}=d,n=ke.useAuth(),M=o.useContext(he.ThemeContext),[X,N]=de.useStorageItem(_e),p=X==="1",[T,Z]=o.useState(null),$=ge.useWindowScrolled(),ee=z&&$,y=o.useRef(null),f=Be.useShellUser(V,F,n),q=o.useMemo(()=>r.filter(v=>j.isAppVisible(v,n.status,n.user)),[r,n.status,n.user]),s=o.useMemo(()=>j.findActiveApp(r,g),[r,g]),se=o.useMemo(()=>s?{id:s.id,basePath:Ae.normalizeBasePath(s.basePath)}:null,[s]);o.useEffect(()=>{j.assertUniqueBasePaths(r)},[r]),Ce.useAppCommands(q,s?.id);const _=Me.useHasCommandProvider();Pe.useWarnOnce(P&&!_,"AegisShell: enableCommandPalette needs a <CommandProvider> above the shell; the command palette is not mounted.");const i=Re.useAgentPanel(I),t=we.useMobileNav(g),l=(s?.chrome??J)==="sidebar",te=o.useMemo(()=>l?{open:t.open,toggle:t.toggle,toggleRef:t.toggleRef}:null,[l,t.open,t.toggle,t.toggleRef]),ne=o.useCallback(()=>{N(p?"0":"1")},[N,p]),A=o.useMemo(()=>qe.buildRouteTree({apps:r,rootRoutes:u,fallbackPath:c,notFoundElement:R,auth:n}),[r,u,c,R,n]),re=h.useRoutes(A.routes),O=h.matchRoutes(A.routes,d),E=O?O[0].route:void 0,H=e.jsx(ve.RouteErrorBoundary,{resetKey:d.key,children:re}),W=h.useHref("/"),L=W.startsWith("/")?W.replace(/\/+$/,""):void 0,oe=o.useCallback(()=>{const v=typeof window<"u"?window:null;return{currentAppId:s?.id??null,route:{pathname:g,search:d.search,params:{},basename:L},breadcrumbs:[],theme:M?.resolved??"light",viewport:{width:v?.innerWidth??0,height:v?.innerHeight??0}}},[s,g,d.search,L,M]);if(E&&A.bareRoutes.has(E))return e.jsx("div",{children:H});const b=!!(s?.sidebar&&s.sidebar.length>0),ie=l||b&&!p,U=n.status==="unauthenticated"&&n.signIn&&e.jsx(ce.Button,{onClick:()=>{n.signIn?.({})},children:k.signIn}),ae=["aegis-shell",l?"aegis-shell--chrome-sidebar":"",ie?"aegis-shell--with-sidebar":"aegis-shell--no-sidebar",t.open?"aegis-shell--mobile-nav-open":"",i.open?"aegis-shell--with-agent-panel":"",x?"aegis-shell--ambient":""].filter(Boolean).join(" ");return e.jsx(Ne.AegisRuntimeProvider,{runtime:G,appId:s?.id??null,shellSnapshot:oe,navigate:Q,children:e.jsx(Te.EnvironmentProvider,{app:s,children:e.jsxs("div",{ref:t.shellRef,className:ae,children:[e.jsx(me.SkipLink,{targetId:"aegis-main",targetRef:y}),x&&e.jsx(ue.AmbientBackground,{variant:x}),!l&&e.jsx(m.TopHeader,{brand:a,apps:q,activeAppId:s?.id,onAppSwitch:B,appSwitcher:w,scrolled:ee,user:f,headerCenter:K,headerActions:e.jsxs(e.Fragment,{children:[C,U]}),inboxPath:n.status==="authenticated"?S:void 0,onMobileMenuToggle:t.toggle,mobileMenuOpen:t.open,menuToggleRef:t.toggleRef,showMobileMenu:b,sidebarCollapsible:b,sidebarCollapsed:p,onSidebarToggle:ne,inlineSlotRef:Z,inlineSlotActive:!!s?.header,agentPanelOpen:i.open,onAgentPanelToggle:i.toggle}),l?e.jsx(D.Sidebar,{activeApp:s,drawerRef:t.drawerRef,top:e.jsxs(e.Fragment,{children:[w?e.jsx(pe.AppSwitcher,{apps:q,activeAppId:s?.id,onAppSwitch:B}):null,e.jsx(m.ShellBrand,{brand:a})]}),footer:e.jsxs(e.Fragment,{children:[e.jsx(m.ActiveEnvironmentSwitcher,{}),C,U,n.status==="authenticated"&&S&&e.jsx(Se.ShellNotificationBell,{inboxPath:S}),f&&e.jsx(m.UserMenu,{user:f,align:"left"}),i.toggle&&e.jsx(m.AgentPanelToggle,{open:i.open,onToggle:i.toggle})]})}):b&&e.jsx(D.Sidebar,{activeApp:s,drawerRef:t.drawerRef}),e.jsx("button",{ref:t.backdropRef,type:"button",className:"aegis-shell__backdrop","aria-label":k.closeNavigation,tabIndex:-1,onClick:t.dismiss}),e.jsx("main",{id:"aegis-main",ref:y,tabIndex:-1,className:"aegis-shell__main",children:Ee(s,se,e.jsxs(je.ShellNavContext.Provider,{value:te,children:[s?.header&&T&&le.createPortal(s.header,T),s?.breadcrumbBar!==!1&&e.jsx(be.BreadcrumbBar,{activeApp:s}),e.jsx("div",{className:"aegis-shell__content",children:H})]}))}),i.open&&e.jsx("div",{className:"aegis-shell__agent-panel",children:I}),e.jsx(ye.AskOverlay,{}),P&&_&&e.jsx(xe.ShellCommandPalette,{groupOrder:Y})]})})})}function Ee(a,r,u){if(!a||!r)return u;const c=e.jsx(fe.ActiveAppContext.Provider,{value:r,children:u});return a.wrap?e.jsx(e.Fragment,{children:a.wrap(c)}):c}exports.AegisShell=Oe;
2
2
  //# sourceMappingURL=AegisShell.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AegisShell.cjs","sources":["../../../src/layouts/shell/AegisShell.tsx"],"sourcesContent":["import {\n type ReactElement,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport {\n matchRoutes,\n useHref,\n useLocation,\n useNavigate,\n useRoutes,\n} from 'react-router-dom';\n\nimport {\n AegisRuntimeProvider,\n AskOverlay,\n type ShellSnapshot,\n} from '../../agent';\nimport { useAuth } from '../../auth';\nimport { useHasCommandProvider } from '../../commands';\nimport { AmbientBackground } from '../../components/ui/AmbientBackground';\nimport { Button } from '../../components/ui/Button';\nimport { useStorageItem } from '../../hooks/useStorageItem';\nimport { useWindowScrolled } from '../../hooks/useWindowScrolled';\nimport { useStrings } from '../../locale';\nimport { ThemeContext } from '../../theme/themeContext';\nimport { SkipLink } from '../SkipLink';\nimport './AegisShell.css';\nimport { BreadcrumbBar } from './BreadcrumbBar';\nimport { RouteErrorBoundary } from './RouteErrorBoundary';\nimport { ShellCommandPalette } from './ShellCommandPalette';\nimport { Sidebar } from './Sidebar';\nimport { TopHeader } from './TopHeader';\nimport { ActiveAppContext } from './activeAppContext';\nimport { assertUniqueBasePaths, findActiveApp, isAppVisible } from './apps';\nimport { buildRouteTree } from './buildRouteTree';\nimport { EnvironmentProvider } from './environments';\nimport { normalizeBasePath } from './paths';\nimport type { AegisApp, AegisShellProps } from './types';\nimport { useAgentPanel } from './useAgentPanel';\nimport { useAppCommands } from './useAppCommands';\nimport { useMobileNav } from './useMobileNav';\nimport { useShellUser } from './useShellUser';\nimport { useWarnOnce } from './useWarnOnce';\n\nconst SIDEBAR_COLLAPSED_KEY = 'aegis-shell.sidebar-collapsed';\n\n/**\n * Top-level layout: top header, two-section sidebar, breadcrumb bar, and\n * a routed content area composed from `apps`.\n *\n * Each app's `routes` is mounted under its `basePath`. The shell renders\n * the chrome around every app — apps themselves only render page content\n * inside a `<PageWrapper>` (the shell wraps the outlet automatically). A\n * page that throws while rendering shows an error with a retry in the page\n * area; the chrome stays up.\n */\nexport function AegisShell({\n brand,\n apps,\n rootRoutes = [],\n fallbackPath,\n notFoundElement,\n user,\n userMenu,\n headerCenter,\n headerActions,\n appSwitcher = true,\n elevateHeaderOnScroll = false,\n ambient,\n inboxPath,\n onAppSwitch,\n enableCommandPalette = false,\n commandGroupOrder,\n agentPanel,\n agentRuntime,\n}: AegisShellProps): ReactElement {\n const location = useLocation();\n const navigate = useNavigate();\n const strings = useStrings();\n const { pathname } = location;\n const auth = useAuth();\n const themeCtx = useContext(ThemeContext);\n const [sidebarCollapsedValue, setSidebarCollapsedValue] = useStorageItem(\n SIDEBAR_COLLAPSED_KEY,\n );\n const sidebarCollapsed = sidebarCollapsedValue === '1';\n const [inlineSlot, setInlineSlot] = useState<HTMLDivElement | null>(null);\n const windowScrolled = useWindowScrolled();\n const headerScrolled = elevateHeaderOnScroll && windowScrolled;\n const mainRef = useRef<HTMLElement>(null);\n\n const resolvedUser = useShellUser(user, userMenu, auth);\n\n const visibleApps = useMemo(\n () => apps.filter((app) => isAppVisible(app, auth.status, auth.user)),\n [apps, auth.status, auth.user],\n );\n\n const activeApp = useMemo(\n () => findActiveApp(apps, pathname),\n [apps, pathname],\n );\n\n const activeAppValue = useMemo(\n () =>\n activeApp\n ? { id: activeApp.id, basePath: normalizeBasePath(activeApp.basePath) }\n : null,\n [activeApp],\n );\n\n useEffect(() => {\n assertUniqueBasePaths(apps);\n }, [apps]);\n\n useAppCommands(visibleApps, activeApp?.id);\n const hasCommandProvider = useHasCommandProvider();\n useWarnOnce(\n enableCommandPalette && !hasCommandProvider,\n 'AegisShell: enableCommandPalette needs a <CommandProvider> above the shell; the command palette is not mounted.',\n );\n\n const agent = useAgentPanel(agentPanel);\n const mobileNav = useMobileNav(pathname);\n\n const toggleSidebar = useCallback(() => {\n setSidebarCollapsedValue(sidebarCollapsed ? '0' : '1');\n }, [setSidebarCollapsedValue, sidebarCollapsed]);\n\n const routeTree = useMemo(\n () =>\n buildRouteTree({ apps, rootRoutes, fallbackPath, notFoundElement, auth }),\n [apps, rootRoutes, fallbackPath, notFoundElement, auth],\n );\n const element = useRoutes(routeTree.routes);\n const matches = matchRoutes(routeTree.routes, location);\n const topRoute = matches ? matches[0].route : undefined;\n const page = (\n <RouteErrorBoundary resetKey={location.key}>{element}</RouteErrorBoundary>\n );\n\n const rootHref = useHref('/');\n // A hash router's href is not a path prefix, so it reports none.\n const basename = rootHref.startsWith('/')\n ? rootHref.replace(/\\/+$/, '')\n : undefined;\n\n const shellSnapshot = useCallback((): ShellSnapshot => {\n const w = typeof window !== 'undefined' ? window : null;\n return {\n currentAppId: activeApp?.id ?? null,\n route: {\n pathname,\n search: location.search,\n params: {},\n basename,\n },\n breadcrumbs: [],\n theme: themeCtx?.resolved ?? 'light',\n viewport: {\n width: w?.innerWidth ?? 0,\n height: w?.innerHeight ?? 0,\n },\n };\n }, [activeApp, pathname, location.search, basename, themeCtx]);\n\n // Bare routes (e.g. /login) render without the shell chrome.\n if (topRoute && routeTree.bareRoutes.has(topRoute)) {\n return <div>{page}</div>;\n }\n\n const appHasSidebar = Boolean(\n activeApp?.sidebar && activeApp.sidebar.length > 0,\n );\n const hasSidebar = appHasSidebar && !sidebarCollapsed;\n\n const shellClass = [\n 'aegis-shell',\n hasSidebar ? 'aegis-shell--with-sidebar' : 'aegis-shell--no-sidebar',\n mobileNav.open ? 'aegis-shell--mobile-nav-open' : '',\n agent.open ? 'aegis-shell--with-agent-panel' : '',\n ambient ? 'aegis-shell--ambient' : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <AegisRuntimeProvider\n runtime={agentRuntime}\n appId={activeApp?.id ?? null}\n shellSnapshot={shellSnapshot}\n navigate={navigate}\n >\n <EnvironmentProvider app={activeApp}>\n <div ref={mobileNav.shellRef} className={shellClass}>\n <SkipLink targetId=\"aegis-main\" targetRef={mainRef} />\n {ambient && <AmbientBackground variant={ambient} />}\n <TopHeader\n brand={brand}\n apps={visibleApps}\n activeAppId={activeApp?.id}\n onAppSwitch={onAppSwitch}\n appSwitcher={appSwitcher}\n scrolled={headerScrolled}\n user={resolvedUser}\n headerCenter={headerCenter}\n headerActions={\n <>\n {headerActions}\n {auth.status === 'unauthenticated' && auth.signIn && (\n <Button\n onClick={() => {\n void auth.signIn?.({});\n }}\n >\n {strings.signIn}\n </Button>\n )}\n </>\n }\n inboxPath={auth.status === 'authenticated' ? inboxPath : undefined}\n onMobileMenuToggle={mobileNav.toggle}\n mobileMenuOpen={mobileNav.open}\n menuToggleRef={mobileNav.toggleRef}\n showMobileMenu={appHasSidebar}\n sidebarCollapsible={appHasSidebar}\n sidebarCollapsed={sidebarCollapsed}\n onSidebarToggle={toggleSidebar}\n inlineSlotRef={setInlineSlot}\n inlineSlotActive={Boolean(activeApp?.header)}\n agentPanelOpen={agent.open}\n onAgentPanelToggle={agent.toggle}\n />\n {appHasSidebar && (\n <Sidebar activeApp={activeApp} drawerRef={mobileNav.drawerRef} />\n )}\n <button\n ref={mobileNav.backdropRef}\n type=\"button\"\n className=\"aegis-shell__backdrop\"\n aria-label={strings.closeNavigation}\n tabIndex={-1}\n onClick={mobileNav.dismiss}\n />\n <main\n id=\"aegis-main\"\n ref={mainRef}\n tabIndex={-1}\n className=\"aegis-shell__main\"\n >\n {renderAppRegion(\n activeApp,\n activeAppValue,\n <>\n {activeApp?.header &&\n inlineSlot &&\n createPortal(activeApp.header, inlineSlot)}\n {activeApp?.breadcrumbBar !== false && (\n <BreadcrumbBar activeApp={activeApp} />\n )}\n <div className=\"aegis-shell__content\">{page}</div>\n </>,\n )}\n </main>\n {agent.open && (\n <div className=\"aegis-shell__agent-panel\">{agentPanel}</div>\n )}\n <AskOverlay />\n {enableCommandPalette && hasCommandProvider && (\n <ShellCommandPalette groupOrder={commandGroupOrder} />\n )}\n </div>\n </EnvironmentProvider>\n </AegisRuntimeProvider>\n );\n}\n\nfunction renderAppRegion(\n app: AegisApp | undefined,\n appValue: { id: string; basePath: string } | null,\n children: ReactElement,\n): ReactElement {\n if (!app || !appValue) {\n return children;\n }\n const inner = (\n <ActiveAppContext.Provider value={appValue}>\n {children}\n </ActiveAppContext.Provider>\n );\n return app.wrap ? <>{app.wrap(inner)}</> : inner;\n}\n"],"names":["SIDEBAR_COLLAPSED_KEY","AegisShell","brand","apps","rootRoutes","fallbackPath","notFoundElement","user","userMenu","headerCenter","headerActions","appSwitcher","elevateHeaderOnScroll","ambient","inboxPath","onAppSwitch","enableCommandPalette","commandGroupOrder","agentPanel","agentRuntime","location","useLocation","navigate","useNavigate","strings","useStrings","pathname","auth","useAuth","themeCtx","useContext","ThemeContext","sidebarCollapsedValue","setSidebarCollapsedValue","useStorageItem","sidebarCollapsed","inlineSlot","setInlineSlot","useState","windowScrolled","useWindowScrolled","headerScrolled","mainRef","useRef","resolvedUser","useShellUser","visibleApps","useMemo","app","isAppVisible","activeApp","findActiveApp","activeAppValue","normalizeBasePath","useEffect","assertUniqueBasePaths","useAppCommands","hasCommandProvider","useHasCommandProvider","useWarnOnce","agent","useAgentPanel","mobileNav","useMobileNav","toggleSidebar","useCallback","routeTree","buildRouteTree","element","useRoutes","matches","matchRoutes","topRoute","page","jsx","RouteErrorBoundary","rootHref","useHref","basename","shellSnapshot","w","appHasSidebar","shellClass","AegisRuntimeProvider","EnvironmentProvider","jsxs","SkipLink","AmbientBackground","TopHeader","Fragment","Button","Sidebar","renderAppRegion","createPortal","BreadcrumbBar","AskOverlay","ShellCommandPalette","appValue","children","inner","ActiveAppContext"],"mappings":"itCAoDMA,GAAwB,gCAYvB,SAASC,GAAW,CACzB,MAAAC,EAAA,KACAC,EACA,WAAAC,EAAa,CAAA,EACb,aAAAC,EACA,gBAAAC,EACA,KAAAC,EACA,SAAAC,EACA,aAAAC,EACA,cAAAC,EACA,YAAAC,EAAc,GACd,sBAAAC,EAAwB,GACxB,QAAAC,EACA,UAAAC,EACA,YAAAC,EACA,qBAAAC,EAAuB,GACvB,kBAAAC,EACA,WAAAC,EACA,aAAAC,CACF,EAAkC,CAChC,MAAMC,EAAWC,EAAAA,YAAA,EACXC,EAAWC,EAAAA,YAAA,EACXC,EAAUC,GAAAA,WAAA,EACV,CAAE,SAAAC,GAAaN,EACfO,EAAOC,GAAAA,QAAA,EACPC,EAAWC,EAAAA,WAAWC,eAAY,EAClC,CAACC,EAAuBC,CAAwB,EAAIC,GAAAA,eACxDlC,EAAA,EAEImC,EAAmBH,IAA0B,IAC7C,CAACI,EAAYC,CAAa,EAAIC,EAAAA,SAAgC,IAAI,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5C,EAAsB,EAEvCwB,EAAAA,IAAC,MAAA,CAAI,UAAU,uBAAwB,SAAAD,CAAA,CAAK,CAAA,CAAA,CAC9C,CAAA,CACF,CAAA,EAEDb,EAAM,MACLc,EAAAA,IAAC,MAAA,CAAI,UAAU,2BAA4B,SAAAxD,EAAW,QAEvD6E,GAAAA,WAAA,EAAW,EACX/E,GAAwByC,GACvBiB,EAAAA,IAACsB,GAAAA,oBAAA,CAAoB,WAAY/E,CAAA,CAAmB,CAAA,CAAA,CAExD,CAAA,CACF,CAAA,CAAA,CAGN,CAEA,SAAS2E,GACP5C,EACAiD,EACAC,EACc,CACd,GAAI,CAAClD,GAAO,CAACiD,EACX,OAAOC,EAET,MAAMC,EACJzB,EAAAA,IAAC0B,oBAAiB,SAAjB,CAA0B,MAAOH,EAC/B,SAAAC,EACH,EAEF,OAAOlD,EAAI,KAAO0B,EAAAA,IAAAe,WAAA,CAAG,WAAI,KAAKU,CAAK,EAAE,EAAMA,CAC7C"}
1
+ {"version":3,"file":"AegisShell.cjs","sources":["../../../src/layouts/shell/AegisShell.tsx"],"sourcesContent":["import {\n type ReactElement,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport {\n matchRoutes,\n useHref,\n useLocation,\n useNavigate,\n useRoutes,\n} from 'react-router-dom';\n\nimport {\n AegisRuntimeProvider,\n AskOverlay,\n type ShellSnapshot,\n} from '../../agent';\nimport { useAuth } from '../../auth';\nimport { useHasCommandProvider } from '../../commands';\nimport { AmbientBackground } from '../../components/ui/AmbientBackground';\nimport { Button } from '../../components/ui/Button';\nimport { useStorageItem } from '../../hooks/useStorageItem';\nimport { useWindowScrolled } from '../../hooks/useWindowScrolled';\nimport { useStrings } from '../../locale';\nimport { ThemeContext } from '../../theme/themeContext';\nimport { SkipLink } from '../SkipLink';\nimport './AegisShell.css';\nimport { AppSwitcher } from './AppSwitcher';\nimport { BreadcrumbBar } from './BreadcrumbBar';\nimport { RouteErrorBoundary } from './RouteErrorBoundary';\nimport { ShellCommandPalette } from './ShellCommandPalette';\nimport { ShellNotificationBell } from './ShellNotificationBell';\nimport { Sidebar } from './Sidebar';\nimport {\n ActiveEnvironmentSwitcher,\n AgentPanelToggle,\n ShellBrand,\n TopHeader,\n UserMenu,\n} from './TopHeader';\nimport { ActiveAppContext } from './activeAppContext';\nimport { assertUniqueBasePaths, findActiveApp, isAppVisible } from './apps';\nimport { buildRouteTree } from './buildRouteTree';\nimport { EnvironmentProvider } from './environments';\nimport { normalizeBasePath } from './paths';\nimport { ShellNavContext, type ShellNavContextValue } from './shellNavContext';\nimport type { AegisApp, AegisShellProps } from './types';\nimport { useAgentPanel } from './useAgentPanel';\nimport { useAppCommands } from './useAppCommands';\nimport { useMobileNav } from './useMobileNav';\nimport { useShellUser } from './useShellUser';\nimport { useWarnOnce } from './useWarnOnce';\n\nconst SIDEBAR_COLLAPSED_KEY = 'aegis-shell.sidebar-collapsed';\n\n/**\n * Top-level layout: top header, two-section sidebar, breadcrumb bar, and\n * a routed content area composed from `apps`.\n *\n * Each app's `routes` is mounted under its `basePath`. The shell renders\n * the chrome around every app — apps themselves only render page content\n * inside a `<PageWrapper>` (the shell wraps the outlet automatically). A\n * page that throws while rendering shows an error with a retry in the page\n * area; the chrome stays up.\n */\nexport function AegisShell({\n brand,\n apps,\n rootRoutes = [],\n fallbackPath,\n notFoundElement,\n user,\n userMenu,\n headerCenter,\n headerActions,\n appSwitcher = true,\n elevateHeaderOnScroll = false,\n ambient,\n inboxPath,\n onAppSwitch,\n enableCommandPalette = false,\n commandGroupOrder,\n agentPanel,\n agentRuntime,\n chrome = 'header',\n}: AegisShellProps): ReactElement {\n const location = useLocation();\n const navigate = useNavigate();\n const strings = useStrings();\n const { pathname } = location;\n const auth = useAuth();\n const themeCtx = useContext(ThemeContext);\n const [sidebarCollapsedValue, setSidebarCollapsedValue] = useStorageItem(\n SIDEBAR_COLLAPSED_KEY,\n );\n const sidebarCollapsed = sidebarCollapsedValue === '1';\n const [inlineSlot, setInlineSlot] = useState<HTMLDivElement | null>(null);\n const windowScrolled = useWindowScrolled();\n const headerScrolled = elevateHeaderOnScroll && windowScrolled;\n const mainRef = useRef<HTMLElement>(null);\n\n const resolvedUser = useShellUser(user, userMenu, auth);\n\n const visibleApps = useMemo(\n () => apps.filter((app) => isAppVisible(app, auth.status, auth.user)),\n [apps, auth.status, auth.user],\n );\n\n const activeApp = useMemo(\n () => findActiveApp(apps, pathname),\n [apps, pathname],\n );\n\n const activeAppValue = useMemo(\n () =>\n activeApp\n ? { id: activeApp.id, basePath: normalizeBasePath(activeApp.basePath) }\n : null,\n [activeApp],\n );\n\n useEffect(() => {\n assertUniqueBasePaths(apps);\n }, [apps]);\n\n useAppCommands(visibleApps, activeApp?.id);\n const hasCommandProvider = useHasCommandProvider();\n useWarnOnce(\n enableCommandPalette && !hasCommandProvider,\n 'AegisShell: enableCommandPalette needs a <CommandProvider> above the shell; the command palette is not mounted.',\n );\n\n const agent = useAgentPanel(agentPanel);\n const mobileNav = useMobileNav(pathname);\n\n const sidebarChrome = (activeApp?.chrome ?? chrome) === 'sidebar';\n const navValue = useMemo<ShellNavContextValue | null>(\n () =>\n sidebarChrome\n ? {\n open: mobileNav.open,\n toggle: mobileNav.toggle,\n toggleRef: mobileNav.toggleRef,\n }\n : null,\n [sidebarChrome, mobileNav.open, mobileNav.toggle, mobileNav.toggleRef],\n );\n\n const toggleSidebar = useCallback(() => {\n setSidebarCollapsedValue(sidebarCollapsed ? '0' : '1');\n }, [setSidebarCollapsedValue, sidebarCollapsed]);\n\n const routeTree = useMemo(\n () =>\n buildRouteTree({ apps, rootRoutes, fallbackPath, notFoundElement, auth }),\n [apps, rootRoutes, fallbackPath, notFoundElement, auth],\n );\n const element = useRoutes(routeTree.routes);\n const matches = matchRoutes(routeTree.routes, location);\n const topRoute = matches ? matches[0].route : undefined;\n const page = (\n <RouteErrorBoundary resetKey={location.key}>{element}</RouteErrorBoundary>\n );\n\n const rootHref = useHref('/');\n // A hash router's href is not a path prefix, so it reports none.\n const basename = rootHref.startsWith('/')\n ? rootHref.replace(/\\/+$/, '')\n : undefined;\n\n const shellSnapshot = useCallback((): ShellSnapshot => {\n const w = typeof window !== 'undefined' ? window : null;\n return {\n currentAppId: activeApp?.id ?? null,\n route: {\n pathname,\n search: location.search,\n params: {},\n basename,\n },\n breadcrumbs: [],\n theme: themeCtx?.resolved ?? 'light',\n viewport: {\n width: w?.innerWidth ?? 0,\n height: w?.innerHeight ?? 0,\n },\n };\n }, [activeApp, pathname, location.search, basename, themeCtx]);\n\n // Bare routes (e.g. /login) render without the shell chrome.\n if (topRoute && routeTree.bareRoutes.has(topRoute)) {\n return <div>{page}</div>;\n }\n\n const appHasSidebar = Boolean(\n activeApp?.sidebar && activeApp.sidebar.length > 0,\n );\n const hasSidebar = sidebarChrome || (appHasSidebar && !sidebarCollapsed);\n\n const signInButton = auth.status === 'unauthenticated' && auth.signIn && (\n <Button\n onClick={() => {\n void auth.signIn?.({});\n }}\n >\n {strings.signIn}\n </Button>\n );\n\n const shellClass = [\n 'aegis-shell',\n sidebarChrome ? 'aegis-shell--chrome-sidebar' : '',\n hasSidebar ? 'aegis-shell--with-sidebar' : 'aegis-shell--no-sidebar',\n mobileNav.open ? 'aegis-shell--mobile-nav-open' : '',\n agent.open ? 'aegis-shell--with-agent-panel' : '',\n ambient ? 'aegis-shell--ambient' : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <AegisRuntimeProvider\n runtime={agentRuntime}\n appId={activeApp?.id ?? null}\n shellSnapshot={shellSnapshot}\n navigate={navigate}\n >\n <EnvironmentProvider app={activeApp}>\n <div ref={mobileNav.shellRef} className={shellClass}>\n <SkipLink targetId=\"aegis-main\" targetRef={mainRef} />\n {ambient && <AmbientBackground variant={ambient} />}\n {!sidebarChrome && (\n <TopHeader\n brand={brand}\n apps={visibleApps}\n activeAppId={activeApp?.id}\n onAppSwitch={onAppSwitch}\n appSwitcher={appSwitcher}\n scrolled={headerScrolled}\n user={resolvedUser}\n headerCenter={headerCenter}\n headerActions={\n <>\n {headerActions}\n {signInButton}\n </>\n }\n inboxPath={\n auth.status === 'authenticated' ? inboxPath : undefined\n }\n onMobileMenuToggle={mobileNav.toggle}\n mobileMenuOpen={mobileNav.open}\n menuToggleRef={mobileNav.toggleRef}\n showMobileMenu={appHasSidebar}\n sidebarCollapsible={appHasSidebar}\n sidebarCollapsed={sidebarCollapsed}\n onSidebarToggle={toggleSidebar}\n inlineSlotRef={setInlineSlot}\n inlineSlotActive={Boolean(activeApp?.header)}\n agentPanelOpen={agent.open}\n onAgentPanelToggle={agent.toggle}\n />\n )}\n {sidebarChrome ? (\n <Sidebar\n activeApp={activeApp}\n drawerRef={mobileNav.drawerRef}\n top={\n <>\n {appSwitcher ? (\n <AppSwitcher\n apps={visibleApps}\n activeAppId={activeApp?.id}\n onAppSwitch={onAppSwitch}\n />\n ) : null}\n <ShellBrand brand={brand} />\n </>\n }\n footer={\n <>\n <ActiveEnvironmentSwitcher />\n {headerActions}\n {signInButton}\n {auth.status === 'authenticated' && inboxPath && (\n <ShellNotificationBell inboxPath={inboxPath} />\n )}\n {resolvedUser && (\n <UserMenu user={resolvedUser} align=\"left\" />\n )}\n {agent.toggle && (\n <AgentPanelToggle\n open={agent.open}\n onToggle={agent.toggle}\n />\n )}\n </>\n }\n />\n ) : (\n appHasSidebar && (\n <Sidebar activeApp={activeApp} drawerRef={mobileNav.drawerRef} />\n )\n )}\n <button\n ref={mobileNav.backdropRef}\n type=\"button\"\n className=\"aegis-shell__backdrop\"\n aria-label={strings.closeNavigation}\n tabIndex={-1}\n onClick={mobileNav.dismiss}\n />\n <main\n id=\"aegis-main\"\n ref={mainRef}\n tabIndex={-1}\n className=\"aegis-shell__main\"\n >\n {renderAppRegion(\n activeApp,\n activeAppValue,\n <ShellNavContext.Provider value={navValue}>\n {activeApp?.header &&\n inlineSlot &&\n createPortal(activeApp.header, inlineSlot)}\n {activeApp?.breadcrumbBar !== false && (\n <BreadcrumbBar activeApp={activeApp} />\n )}\n <div className=\"aegis-shell__content\">{page}</div>\n </ShellNavContext.Provider>,\n )}\n </main>\n {agent.open && (\n <div className=\"aegis-shell__agent-panel\">{agentPanel}</div>\n )}\n <AskOverlay />\n {enableCommandPalette && hasCommandProvider && (\n <ShellCommandPalette groupOrder={commandGroupOrder} />\n )}\n </div>\n </EnvironmentProvider>\n </AegisRuntimeProvider>\n );\n}\n\nfunction renderAppRegion(\n app: AegisApp | undefined,\n appValue: { id: string; basePath: string } | null,\n children: ReactElement,\n): ReactElement {\n if (!app || !appValue) {\n return children;\n }\n const inner = (\n <ActiveAppContext.Provider value={appValue}>\n {children}\n </ActiveAppContext.Provider>\n );\n return app.wrap ? <>{app.wrap(inner)}</> : inner;\n}\n"],"names":["SIDEBAR_COLLAPSED_KEY","AegisShell","brand","apps","rootRoutes","fallbackPath","notFoundElement","user","userMenu","headerCenter","headerActions","appSwitcher","elevateHeaderOnScroll","ambient","inboxPath","onAppSwitch","enableCommandPalette","commandGroupOrder","agentPanel","agentRuntime","chrome","location","useLocation","navigate","useNavigate","strings","useStrings","pathname","auth","useAuth","themeCtx","useContext","ThemeContext","sidebarCollapsedValue","setSidebarCollapsedValue","useStorageItem","sidebarCollapsed","inlineSlot","setInlineSlot","useState","windowScrolled","useWindowScrolled","headerScrolled","mainRef","useRef","resolvedUser","useShellUser","visibleApps","useMemo","app","isAppVisible","activeApp","findActiveApp","activeAppValue","normalizeBasePath","useEffect","assertUniqueBasePaths","useAppCommands","hasCommandProvider","useHasCommandProvider","useWarnOnce","agent","useAgentPanel","mobileNav","useMobileNav","sidebarChrome","navValue","toggleSidebar","useCallback","routeTree","buildRouteTree","element","useRoutes","matches","matchRoutes","topRoute","page","jsx","RouteErrorBoundary","rootHref","useHref","basename","shellSnapshot","w","appHasSidebar","hasSidebar","signInButton","Button","shellClass","AegisRuntimeProvider","EnvironmentProvider","jsxs","SkipLink","AmbientBackground","TopHeader","Fragment","Sidebar","AppSwitcher","ShellBrand","ActiveEnvironmentSwitcher","ShellNotificationBell","UserMenu","AgentPanelToggle","renderAppRegion","ShellNavContext","createPortal","BreadcrumbBar","AskOverlay","ShellCommandPalette","appValue","children","inner","ActiveAppContext"],"mappings":"6zCA6DMA,GAAwB,gCAYvB,SAASC,GAAW,CACzB,MAAAC,EAAA,KACAC,EACA,WAAAC,EAAa,CAAA,EACb,aAAAC,EACA,gBAAAC,EACA,KAAAC,EACA,SAAAC,EACA,aAAAC,EACA,cAAAC,EACA,YAAAC,EAAc,GACd,sBAAAC,EAAwB,GACxB,QAAAC,EACA,UAAAC,EACA,YAAAC,EACA,qBAAAC,EAAuB,GACvB,kBAAAC,EACA,WAAAC,EACA,aAAAC,EACA,OAAAC,EAAS,QACX,EAAkC,CAChC,MAAMC,EAAWC,EAAAA,YAAA,EACXC,EAAWC,EAAAA,YAAA,EACXC,EAAUC,GAAAA,WAAA,EACV,CAAE,SAAAC,GAAaN,EACfO,EAAOC,GAAAA,QAAA,EACPC,EAAWC,EAAAA,WAAWC,eAAY,EAClC,CAACC,EAAuBC,CAAwB,EAAIC,GAAAA,eACxDnC,EAAA,EAEIoC,EAAmBH,IAA0B,IAC7C,CAACI,EAAYC,CAAa,EAAIC,EAAAA,SAAgC,IAAI,EAClEC,EAAiBC,GAAAA,kBAAA,EACjBC,GAAiB9B,GAAyB4B,EAC1CG,EAAUC,EAAAA,OAAoB,IAAI,EAElCC,EAAeC,GAAAA,aAAavC,EAAMC,EAAUoB,CAAI,EAEhDmB,EAAcC,EAAAA,QAClB,IAAM7C,EAAK,OAAQ8C,GAAQC,EAAAA,aAAaD,EAAKrB,EAAK,OAAQA,EAAK,IAAI,CAAC,EACpE,CAACzB,EAAMyB,EAAK,OAAQA,EAAK,IAAI,CAAA,EAGzBuB,EAAYH,EAAAA,QAChB,IAAMI,EAAAA,cAAcjD,EAAMwB,CAAQ,EAClC,CAACxB,EAAMwB,CAAQ,CAAA,EAGX0B,GAAiBL,EAAAA,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AAA,CAAA,CAClB,CAAA,CAEJ,CAAA,CAAA,EAIJuB,GACEP,EAAAA,IAACmB,WAAQ,UAAA7C,EAAsB,UAAWY,EAAU,UAAW,EAGnEc,EAAAA,IAAC,SAAA,CACC,IAAKd,EAAU,YACf,KAAK,SACL,UAAU,wBACV,aAAYtC,EAAQ,gBACpB,SAAU,GACV,QAASsC,EAAU,OAAA,CAAA,EAErBc,EAAAA,IAAC,OAAA,CACC,GAAG,aACH,IAAKlC,EACL,SAAU,GACV,UAAU,oBAET,SAAA4D,GACCpD,EACAE,GACAsC,EAAAA,KAACa,GAAAA,gBAAgB,SAAhB,CAAyB,MAAOtC,GAC9B,SAAA,CAAAf,GAAW,QACVd,GACAoE,GAAAA,aAAatD,EAAU,OAAQd,CAAU,EAC1Cc,GAAW,gBAAkB,IAC5B0B,EAAAA,IAAC6B,GAAAA,eAAc,UAAAvD,EAAsB,EAEvC0B,EAAAA,IAAC,MAAA,CAAI,UAAU,uBAAwB,SAAAD,CAAA,CAAK,CAAA,CAAA,CAC9C,CAAA,CACF,CAAA,EAEDf,EAAM,MACLgB,EAAAA,IAAC,MAAA,CAAI,UAAU,2BAA4B,SAAA3D,EAAW,QAEvDyF,GAAAA,WAAA,EAAW,EACX3F,GAAwB0C,GACvBmB,EAAAA,IAAC+B,GAAAA,oBAAA,CAAoB,WAAY3F,CAAA,CAAmB,CAAA,CAAA,CAExD,CAAA,CACF,CAAA,CAAA,CAGN,CAEA,SAASsF,GACPtD,EACA4D,EACAC,EACc,CACd,GAAI,CAAC7D,GAAO,CAAC4D,EACX,OAAOC,EAET,MAAMC,EACJlC,EAAAA,IAACmC,oBAAiB,SAAjB,CAA0B,MAAOH,EAC/B,SAAAC,EACH,EAEF,OAAO7D,EAAI,KAAO4B,EAAAA,IAAAkB,WAAA,CAAG,WAAI,KAAKgB,CAAK,EAAE,EAAMA,CAC7C"}
@@ -10,4 +10,4 @@ import { AegisShellProps } from './types';
10
10
  * page that throws while rendering shows an error with a retry in the page
11
11
  * area; the chrome stays up.
12
12
  */
13
- export declare function AegisShell({ brand, apps, rootRoutes, fallbackPath, notFoundElement, user, userMenu, headerCenter, headerActions, appSwitcher, elevateHeaderOnScroll, ambient, inboxPath, onAppSwitch, enableCommandPalette, commandGroupOrder, agentPanel, agentRuntime, }: AegisShellProps): ReactElement;
13
+ export declare function AegisShell({ brand, apps, rootRoutes, fallbackPath, notFoundElement, user, userMenu, headerCenter, headerActions, appSwitcher, elevateHeaderOnScroll, ambient, inboxPath, onAppSwitch, enableCommandPalette, commandGroupOrder, agentPanel, agentRuntime, chrome, }: AegisShellProps): ReactElement;