@sybilion/uilib 1.3.90 → 1.3.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/ui/AppHeader/AppHeader.styl.js +1 -1
- package/dist/esm/components/ui/Logo/Logo.js +4 -4
- package/dist/esm/components/ui/Page/AppShell/AppShell.styl.js +1 -1
- package/dist/esm/components/ui/Page/PageFooter/PageFooter.js +1 -1
- package/dist/esm/components/ui/Sidebar/Sidebar.js +10 -6
- package/dist/esm/components/ui/Sidebar/Sidebar.styl.js +2 -2
- package/dist/esm/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.js +29 -4
- package/dist/esm/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl.js +2 -2
- package/dist/esm/components/ui/WorkspaceAppSwitcher/workspaceAppsLocalStorage.js +9 -1
- package/dist/esm/components/widgets/SybilionAppHeader/SybilionAppHeader.styl.js +1 -1
- package/dist/esm/types/src/components/ui/Logo/Logo.d.ts +2 -2
- package/dist/esm/types/src/components/ui/Logo/Logo.types.d.ts +1 -0
- package/dist/esm/types/src/components/ui/Sidebar/Sidebar.d.ts +2 -1
- package/dist/esm/types/src/components/ui/WorkspaceAppSwitcher/index.d.ts +1 -1
- package/dist/esm/types/src/components/ui/WorkspaceAppSwitcher/workspaceApp.types.d.ts +3 -0
- package/package.json +1 -1
- package/src/components/ui/AppHeader/AppHeader.styl +2 -2
- package/src/components/ui/Logo/Logo.tsx +5 -5
- package/src/components/ui/Logo/Logo.types.ts +1 -0
- package/src/components/ui/Page/AppShell/AppShell.styl +3 -0
- package/src/components/ui/Page/PageFooter/PageFooter.tsx +1 -2
- package/src/components/ui/Sidebar/Sidebar.styl +13 -0
- package/src/components/ui/Sidebar/Sidebar.styl.d.ts +1 -0
- package/src/components/ui/Sidebar/Sidebar.tsx +16 -4
- package/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl +7 -0
- package/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.styl.d.ts +1 -0
- package/src/components/ui/WorkspaceAppSwitcher/WorkspaceAppSwitcher.tsx +40 -4
- package/src/components/ui/WorkspaceAppSwitcher/index.ts +4 -1
- package/src/components/ui/WorkspaceAppSwitcher/workspaceApp.types.ts +4 -0
- package/src/components/ui/WorkspaceAppSwitcher/workspaceAppsLocalStorage.ts +16 -2
- package/src/components/widgets/SybilionAppHeader/SybilionAppHeader.styl +1 -1
- package/src/docs/App/App.tsx +24 -19
- package/src/docs/components/DocsSidebar/DocsSidebar.tsx +5 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.AppHeader_root__SdbDv{align-items:center;align-self:flex-end;background-color:var(--color-background);display:flex;max-width:calc(100vw - var(--sidebar-width) - var(--p-2));min-height:var(--header-height);padding-right:var(--p-2);position:relative;width:100%}@media (max-width:768px){.AppHeader_root__SdbDv{max-width:100%;padding-left:
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.AppHeader_root__SdbDv{align-items:center;align-self:flex-end;background-color:var(--color-background);display:flex;max-width:calc(100vw - var(--sidebar-width) - var(--p-2));min-height:var(--header-height);padding-right:var(--p-2);position:relative;width:100%}@media (max-width:768px){.AppHeader_root__SdbDv{max-width:100%;padding-left:300px}}@media (min-width:768px){[data-slot=sidebar-wrapper][data-state=collapsed] .AppHeader_root__SdbDv{max-width:100%;padding-left:300px}}.AppHeader_sticky__qFWuq{backdrop-filter:blur(10px);background-color:color-mix(in srgb,var(--background) 80%,transparent);box-shadow:inset 0 40px 50px 20px var(--background);position:sticky;top:0;z-index:100}.AppHeader_content__kyxem{align-items:center;display:flex;gap:2rem;justify-content:flex-end;padding:0 var(--p-9);width:100%}.AppHeader_logo__v31FX{align-items:center;color:var(--color-foreground);display:flex;font-size:1.5rem;font-weight:400;gap:.5rem;text-decoration:none;white-space:nowrap}.AppHeader_logo__v31FX svg{display:inline-flex;height:32px;transition:transform .1s ease-in-out;width:auto}.AppHeader_logo__v31FX:hover svg{transform:scale(1.05)}.AppHeader_nav__ahN1p{align-items:center;display:flex;flex:1;gap:1.5rem;justify-content:center}@media (max-width:units(768px,\"px\")){.AppHeader_nav__ahN1p{display:none}}.AppHeader_navLink__z43jY{color:var(--color-muted-foreground);font-size:.875rem;font-weight:400;text-decoration:none;transition:color .2s ease}.AppHeader_navLink__z43jY:hover{color:var(--color-foreground)}.AppHeader_actions__QuxEF{align-items:center;display:flex;gap:var(--p-4);margin-right:var(--p-2)}@media (max-width:units(768px,\"px\")){.AppHeader_actions__QuxEF{gap:var(--p-1)}}.AppHeader_pageHeaderActionsAnchor__qzQMs{align-items:center;display:flex;flex-shrink:0;gap:var(--p-4)}";
|
|
4
4
|
var S = {"root":"AppHeader_root__SdbDv","sticky":"AppHeader_sticky__qFWuq","content":"AppHeader_content__kyxem","logo":"AppHeader_logo__v31FX","nav":"AppHeader_nav__ahN1p","navLink":"AppHeader_navLink__z43jY","actions":"AppHeader_actions__QuxEF","pageHeaderActionsAnchor":"AppHeader_pageHeaderActionsAnchor__qzQMs"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import cn from 'classnames';
|
|
3
|
-
import S from './Logo.styl.js';
|
|
4
2
|
import LogoMarkSvg from './logo.svg.js';
|
|
3
|
+
import S from './Logo.styl.js';
|
|
4
|
+
import cn from 'classnames';
|
|
5
5
|
|
|
6
|
-
function Logo({ showText = true, size = 'md', className, ...props }) {
|
|
6
|
+
function Logo({ showText = true, brandText = 'Sybilion', size = 'md', className, ...props }) {
|
|
7
7
|
return (jsxs("div", { className: cn(S.root, S[size], className), ...props, children: [jsx(LogoMarkSvg, { className: S.icon, ...(showText
|
|
8
8
|
? { 'aria-hidden': true }
|
|
9
|
-
: { 'aria-label': 'Sybilion', role: 'img' }) }), showText && jsx("span", { className: S.text, children:
|
|
9
|
+
: { 'aria-label': 'Sybilion', role: 'img' }) }), showText && jsx("span", { className: S.text, children: brandText })] }));
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export { Logo, LogoMarkSvg as LogoMark };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.AppShell_root__ONlNK{display:grid;flex:1;grid-template-areas:\"main\";grid-template-columns:1fr;min-height:100%;width:100%}@media (min-width:1100px){.AppShell_root__ONlNK{grid-template-areas:\"sidebar main\";grid-template-columns:var(--sidebar-width) 1fr}[data-slot=sidebar-wrapper][data-state=collapsed] .AppShell_root__ONlNK{grid-template-columns:0 1fr}}.AppShell_mainColumn__Emn1p{display:flex;flex:1;flex-direction:column;grid-area:main;min-width:0}[data-slot=sidebar-wrapper][data-state=collapsed] .AppShell_mainColumn__Emn1p{margin-left:var(--p-3)}.AppShell_mainBody__IoVuy{background-color:var(--page-color);border-radius:var(--p-4);display:flex;flex:1;flex-direction:column;min-width:0;padding-bottom:var(--page-y-padding)}";
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.AppShell_root__ONlNK{display:grid;flex:1;grid-template-areas:\"main\";grid-template-columns:1fr;min-height:100%;width:100%}@media (min-width:1100px){.AppShell_root__ONlNK{grid-template-areas:\"sidebar main\";grid-template-columns:var(--sidebar-width) 1fr}[data-slot=sidebar-wrapper][data-state=collapsed] .AppShell_root__ONlNK{grid-template-columns:0 1fr}}.AppShell_mainColumn__Emn1p{display:flex;flex:1;flex-direction:column;grid-area:main;min-width:0}[data-slot=sidebar-wrapper][data-state=collapsed] .AppShell_mainColumn__Emn1p{margin-left:var(--p-3)}@media (max-width:768px){.AppShell_mainColumn__Emn1p{margin-left:var(--p-3)!important}}.AppShell_mainBody__IoVuy{background-color:var(--page-color);border-radius:var(--p-4);display:flex;flex:1;flex-direction:column;min-width:0;padding-bottom:var(--page-y-padding)}";
|
|
4
4
|
var S = {"root":"AppShell_root__ONlNK","mainColumn":"AppShell_mainColumn__Emn1p","mainBody":"AppShell_mainBody__IoVuy"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -26,7 +26,7 @@ function PageFooter({ children, versionLink, versionLabel, homeTo = '/', brandTe
|
|
|
26
26
|
ariaLabel: 'Contact support via email',
|
|
27
27
|
},
|
|
28
28
|
];
|
|
29
|
-
return (jsx("footer", { className: S.root, children: jsxs("div", { className: S.line, children: [jsxs("div", { className: S.logo, children: [
|
|
29
|
+
return (jsx("footer", { className: S.root, children: jsxs("div", { className: S.line, children: [jsxs("div", { className: S.logo, children: [jsx(Link, { to: homeTo, children: jsx(Logo, { brandText: brandText }) }), versionLink !== '' && (jsx("div", { className: S.version, children: jsx(Link, { to: versionLink, className: S.versionLink, children: versionLabel }) }))] }), children, jsxs("div", { className: S.meta, children: [jsx("div", { className: S.copyright, children: copyrightText }), resolvedLinks.length > 0 && (jsx("nav", { className: S.links, "aria-label": "Footer links", children: resolvedLinks.map(item => (jsx(PageFooterLinkEl, { item: item }, item.id))) }))] })] }) }));
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export { PageFooter };
|
|
@@ -2,8 +2,9 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { createContext, useContext, useState, useRef, useCallback, useLayoutEffect, useEffect, useMemo } from 'react';
|
|
4
4
|
import { Button } from '../Button/Button.js';
|
|
5
|
+
import { Logo } from '../Logo/Logo.js';
|
|
5
6
|
import { Separator } from '../Separator/Separator.js';
|
|
6
|
-
import { Sheet, SheetContent
|
|
7
|
+
import { Sheet, SheetContent } from '../Sheet/Sheet.js';
|
|
7
8
|
import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip/Tooltip.js';
|
|
8
9
|
import { clampSidebarWidthPx, CHAT_WIDTH_STORAGE_KEY, shellFitsSidebarsLayout, SIDEBAR_WIDTH_DEFAULT_PX, SIDEBAR_WIDTH_MIN_PX, SIDEBAR_WIDTH_STORAGE_KEY_PX, SIDEBAR_WIDTH_STORAGE_KEY_PCT, CHAT_WIDTH_DEFAULT_PX, CHAT_WIDTH_MIN_PX, defaultChatWidthPx, clampChatWidthPx } from '../../../hooks/panelWidth.js';
|
|
9
10
|
import useElemDrag from '../../../hooks/useDragElem.js';
|
|
@@ -356,22 +357,25 @@ function SidebarProvider({ defaultOpen = getCookie('isSidebarOpen') ?? true, cla
|
|
|
356
357
|
...style,
|
|
357
358
|
}, className: cn(SidebarStem.sidebarWrapper, className), ...props, children: [jsx("div", { className: SidebarStem.sidebarMainShell, children: children }), jsx("div", { ref: onChatPanelMount, className: SidebarStem.chatPanelMount, "data-slot": "chat-panel-mount" })] }) }) }));
|
|
358
359
|
}
|
|
359
|
-
function Sidebar({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, side = 'left', variant = 'sidebar', collapsible = 'offcanvas', children, fullHeightResizer = false, ...props }) {
|
|
360
|
+
function Sidebar({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, side = 'left', variant = 'sidebar', collapsible = 'offcanvas', children, fullHeightResizer = false, brandText = 'Sybilion', ...props }) {
|
|
360
361
|
const isSidebarSheetLayout = useIsSidebarSheetLayout();
|
|
361
362
|
const { isOpen, setOpen } = useSidebar();
|
|
362
|
-
|
|
363
|
+
const prevSheetLayoutRef = useRef(isSidebarSheetLayout);
|
|
364
|
+
/** Narrow shell: sidebar is a sheet; collapse only when crossing into this mode. */
|
|
363
365
|
useEffect(() => {
|
|
364
|
-
|
|
366
|
+
const enteredSheetLayout = isSidebarSheetLayout && !prevSheetLayoutRef.current;
|
|
367
|
+
prevSheetLayoutRef.current = isSidebarSheetLayout;
|
|
368
|
+
if (enteredSheetLayout)
|
|
365
369
|
setOpen(false);
|
|
366
370
|
}, [isSidebarSheetLayout, setOpen]);
|
|
367
371
|
if (collapsible === 'none') {
|
|
368
372
|
return (jsx("div", { "data-slot": "sidebar", className: cn(SidebarStem.sidebarNone, className), ...props, children: children }));
|
|
369
373
|
}
|
|
370
374
|
if (isSidebarSheetLayout) {
|
|
371
|
-
return (jsx(Sheet, { open: isOpen, onOpenChange: setOpen, ...props, children:
|
|
375
|
+
return (jsx(Sheet, { open: isOpen, onOpenChange: setOpen, ...props, children: jsx(SheetContent, { "data-sidebar": "sidebar", "data-slot": "sidebar", className: cn(SidebarStem.sheetContentSidebar, className), style: {
|
|
372
376
|
'--gap-top': '40px',
|
|
373
377
|
'--sidebar-width': SIDEBAR_WIDTH_MOBILE,
|
|
374
|
-
}, side: side, children:
|
|
378
|
+
}, side: side, children: jsxs("div", { className: cn(SidebarStem.sheetSidebarInner), children: [jsx("div", { className: SidebarStem.sheetSidebarLogo, children: jsx(Logo, { size: "md", brandText: brandText }) }), children] }) }) }));
|
|
375
379
|
}
|
|
376
380
|
return (jsxs("aside", { className: cn(SidebarStem.sidebar, SidebarStem[`variant-${variant}`], className, fullHeightResizer && SidebarStem.fullHeightResizer), "data-state": isOpen ? 'expanded' : 'collapsed', "data-collapsible": !isOpen ? collapsible : '', "data-variant": variant, "data-side": side, ...props, children: [children, jsx(SidebarResizeHandle, { side: side })] }));
|
|
377
381
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.Sidebar_sidebarWrapper__DGm4P{align-items:stretch;display:flex;flex-direction:row;height:100%;min-height:0;width:100%}.Sidebar_sidebarWrapper__DGm4P #page-sidebar-actions{min-height:100%}@media (max-width:768px){.Sidebar_sidebarWrapper__DGm4P{flex-direction:column;height:100dvh;max-height:100dvh}}.Sidebar_sidebarMainShell__pSWDC{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0}.Sidebar_chatPanelMount__1Zctx{background:var(--background);border-left:1px solid var(--border);flex:0 0 0px;flex:0 0 var(--chat-panel-width,0px);min-height:0;min-width:0;overflow:hidden;width:0;width:var(--chat-panel-width,0)}@media (max-width:768px){.Sidebar_chatPanelMount__1Zctx{border-left:none;border-top:1px solid var(--border);flex:0 0 0px;flex:0 0 var(--chat-panel-height,0px);height:0;height:var(--chat-panel-height,0);transition:flex-basis .2s ease,height .2s ease;width:100%}}.Sidebar_sidebar__0vqNZ{height:0;position:fixed;--top-offset:-10px;--gap-top:calc(var(--header-height) + var(--top-offset));align-self:flex-start;color:var(--sidebar-foreground);display:none;flex-direction:column;top:calc(var(--gap-top));top:calc(var(--gap-top) + var(--app-banner-height, 0px));width:var(--sidebar-width)}@media (min-width:768px){.Sidebar_sidebar__0vqNZ[data-state=expanded]{display:flex;height:calc(100vh - var(--gap-top));height:calc(100vh - var(--gap-top) - var(--app-banner-height, 0px));min-height:0}}.Sidebar_sidebar__0vqNZ[data-collapsible=offcanvas]{overflow:hidden;padding:0;width:0}.Sidebar_sidebarTrigger__ipx2C{cursor:pointer;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarTrigger__ipx2C svg{height:20px;width:20px}.Sidebar_sidebarRail__uvSpl{position:absolute;inset-y:0;display:hidden;transition:all ease-out;width:1rem;z-index:20}.Sidebar_sidebarRail__uvSpl:hover:after{background-color:var(--sidebar-border)}.Sidebar_sidebarRail__uvSpl[data-side=left]{right:-1rem}.Sidebar_sidebarRail__uvSpl[data-side=right]{left:0}.Sidebar_sidebarRail__uvSpl:after{content:\"\";position:absolute;inset-y:0;left:50%;width:2px}@media (min-width:640px){.Sidebar_sidebarRail__uvSpl{display:flex}}.Sidebar_sidebarRail__uvSpl[data-side=left]{cursor:w-resize}.Sidebar_sidebarRail__uvSpl[data-side=left][data-state=collapsed],.Sidebar_sidebarRail__uvSpl[data-side=right]{cursor:e-resize}.Sidebar_sidebarRail__uvSpl[data-side=right][data-state=collapsed]{cursor:w-resize}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]{transform:translateX(0)}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]:hover{background-color:var(--sidebar)}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]:after{left:100%}.Sidebar_sidebarRail__uvSpl[data-side=left][data-collapsible=offcanvas]{right:-.5rem}.Sidebar_sidebarRail__uvSpl[data-side=right][data-collapsible=offcanvas]{left:-.5rem}.Sidebar_sidebarResizeHandle__kuD6t{background-color:transparent;background-color:var(--page-color);border-radius:2.5px;height:calc(100vh + 200px);height:calc(100vh + 200px - var(--app-banner-height, 0px));opacity:0;position:absolute;top:-200px;touch-action:none;transition:opacity .15s ease-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:5px;z-index:30}.Sidebar_sidebarResizeHandle__kuD6t:before{content:\"\";cursor:col-resize;height:100%;position:absolute;right:0;width:30px}.Sidebar_sidebarResizeHandle__kuD6t[data-side=left]{right:2px}.Sidebar_sidebarResizeHandle__kuD6t[data-side=right]{left:0}.Sidebar_sidebarResizeHandle__kuD6t:hover{opacity:1}.Sidebar_sidebarResizeHandle__kuD6t:active{opacity:0}.Sidebar_fullHeightResizer__jZXnw .Sidebar_sidebarResizeHandle__kuD6t{height:calc(100vh - var(--gap-top)*-1);height:calc(100vh - var(--gap-top)*-1 - var(--app-banner-height, 0px));top:-80px}.Sidebar_sidebarInput__ujQLX{background-color:var(--background);box-shadow:none;height:2rem;width:100%}.Sidebar_sidebarFooter__V3O-l,.Sidebar_sidebarHeader__X33ii{display:flex;flex-direction:column;gap:0;padding:0}.Sidebar_sidebarSeparator__oUkYG{background-color:var(--sidebar-border);margin-left:0;margin-right:0;width:auto}.Sidebar_sidebarContent__Ywe1o{display:flex;flex:1;flex-direction:column;gap:var(--p-16);height:100vh;max-height:100%;min-height:0;overflow:auto;position:absolute;width:100%}@media (min-width:768px){.Sidebar_sidebarContent__Ywe1o{height:calc(100vh - var(--gap-top));height:calc(100vh - var(--gap-top) - var(--app-banner-height, 0px))}}.Sidebar_sidebarContent__Ywe1o[data-collapsible=icon]{overflow:hidden}.Sidebar_sidebarGroup__7Mhg2{display:flex;flex-direction:column;min-width:0;padding:40px 0 0;position:relative;width:100%}.Sidebar_sidebarGroupAction__OhVZq{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;justify-content:center;outline:none;padding:0;position:absolute;right:.75rem;top:.875rem;transition:transform;width:1.25rem}.Sidebar_sidebarGroupAction__OhVZq:hover{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarGroupAction__OhVZq:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarGroupAction__OhVZq>svg{flex-shrink:0;height:1rem;width:1rem}.Sidebar_sidebarGroupAction__OhVZq:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.Sidebar_sidebarGroupAction__OhVZq:after{display:none}}.Sidebar_sidebarGroupAction__OhVZq[data-collapsible=icon]{display:none}.Sidebar_sidebarMenu__hYXIo{display:flex;flex-direction:column;gap:var(--p-4);list-style:none;min-width:0;padding:0 var(--p-11) var(--p-10) var(--p-8);width:100%}@media (max-width:768px){.Sidebar_sidebarMenu__hYXIo{padding-right:var(--p-8)}}.Sidebar_sidebarMenuItem__CRhM8{cursor:pointer;position:relative}.Sidebar_sidebarMenuBadge__ttvCR{align-items:center;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;font-size:.75rem;font-weight:500;height:1.25rem;justify-content:center;min-width:1.25rem;padding-left:.25rem;padding-right:.25rem;pointer-events:none;position:absolute;right:.25rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Sidebar_sidebarMenuBadge__ttvCR[data-size=sm]{top:.25rem}.Sidebar_sidebarMenuBadge__ttvCR[data-size=md]{top:.375rem}.Sidebar_sidebarMenuBadge__ttvCR[data-size=lg]{top:.625rem}.Sidebar_sidebarMenuBadge__ttvCR[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSkeleton__u2KoI{align-items:center;border-radius:.375rem;display:flex;gap:.5rem;height:2rem;padding-left:.5rem;padding-right:.5rem}.Sidebar_sidebarMenuSkeletonIcon__-1tvv{border-radius:.375rem;height:1rem;width:1rem}.Sidebar_sidebarMenuSkeletonText__dWzWo{flex:1;height:1rem;max-width:var(--skeleton-width)}.Sidebar_sidebarMenuSub__gh8Rn{border-color:var(--sidebar-border);border-left:none;display:flex;flex-direction:column;gap:var(--p-2);list-style:none;margin-left:0;margin-right:0;min-width:0;padding:0;padding-top:var(--p-1);position:relative;transform:translateX(1px)}.Sidebar_sidebarMenuSub__gh8Rn:before{background:var(--sidebar-border);bottom:26px;content:\"\";left:var(--p-5);pointer-events:none;position:absolute;top:0;width:1px}.Sidebar_sidebarMenuSub__gh8Rn[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSubItem__fTHJa{margin-left:var(--p-6);position:relative}.Sidebar_sidebarMenuSubItem__fTHJa:before{border-bottom:1px solid var(--sidebar-border);border-bottom-left-radius:var(--p-2);border-left:1px solid var(--sidebar-border);bottom:0;content:\"\";height:var(--p-3);left:calc(var(--p-1)*-1);position:absolute;top:var(--p-2);width:var(--p-3)}.Sidebar_sidebarMenuSubItem__fTHJa a:hover{text-decoration:none}.Sidebar_sheetContentSidebar__cM2h2{color:var(--sidebar-foreground);padding:0;width:var(--sidebar-width)}.Sidebar_sheetContentSidebar__cM2h2>button{display:none}@media (max-width:768px){.Sidebar_sheetContentSidebar__cM2h2{z-index:100}}.Sidebar_sheetSidebarInner__U-SMQ{background-color:var(--sidebar);display:flex;flex-direction:column;height:100%;width:100%}.Sidebar_sidebarNone__crRsF{color:var(--sidebar-foreground);display:flex;flex-direction:column;height:100%;width:var(--sidebar-width)}.Sidebar_variant-floating__-qvkJ{padding:.5rem}.Sidebar_variant-floating__-qvkJ[data-collapsible=icon],.Sidebar_variant-inset__oTfrV[data-collapsible=icon]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)}.Sidebar_variant-sidebar__fAe77[data-collapsible=icon]{width:var(--sidebar-width-icon)}.Sidebar_variant-sidebar__fAe77[data-side=left]{border-right:1px solid #e5e7eb}.Sidebar_variant-sidebar__fAe77[data-side=right]{border-left:1px solid #e5e7eb}.Sidebar_sidebarMenuButton__vIEh->span,.Sidebar_sidebarMenuSubButton__c9flh>span{min-width:0;text-transform:capitalize}.Sidebar_sidebarMenuButton__vIEh->span:first-child,.Sidebar_sidebarMenuSubButton__c9flh>span:first-child{flex-grow:1}.Sidebar_sidebarMenuButton__vIEh-{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;font-size:.875rem;gap:var(--p-2);justify-content:flex-start;outline:none;overflow:hidden;padding:var(--p-6) var(--p-3);text-align:left;text-decoration:none;transition:all;width:100%}.Sidebar_sidebarMenuButton__vIEh-:visited{color:var(--sidebar-foreground)}.Sidebar_sidebarMenuButton__vIEh-:hover{text-decoration:none}.Sidebar_sidebarMenuSubItem__fTHJa:active .Sidebar_sidebarMenuButton__vIEh-,.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuButton__vIEh-,.Sidebar_sidebarMenuSubItem__fTHJa[data-state=open] .Sidebar_sidebarMenuButton__vIEh-{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuButton__vIEh-:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuButton__vIEh-:disabled,.Sidebar_sidebarMenuButton__vIEh-[aria-disabled=true]{opacity:.5;pointer-events:none}.Sidebar_sidebarMenuButton__vIEh-[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground);font-weight:500}.Sidebar_sidebarMenuButton__vIEh-[data-collapsible=icon]{height:2rem!important;padding:.5rem!important;width:2rem!important}.Sidebar_sidebarMenuButton__vIEh->span{flex-grow:1;line-height:20px;overflow:hidden;white-space:nowrap}.Sidebar_sidebarMenuButton__vIEh->svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-sm__7aIbu{font-size:.75rem;height:1.75rem}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-md__rcjmO{font-size:.875rem;height:var(--p-12)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-lg__1k76S{font-size:.875rem;height:3rem}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-lg__1k76S[data-collapsible=icon]{padding:0!important}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_variant-outline__UmtAz{background-color:var(--background);box-shadow:0 0 0 1px var(--sidebar-border)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_variant-outline__UmtAz:hover{background-color:var(--sidebar-accent);box-shadow:0 0 0 1px var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuButtonCta__dQAhv{display:flex;justify-content:flex-start;text-align:left;width:100%}.Sidebar_sidebarMenuButtonCta__dQAhv>svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarMenuAction__mFZa1{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);cursor:pointer;display:flex;justify-content:center;opacity:0;outline:none;padding:0;position:absolute;right:var(--p-2);top:var(--p-2);transition:transform;width:1.25rem}.Sidebar_sidebarMenuAction__mFZa1:before{background-image:linear-gradient(to left,var(--sidebar-accent) 70%,transparent 100%);content:\"\";height:100%;pointer-events:none;position:absolute;right:0;transition:opacity .2s ease-in-out;width:calc(100% + var(--p-4))}.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuAction__mFZa1{opacity:1}.Sidebar_sidebarMenuAction__mFZa1:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuAction__mFZa1>svg{flex-shrink:0;height:1rem;opacity:.5;pointer-events:none;transition:opacity .2s ease-in-out;width:1rem;z-index:1}.Sidebar_sidebarMenuAction__mFZa1:hover>svg{opacity:1}.Sidebar_sidebarMenuAction__mFZa1:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.Sidebar_sidebarMenuAction__mFZa1:after{display:none}}.Sidebar_sidebarMenuAction__mFZa1[data-size=sm]{top:.25rem}.Sidebar_sidebarMenuAction__mFZa1[data-size=md]{top:.375rem}.Sidebar_sidebarMenuAction__mFZa1[data-size=lg]{top:.625rem}.Sidebar_sidebarMenuAction__mFZa1[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA[data-active=true]{color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA[data-state=open]{opacity:1}@media (min-width:768px){.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA{opacity:0}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA:focus-within,.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA:hover{opacity:1}}.Sidebar_sidebarMenuSubButton__c9flh{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;gap:var(--p-1);height:var(--p-9);margin-left:var(--p-3);min-width:0;outline:none;overflow:hidden;padding:var(--p-1) var(--p-2);text-decoration:none;transform:translateX(-1px)}.Sidebar_sidebarMenuSubButton__c9flh:visited{color:var(--sidebar-foreground)}.Sidebar_sidebarMenuSubButton__c9flh:hover{text-decoration:none}.Sidebar_sidebarMenuSubItem__fTHJa:active .Sidebar_sidebarMenuSubButton__c9flh,.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuSubButton__c9flh{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuSubButton__c9flh:disabled,.Sidebar_sidebarMenuSubButton__c9flh[aria-disabled=true]{opacity:.5;pointer-events:none}.Sidebar_sidebarMenuSubButton__c9flh[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh[data-active=true]:visited{color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSubButton__c9flh>span:first-child{overflow:hidden;white-space:nowrap}.Sidebar_sidebarMenuSubButton__c9flh>svg{color:var(--sidebar-accent-foreground);flex-shrink:0;height:1rem;width:1rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-sm__7aIbu{font-size:.75rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-md__rcjmO{font-size:.875rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-lg__1k76S{font-size:1rem}::view-transition-old(sidebar-container),::view-transition-old(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtOld__hlKqn;animation-timing-function:ease-out;transform:translateZ(0)}::view-transition-new(sidebar-container),::view-transition-new(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtNew__FFhYU;animation-timing-function:ease-out;transform:translateZ(0)}@keyframes Sidebar_sidebarVtOld__hlKqn{0%{opacity:1}to{opacity:0}}@keyframes Sidebar_sidebarVtNew__FFhYU{0%{opacity:0}to{opacity:1}}";
|
|
4
|
-
var SidebarStem = {"sidebarWrapper":"Sidebar_sidebarWrapper__DGm4P","sidebarMainShell":"Sidebar_sidebarMainShell__pSWDC","chatPanelMount":"Sidebar_chatPanelMount__1Zctx","sidebar":"Sidebar_sidebar__0vqNZ","sidebarTrigger":"Sidebar_sidebarTrigger__ipx2C","sidebarRail":"Sidebar_sidebarRail__uvSpl","sidebarResizeHandle":"Sidebar_sidebarResizeHandle__kuD6t","fullHeightResizer":"Sidebar_fullHeightResizer__jZXnw","sidebarInput":"Sidebar_sidebarInput__ujQLX","sidebarHeader":"Sidebar_sidebarHeader__X33ii","sidebarFooter":"Sidebar_sidebarFooter__V3O-l","sidebarSeparator":"Sidebar_sidebarSeparator__oUkYG","sidebarContent":"Sidebar_sidebarContent__Ywe1o","sidebarGroup":"Sidebar_sidebarGroup__7Mhg2","sidebarGroupAction":"Sidebar_sidebarGroupAction__OhVZq","sidebarMenu":"Sidebar_sidebarMenu__hYXIo","sidebarMenuItem":"Sidebar_sidebarMenuItem__CRhM8","sidebarMenuBadge":"Sidebar_sidebarMenuBadge__ttvCR","sidebarMenuSkeleton":"Sidebar_sidebarMenuSkeleton__u2KoI","sidebarMenuSkeletonIcon":"Sidebar_sidebarMenuSkeletonIcon__-1tvv","sidebarMenuSkeletonText":"Sidebar_sidebarMenuSkeletonText__dWzWo","sidebarMenuSub":"Sidebar_sidebarMenuSub__gh8Rn","sidebarMenuSubItem":"Sidebar_sidebarMenuSubItem__fTHJa","sheetContentSidebar":"Sidebar_sheetContentSidebar__cM2h2","sheetSidebarInner":"Sidebar_sheetSidebarInner__U-SMQ","sidebarNone":"Sidebar_sidebarNone__crRsF","variant-floating":"Sidebar_variant-floating__-qvkJ","variant-inset":"Sidebar_variant-inset__oTfrV","variant-sidebar":"Sidebar_variant-sidebar__fAe77","sidebarMenuButton":"Sidebar_sidebarMenuButton__vIEh-","sidebarMenuSubButton":"Sidebar_sidebarMenuSubButton__c9flh","size-sm":"Sidebar_size-sm__7aIbu","size-md":"Sidebar_size-md__rcjmO","size-lg":"Sidebar_size-lg__1k76S","variant-outline":"Sidebar_variant-outline__UmtAz","sidebarMenuButtonCta":"Sidebar_sidebarMenuButtonCta__dQAhv","sidebarMenuAction":"Sidebar_sidebarMenuAction__mFZa1","showOnHover":"Sidebar_showOnHover__itXsA","sidebarVtOld":"Sidebar_sidebarVtOld__hlKqn","sidebarVtNew":"Sidebar_sidebarVtNew__FFhYU"};
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.Sidebar_sidebarWrapper__DGm4P{align-items:stretch;display:flex;flex-direction:row;height:100%;min-height:0;width:100%}.Sidebar_sidebarWrapper__DGm4P #page-sidebar-actions{min-height:100%}@media (max-width:768px){.Sidebar_sidebarWrapper__DGm4P{flex-direction:column;height:100dvh;max-height:100dvh}}.Sidebar_sidebarMainShell__pSWDC{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0}.Sidebar_chatPanelMount__1Zctx{background:var(--background);border-left:1px solid var(--border);flex:0 0 0px;flex:0 0 var(--chat-panel-width,0px);min-height:0;min-width:0;overflow:hidden;width:0;width:var(--chat-panel-width,0)}@media (max-width:768px){.Sidebar_chatPanelMount__1Zctx{border-left:none;border-top:1px solid var(--border);flex:0 0 0px;flex:0 0 var(--chat-panel-height,0px);height:0;height:var(--chat-panel-height,0);transition:flex-basis .2s ease,height .2s ease;width:100%}}.Sidebar_sidebar__0vqNZ{height:0;position:fixed;--top-offset:-10px;--gap-top:calc(var(--header-height) + var(--top-offset));align-self:flex-start;color:var(--sidebar-foreground);display:none;flex-direction:column;top:calc(var(--gap-top));top:calc(var(--gap-top) + var(--app-banner-height, 0px));width:var(--sidebar-width)}@media (min-width:768px){.Sidebar_sidebar__0vqNZ[data-state=expanded]{display:flex;height:calc(100vh - var(--gap-top));height:calc(100vh - var(--gap-top) - var(--app-banner-height, 0px));min-height:0}}.Sidebar_sidebar__0vqNZ[data-collapsible=offcanvas]{overflow:hidden;padding:0;width:0}.Sidebar_sidebarTrigger__ipx2C{cursor:pointer;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarTrigger__ipx2C svg{height:20px;width:20px}.Sidebar_sidebarRail__uvSpl{position:absolute;inset-y:0;display:hidden;transition:all ease-out;width:1rem;z-index:20}.Sidebar_sidebarRail__uvSpl:hover:after{background-color:var(--sidebar-border)}.Sidebar_sidebarRail__uvSpl[data-side=left]{right:-1rem}.Sidebar_sidebarRail__uvSpl[data-side=right]{left:0}.Sidebar_sidebarRail__uvSpl:after{content:\"\";position:absolute;inset-y:0;left:50%;width:2px}@media (min-width:640px){.Sidebar_sidebarRail__uvSpl{display:flex}}.Sidebar_sidebarRail__uvSpl[data-side=left]{cursor:w-resize}.Sidebar_sidebarRail__uvSpl[data-side=left][data-state=collapsed],.Sidebar_sidebarRail__uvSpl[data-side=right]{cursor:e-resize}.Sidebar_sidebarRail__uvSpl[data-side=right][data-state=collapsed]{cursor:w-resize}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]{transform:translateX(0)}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]:hover{background-color:var(--sidebar)}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]:after{left:100%}.Sidebar_sidebarRail__uvSpl[data-side=left][data-collapsible=offcanvas]{right:-.5rem}.Sidebar_sidebarRail__uvSpl[data-side=right][data-collapsible=offcanvas]{left:-.5rem}.Sidebar_sidebarResizeHandle__kuD6t{background-color:transparent;background-color:var(--page-color);border-radius:2.5px;height:calc(100vh + 200px);height:calc(100vh + 200px - var(--app-banner-height, 0px));opacity:0;position:absolute;top:-200px;touch-action:none;transition:opacity .15s ease-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:5px;z-index:30}.Sidebar_sidebarResizeHandle__kuD6t:before{content:\"\";cursor:col-resize;height:100%;position:absolute;right:0;width:30px}.Sidebar_sidebarResizeHandle__kuD6t[data-side=left]{right:2px}.Sidebar_sidebarResizeHandle__kuD6t[data-side=right]{left:0}.Sidebar_sidebarResizeHandle__kuD6t:hover{opacity:1}.Sidebar_sidebarResizeHandle__kuD6t:active{opacity:0}.Sidebar_fullHeightResizer__jZXnw .Sidebar_sidebarResizeHandle__kuD6t{height:calc(100vh - var(--gap-top)*-1);height:calc(100vh - var(--gap-top)*-1 - var(--app-banner-height, 0px));top:-80px}.Sidebar_sidebarInput__ujQLX{background-color:var(--background);box-shadow:none;height:2rem;width:100%}.Sidebar_sidebarFooter__V3O-l,.Sidebar_sidebarHeader__X33ii{display:flex;flex-direction:column;gap:0;padding:0}.Sidebar_sidebarSeparator__oUkYG{background-color:var(--sidebar-border);margin-left:0;margin-right:0;width:auto}.Sidebar_sidebarContent__Ywe1o{display:flex;flex:1;flex-direction:column;gap:var(--p-16);height:100vh;max-height:100%;min-height:0;overflow:auto;position:absolute;width:100%}@media (min-width:768px){.Sidebar_sidebarContent__Ywe1o{height:calc(100vh - var(--gap-top));height:calc(100vh - var(--gap-top) - var(--app-banner-height, 0px))}}.Sidebar_sidebarContent__Ywe1o[data-collapsible=icon]{overflow:hidden}.Sidebar_sidebarGroup__7Mhg2{display:flex;flex-direction:column;min-width:0;padding:40px 0 0;position:relative;width:100%}.Sidebar_sidebarGroupAction__OhVZq{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;justify-content:center;outline:none;padding:0;position:absolute;right:.75rem;top:.875rem;transition:transform;width:1.25rem}.Sidebar_sidebarGroupAction__OhVZq:hover{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarGroupAction__OhVZq:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarGroupAction__OhVZq>svg{flex-shrink:0;height:1rem;width:1rem}.Sidebar_sidebarGroupAction__OhVZq:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.Sidebar_sidebarGroupAction__OhVZq:after{display:none}}.Sidebar_sidebarGroupAction__OhVZq[data-collapsible=icon]{display:none}.Sidebar_sidebarMenu__hYXIo{display:flex;flex-direction:column;gap:var(--p-4);list-style:none;min-width:0;padding:0 var(--p-11) var(--p-10) var(--p-8);width:100%}@media (max-width:768px){.Sidebar_sidebarMenu__hYXIo{padding-right:var(--p-8)}}.Sidebar_sidebarMenuItem__CRhM8{cursor:pointer;position:relative}.Sidebar_sidebarMenuBadge__ttvCR{align-items:center;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;font-size:.75rem;font-weight:500;height:1.25rem;justify-content:center;min-width:1.25rem;padding-left:.25rem;padding-right:.25rem;pointer-events:none;position:absolute;right:.25rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Sidebar_sidebarMenuBadge__ttvCR[data-size=sm]{top:.25rem}.Sidebar_sidebarMenuBadge__ttvCR[data-size=md]{top:.375rem}.Sidebar_sidebarMenuBadge__ttvCR[data-size=lg]{top:.625rem}.Sidebar_sidebarMenuBadge__ttvCR[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSkeleton__u2KoI{align-items:center;border-radius:.375rem;display:flex;gap:.5rem;height:2rem;padding-left:.5rem;padding-right:.5rem}.Sidebar_sidebarMenuSkeletonIcon__-1tvv{border-radius:.375rem;height:1rem;width:1rem}.Sidebar_sidebarMenuSkeletonText__dWzWo{flex:1;height:1rem;max-width:var(--skeleton-width)}.Sidebar_sidebarMenuSub__gh8Rn{border-color:var(--sidebar-border);border-left:none;display:flex;flex-direction:column;gap:var(--p-2);list-style:none;margin-left:0;margin-right:0;min-width:0;padding:0;padding-top:var(--p-1);position:relative;transform:translateX(1px)}.Sidebar_sidebarMenuSub__gh8Rn:before{background:var(--sidebar-border);bottom:26px;content:\"\";left:var(--p-5);pointer-events:none;position:absolute;top:0;width:1px}.Sidebar_sidebarMenuSub__gh8Rn[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSubItem__fTHJa{margin-left:var(--p-6);position:relative}.Sidebar_sidebarMenuSubItem__fTHJa:before{border-bottom:1px solid var(--sidebar-border);border-bottom-left-radius:var(--p-2);border-left:1px solid var(--sidebar-border);bottom:0;content:\"\";height:var(--p-3);left:calc(var(--p-1)*-1);position:absolute;top:var(--p-2);width:var(--p-3)}.Sidebar_sidebarMenuSubItem__fTHJa a:hover{text-decoration:none}.Sidebar_sheetContentSidebar__cM2h2{color:var(--sidebar-foreground);padding:0;width:var(--sidebar-width)}.Sidebar_sheetContentSidebar__cM2h2>button{display:none}@media (max-width:768px){.Sidebar_sheetContentSidebar__cM2h2{z-index:100}}.Sidebar_sheetSidebarLogo__eGVDC{flex-shrink:0;padding:var(--p-6) var(--p-8) var(--p-2);position:relative}.Sidebar_sheetSidebarInner__U-SMQ{background-color:var(--sidebar);display:flex;flex-direction:column;height:100%;width:100%}.Sidebar_sheetSidebarInner__U-SMQ .Sidebar_sidebarContent__Ywe1o{flex:1;height:auto;max-height:none;min-height:0;position:relative}.Sidebar_sidebarNone__crRsF{color:var(--sidebar-foreground);display:flex;flex-direction:column;height:100%;width:var(--sidebar-width)}.Sidebar_variant-floating__-qvkJ{padding:.5rem}.Sidebar_variant-floating__-qvkJ[data-collapsible=icon],.Sidebar_variant-inset__oTfrV[data-collapsible=icon]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)}.Sidebar_variant-sidebar__fAe77[data-collapsible=icon]{width:var(--sidebar-width-icon)}.Sidebar_variant-sidebar__fAe77[data-side=left]{border-right:1px solid #e5e7eb}.Sidebar_variant-sidebar__fAe77[data-side=right]{border-left:1px solid #e5e7eb}.Sidebar_sidebarMenuButton__vIEh->span,.Sidebar_sidebarMenuSubButton__c9flh>span{min-width:0;text-transform:capitalize}.Sidebar_sidebarMenuButton__vIEh->span:first-child,.Sidebar_sidebarMenuSubButton__c9flh>span:first-child{flex-grow:1}.Sidebar_sidebarMenuButton__vIEh-{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;font-size:.875rem;gap:var(--p-2);justify-content:flex-start;outline:none;overflow:hidden;padding:var(--p-6) var(--p-3);text-align:left;text-decoration:none;transition:all;width:100%}.Sidebar_sidebarMenuButton__vIEh-:visited{color:var(--sidebar-foreground)}.Sidebar_sidebarMenuButton__vIEh-:hover{text-decoration:none}.Sidebar_sidebarMenuSubItem__fTHJa:active .Sidebar_sidebarMenuButton__vIEh-,.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuButton__vIEh-,.Sidebar_sidebarMenuSubItem__fTHJa[data-state=open] .Sidebar_sidebarMenuButton__vIEh-{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuButton__vIEh-:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuButton__vIEh-:disabled,.Sidebar_sidebarMenuButton__vIEh-[aria-disabled=true]{opacity:.5;pointer-events:none}.Sidebar_sidebarMenuButton__vIEh-[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground);font-weight:500}.Sidebar_sidebarMenuButton__vIEh-[data-collapsible=icon]{height:2rem!important;padding:.5rem!important;width:2rem!important}.Sidebar_sidebarMenuButton__vIEh->span{flex-grow:1;line-height:20px;overflow:hidden;white-space:nowrap}.Sidebar_sidebarMenuButton__vIEh->svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-sm__7aIbu{font-size:.75rem;height:1.75rem}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-md__rcjmO{font-size:.875rem;height:var(--p-12)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-lg__1k76S{font-size:.875rem;height:3rem}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-lg__1k76S[data-collapsible=icon]{padding:0!important}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_variant-outline__UmtAz{background-color:var(--background);box-shadow:0 0 0 1px var(--sidebar-border)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_variant-outline__UmtAz:hover{background-color:var(--sidebar-accent);box-shadow:0 0 0 1px var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuButtonCta__dQAhv{display:flex;justify-content:flex-start;text-align:left;width:100%}.Sidebar_sidebarMenuButtonCta__dQAhv>svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarMenuAction__mFZa1{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);cursor:pointer;display:flex;justify-content:center;opacity:0;outline:none;padding:0;position:absolute;right:var(--p-2);top:var(--p-2);transition:transform;width:1.25rem}.Sidebar_sidebarMenuAction__mFZa1:before{background-image:linear-gradient(to left,var(--sidebar-accent) 70%,transparent 100%);content:\"\";height:100%;pointer-events:none;position:absolute;right:0;transition:opacity .2s ease-in-out;width:calc(100% + var(--p-4))}.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuAction__mFZa1{opacity:1}.Sidebar_sidebarMenuAction__mFZa1:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuAction__mFZa1>svg{flex-shrink:0;height:1rem;opacity:.5;pointer-events:none;transition:opacity .2s ease-in-out;width:1rem;z-index:1}.Sidebar_sidebarMenuAction__mFZa1:hover>svg{opacity:1}.Sidebar_sidebarMenuAction__mFZa1:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.Sidebar_sidebarMenuAction__mFZa1:after{display:none}}.Sidebar_sidebarMenuAction__mFZa1[data-size=sm]{top:.25rem}.Sidebar_sidebarMenuAction__mFZa1[data-size=md]{top:.375rem}.Sidebar_sidebarMenuAction__mFZa1[data-size=lg]{top:.625rem}.Sidebar_sidebarMenuAction__mFZa1[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA[data-active=true]{color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA[data-state=open]{opacity:1}@media (min-width:768px){.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA{opacity:0}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA:focus-within,.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA:hover{opacity:1}}.Sidebar_sidebarMenuSubButton__c9flh{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;gap:var(--p-1);height:var(--p-9);margin-left:var(--p-3);min-width:0;outline:none;overflow:hidden;padding:var(--p-1) var(--p-2);text-decoration:none;transform:translateX(-1px)}.Sidebar_sidebarMenuSubButton__c9flh:visited{color:var(--sidebar-foreground)}.Sidebar_sidebarMenuSubButton__c9flh:hover{text-decoration:none}.Sidebar_sidebarMenuSubItem__fTHJa:active .Sidebar_sidebarMenuSubButton__c9flh,.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuSubButton__c9flh{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuSubButton__c9flh:disabled,.Sidebar_sidebarMenuSubButton__c9flh[aria-disabled=true]{opacity:.5;pointer-events:none}.Sidebar_sidebarMenuSubButton__c9flh[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh[data-active=true]:visited{color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSubButton__c9flh>span:first-child{overflow:hidden;white-space:nowrap}.Sidebar_sidebarMenuSubButton__c9flh>svg{color:var(--sidebar-accent-foreground);flex-shrink:0;height:1rem;width:1rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-sm__7aIbu{font-size:.75rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-md__rcjmO{font-size:.875rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-lg__1k76S{font-size:1rem}::view-transition-old(sidebar-container),::view-transition-old(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtOld__hlKqn;animation-timing-function:ease-out;transform:translateZ(0)}::view-transition-new(sidebar-container),::view-transition-new(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtNew__FFhYU;animation-timing-function:ease-out;transform:translateZ(0)}@keyframes Sidebar_sidebarVtOld__hlKqn{0%{opacity:1}to{opacity:0}}@keyframes Sidebar_sidebarVtNew__FFhYU{0%{opacity:0}to{opacity:1}}";
|
|
4
|
+
var SidebarStem = {"sidebarWrapper":"Sidebar_sidebarWrapper__DGm4P","sidebarMainShell":"Sidebar_sidebarMainShell__pSWDC","chatPanelMount":"Sidebar_chatPanelMount__1Zctx","sidebar":"Sidebar_sidebar__0vqNZ","sidebarTrigger":"Sidebar_sidebarTrigger__ipx2C","sidebarRail":"Sidebar_sidebarRail__uvSpl","sidebarResizeHandle":"Sidebar_sidebarResizeHandle__kuD6t","fullHeightResizer":"Sidebar_fullHeightResizer__jZXnw","sidebarInput":"Sidebar_sidebarInput__ujQLX","sidebarHeader":"Sidebar_sidebarHeader__X33ii","sidebarFooter":"Sidebar_sidebarFooter__V3O-l","sidebarSeparator":"Sidebar_sidebarSeparator__oUkYG","sidebarContent":"Sidebar_sidebarContent__Ywe1o","sidebarGroup":"Sidebar_sidebarGroup__7Mhg2","sidebarGroupAction":"Sidebar_sidebarGroupAction__OhVZq","sidebarMenu":"Sidebar_sidebarMenu__hYXIo","sidebarMenuItem":"Sidebar_sidebarMenuItem__CRhM8","sidebarMenuBadge":"Sidebar_sidebarMenuBadge__ttvCR","sidebarMenuSkeleton":"Sidebar_sidebarMenuSkeleton__u2KoI","sidebarMenuSkeletonIcon":"Sidebar_sidebarMenuSkeletonIcon__-1tvv","sidebarMenuSkeletonText":"Sidebar_sidebarMenuSkeletonText__dWzWo","sidebarMenuSub":"Sidebar_sidebarMenuSub__gh8Rn","sidebarMenuSubItem":"Sidebar_sidebarMenuSubItem__fTHJa","sheetContentSidebar":"Sidebar_sheetContentSidebar__cM2h2","sheetSidebarLogo":"Sidebar_sheetSidebarLogo__eGVDC","sheetSidebarInner":"Sidebar_sheetSidebarInner__U-SMQ","sidebarNone":"Sidebar_sidebarNone__crRsF","variant-floating":"Sidebar_variant-floating__-qvkJ","variant-inset":"Sidebar_variant-inset__oTfrV","variant-sidebar":"Sidebar_variant-sidebar__fAe77","sidebarMenuButton":"Sidebar_sidebarMenuButton__vIEh-","sidebarMenuSubButton":"Sidebar_sidebarMenuSubButton__c9flh","size-sm":"Sidebar_size-sm__7aIbu","size-md":"Sidebar_size-md__rcjmO","size-lg":"Sidebar_size-lg__1k76S","variant-outline":"Sidebar_variant-outline__UmtAz","sidebarMenuButtonCta":"Sidebar_sidebarMenuButtonCta__dQAhv","sidebarMenuAction":"Sidebar_sidebarMenuAction__mFZa1","showOnHover":"Sidebar_showOnHover__itXsA","sidebarVtOld":"Sidebar_sidebarVtOld__hlKqn","sidebarVtNew":"Sidebar_sidebarVtNew__FFhYU"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { SidebarStem as default };
|
|
@@ -12,6 +12,29 @@ import S from './WorkspaceAppSwitcher.styl.js';
|
|
|
12
12
|
function entryKey(entry) {
|
|
13
13
|
return entry.id;
|
|
14
14
|
}
|
|
15
|
+
function subtitleClassName(entry) {
|
|
16
|
+
return cn(S.sub, entry.subtitleTone === 'experimental' && S.subExperimental);
|
|
17
|
+
}
|
|
18
|
+
/** Overlay native app labels from host registry onto cached localStorage entries. */
|
|
19
|
+
function mergeDefaultAppsMetadata(apps, defaultApps) {
|
|
20
|
+
if (!defaultApps?.length) {
|
|
21
|
+
return apps;
|
|
22
|
+
}
|
|
23
|
+
const defaultsById = new Map(defaultApps.map(entry => [entry.id, entry]));
|
|
24
|
+
return apps.map(entry => {
|
|
25
|
+
const defaults = defaultsById.get(entry.id);
|
|
26
|
+
if (!defaults) {
|
|
27
|
+
return entry;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
...entry,
|
|
31
|
+
displayName: defaults.displayName,
|
|
32
|
+
subtitle: defaults.subtitle,
|
|
33
|
+
subtitleTone: defaults.subtitleTone,
|
|
34
|
+
icon: defaults.icon ?? entry.icon,
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
}
|
|
15
38
|
function renderIconContent(icon, iconKey) {
|
|
16
39
|
if (icon != null) {
|
|
17
40
|
return (jsx("span", { className: S.icon, "aria-hidden": true, children: icon }));
|
|
@@ -37,7 +60,7 @@ function useResolvedApps(appsStorageKey, defaultApps) {
|
|
|
37
60
|
appsStorageKey !== '') {
|
|
38
61
|
const fromLs = readWorkspaceAppsFromLocalStorage(appsStorageKey);
|
|
39
62
|
if (fromLs != null && fromLs.length > 0) {
|
|
40
|
-
return fromLs;
|
|
63
|
+
return mergeDefaultAppsMetadata(fromLs, defaultApps);
|
|
41
64
|
}
|
|
42
65
|
}
|
|
43
66
|
return defaultApps ?? [];
|
|
@@ -48,7 +71,9 @@ function useResolvedApps(appsStorageKey, defaultApps) {
|
|
|
48
71
|
return;
|
|
49
72
|
}
|
|
50
73
|
const fromLs = readWorkspaceAppsFromLocalStorage(appsStorageKey);
|
|
51
|
-
setApps(fromLs != null && fromLs.length > 0
|
|
74
|
+
setApps(fromLs != null && fromLs.length > 0
|
|
75
|
+
? mergeDefaultAppsMetadata(fromLs, defaultApps)
|
|
76
|
+
: (defaultApps ?? []));
|
|
52
77
|
}, [appsStorageKey, defaultApps]);
|
|
53
78
|
return apps;
|
|
54
79
|
}
|
|
@@ -62,11 +87,11 @@ function WorkspaceAppSwitcher({ pathname, onNavigate, authenticated = true, defa
|
|
|
62
87
|
if (!displayApp) {
|
|
63
88
|
return null;
|
|
64
89
|
}
|
|
65
|
-
return (jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs(Button, { variant: "ghost", className: S.trigger, "aria-label": "Select workspace app", children: [jsx(IconTile, { icon: displayApp.icon, iconKey: displayApp.iconKey, accentMuted: displayApp.accentMuted, accent: displayApp.accent }), jsxs("span", { className: S.textCol, children: [jsx("span", { className: S.name, children: displayApp.displayName }), jsx("span", { className:
|
|
90
|
+
return (jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs(Button, { variant: "ghost", className: S.trigger, "aria-label": "Select workspace app", children: [jsx(IconTile, { icon: displayApp.icon, iconKey: displayApp.iconKey, accentMuted: displayApp.accentMuted, accent: displayApp.accent }), jsxs("span", { className: S.textCol, children: [jsx("span", { className: S.name, children: displayApp.displayName }), jsx("span", { className: subtitleClassName(displayApp), children: displayApp.subtitle })] }), jsx(ChevronDown, { className: S.chevron, size: 12, "aria-hidden": true })] }) }), jsx(DropdownMenuContent, { className: S.menuContent, align: "start", sideOffset: 8, elevation: "md", children: apps.map(entry => {
|
|
66
91
|
const active = current != null ? entryKey(entry) === entryKey(current) : false;
|
|
67
92
|
return (jsxs(DropdownMenuItem, { className: cn(S.item, active && S.itemActive), onSelect: () => {
|
|
68
93
|
onNavigate(entry.href);
|
|
69
|
-
}, children: [jsx(IconTile, { icon: entry.icon, iconKey: entry.iconKey, accentMuted: entry.accentMuted, accent: entry.accent }), jsxs("span", { className: S.textCol, children: [jsx("span", { className: S.name, children: entry.displayName }), jsx("span", { className:
|
|
94
|
+
}, children: [jsx(IconTile, { icon: entry.icon, iconKey: entry.iconKey, accentMuted: entry.accentMuted, accent: entry.accent }), jsxs("span", { className: S.textCol, children: [jsx("span", { className: S.name, children: entry.displayName }), jsx("span", { className: subtitleClassName(entry), children: entry.subtitle })] })] }, entry.id));
|
|
70
95
|
}) })] }));
|
|
71
96
|
}
|
|
72
97
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.WorkspaceAppSwitcher_trigger__s6qYT{align-items:center;background:transparent;border:none;border-radius:12px;color:inherit;cursor:pointer;display:flex;font:inherit;gap:var(--p-2);height:auto;margin-left:var(--p-3)!important;max-width:320px;padding:var(--p-1)!important;padding-right:var(--p-3)!important;text-align:left}.WorkspaceAppSwitcher_trigger__s6qYT:hover{background-color:var(--muted)}@media (max-width:768px){.WorkspaceAppSwitcher_trigger__s6qYT{gap:0;margin-left:0!important;max-width:none;padding-right:var(--p-1)!important}.WorkspaceAppSwitcher_trigger__s6qYT .WorkspaceAppSwitcher_chevron__7kAqO,.WorkspaceAppSwitcher_trigger__s6qYT .WorkspaceAppSwitcher_textCol__K1gfI{display:none}}.WorkspaceAppSwitcher_iconTile__tVDr8{align-items:center;border-radius:10px;color:var(--fg-color);display:flex;flex-shrink:0;height:40px;justify-content:center;position:relative;width:40px}.WorkspaceAppSwitcher_iconTile__tVDr8:after,.WorkspaceAppSwitcher_iconTile__tVDr8:before{border-radius:inherit;content:\"\";display:block;height:100%;position:absolute;width:100%}.WorkspaceAppSwitcher_iconTile__tVDr8:before{background-color:var(--background)}.WorkspaceAppSwitcher_iconTile__tVDr8:after{background-color:var(--bg-color)}.WorkspaceAppSwitcher_icon__Jgw14{align-items:center;display:flex;justify-content:center;z-index:1}.WorkspaceAppSwitcher_icon__Jgw14,.WorkspaceAppSwitcher_icon__Jgw14 svg{color:var(--fg-color)!important;height:22px!important;width:22px!important}.WorkspaceAppSwitcher_textCol__K1gfI{display:flex;flex:1;flex-direction:column;gap:2px;min-width:0}.WorkspaceAppSwitcher_name__ewMYP{color:var(--foreground);font-size:var(--text-sm);font-weight:600}.WorkspaceAppSwitcher_name__ewMYP,.WorkspaceAppSwitcher_sub__b7w1p{line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.WorkspaceAppSwitcher_sub__b7w1p{color:var(--muted-foreground);font-size:var(--text-xs)}.WorkspaceAppSwitcher_menuContent__4-UNY{max-width:360px;min-width:280px}.WorkspaceAppSwitcher_item__nnufY{align-items:center;cursor:pointer;display:flex;gap:var(--p-3);outline:none;padding:var(--p-3)}.WorkspaceAppSwitcher_itemActive__3mPlO{background-color:var(--muted)}";
|
|
4
|
-
var S = {"trigger":"WorkspaceAppSwitcher_trigger__s6qYT","textCol":"WorkspaceAppSwitcher_textCol__K1gfI","chevron":"WorkspaceAppSwitcher_chevron__7kAqO","iconTile":"WorkspaceAppSwitcher_iconTile__tVDr8","icon":"WorkspaceAppSwitcher_icon__Jgw14","name":"WorkspaceAppSwitcher_name__ewMYP","sub":"WorkspaceAppSwitcher_sub__b7w1p","menuContent":"WorkspaceAppSwitcher_menuContent__4-UNY","item":"WorkspaceAppSwitcher_item__nnufY","itemActive":"WorkspaceAppSwitcher_itemActive__3mPlO"};
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.WorkspaceAppSwitcher_trigger__s6qYT{align-items:center;background:transparent;border:none;border-radius:12px;color:inherit;cursor:pointer;display:flex;font:inherit;gap:var(--p-2);height:auto;margin-left:var(--p-3)!important;max-width:320px;padding:var(--p-1)!important;padding-right:var(--p-3)!important;text-align:left}.WorkspaceAppSwitcher_trigger__s6qYT:hover{background-color:var(--muted)}@media (max-width:768px){.WorkspaceAppSwitcher_trigger__s6qYT{gap:0;margin-left:0!important;max-width:none;padding-right:var(--p-1)!important}.WorkspaceAppSwitcher_trigger__s6qYT .WorkspaceAppSwitcher_chevron__7kAqO,.WorkspaceAppSwitcher_trigger__s6qYT .WorkspaceAppSwitcher_textCol__K1gfI{display:none}}.WorkspaceAppSwitcher_iconTile__tVDr8{align-items:center;border-radius:10px;color:var(--fg-color);display:flex;flex-shrink:0;height:40px;justify-content:center;position:relative;width:40px}.WorkspaceAppSwitcher_iconTile__tVDr8:after,.WorkspaceAppSwitcher_iconTile__tVDr8:before{border-radius:inherit;content:\"\";display:block;height:100%;position:absolute;width:100%}.WorkspaceAppSwitcher_iconTile__tVDr8:before{background-color:var(--background)}.WorkspaceAppSwitcher_iconTile__tVDr8:after{background-color:var(--bg-color)}.WorkspaceAppSwitcher_icon__Jgw14{align-items:center;display:flex;justify-content:center;z-index:1}.WorkspaceAppSwitcher_icon__Jgw14,.WorkspaceAppSwitcher_icon__Jgw14 svg{color:var(--fg-color)!important;height:22px!important;width:22px!important}.WorkspaceAppSwitcher_textCol__K1gfI{display:flex;flex:1;flex-direction:column;gap:2px;min-width:0}.WorkspaceAppSwitcher_name__ewMYP{color:var(--foreground);font-size:var(--text-sm);font-weight:600}.WorkspaceAppSwitcher_name__ewMYP,.WorkspaceAppSwitcher_sub__b7w1p{line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.WorkspaceAppSwitcher_sub__b7w1p{color:var(--muted-foreground);font-size:var(--text-xs)}.WorkspaceAppSwitcher_sub__b7w1p.WorkspaceAppSwitcher_subExperimental__-zHVr{color:var(--sb-red-400);opacity:.8}.dark .WorkspaceAppSwitcher_sub__b7w1p.WorkspaceAppSwitcher_subExperimental__-zHVr{color:var(--sb-red-400)}.WorkspaceAppSwitcher_menuContent__4-UNY{max-width:360px;min-width:280px}.WorkspaceAppSwitcher_item__nnufY{align-items:center;cursor:pointer;display:flex;gap:var(--p-3);outline:none;padding:var(--p-3)}.WorkspaceAppSwitcher_itemActive__3mPlO{background-color:var(--muted)}";
|
|
4
|
+
var S = {"trigger":"WorkspaceAppSwitcher_trigger__s6qYT","textCol":"WorkspaceAppSwitcher_textCol__K1gfI","chevron":"WorkspaceAppSwitcher_chevron__7kAqO","iconTile":"WorkspaceAppSwitcher_iconTile__tVDr8","icon":"WorkspaceAppSwitcher_icon__Jgw14","name":"WorkspaceAppSwitcher_name__ewMYP","sub":"WorkspaceAppSwitcher_sub__b7w1p","subExperimental":"WorkspaceAppSwitcher_subExperimental__-zHVr","menuContent":"WorkspaceAppSwitcher_menuContent__4-UNY","item":"WorkspaceAppSwitcher_item__nnufY","itemActive":"WorkspaceAppSwitcher_itemActive__3mPlO"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { S as default };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { isWorkspaceAppIconKey } from './workspaceAppIcons.js';
|
|
2
2
|
|
|
3
|
+
function isWorkspaceAppSubtitleTone(v) {
|
|
4
|
+
return v === 'default' || v === 'experimental';
|
|
5
|
+
}
|
|
3
6
|
function parseEntry(raw) {
|
|
4
7
|
if (!raw || typeof raw !== 'object') {
|
|
5
8
|
return null;
|
|
@@ -12,6 +15,7 @@ function parseEntry(raw) {
|
|
|
12
15
|
const accent = o.accent;
|
|
13
16
|
const accentMuted = o.accentMuted;
|
|
14
17
|
const href = o.href;
|
|
18
|
+
const subtitleToneRaw = o.subtitleTone;
|
|
15
19
|
const prefixesRaw = o.matchPathPrefixes;
|
|
16
20
|
if (typeof idRaw !== 'string' ||
|
|
17
21
|
!idRaw ||
|
|
@@ -35,7 +39,7 @@ function parseEntry(raw) {
|
|
|
35
39
|
matchPathPrefixes = prefixes;
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
|
-
|
|
42
|
+
const entry = {
|
|
39
43
|
id: idRaw,
|
|
40
44
|
displayName,
|
|
41
45
|
subtitle,
|
|
@@ -45,6 +49,10 @@ function parseEntry(raw) {
|
|
|
45
49
|
href,
|
|
46
50
|
matchPathPrefixes,
|
|
47
51
|
};
|
|
52
|
+
if (subtitleToneRaw != null && isWorkspaceAppSubtitleTone(subtitleToneRaw)) {
|
|
53
|
+
entry.subtitleTone = subtitleToneRaw;
|
|
54
|
+
}
|
|
55
|
+
return entry;
|
|
48
56
|
}
|
|
49
57
|
/**
|
|
50
58
|
* Read validated workspace apps JSON from localStorage; returns null if missing or invalid.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SybilionAppHeader_actionsAnchor__ress2,.SybilionAppHeader_pageActionsPortal__9C5ww{align-items:center;display:flex;flex-shrink:0;gap:var(--p-4)}.SybilionAppHeader_pageActionsPortal__9C5ww:empty{display:none}.SybilionAppHeader_logoArea__3HAhG{align-items:center;display:flex;gap:var(--p-2);left:40px;position:absolute;top:22px;z-index:10}@media (max-width:768px){.SybilionAppHeader_logoArea__3HAhG{left:
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SybilionAppHeader_actionsAnchor__ress2,.SybilionAppHeader_pageActionsPortal__9C5ww{align-items:center;display:flex;flex-shrink:0;gap:var(--p-4)}.SybilionAppHeader_pageActionsPortal__9C5ww:empty{display:none}.SybilionAppHeader_logoArea__3HAhG{align-items:center;display:flex;gap:var(--p-2);left:40px;position:absolute;top:22px;z-index:10}@media (max-width:768px){.SybilionAppHeader_logoArea__3HAhG{left:22px}}@media (min-width:768px){[data-slot=sidebar-wrapper][data-state=expanded]:not([data-slot=app-shell] [data-slot=sidebar-wrapper]) [data-slot=app-shell]:not([data-slot=app-shell] [data-slot=app-shell]) .SybilionAppHeader_logoArea__3HAhG:not([data-slot=app-shell] [data-slot=app-shell] *){left:calc(var(--sidebar-width)*-1 + 52px);position:absolute}[data-slot=app-shell] [data-slot=sidebar-wrapper][data-state=expanded] [data-slot=app-shell] .SybilionAppHeader_logoArea__3HAhG{left:calc(var(--sidebar-width)*-1 + 44px);position:absolute}[data-slot=app-shell] [data-slot=sidebar-wrapper][data-state=collapsed] [data-slot=app-shell] .SybilionAppHeader_logoArea__3HAhG{left:var(--p-8);position:absolute}}.SybilionAppHeader_logoLink__bH-KX{align-items:center;color:var(--color-foreground);display:flex;font-size:1.5rem;font-weight:400;gap:.5rem;text-decoration:none;white-space:nowrap;width:-moz-fit-content;width:fit-content}.SybilionAppHeader_logoLink__bH-KX svg{display:inline-flex;flex-shrink:0;height:32px;transition:transform .1s ease-in-out;width:auto}.SybilionAppHeader_logoLink__bH-KX:hover svg{transform:scale(1.05)}";
|
|
4
4
|
var S = {"actionsAnchor":"SybilionAppHeader_actionsAnchor__ress2","pageActionsPortal":"SybilionAppHeader_pageActionsPortal__9C5ww","logoArea":"SybilionAppHeader_logoArea__3HAhG","logoLink":"SybilionAppHeader_logoLink__bH-KX"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LogoProps } from './Logo.types';
|
|
2
1
|
import LogoMarkSvg from './logo.svg';
|
|
2
|
+
import type { LogoProps } from './Logo.types';
|
|
3
3
|
export { LogoMarkSvg as LogoMark };
|
|
4
4
|
/**
|
|
5
5
|
* Public URL for standalone apps. Copy `@sybilion/uilib/logo.svg` (Logo component asset)
|
|
@@ -7,4 +7,4 @@ export { LogoMarkSvg as LogoMark };
|
|
|
7
7
|
* Same path as the favicon `<link href>`.
|
|
8
8
|
*/
|
|
9
9
|
export declare const SYBILION_STANDALONE_LOGO_PUBLIC_URL: "/logo.svg";
|
|
10
|
-
export declare function Logo({ showText, size, className, ...props }: LogoProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function Logo({ showText, brandText, size, className, ...props }: LogoProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -39,6 +39,7 @@ type SidebarProps = ComponentProps<'div'> & {
|
|
|
39
39
|
variant?: 'sidebar' | 'floating' | 'inset';
|
|
40
40
|
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
41
41
|
fullHeightResizer?: boolean;
|
|
42
|
+
brandText?: string;
|
|
42
43
|
};
|
|
43
44
|
declare function useSidebar(): SidebarContextProps;
|
|
44
45
|
declare function SidebarProvider({ defaultOpen, className, style, children, userId, sidebarWidthStorageKey, persistSidebarWidthWithoutConsent, ...props }: ComponentProps<'div'> & {
|
|
@@ -51,7 +52,7 @@ declare function SidebarProvider({ defaultOpen, className, style, children, user
|
|
|
51
52
|
/** When true, sidebar width is saved without functional cookie consent (e.g. internal docs). */
|
|
52
53
|
persistSidebarWidthWithoutConsent?: boolean;
|
|
53
54
|
}): import("react/jsx-runtime").JSX.Element;
|
|
54
|
-
declare function Sidebar({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, side, variant, collapsible, children, fullHeightResizer, ...props }: SidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
declare function Sidebar({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, side, variant, collapsible, children, fullHeightResizer, brandText, ...props }: SidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
55
56
|
declare function SidebarTrigger({ className, onClick, ...props }: ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
|
|
56
57
|
declare function SidebarRail({ className, ...props }: ComponentProps<'button'>): import("react/jsx-runtime").JSX.Element;
|
|
57
58
|
declare function PanelResizeHandle({ className, edge, isActive, startWidthPx, getShellWidth, onDragWidth, onDragComplete, ...props }: ComponentProps<'div'> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { WorkspaceAppSwitcher, type WorkspaceAppSwitcherProps, } from './WorkspaceAppSwitcher';
|
|
2
|
-
export type { WorkspaceAppEntry } from './workspaceApp.types';
|
|
2
|
+
export type { WorkspaceAppEntry, WorkspaceAppSubtitleTone, } from './workspaceApp.types';
|
|
3
3
|
export { WORKSPACE_APP_SLUG_BASE_PATH } from './workspaceApp.types';
|
|
4
4
|
export { WORKSPACE_APPS_LS_KEY } from './workspaceAppsConstants';
|
|
5
5
|
export { readWorkspaceAppsFromLocalStorage, writeWorkspaceAppsToLocalStorage, } from './workspaceAppsLocalStorage';
|
|
@@ -2,12 +2,15 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import type { WorkspaceAppIconKey } from './workspaceAppIcons';
|
|
3
3
|
/** Path segment for slug apps: pathname matches `/apps/{id}` */
|
|
4
4
|
export declare const WORKSPACE_APP_SLUG_BASE_PATH = "/apps";
|
|
5
|
+
export type WorkspaceAppSubtitleTone = 'default' | 'experimental';
|
|
5
6
|
/** One surface in the workspace app switcher (serializable for localStorage). */
|
|
6
7
|
export type WorkspaceAppEntry = {
|
|
7
8
|
/** Slug (e.g. `my-custom-app` → `https://sybilion.io/apps/my-custom-app` via `href`). */
|
|
8
9
|
id: string;
|
|
9
10
|
displayName: string;
|
|
10
11
|
subtitle: string;
|
|
12
|
+
/** Optional subtitle color tone; defaults to muted foreground. */
|
|
13
|
+
subtitleTone?: WorkspaceAppSubtitleTone;
|
|
11
14
|
/** Custom icon for display; not persisted to localStorage. */
|
|
12
15
|
icon?: ReactNode;
|
|
13
16
|
/** Built-in icon lookup when `icon` is omitted (required for localStorage entries). */
|
package/package.json
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
background-color var(--color-background)
|
|
14
14
|
|
|
15
15
|
@media (max-width MOBILE)
|
|
16
|
-
padding-left
|
|
16
|
+
padding-left 300px
|
|
17
17
|
max-width 100%
|
|
18
18
|
|
|
19
19
|
@media (min-width MOBILE)
|
|
20
20
|
:global([data-slot='sidebar-wrapper'][data-state='collapsed']) &
|
|
21
|
-
padding-left
|
|
21
|
+
padding-left 300px
|
|
22
22
|
max-width 100%
|
|
23
23
|
|
|
24
24
|
.sticky
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import cn from 'classnames';
|
|
2
|
-
|
|
3
|
-
import S from './Logo.styl';
|
|
4
|
-
import type { LogoProps } from './Logo.types';
|
|
5
1
|
import LogoMarkSvg from './logo.svg';
|
|
2
|
+
import type { LogoProps } from './Logo.types';
|
|
3
|
+
import S from './Logo.styl';
|
|
4
|
+
import cn from 'classnames';
|
|
6
5
|
|
|
7
6
|
export { LogoMarkSvg as LogoMark };
|
|
8
7
|
|
|
@@ -15,6 +14,7 @@ export const SYBILION_STANDALONE_LOGO_PUBLIC_URL = '/logo.svg' as const;
|
|
|
15
14
|
|
|
16
15
|
export function Logo({
|
|
17
16
|
showText = true,
|
|
17
|
+
brandText = 'Sybilion',
|
|
18
18
|
size = 'md',
|
|
19
19
|
className,
|
|
20
20
|
...props
|
|
@@ -27,7 +27,7 @@ export function Logo({
|
|
|
27
27
|
? { 'aria-hidden': true }
|
|
28
28
|
: { 'aria-label': 'Sybilion', role: 'img' })}
|
|
29
29
|
/>
|
|
30
|
-
{showText && <span className={S.text}>
|
|
30
|
+
{showText && <span className={S.text}>{brandText}</span>}
|
|
31
31
|
</div>
|
|
32
32
|
);
|
|
33
33
|
}
|
|
@@ -379,6 +379,12 @@
|
|
|
379
379
|
@media (max-width: MOBILE)
|
|
380
380
|
z-index 100
|
|
381
381
|
|
|
382
|
+
// Mobile sheet: logo in document flow above sidebar content
|
|
383
|
+
.sheetSidebarLogo
|
|
384
|
+
position relative
|
|
385
|
+
flex-shrink 0
|
|
386
|
+
padding var(--p-6) var(--p-8) var(--p-2)
|
|
387
|
+
|
|
382
388
|
// Sheet sidebar inner
|
|
383
389
|
.sheetSidebarInner
|
|
384
390
|
display flex
|
|
@@ -387,6 +393,13 @@
|
|
|
387
393
|
flex-direction column
|
|
388
394
|
background-color var(--sidebar)
|
|
389
395
|
|
|
396
|
+
.sidebarContent
|
|
397
|
+
position relative
|
|
398
|
+
flex 1
|
|
399
|
+
min-height 0
|
|
400
|
+
height auto
|
|
401
|
+
max-height none
|
|
402
|
+
|
|
390
403
|
// Sidebar none
|
|
391
404
|
.sidebarNone
|
|
392
405
|
color var(--sidebar-foreground)
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
|
|
16
16
|
import { Button } from '#uilib/components/ui/Button';
|
|
17
17
|
import type { ButtonProps } from '#uilib/components/ui/Button/Button.types';
|
|
18
|
+
import { Logo } from '#uilib/components/ui/Logo/Logo';
|
|
18
19
|
import { Separator } from '#uilib/components/ui/Separator';
|
|
19
20
|
import { Sheet, SheetContent, SheetTitle } from '#uilib/components/ui/Sheet';
|
|
20
21
|
import {
|
|
@@ -124,6 +125,7 @@ type SidebarProps = ComponentProps<'div'> & {
|
|
|
124
125
|
variant?: 'sidebar' | 'floating' | 'inset';
|
|
125
126
|
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
126
127
|
fullHeightResizer?: boolean;
|
|
128
|
+
brandText?: string;
|
|
127
129
|
};
|
|
128
130
|
|
|
129
131
|
const SidebarContext = createContext<SidebarContextProps | null>(null);
|
|
@@ -524,14 +526,20 @@ function Sidebar({
|
|
|
524
526
|
collapsible = 'offcanvas',
|
|
525
527
|
children,
|
|
526
528
|
fullHeightResizer = false,
|
|
529
|
+
brandText = 'Sybilion',
|
|
527
530
|
...props
|
|
528
531
|
}: SidebarProps) {
|
|
529
532
|
const isSidebarSheetLayout = useIsSidebarSheetLayout();
|
|
530
533
|
const { isOpen, setOpen } = useSidebar();
|
|
531
534
|
|
|
532
|
-
|
|
535
|
+
const prevSheetLayoutRef = useRef(isSidebarSheetLayout);
|
|
536
|
+
|
|
537
|
+
/** Narrow shell: sidebar is a sheet; collapse only when crossing into this mode. */
|
|
533
538
|
useEffect(() => {
|
|
534
|
-
|
|
539
|
+
const enteredSheetLayout =
|
|
540
|
+
isSidebarSheetLayout && !prevSheetLayoutRef.current;
|
|
541
|
+
prevSheetLayoutRef.current = isSidebarSheetLayout;
|
|
542
|
+
if (enteredSheetLayout) setOpen(false);
|
|
535
543
|
}, [isSidebarSheetLayout, setOpen]);
|
|
536
544
|
|
|
537
545
|
if (collapsible === 'none') {
|
|
@@ -561,8 +569,12 @@ function Sidebar({
|
|
|
561
569
|
}
|
|
562
570
|
side={side}
|
|
563
571
|
>
|
|
564
|
-
<
|
|
565
|
-
|
|
572
|
+
<div className={cn(S.sheetSidebarInner)}>
|
|
573
|
+
<div className={S.sheetSidebarLogo}>
|
|
574
|
+
<Logo size="md" brandText={brandText} />
|
|
575
|
+
</div>
|
|
576
|
+
{children}
|
|
577
|
+
</div>
|
|
566
578
|
</SheetContent>
|
|
567
579
|
</Sheet>
|
|
568
580
|
);
|
|
@@ -32,6 +32,34 @@ function entryKey(entry: WorkspaceAppEntry): string {
|
|
|
32
32
|
return entry.id;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
function subtitleClassName(entry: WorkspaceAppEntry): string {
|
|
36
|
+
return cn(S.sub, entry.subtitleTone === 'experimental' && S.subExperimental);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Overlay native app labels from host registry onto cached localStorage entries. */
|
|
40
|
+
function mergeDefaultAppsMetadata(
|
|
41
|
+
apps: WorkspaceAppEntry[],
|
|
42
|
+
defaultApps: WorkspaceAppEntry[] | undefined,
|
|
43
|
+
): WorkspaceAppEntry[] {
|
|
44
|
+
if (!defaultApps?.length) {
|
|
45
|
+
return apps;
|
|
46
|
+
}
|
|
47
|
+
const defaultsById = new Map(defaultApps.map(entry => [entry.id, entry]));
|
|
48
|
+
return apps.map(entry => {
|
|
49
|
+
const defaults = defaultsById.get(entry.id);
|
|
50
|
+
if (!defaults) {
|
|
51
|
+
return entry;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
...entry,
|
|
55
|
+
displayName: defaults.displayName,
|
|
56
|
+
subtitle: defaults.subtitle,
|
|
57
|
+
subtitleTone: defaults.subtitleTone,
|
|
58
|
+
icon: defaults.icon ?? entry.icon,
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
35
63
|
function renderIconContent(
|
|
36
64
|
icon: ReactNode | undefined,
|
|
37
65
|
iconKey: WorkspaceAppEntry['iconKey'],
|
|
@@ -90,7 +118,7 @@ function useResolvedApps(
|
|
|
90
118
|
) {
|
|
91
119
|
const fromLs = readWorkspaceAppsFromLocalStorage(appsStorageKey);
|
|
92
120
|
if (fromLs != null && fromLs.length > 0) {
|
|
93
|
-
return fromLs;
|
|
121
|
+
return mergeDefaultAppsMetadata(fromLs, defaultApps);
|
|
94
122
|
}
|
|
95
123
|
}
|
|
96
124
|
return defaultApps ?? [];
|
|
@@ -102,7 +130,11 @@ function useResolvedApps(
|
|
|
102
130
|
return;
|
|
103
131
|
}
|
|
104
132
|
const fromLs = readWorkspaceAppsFromLocalStorage(appsStorageKey);
|
|
105
|
-
setApps(
|
|
133
|
+
setApps(
|
|
134
|
+
fromLs != null && fromLs.length > 0
|
|
135
|
+
? mergeDefaultAppsMetadata(fromLs, defaultApps)
|
|
136
|
+
: (defaultApps ?? []),
|
|
137
|
+
);
|
|
106
138
|
}, [appsStorageKey, defaultApps]);
|
|
107
139
|
|
|
108
140
|
return apps;
|
|
@@ -144,7 +176,9 @@ export function WorkspaceAppSwitcher({
|
|
|
144
176
|
/>
|
|
145
177
|
<span className={S.textCol}>
|
|
146
178
|
<span className={S.name}>{displayApp.displayName}</span>
|
|
147
|
-
<span className={
|
|
179
|
+
<span className={subtitleClassName(displayApp)}>
|
|
180
|
+
{displayApp.subtitle}
|
|
181
|
+
</span>
|
|
148
182
|
</span>
|
|
149
183
|
<ChevronDown className={S.chevron} size={12} aria-hidden />
|
|
150
184
|
</Button>
|
|
@@ -175,7 +209,9 @@ export function WorkspaceAppSwitcher({
|
|
|
175
209
|
/>
|
|
176
210
|
<span className={S.textCol}>
|
|
177
211
|
<span className={S.name}>{entry.displayName}</span>
|
|
178
|
-
<span className={
|
|
212
|
+
<span className={subtitleClassName(entry)}>
|
|
213
|
+
{entry.subtitle}
|
|
214
|
+
</span>
|
|
179
215
|
</span>
|
|
180
216
|
</DropdownMenuItem>
|
|
181
217
|
);
|
|
@@ -2,7 +2,10 @@ export {
|
|
|
2
2
|
WorkspaceAppSwitcher,
|
|
3
3
|
type WorkspaceAppSwitcherProps,
|
|
4
4
|
} from './WorkspaceAppSwitcher';
|
|
5
|
-
export type {
|
|
5
|
+
export type {
|
|
6
|
+
WorkspaceAppEntry,
|
|
7
|
+
WorkspaceAppSubtitleTone,
|
|
8
|
+
} from './workspaceApp.types';
|
|
6
9
|
export { WORKSPACE_APP_SLUG_BASE_PATH } from './workspaceApp.types';
|
|
7
10
|
export { WORKSPACE_APPS_LS_KEY } from './workspaceAppsConstants';
|
|
8
11
|
export {
|
|
@@ -5,12 +5,16 @@ import type { WorkspaceAppIconKey } from './workspaceAppIcons';
|
|
|
5
5
|
/** Path segment for slug apps: pathname matches `/apps/{id}` */
|
|
6
6
|
export const WORKSPACE_APP_SLUG_BASE_PATH = '/apps';
|
|
7
7
|
|
|
8
|
+
export type WorkspaceAppSubtitleTone = 'default' | 'experimental';
|
|
9
|
+
|
|
8
10
|
/** One surface in the workspace app switcher (serializable for localStorage). */
|
|
9
11
|
export type WorkspaceAppEntry = {
|
|
10
12
|
/** Slug (e.g. `my-custom-app` → `https://sybilion.io/apps/my-custom-app` via `href`). */
|
|
11
13
|
id: string;
|
|
12
14
|
displayName: string;
|
|
13
15
|
subtitle: string;
|
|
16
|
+
/** Optional subtitle color tone; defaults to muted foreground. */
|
|
17
|
+
subtitleTone?: WorkspaceAppSubtitleTone;
|
|
14
18
|
/** Custom icon for display; not persisted to localStorage. */
|
|
15
19
|
icon?: ReactNode;
|
|
16
20
|
/** Built-in icon lookup when `icon` is omitted (required for localStorage entries). */
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
WorkspaceAppEntry,
|
|
3
|
+
WorkspaceAppSubtitleTone,
|
|
4
|
+
} from './workspaceApp.types';
|
|
2
5
|
import { isWorkspaceAppIconKey } from './workspaceAppIcons';
|
|
3
6
|
|
|
7
|
+
function isWorkspaceAppSubtitleTone(v: unknown): v is WorkspaceAppSubtitleTone {
|
|
8
|
+
return v === 'default' || v === 'experimental';
|
|
9
|
+
}
|
|
10
|
+
|
|
4
11
|
function parseEntry(raw: unknown): WorkspaceAppEntry | null {
|
|
5
12
|
if (!raw || typeof raw !== 'object') {
|
|
6
13
|
return null;
|
|
@@ -13,6 +20,7 @@ function parseEntry(raw: unknown): WorkspaceAppEntry | null {
|
|
|
13
20
|
const accent = o.accent;
|
|
14
21
|
const accentMuted = o.accentMuted;
|
|
15
22
|
const href = o.href;
|
|
23
|
+
const subtitleToneRaw = o.subtitleTone;
|
|
16
24
|
const prefixesRaw = o.matchPathPrefixes;
|
|
17
25
|
|
|
18
26
|
if (
|
|
@@ -43,7 +51,7 @@ function parseEntry(raw: unknown): WorkspaceAppEntry | null {
|
|
|
43
51
|
}
|
|
44
52
|
}
|
|
45
53
|
|
|
46
|
-
|
|
54
|
+
const entry: WorkspaceAppEntry = {
|
|
47
55
|
id: idRaw,
|
|
48
56
|
displayName,
|
|
49
57
|
subtitle,
|
|
@@ -53,6 +61,12 @@ function parseEntry(raw: unknown): WorkspaceAppEntry | null {
|
|
|
53
61
|
href,
|
|
54
62
|
matchPathPrefixes,
|
|
55
63
|
};
|
|
64
|
+
|
|
65
|
+
if (subtitleToneRaw != null && isWorkspaceAppSubtitleTone(subtitleToneRaw)) {
|
|
66
|
+
entry.subtitleTone = subtitleToneRaw;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return entry;
|
|
56
70
|
}
|
|
57
71
|
|
|
58
72
|
/**
|
package/src/docs/App/App.tsx
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
AppBanner,
|
|
3
|
+
AppShell,
|
|
4
|
+
AppShellMainContent,
|
|
5
|
+
} from '#uilib/components/ui/Page';
|
|
6
|
+
import {
|
|
7
|
+
DOCS_CHAT_USER_KEY,
|
|
8
|
+
DOCS_SIDEBAR_WIDTH_LS_KEY,
|
|
9
|
+
} from '../docsConstants';
|
|
3
10
|
import {
|
|
4
11
|
Link,
|
|
5
12
|
Navigate,
|
|
@@ -12,27 +19,20 @@ import {
|
|
|
12
19
|
|
|
13
20
|
import { AppHeaderHost } from '#uilib/components/ui/AppHeader';
|
|
14
21
|
import { Button } from '#uilib/components/ui/Button';
|
|
15
|
-
import {
|
|
16
|
-
AppBanner,
|
|
17
|
-
AppShell,
|
|
18
|
-
AppShellMainContent,
|
|
19
|
-
} from '#uilib/components/ui/Page';
|
|
20
|
-
import { PageFooter } from '#uilib/components/ui/Page/PageFooter/PageFooter';
|
|
21
|
-
import { PageScroll } from '#uilib/components/ui/Page/PageScroll/PageScroll';
|
|
22
|
-
import { SidebarProvider } from '#uilib/components/ui/Sidebar/Sidebar';
|
|
23
|
-
import { SybilionAppHeader } from '#uilib/components/widgets/SybilionAppHeader';
|
|
24
22
|
import { ChatProvider } from '#uilib/contexts/chat-context';
|
|
25
|
-
import { DocsSidebar } from '#uilib/docs/components/DocsSidebar/DocsSidebar';
|
|
26
23
|
import type { ChatResponse } from '#uilib/types/chat-api.types';
|
|
27
|
-
|
|
24
|
+
import { DOC_DEFAULT_SLUG } from '../registry';
|
|
28
25
|
import { DocPage } from '../DocPage';
|
|
26
|
+
import { DocsSidebar } from '#uilib/docs/components/DocsSidebar/DocsSidebar';
|
|
27
|
+
import { Logo } from '#uilib/components/ui/Logo';
|
|
28
|
+
import { PageFooter } from '#uilib/components/ui/Page/PageFooter/PageFooter';
|
|
29
|
+
import { PageScroll } from '#uilib/components/ui/Page/PageScroll/PageScroll';
|
|
29
30
|
import S from '../DocsShell.styl';
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
DOCS_SIDEBAR_WIDTH_LS_KEY,
|
|
33
|
-
} from '../docsConstants';
|
|
34
|
-
import { DOC_DEFAULT_SLUG } from '../registry';
|
|
31
|
+
import { SidebarProvider } from '#uilib/components/ui/Sidebar/Sidebar';
|
|
32
|
+
import { SybilionAppHeader } from '#uilib/components/widgets/SybilionAppHeader';
|
|
35
33
|
import { ThemeToggle } from './ThemeToggle';
|
|
34
|
+
import cn from 'classnames';
|
|
35
|
+
import { useState } from 'react';
|
|
36
36
|
|
|
37
37
|
async function mockDocsSendChatMessage(
|
|
38
38
|
message: string,
|
|
@@ -70,7 +70,11 @@ function DocsLayout() {
|
|
|
70
70
|
<AppShellMainContent
|
|
71
71
|
header={<AppHeaderHost sticky />}
|
|
72
72
|
footer={
|
|
73
|
-
<PageFooter
|
|
73
|
+
<PageFooter
|
|
74
|
+
brandText="Sybilion Design"
|
|
75
|
+
versionLink="/releases"
|
|
76
|
+
versionLabel="1.0.0-docs"
|
|
77
|
+
/>
|
|
74
78
|
}
|
|
75
79
|
>
|
|
76
80
|
<SybilionAppHeader
|
|
@@ -78,6 +82,7 @@ function DocsLayout() {
|
|
|
78
82
|
onNavigate={href => {
|
|
79
83
|
void navigate(href);
|
|
80
84
|
}}
|
|
85
|
+
logo={<Logo brandText="Sybilion Design" />}
|
|
81
86
|
authenticated
|
|
82
87
|
isAuthenticated={false}
|
|
83
88
|
onLogout={() => undefined}
|
|
@@ -93,7 +93,11 @@ export function DocsSidebar() {
|
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
|
-
<Sidebar
|
|
96
|
+
<Sidebar
|
|
97
|
+
variant="inset"
|
|
98
|
+
collapsible="offcanvas"
|
|
99
|
+
brandText="Sybilion Design"
|
|
100
|
+
>
|
|
97
101
|
<SidebarContent>
|
|
98
102
|
<SidebarMenu className={S.sidebarSearch}>
|
|
99
103
|
<Input
|