@mastra/playground-ui 35.1.0-alpha.1 → 35.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/{code-editor-DVWPuq12.cjs → code-editor-BKM9AbX0.cjs} +6 -3
- package/dist/{code-editor-DVWPuq12.cjs.map → code-editor-BKM9AbX0.cjs.map} +1 -1
- package/dist/{code-editor-CxHGOvdY.js → code-editor-DarXoYtw.js} +6 -3
- package/dist/{code-editor-CxHGOvdY.js.map → code-editor-DarXoYtw.js.map} +1 -1
- package/dist/components/CodeEditor.cjs.js +1 -1
- package/dist/components/CodeEditor.es.js +1 -1
- package/dist/components/MainSidebar.cjs.js +1 -1
- package/dist/components/MainSidebar.es.js +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.css +119 -0
- package/dist/index.es.js +3 -3
- package/dist/{main-sidebar-DJSorgYQ.js → main-sidebar-35yt_w11.js} +59 -16
- package/dist/main-sidebar-35yt_w11.js.map +1 -0
- package/dist/{main-sidebar-ByHmwU4R.cjs → main-sidebar-BFkciPDl.cjs} +59 -16
- package/dist/main-sidebar-BFkciPDl.cjs.map +1 -0
- package/dist/src/ds/components/CodeEditor/code-editor.d.ts +4 -0
- package/dist/src/ds/components/CodeEditor/code-editor.stories.d.ts +1 -0
- package/dist/src/ds/components/MainSidebar/main-sidebar-link-active.d.ts +7 -0
- package/dist/src/ds/components/MainSidebar/main-sidebar-nav-item-classes.d.ts +2 -1
- package/dist/src/ds/components/MainSidebar/main-sidebar-nav-link.d.ts +7 -2
- package/dist/src/ds/components/MainSidebar/main-sidebar-sections.d.ts +4 -10
- package/dist/src/ds/components/MainSidebar/main-sidebar.d.ts +1 -1
- package/dist/src/ds/components/MainSidebar/main-sidebar.stories.d.ts +1 -0
- package/package.json +6 -6
- package/dist/main-sidebar-ByHmwU4R.cjs.map +0 -1
- package/dist/main-sidebar-DJSorgYQ.js.map +0 -1
|
@@ -321,13 +321,19 @@ function MainSidebarNavLabel({ children, className, state: stateProp, ...rest })
|
|
|
321
321
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { ...rest, className: utils.cn("min-w-0 flex-1 truncate text-left", className), children });
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
const
|
|
324
|
+
const nestedExpandedItemClasses = (level) => {
|
|
325
|
+
if (level <= 0) return "w-full gap-2 py-1 px-3 justify-start";
|
|
326
|
+
if (level === 1) return "w-full gap-2 py-1 pr-3 pl-8 justify-start text-ui-sm h-8";
|
|
327
|
+
if (level === 2) return "w-full gap-2 py-1 pr-3 pl-10 justify-start text-ui-sm h-8";
|
|
328
|
+
return "w-full gap-2 py-1 pr-3 pl-12 justify-start text-ui-sm h-8";
|
|
329
|
+
};
|
|
330
|
+
const navItemClasses = ({ isActive, isCollapsed, isFeatured, level = 0 } = {}) => utils.cn(
|
|
325
331
|
"flex cursor-pointer items-center text-ui-md text-neutral3 rounded-lg h-9 min-w-0 whitespace-nowrap",
|
|
326
332
|
"transition-all duration-normal ease-out-custom motion-reduce:transition-none",
|
|
327
333
|
"[&_svg]:w-4 [&_svg]:h-4 [&_svg]:shrink-0 [&_svg]:text-neutral3/70 [&_svg]:transition-colors [&_svg]:duration-normal motion-reduce:[&_svg]:transition-none",
|
|
328
334
|
"hover:bg-sidebar-nav-hover hover:text-neutral6 [&:hover_svg]:text-neutral5",
|
|
329
335
|
"focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring",
|
|
330
|
-
!isCollapsed &&
|
|
336
|
+
!isCollapsed && nestedExpandedItemClasses(level),
|
|
331
337
|
isCollapsed && "w-full p-0 justify-center",
|
|
332
338
|
isActive && "text-neutral6 bg-sidebar-nav-active hover:bg-sidebar-nav-active hover:text-neutral6 [&_svg]:text-neutral6 [&:hover_svg]:text-neutral6",
|
|
333
339
|
isCollapsed && !isActive && "[&_svg]:text-neutral3",
|
|
@@ -343,6 +349,8 @@ function MainSidebarNavLink({
|
|
|
343
349
|
isActive,
|
|
344
350
|
className,
|
|
345
351
|
LinkComponent: LinkProp,
|
|
352
|
+
level: levelProp,
|
|
353
|
+
subItems,
|
|
346
354
|
asChild = false,
|
|
347
355
|
...props
|
|
348
356
|
}) {
|
|
@@ -351,13 +359,15 @@ function MainSidebarNavLink({
|
|
|
351
359
|
const Link = LinkProp ?? ctx?.LinkComponent ?? "a";
|
|
352
360
|
const isCollapsed = state === "collapsed";
|
|
353
361
|
const isFeatured = link?.variant === "featured";
|
|
362
|
+
const level = levelProp ?? (link?.indent ? 1 : 0);
|
|
354
363
|
const isExternal = Boolean(link?.url && /^(https?:)?\/\//.test(link.url));
|
|
355
364
|
const linkParams = isExternal ? { target: "_blank", rel: "noreferrer" } : {};
|
|
356
365
|
const needsTooltip = link ? isCollapsed || Boolean(link.tooltipMsg) : false;
|
|
357
366
|
const itemClassName = navItemClasses({
|
|
358
367
|
isActive,
|
|
359
368
|
isCollapsed,
|
|
360
|
-
isFeatured
|
|
369
|
+
isFeatured,
|
|
370
|
+
level
|
|
361
371
|
});
|
|
362
372
|
let interactiveEl = null;
|
|
363
373
|
if (asChild) {
|
|
@@ -376,10 +386,13 @@ function MainSidebarNavLink({
|
|
|
376
386
|
children
|
|
377
387
|
] });
|
|
378
388
|
}
|
|
379
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
380
|
-
/* @__PURE__ */ jsxRuntime.
|
|
381
|
-
|
|
382
|
-
|
|
389
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("li", { ...props, className: utils.cn("flex flex-col relative min-w-0", className), children: [
|
|
390
|
+
link && needsTooltip && React.isValidElement(interactiveEl) ? /* @__PURE__ */ jsxRuntime.jsxs(tooltip.Tooltip, { children: [
|
|
391
|
+
/* @__PURE__ */ jsxRuntime.jsx(tooltip.TooltipTrigger, { render: interactiveEl }),
|
|
392
|
+
/* @__PURE__ */ jsxRuntime.jsx(tooltip.TooltipContent, { side: "right", align: "center", sideOffset: 16, children: link.tooltipMsg ? isCollapsed ? `${link.name} | ${link.tooltipMsg}` : link.tooltipMsg : link.name })
|
|
393
|
+
] }) : interactiveEl ?? children,
|
|
394
|
+
!isCollapsed && subItems
|
|
395
|
+
] });
|
|
383
396
|
}
|
|
384
397
|
|
|
385
398
|
function MainSidebarNavList({ className, children, ...props }) {
|
|
@@ -645,6 +658,30 @@ function MainSidebarRoot({ children, className }) {
|
|
|
645
658
|
);
|
|
646
659
|
}
|
|
647
660
|
|
|
661
|
+
function getLinkKey(link) {
|
|
662
|
+
return `${link.url}:${link.name}`;
|
|
663
|
+
}
|
|
664
|
+
function MainSidebarSectionLink({ link, activeCandidates, level = 0, isActive }) {
|
|
665
|
+
const childLinks = link.children ?? [];
|
|
666
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
667
|
+
MainSidebarNavLink,
|
|
668
|
+
{
|
|
669
|
+
link,
|
|
670
|
+
isActive: isActive?.(link, activeCandidates) ?? link.isActive,
|
|
671
|
+
level,
|
|
672
|
+
subItems: childLinks.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(MainSidebarNavList, { className: "mt-0.5", children: childLinks.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
673
|
+
MainSidebarSectionLink,
|
|
674
|
+
{
|
|
675
|
+
link: child,
|
|
676
|
+
activeCandidates,
|
|
677
|
+
level: level + 1,
|
|
678
|
+
isActive
|
|
679
|
+
},
|
|
680
|
+
getLinkKey(child)
|
|
681
|
+
)) }) : null
|
|
682
|
+
}
|
|
683
|
+
);
|
|
684
|
+
}
|
|
648
685
|
function MainSidebarSections({ sections, isActive, className }) {
|
|
649
686
|
const baseId = React.useId();
|
|
650
687
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: sections.map((section) => {
|
|
@@ -660,12 +697,13 @@ function MainSidebarSections({ sections, isActive, className }) {
|
|
|
660
697
|
showSeparator ? /* @__PURE__ */ jsxRuntime.jsx(MainSidebarNavSeparator, {}) : null,
|
|
661
698
|
section.title ? /* @__PURE__ */ jsxRuntime.jsx(MainSidebarNavHeader, { id: headerId, href: section.href, isActive: section.isHeaderActive, children: section.title }) : null,
|
|
662
699
|
/* @__PURE__ */ jsxRuntime.jsx(MainSidebarNavList, { children: section.links.map((link) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
663
|
-
|
|
700
|
+
MainSidebarSectionLink,
|
|
664
701
|
{
|
|
665
702
|
link,
|
|
666
|
-
|
|
703
|
+
activeCandidates: section.links,
|
|
704
|
+
isActive
|
|
667
705
|
},
|
|
668
|
-
link
|
|
706
|
+
getLinkKey(link)
|
|
669
707
|
)) })
|
|
670
708
|
]
|
|
671
709
|
},
|
|
@@ -673,11 +711,6 @@ function MainSidebarSections({ sections, isActive, className }) {
|
|
|
673
711
|
);
|
|
674
712
|
}) });
|
|
675
713
|
}
|
|
676
|
-
function getIsLinkActive(link, pathname, siblings = []) {
|
|
677
|
-
const matches = (url) => pathname === url || pathname.startsWith(url + "/");
|
|
678
|
-
if (!matches(link.url)) return false;
|
|
679
|
-
return !siblings.some((other) => other.url !== link.url && other.url.length > link.url.length && matches(other.url));
|
|
680
|
-
}
|
|
681
714
|
|
|
682
715
|
function MainSidebarTrigger({ className, onClick, ...props }) {
|
|
683
716
|
const { desktopState, toggleSidebar } = useMainSidebar();
|
|
@@ -729,6 +762,16 @@ function MainSidebarTrigger({ className, onClick, ...props }) {
|
|
|
729
762
|
] });
|
|
730
763
|
}
|
|
731
764
|
|
|
765
|
+
function getIsLinkActive(link, pathname, siblings = []) {
|
|
766
|
+
const matches = (url) => pathname === url || pathname.startsWith(url + "/");
|
|
767
|
+
const flattenLinks = (links) => links.flatMap((item) => [item, ...flattenLinks(item.children ?? [])]);
|
|
768
|
+
if (!matches(link.url)) return false;
|
|
769
|
+
const competingLinks = [...flattenLinks(link.children ?? []), ...flattenLinks(siblings)];
|
|
770
|
+
return !competingLinks.some(
|
|
771
|
+
(other) => other.url !== link.url && other.url.length > link.url.length && matches(other.url)
|
|
772
|
+
);
|
|
773
|
+
}
|
|
774
|
+
|
|
732
775
|
const MainSidebar = Object.assign(MainSidebarRoot, {
|
|
733
776
|
Bottom: MainSidebarBottom,
|
|
734
777
|
Nav: MainSidebarNav,
|
|
@@ -752,4 +795,4 @@ exports.getIsLinkActive = getIsLinkActive;
|
|
|
752
795
|
exports.navItemClasses = navItemClasses;
|
|
753
796
|
exports.useMainSidebar = useMainSidebar;
|
|
754
797
|
exports.useMaybeSidebar = useMaybeSidebar;
|
|
755
|
-
//# sourceMappingURL=main-sidebar-
|
|
798
|
+
//# sourceMappingURL=main-sidebar-BFkciPDl.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main-sidebar-BFkciPDl.cjs","sources":["../src/ds/components/MainSidebar/main-sidebar-bottom.tsx","../src/ds/components/MainSidebar/main-sidebar-context.tsx","../src/ds/components/MainSidebar/main-sidebar-mobile-trigger.tsx","../src/ds/components/MainSidebar/main-sidebar-nav.tsx","../src/ds/components/MainSidebar/main-sidebar-nav-header.tsx","../src/ds/components/MainSidebar/main-sidebar-nav-label.tsx","../src/ds/components/MainSidebar/main-sidebar-nav-item-classes.ts","../src/ds/components/MainSidebar/main-sidebar-nav-link.tsx","../src/ds/components/MainSidebar/main-sidebar-nav-list.tsx","../src/ds/components/MainSidebar/main-sidebar-nav-section.tsx","../src/ds/components/MainSidebar/main-sidebar-nav-separator.tsx","../src/ds/primitives/resize-handle-indicator.tsx","../src/ds/components/MainSidebar/main-sidebar-root.tsx","../src/ds/components/MainSidebar/main-sidebar-sections.tsx","../src/ds/components/MainSidebar/main-sidebar-trigger.tsx","../src/ds/components/MainSidebar/main-sidebar-link-active.ts","../src/ds/components/MainSidebar/main-sidebar.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type MainSidebarBottomProps = ComponentPropsWithoutRef<'div'>;\n\nexport function MainSidebarBottom({ className, children, ...props }: MainSidebarBottomProps) {\n return (\n <div className={cn('mt-auto', className)} {...props}>\n {children}\n </div>\n );\n}\n","import React from 'react';\nimport type { CSSProperties } from 'react';\nimport type { LinkComponent } from '@/ds/types/link-component';\n\nconst SIDEBAR_STATE_KEY = 'sidebar:state';\nconst SIDEBAR_WIDTH_KEY = 'sidebar:width';\n\nconst SIDEBAR_WIDTH_VAR = '--sidebar-width';\n\nexport type SidebarState = 'default' | 'collapsed';\n\ntype MainSidebarContext = {\n state: SidebarState;\n desktopState: SidebarState;\n width: number;\n minWidth: number;\n maxWidth: number;\n collapseBelow: number;\n collapsedWidth: number;\n isMobile: boolean;\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n toggleSidebar: () => void;\n setWidth: (width: number) => void;\n collapse: () => void;\n expand: () => void;\n commit: () => void;\n setGestureActive: (active: boolean) => void;\n LinkComponent?: LinkComponent;\n};\n\n// Split: drawer open-state lives in its own context so NavLink/NavHeader\n// do not re-render when the mobile drawer toggles.\ntype MobileDrawerContext = {\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n};\n\nconst MainSidebarContext = React.createContext<Omit<MainSidebarContext, 'openMobile' | 'setOpenMobile'> | null>(null);\nconst MobileDrawerContext = React.createContext<MobileDrawerContext | null>(null);\n\nexport function useMainSidebar(): MainSidebarContext {\n const ctx = React.useContext(MainSidebarContext);\n const drawer = React.useContext(MobileDrawerContext);\n if (!ctx || !drawer) {\n throw new Error('useMainSidebar must be used within a MainSidebarProvider.');\n }\n return { ...ctx, ...drawer };\n}\n\nexport function useMaybeSidebar(): MainSidebarContext | null {\n const ctx = React.useContext(MainSidebarContext);\n const drawer = React.useContext(MobileDrawerContext);\n if (!ctx || !drawer) return null;\n return { ...ctx, ...drawer };\n}\n\n/** Reads only mobile drawer state. Cheap — no re-renders on sidebar resize. */\nexport function useMobileDrawer(): MobileDrawerContext {\n const drawer = React.useContext(MobileDrawerContext);\n if (!drawer) throw new Error('useMobileDrawer must be used within a MainSidebarProvider.');\n return drawer;\n}\n\nexport type MainSidebarProviderProps = {\n children: React.ReactNode;\n /** Initial state before localStorage hydrates. Defaults to `'default'`. */\n defaultState?: SidebarState;\n /** Default expanded width in px. Defaults to `240`. */\n defaultWidth?: number;\n /** Minimum draggable width in px. Defaults to `200`. */\n minWidth?: number;\n /** Maximum draggable width in px. Defaults to `480`. */\n maxWidth?: number;\n /** Drag below this value snaps the sidebar closed. Defaults to `minWidth` (snap to collapsed when dragged below the expanded minimum). Pass `0` to disable snap. */\n collapseBelow?: number;\n /** Width in px when collapsed. Defaults to `64`. Set to `0` for fully hidden. */\n collapsedWidth?: number;\n /** Disable the global ⌘B / Ctrl+B toggle shortcut. Defaults to `false`. */\n disableKeyboardShortcut?: boolean;\n /** Scope-key for localStorage. Allows multiple independent sidebars per app. */\n storageKey?: string;\n /** Mobile breakpoint in px (max-width). Below this, sidebar renders as a drawer. Defaults to `1024`. */\n mobileBreakpoint?: number;\n /** Drawer max-width on mobile in px. Actual width is `min(75vw, mobileWidth)`. Defaults to `360`. */\n mobileWidth?: number;\n /** Default LinkComponent injected into NavLink/NavHeader. Falls back to plain `<a>` if omitted. */\n LinkComponent?: LinkComponent;\n};\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\nconst useIsoLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n\nexport function MainSidebarProvider({\n children,\n defaultState = 'default',\n defaultWidth = 240,\n minWidth = 200,\n maxWidth = 480,\n collapseBelow,\n collapsedWidth = 64,\n disableKeyboardShortcut = false,\n storageKey,\n mobileBreakpoint = 1024,\n mobileWidth = 360,\n LinkComponent,\n}: MainSidebarProviderProps) {\n // Normalize props so bad inputs (defaultWidth < minWidth, min > max, etc.) never produce a broken layout.\n const safeMin = Math.max(0, Math.min(minWidth, maxWidth));\n const safeMax = Math.max(safeMin, maxWidth);\n const safeCollapsed = Math.max(0, Math.min(collapsedWidth, safeMax));\n const safeDefault = clamp(defaultWidth, safeMin, safeMax);\n // Default snap-zone = minWidth: dragging below the expanded min snaps to collapsed,\n // since below min the sidebar cannot render its expanded layout anyway.\n // Pass `collapseBelow={0}` to disable snap.\n const safeCollapseBelow = collapseBelow ?? safeMin;\n\n const stateStorageKey = storageKey ? `${storageKey}:${SIDEBAR_STATE_KEY}` : SIDEBAR_STATE_KEY;\n const widthStorageKey = storageKey ? `${storageKey}:${SIDEBAR_WIDTH_KEY}` : SIDEBAR_WIDTH_KEY;\n\n // Hydrate synchronously from localStorage so first paint is already at the correct width.\n // Falls back to clamped defaults during SSR or when storage is unavailable.\n const readInitial = (): { state: SidebarState; width: number } => {\n if (typeof window === 'undefined') return { state: defaultState, width: safeDefault };\n try {\n let nextState: SidebarState = defaultState;\n let nextWidth = safeDefault;\n const storedState = window.localStorage.getItem(stateStorageKey);\n if (storedState === 'collapsed' || storedState === 'default') nextState = storedState;\n const storedWidth = window.localStorage.getItem(widthStorageKey);\n if (storedWidth !== null) {\n const parsed = Number(storedWidth);\n if (Number.isFinite(parsed)) nextWidth = clamp(parsed, safeMin, safeMax);\n }\n return { state: nextState, width: nextWidth };\n } catch {\n return { state: defaultState, width: safeDefault };\n }\n };\n const initialRef = React.useRef<{ state: SidebarState; width: number } | null>(null);\n if (initialRef.current === null) initialRef.current = readInitial();\n const initial = initialRef.current;\n\n const [state, setState] = React.useState<SidebarState>(initial.state);\n const [width, setWidthState] = React.useState<number>(initial.width);\n const [isMobile, setIsMobile] = React.useState(false);\n const [openMobile, setOpenMobile] = React.useState(false);\n const widthRef = React.useRef<number>(initial.width);\n const stateRef = React.useRef<SidebarState>(initial.state);\n stateRef.current = state;\n\n const scopeRef = React.useRef<HTMLDivElement | null>(null);\n\n // Watch viewport for mobile breakpoint.\n React.useEffect(() => {\n if (typeof window === 'undefined') return;\n const mq = window.matchMedia(`(max-width: ${mobileBreakpoint - 1}px)`);\n const update = () => setIsMobile(mq.matches);\n update();\n mq.addEventListener('change', update);\n return () => mq.removeEventListener('change', update);\n }, [mobileBreakpoint]);\n\n // Close mobile drawer when crossing back to desktop.\n React.useEffect(() => {\n if (!isMobile && openMobile) setOpenMobile(false);\n }, [isMobile, openMobile]);\n\n const writeCssVar = React.useCallback((px: number) => {\n const el = scopeRef.current;\n if (el) el.style.setProperty(SIDEBAR_WIDTH_VAR, `${px}px`);\n }, []);\n\n // Keep the CSS var in sync with collapsed state transitions.\n useIsoLayoutEffect(() => {\n writeCssVar(state === 'collapsed' ? safeCollapsed : widthRef.current);\n }, [state, safeCollapsed, writeCssVar]);\n\n const persistState = React.useCallback(\n (next: SidebarState) => {\n try {\n window.localStorage.setItem(stateStorageKey, next);\n } catch {}\n },\n [stateStorageKey],\n );\n\n const toggleSidebar = React.useCallback(() => {\n if (isMobile) {\n setOpenMobile(prev => !prev);\n return;\n }\n setState(prev => {\n const next = prev === 'default' ? 'collapsed' : 'default';\n // Sync ref so a synchronous follow-up `commit()` (e.g. keyboard handler)\n // persists the new state instead of the stale render-time value.\n stateRef.current = next;\n persistState(next);\n return next;\n });\n }, [isMobile, persistState]);\n\n const setWidth = React.useCallback(\n (next: number) => {\n const clamped = clamp(next, safeMin, safeMax);\n widthRef.current = clamped;\n writeCssVar(clamped);\n },\n [safeMin, safeMax, writeCssVar],\n );\n\n const collapse = React.useCallback(() => {\n stateRef.current = 'collapsed';\n persistState('collapsed');\n setState('collapsed');\n }, [persistState]);\n const expand = React.useCallback(() => {\n stateRef.current = 'default';\n persistState('default');\n setState('default');\n }, [persistState]);\n\n const commit = React.useCallback(() => {\n setWidthState(widthRef.current);\n try {\n window.localStorage.setItem(stateStorageKey, stateRef.current);\n window.localStorage.setItem(widthStorageKey, String(widthRef.current));\n } catch {}\n }, [stateStorageKey, widthStorageKey]);\n\n const setGestureActive = React.useCallback((active: boolean) => {\n const el = scopeRef.current;\n if (!el) return;\n if (active) el.setAttribute('data-sidebar-gesture', 'active');\n else el.removeAttribute('data-sidebar-gesture');\n }, []);\n\n // Global ⌘B / Ctrl+B toggle. Skip when typing.\n React.useEffect(() => {\n if (disableKeyboardShortcut) return;\n const onKeyDown = (ev: KeyboardEvent) => {\n // `code` is layout-independent — works on non-Latin keyboards.\n if (ev.code !== 'KeyB') return;\n if (!(ev.metaKey || ev.ctrlKey)) return;\n if (ev.altKey || ev.shiftKey) return;\n const target = ev.target as HTMLElement | null;\n if (target) {\n const tag = target.tagName;\n if (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT') return;\n if (target.isContentEditable) return;\n }\n ev.preventDefault();\n toggleSidebar();\n };\n window.addEventListener('keydown', onKeyDown);\n return () => window.removeEventListener('keydown', onKeyDown);\n }, [disableKeyboardShortcut, toggleSidebar]);\n\n const effectiveState: SidebarState = isMobile ? 'default' : state;\n\n const contextValue = React.useMemo(\n () => ({\n state: effectiveState,\n desktopState: state,\n width,\n minWidth: safeMin,\n maxWidth: safeMax,\n collapseBelow: safeCollapseBelow,\n collapsedWidth: safeCollapsed,\n isMobile,\n toggleSidebar,\n setWidth,\n collapse,\n expand,\n commit,\n setGestureActive,\n LinkComponent,\n }),\n [\n effectiveState,\n state,\n width,\n safeMin,\n safeMax,\n safeCollapseBelow,\n safeCollapsed,\n isMobile,\n toggleSidebar,\n setWidth,\n collapse,\n expand,\n commit,\n setGestureActive,\n LinkComponent,\n ],\n );\n\n const drawerValue = React.useMemo<MobileDrawerContext>(() => ({ openMobile, setOpenMobile }), [openMobile]);\n\n // CSS var owned exclusively by writeCssVar (single source of truth).\n // SSR seeds the initial value here; post-mount writeCssVar takes over.\n const scopeStyle: CSSProperties = {\n [SIDEBAR_WIDTH_VAR]: `${initial.state === 'collapsed' ? safeCollapsed : initial.width}px`,\n ['--sidebar-width-mobile' as string]: `${mobileWidth}px`,\n display: 'contents',\n } as CSSProperties;\n\n return (\n <div\n ref={scopeRef}\n data-sidebar-scope\n data-sidebar-state={state}\n data-sidebar-mobile={isMobile ? 'true' : 'false'}\n style={scopeStyle}\n suppressHydrationWarning\n >\n <MainSidebarContext.Provider value={contextValue}>\n <MobileDrawerContext.Provider value={drawerValue}>{children}</MobileDrawerContext.Provider>\n </MainSidebarContext.Provider>\n </div>\n );\n}\n","import { MenuIcon } from 'lucide-react';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport { useMainSidebar } from './main-sidebar-context';\nimport { cn } from '@/lib/utils';\n\nexport type MainSidebarMobileTriggerProps = ComponentPropsWithoutRef<'button'> & {\n /** Override the hamburger icon. */\n icon?: React.ReactNode;\n};\n\nexport function MainSidebarMobileTrigger({\n className,\n icon,\n 'aria-label': ariaLabel = 'Open navigation menu',\n onClick,\n ...props\n}: MainSidebarMobileTriggerProps) {\n // Always render; visibility toggled via scope's `data-sidebar-mobile` attribute.\n // SSR-stable and respects the configured `mobileBreakpoint`.\n const { isMobile, setOpenMobile } = useMainSidebar();\n return (\n <button\n type=\"button\"\n aria-label={ariaLabel}\n aria-hidden={!isMobile}\n tabIndex={isMobile ? 0 : -1}\n data-mobile-only\n {...props}\n onClick={event => {\n onClick?.(event);\n if (!event.defaultPrevented) setOpenMobile(true);\n }}\n className={cn(\n 'inline-flex size-10 items-center justify-center rounded-md',\n 'in-data-[sidebar-mobile=false]:hidden',\n 'text-neutral4 hover:text-neutral6 hover:bg-sidebar-nav-hover',\n 'focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-accent1',\n className,\n )}\n >\n {icon ?? <MenuIcon className=\"size-5\" />}\n </button>\n );\n}\n","import type { ComponentPropsWithoutRef } from 'react';\nimport { ScrollArea } from '@/ds/components/ScrollArea';\nimport { cn } from '@/lib/utils';\n\nexport type MainSidebarNavProps = ComponentPropsWithoutRef<'nav'>;\n\nexport function MainSidebarNav({\n 'aria-label': ariaLabel = 'Main',\n children,\n className,\n ...props\n}: MainSidebarNavProps) {\n return (\n <nav aria-label={ariaLabel} className={cn('flex flex-col flex-1 min-h-0', className)} {...props}>\n <ScrollArea className=\"flex-1 min-h-0\" viewPortClassName=\"px-0.5\">\n {children}\n </ScrollArea>\n </nav>\n );\n}\n","import type { ComponentPropsWithoutRef } from 'react';\nimport type { SidebarState } from './main-sidebar-context';\nimport { useMaybeSidebar } from './main-sidebar-context';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\nimport type { LinkComponent } from '@/ds/types/link-component';\nimport { cn } from '@/lib/utils';\n\nexport type MainSidebarNavHeaderProps = Omit<ComponentPropsWithoutRef<'header'>, 'children'> & {\n children?: React.ReactNode;\n state?: SidebarState;\n href?: string;\n isActive?: boolean;\n /** Override the Provider-level LinkComponent. Defaults to `<a>` when neither is set. */\n LinkComponent?: LinkComponent;\n};\nexport function MainSidebarNavHeader({\n children,\n className,\n state: stateProp,\n href,\n isActive,\n LinkComponent: LinkProp,\n ...props\n}: MainSidebarNavHeaderProps) {\n const ctx = useMaybeSidebar();\n const state: SidebarState = stateProp ?? ctx?.state ?? 'default';\n const isMobile = ctx?.isMobile ?? false;\n const Link: LinkComponent | 'a' = LinkProp ?? ctx?.LinkComponent ?? 'a';\n const showTitle = state === 'default' && !isMobile;\n\n return (\n <div className={cn('min-w-0 min-h-8 flex items-center mt-2 mb-0.5', className)}>\n {showTitle ? (\n <header\n {...props}\n className={cn('min-w-0 max-w-full truncate text-ui-sm font-medium pl-3', {\n 'text-neutral5': isActive,\n 'text-neutral3/70': !isActive,\n })}\n >\n {href ? (\n <Link\n href={href}\n className={cn('block min-w-0 truncate transition-colors duration-normal', {\n 'hover:text-neutral5': !isActive,\n 'text-neutral5': isActive,\n })}\n >\n {children}\n </Link>\n ) : (\n children\n )}\n </header>\n ) : (\n <>\n {/* Keep header in DOM (visually hidden) so consumers' `id` still resolves\n for `MainSidebarSections`' `aria-labelledby`. */}\n <VisuallyHidden asChild>\n <header {...props}>{children}</header>\n </VisuallyHidden>\n <div aria-hidden=\"true\" className=\"mx-3 h-px flex-1 bg-border1\" />\n </>\n )}\n </div>\n );\n}\n","import type { ComponentPropsWithoutRef } from 'react';\nimport type { SidebarState } from './main-sidebar-context';\nimport { useMaybeSidebar } from './main-sidebar-context';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\nimport { cn } from '@/lib/utils';\n\nexport type MainSidebarNavLabelProps = ComponentPropsWithoutRef<'span'> & {\n /** Override sidebar state. Defaults to context, then `'default'`. */\n state?: SidebarState;\n};\n\n/**\n * Label slot for `MainSidebar.NavLink` rows.\n *\n * Auto-hides via `VisuallyHidden` when the sidebar is collapsed (icon-only row),\n * so screen readers still announce the label without it leaking outside the\n * 36px collapsed item. Handles single-line truncation when expanded.\n *\n * Required for `asChild` consumers — the default `link={...}` path wraps the\n * name internally, but slotted elements (`<button>`, custom links) bring their\n * own children, so the label needs to opt into the collapse-aware rendering.\n */\nexport function MainSidebarNavLabel({ children, className, state: stateProp, ...rest }: MainSidebarNavLabelProps) {\n const ctx = useMaybeSidebar();\n const state: SidebarState = stateProp ?? ctx?.state ?? 'default';\n if (state === 'collapsed') {\n return <VisuallyHidden>{children}</VisuallyHidden>;\n }\n return (\n <span {...rest} className={cn('min-w-0 flex-1 truncate text-left', className)}>\n {children}\n </span>\n );\n}\n","import { cn } from '@/lib/utils';\n\ntype ItemStyleOptions = {\n isActive?: boolean;\n isCollapsed?: boolean;\n isFeatured?: boolean;\n level?: number;\n};\n\nconst nestedExpandedItemClasses = (level: number) => {\n if (level <= 0) return 'w-full gap-2 py-1 px-3 justify-start';\n if (level === 1) return 'w-full gap-2 py-1 pr-3 pl-8 justify-start text-ui-sm h-8';\n if (level === 2) return 'w-full gap-2 py-1 pr-3 pl-10 justify-start text-ui-sm h-8';\n return 'w-full gap-2 py-1 pr-3 pl-12 justify-start text-ui-sm h-8';\n};\n\n/**\n * Shared classes for any sidebar nav row element (anchor, button, custom).\n * Apply directly to the interactive element so `asChild` and custom slotted\n * elements all receive the same styling.\n */\nexport const navItemClasses = ({ isActive, isCollapsed, isFeatured, level = 0 }: ItemStyleOptions = {}) =>\n cn(\n 'flex cursor-pointer items-center text-ui-md text-neutral3 rounded-lg h-9 min-w-0 whitespace-nowrap',\n 'transition-all duration-normal ease-out-custom motion-reduce:transition-none',\n '[&_svg]:w-4 [&_svg]:h-4 [&_svg]:shrink-0 [&_svg]:text-neutral3/70 [&_svg]:transition-colors [&_svg]:duration-normal motion-reduce:[&_svg]:transition-none',\n 'hover:bg-sidebar-nav-hover hover:text-neutral6 [&:hover_svg]:text-neutral5',\n 'focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring',\n !isCollapsed && nestedExpandedItemClasses(level),\n isCollapsed && 'w-full p-0 justify-center',\n isActive &&\n 'text-neutral6 bg-sidebar-nav-active hover:bg-sidebar-nav-active hover:text-neutral6 [&_svg]:text-neutral6 [&:hover_svg]:text-neutral6',\n isCollapsed && !isActive && '[&_svg]:text-neutral3',\n isFeatured && 'my-2 bg-accent1Dark hover:bg-accent1Darker text-accent1 hover:text-accent1 border border-accent1/30',\n isFeatured &&\n 'dark:bg-accent1 dark:hover:bg-accent1/90 dark:text-black dark:hover:text-black dark:border-transparent',\n isFeatured &&\n '[&_svg]:text-accent1 [&:hover_svg]:text-accent1 dark:[&_svg]:text-black/75 dark:[&:hover_svg]:text-black',\n );\n","import React from 'react';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport type { SidebarState } from './main-sidebar-context';\nimport { useMaybeSidebar } from './main-sidebar-context';\nimport { navItemClasses } from './main-sidebar-nav-item-classes';\nimport { MainSidebarNavLabel } from './main-sidebar-nav-label';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/ds/components/Tooltip';\nimport type { LinkComponent } from '@/ds/types/link-component';\nimport { cn } from '@/lib/utils';\n\nexport type NavLink = {\n name: string;\n url: string;\n icon?: React.ReactNode;\n children?: NavLink[];\n isActive?: boolean;\n variant?: 'default' | 'featured';\n tooltipMsg?: string;\n /** @deprecated Prefer nested `children`; accepted for callers still rendering manual sublinks. */\n indent?: boolean;\n};\n\nexport type MainSidebarNavLinkProps = Omit<ComponentPropsWithoutRef<'li'>, 'children'> & {\n link?: NavLink;\n isActive?: boolean;\n state?: SidebarState;\n children?: React.ReactNode;\n /** Override the Provider-level LinkComponent for this row. Defaults to `<a>` when neither is set. */\n LinkComponent?: LinkComponent;\n /** Nesting depth for manually composed subitems. Data-driven sections set this automatically. */\n level?: number;\n /** Nested list rendered below the row while keeping valid `<li><a /><ul /></li>` structure. */\n subItems?: React.ReactNode;\n /**\n * When true, render `children` as the interactive element.\n * Use for `<button>` items or custom router Links. Item classes are forwarded\n * to the slotted element. `link.url` and `LinkComponent` are ignored; other\n * `link` presentation fields still apply when supplied.\n */\n asChild?: boolean;\n};\n\ntype SlottedNavChildProps = {\n className?: string;\n};\n\nexport function MainSidebarNavLink({\n link,\n state: stateProp,\n children,\n isActive,\n className,\n LinkComponent: LinkProp,\n level: levelProp,\n subItems,\n asChild = false,\n ...props\n}: MainSidebarNavLinkProps) {\n // Auto-inherit state + LinkComponent from context; explicit props still win.\n const ctx = useMaybeSidebar();\n const state: SidebarState = stateProp ?? ctx?.state ?? 'default';\n const Link: LinkComponent | 'a' = LinkProp ?? ctx?.LinkComponent ?? 'a';\n const isCollapsed = state === 'collapsed';\n const isFeatured = link?.variant === 'featured';\n const level = levelProp ?? (link?.indent ? 1 : 0);\n const isExternal = Boolean(link?.url && /^(https?:)?\\/\\//.test(link.url));\n const linkParams = isExternal ? { target: '_blank', rel: 'noreferrer' } : {};\n const needsTooltip = link ? isCollapsed || Boolean(link.tooltipMsg) : false;\n\n const itemClassName = navItemClasses({\n isActive,\n isCollapsed,\n isFeatured,\n level,\n });\n\n let interactiveEl: React.ReactNode = null;\n\n if (asChild) {\n if (!React.isValidElement<SlottedNavChildProps>(children)) {\n throw new Error(\n 'MainSidebarNavLink requires a valid React element child when `asChild` is true so it can apply `SlottedNavChildProps` and merge `itemClassName`.',\n );\n }\n\n interactiveEl = React.cloneElement(children, {\n className: cn(itemClassName, children.props.className),\n });\n } else if (link) {\n interactiveEl = (\n <Link href={link.url} {...linkParams} className={itemClassName}>\n {link.icon}\n <MainSidebarNavLabel state={state}>{link.name}</MainSidebarNavLabel>\n {children}\n </Link>\n );\n }\n\n return (\n <li {...props} className={cn('flex flex-col relative min-w-0', className)}>\n {link && needsTooltip && React.isValidElement(interactiveEl) ? (\n <Tooltip>\n <TooltipTrigger render={interactiveEl} />\n <TooltipContent side=\"right\" align=\"center\" sideOffset={16}>\n {link.tooltipMsg ? (isCollapsed ? `${link.name} | ${link.tooltipMsg}` : link.tooltipMsg) : link.name}\n </TooltipContent>\n </Tooltip>\n ) : (\n (interactiveEl ?? children)\n )}\n {!isCollapsed && subItems}\n </li>\n );\n}\n","import type { ComponentPropsWithoutRef } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type MainSidebarNavListProps = ComponentPropsWithoutRef<'ul'>;\n\nexport function MainSidebarNavList({ className, children, ...props }: MainSidebarNavListProps) {\n return (\n <ul className={cn('grid grid-cols-[minmax(0,1fr)] gap-0.5 items-start content-center', className)} {...props}>\n {children}\n </ul>\n );\n}\n","import type { ComponentPropsWithoutRef } from 'react';\nimport type { NavLink } from './main-sidebar-nav-link';\nimport { cn } from '@/lib/utils';\n\nexport type NavSection = {\n key: string;\n title?: string;\n href?: string;\n links: NavLink[];\n separator?: boolean;\n isHeaderActive?: boolean;\n};\n\nexport type MainSidebarNavSectionProps = ComponentPropsWithoutRef<'section'>;\n\nexport function MainSidebarNavSection({ className, children, ...props }: MainSidebarNavSectionProps) {\n return (\n <section className={cn('grid grid-cols-[minmax(0,1fr)] items-start content-center relative', className)} {...props}>\n {children}\n </section>\n );\n}\n","import type { ComponentPropsWithoutRef } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type MainSidebarNavSeparatorProps = ComponentPropsWithoutRef<'div'>;\n\nexport function MainSidebarNavSeparator({ className, ...props }: MainSidebarNavSeparatorProps) {\n return (\n <div\n role=\"separator\"\n aria-orientation=\"horizontal\"\n className={cn(\n 'min-h-5 relative',\n '[&:after]:content-[\"\"] [&:after]:block [&:after]:absolute [&:after]:h-0 [&:after]:border-border1 [&:after]:border-t [&:after]:top-1/2 [&:after]:left-3 [&:after]:right-3',\n className,\n )}\n {...props}\n />\n );\n}\n","import { cva } from 'class-variance-authority';\nimport type { VariantProps } from 'class-variance-authority';\nimport { cn } from '@/lib/utils';\n\n// line: gradient hairline, fits a visible container edge.\n// pill: small floating pill, for handles with no container around.\nconst indicatorVariants = cva(\n 'block pointer-events-none transition-all duration-150 ease-out motion-reduce:transition-none',\n {\n variants: {\n variant: {\n line: 'h-3/4 w-px bg-linear-to-b from-transparent via-neutral6/25 to-transparent opacity-0',\n pill: 'h-10 w-0.5 rounded-full bg-surface5',\n },\n },\n defaultVariants: {\n variant: 'line',\n },\n },\n);\n\nexport type ResizeHandleIndicatorProps = VariantProps<typeof indicatorVariants> & {\n className?: string;\n};\n\n// Shared visual for resize handles (sidebar, panel separators).\n// Consumers reveal/emphasize it via their own state variant classes.\nexport const ResizeHandleIndicator = ({ variant, className }: ResizeHandleIndicatorProps) => (\n <span aria-hidden className={cn(indicatorVariants({ variant }), className)} />\n);\n","import { useCallback, useEffect, useRef } from 'react';\nimport type { KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent } from 'react';\nimport { useMainSidebar } from './main-sidebar-context';\nimport { Drawer, DrawerContent, DrawerDescription, DrawerTitle } from '@/ds/components/Drawer';\nimport { ResizeHandleIndicator } from '@/ds/primitives/resize-handle-indicator';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\nimport { cn } from '@/lib/utils';\n\nexport type MainSidebarRootProps = {\n children: React.ReactNode;\n className?: string;\n};\n\nconst KEYBOARD_STEP = 10;\nconst DRAG_THRESHOLD = 5;\n\nexport function MainSidebarRoot({ children, className }: MainSidebarRootProps) {\n const {\n state,\n width,\n minWidth,\n maxWidth,\n collapseBelow,\n collapsedWidth,\n isMobile,\n openMobile,\n setOpenMobile,\n setWidth,\n collapse,\n expand,\n commit,\n toggleSidebar,\n setGestureActive,\n } = useMainSidebar();\n const isCollapsed = state === 'collapsed';\n const isHidden = isCollapsed && collapsedWidth === 0;\n\n const draggedRef = useRef(false);\n // Tracks active drag so unmount mid-gesture can restore body styles.\n const dragCleanupRef = useRef<(() => void) | null>(null);\n\n // Restore global state if the component unmounts mid-drag.\n useEffect(() => {\n return () => {\n dragCleanupRef.current?.();\n dragCleanupRef.current = null;\n };\n }, []);\n\n const onPointerDown = useCallback(\n (event: ReactPointerEvent<HTMLDivElement>) => {\n if (event.button !== 0) return;\n event.preventDefault();\n\n draggedRef.current = false;\n // Active styles on press, not after drag threshold.\n setGestureActive(true);\n\n const startX = event.clientX;\n\n const handle = event.currentTarget;\n const pointerId = event.pointerId;\n\n // Capture pointer: keeps :hover + col-resize cursor on handle for the\n // whole drag, even when cursor leaves the hotzone (collapsed snap-zone).\n try {\n handle.setPointerCapture(pointerId);\n } catch {\n // Pointer already gone.\n }\n\n // WYSIWYG resize: sidebar width = cursor X relative to sidebar's left edge.\n // Captured once — sidebar is `shrink-0`, left edge is stable during the gesture.\n const sidebarEl = handle.parentElement;\n const sidebarLeft = sidebarEl ? sidebarEl.getBoundingClientRect().left : 0;\n\n const prevCursor = document.body.style.cursor;\n const prevUserSelect = document.body.style.userSelect;\n\n const onMove = (ev: PointerEvent) => {\n if (ev.pointerId !== pointerId) return;\n const dx = ev.clientX - startX;\n if (!draggedRef.current) {\n if (Math.abs(dx) <= DRAG_THRESHOLD) return;\n draggedRef.current = true;\n document.body.style.cursor = 'col-resize';\n document.body.style.userSelect = 'none';\n }\n\n // Single rule, no started-state branch: cursor position alone defines state.\n const cursorWidth = ev.clientX - sidebarLeft;\n\n if (collapseBelow > 0 && cursorWidth < collapseBelow) {\n collapse();\n return;\n }\n expand();\n setWidth(cursorWidth);\n };\n const cleanup = (ev?: PointerEvent) => {\n if (ev && ev.pointerId !== pointerId) return;\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', cleanup);\n window.removeEventListener('pointercancel', cleanup);\n document.body.style.cursor = prevCursor;\n document.body.style.userSelect = prevUserSelect;\n setGestureActive(false);\n commit();\n dragCleanupRef.current = null;\n };\n dragCleanupRef.current = () => cleanup();\n // Window-level listeners: pointer moves off the narrow handle fire reliably,\n // cursor leaving the window still gets `pointerup`.\n window.addEventListener('pointermove', onMove);\n window.addEventListener('pointerup', cleanup);\n window.addEventListener('pointercancel', cleanup);\n },\n [collapseBelow, setWidth, expand, collapse, commit, setGestureActive],\n );\n\n const onClick = useCallback(() => {\n if (draggedRef.current) {\n draggedRef.current = false;\n return;\n }\n toggleSidebar();\n }, [toggleSidebar]);\n\n const onKeyDown = useCallback(\n (event: ReactKeyboardEvent<HTMLDivElement>) => {\n switch (event.key) {\n case 'Enter':\n case ' ': {\n event.preventDefault();\n toggleSidebar();\n return;\n }\n case 'ArrowLeft': {\n event.preventDefault();\n if (isCollapsed) return;\n setWidth(width - KEYBOARD_STEP);\n commit();\n return;\n }\n case 'ArrowRight': {\n event.preventDefault();\n if (isCollapsed) {\n expand();\n commit();\n return;\n }\n setWidth(width + KEYBOARD_STEP);\n commit();\n return;\n }\n case 'Home': {\n event.preventDefault();\n expand();\n setWidth(minWidth);\n commit();\n return;\n }\n case 'End': {\n event.preventDefault();\n expand();\n setWidth(maxWidth);\n commit();\n return;\n }\n }\n },\n [isCollapsed, width, minWidth, maxWidth, setWidth, expand, commit, toggleSidebar],\n );\n\n // Mobile: render as an off-canvas drawer via Base UI Drawer.\n // Auto-close on link navigation (standard drawer UX). Don't gate on\n // `defaultPrevented` — client-side router links call `preventDefault()` for\n // SPA navigation, and we still want to close the drawer when they do.\n const closeOnAnchor = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n const anchor = (event.target as HTMLElement).closest('a');\n if (!anchor || !anchor.hasAttribute('href')) return;\n // Skip non-primary clicks and modifier-clicks (open in new tab/window).\n if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n // Skip explicit external/download targets.\n if (anchor.target === '_blank' || anchor.hasAttribute('download')) return;\n setOpenMobile(false);\n },\n [setOpenMobile],\n );\n\n if (isMobile) {\n return (\n <Drawer side=\"left\" open={openMobile} onOpenChange={setOpenMobile}>\n <DrawerContent\n className={cn(\n 'w-3/4 max-w-(--sidebar-width-mobile) rounded-none border-0 bg-surface2 shadow-xl overflow-hidden',\n className,\n )}\n >\n <VisuallyHidden asChild>\n <DrawerTitle>Navigation</DrawerTitle>\n </VisuallyHidden>\n <VisuallyHidden asChild>\n <DrawerDescription>Primary site navigation drawer</DrawerDescription>\n </VisuallyHidden>\n <div onClick={closeOnAnchor} className=\"flex flex-col h-full min-h-0 px-4 py-2 overflow-hidden\">\n {children}\n </div>\n </DrawerContent>\n </Drawer>\n );\n }\n\n // Desktop: in-flow sidebar with resize handle.\n const currentWidth = isCollapsed ? collapsedWidth : width;\n return (\n <div\n className={cn(\n 'sidebar-layout group/sidebar relative shrink-0 self-stretch min-h-0',\n 'w-(--sidebar-width)',\n 'transition-[width] duration-220 ease-[cubic-bezier(0.32,0.72,0,1)]',\n 'motion-reduce:transition-none',\n 'in-data-[sidebar-gesture=active]:transition-none',\n className,\n // Order matters for tailwind-merge: these win over consumer-supplied border classes.\n isHidden && 'border-r-0 border-transparent',\n )}\n >\n <div\n className={cn(\n 'flex flex-col h-full min-h-0 overflow-hidden',\n 'transition-opacity duration-200 motion-reduce:transition-none',\n isCollapsed ? 'px-2' : 'px-4',\n isHidden && 'opacity-0 pointer-events-none px-0',\n )}\n >\n {children}\n </div>\n\n <div\n // Focusable window-splitter pattern (WAI-ARIA APG): `separator` with\n // value props + keyboard semantics. Click toggles; Arrow keys resize.\n role=\"separator\"\n aria-orientation=\"vertical\"\n // Collapsed: omit the numeric range so AT doesn't see contradictory\n // values (valuenow=0/64 inside valuemin=200..valuemax=480). `valuetext`\n // still describes the state.\n aria-valuenow={isCollapsed ? undefined : currentWidth}\n aria-valuemin={isCollapsed ? undefined : minWidth}\n aria-valuemax={isCollapsed ? undefined : maxWidth}\n aria-valuetext={isCollapsed ? 'collapsed' : `${currentWidth} pixels`}\n aria-label={`Resize sidebar. Arrow keys to resize, Enter to ${isCollapsed ? 'expand' : 'collapse'}.`}\n tabIndex={0}\n onPointerDown={onPointerDown}\n onClick={onClick}\n onKeyDown={onKeyDown}\n className={cn(\n 'group absolute top-0 -right-1 z-10 h-full w-2 cursor-col-resize touch-none',\n 'flex items-center justify-center',\n 'focus-visible:outline-hidden',\n )}\n >\n <ResizeHandleIndicator\n className={cn(\n 'group-hover:opacity-100',\n 'group-focus-visible:opacity-100 group-focus-visible:via-accent1',\n 'in-data-[sidebar-gesture=active]:opacity-100 in-data-[sidebar-gesture=active]:via-neutral6/45',\n )}\n />\n </div>\n </div>\n );\n}\n","import { useId } from 'react';\nimport { MainSidebarNavHeader } from './main-sidebar-nav-header';\nimport { MainSidebarNavLink } from './main-sidebar-nav-link';\nimport type { NavLink } from './main-sidebar-nav-link';\nimport { MainSidebarNavList } from './main-sidebar-nav-list';\nimport { MainSidebarNavSection } from './main-sidebar-nav-section';\nimport type { NavSection } from './main-sidebar-nav-section';\nimport { MainSidebarNavSeparator } from './main-sidebar-nav-separator';\n\nexport type MainSidebarSectionsProps = {\n sections: NavSection[];\n /**\n * Called per link to decide the active state. Receives the section's links so\n * callers can use section-aware active logic without re-scanning `sections`\n * from the outside. Default: each link's `isActive`.\n */\n isActive?: (link: NavLink, activeCandidates: NavLink[]) => boolean;\n className?: string;\n};\n\ntype MainSidebarSectionLinkProps = {\n link: NavLink;\n activeCandidates: NavLink[];\n level?: number;\n isActive?: MainSidebarSectionsProps['isActive'];\n};\n\nfunction getLinkKey(link: NavLink) {\n return `${link.url}:${link.name}`;\n}\n\nfunction MainSidebarSectionLink({ link, activeCandidates, level = 0, isActive }: MainSidebarSectionLinkProps) {\n const childLinks = link.children ?? [];\n\n return (\n <MainSidebarNavLink\n link={link}\n isActive={isActive?.(link, activeCandidates) ?? link.isActive}\n level={level}\n subItems={\n childLinks.length > 0 ? (\n <MainSidebarNavList className=\"mt-0.5\">\n {childLinks.map(child => (\n <MainSidebarSectionLink\n key={getLinkKey(child)}\n link={child}\n activeCandidates={activeCandidates}\n level={level + 1}\n isActive={isActive}\n />\n ))}\n </MainSidebarNavList>\n ) : null\n }\n />\n );\n}\n\nexport function MainSidebarSections({ sections, isActive, className }: MainSidebarSectionsProps) {\n const baseId = useId();\n\n return (\n <>\n {sections.map(section => {\n const showSeparator = section.links.length > 0 && section.separator;\n const headerId = section.title ? `${baseId}-${section.key}` : undefined;\n return (\n <MainSidebarNavSection\n key={section.key}\n className={className}\n aria-labelledby={headerId}\n aria-label={!headerId ? section.key : undefined}\n >\n {/* Render separator and header independently — a section can have\n both (titled group preceded by a divider). */}\n {showSeparator ? <MainSidebarNavSeparator /> : null}\n {section.title ? (\n <MainSidebarNavHeader id={headerId} href={section.href} isActive={section.isHeaderActive}>\n {section.title}\n </MainSidebarNavHeader>\n ) : null}\n <MainSidebarNavList>\n {section.links.map(link => (\n <MainSidebarSectionLink\n key={getLinkKey(link)}\n link={link}\n activeCandidates={section.links}\n isActive={isActive}\n />\n ))}\n </MainSidebarNavList>\n </MainSidebarNavSection>\n );\n })}\n </>\n );\n}\n","import { KeyboardIcon, PanelRightIcon } from 'lucide-react';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport { useMainSidebar } from './main-sidebar-context';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/ds/components/Tooltip';\nimport { cn } from '@/lib/utils';\n\nexport type MainSidebarTriggerProps = ComponentPropsWithoutRef<'button'>;\n\nexport function MainSidebarTrigger({ className, onClick, ...props }: MainSidebarTriggerProps) {\n // Use desktopState so the icon reflects the persisted desktop state\n // even on mobile (where `state` is forced to 'default' for the drawer).\n const { desktopState, toggleSidebar } = useMainSidebar();\n const isCollapsed = desktopState === 'collapsed';\n\n return (\n <Tooltip>\n <TooltipTrigger\n render={\n <button\n type=\"button\"\n aria-label=\"Toggle sidebar\"\n aria-expanded={!isCollapsed}\n {...props}\n onClick={event => {\n onClick?.(event);\n if (!event.defaultPrevented) toggleSidebar();\n }}\n className={cn(\n 'flex items-center justify-center text-neutral3 rounded-md',\n 'size-9',\n isCollapsed ? 'mx-auto' : 'ml-auto',\n 'hover:bg-sidebar-nav-hover hover:text-neutral6',\n 'transition-all duration-normal ease-out-custom',\n 'focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring',\n '[&_svg]:w-4 [&_svg]:h-4 [&_svg]:text-neutral3 [&:hover_svg]:text-neutral5 [&_svg]:transition-transform [&_svg]:duration-normal',\n className,\n )}\n >\n <PanelRightIcon\n className={cn({\n 'rotate-180': isCollapsed,\n })}\n />\n </button>\n }\n />\n\n <TooltipContent>\n Toggle Sidebar\n <div className=\"flex items-center gap-1 [&>svg]:w-[1em] [&>svg]:h-[1em]\">\n <KeyboardIcon /> Ctrl+B\n </div>\n </TooltipContent>\n </Tooltip>\n );\n}\n","import type { NavLink } from './main-sidebar-nav-link';\n\n/**\n * Strict active-path match with sibling-exclusion.\n * - `pathname === link.url` or starts with `link.url + '/'`\n * - Not active if any sibling link has a longer matching url (prevents `/a` lighting while `/a/b` matches).\n */\nexport function getIsLinkActive(link: NavLink, pathname: string, siblings: NavLink[] = []): boolean {\n const matches = (url: string) => pathname === url || pathname.startsWith(url + '/');\n const flattenLinks = (links: NavLink[]): NavLink[] =>\n links.flatMap(item => [item, ...flattenLinks(item.children ?? [])]);\n\n if (!matches(link.url)) return false;\n const competingLinks = [...flattenLinks(link.children ?? []), ...flattenLinks(siblings)];\n return !competingLinks.some(\n other => other.url !== link.url && other.url.length > link.url.length && matches(other.url),\n );\n}\n","import { MainSidebarBottom } from './main-sidebar-bottom';\nimport { MainSidebarMobileTrigger } from './main-sidebar-mobile-trigger';\nimport { MainSidebarNav } from './main-sidebar-nav';\nimport { MainSidebarNavHeader } from './main-sidebar-nav-header';\nimport { MainSidebarNavLabel } from './main-sidebar-nav-label';\nimport { MainSidebarNavLink } from './main-sidebar-nav-link';\nimport { MainSidebarNavList } from './main-sidebar-nav-list';\nimport { MainSidebarNavSection } from './main-sidebar-nav-section';\nimport { MainSidebarNavSeparator } from './main-sidebar-nav-separator';\nimport { MainSidebarRoot } from './main-sidebar-root';\nimport { MainSidebarSections } from './main-sidebar-sections';\nimport { MainSidebarTrigger } from './main-sidebar-trigger';\n\nexport { MainSidebarProvider, type SidebarState, type MainSidebarProviderProps } from './main-sidebar-context';\nexport { useMainSidebar, useMaybeSidebar } from './main-sidebar-context';\nexport { navItemClasses } from './main-sidebar-nav-item-classes';\nexport { type NavLink } from './main-sidebar-nav-link';\nexport { type NavSection } from './main-sidebar-nav-section';\nexport { MainSidebarTrigger } from './main-sidebar-trigger';\nexport { MainSidebarMobileTrigger } from './main-sidebar-mobile-trigger';\nexport { getIsLinkActive } from './main-sidebar-link-active';\n\nexport const MainSidebar = Object.assign(MainSidebarRoot, {\n Bottom: MainSidebarBottom,\n Nav: MainSidebarNav,\n NavSection: MainSidebarNavSection,\n NavLink: MainSidebarNavLink,\n NavLabel: MainSidebarNavLabel,\n NavHeader: MainSidebarNavHeader,\n NavList: MainSidebarNavList,\n NavSeparator: MainSidebarNavSeparator,\n Sections: MainSidebarSections,\n Trigger: MainSidebarTrigger,\n MobileTrigger: MainSidebarMobileTrigger,\n});\n"],"names":["jsx","cn","MenuIcon","ScrollArea","jsxs","Fragment","VisuallyHidden","Tooltip","TooltipTrigger","TooltipContent","cva","useRef","useEffect","useCallback","Drawer","DrawerContent","DrawerTitle","DrawerDescription","useId","PanelRightIcon","KeyboardIcon"],"mappings":";;;;;;;;;;;;AAKO,SAAS,kBAAkB,EAAE,SAAA,EAAW,QAAA,EAAU,GAAG,OAAM,EAA2B;AAC3F,EAAA,uBACEA,cAAA,CAAC,SAAI,SAAA,EAAWC,QAAA,CAAG,WAAW,SAAS,CAAA,EAAI,GAAG,KAAA,EAC3C,QAAA,EACH,CAAA;AAEJ;;ACPA,MAAM,iBAAA,GAAoB,eAAA;AAC1B,MAAM,iBAAA,GAAoB,eAAA;AAE1B,MAAM,iBAAA,GAAoB,iBAAA;AA+B1B,MAAM,kBAAA,GAAqB,KAAA,CAAM,aAAA,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;;"}
|
|
@@ -18,6 +18,8 @@ export type CodeEditorProps = {
|
|
|
18
18
|
autoFocus?: boolean;
|
|
19
19
|
/** Show line numbers in the gutter (default: true) */
|
|
20
20
|
lineNumbers?: boolean;
|
|
21
|
+
/** Wrap long lines within the editor viewport (default: true) */
|
|
22
|
+
lineWrapping?: boolean;
|
|
21
23
|
/** When false, makes the editor read-only */
|
|
22
24
|
editable?: boolean;
|
|
23
25
|
} & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>;
|
|
@@ -35,6 +37,8 @@ export declare const CodeEditor: import('react').ForwardRefExoticComponent<{
|
|
|
35
37
|
autoFocus?: boolean;
|
|
36
38
|
/** Show line numbers in the gutter (default: true) */
|
|
37
39
|
lineNumbers?: boolean;
|
|
40
|
+
/** Wrap long lines within the editor viewport (default: true) */
|
|
41
|
+
lineWrapping?: boolean;
|
|
38
42
|
/** When false, makes the editor read-only */
|
|
39
43
|
editable?: boolean;
|
|
40
44
|
} & Omit<HTMLAttributes<HTMLDivElement>, "onChange"> & import('react').RefAttributes<ReactCodeMirrorRef>>;
|
|
@@ -9,6 +9,7 @@ export declare const ComplexData: Story;
|
|
|
9
9
|
export declare const ArrayData: Story;
|
|
10
10
|
export declare const WithoutCopyButton: Story;
|
|
11
11
|
export declare const LargeContent: Story;
|
|
12
|
+
export declare const WithoutLineWrapping: Story;
|
|
12
13
|
export declare const MarkdownWithVariables: Story;
|
|
13
14
|
export declare const MarkdownWithoutVariables: Story;
|
|
14
15
|
export declare const MarkdownWithAutocomplete: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NavLink } from './main-sidebar-nav-link';
|
|
2
|
+
/**
|
|
3
|
+
* Strict active-path match with sibling-exclusion.
|
|
4
|
+
* - `pathname === link.url` or starts with `link.url + '/'`
|
|
5
|
+
* - Not active if any sibling link has a longer matching url (prevents `/a` lighting while `/a/b` matches).
|
|
6
|
+
*/
|
|
7
|
+
export declare function getIsLinkActive(link: NavLink, pathname: string, siblings?: NavLink[]): boolean;
|
|
@@ -2,11 +2,12 @@ type ItemStyleOptions = {
|
|
|
2
2
|
isActive?: boolean;
|
|
3
3
|
isCollapsed?: boolean;
|
|
4
4
|
isFeatured?: boolean;
|
|
5
|
+
level?: number;
|
|
5
6
|
};
|
|
6
7
|
/**
|
|
7
8
|
* Shared classes for any sidebar nav row element (anchor, button, custom).
|
|
8
9
|
* Apply directly to the interactive element so `asChild` and custom slotted
|
|
9
10
|
* elements all receive the same styling.
|
|
10
11
|
*/
|
|
11
|
-
export declare const navItemClasses: ({ isActive, isCollapsed, isFeatured }?: ItemStyleOptions) => string;
|
|
12
|
+
export declare const navItemClasses: ({ isActive, isCollapsed, isFeatured, level }?: ItemStyleOptions) => string;
|
|
12
13
|
export {};
|
|
@@ -5,10 +5,11 @@ export type NavLink = {
|
|
|
5
5
|
name: string;
|
|
6
6
|
url: string;
|
|
7
7
|
icon?: React.ReactNode;
|
|
8
|
+
children?: NavLink[];
|
|
8
9
|
isActive?: boolean;
|
|
9
10
|
variant?: 'default' | 'featured';
|
|
10
11
|
tooltipMsg?: string;
|
|
11
|
-
/** @deprecated
|
|
12
|
+
/** @deprecated Prefer nested `children`; accepted for callers still rendering manual sublinks. */
|
|
12
13
|
indent?: boolean;
|
|
13
14
|
};
|
|
14
15
|
export type MainSidebarNavLinkProps = Omit<ComponentPropsWithoutRef<'li'>, 'children'> & {
|
|
@@ -18,6 +19,10 @@ export type MainSidebarNavLinkProps = Omit<ComponentPropsWithoutRef<'li'>, 'chil
|
|
|
18
19
|
children?: React.ReactNode;
|
|
19
20
|
/** Override the Provider-level LinkComponent for this row. Defaults to `<a>` when neither is set. */
|
|
20
21
|
LinkComponent?: LinkComponent;
|
|
22
|
+
/** Nesting depth for manually composed subitems. Data-driven sections set this automatically. */
|
|
23
|
+
level?: number;
|
|
24
|
+
/** Nested list rendered below the row while keeping valid `<li><a /><ul /></li>` structure. */
|
|
25
|
+
subItems?: React.ReactNode;
|
|
21
26
|
/**
|
|
22
27
|
* When true, render `children` as the interactive element.
|
|
23
28
|
* Use for `<button>` items or custom router Links. Item classes are forwarded
|
|
@@ -26,4 +31,4 @@ export type MainSidebarNavLinkProps = Omit<ComponentPropsWithoutRef<'li'>, 'chil
|
|
|
26
31
|
*/
|
|
27
32
|
asChild?: boolean;
|
|
28
33
|
};
|
|
29
|
-
export declare function MainSidebarNavLink({ link, state: stateProp, children, isActive, className, LinkComponent: LinkProp, asChild, ...props }: MainSidebarNavLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare function MainSidebarNavLink({ link, state: stateProp, children, isActive, className, LinkComponent: LinkProp, level: levelProp, subItems, asChild, ...props }: MainSidebarNavLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,17 +3,11 @@ import { NavSection } from './main-sidebar-nav-section';
|
|
|
3
3
|
export type MainSidebarSectionsProps = {
|
|
4
4
|
sections: NavSection[];
|
|
5
5
|
/**
|
|
6
|
-
* Called per link to decide the active state. Receives
|
|
7
|
-
* callers can use
|
|
8
|
-
*
|
|
6
|
+
* Called per link to decide the active state. Receives the section's links so
|
|
7
|
+
* callers can use section-aware active logic without re-scanning `sections`
|
|
8
|
+
* from the outside. Default: each link's `isActive`.
|
|
9
9
|
*/
|
|
10
|
-
isActive?: (link: NavLink,
|
|
10
|
+
isActive?: (link: NavLink, activeCandidates: NavLink[]) => boolean;
|
|
11
11
|
className?: string;
|
|
12
12
|
};
|
|
13
13
|
export declare function MainSidebarSections({ sections, isActive, className }: MainSidebarSectionsProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
/**
|
|
15
|
-
* Strict active-path match with sibling-exclusion.
|
|
16
|
-
* - `pathname === link.url` or starts with `link.url + '/'`
|
|
17
|
-
* - Not active if any sibling link has a longer matching url (prevents `/a` lighting while `/a/b` matches).
|
|
18
|
-
*/
|
|
19
|
-
export declare function getIsLinkActive(link: NavLink, pathname: string, siblings?: NavLink[]): boolean;
|
|
@@ -17,7 +17,7 @@ export { type NavLink } from './main-sidebar-nav-link';
|
|
|
17
17
|
export { type NavSection } from './main-sidebar-nav-section';
|
|
18
18
|
export { MainSidebarTrigger } from './main-sidebar-trigger';
|
|
19
19
|
export { MainSidebarMobileTrigger } from './main-sidebar-mobile-trigger';
|
|
20
|
-
export { getIsLinkActive } from './main-sidebar-
|
|
20
|
+
export { getIsLinkActive } from './main-sidebar-link-active';
|
|
21
21
|
export declare const MainSidebar: typeof MainSidebarRoot & {
|
|
22
22
|
Bottom: typeof MainSidebarBottom;
|
|
23
23
|
Nav: typeof MainSidebarNav;
|
|
@@ -5,6 +5,7 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof MainSidebar>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const WithSections: Story;
|
|
8
|
+
export declare const WithNestedItems: Story;
|
|
8
9
|
export declare const WithBottom: Story;
|
|
9
10
|
export declare const FullSidebar: Story;
|
|
10
11
|
export declare const Resizable: Story;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/playground-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "35.1.0-alpha.
|
|
4
|
+
"version": "35.1.0-alpha.2",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
"react": ">=19.0.0",
|
|
103
103
|
"react-dom": ">=19.0.0",
|
|
104
104
|
"tailwindcss": "^4.0.0",
|
|
105
|
-
"@mastra/client-js": "^1.26.1-alpha.
|
|
106
|
-
"@mastra/react": "1.1.1-alpha.
|
|
105
|
+
"@mastra/client-js": "^1.26.1-alpha.2",
|
|
106
|
+
"@mastra/react": "1.1.1-alpha.2"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@storybook/addon-a11y": "^10.4.1",
|
|
@@ -141,9 +141,9 @@
|
|
|
141
141
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
142
142
|
"vitest": "4.1.8",
|
|
143
143
|
"@internal/lint": "0.0.107",
|
|
144
|
-
"@mastra/client-js": "^1.26.1-alpha.
|
|
145
|
-
"@mastra/core": "1.46.0-alpha.
|
|
146
|
-
"@mastra/react": "1.1.1-alpha.
|
|
144
|
+
"@mastra/client-js": "^1.26.1-alpha.2",
|
|
145
|
+
"@mastra/core": "1.46.0-alpha.2",
|
|
146
|
+
"@mastra/react": "1.1.1-alpha.2"
|
|
147
147
|
},
|
|
148
148
|
"homepage": "https://mastra.ai",
|
|
149
149
|
"repository": {
|