gridsmith-ui 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Breadcrumbs-CGS8GKl-.d.ts +33 -0
- package/dist/chat.js +1 -1
- package/dist/{chunk-CKWITUSH.js → chunk-2PWGJ4PK.js} +10 -5
- package/dist/chunk-2PWGJ4PK.js.map +1 -0
- package/dist/chunk-2YSEME33.js +118 -0
- package/dist/chunk-2YSEME33.js.map +1 -0
- package/dist/{chunk-ICNWPNMM.js → chunk-6XAU44U4.js} +4 -3
- package/dist/chunk-6XAU44U4.js.map +1 -0
- package/dist/{chunk-RT7RYGC3.js → chunk-JXANCXK6.js} +4 -39
- package/dist/chunk-JXANCXK6.js.map +1 -0
- package/dist/{chunk-6PL7FXYH.js → chunk-MV7JXWXK.js} +318 -9
- package/dist/chunk-MV7JXWXK.js.map +1 -0
- package/dist/{chunk-EYMGLK4M.js → chunk-SVP2IG4S.js} +2 -2
- package/dist/{chunk-EYMGLK4M.js.map → chunk-SVP2IG4S.js.map} +1 -1
- package/dist/chunk-WOVYHFUD.js +50 -0
- package/dist/chunk-WOVYHFUD.js.map +1 -0
- package/dist/chunk-XVB55M3N.js +42 -0
- package/dist/chunk-XVB55M3N.js.map +1 -0
- package/dist/data-grid.js +4 -3
- package/dist/data-grid.js.map +1 -1
- package/dist/editor.js +2 -1
- package/dist/editor.js.map +1 -1
- package/dist/index.d.ts +199 -38
- package/dist/index.js +598 -369
- package/dist/index.js.map +1 -1
- package/dist/kanban.js +22 -5
- package/dist/kanban.js.map +1 -1
- package/dist/resizable.d.ts +16 -1
- package/dist/resizable.js +87 -20
- package/dist/resizable.js.map +1 -1
- package/dist/roots.css +5 -0
- package/dist/virtualized.js +4 -3
- package/dist/virtualized.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-6PL7FXYH.js.map +0 -1
- package/dist/chunk-CKWITUSH.js.map +0 -1
- package/dist/chunk-ICNWPNMM.js.map +0 -1
- package/dist/chunk-RT7RYGC3.js.map +0 -1
package/dist/resizable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../showcase/src/components/ResizablePanels.tsx","../../../showcase/src/components/SplitView.tsx"],"names":["PanelGroup","PanelResizeHandle","jsx","showDetail"],"mappings":";;;;;;;;;;;;;;AAaA,IAAM,YAAA,GAAe,cAAyB,YAAY,CAAA;AAC1D,IAAM,SAAA,GAAY,cAAc,KAAK,CAAA;AAa9B,SAAS,mBAAA,CAAoB;AAAA,EAClC,SAAA;AAAA,EACA,SAAA,GAAY,YAAA;AAAA,EACZ,aAAA,GAAgB,IAAA;AAAA,EAChB,GAAG;AACL,CAAA,EAA6B;AAC3B,EAAA,MAAM,QAAA,GAAW,cAAc,IAAI,CAAA;AACnC,EAAA,MAAM,WAAA,GAAc,aAAA,IAAiB,QAAA,IAAY,SAAA,KAAc,YAAA;AAC/D,EAAA,MAAM,kBAAA,GAAqB,cAAc,UAAA,GAAa,SAAA;AAEtD,EAAA,uBACE,GAAA,CAAC,YAAA,CAAa,QAAA,EAAb,EAAsB,KAAA,EAAO,kBAAA,EAC5B,QAAA,kBAAA,GAAA,CAAC,SAAA,CAAU,QAAA,EAAV,EAAmB,KAAA,EAAO,QAAA,EACzB,QAAA,kBAAA,GAAA;AAAA,IAACA,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,oBAAA;AAAA,QACA,uBAAuB,UAAA,IAAc,UAAA;AAAA,QACrC;AAAA,OACF;AAAA,MACA,WAAA,EAAa,kBAAA;AAAA,MACZ,GAAG;AAAA;AAAA,KAER,CAAA,EACF,CAAA;AAEJ;AAcO,SAAS,cAAA,CAAe,EAAE,SAAA,EAAW,GAAG,OAAM,EAAwB;AAC3E,EAAA,uBAAO,GAAA,CAAC,SAAM,SAAA,EAAW,EAAA,CAAG,IAAI,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACzD;AAUO,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AAA,EAAA,EAAgB,IAAA,EAAI,IAAA,EAAE,QAAA,EAAA,KAAA,EAAM,CAAA,EAAkB,CAAA,EACzK;AAAA,WAAA,EACF;AAAA;AAAA;AAAA,KAEJ;AAAA,IACC,aAAa,cAAA,oBACZA,GAAAA,CAAC,MAAA,EAAA,EAAO,MAAM,SAAA,EAAW,OAAA,EAAS,MAAM,iBAAA,CAAkB,KAAK,CAAA,EAAG,KAAA,EAAO,UAAA,EAAY,QAAA,EAAS,SAC3F,QAAA,EAAA,KAAA,EACH;AAAA,GAAA,EAEJ,CAAA;AAEJ","file":"resizable.js","sourcesContent":["import {\n Panel,\n Group as PanelGroup,\n Separator as PanelResizeHandle,\n} from \"react-resizable-panels\";\nimport { createContext, useContext, type ComponentProps } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { useBreakpoint } from \"../lib/use-breakpoint\";\nimport { Icon } from \"../lib/icons\";\n\ntype PanelGroupProps = ComponentProps<typeof PanelGroup>;\n\ntype Direction = \"horizontal\" | \"vertical\";\nconst DirectionCtx = createContext<Direction>(\"horizontal\");\nconst MobileCtx = createContext(false);\n\nexport interface ResizablePanelGroupProps\n extends Omit<PanelGroupProps, \"className\" | \"orientation\"> {\n direction?: Direction;\n stackOnMobile?: boolean;\n className?: string;\n /** Map of panel id → percentage (0–100). Must be an object, never an array. Panels need matching id props. */\n defaultLayout?: { [panelId: string]: number };\n /** Called after resize ends. Receives { [panelId]: number }, not number[]. */\n onLayoutChanged?: (layout: { [panelId: string]: number }) => void;\n}\n\nexport function ResizablePanelGroup({\n className,\n direction = \"horizontal\",\n stackOnMobile = true,\n ...props\n}: ResizablePanelGroupProps) {\n const isMobile = useBreakpoint(\"sm\");\n const shouldStack = stackOnMobile && isMobile && direction === \"horizontal\";\n const effectiveDirection = shouldStack ? \"vertical\" : direction;\n\n return (\n <DirectionCtx.Provider value={effectiveDirection}>\n <MobileCtx.Provider value={isMobile}>\n <PanelGroup\n className={cn(\n \"flex h-full w-full\",\n effectiveDirection === \"vertical\" && \"flex-col\",\n className,\n )}\n orientation={effectiveDirection}\n {...props}\n />\n </MobileCtx.Provider>\n </DirectionCtx.Provider>\n );\n}\n\ntype PanelProps = ComponentProps<typeof Panel>;\n\nexport interface ResizablePanelProps extends Omit<PanelProps, \"className\"> {\n className?: string;\n id?: string;\n /** number = px. \"30%\" or \"30\" = percent. \"28rem\" / \"400px\" also valid. */\n defaultSize?: number | string;\n minSize?: number | string;\n maxSize?: number | string;\n collapsible?: boolean;\n}\n\nexport function ResizablePanel({ className, ...props }: ResizablePanelProps) {\n return <Panel className={cn(\"\", className)} {...props} />;\n}\n\ntype PanelResizeHandleProps = ComponentProps<typeof PanelResizeHandle>;\n\nexport interface ResizableHandleProps\n extends Omit<PanelResizeHandleProps, \"className\"> {\n withHandle?: boolean;\n className?: string;\n}\n\nexport function ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizableHandleProps) {\n const direction = useContext(DirectionCtx);\n const isMobile = useContext(MobileCtx);\n const isVertical = direction === \"vertical\";\n\n return (\n <PanelResizeHandle\n className={cn(\n \"relative flex items-center justify-center bg-[var(--ds-border-default)]\",\n isVertical\n ? cn(\n \"h-[var(--ds-border-width)] w-full after:absolute after:left-0 after:right-0 after:content-['']\",\n isMobile ? \"after:-top-3 after:-bottom-3\" : \"after:-top-1 after:-bottom-1\"\n )\n : cn(\n \"w-[var(--ds-border-width)] after:absolute after:inset-y-0 after:content-['']\",\n isMobile ? \"after:-left-3 after:-right-3\" : \"after:-left-1 after:-right-1\"\n ),\n \"focus-visible:outline-none focus-visible:shadow-[var(--ds-shadow-focus)]\",\n \"[&[data-resize-handle-state=drag]]:bg-[var(--ds-accent-primary)]\",\n \"[&[data-resize-handle-state=hover]]:bg-[var(--ds-accent-primary)]\",\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div\n className={cn(\n \"z-10 flex items-center justify-center rounded-[var(--ds-radius-sm)]\",\n \"border-[length:var(--ds-border-width)] border-[var(--ds-border-default)]\",\n \"bg-[var(--ds-bg-surface)]\",\n isVertical\n ? (isMobile ? \"h-4 w-8\" : \"h-3 w-4\")\n : (isMobile ? \"h-8 w-4\" : \"h-4 w-3\"),\n )}\n >\n <Icon\n name=\"grip-vertical\"\n size={isMobile ? 12 : 10}\n className={cn(\n \"text-[var(--ds-text-muted)]\",\n isVertical && \"rotate-90\",\n )}\n />\n </div>\n )}\n </PanelResizeHandle>\n );\n}\n","import { useCallback, useLayoutEffect, useRef, useState, type KeyboardEvent, type ReactNode } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { useBelow, useCompact, useElementWidth } from \"../lib/use-compact\";\nimport { ResizablePanelGroup, ResizablePanel, ResizableHandle } from \"./ResizablePanels\";\nimport { Button } from \"./Button\";\nimport { Drawer } from \"./Drawer\";\nimport { Icon } from \"../lib/icons\";\nimport { useAppShell } from \"./AppShell\";\nimport { SurfaceBoundary, type SplitListReport } from \"../lib/surface-context\";\nimport { isTabStop, rememberFocus, tabStops, type RememberedFocus } from \"../lib/focus\";\n\nexport type SplitViewFrame = \"fill\" | \"page\";\n\n/**\n * How far past a threshold the layout must go before a collapsed part comes back, in px: a classic scrollbar's width\n * (15 px on a Mac with a mouse, 17 on Windows), whose coming and going with the aside moved the layout back and forth\n * across the threshold (round 27 review). No wider: inside the band the answer depends on the way the width came, so a\n * wider band could keep the aside collapsed at a width where it fits.\n */\nconst THRESHOLD_BAND = 17;\n\nexport interface SplitViewProps {\n /** The list (an inbox, a queue): it scrolls on its own. */\n list: ReactNode;\n /** The selected item (a thread, a record): it fills the height and scrolls on its own. */\n detail: ReactNode;\n /** Context beside the detail (a contact, properties). The pane insets it as the Drawer it collapses into does (the page's gutter, Sprint 25.14 A36), so pass content with no padding classes (round 8). Collapses to a toggle that opens it in a Drawer when the layout is narrower than `asideCollapseBelow`. */\n aside?: ReactNode;\n /** Names the aside's toggle and Drawer. */\n asideTitle?: string;\n /**\n * Below `collapseBelow` the list shows alone; with `detailOpen` the detail replaces it, with a Back button that calls\n * `onDetailClose` (detailMode \"stack\"). The page owns the selection, so it owns this flag.\n */\n detailOpen?: boolean;\n onDetailClose?: () => void;\n /** \"stack\" (default): the detail stacks over the list below the collapse width. \"route\": the app navigates to the detail's own route instead, and this renders the list alone there. */\n detailMode?: \"stack\" | \"route\";\n /**\n * \"shown\" (default): above the collapse width the detail pane is always there — an inbox's reading pane may show a\n * placeholder. \"hidden\" (Sprint 25.7, C3): `detailOpen` decides at every width. Closed, the list takes the whole\n * width; open, the pane appears beside it at the width the user last gave it, with a close control that calls\n * `onDetailClose`. For boards, timelines and lists of records. The list stays mounted, so a board or a timeline keeps\n * its scroll and zoom.\n */\n closedDetail?: \"shown\" | \"hidden\";\n /** The open pane's close control, named for a screen reader (closedDetail=\"hidden\"). Default \"Close\". */\n closeLabel?: string;\n backLabel?: string;\n /** Percent of the width the list takes; the divider is draggable. */\n listWidth?: number;\n listMinWidth?: number;\n asideWidth?: number;\n /** Below this width of the layout itself (px) the list and detail stop sitting side by side. */\n collapseBelow?: number;\n /** Below this width of the layout itself (px) the aside becomes a toggle. */\n asideCollapseBelow?: number;\n /**\n * The narrowest the open item's pane may be beside an aside (px). When the list and the aside would leave it less,\n * the aside becomes its toggle and Drawer, so the item keeps the room its content needs: the aside is the secondary\n * content (round 27, R27-13, the owner: \"which information is more important\"). An item that holds a wide table or a\n * card grid may need more: pass it.\n */\n detailMinWidth?: number;\n /** A bordered, rounded surface (inside a page with padding) instead of edge to edge (filling <main>). */\n bordered?: boolean;\n /** \"fill\": the page root, flush to the shell, h-full against main, each pane owns its inset. \"page\" (default): inside a PageContainer under a PageHeader. */\n frame?: SplitViewFrame;\n \"aria-label\"?: string;\n className?: string;\n}\n\n/**\n * The reading-pane composition (Sprint 25.2, R3): one surface with dividers —\n * list, detail and an optional aside — that fills the height it is given (an\n * AppShell's <main> already gives it) and never three cards with gaps. The\n * panels compose ResizablePanelGroup, so the dividers drag. Below the collapse\n * width, measured on the layout itself, the list shows alone and the detail\n * stacks over it (or the app routes to it); the aside collapses to a toggle.\n * The page owns the selection and assembles the contents; keyboard movement\n * through the list is the list's job (StackedList selectedId).\n */\nexport function SplitView({\n list,\n detail,\n aside,\n asideTitle = \"Details\",\n detailOpen = false,\n onDetailClose,\n detailMode = \"stack\",\n closedDetail = \"shown\",\n closeLabel = \"Close\",\n backLabel = \"Back\",\n listWidth = 35,\n listMinWidth = 25,\n asideWidth = 25,\n collapseBelow = 768,\n asideCollapseBelow = 1024,\n detailMinWidth = 480,\n bordered = false,\n frame = \"page\",\n \"aria-label\": ariaLabel,\n className,\n}: SplitViewProps) {\n const rootRef = useRef<HTMLDivElement>(null);\n const compact = useCompact(rootRef, collapseBelow, THRESHOLD_BAND);\n const layoutWidth = useElementWidth(rootRef);\n // The panels' shares as the user left them (the review: the defaults were read, so a list dragged wider left the item\n // under its minimum beside the aside); the aside's last share stands in while it is collapsed.\n const [shares, setShares] = useState<{ list?: number; aside?: number }>({});\n const listShare = shares.list ?? listWidth;\n const asideShare = shares.aside ?? asideWidth;\n // the aside yields when the layout is narrow, or when beside it the item would have less than its minimum\n const itemShare = (100 - listShare - asideShare) / 100;\n const itemBesideAside = aside ? layoutWidth * itemShare : 0;\n // the item moves by its share of the scrollbar's width, so its band is that share of the layout's\n const itemSqueezed = useBelow(itemBesideAside, detailMinWidth, THRESHOLD_BAND * Math.max(0, itemShare));\n const asideCollapsed = useBelow(layoutWidth, asideCollapseBelow, THRESHOLD_BAND) || itemSqueezed;\n const [asideWantsOpen, setAsideWantsOpen] = useState(false);\n const hiding = closedDetail === \"hidden\";\n // Hidden: the aside belongs to the open item, so it (its pane, its toggle, its Drawer) goes with the pane, and a\n // Drawer left open does not come back with the next item (render-time state adjustment).\n const showAside = !!aside && (!hiding || detailOpen);\n if (hiding && !detailOpen && asideWantsOpen) setAsideWantsOpen(false);\n // on a phone the aside's Drawer belongs to the item on screen: Back closes it with the item\n if (compact && !detailOpen && asideWantsOpen) setAsideWantsOpen(false);\n const asideOpen = asideCollapsed && asideWantsOpen;\n const region = ariaLabel ? { role: \"region\" as const, \"aria-label\": ariaLabel } : {};\n // fill: the page root, flush to the shell on every side (no border, no radius, no padding of its own); h-full\n // resolves against <main> because the shell is a flex column down to it. page: inside a PageContainer under a\n // PageHeader, where `bordered` draws the surface. Each pane owns its own inset either way.\n const isFill = frame === \"fill\";\n // Sprint 25.14 A44 (P32): the list pane's content reports what it is, as a wrapped PageHeader does to its\n // PageContainer: content that draws its own frame or cards (a KanbanBoard, a CardGrid, a Table), or content with no\n // frame of its own that scrolls inside the pane (a StackedList, a Gantt). No frame around what frames itself: when the\n // pane holds only the first kind, the list sits on the canvas with nothing drawn behind it and the open item on the\n // surface, whatever `bordered` says. Anything that scrolls inside keeps the hairline, which shows where it scrolls.\n const listHolds = useRef({ framed: 0, scrolls: 0 });\n const [framesItself, setFramesItself] = useState(false);\n const reportToList = useCallback<SplitListReport>((kind, present) => {\n const held = listHolds.current;\n held[kind] = Math.max(0, held[kind] + (present ? 1 : -1));\n setFramesItself(held.framed > 0 && held.scrolls === 0);\n }, []);\n const onCanvas = isFill || framesItself;\n // In a shell with an app footer the children wrapper has no definite height, so h-full cannot resolve; the shell\n // publishes main's height and fill takes it (the footer then sits below the fold, as it must under a full pane).\n const shell = useAppShell();\n const fillStyle = isFill && shell?.hasFooter ? { height: \"var(--ds-main-height, 100%)\" } : undefined;\n // Edge to edge the list sits on the page's canvas, like every other page, and the open item (its detail and its aside)\n // on the surface (round 27, R27-12, the owner: the whole split on the surface read as a different page). A page frame,\n // bordered or not, stays one surface: a card on the canvas. Beside a list that frames itself, a page frame's open item\n // is that card (rounded, and bordered when the view is), as the page's other cards are; edge to edge it is square.\n const itemSurface = !onCanvas ? undefined : isFill\n ? \"bg-[var(--ds-bg-surface)]\"\n : cn(\"bg-[var(--ds-bg-surface)] rounded-[var(--ds-radius-md)] overflow-hidden\", bordered && \"border-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\");\n const surface = cn(\n \"h-full min-h-0 w-full\",\n !onCanvas && \"bg-[var(--ds-bg-surface)]\",\n isFill && \"rounded-none border-0\",\n bordered && !onCanvas && \"border-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)] rounded-[var(--ds-radius-md)] overflow-hidden\",\n className,\n );\n // each pane is a surface of its own: what a Card around the view, or the list pane, tells content stops at its edge\n const listContent = <SurfaceBoundary pane framer={reportToList}>{list}</SurfaceBoundary>;\n const detailContent = <SurfaceBoundary pane>{detail}</SurfaceBoundary>;\n\n // closedDetail=\"hidden\" (C3): the pane opens beside the list at the width the user last gave it; closing it returns\n // focus to the item the pane shows, or its neighbour if that item is gone (D14(e)): the list's selected item, else\n // the last list item that took focus, checked on each render while the pane is open, so switching items is followed.\n // A selection kept in the URL changes the path, so the item is remembered whatever the route does. With no item\n // (opened on load, or from outside the list) focus goes to the list's first Tab stop. No overlay layer: an\n // assistant opened earlier keeps Escape.\n const [listPct, setListPct] = useState(listWidth);\n const paneRef = useRef<HTMLDivElement>(null);\n const shown = useRef<RememberedFocus | null>(null);\n const lastInList = useRef<HTMLElement | null>(null);\n const wasOpen = useRef(false);\n useLayoutEffect(() => {\n if (!hiding) return;\n const listPane = rootRef.current?.querySelector<HTMLElement>('[data-pane=\"list\"]') ?? null;\n if (detailOpen) {\n wasOpen.current = true;\n const selected = listPane?.querySelector<HTMLElement>('[aria-current=\"true\"], [aria-selected=\"true\"]');\n const last = lastInList.current;\n const item = (selected && (isTabStop(selected) ? selected : tabStops(selected)[0]))\n || (last?.isConnected && listPane?.contains(last) ? last : null);\n if (item && item !== shown.current?.el) shown.current = rememberFocus(item, { ignoreRoute: true });\n return;\n }\n if (!wasOpen.current) return;\n wasOpen.current = false;\n const r = shown.current;\n shown.current = null;\n const active = document.activeElement;\n if (active && active !== document.body && active.isConnected) return;\n const first = listPane ? tabStops(listPane)[0] : undefined;\n if (!r?.restore(first)) first?.focus();\n });\n const onPaneKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key !== \"Escape\" || e.defaultPrevented || !onDetailClose) return;\n const t = e.target as HTMLElement;\n // the pane's own DOM only — a portalled popup inside it bubbles here in React's tree — and never from a field\n if (!paneRef.current?.contains(t) || t.closest(\"input, textarea, select, [contenteditable='true']\")) return;\n e.preventDefault();\n onDetailClose();\n };\n\n if (compact) {\n const showDetail = detailMode === \"stack\" && detailOpen;\n // on a phone the item's aside is a toggle beside Back that opens it in a Drawer, as it is on a narrow desktop (the\n // round 27 review: below the collapse width it could not be reached at all)\n const phoneAside = showDetail && !!aside;\n return (\n <div ref={rootRef} data-split-view={showDetail ? \"detail\" : \"list\"} data-frame={frame} {...region} className={cn(surface, \"flex flex-col\")} style={fillStyle}>\n {showDetail && (\n <div className={cn(\"flex-1 min-h-0 flex flex-col\", itemSurface)}>\n <div className=\"shrink-0 flex items-center justify-between gap-ds-2 px-ds-3 py-ds-2 border-b-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\">\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" iconLeft={<Icon name=\"arrow-left\" size={14} />} onClick={onDetailClose}>{backLabel}</Button>\n {phoneAside && <Button type=\"button\" variant=\"ghost\" size=\"sm\" iconLeft={<Icon name=\"info\" size={14} />} onClick={() => setAsideWantsOpen(true)} aria-expanded={asideWantsOpen}>{asideTitle}</Button>}\n </div>\n <div className=\"flex-1 min-h-0 overflow-y-auto\">{detailContent}</div>\n </div>\n )}\n {/* Sprint 25.14 A44 (the review of 30 September): the list stays mounted while the stacked detail is shown, as it\n does beside it on a wider screen, so a board keeps its scroll and its report (the view kept its frame\n off only while the board was on screen), and Back finds the list as the user left it */}\n <div className=\"flex-1 min-h-0 overflow-y-auto\" hidden={showDetail || undefined}>{listContent}</div>\n {phoneAside && (\n <Drawer open={asideWantsOpen} onClose={() => setAsideWantsOpen(false)} title={asideTitle} position=\"right\">\n {aside}\n </Drawer>\n )}\n </div>\n );\n }\n\n const asideButton = showAside && asideCollapsed\n ? <Button type=\"button\" variant=\"ghost\" size=\"sm\" iconLeft={<Icon name=\"info\" size={14} />} onClick={() => setAsideWantsOpen(true)} aria-expanded={asideOpen}>{asideTitle}</Button>\n : null;\n const closeButton = hiding && onDetailClose\n ? <Button type=\"button\" variant=\"ghost\" size=\"icon-sm\" aria-label={closeLabel} onClick={onDetailClose}><Icon name=\"close\" size={14} /></Button>\n : null;\n const paneBar = asideButton || closeButton ? (\n <div className=\"shrink-0 flex items-center justify-end gap-ds-1 px-ds-3 py-ds-2 border-b-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\">\n {asideButton}\n {closeButton}\n </div>\n ) : null;\n const showDetail = !hiding || detailOpen;\n\n return (\n <div ref={rootRef} data-split-view={hiding && !detailOpen ? \"list\" : \"split\"} data-frame={frame} {...region} className={surface} style={fillStyle}>\n <ResizablePanelGroup\n direction=\"horizontal\"\n stackOnMobile={false}\n className=\"h-full\"\n // the width the user gives the list is kept, so a closed pane reopens at it; the shares decide when the aside yields\n onLayoutChanged={(layout) => {\n setShares((prev) => (prev.list === (layout.list ?? prev.list) && prev.aside === (layout.aside ?? prev.aside) ? prev : { list: layout.list ?? prev.list, aside: layout.aside ?? prev.aside }));\n if (hiding && layout.detail != null && layout.list != null) setListPct(layout.list);\n }}\n >\n <ResizablePanel id=\"list\" defaultSize={`${hiding ? (detailOpen ? listPct : 100) : listWidth}%`} minSize={`${listMinWidth}%`}>\n <div data-pane=\"list\" className=\"h-full min-h-0 overflow-y-auto\" onFocus={hiding ? (e) => { lastInList.current = e.target; } : undefined}>\n {listContent}\n </div>\n </ResizablePanel>\n {showDetail && (\n <>\n <ResizableHandle withHandle />\n <ResizablePanel id=\"detail\" minSize=\"30%\">\n <div ref={paneRef} data-pane=\"detail\" className={cn(\"h-full min-h-0 flex flex-col\", itemSurface)} onKeyDown={hiding ? onPaneKeyDown : undefined}>\n {paneBar}\n <div className=\"flex-1 min-h-0 overflow-y-auto\">{detailContent}</div>\n </div>\n </ResizablePanel>\n </>\n )}\n {showAside && !asideCollapsed && (\n <>\n <ResizableHandle withHandle />\n <ResizablePanel id=\"aside\" defaultSize={`${asideWidth}%`} minSize=\"15%\">\n {/* the Drawer's body inset, so the aside's content sits where it will in the Drawer (Sprint 25.14 A36) */}\n <div data-pane=\"aside\" className={cn(\"h-full min-h-0 overflow-y-auto py-ds-5 px-[var(--ds-page-gutter)]\", itemSurface)}><SurfaceBoundary pane>{aside}</SurfaceBoundary></div>\n </ResizablePanel>\n </>\n )}\n </ResizablePanelGroup>\n {showAside && asideCollapsed && (\n <Drawer open={asideOpen} onClose={() => setAsideWantsOpen(false)} title={asideTitle} position=\"right\">\n {aside}\n </Drawer>\n )}\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../showcase/src/components/ResizablePanels.tsx","../../../showcase/src/components/SplitView.tsx"],"names":["PanelGroup","PanelResizeHandle","useRef","jsx","useLayoutEffect","showDetail"],"mappings":";;;;;;;;;;;;;;;;;AAaA,IAAM,YAAA,GAAe,cAAyB,YAAY,CAAA;AAC1D,IAAM,SAAA,GAAY,cAAc,KAAK,CAAA;AAa9B,SAAS,mBAAA,CAAoB;AAAA,EAClC,SAAA;AAAA,EACA,SAAA,GAAY,YAAA;AAAA,EACZ,aAAA,GAAgB,IAAA;AAAA,EAChB,GAAG;AACL,CAAA,EAA6B;AAC3B,EAAA,MAAM,QAAA,GAAW,cAAc,IAAI,CAAA;AACnC,EAAA,MAAM,WAAA,GAAc,aAAA,IAAiB,QAAA,IAAY,SAAA,KAAc,YAAA;AAC/D,EAAA,MAAM,kBAAA,GAAqB,cAAc,UAAA,GAAa,SAAA;AAEtD,EAAA,uBACE,GAAA,CAAC,YAAA,CAAa,QAAA,EAAb,EAAsB,KAAA,EAAO,kBAAA,EAC5B,QAAA,kBAAA,GAAA,CAAC,SAAA,CAAU,QAAA,EAAV,EAAmB,KAAA,EAAO,QAAA,EACzB,QAAA,kBAAA,GAAA;AAAA,IAACA,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,oBAAA;AAAA,QACA,uBAAuB,UAAA,I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,eAAA,EAAiB,WAAW,EAAA,CAAG,gCAAA,EAAkC,WAAW,CAAA,EAAI,QAAA,EAAA,aAAA,EAAc;AAAA,aAAA,EAC1G,CAAA,EACF;AAAA,WAAA,EACF,CAAA;AAAA,UAED,SAAA,IAAa,CAAC,cAAA,oBACb,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,4BAAAA,GAAAA,CAAC,eAAA,EAAA,EAAgB,UAAA,EAAU,IAAA,EAAC,CAAA;AAAA,4BAC5BA,GAAAA,CAAC,cAAA,EAAA,EAAe,EAAA,EAAG,OAAA,EAAQ,WAAA,EAAa,CAAA,EAAG,UAAU,CAAA,CAAA,CAAA,EAAK,OAAA,EAAQ,KAAA,EAEhE,QAAA,kBAAAA,IAAC,KAAA,EAAA,EAAI,GAAA,EAAK,cAAA,EAAgB,WAAA,EAAU,OAAA,EAAQ,SAAA,EAAW,EAAA,CAAG,mEAAA,EAAqE,aAAa,WAAW,CAAA,EAAG,QAAA,kBAAAA,GAAAA,CAAC,eAAA,EAAA,EAAgB,IAAA,EAAK,OAAA,EAAS,QAAA,EAAA,KAAA,EAAM,GAAkB,CAAA,EACnN;AAAA,WAAA,EACF;AAAA;AAAA;AAAA,KAEJ;AAAA,IACC,aAAa,cAAA,oBACZA,GAAAA,CAAC,MAAA,EAAA,EAAO,MAAM,SAAA,EAAW,OAAA,EAAS,MAAM,iBAAA,CAAkB,KAAK,CAAA,EAAG,KAAA,EAAO,UAAA,EAAY,QAAA,EAAS,SAC3F,QAAA,EAAA,KAAA,EACH;AAAA,GAAA,EAEJ,CAAA,EACA,CAAA;AAEJ","file":"resizable.js","sourcesContent":["import {\n Panel,\n Group as PanelGroup,\n Separator as PanelResizeHandle,\n} from \"react-resizable-panels\";\nimport { createContext, useContext, useLayoutEffect, useRef, type ComponentProps, type RefObject } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { useBreakpoint } from \"../lib/use-breakpoint\";\nimport { Icon } from \"../lib/icons\";\n\ntype PanelGroupProps = ComponentProps<typeof PanelGroup>;\n\ntype Direction = \"horizontal\" | \"vertical\";\nconst DirectionCtx = createContext<Direction>(\"horizontal\");\nconst MobileCtx = createContext(false);\n\nexport interface ResizablePanelGroupProps\n extends Omit<PanelGroupProps, \"className\" | \"orientation\"> {\n direction?: Direction;\n stackOnMobile?: boolean;\n className?: string;\n /** Map of panel id → percentage (0–100). Must be an object, never an array. Panels need matching id props. */\n defaultLayout?: { [panelId: string]: number };\n /** Called after resize ends. Receives { [panelId]: number }, not number[]. */\n onLayoutChanged?: (layout: { [panelId: string]: number }) => void;\n}\n\nexport function ResizablePanelGroup({\n className,\n direction = \"horizontal\",\n stackOnMobile = true,\n ...props\n}: ResizablePanelGroupProps) {\n const isMobile = useBreakpoint(\"sm\");\n const shouldStack = stackOnMobile && isMobile && direction === \"horizontal\";\n const effectiveDirection = shouldStack ? \"vertical\" : direction;\n\n return (\n <DirectionCtx.Provider value={effectiveDirection}>\n <MobileCtx.Provider value={isMobile}>\n <PanelGroup\n className={cn(\n \"flex h-full w-full\",\n effectiveDirection === \"vertical\" && \"flex-col\",\n className,\n )}\n orientation={effectiveDirection}\n {...props}\n />\n </MobileCtx.Provider>\n </DirectionCtx.Provider>\n );\n}\n\ntype PanelProps = ComponentProps<typeof Panel>;\n\nexport interface ResizablePanelProps extends Omit<PanelProps, \"className\"> {\n className?: string;\n id?: string;\n /** number = px. \"30%\" or \"30\" = percent. \"28rem\" / \"400px\" also valid. */\n defaultSize?: number | string;\n minSize?: number | string;\n maxSize?: number | string;\n collapsible?: boolean;\n}\n\nexport function ResizablePanel({ className, ...props }: ResizablePanelProps) {\n return <Panel className={cn(\"\", className)} {...props} />;\n}\n\ntype PanelResizeHandleProps = ComponentProps<typeof PanelResizeHandle>;\n\n/** The part of an element on screen, top to bottom: inside the window and every box around it that clips or scrolls. */\nfunction visibleRange(el: HTMLElement): { top: number; bottom: number } {\n const box = el.getBoundingClientRect();\n let top = Math.max(box.top, 0);\n let bottom = Math.min(box.bottom, window.innerHeight);\n for (let node = el.parentElement; node; node = node.parentElement) {\n if (!/(auto|scroll|hidden|clip|overlay)/.test(getComputedStyle(node).overflowY)) continue;\n const r = node.getBoundingClientRect();\n top = Math.max(top, r.top + node.clientTop);\n bottom = Math.min(bottom, r.top + node.clientTop + node.clientHeight);\n }\n return { top, bottom };\n}\n\n/**\n * Sprint 25.16 A42 (P31): the grip stays in the part of the divider on screen, at its middle, so a split taller than\n * the screen (a page that grows) never hides it. It moves with any scroll around it and stays inside the divider; it\n * goes back to the middle when the divider turns (stacked on a phone).\n */\nfunction useGripInView(gripRef: RefObject<HTMLDivElement | null>, enabled: boolean) {\n useLayoutEffect(() => {\n const grip = gripRef.current;\n const handle = grip?.parentElement;\n if (!enabled || !grip || !handle || typeof ResizeObserver === \"undefined\") return;\n let frame = 0;\n const place = () => {\n frame = 0;\n const box = handle.getBoundingClientRect();\n const { top, bottom } = visibleRange(handle);\n const room = (box.height - grip.offsetHeight) / 2;\n const offset = bottom > top ? Math.max(-room, Math.min(room, (top + bottom) / 2 - (box.top + box.height / 2))) : 0;\n grip.style.transform = Math.abs(offset) >= 1 ? `translateY(${Math.round(offset)}px)` : \"\";\n };\n const schedule = () => {\n if (!frame) frame = requestAnimationFrame(place);\n };\n place();\n const ro = new ResizeObserver(schedule);\n ro.observe(handle);\n // a scroll anywhere around it: scroll events don't bubble, so the document hears them as they go down\n document.addEventListener(\"scroll\", schedule, { capture: true, passive: true });\n window.addEventListener(\"resize\", schedule);\n return () => {\n ro.disconnect();\n document.removeEventListener(\"scroll\", schedule, { capture: true });\n window.removeEventListener(\"resize\", schedule);\n if (frame) cancelAnimationFrame(frame);\n grip.style.transform = \"\";\n };\n }, [gripRef, enabled]);\n}\n\nexport interface ResizableHandleProps\n extends Omit<PanelResizeHandleProps, \"className\"> {\n withHandle?: boolean;\n className?: string;\n}\n\nexport function ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizableHandleProps) {\n const direction = useContext(DirectionCtx);\n const isMobile = useContext(MobileCtx);\n const isVertical = direction === \"vertical\";\n const gripRef = useRef<HTMLDivElement>(null);\n useGripInView(gripRef, !!withHandle && !isVertical);\n\n return (\n <PanelResizeHandle\n className={cn(\n \"relative flex items-center justify-center bg-[var(--ds-border-default)]\",\n isVertical\n ? cn(\n \"h-[var(--ds-border-width)] w-full after:absolute after:left-0 after:right-0 after:content-['']\",\n isMobile ? \"after:-top-3 after:-bottom-3\" : \"after:-top-1 after:-bottom-1\"\n )\n : cn(\n \"w-[var(--ds-border-width)] after:absolute after:inset-y-0 after:content-['']\",\n isMobile ? \"after:-left-3 after:-right-3\" : \"after:-left-1 after:-right-1\"\n ),\n \"focus-visible:outline-none focus-visible:shadow-[var(--ds-shadow-focus)]\",\n \"[&[data-resize-handle-state=drag]]:bg-[var(--ds-accent-primary)]\",\n \"[&[data-resize-handle-state=hover]]:bg-[var(--ds-accent-primary)]\",\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div\n ref={gripRef}\n className={cn(\n \"z-10 flex items-center justify-center rounded-[var(--ds-radius-sm)]\",\n \"border-[length:var(--ds-border-width)] border-[var(--ds-border-default)]\",\n \"bg-[var(--ds-bg-surface)]\",\n isVertical\n ? (isMobile ? \"h-4 w-8\" : \"h-3 w-4\")\n : (isMobile ? \"h-8 w-4\" : \"h-4 w-3\"),\n )}\n >\n <Icon\n name=\"grip-vertical\"\n size={isMobile ? 12 : 10}\n className={cn(\n \"text-[var(--ds-text-muted)]\",\n isVertical && \"rotate-90\",\n )}\n />\n </div>\n )}\n </PanelResizeHandle>\n );\n}\n","import { useCallback, useLayoutEffect, useRef, useState, type KeyboardEvent, type ReactNode } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { useBelow, useCompact, useElementWidth } from \"../lib/use-compact\";\nimport { ResizablePanelGroup, ResizablePanel, ResizableHandle } from \"./ResizablePanels\";\nimport { Button } from \"./Button\";\nimport { Drawer } from \"./Drawer\";\nimport { Icon } from \"../lib/icons\";\nimport { Breadcrumbs, crumbGoes, type BreadcrumbItem } from \"./Breadcrumbs\";\nimport { useAppShell } from \"./AppShell\";\nimport { SurfaceBoundary, type SplitListReport } from \"../lib/surface-context\";\nimport { isTabStop, rememberFocus, tabStops, type RememberedFocus } from \"../lib/focus\";\nimport { FillContext, useFillHeight } from \"../lib/use-fill-height\";\nimport { FOCUS_INSET, useKeyboardScroll } from \"../lib/use-keyboard-scroll\";\n\nexport type SplitViewFrame = \"fill\" | \"page\";\n\n/**\n * How far past a threshold the layout must go before a collapsed part comes back, in px: a classic scrollbar's width\n * (15 px on a Mac with a mouse, 17 on Windows), whose coming and going with the aside moved the layout back and forth\n * across the threshold (round 27 review). No wider: inside the band the answer depends on the way the width came, so a\n * wider band could keep the aside collapsed at a width where it fits.\n */\nconst THRESHOLD_BAND = 17;\n\nexport interface SplitViewProps {\n /** The list (an inbox, a queue): it scrolls on its own. */\n list: ReactNode;\n /** The selected item (a thread, a record): it fills the height and scrolls on its own. */\n detail: ReactNode;\n /** Context beside the detail (a contact, properties). The pane insets it as the Drawer it collapses into does (the page's gutter, Sprint 25.14 A36), so pass content with no padding classes (round 8). Collapses to a toggle that opens it in a Drawer when the layout is narrower than `asideCollapseBelow`. */\n aside?: ReactNode;\n /** Names the aside's toggle and Drawer. */\n asideTitle?: string;\n /**\n * Below `collapseBelow` the list shows alone; with `detailOpen` the detail replaces it, with a Back button that calls\n * `onDetailClose` (detailMode \"stack\"). The page owns the selection, so it owns this flag.\n */\n detailOpen?: boolean;\n onDetailClose?: () => void;\n /** \"stack\" (default): the detail stacks over the list below the collapse width. \"route\": the app navigates to the detail's own route instead, and this renders the list alone there. */\n detailMode?: \"stack\" | \"route\";\n /**\n * \"shown\" (default): above the collapse width the detail pane is always there — an inbox's reading pane may show a\n * placeholder. \"hidden\" (Sprint 25.7, C3): `detailOpen` decides at every width. Closed, the list takes the whole\n * width; open, the pane appears beside it at the width the user last gave it, with a close control that calls\n * `onDetailClose`. For boards, timelines and lists of records. The list stays mounted, so a board or a timeline keeps\n * its scroll and zoom.\n */\n closedDetail?: \"shown\" | \"hidden\";\n /** The open pane's close control, named for a screen reader (closedDetail=\"hidden\"). Default \"Close\". */\n closeLabel?: string;\n backLabel?: string;\n /**\n * The open item's path (Sprint 25.16 A19, P11): crumbs from the top of what the list shows down to the open view's\n * parent, never the view itself (the owner's review of 1 October) — a document in a folder tree passes its folders\n * (\"Documents › Architecture\"), a view below an item passes the item as well (\"… › System Design Overview\", above its\n * metadata). The view's own title, its first heading, names it, as a page's title does under its PageHeader's\n * breadcrumbs. The view draws the path above the detail at every width, where the stacked Back would be, and its last\n * crumb is the way back: the stacked Back goes, and the detail draws no back of its own\n * (gs:breadcrumbs-and-back-button-2). A crumb that is a page takes its href and goes through the shell's navigate; an\n * item held in state, or a folder that isn't a page, takes an onClick (select it in the tree); a last crumb with\n * neither closes the detail. On a phone the path keeps its first crumb and its last two, so the parent always shows.\n * One crumb or more; with none, today's Back.\n */\n detailPath?: BreadcrumbItem[];\n /** Percent of the width the list takes; the divider is draggable. */\n listWidth?: number;\n listMinWidth?: number;\n asideWidth?: number;\n /** Below this width of the layout itself (px) the list and detail stop sitting side by side. */\n collapseBelow?: number;\n /** Below this width of the layout itself (px) the aside becomes a toggle. */\n asideCollapseBelow?: number;\n /**\n * The narrowest the open item's pane may be beside an aside (px). When the list and the aside would leave it less,\n * the aside becomes its toggle and Drawer, so the item keeps the room its content needs: the aside is the secondary\n * content (round 27, R27-13, the owner: \"which information is more important\"). An item that holds a wide table or a\n * card grid may need more: pass it.\n */\n detailMinWidth?: number;\n /** A bordered, rounded surface (inside a page with padding) instead of edge to edge (filling <main>). */\n bordered?: boolean;\n /** \"fill\": the page root, flush to the shell, h-full against main, each pane owns its inset. \"page\" (default): inside a PageContainer under a PageHeader. */\n frame?: SplitViewFrame;\n \"aria-label\"?: string;\n className?: string;\n}\n\n/**\n * The reading-pane composition (Sprint 25.2, R3): one surface with dividers —\n * list, detail and an optional aside — that fills the height it is given (an\n * AppShell's <main> already gives it) and never three cards with gaps. The\n * panels compose ResizablePanelGroup, so the dividers drag. Below the collapse\n * width, measured on the layout itself, the list shows alone and the detail\n * stacks over it (or the app routes to it); the aside collapses to a toggle.\n * The page owns the selection and assembles the contents; keyboard movement\n * through the list is the list's job (StackedList selectedId).\n */\nexport function SplitView({\n list,\n detail,\n aside,\n asideTitle = \"Details\",\n detailOpen = false,\n onDetailClose,\n detailMode = \"stack\",\n closedDetail = \"shown\",\n closeLabel = \"Close\",\n backLabel = \"Back\",\n detailPath,\n listWidth = 35,\n listMinWidth = 25,\n asideWidth = 25,\n collapseBelow = 768,\n asideCollapseBelow = 1024,\n detailMinWidth = 480,\n bordered = false,\n frame = \"page\",\n \"aria-label\": ariaLabel,\n className,\n}: SplitViewProps) {\n const rootRef = useRef<HTMLDivElement>(null);\n const compact = useCompact(rootRef, collapseBelow, THRESHOLD_BAND);\n const layoutWidth = useElementWidth(rootRef);\n // The panels' shares as the user left them (the review: the defaults were read, so a list dragged wider left the item\n // under its minimum beside the aside); the aside's last share stands in while it is collapsed.\n const [shares, setShares] = useState<{ list?: number; aside?: number }>({});\n const listShare = shares.list ?? listWidth;\n const asideShare = shares.aside ?? asideWidth;\n // the aside yields when the layout is narrow, or when beside it the item would have less than its minimum\n const itemShare = (100 - listShare - asideShare) / 100;\n const itemBesideAside = aside ? layoutWidth * itemShare : 0;\n // the item moves by its share of the scrollbar's width, so its band is that share of the layout's\n const itemSqueezed = useBelow(itemBesideAside, detailMinWidth, THRESHOLD_BAND * Math.max(0, itemShare));\n const asideCollapsed = useBelow(layoutWidth, asideCollapseBelow, THRESHOLD_BAND) || itemSqueezed;\n const [asideWantsOpen, setAsideWantsOpen] = useState(false);\n const hiding = closedDetail === \"hidden\";\n // Hidden: the aside belongs to the open item, so it (its pane, its toggle, its Drawer) goes with the pane, and a\n // Drawer left open does not come back with the next item (render-time state adjustment).\n const showAside = !!aside && (!hiding || detailOpen);\n if (hiding && !detailOpen && asideWantsOpen) setAsideWantsOpen(false);\n // on a phone the aside's Drawer belongs to the item on screen: Back closes it with the item\n if (compact && !detailOpen && asideWantsOpen) setAsideWantsOpen(false);\n const asideOpen = asideCollapsed && asideWantsOpen;\n const region = ariaLabel ? { role: \"region\" as const, \"aria-label\": ariaLabel } : {};\n // A19: the item's path stands in for Back, its last crumb (the view's parent) going up one level; its bar insets at the\n // page's gutter, as the aside's content does (Sprint 25.14 A36). A last crumb that goes nowhere of its own closes the\n // detail, as Back did, so the path is always a way back.\n const path = detailPath && detailPath.length > 0\n ? detailPath.map((crumb, i) => (i === detailPath.length - 1 && !crumbGoes(crumb) && onDetailClose ? { ...crumb, onClick: onDetailClose } : crumb))\n : null;\n // fill: the page root, flush to the shell on every side (no border, no radius, no padding of its own); h-full\n // resolves against <main> because the shell is a flex column down to it. page: inside a PageContainer under a\n // PageHeader, where `bordered` draws the surface. Each pane owns its own inset either way.\n const isFill = frame === \"fill\";\n // Sprint 25.14 A44 (P32): the list pane's content reports what it is, as a wrapped PageHeader does to its\n // PageContainer: content that draws its own frame or cards (a KanbanBoard, a CardGrid, a Table), or content with no\n // frame of its own that scrolls inside the pane (a StackedList, a Gantt). No frame around what frames itself: when the\n // pane holds only the first kind, the list sits on the canvas with nothing drawn behind it and the open item on the\n // surface, whatever `bordered` says. Anything that scrolls inside keeps the hairline, which shows where it scrolls.\n const listHolds = useRef({ framed: 0, scrolls: 0 });\n const [framesItself, setFramesItself] = useState(false);\n const reportToList = useCallback<SplitListReport>((kind, present) => {\n const held = listHolds.current;\n held[kind] = Math.max(0, held[kind] + (present ? 1 : -1));\n setFramesItself(held.framed > 0 && held.scrolls === 0);\n }, []);\n const onCanvas = isFill || framesItself;\n // In a shell with an app footer the children wrapper has no definite height, so h-full cannot resolve; the shell\n // publishes main's height and fill takes it (the footer then sits below the fold, as it must under a full pane).\n const shell = useAppShell();\n // Sprint 25.16 A42 (P31): a page frame that is the page's last content takes the height under its header, so its panes\n // scroll inside it and the page doesn't; what's inside the view takes its pane's height (FillContext)\n const pageFill = useFillHeight(rootRef, !isFill);\n // each pane scrolls inside the view: one with nothing in it to Tab to (a message's text) is a Tab stop of its own, so a\n // keyboard can scroll it (WCAG 2.1.1)\n const [listScroll, setListScroll] = useState<HTMLDivElement | null>(null);\n const [detailScroll, setDetailScroll] = useState<HTMLDivElement | null>(null);\n const [asideScroll, setAsideScroll] = useState<HTMLDivElement | null>(null);\n const [stackedListScroll, setStackedListScroll] = useState<HTMLDivElement | null>(null);\n const [stackedDetailScroll, setStackedDetailScroll] = useState<HTMLDivElement | null>(null);\n // named for what they hold (the review of 1 October): the list by the view's own name, the item by its title (its\n // first heading; the path ends at its parent, so never names it)\n const listName = ariaLabel ? `${ariaLabel} list` : \"List\";\n const itemName = ariaLabel ? `${ariaLabel} item` : \"Item\";\n useKeyboardScroll(listScroll, listName, !compact);\n useKeyboardScroll(detailScroll, itemName, !compact, true);\n useKeyboardScroll(asideScroll, asideTitle, !compact);\n useKeyboardScroll(stackedListScroll, listName, compact);\n useKeyboardScroll(stackedDetailScroll, itemName, compact, true);\n const fillStyle = isFill && shell?.hasFooter ? { height: \"var(--ds-main-height, 100%)\" } : pageFill != null ? { height: pageFill } : undefined;\n // Edge to edge the list sits on the page's canvas, like every other page, and the open item (its detail and its aside)\n // on the surface (round 27, R27-12, the owner: the whole split on the surface read as a different page). A page frame,\n // bordered or not, stays one surface: a card on the canvas. Beside a list that frames itself, a page frame's open item\n // is that card (rounded, and bordered when the view is), as the page's other cards are; edge to edge it is square.\n const itemSurface = !onCanvas ? undefined : isFill\n ? \"bg-[var(--ds-bg-surface)]\"\n : cn(\"bg-[var(--ds-bg-surface)] rounded-[var(--ds-radius-md)] overflow-hidden\", bordered && \"border-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\");\n const surface = cn(\n \"h-full min-h-0 w-full\",\n !onCanvas && \"bg-[var(--ds-bg-surface)]\",\n isFill && \"rounded-none border-0\",\n bordered && !onCanvas && \"border-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)] rounded-[var(--ds-radius-md)] overflow-hidden\",\n className,\n );\n // each pane is a surface of its own: what a Card around the view, or the list pane, tells content stops at its edge\n const listContent = <SurfaceBoundary pane=\"list\" framer={reportToList}>{list}</SurfaceBoundary>;\n const detailContent = <SurfaceBoundary pane=\"detail\">{detail}</SurfaceBoundary>;\n\n // closedDetail=\"hidden\" (C3): the pane opens beside the list at the width the user last gave it; closing it returns\n // focus to the item the pane shows, or its neighbour if that item is gone (D14(e)): the list's selected item, else\n // the last list item that took focus, checked on each render while the pane is open, so switching items is followed.\n // A selection kept in the URL changes the path, so the item is remembered whatever the route does. With no item\n // (opened on load, or from outside the list) focus goes to the list's first Tab stop. No overlay layer: an\n // assistant opened earlier keeps Escape.\n const [listPct, setListPct] = useState(listWidth);\n const paneRef = useRef<HTMLDivElement>(null);\n const shown = useRef<RememberedFocus | null>(null);\n const lastInList = useRef<HTMLElement | null>(null);\n const wasOpen = useRef(false);\n useLayoutEffect(() => {\n if (!hiding) return;\n const listPane = rootRef.current?.querySelector<HTMLElement>('[data-pane=\"list\"]') ?? null;\n if (detailOpen) {\n wasOpen.current = true;\n const selected = listPane?.querySelector<HTMLElement>('[aria-current=\"true\"], [aria-selected=\"true\"]');\n const last = lastInList.current;\n const item = (selected && (isTabStop(selected) ? selected : tabStops(selected)[0]))\n || (last?.isConnected && listPane?.contains(last) ? last : null);\n if (item && item !== shown.current?.el) shown.current = rememberFocus(item, { ignoreRoute: true });\n return;\n }\n if (!wasOpen.current) return;\n wasOpen.current = false;\n const r = shown.current;\n shown.current = null;\n const active = document.activeElement;\n if (active && active !== document.body && active.isConnected) return;\n const first = listPane ? tabStops(listPane)[0] : undefined;\n if (!r?.restore(first)) first?.focus();\n });\n const onPaneKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key !== \"Escape\" || e.defaultPrevented || !onDetailClose) return;\n const t = e.target as HTMLElement;\n // the pane's own DOM only — a portalled popup inside it bubbles here in React's tree — and never from a field\n if (!paneRef.current?.contains(t) || t.closest(\"input, textarea, select, [contenteditable='true']\")) return;\n e.preventDefault();\n onDetailClose();\n };\n\n if (compact) {\n const showDetail = detailMode === \"stack\" && detailOpen;\n // on a phone the item's aside is a toggle beside Back that opens it in a Drawer, as it is on a narrow desktop (the\n // round 27 review: below the collapse width it could not be reached at all)\n const phoneAside = showDetail && !!aside;\n return (\n <FillContext value={true}>\n <div ref={rootRef} data-split-view={showDetail ? \"detail\" : \"list\"} data-frame={frame} data-fill={pageFill != null ? \"\" : undefined} {...region} className={cn(surface, \"flex flex-col\")} style={fillStyle}>\n {showDetail && (\n <div className={cn(\"flex-1 min-h-0 flex flex-col\", itemSurface)}>\n <div className={cn(\"shrink-0 flex items-center justify-between gap-ds-2 py-ds-2 border-b-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\", path ? \"px-[var(--ds-page-gutter)]\" : \"px-ds-3\")}>\n {path\n ? <Breadcrumbs items={path} maxItems={3} aria-label=\"Path\" className=\"min-w-0\" />\n : <Button type=\"button\" variant=\"ghost\" size=\"sm\" iconLeft={<Icon name=\"arrow-left\" size={14} />} onClick={onDetailClose}>{backLabel}</Button>}\n {phoneAside && <Button type=\"button\" variant=\"ghost\" size=\"sm\" iconLeft={<Icon name=\"info\" size={14} />} onClick={() => setAsideWantsOpen(true)} aria-expanded={asideWantsOpen}>{asideTitle}</Button>}\n </div>\n <div ref={setStackedDetailScroll} className={cn(\"flex-1 min-h-0 overflow-y-auto\", FOCUS_INSET)}>{detailContent}</div>\n </div>\n )}\n {/* Sprint 25.14 A44 (the review of 30 September): the list stays mounted while the stacked detail is shown, as it\n does beside it on a wider screen, so a board keeps its scroll and its report (the view kept its frame\n off only while the board was on screen), and Back finds the list as the user left it */}\n <div ref={setStackedListScroll} className={cn(\"flex-1 min-h-0 overflow-y-auto\", FOCUS_INSET)} hidden={showDetail || undefined}>{listContent}</div>\n {phoneAside && (\n <Drawer open={asideWantsOpen} onClose={() => setAsideWantsOpen(false)} title={asideTitle} position=\"right\">\n {aside}\n </Drawer>\n )}\n </div>\n </FillContext>\n );\n }\n\n const asideButton = showAside && asideCollapsed\n ? <Button type=\"button\" variant=\"ghost\" size=\"sm\" iconLeft={<Icon name=\"info\" size={14} />} onClick={() => setAsideWantsOpen(true)} aria-expanded={asideOpen}>{asideTitle}</Button>\n : null;\n const closeButton = hiding && onDetailClose\n ? <Button type=\"button\" variant=\"ghost\" size=\"icon-sm\" aria-label={closeLabel} onClick={onDetailClose}><Icon name=\"close\" size={14} /></Button>\n : null;\n const paneBar = path || asideButton || closeButton ? (\n <div className={cn(\"shrink-0 flex items-center gap-ds-1 py-ds-2 border-b-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\", path ? \"justify-between px-[var(--ds-page-gutter)]\" : \"justify-end px-ds-3\")}>\n {path && <Breadcrumbs items={path} aria-label=\"Path\" className=\"min-w-0\" />}\n {(asideButton || closeButton) && <div className=\"shrink-0 flex items-center gap-ds-1\">{asideButton}{closeButton}</div>}\n </div>\n ) : null;\n const showDetail = !hiding || detailOpen;\n\n return (\n <FillContext value={true}>\n <div ref={rootRef} data-split-view={hiding && !detailOpen ? \"list\" : \"split\"} data-frame={frame} data-fill={pageFill != null ? \"\" : undefined} {...region} className={surface} style={fillStyle}>\n <ResizablePanelGroup\n direction=\"horizontal\"\n stackOnMobile={false}\n className=\"h-full\"\n // the width the user gives the list is kept, so a closed pane reopens at it; the shares decide when the aside yields\n onLayoutChanged={(layout) => {\n setShares((prev) => (prev.list === (layout.list ?? prev.list) && prev.aside === (layout.aside ?? prev.aside) ? prev : { list: layout.list ?? prev.list, aside: layout.aside ?? prev.aside }));\n if (hiding && layout.detail != null && layout.list != null) setListPct(layout.list);\n }}\n >\n <ResizablePanel id=\"list\" defaultSize={`${hiding ? (detailOpen ? listPct : 100) : listWidth}%`} minSize={`${listMinWidth}%`}>\n <div ref={setListScroll} data-pane=\"list\" className={cn(\"h-full min-h-0 overflow-y-auto\", FOCUS_INSET)} onFocus={hiding ? (e) => { lastInList.current = e.target; } : undefined}>\n {listContent}\n </div>\n </ResizablePanel>\n {showDetail && (\n <>\n <ResizableHandle withHandle />\n <ResizablePanel id=\"detail\" minSize=\"30%\">\n <div ref={paneRef} data-pane=\"detail\" className={cn(\"h-full min-h-0 flex flex-col\", itemSurface)} onKeyDown={hiding ? onPaneKeyDown : undefined}>\n {paneBar}\n <div ref={setDetailScroll} className={cn(\"flex-1 min-h-0 overflow-y-auto\", FOCUS_INSET)}>{detailContent}</div>\n </div>\n </ResizablePanel>\n </>\n )}\n {showAside && !asideCollapsed && (\n <>\n <ResizableHandle withHandle />\n <ResizablePanel id=\"aside\" defaultSize={`${asideWidth}%`} minSize=\"15%\">\n {/* the Drawer's body inset, so the aside's content sits where it will in the Drawer (Sprint 25.14 A36) */}\n <div ref={setAsideScroll} data-pane=\"aside\" className={cn(\"h-full min-h-0 overflow-y-auto py-ds-5 px-[var(--ds-page-gutter)]\", itemSurface, FOCUS_INSET)}><SurfaceBoundary pane=\"aside\">{aside}</SurfaceBoundary></div>\n </ResizablePanel>\n </>\n )}\n </ResizablePanelGroup>\n {showAside && asideCollapsed && (\n <Drawer open={asideOpen} onClose={() => setAsideWantsOpen(false)} title={asideTitle} position=\"right\">\n {aside}\n </Drawer>\n )}\n </div>\n </FillContext>\n );\n}\n"]}
|
package/dist/roots.css
CHANGED
|
@@ -917,6 +917,11 @@ body {
|
|
|
917
917
|
border-radius: var(--ds-sketch-wobble-sm);
|
|
918
918
|
}
|
|
919
919
|
|
|
920
|
+
/* A segmented control's segments, inside its frame */
|
|
921
|
+
[data-sketch] [class*="rounded-[var(--ds-segment-radius)"] {
|
|
922
|
+
border-radius: var(--ds-sketch-wobble-md);
|
|
923
|
+
}
|
|
924
|
+
|
|
920
925
|
/* RichTextEditor's content styles sit in Tailwind's components layer (the round 27 review): above the base layer's
|
|
921
926
|
preflight, which they must beat, and below the utilities, so an app can restyle the editor's content with classes. */
|
|
922
927
|
@layer components {
|
package/dist/virtualized.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { useWholeListCheck, pagerPart, Pagination } from './chunk-
|
|
1
|
+
import { useWholeListCheck, pagerPart, Pagination } from './chunk-6XAU44U4.js';
|
|
2
2
|
import './chunk-7TOJ4G7S.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import { useScrollsInside } from './chunk-
|
|
3
|
+
import './chunk-XVB55M3N.js';
|
|
4
|
+
import { useScrollsInside } from './chunk-2PWGJ4PK.js';
|
|
5
|
+
import './chunk-JXANCXK6.js';
|
|
5
6
|
import './chunk-CXMV7SXJ.js';
|
|
6
7
|
import './chunk-7Q46JXSK.js';
|
|
7
8
|
import { useLatest } from './chunk-WH2FUFAC.js';
|
package/dist/virtualized.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../showcase/src/components/VirtualizedList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AA2BO,SAAS,eAAA,CAAmB;AAAA,EACjC,KAAA,EAAO,QAAA;AAAA,EACP,YAAA;AAAA,EACA,UAAA;AAAA,EACA,QAAA,GAAW,CAAA;AAAA,EACX,MAAA,GAAS,GAAA;AAAA,EACT,SAAA;AAAA,EACA,GAAA;AAAA,EACA;AACF,CAAA,EAA4B;AAE1B,EAAA,gBAAA,EAAiB;AACjB,EAAA,MAAM,SAAA,GAAY,OAAuB,IAAI,CAAA;AAC7C,EAAA,MAAM,MAAA,GAAS,OAAuB,IAAI,CAAA;AAC1C,EAAA,iBAAA,CAAkB,iBAAA,EAAmB,QAAA,CAAS,MAAA,EAAQ,KAAK,CAAA;AAC3D,EAAA,MAAM,KAAA,GAAQ,SAAA,CAAU,QAAA,EAAU,KAAK,CAAA;AACvC,EAAA,MAAM,MAAA,GAAS,KAAA,GAAQ,IAAA,CAAK,GAAA,CAAI,CAAA,EAAG,MAAM,KAAA,CAAM,CAAC,CAAA,GAAI,CAAC,CAAA,GAAI,CAAA;AAGzD,EAAA,MAAM,cAAc,cAAA,CAAe;AAAA,IACjC,OAAO,KAAA,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AAO,EAAE,MAAA,EAAQ,WAAA,CAAY,YAAA,EAAa,IACxE,QAAA,EAAA,WAAA,CAAY,eAAA,EAAgB,CAAE,GAAA,CAAI,CAAC,WAAA,qBAClC,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YAEC,cAAY,WAAA,CAAY,KAAA;AAAA,YACxB,KAAK,WAAA,CAAY,cAAA;AAAA,YACjB,SAAA,EAAU,8BAAA;AAAA,YACV,OAAO,EAAE,SAAA,EAAW,CAAA,WAAA,EAAc,WAAA,CAAY,KAAK,CAAA,GAAA,CAAA,EAAM;AAAA,YAExD,QAAA,EAAA,UAAA,CAAW,MAAM,WAAA,CAAY,KAAK,GAAG,MAAA,GAAS,WAAA,CAAY,OAAO,WAAW;AAAA,WAAA;AAAA,UANxE,WAAA,CAAY;AAAA,SAQpB,CAAA,EACH,CAAA;AAAA,QACC,OAAA,oBAAW,GAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAK,MAAA,EAAQ,0BAAuB,EAAA,EAAG,aAAA,EAAY,MAAA,EAAO,SAAA,EAAU,aAAA,EAAc;AAAA;AAAA;AAAA,GACrG;AAMF,EAAA,IAAI,CAAC,OAAO,OAAO,IAAA;AACnB,EAAA,uBACE,IAAA,CAAC,SAAI,eAAA,EAAc,EAAA,EAAG,WAAW,EAAA,CAAG,uBAAA,EAAyB,SAAS,CAAA,EACnE,QAAA,EAAA;AAAA,IAAA,IAAA;AAAA,IACA,QAAA,CAAS,MAAA,GAAS,CAAA,oBAAK,GAAA,CAAC,cAAY,GAAG,KAAA,CAAM,KAAA,EAAO,IAAA,EAAM,MAAM,KAAA,KAAU,iBAAA,GAAoB,WAAA,GAAc,KAAA,CAAM,MAAM,IAAA,EAAM;AAAA,GAAA,EACjI,CAAA;AAEJ","file":"virtualized.js","sourcesContent":["import { useEffect, useRef, type ReactNode, type Ref } from \"react\";\nimport { useVirtualizer, type VirtualItem } from \"@tanstack/react-virtual\";\nimport { cn } from \"../lib/utils\";\nimport { useLatest } from \"../lib/use-latest\";\nimport { Pagination } from \"./Pagination\";\nimport { pagerPart, useWholeListCheck, type Pager } from \"../lib/use-pagination\";\nimport { useScrollsInside } from \"../lib/surface-context\";\n\nexport interface VirtualizedListProps<T> {\n items: T[];\n estimateSize: (index: number) => number;\n /** An item, with its index in `items` (the whole list, when the list is paged). */\n renderItem: (item: T, index: number, virtualItem: VirtualItem) => ReactNode;\n overscan?: number;\n height?: number | string;\n className?: string;\n ref?: Ref<HTMLDivElement>;\n /**\n * The list's pager (Sprint 25.13 A49): paging and drawing only the rows on screen combine. Pass every item and\n * `usePagination(items)`'s pager: the list mounts only the rows on screen of the pager's part, and beneath it draws the\n * control in the project's style. A new page starts at its top; with infinite scroll, scrolling inside the list loads\n * more. For a long page (logs, feeds) the user asked to page differently, pass the size to the hook\n * (`usePagination(rows, { pageSize: 100 })`) with its override note.\n */\n pager?: Pager<unknown>;\n}\n\nexport function VirtualizedList<T>({\n items: allItems,\n estimateSize,\n renderItem,\n overscan = 5,\n height = 400,\n className,\n ref,\n pager,\n}: VirtualizedListProps<T>) {\n // Sprint 25.14 A44: a list with no frame of its own: a SplitView's list pane keeps its hairline around it\n useScrollsInside();\n const parentRef = useRef<HTMLDivElement>(null);\n const endRef = useRef<HTMLDivElement>(null);\n useWholeListCheck(\"VirtualizedList\", allItems.length, pager);\n const items = pagerPart(allItems, pager);\n const offset = pager ? Math.max(0, pager.range[0] - 1) : 0;\n\n // eslint-disable-next-line react-hooks/incompatible-library -- TanStack Virtual is not compiler-compatible (informational; the project does not use the React Compiler)\n const virtualizer = useVirtualizer({\n count: items.length,\n getScrollElement: () => parentRef.current,\n estimateSize: (index) => estimateSize(offset + index),\n // a row is known by its place in the whole list, so page 2's third row isn't page 1's (the review of 30 September:\n // an entry opened on page 1 showed opened on page 2, and page 1's heights carried over)\n getItemKey: (index) => offset + index,\n overscan,\n });\n\n // A49: a new page starts at its top, and so does a growing list that starts again at its first page (a new order, a\n // search): left scrolled to its end, it loaded the next page at once (the review of 30 September)\n const page = pager ? pager.page : null;\n const pageBefore = useRef(page);\n const numbered = pager?.style === \"pagination\";\n useEffect(() => {\n const before = pageBefore.current;\n pageBefore.current = page;\n if (page === null || !parentRef.current) return;\n if (numbered ? page !== before : before !== null && page < before) parentRef.current.scrollTop = 0;\n }, [page, numbered]);\n\n // A49: with infinite scroll, the trigger sits at the end of the list's own content and watches the list's scroller\n // (it watched the viewport, so scrolling inside the list never loaded more); it loads once per growth of the list\n const loadMore = useLatest(pager?.loadMore);\n const growing = pager?.style === \"infinite-scroll\" && pager.hasMore;\n const loadedAt = useRef(-1);\n useEffect(() => {\n const root = parentRef.current;\n const end = endRef.current;\n // the list's length changed since the last load (it grew, or started again at page 1): it may load again (the\n // review of 30 September: after a reset to the first page it never loaded again)\n if (loadedAt.current !== items.length) loadedAt.current = -1;\n if (!growing || !root || !end || typeof IntersectionObserver === \"undefined\") return;\n const observer = new IntersectionObserver((entries) => {\n if (!entries.some((e) => e.isIntersecting) || loadedAt.current === items.length) return;\n loadedAt.current = items.length;\n loadMore.current?.();\n }, { root, rootMargin: \"200px 0px\" });\n observer.observe(end);\n return () => observer.disconnect();\n }, [growing, items.length, loadMore]);\n\n const list = (\n <div\n ref={(node) => {\n (parentRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }}\n data-ds-list={pager ? \"\" : undefined}\n className={cn(\n \"overflow-auto\",\n \"rounded-[var(--ds-radius-md)]\",\n \"border-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\",\n \"bg-[var(--ds-bg-surface)]\",\n !pager && className,\n )}\n style={{ height }}\n >\n <div className=\"relative w-full\" style={{ height: virtualizer.getTotalSize() }}>\n {virtualizer.getVirtualItems().map((virtualItem) => (\n <div\n key={virtualItem.key}\n data-index={virtualItem.index}\n ref={virtualizer.measureElement}\n className=\"absolute top-0 left-0 w-full\"\n style={{ transform: `translateY(${virtualItem.start}px)` }}\n >\n {renderItem(items[virtualItem.index], offset + virtualItem.index, virtualItem)}\n </div>\n ))}\n </div>\n {growing && <div ref={endRef} data-load-more-trigger=\"\" aria-hidden=\"true\" className=\"h-px w-full\" />}\n </div>\n );\n // A3: the pager's control is the list's next sibling, as <Pagination {...pager.props} /> would be. With infinite\n // scroll it is the Load more button alone, for keyboard users: the list's own trigger loads as it scrolls (A49). The\n // two are one element, which takes the className, so in a grid or a flex row they stay one item, and the list keeps\n // its element while its items come and go (the review of 30 September).\n if (!pager) return list;\n return (\n <div data-gs-paged=\"\" className={cn(\"flex flex-col min-w-0\", className)}>\n {list}\n {allItems.length > 0 && <Pagination {...pager.props} mode={pager.style === \"infinite-scroll\" ? \"load-more\" : pager.props.mode} />}\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../showcase/src/components/VirtualizedList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AA2BO,SAAS,eAAA,CAAmB;AAAA,EACjC,KAAA,EAAO,QAAA;AAAA,EACP,YAAA;AAAA,EACA,UAAA;AAAA,EACA,QAAA,GAAW,CAAA;AAAA,EACX,MAAA,GAAS,GAAA;AAAA,EACT,SAAA;AAAA,EACA,GAAA;AAAA,EACA;AACF,CAAA,EAA4B;AAE1B,EAAA,gBAAA,EAAiB;AACjB,EAAA,MAAM,SAAA,GAAY,OAAuB,IAAI,CAAA;AAC7C,EAAA,MAAM,MAAA,GAAS,OAAuB,IAAI,CAAA;AAC1C,EAAA,iBAAA,CAAkB,iBAAA,EAAmB,QAAA,CAAS,MAAA,EAAQ,KAAK,CAAA;AAC3D,EAAA,MAAM,KAAA,GAAQ,SAAA,CAAU,QAAA,EAAU,KAAK,CAAA;AACvC,EAAA,MAAM,MAAA,GAAS,KAAA,GAAQ,IAAA,CAAK,GAAA,CAAI,CAAA,EAAG,MAAM,KAAA,CAAM,CAAC,CAAA,GAAI,CAAC,CAAA,GAAI,CAAA;AAGzD,EAAA,MAAM,cAAc,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I,SAAA,EAAU,iBAAA,EAAkB,KAAA,EAAO,EAAE,MAAA,EAAQ,WAAA,CAAY,YAAA,EAAa,IACxE,QAAA,EAAA,WAAA,CAAY,eAAA,EAAgB,CAAE,GAAA,CAAI,CAAC,WAAA,qBAClC,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YAEC,cAAY,WAAA,CAAY,KAAA;AAAA,YACxB,KAAK,WAAA,CAAY,cAAA;AAAA,YACjB,SAAA,EAAU,8BAAA;AAAA,YACV,OAAO,EAAE,SAAA,EAAW,CAAA,WAAA,EAAc,WAAA,CAAY,KAAK,CAAA,GAAA,CAAA,EAAM;AAAA,YAExD,QAAA,EAAA,UAAA,CAAW,MAAM,WAAA,CAAY,KAAK,GAAG,MAAA,GAAS,WAAA,CAAY,OAAO,WAAW;AAAA,WAAA;AAAA,UANxE,WAAA,CAAY;AAAA,SAQpB,CAAA,EACH,CAAA;AAAA,QACC,OAAA,oBAAW,GAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAK,MAAA,EAAQ,0BAAuB,EAAA,EAAG,aAAA,EAAY,MAAA,EAAO,SAAA,EAAU,aAAA,EAAc;AAAA;AAAA;AAAA,GACrG;AAMF,EAAA,IAAI,CAAC,OAAO,OAAO,IAAA;AACnB,EAAA,uBACE,IAAA,CAAC,SAAI,eAAA,EAAc,EAAA,EAAG,WAAW,EAAA,CAAG,uBAAA,EAAyB,SAAS,CAAA,EACnE,QAAA,EAAA;AAAA,IAAA,IAAA;AAAA,IACA,QAAA,CAAS,MAAA,GAAS,CAAA,oBAAK,GAAA,CAAC,cAAY,GAAG,KAAA,CAAM,KAAA,EAAO,IAAA,EAAM,MAAM,KAAA,KAAU,iBAAA,GAAoB,WAAA,GAAc,KAAA,CAAM,MAAM,IAAA,EAAM;AAAA,GAAA,EACjI,CAAA;AAEJ","file":"virtualized.js","sourcesContent":["import { useEffect, useRef, type ReactNode, type Ref } from \"react\";\nimport { useVirtualizer, type VirtualItem } from \"@tanstack/react-virtual\";\nimport { cn } from \"../lib/utils\";\nimport { useLatest } from \"../lib/use-latest\";\nimport { Pagination } from \"./Pagination\";\nimport { pagerPart, useWholeListCheck, type Pager } from \"../lib/use-pagination\";\nimport { useScrollsInside } from \"../lib/surface-context\";\n\nexport interface VirtualizedListProps<T> {\n items: T[];\n estimateSize: (index: number) => number;\n /** An item, with its index in `items` (the whole list, when the list is paged). */\n renderItem: (item: T, index: number, virtualItem: VirtualItem) => ReactNode;\n overscan?: number;\n height?: number | string;\n className?: string;\n ref?: Ref<HTMLDivElement>;\n /**\n * The list's pager (Sprint 25.13 A49): paging and drawing only the rows on screen combine. Pass every item and\n * `usePagination(items)`'s pager: the list mounts only the rows on screen of the pager's part, and beneath it draws the\n * control in the project's style. A new page starts at its top; with infinite scroll, scrolling inside the list loads\n * more. For a long page (logs, feeds) the user asked to page differently, pass the size to the hook\n * (`usePagination(rows, { pageSize: 100 })`) with its override note.\n */\n pager?: Pager<unknown>;\n}\n\nexport function VirtualizedList<T>({\n items: allItems,\n estimateSize,\n renderItem,\n overscan = 5,\n height = 400,\n className,\n ref,\n pager,\n}: VirtualizedListProps<T>) {\n // Sprint 25.14 A44: a list with no frame of its own: a SplitView's list pane keeps its hairline around it\n useScrollsInside();\n const parentRef = useRef<HTMLDivElement>(null);\n const endRef = useRef<HTMLDivElement>(null);\n useWholeListCheck(\"VirtualizedList\", allItems.length, pager);\n const items = pagerPart(allItems, pager);\n const offset = pager ? Math.max(0, pager.range[0] - 1) : 0;\n\n // eslint-disable-next-line react-hooks/incompatible-library -- TanStack Virtual is not compiler-compatible (informational; the project does not use the React Compiler)\n const virtualizer = useVirtualizer({\n count: items.length,\n getScrollElement: () => parentRef.current,\n estimateSize: (index) => estimateSize(offset + index),\n // a row is known by its place in the whole list, so page 2's third row isn't page 1's (the review of 30 September:\n // an entry opened on page 1 showed opened on page 2, and page 1's heights carried over)\n getItemKey: (index) => offset + index,\n overscan,\n });\n\n // A49: a new page starts at its top, and so does a growing list that starts again at its first page (a new order, a\n // search): left scrolled to its end, it loaded the next page at once (the review of 30 September)\n const page = pager ? pager.page : null;\n const pageBefore = useRef(page);\n const numbered = pager?.style === \"pagination\";\n useEffect(() => {\n const before = pageBefore.current;\n pageBefore.current = page;\n if (page === null || !parentRef.current) return;\n if (numbered ? page !== before : before !== null && page < before) parentRef.current.scrollTop = 0;\n }, [page, numbered]);\n\n // A49: with infinite scroll, the trigger sits at the end of the list's own content and watches the list's scroller\n // (it watched the viewport, so scrolling inside the list never loaded more); it loads once per growth of the list\n const loadMore = useLatest(pager?.loadMore);\n const growing = pager?.style === \"infinite-scroll\" && pager.hasMore;\n const loadedAt = useRef(-1);\n useEffect(() => {\n const root = parentRef.current;\n const end = endRef.current;\n // the list's length changed since the last load (it grew, or started again at page 1): it may load again (the\n // review of 30 September: after a reset to the first page it never loaded again)\n if (loadedAt.current !== items.length) loadedAt.current = -1;\n if (!growing || !root || !end || typeof IntersectionObserver === \"undefined\") return;\n const observer = new IntersectionObserver((entries) => {\n if (!entries.some((e) => e.isIntersecting) || loadedAt.current === items.length) return;\n loadedAt.current = items.length;\n loadMore.current?.();\n }, { root, rootMargin: \"200px 0px\" });\n observer.observe(end);\n return () => observer.disconnect();\n }, [growing, items.length, loadMore]);\n\n const list = (\n <div\n ref={(node) => {\n (parentRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }}\n data-ds-list={pager ? \"\" : undefined}\n className={cn(\n \"overflow-auto\",\n \"rounded-[var(--ds-radius-md)]\",\n \"border-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\",\n \"bg-[var(--ds-bg-surface)]\",\n !pager && className,\n )}\n style={{ height }}\n >\n <div className=\"relative w-full\" style={{ height: virtualizer.getTotalSize() }}>\n {virtualizer.getVirtualItems().map((virtualItem) => (\n <div\n key={virtualItem.key}\n data-index={virtualItem.index}\n ref={virtualizer.measureElement}\n className=\"absolute top-0 left-0 w-full\"\n style={{ transform: `translateY(${virtualItem.start}px)` }}\n >\n {renderItem(items[virtualItem.index], offset + virtualItem.index, virtualItem)}\n </div>\n ))}\n </div>\n {growing && <div ref={endRef} data-load-more-trigger=\"\" aria-hidden=\"true\" className=\"h-px w-full\" />}\n </div>\n );\n // A3: the pager's control is the list's next sibling, as <Pagination {...pager.props} /> would be. With infinite\n // scroll it is the Load more button alone, for keyboard users: the list's own trigger loads as it scrolls (A49). The\n // two are one element, which takes the className, so in a grid or a flex row they stay one item, and the list keeps\n // its element while its items come and go (the review of 30 September).\n if (!pager) return list;\n return (\n <div data-gs-paged=\"\" className={cn(\"flex flex-col min-w-0\", className)}>\n {list}\n {allItems.length > 0 && <Pagination {...pager.props} mode={pager.style === \"infinite-scroll\" ? \"load-more\" : pager.props.mode} />}\n </div>\n );\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../showcase/src/lib/use-close-settle.ts","../../../showcase/src/lib/edge-resize.tsx","../../../showcase/src/components/DiscardConfirm.tsx","../../../showcase/src/lib/drawer-width.ts","../../../showcase/src/lib/use-scrollbar-inset.ts","../../../showcase/src/components/Drawer.tsx","../../../showcase/src/components/SkipLink.tsx","../../../showcase/src/lib/react-version.ts","../../../showcase/src/components/AppShell.tsx","../../../showcase/src/lib/use-compact.ts"],"names":["t","useEffect","jsx","useRef","useState","useCallback","createContext","useMemo","jsxs","useContext","AppShell"],"mappings":";;;;;;;;;;;;AAIA,SAAS,aAAa,EAAA,EAAyB;AAC7C,EAAA,MAAM,EAAA,GAAK,iBAAiB,EAAE,CAAA;AAC9B,EAAA,MAAM,KAAA,GAAQ,CAAC,IAAA,KACb,IAAA,CAAK,MAAM,GAAG,CAAA,CAAE,GAAA,CAAI,CAAC,GAAA,KAAQ;AAC3B,IAAA,MAAM,CAAA,GAAI,IAAI,IAAA,EAAK;AACnB,IAAA,IAAI,CAAC,GAAG,OAAO,CAAA;A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SAAA,CAAA;AAE9D,EAAA,IAAI,IAAA,KAAS,KAAA,EAAO,QAAA,CAAS,IAAI,CAAA;AACjC,EAAA,OAAO,IAAA;AACT;AAGO,SAAS,gBAAgB,GAAA,EAA4C;AAC1E,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAIA,SAAS,CAAC,CAAA;AACpC,EAAA,MAAM,KAAA,GAAQC,YAAY,MAAM;AAC9B,IAAA,MAAM,IAAA,GAAO,GAAA,CAAI,OAAA,EAAS,WAAA,IAAe,CAAA;AACzC,IAAA,IAAI,IAAA,GAAO,CAAA,EAAG,QAAA,CAAS,IAAI,CAAA;AAAA,EAC7B,CAAA,EAAG,CAAC,GAAG,CAAC,CAAA;AACR,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,KAAA,EAAM;AACN,IAAA,IAAI,CAAC,GAAA,CAAI,OAAA,IAAW,OAAO,mBAAmB,WAAA,EAAa;AAC3D,IAAA,MAAM,QAAA,GAAW,IAAI,cAAA,CAAe,KAAK,CAAA;AACzC,IAAA,QAAA,CAAS,OAAA,CAAQ,IAAI,OAAO,CAAA;AAC5B,IAAA,OAAO,MAAM,SAAS,UAAA,EAAW;AAAA,EACnC,CAAA,EAAG,CAAC,KAAA,EAAO,GAAG,CAAC,CAAA;AACf,EAAA,OAAO,KAAA;AACT","file":"chunk-6PL7FXYH.js","sourcesContent":["import { useEffect, type RefObject } from \"react\";\nimport { useLatest } from \"./use-latest\";\n\n/** Longest transition (duration + delay) declared on `el`, in milliseconds. */\nfunction transitionMs(el: HTMLElement): number {\n const cs = getComputedStyle(el);\n const parse = (list: string) =>\n list.split(\",\").map((raw) => {\n const s = raw.trim();\n if (!s) return 0;\n const n = parseFloat(s);\n if (Number.isNaN(n)) return 0;\n return s.endsWith(\"ms\") ? n : n * 1000;\n });\n const durations = parse(cs.transitionDuration || \"0s\");\n const delays = parse(cs.transitionDelay || \"0s\");\n let max = 0;\n durations.forEach((d, i) => {\n const total = d + (delays[i] ?? delays[0] ?? 0);\n if (total > max) max = total;\n });\n return max;\n}\n\n/**\n * Run `onSettled` once an overlay's close transition has finished.\n *\n * Overlays used to unmount on `transitionend`, but a transition of zero\n * duration never fires that event — and `prefers-reduced-motion` sets every\n * transition to zero — so a closed Drawer stayed mounted off-screen with its\n * controls still in the Tab order. This settles on the event when there is a\n * transition, immediately (next tick) when there is none, and on a timeout if\n * the browser never reports the end. Reopening during the close cancels it.\n */\nexport function useCloseSettle(open: boolean, elRef: RefObject<HTMLElement | null>, onSettled: () => void) {\n const cb = useLatest(onSettled);\n useEffect(() => {\n if (open) return;\n const el = elRef.current;\n const ms = el ? transitionMs(el) : 0;\n let done = false;\n const finish = () => {\n if (done) return;\n done = true;\n cb.current();\n };\n if (!el || ms === 0) {\n const t = setTimeout(finish, 0);\n return () => clearTimeout(t);\n }\n const onEnd = (e: TransitionEvent) => {\n if (e.target === el) finish();\n };\n el.addEventListener(\"transitionend\", onEnd);\n const t = setTimeout(finish, ms + 50);\n return () => {\n el.removeEventListener(\"transitionend\", onEnd);\n clearTimeout(t);\n };\n }, [open, elRef, cb]);\n}\n","import { useCallback, useEffect, useRef, useState } from \"react\";\nimport { cn } from \"./utils\";\nimport { useLatest } from \"./use-latest\";\n\n/**\n * A drag-to-resize edge shared by the docked AsidePanel and the non-modal\n * Drawer. Visually it is the panel's page-side edge: hover shows the resize\n * cursor and the line thickens in the accent colour; it stays lit while\n * dragging. Nothing else appears for mouse users.\n *\n * Keyboard, invisibly: the same edge is a focusable separator (WAI-ARIA\n * window-splitter pattern). On focus it lights up as on hover; Left/Right\n * nudge the width by a step (Shift for a larger one), Home/End snap to the\n * bounds, Escape restores the width from before the interaction, and a\n * double-click (or Enter) snaps back to the default. This is what satisfies\n * WCAG 2.1.1 and 2.5.7 without a visible button.\n *\n * The width the user chose is remembered for the session (per `memoryKey`),\n * like the sidebar's collapsed state — never persisted.\n */\n\nexport interface ResizeEdgeProps {\n /** Which edge of the panel the handle sits on — the side facing the page. A right-docked panel's handle is on its \"left\" edge. */\n edge: \"left\" | \"right\";\n /** Current width in px. */\n width: number;\n /** Lower bound in px — the width the app configured. */\n min: number;\n /** Upper bound in px; a function so it can follow the viewport. */\n max: () => number;\n /** The width to snap back to. */\n defaultWidth: number;\n onResize: (width: number) => void;\n /** Accessible name, e.g. \"Resize assistant\". */\n label: string;\n /** Called when a pointer drag starts and ends — panels switch off their width animation while it runs so the edge follows the pointer exactly. */\n onDraggingChange?: (dragging: boolean) => void;\n className?: string;\n}\n\nconst STEP = 16;\nconst BIG_STEP = 64;\n\nfunction clamp(v: number, min: number, max: number) {\n return Math.min(Math.max(v, min), max);\n}\n\nexport function ResizeEdge({ edge, width, min, max, defaultWidth, onResize, label, onDraggingChange, className }: ResizeEdgeProps) {\n const [dragging, setDragging] = useState(false);\n const start = useRef<{ x: number; width: number } | null>(null);\n const latestOnResize = useLatest(onResize);\n\n // Dragging the handle away from the panel makes it wider: for a handle on the\n // panel's left edge that is a leftward drag (negative dx), on its right edge a rightward one.\n const direction = edge === \"left\" ? -1 : 1;\n\n const onPointerDown = useCallback(\n (e: React.PointerEvent<HTMLDivElement>) => {\n if (e.button !== 0) return;\n e.preventDefault();\n start.current = { x: e.clientX, width };\n setDragging(true);\n e.currentTarget.setPointerCapture(e.pointerId);\n },\n [width],\n );\n\n const onPointerMove = useCallback(\n (e: React.PointerEvent<HTMLDivElement>) => {\n if (!start.current) return;\n const next = clamp(start.current.width + direction * (e.clientX - start.current.x), min, max());\n latestOnResize.current(next);\n },\n [direction, min, max, latestOnResize],\n );\n\n const endDrag = useCallback(() => {\n start.current = null;\n setDragging(false);\n }, []);\n\n const latestOnDraggingChange = useLatest(onDraggingChange);\n useEffect(() => {\n latestOnDraggingChange.current?.(dragging);\n }, [dragging, latestOnDraggingChange]);\n\n // Escape during a drag reverts to the width before it (corpus: Escape cancels\n // any in-progress pointer interaction).\n useEffect(() => {\n if (!dragging) return;\n const onKey = (e: KeyboardEvent) => {\n if (e.key !== \"Escape\" || !start.current) return;\n latestOnResize.current(start.current.width);\n endDrag();\n };\n document.addEventListener(\"keydown\", onKey);\n return () => document.removeEventListener(\"keydown\", onKey);\n }, [dragging, endDrag, latestOnResize]);\n\n const onKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n const step = e.shiftKey ? BIG_STEP : STEP;\n let next: number | null = null;\n // Left/Right move the edge itself; which way that widens depends on the edge.\n if (e.key === \"ArrowLeft\") next = width - direction * step;\n else if (e.key === \"ArrowRight\") next = width + direction * step;\n else if (e.key === \"Home\") next = min;\n else if (e.key === \"End\") next = max();\n else if (e.key === \"Enter\") next = defaultWidth;\n if (next === null) return;\n e.preventDefault();\n onResize(clamp(next, min, max()));\n };\n\n return (\n <div\n role=\"separator\"\n tabIndex={0}\n aria-orientation=\"vertical\"\n aria-label={label}\n aria-valuemin={min}\n aria-valuemax={max()}\n aria-valuenow={Math.round(width)}\n data-resize-edge={edge}\n data-dragging={dragging || undefined}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n onDoubleClick={() => onResize(clamp(defaultWidth, min, max()))}\n onKeyDown={onKeyDown}\n className={cn(\n // A narrow absolutely-positioned strip over the edge — never a flex child that takes width.\n \"group/edge absolute top-0 bottom-0 z-10 w-ds-2 cursor-col-resize touch-none select-none outline-none\",\n edge === \"left\" ? \"-left-ds-1\" : \"-right-ds-1\",\n className,\n )}\n >\n {/* The visible line: the panel's own border at rest, thicker and accent on hover / focus / drag. */}\n <div\n aria-hidden=\"true\"\n className={cn(\n \"absolute top-0 bottom-0 left-1/2 w-px -translate-x-1/2 transition-[width,background-color] duration-[var(--ds-transition-speed)]\",\n \"group-hover/edge:w-[3px] group-hover/edge:bg-[var(--ds-accent-primary)]\",\n \"group-focus-visible/edge:w-[3px] group-focus-visible/edge:bg-[var(--ds-accent-primary)]\",\n dragging && \"w-[3px] bg-[var(--ds-accent-primary)]\",\n )}\n />\n </div>\n );\n}\n\n// ─── Session memory for chosen widths ────────────────────────────────────────\n\nconst remembered = new Map<string, number>();\n\n/**\n * The width a user dragged a panel to, kept for the session under `key`.\n * Returns [width | null, remember].\n */\nexport function useRememberedWidth(key: string | undefined): [number | null, (w: number | null) => void] {\n const [width, setWidth] = useState<number | null>(() => (key ? remembered.get(key) ?? null : null));\n const remember = useCallback(\n (w: number | null) => {\n setWidth(w);\n if (!key) return;\n if (w === null) remembered.delete(key);\n else remembered.set(key, w);\n },\n [key],\n );\n return [width, remember];\n}\n\n/** Test seam. */\nexport function clearRememberedWidths() {\n remembered.clear();\n}\n\n/** Parse a px length; anything else (a token, a percentage) reads as null and the panel measures itself instead. */\nexport function pxOf(length: string | undefined): number | null {\n if (!length) return null;\n const m = /^(\\d+(?:\\.\\d+)?)px$/.exec(length.trim());\n return m ? parseFloat(m[1]) : null;\n}\n\n/** Default upper bound: sixty percent of the viewport (or of the container). */\nexport function defaultMaxWidth(container?: Element | null): number {\n const base = container instanceof HTMLElement ? container.clientWidth : typeof window !== \"undefined\" ? window.innerWidth : 1200;\n return Math.round(base * 0.6);\n}\n","import { createContext, useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from \"react\";\nimport { Button } from \"./Button\";\nimport { FormChangeCtx } from \"../lib/form-context\";\n\n/** Marks an overlay's panel: the part of the page whose controls a submit's answer is read from (0.21.0). */\nexport const OVERLAY_ROOT_ATTR = \"data-overlay-root\";\n\n/**\n * The controls a part of the page shows, by id or name: a save that keeps its form shows the same ones afterwards, a\n * step flow that moves on shows others, and a confirmation that replaces the form shows none (Sprint 25.12 A15).\n */\nfunction controlsOf(root: Element | null): string {\n if (!root) return \"\";\n const controls = root.querySelectorAll<HTMLElement>(\"input, select, textarea, [role='combobox'], [role='radiogroup'], [role='checkbox'], [role='switch'], [role='slider'], [role='spinbutton'], [contenteditable='true']\");\n return Array.from(controls).map((el) => el.id || el.getAttribute(\"name\") || el.getAttribute(\"role\") || el.tagName).join(\"|\");\n}\n\n/** A submitted form's answer, which the overlay reads once the page's answer is on screen. */\nexport interface OverlaySubmit {\n /** The page answered: its promise resolved (\"resolved\"), or its onSubmit returned no promise (\"returned\"). */\n settle: (how: \"resolved\" | \"returned\") => void;\n}\n\n/**\n * Sprint 25.12 A15 (R28-25): what an overlay knows of the forms inside it. A FormWrapper reports each change the user\n * makes, and the overlay asks before discarding while any form holds one. The overlay owns the marks, so a step flow\n * with one form per step keeps its changes after Next. A `dirty` prop the page passes wins over them. Hand-written flags\n * failed both ways in one run: the seats drawer had none, and the event drawer's was true before anything was typed.\n *\n * 0.21.0 (the review of 29 September): one mark per form, and a save clears only its own form's changes, and only those\n * made before its submit: two forms in one drawer, or a change typed while a save was running, were lost when the other\n * save cleared the drawer's single mark. A form that's gone keeps its changes until a later save or the overlay closing.\n */\nexport interface OverlayMark {\n /** The user gave one of this form's controls a new value. */\n report: (form: string) => void;\n /** This form is in the overlay until the returned function runs. */\n attach: (form: string) => () => void;\n /**\n * This form was submitted. Call before the page's onSubmit runs, then settle with its answer: the overlay reads it\n * once the answer is on screen, and clears the form's changes if it saved (FormWrapper's onSubmit says when).\n */\n submit: (form: string, from: { element: () => HTMLFormElement | null; failing: () => boolean }) => OverlaySubmit;\n /**\n * Work that closing would lose, such as a running upload (Sprint 25.12 A33): the overlay asks before closing while any\n * is held. Returns the release.\n */\n hold: () => () => void;\n /** Whether the overlay is open: work held inside a kept-mounted overlay stops when it closes. */\n open: boolean;\n}\n\nexport const OverlayMarkCtx = createContext<OverlayMark | null>(null);\n\n/**\n * An overlay's children, with its mark. Controls inside answer to a FormWrapper inside the overlay, never to a form\n * around it (0.21.0): a \"New label\" dialog opened from an edit drawer's form, or a delete's typed confirmation, marked the\n * drawer.\n */\nexport function OverlayMarkScope({ mark, children }: { mark: OverlayMark; children: ReactNode }) {\n return <OverlayMarkCtx value={mark}><FormChangeCtx value={null}>{children}</FormChangeCtx></OverlayMarkCtx>;\n}\n\n/** A form's changes in its overlay: the last one's number (0: none since it saved), and whether the form is still there. */\ninterface FormMark { stamp: number; mounted: boolean }\n\ninterface Answer { form: string; since: number; root: HTMLElement | null; controls: string; how: \"resolved\" | \"returned\"; element: () => HTMLFormElement | null; failing: () => boolean }\n\n/** An overlay's marks: set by a change, cleared by a save of the same form, and reset whenever the overlay closes; held while work runs. */\nexport function useOverlayMark(open: boolean): { marked: boolean; mark: OverlayMark } {\n const forms = useRef(new Map<string, FormMark>());\n const count = useRef(0);\n // answers from before the overlay last closed are void\n const round = useRef(0);\n const [changed, setChanged] = useState(false);\n const [holds, setHolds] = useState(0);\n const [answers, setAnswers] = useState<Answer[]>([]);\n const [wasOpen, setWasOpen] = useState(open);\n if (open !== wasOpen) {\n setWasOpen(open);\n if (!open) {\n setChanged(false);\n setAnswers([]);\n }\n }\n useEffect(() => {\n if (open) return;\n round.current++;\n for (const [id, f] of forms.current) {\n if (f.mounted) f.stamp = 0;\n else forms.current.delete(id);\n }\n }, [open]);\n const mark = useMemo<OverlayMark>(() => ({\n report: (form) => {\n const f = forms.current.get(form) ?? { stamp: 0, mounted: true };\n f.stamp = ++count.current;\n forms.current.set(form, f);\n setChanged(true);\n },\n attach: (form) => {\n const f = forms.current.get(form) ?? { stamp: 0, mounted: true };\n f.mounted = true;\n forms.current.set(form, f);\n return () => {\n const gone = forms.current.get(form);\n if (!gone) return;\n if (gone.stamp > 0) gone.mounted = false;\n else forms.current.delete(form);\n };\n },\n submit: (form, from) => {\n // the overlay's controls before the page answers, and the last change the save can carry\n const root = from.element()?.closest<HTMLElement>(`[${OVERLAY_ROOT_ATTR}]`) ?? null;\n const answer = { form, since: count.current, root, controls: controlsOf(root), ...from };\n const at = round.current;\n let settled = false;\n return {\n settle: (how) => {\n if (settled || at !== round.current) return;\n settled = true;\n setAnswers((list) => [...list, { ...answer, how }]);\n },\n };\n },\n hold: () => {\n setHolds((n) => n + 1);\n let released = false;\n return () => {\n if (released) return;\n released = true;\n setHolds((n) => n - 1);\n };\n },\n open,\n }), [open]);\n\n // An answer is read once it is on screen (this runs after the commit that carries the page's answer):\n // - a field still invalid in the form, or a check of its own failing: nothing saved;\n // - a submit that returned no promise and now shows other controls: a step flow moved on, and saves at its end;\n // - otherwise it saved: its form's changes up to its submit clear, with those of forms that have gone (a flow's steps).\n /* eslint-disable react-hooks/set-state-in-effect -- the answer is a DOM read after the page's answer commits */\n useEffect(() => {\n if (!answers.length) return;\n for (const a of answers) {\n const form = a.element();\n if (form?.isConnected && (form.querySelector(\"[aria-invalid='true']\") || a.failing())) continue;\n if (a.how === \"returned\") {\n const now = a.root?.isConnected ? controlsOf(a.root) : \"\";\n if (now !== \"\" && now !== a.controls) continue;\n }\n for (const [id, f] of forms.current) {\n if (f.stamp === 0 || f.stamp > a.since || (id !== a.form && f.mounted)) continue;\n if (f.mounted) forms.current.set(id, { ...f, stamp: 0 });\n else forms.current.delete(id);\n }\n }\n setAnswers([]);\n setChanged([...forms.current.values()].some((f) => f.stamp > 0));\n }, [answers]);\n /* eslint-enable react-hooks/set-state-in-effect */\n return { marked: changed || holds > 0, mark };\n}\n\n/**\n * The open overlay's guarded close (round 21): a Drawer, Dialog, or a Sheet given `dirty`, provides it so a form inside\n * can close the overlay through the same unsaved-changes question Escape and the close control ask. FormWrapper's\n * `onCancel` uses it; run 58's hand-wired Cancel closed a half-filled invite with no question while Escape asked.\n * `then` runs once the overlay has closed — never when the user keeps editing (the review of 23 September: the\n * form's own onCancel was dropped inside an overlay).\n */\nexport const OverlayCloseCtx = createContext<((then?: () => void) => void) | null>(null);\n\n/**\n * The dirty guard an overlay with a form shares (Sprint 25.2, C1): while the\n * content is dirty, every close path — Escape, backdrop, the close control —\n * asks first, inside the overlay rather than in a second dialog. The page\n * passes `dirty`; the overlay does the rest.\n */\nexport function useDirtyGuard(dirty: boolean | undefined, onClose: () => void, onDiscard?: () => void) {\n const [wantsConfirm, setWantsConfirm] = useState(false);\n const confirming = wantsConfirm && !!dirty;\n // What runs after the close goes ahead (a form's own onCancel). A close path wired as a click handler passes its event\n // here, so only a function counts; the overlay's own onClose is not run twice.\n const pending = useRef<unknown>(undefined);\n const runAfter = useCallback((then: unknown) => { if (typeof then === \"function\" && then !== onClose) (then as () => void)(); }, [onClose]);\n const requestClose = useCallback((then?: unknown) => {\n if (!dirty) { onClose(); runAfter(then); return; }\n pending.current = then;\n // A second close request while the question is showing (Escape again, another backdrop click) keeps editing.\n setWantsConfirm((c) => !c);\n }, [dirty, onClose, runAfter]);\n const keep = useCallback(() => { pending.current = undefined; setWantsConfirm(false); }, []);\n const discard = useCallback(() => {\n setWantsConfirm(false);\n onDiscard?.();\n onClose();\n const then = pending.current;\n pending.current = undefined;\n runAfter(then);\n }, [onClose, onDiscard, runAfter]);\n return { confirming, requestClose, keep, discard };\n}\n\nexport function DiscardConfirm({ open, onKeep, onDiscard }: { open: boolean; onKeep: () => void; onDiscard: () => void }) {\n const keepRef = useRef<HTMLButtonElement>(null);\n const returnTo = useRef<HTMLElement | null>(null);\n const overlay = useRef<HTMLElement | null>(null);\n // Focus moves to \"Keep editing\" while the question shows and goes back where it was when it closes — or to the\n // overlay's first control when nothing inside it had focus — so a non-modal drawer keeps answering Escape and a\n // screen reader keeps its place (Sprint 25.2 review).\n useEffect(() => {\n if (!open) return;\n const active = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n overlay.current = keepRef.current?.closest<HTMLElement>(\"[role='dialog'], [role='alertdialog']\") ?? null;\n returnTo.current = active && active !== document.body && overlay.current?.contains(active) ? active : null;\n keepRef.current?.focus();\n return () => {\n if (document.activeElement !== document.body) return;\n const back = returnTo.current;\n if (back && back.isConnected) { back.focus(); return; }\n const first = overlay.current?.querySelector<HTMLElement>(\"button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])\");\n (first ?? overlay.current)?.focus();\n };\n }, [open]);\n if (!open) return null;\n return (\n <div\n role=\"group\"\n aria-label=\"Unsaved changes\"\n data-discard-confirm=\"\"\n className=\"shrink-0 flex flex-wrap items-center justify-between gap-ds-3 border-t-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)] bg-[var(--ds-status-warning-bg)]\"\n // at the overlay's inset, as its header, body and footer are (Sprint 25.14 A36)\n style={{ padding: \"var(--ds-space-3) var(--ds-page-gutter)\" }}\n >\n <p className=\"text-sm text-[var(--ds-text-primary)]\">You have unsaved changes.</p>\n <div className=\"flex items-center gap-ds-2\">\n <Button type=\"button\" ref={keepRef} variant=\"secondary\" size=\"sm\" onClick={onKeep}>Keep editing</Button>\n <Button type=\"button\" variant=\"destructive\" size=\"sm\" onClick={onDiscard}>Discard changes</Button>\n </div>\n </div>\n );\n}\n","import { createContext } from \"react\";\n\n/**\n * Sprint 25.14 A24: the width a Drawer given none takes. AppShell provides its drawerWidth here (520 px by default), so a\n * page's drawers share one width with nothing passed; a lib context, so the Drawer never imports the shell that renders\n * it. Null outside a shell, where a Drawer keeps 400 px.\n */\nexport const DrawerWidthCtx = createContext<string | null>(null);\n","import { useCallback, useRef } from \"react\";\n\n/**\n * Sprint 25.14 (the review of 30 September): an overlay's scrolling body whose scrollbar takes room (Windows, Linux, a\n * Mac set to always show scroll bars) loses the scrollbar's width from its right inset, so its fields end short of the\n * header's and the footer's. This measures the scrollbar and publishes its width as `--gs-scrollbar` on the element,\n * which the body's right padding takes from the gutter. A scrollbar that overlays the content (a Mac's default, a\n * phone's) measures 0. Returns a callback ref.\n */\nexport function useScrollbarInset<T extends HTMLElement = HTMLDivElement>() {\n const observer = useRef<ResizeObserver | null>(null);\n return useCallback((el: T | null) => {\n observer.current?.disconnect();\n observer.current = null;\n if (!el) return;\n const measure = () => {\n const style = getComputedStyle(el);\n const borders = (parseFloat(style.borderLeftWidth) || 0) + (parseFloat(style.borderRightWidth) || 0);\n el.style.setProperty(\"--gs-scrollbar\", `${Math.max(0, el.offsetWidth - el.clientWidth - borders)}px`);\n };\n measure();\n if (typeof ResizeObserver === \"undefined\") return;\n // a scrollbar that appears or goes narrows or widens the content box, which the observer reports\n const o = new ResizeObserver(measure);\n o.observe(el);\n observer.current = o;\n }, []);\n}\n\n/** The right padding of a body inset by `gutter`, less the scrollbar's width where it takes room. */\nexport const insetLessScrollbar = (gutter: string) => `max(0px, calc(${gutter} - var(--gs-scrollbar, 0px)))`;\n","import { useContext, useEffect, useRef, useState, useId, useCallback, useMemo, createContext, type ReactNode } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { cn, OVERLAY_SURFACE, GLASS_OVERLAY, lockBodyScroll, unlockBodyScroll } from \"../lib/utils\";\nimport { Icon } from \"../lib/icons\";\nimport { focusInitial, useReturnFocus, useFocusTrap, useOverlayLayer, useNonModalDialog, OVERLAY_CLOSE_ATTR } from \"../lib/focus\";\nimport { useCloseSettle } from \"../lib/use-close-settle\";\nimport { ResizeEdge, useRememberedWidth, pxOf, defaultMaxWidth } from \"../lib/edge-resize\";\nimport { Tooltip } from \"./Tooltip\";\nimport { useTextOverflow } from \"../lib/use-text-overflow\";\nimport { useBreakpoint } from \"../lib/use-breakpoint\";\nimport { useDirtyGuard, DiscardConfirm, OverlayCloseCtx, OverlayMarkScope, OVERLAY_ROOT_ATTR, useOverlayMark } from \"./DiscardConfirm\";\nimport { useLatest } from \"../lib/use-latest\";\nimport { DrawerWidthCtx } from \"../lib/drawer-width\";\nimport { SurfaceBoundary } from \"../lib/surface-context\";\nimport { insetLessScrollbar, useScrollbarInset } from \"../lib/use-scrollbar-inset\";\n\n// ---------------------------------------------------------------------------\n// DrawerFooterContext — FormWrapper registers its actions here so the overlay\n// renders them in its footer area (outside the form's DOM tree, linked by the\n// HTML form attribute). An explicit `footer` prop on Drawer/Sheet wins.\n// ---------------------------------------------------------------------------\n\nexport interface DrawerFooterContextValue {\n registerActions: (id: string, actions: ReactNode) => void;\n unregisterActions: (id: string) => void;\n}\n\nexport const DrawerFooterCtx = createContext<DrawerFooterContextValue | null>(null);\n\ninterface DrawerProps {\n open: boolean;\n onClose: () => void;\n position?: \"left\" | \"right\" | \"bottom\";\n /** Pass none: the Drawer takes the app's width, which the shell carries (AppShell's drawerWidth, 520 px by default; 400 px outside a shell). For a deliberate wide or narrow drawer only. A non-modal side panel (modal={false}, such as the shell's assistant) keeps the width it is given. */\n width?: string;\n title?: ReactNode;\n children: ReactNode;\n footer?: ReactNode;\n container?: Element | DocumentFragment;\n /** Remove default content padding — use when the child (e.g. Sidebar) handles its own spacing. */\n flush?: boolean;\n /** Use a lighter backdrop (no blur, subtle dim). Use for compact overlays. */\n lightBackdrop?: boolean;\n /** Offset the drawer from the top of its container. When set, the area above this offset remains visible and interactive (e.g. keeping a navbar accessible). */\n topOffset?: string;\n /**\n * What the drawer becomes at phone width (≤ the sm breakpoint).\n * \"sheet\" (default for right and bottom): a draggable bottom Sheet with snap points.\n * \"panel\" (default for left, which is the navigation convention): a full-height side panel.\n * lightBackdrop and topOffset do not apply in sheet mode.\n */\n mobile?: \"sheet\" | \"panel\";\n /** Snap points for the phone-width Sheet, as fractions of the viewport. Default [0.5, 0.92]. */\n snapPoints?: number[];\n /**\n * Default true. false makes the drawer a persistent, non-modal panel the user works alongside\n * (an assistant, help): no backdrop, no scroll lock, no focus trap — the page stays operable.\n * It closes only on Escape while focus is inside it, its close control, or onClose from the\n * consumer; an outside click does nothing. At phone width the sheet it becomes is modal: a backdrop, the focus trap,\n * the scroll lock and Escape from anywhere, and focus moves in if the window narrows while it is open.\n */\n modal?: boolean;\n /**\n * Keep the panel in the DOM while closed (hidden and out of the tab order) so a half-typed\n * message, the scroll position and any in-progress rendering survive close and reopen.\n * Default false — the panel unmounts after its close transition, as it always has.\n */\n keepMounted?: boolean;\n /** id applied to the dialog element, for an opener's aria-controls. */\n id?: string;\n /** id of the element that names the dialog when no title is rendered — e.g. ChatPanel's heading. */\n labelledBy?: string;\n /**\n * Let the user drag the page-side edge to widen a non-modal side drawer,\n * between `width` and maxWidth (default 60% of the viewport). Default false —\n * ordinary drawers keep the one shared width. Ignored when modal or at phone width.\n */\n resizable?: boolean;\n maxWidth?: string;\n /** The content has unsaved changes: every close path asks before discarding, inside the drawer (Sprint 25.2, C1). */\n dirty?: boolean;\n /** Called when the user chooses to discard, before onClose. */\n onDiscard?: () => void;\n}\n\nconst slideClasses: Record<string, { panel: string; open: string; closed: string }> = {\n right: {\n panel: \"top-0 right-0 h-full\",\n open: \"translate-x-0\",\n closed: \"translate-x-full\",\n },\n left: {\n panel: \"top-0 left-0 h-full\",\n open: \"translate-x-0\",\n closed: \"-translate-x-full\",\n },\n bottom: {\n panel: \"bottom-0 left-0 right-0\",\n open: \"translate-y-0\",\n closed: \"translate-y-full\",\n },\n};\n\nconst borderByPosition: Record<string, string> = {\n right: \"border-l-[length:var(--ds-border-width)] border-l-[var(--ds-border-default)]\",\n left: \"border-r-[length:var(--ds-border-width)] border-r-[var(--ds-border-default)]\",\n bottom: \"border-t-[length:var(--ds-border-width)] border-t-[var(--ds-border-default)]\",\n};\n\nexport function Drawer(props: DrawerProps) {\n const { position = \"right\", mobile, open, onClose, footer, dirty, onDiscard } = props;\n // Sprint 25.14 A24: a Drawer given no width takes the app's, which the shell carries (520 px by default); outside a\n // shell it keeps 400 px. A width prop wins.\n const shellWidth = useContext(DrawerWidthCtx) ?? undefined;\n const isPhone = useBreakpoint(\"sm\");\n const mobileMode = mobile ?? (position === \"left\" ? \"panel\" : \"sheet\");\n // Sprint 25.12 A15: a form inside marks the drawer when the user changes something; a `dirty` prop still wins. The\n // drawer owns the mark in both its forms, so the sheet it becomes on a phone asks with the drawer's question.\n const { marked, mark } = useOverlayMark(open);\n const guard = useDirtyGuard(dirty ?? marked, onClose, onDiscard);\n const confirm = <DiscardConfirm open={guard.confirming} onKeep={guard.keep} onDiscard={guard.discard} />;\n\n // Registered actions from FormWrapper children (C10).\n const [actionsMap, setActionsMap] = useState<Map<string, ReactNode>>(new Map());\n const registerActions = useCallback((formId: string, acts: ReactNode) => {\n setActionsMap((prev) => new Map(prev).set(formId, acts));\n }, []);\n const unregisterActions = useCallback((formId: string) => {\n setActionsMap((prev) => { const next = new Map(prev); next.delete(formId); return next; });\n }, []);\n const registeredActions = actionsMap.size > 0\n ? <>{Array.from(actionsMap.values())}</>\n : null;\n // An explicit footer wins; otherwise fall back to FormWrapper-registered actions.\n const effectiveFooter = footer ?? registeredActions;\n const footerCtx = useMemo<DrawerFooterContextValue>(\n () => ({ registerActions, unregisterActions }),\n [registerActions, unregisterActions]\n );\n\n // Sprint 25.14 A50: one panel in both forms. Below `sm` it takes the sheet's form in place, so a phone turned\n // sideways and back keeps the content's elements (typed text, an upload, an editor's history, the unsaved-changes\n // mark) and focus; a Sheet here and a panel there were two trees, and crossing 640 px rebuilt the content.\n return (\n <DrawerFooterCtx value={footerCtx}>\n <OverlayMarkScope mark={mark}>\n <OverlayCloseCtx value={guard.requestClose}>\n <DrawerPanel {...props} width={props.width ?? shellWidth} form={isPhone && mobileMode === \"sheet\" ? \"sheet\" : \"panel\"} footer={effectiveFooter} onClose={guard.requestClose} confirm={confirm} />\n </OverlayCloseCtx>\n </OverlayMarkScope>\n </DrawerFooterCtx>\n );\n}\n\n/** The inset an overlay's header, body and footer share: the page's gutter (Sprint 25.14 A36, D34). */\nconst INSET = \"var(--ds-page-gutter)\";\nconst DEFAULT_SNAPS = [0.5, 0.92];\n\nexport interface DrawerPanelProps extends DrawerProps {\n /**\n * \"panel\": a side or bottom panel. \"sheet\": the phone's bottom sheet, with a drag handle and snap heights, always\n * modal. The Drawer switches between them at the `sm` breakpoint; the Sheet is always \"sheet\".\n */\n form: \"panel\" | \"sheet\";\n /** Between the body and the footer: the unsaved-changes question. */\n confirm?: ReactNode;\n}\n\n/** The Drawer's panel and the Sheet: one frame, so a Drawer changing form keeps its content (Sprint 25.14 A50). */\nexport function DrawerPanel({ form, open, onClose, position = \"right\", width = \"400px\", title, children, footer, container, flush, lightBackdrop, topOffset, modal = true, keepMounted = false, id, labelledBy, resizable = false, maxWidth, snapPoints = DEFAULT_SNAPS, confirm }: DrawerPanelProps) {\n const sheet = form === \"sheet\";\n const nonModal = !modal;\n // At phone width the sheet is always modal: the backdrop, the focus trap and the scroll lock. Focus on open and on\n // close follows `modal` alone, so a drawer that changes form while open leaves focus where it is.\n const blocking = !nonModal || sheet;\n // Drag-to-resize (non-modal side drawers only): the configured width is the\n // minimum; the user's choice is remembered for the session.\n const [chosen, remember] = useRememberedWidth(id ?? labelledBy);\n const canResize = !sheet && nonModal && resizable && position !== \"bottom\";\n const effectiveWidth = canResize && chosen !== null ? `${chosen}px` : width;\n const minPx = pxOf(width) ?? 320;\n const maxPx = () => pxOf(maxWidth) ?? defaultMaxWidth(container instanceof Element ? container : null);\n const titleId = useId();\n const { ref: titleOverflowRef, isTruncated: titleTruncated } = useTextOverflow({ lines: 1 });\n const isMobile = useBreakpoint(\"sm\");\n const panelRef = useRef<HTMLDivElement>(null);\n const [mounted, setMounted] = useState(open);\n // keepMounted: the panel stays in the DOM and this flips instead of `mounted`.\n const [hidden, setHidden] = useState(!open);\n // The sheet's height: a snap point, plus the distance of a drag in progress.\n const [snapIdx, setSnapIdx] = useState(0);\n const [dragOffset, setDragOffset] = useState(0);\n const [dragging, setDragging] = useState(false);\n const dragStartY = useRef(0);\n const startHeight = useRef(0);\n const onCloseRef = useLatest(onClose);\n // Every open starts at the first snap point. React's \"adjust state when a prop changes\": it runs before commit, so\n // the first painted frame is already right.\n const [prevOpen, setPrevOpen] = useState(open);\n if (open !== prevOpen) {\n setPrevOpen(open);\n if (open) { setSnapIdx(0); setDragOffset(0); }\n }\n // Mount (or unhide) as soon as `open` flips, checked on every render (the visual pass of 23 September: the close\n // settle runs once at load and sets `mounted` false while it already is; React keeps that update and replays it\n // after the first open, so a panel mounted only on the change of `open` vanished on the first open after a load).\n if (open && !mounted) setMounted(true);\n if (open && hidden) setHidden(false);\n\n const isTopLayer = useOverlayLayer(open);\n\n // ── Modal mechanics (the default, and the phone's sheet, which is always modal) ──\n useEffect(() => {\n if (!open || !blocking) return;\n\n // An Escape a control inside already handled (a list closing) is its own; a non-modal drawer's own handler marks\n // the event handled, so a drawer that is both never closes twice.\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key !== \"Escape\" || e.defaultPrevented || !isTopLayer()) return;\n e.preventDefault();\n onCloseRef.current();\n };\n\n document.addEventListener(\"keydown\", onKeyDown);\n return () => document.removeEventListener(\"keydown\", onKeyDown);\n }, [open, blocking, onCloseRef, isTopLayer]);\n\n useEffect(() => {\n if (!open || !blocking || container) return;\n lockBodyScroll();\n return () => unlockBodyScroll();\n }, [open, blocking, container]);\n\n useReturnFocus(open && !nonModal, panelRef);\n // A drawer offset below a navbar leaves that navbar interactive by design,\n // so it is not modal and must not trap focus; the phone's sheet always traps.\n useFocusTrap(panelRef, open && blocking && (sheet || !topOffset), isTopLayer);\n\n // The panel only exists once `mounted` flips, so depend on it too — an\n // [open]-only effect ran before the panel rendered and focused nothing.\n useEffect(() => {\n if (!open || !mounted || nonModal) return;\n const raf = requestAnimationFrame(() => focusInitial(panelRef.current));\n return () => cancelAnimationFrame(raf);\n }, [open, mounted, nonModal]);\n\n // ── Non-modal mechanics ──\n useNonModalDialog(panelRef, open && mounted && nonModal, onClose, isTopLayer);\n\n // A non-modal drawer that becomes the phone's modal sheet while open (the window narrowed, a phone turned) takes focus\n // in, as a modal does when it opens: its backdrop and its Tab trap now cover the page, so focus left out there typed\n // into a field no one could see (the review of 30 September).\n const wasBlocking = useRef(blocking);\n useEffect(() => {\n const was = wasBlocking.current;\n wasBlocking.current = blocking;\n if (!open || !mounted || !blocking || was) return;\n const panel = panelRef.current;\n if (panel && !panel.contains(document.activeElement)) focusInitial(panel);\n }, [open, mounted, blocking]);\n\n // the body keeps its right inset when a scrollbar takes room\n const bodyRef = useScrollbarInset<HTMLDivElement>();\n\n // After the close transition settles (at once under reduced motion): unmount,\n // or just hide when the consumer wants the panel's state preserved.\n useCloseSettle(open, panelRef, () => {\n if (keepMounted) setHidden(true);\n else setMounted(false);\n });\n\n // ── The sheet's drag ──\n // Snap fractions are relative to the viewport, or to the container when one is given.\n const viewportHeight = useCallback(\n () => (container instanceof HTMLElement ? container.clientHeight : window.innerHeight),\n [container],\n );\n const handlePointerDown = useCallback((e: React.PointerEvent) => {\n setDragging(true);\n dragStartY.current = e.clientY;\n startHeight.current = (snapPoints[snapIdx] ?? snapPoints[0]) * viewportHeight();\n setDragOffset(0);\n (e.target as HTMLElement).setPointerCapture(e.pointerId);\n }, [snapIdx, snapPoints, viewportHeight]);\n const handlePointerMove = useCallback((e: React.PointerEvent) => {\n if (!dragging) return;\n setDragOffset(dragStartY.current - e.clientY);\n }, [dragging]);\n const handlePointerUp = useCallback(() => {\n if (!dragging) return;\n setDragging(false);\n const currentFraction = (startHeight.current + dragOffset) / viewportHeight();\n if (currentFraction < snapPoints[0] * 0.6) {\n onClose();\n setDragOffset(0);\n return;\n }\n let bestIdx = 0;\n let bestDist = Math.abs(currentFraction - snapPoints[0]);\n for (let i = 1; i < snapPoints.length; i++) {\n const dist = Math.abs(currentFraction - snapPoints[i]);\n if (dist < bestDist) { bestDist = dist; bestIdx = i; }\n }\n setSnapIdx(bestIdx);\n setDragOffset(0);\n }, [dragging, dragOffset, snapPoints, onClose, viewportHeight]);\n\n if (!mounted) return null;\n\n const slide = slideClasses[position];\n const isHorizontal = position === \"left\" || position === \"right\";\n const positionClass = container ? \"absolute\" : \"fixed\";\n // lightBackdrop and topOffset do not apply to the sheet\n const offset = sheet ? undefined : topOffset;\n const baseHeight = (snapPoints[snapIdx] ?? snapPoints[0]) * 100;\n const heightUnit = container ? \"%\" : \"vh\";\n const dragPx = dragging ? dragOffset : 0;\n const heading = \"font-[family-name:var(--ds-font-display)] text-lg font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)] truncate\";\n\n // Every element from here to the content is the same in both forms, so the content keeps its place in the tree when\n // the form changes (A50): what differs is classes and styles, and the handle and the resize edge beside the body.\n return createPortal(\n <div\n hidden={keepMounted && hidden ? true : undefined}\n className={cn(\n `${positionClass} transition-opacity duration-[var(--ds-transition-speed)]`,\n // A non-modal panel never intercepts the page: the wrapper is inert to the\n // pointer and only the panel itself accepts events.\n blocking ? cn(\"z-[var(--ds-z-modal)]\", open ? \"pointer-events-auto\" : \"pointer-events-none\") : \"z-[var(--ds-z-overlay)] pointer-events-none\",\n offset ? \"left-0 right-0 bottom-0\" : \"inset-0\",\n )}\n style={offset ? { top: offset } : undefined}\n >\n {/* Backdrop — modal only */}\n {blocking && (\n <div\n className={cn(\n \"absolute inset-0 transition-opacity duration-[var(--ds-transition-speed)]\",\n sheet\n ? \"bg-black/50\"\n : lightBackdrop\n ? \"bg-black/15\"\n : cn(\"bg-black/50\", \"[backdrop-filter:blur(calc(var(--ds-glass-blur)*0.3))] [-webkit-backdrop-filter:blur(calc(var(--ds-glass-blur)*0.3))]\"),\n open ? \"opacity-100\" : \"opacity-0\"\n )}\n onClick={onClose}\n />\n )}\n\n {/* Panel */}\n <div\n ref={panelRef}\n id={id}\n role=\"dialog\"\n data-gs={sheet ? \"sheet\" : \"drawer\"}\n data-ds-sheet={sheet ? \"\" : undefined}\n {...{ [OVERLAY_ROOT_ATTR]: \"\" }}\n aria-modal={blocking ? \"true\" : undefined}\n aria-labelledby={title ? titleId : labelledBy}\n style={sheet ? {\n containerType: \"inline-size\",\n height: dragPx ? `calc(${baseHeight}${heightUnit} + ${dragPx}px)` : `${baseHeight}${heightUnit}`,\n } : {\n containerType: \"inline-size\",\n width: isHorizontal ? effectiveWidth : undefined,\n maxWidth: isHorizontal ? \"100%\" : undefined,\n height: isMobile ? \"100%\" : undefined,\n maxHeight: !isMobile && !isHorizontal ? \"80vh\" : undefined,\n }}\n className={cn(\n `${positionClass} z-10 flex flex-col`,\n !blocking && \"pointer-events-auto\",\n OVERLAY_SURFACE, \"text-[var(--ds-text-primary)]\",\n GLASS_OVERLAY,\n sheet ? cn(\n \"bottom-0 left-0 right-0\",\n \"border-t-[length:var(--ds-border-width)] border-[var(--ds-border-default)]\",\n \"rounded-t-[var(--ds-radius-xl)]\",\n !dragging && \"transition-[transform,height] duration-[var(--ds-transition-speed)] ease-[var(--ds-transition-ease)]\",\n open ? \"translate-y-0\" : \"translate-y-full\",\n ) : cn(\n // flush drops the edge border for children that draw their own (the mobile\n // menu's Sidebar); a non-modal panel has no backdrop to separate it from\n // the page, so it always keeps the border.\n (!flush || nonModal) && borderByPosition[position],\n \"transition-transform duration-[var(--ds-transition-speed)] ease-[var(--ds-transition-ease)]\",\n isHorizontal && position === \"left\" && \"rounded-r-[var(--ds-radius-lg)] overflow-hidden\",\n isHorizontal && position === \"right\" && \"rounded-l-[var(--ds-radius-lg)] overflow-hidden\",\n !isHorizontal && \"rounded-t-[var(--ds-radius-lg)] overflow-hidden\",\n (lightBackdrop || nonModal) && \"shadow-[var(--ds-shadow-overlay)]\",\n slide.panel,\n open ? slide.open : slide.closed\n ),\n )}\n >\n {sheet && (\n <div\n className=\"flex justify-center pt-ds-2 pb-ds-1 cursor-grab active:cursor-grabbing touch-none\"\n onPointerDown={handlePointerDown}\n onPointerMove={handlePointerMove}\n onPointerUp={handlePointerUp}\n onPointerCancel={handlePointerUp}\n >\n <div className=\"w-10 h-1 rounded-[var(--ds-radius-full)] bg-[var(--ds-border-default)]\" />\n </div>\n )}\n\n {canResize && open && (\n <ResizeEdge\n edge={position === \"right\" ? \"left\" : \"right\"}\n width={chosen ?? minPx}\n min={minPx}\n max={maxPx}\n defaultWidth={minPx}\n onResize={(w) => remember(w === minPx ? null : w)}\n label=\"Resize panel\"\n />\n )}\n\n {/* Header */}\n {title && (\n <div\n className=\"flex items-center justify-between gap-ds-3 shrink-0 border-b-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\"\n style={sheet ? { padding: `var(--ds-space-2) ${INSET}` } : {\n padding: `var(--ds-space-3) ${INSET}`,\n minHeight: \"calc(var(--ds-space-unit) * 6 + 1.75rem + 2px + var(--ds-border-width))\",\n }}\n >\n {!sheet && titleTruncated ? (\n <Tooltip content={title}>\n <h2 ref={titleOverflowRef} id={titleId} className={heading}>{title}</h2>\n </Tooltip>\n ) : (\n <h2 ref={titleOverflowRef} id={titleId} className={heading}>{title}</h2>\n )}\n <button type=\"button\"\n onClick={onClose}\n {...{ [OVERLAY_CLOSE_ATTR]: \"\" }}\n className=\"text-[var(--ds-text-muted)] hover:text-[var(--ds-text-primary)] transition-colors cursor-pointer\"\n aria-label=\"Close\"\n >\n <Icon name=\"close\" size={18} />\n </button>\n </div>\n )}\n\n {/* Content: a surface of its own, so a Card or a pane the drawer was declared in tells its content nothing */}\n <div\n ref={bodyRef}\n className=\"flex-1 overflow-y-auto\"\n style={flush ? undefined : { padding: `var(--ds-space-5) ${insetLessScrollbar(INSET)} var(--ds-space-5) ${INSET}` }}\n >\n <SurfaceBoundary>{children}</SurfaceBoundary>\n </div>\n\n {confirm}\n\n {/* Footer */}\n {footer && (\n <div\n className=\"shrink-0 flex items-center justify-end gap-ds-2 border-t-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)]\"\n style={{ padding: `var(--ds-space-3) ${INSET}` }}\n >\n {footer}\n </div>\n )}\n </div>\n </div>,\n container ?? document.body,\n );\n}\n","import { cn } from \"../lib/utils\";\n\ninterface SkipLinkProps {\n /** The id of the main region (AppShell names its <main> \"main\"). */\n href?: string;\n children?: string;\n className?: string;\n}\n\n/**\n * The first focusable element on a page with repeated navigation: invisible\n * until it receives keyboard focus, then a small floating button that jumps\n * past the sidebar and navbar to the main content (WCAG 2.4.1). AppShell\n * renders one by default; a page outside AppShell composes it first.\n */\nexport function SkipLink({ href = \"#main\", children = \"Skip to content\", className }: SkipLinkProps) {\n return (\n <a\n href={href}\n className={cn(\n \"sr-only focus:not-sr-only focus:fixed focus:top-[var(--ds-space-2)] focus:left-[var(--ds-space-2)] focus:z-[var(--ds-z-tooltip)]\",\n \"focus:px-[var(--ds-space-3)] focus:py-[var(--ds-space-2)] focus:rounded-[var(--ds-radius-md)] focus:text-sm focus:font-medium\",\n \"focus:bg-[var(--ds-bg-surface-elevated)] focus:text-[var(--ds-text-primary)] focus:shadow-[var(--ds-shadow-md)]\",\n \"focus:outline-none focus:ring-2 focus:ring-[var(--ds-accent-primary)]\",\n className\n )}\n >\n {children}\n </a>\n );\n}\n","import { version } from \"react\";\n\n/**\n * gridsmith-ui needs React 19: its components render React 19's context providers and take `ref` as a prop, so on\n * React 18 the shell crashes with React's own \"render is not a function\". The words a React 18 app gets instead, so\n * the fix is named (Sprint 25.7, the owner's call of 26 September 2026: the package says React 19 only). An\n * experimental build (0.0.0-…) is taken as current.\n */\nexport function reactVersionProblem(v: string = version): string | null {\n if (v.startsWith(\"0.0.0\")) return null;\n const major = Number.parseInt(v, 10);\n return Number.isFinite(major) && major < 19\n ? `gridsmith-ui needs React 19, and this app has React ${v}. Upgrade react, react-dom, @types/react and @types/react-dom to 19, then reinstall; an install forced with --force or --legacy-peer-deps cannot run.`\n : null;\n}\n\n/** Evaluated once: the shell and the page container throw it before rendering anything React 18 cannot. */\nexport const REACT_VERSION_PROBLEM = reactVersionProblem();\n","import { isValidElement, useState, useCallback, useEffect, useRef, forwardRef, createContext, useContext, type ReactNode } from \"react\";\nimport { REACT_VERSION_PROBLEM } from \"../lib/react-version\";\nimport type { AppShellTheme, ChromePosition } from \"../lib/shell-theme\";\nimport { PreferencesContext, type AppShellPreferences } from \"../lib/preferences\";\nimport { SkipLink } from \"./SkipLink\";\nimport { cn } from \"../lib/utils\";\nimport { useBreakpoint } from \"../lib/use-breakpoint\";\nimport { Drawer } from \"./Drawer\";\nimport { DrawerWidthCtx } from \"../lib/drawer-width\";\n\nexport interface AppShellContextValue {\n hasSidebar: boolean;\n hasMobileMenu: boolean;\n hasMobileNav: boolean;\n sidebarOpen: boolean;\n setSidebarOpen: (open: boolean) => void;\n isMobile: boolean;\n /** True only for tablet-sized viewports (between sm and md breakpoints). Drawer shows here, not on small mobile. */\n isTablet: boolean;\n /**\n * Effective sidebar collapse for a traditional Sidebar rendered in the shell.\n * The user's explicit choice wins; otherwise the auto tier applies — collapsed\n * to a rail at or below the `lg` breakpoint, expanded above it. Lives here rather\n * than in Sidebar so it survives the sidebar unmounting in the drawer range.\n */\n sidebarCollapsed: boolean;\n /** Records an explicit user choice. Overrides the auto tier in both directions for the session. */\n setSidebarCollapsed: (collapsed: boolean) => void;\n /** True while a docked AsidePanel in the aside slot is open beside the content. Pages may hide non-essential chrome on it. */\n asideOpen: boolean;\n /** Set by AsidePanel; not for pages to call. */\n setAsideOpen: (open: boolean) => void;\n /** Which side the aside slot is on (AppShell's asideSide). */\n asideSide: \"right\" | \"left\";\n /** True while the docked AsidePanel is floating — a floating PageHeader drops its gutter on that side, as it does beside a floating Sidebar. */\n asideFloating: boolean;\n /** Set by AsidePanel; not for pages to call. */\n setAsideFloating: (floating: boolean) => void;\n /**\n * The shell's root element, for previews that need to render overlays inside their frame\n * (the dashboard builder passes it to Launcher, CornerPanel and Drawer as `container`).\n * Components never read it themselves: a container moves the toast-inset claim onto that\n * element, where a body-level ToastProvider cannot see it.\n */\n container: HTMLElement | null;\n /** The theme's shell-level decisions (Sprint 25). PageHeader and PageContainer resolve their defaults from it. */\n theme: AppShellTheme | null;\n /** The current route is the home page (`currentPath === homePath`); decides `colourfulHomeOnly`. */\n isHome: boolean;\n /** The rendered Navbar floats (registered by the Navbar; the theme's `navbarPosition` until it has). */\n navbarFloating: boolean;\n /** The rendered Sidebar floats, and is a sidebar rather than a drawer: false below md and in stacked layouts. */\n sidebarFloating: boolean;\n /** Called by Sidebar and Navbar so the shell knows the chrome that is actually rendered. Returns the unregister. */\n registerChrome: (kind: \"navbar\" | \"sidebar\", position: ChromePosition) => () => void;\n /** True when the shell renders a Launcher above sm — PageContainer adjusts its bottom padding to clear the launcher. */\n hasLauncher: boolean;\n /** The bottom corner that launcher occupies (a ribbon occupies none), so the container reads that corner's inset variable. */\n launcherCorner: \"bottom-right\" | \"bottom-left\" | null;\n /** The shell renders an app footer under the page. Its children sit in a wrapper whose height is not definite, so a\n * `fill` SplitView reads `--ds-main-height` (published on the shell element) instead of `h-full`. */\n hasFooter: boolean;\n /** The flow this shell is in focus mode for (Sprint 25.7, C1), or null. The Navbar and PageHeader read it. */\n focus: AppShellFocus | null;\n /** A page inside the shell has unsaved changes (useUnsavedChanges): focus mode's Exit asks before it leaves. */\n hasUnsavedChanges: boolean;\n /** Set by useUnsavedChanges; not for pages to call. Returns the release. */\n addUnsavedChanges: () => () => void;\n /** The width every Drawer in the app takes when it is given none (Sprint 25.14 A24): AppShell's drawerWidth, 520 px by default. */\n drawerWidth: string;\n}\n\n/**\n * Focus mode (Sprint 25.7, C1): a task flow the user completes before or outside the app — setup, onboarding,\n * checkout, an import — renders in the same shell with the navigation taken away. The header keeps the logo and the\n * assistant, and its one way out is the exit control.\n */\nexport interface AppShellFocus {\n /**\n * `before-app`: a flow before the app (setup, onboarding). The exit control, \"Save and log out\", takes the user\n * menu's place. `in-app`: a flow inside the app (checkout, an import). \"Exit\" goes back to where the user came from,\n * asks first while the page has unsaved changes, and the user menu stays.\n */\n kind: \"before-app\" | \"in-app\";\n /** The exit control's label. Default \"Save and log out\" before the app, \"Exit\" inside it. */\n exitLabel?: string;\n /** What the exit control does: save and log out, or return to where the user came from. */\n onExit?: () => void;\n}\n\nconst AppShellContext = createContext<AppShellContextValue | null>(null);\n\nexport function useAppShell() {\n return useContext(AppShellContext);\n}\n\n/**\n * Tells the shell this page has unsaved changes, so focus mode's Exit asks before it leaves (Sprint 25.7, C1). Pass the\n * same `dirty` a Drawer takes; outside a shell it does nothing.\n */\nexport function useUnsavedChanges(dirty: boolean) {\n const add = useContext(AppShellContext)?.addUnsavedChanges;\n useEffect(() => {\n if (!dirty || !add) return;\n return add();\n }, [dirty, add]);\n}\n\ntype AppShellLayout = \"sidebar\" | \"stacked\" | \"sidebar-header\" | \"multi-column\";\n\ninterface AppShellProps {\n layout?: AppShellLayout;\n sidebar?: ReactNode;\n /** Content to render in the mobile drawer. For sidebar layouts, this is typically a Sidebar+SidebarNav. For header layouts, a MobileHeaderMenu. */\n mobileMenu?: ReactNode;\n /** Override drawer width for the mobile menu. Defaults to --ds-drawer-width. */\n mobileMenuWidth?: string;\n /** Use a lighter backdrop for the mobile menu drawer. */\n mobileMenuLightBackdrop?: boolean;\n /** Remove drawer padding and borders. Default true. Set false for compact overlays. */\n mobileMenuFlush?: boolean;\n navbar?: ReactNode;\n mobileNav?: ReactNode;\n /** Rendered below the page content inside the scrolling region and pinned to the bottom on short pages. Ignored when `scrollable` is false. */\n footer?: ReactNode;\n /** Render a SkipLink as the first focusable element (default true); it targets `mainId`. */\n skipLink?: boolean;\n /** The id of the <main> region the skip link jumps to. */\n mainId?: string;\n /** A docked AsidePanel rendered beside the content column: the page narrows to make room. Rendered at every width — the panel decides its own fallbacks. */\n aside?: ReactNode;\n /** Which side of the content the aside sits on. Default \"right\". Pass the same value to the AsidePanel. */\n asideSide?: \"right\" | \"left\";\n /**\n * A Launcher for the assistant. Rendered only above the sm breakpoint — a conditional render,\n * because the Launcher portals out of any wrapper — so on phones the Navbar button is the entry point\n * and it never collides with BottomNav.\n */\n launcher?: ReactNode;\n children: ReactNode;\n className?: string;\n /** When false, main area won't scroll — use for full-height layouts like ResizablePanelGroup. Default true. */\n scrollable?: boolean;\n /** The theme's shell-level decisions: what the generated shell passes once so pages carry nothing (Sprint 25). */\n theme?: AppShellTheme;\n /** The customer's UX preferences, passed once by the generated shell so pages and components carry nothing (Sprint 25.6). */\n preferences?: AppShellPreferences;\n /**\n * The width of every Drawer in the app that is given none (Sprint 25.14 A24): pages pass no width, so the app's\n * drawers share one. Default \"520px\". A Drawer's own width prop still wins, for a deliberate wide or narrow one.\n */\n drawerWidth?: string;\n /** The current route's path, so the shell knows which page is home. */\n currentPath?: string;\n /** The home page's path. Default \"/\". */\n homePath?: string;\n /**\n * Focus mode for a flow outside the navigation (setup, onboarding, checkout). The sidebar, mobile menu and bottom\n * nav are not rendered, and the Navbar drops its links and search; the logo, the assistant (its launcher and its\n * docked panel in the aside slot), the skip link, the theme, the preferences and the page spacing stay. The\n * generated layout passes it; a page never does.\n */\n focus?: AppShellFocus;\n}\n\nexport const AppShell = forwardRef<HTMLDivElement, AppShellProps>(function AppShell({\n layout = \"sidebar\",\n sidebar,\n mobileMenu,\n mobileMenuWidth,\n mobileMenuLightBackdrop,\n mobileMenuFlush = true,\n navbar,\n mobileNav,\n footer,\n skipLink = true,\n mainId = \"main\",\n aside,\n asideSide = \"right\",\n launcher,\n children,\n className,\n scrollable = true,\n theme,\n preferences,\n currentPath,\n homePath = \"/\",\n focus,\n drawerWidth = \"520px\",\n}, ref) {\n // gridsmith-ui needs React 19: say so before rendering anything React 18 cannot (the package says React 19 only)\n if (REACT_VERSION_PROBLEM) throw new Error(REACT_VERSION_PROBLEM);\n const [sidebarOpen, setSidebarOpen] = useState(false);\n const [asideOpen, setAsideOpen] = useState(false);\n const [asideFloating, setAsideFloating] = useState(false);\n const isMobile = useBreakpoint(\"md\");\n const isSmallMobile = useBreakpoint(\"sm\");\n const isTablet = isMobile && !isSmallMobile;\n // Sidebar tiers: expanded above lg, auto-rail between md and lg, drawer at or below md.\n // `userCollapsed` is null until the collapse button is used; from then on it wins.\n const autoCollapsed = useBreakpoint(\"lg\");\n const [userCollapsed, setUserCollapsed] = useState<boolean | null>(null);\n const sidebarCollapsed = userCollapsed ?? autoCollapsed;\n // Focus mode takes the navigation away: no sidebar, mobile menu or bottom nav, and the context says so. The aside\n // stays: in the generated shell it is the assistant's docked panel, and a flow keeps the assistant (D9).\n const inFocus = focus != null;\n const hasSidebar = !inFocus && (layout === \"sidebar\" || layout === \"sidebar-header\") && sidebar != null;\n const hasMobileMenu = !inFocus && mobileMenu != null;\n const hasMobileNav = !inFocus && mobileNav != null;\n const [unsavedCount, setUnsavedCount] = useState(0);\n const addUnsavedChanges = useCallback(() => {\n setUnsavedCount((n) => n + 1);\n let released = false;\n return () => { if (released) return; released = true; setUnsavedCount((n) => n - 1); };\n }, []);\n const showMobileDrawer = hasMobileMenu && !(isSmallMobile && hasMobileNav);\n const [shellEl, setShellEl] = useState<HTMLDivElement | null>(null);\n // The chrome that is actually rendered, reported by Sidebar and Navbar; the theme's positions until they report.\n const [chrome, setChrome] = useState<{ navbar?: ChromePosition; sidebar?: ChromePosition }>({});\n const registerChrome = useCallback((kind: \"navbar\" | \"sidebar\", position: ChromePosition) => {\n setChrome((c) => (c[kind] === position ? c : { ...c, [kind]: position }));\n return () => setChrome((c) => { if (!(kind in c)) return c; const next = { ...c }; delete next[kind]; return next; });\n }, []);\n const navbarFloating = (chrome.navbar ?? theme?.navbarPosition) === \"floating\";\n const sidebarFloating = hasSidebar && !isMobile && (chrome.sidebar ?? theme?.sidebarPosition) === \"floating\";\n const isHome = currentPath != null && currentPath === homePath;\n // With a footer the children wrapper is `min-h-full`, which gives a child no definite height to fill (C6): main's\n // height is published as --ds-main-height on the shell element for the fill SplitView. Written straight to the\n // element from a ResizeObserver; nothing re-renders.\n const hasFooter = footer != null && scrollable;\n const mainRef = useRef<HTMLElement | null>(null);\n useEffect(() => {\n const main = mainRef.current;\n if (!hasFooter || !shellEl || !main || typeof ResizeObserver === \"undefined\") { shellEl?.style.removeProperty(\"--ds-main-height\"); return; }\n const ro = new ResizeObserver(() => shellEl.style.setProperty(\"--ds-main-height\", `${main.clientHeight}px`));\n ro.observe(main);\n return () => { ro.disconnect(); shellEl.style.removeProperty(\"--ds-main-height\"); };\n }, [hasFooter, shellEl]);\n\n // C7: the launcher element says which corner it takes (Launcher's `edge`; a ribbon claims no corner).\n const hasLauncher = !!launcher && !isSmallMobile;\n const launcherProps = isValidElement(launcher) ? (launcher.props as { edge?: string; variant?: string }) : null;\n const launcherCorner: AppShellContextValue[\"launcherCorner\"] = !hasLauncher ? null\n : launcherProps?.variant === \"ribbon\" ? null\n : launcherProps?.edge === \"bottom-left\" ? \"bottom-left\"\n : launcherProps?.edge === \"right\" || launcherProps?.edge === \"left\" || launcherProps?.edge === \"bottom\" ? null\n : \"bottom-right\";\n\n return (\n <PreferencesContext value={preferences ?? null}>\n <DrawerWidthCtx value={drawerWidth}>\n <AppShellContext\n value={{ hasSidebar, hasMobileMenu, hasMobileNav, sidebarOpen, setSidebarOpen, isMobile, isTablet, sidebarCollapsed, setSidebarCollapsed: setUserCollapsed, asideOpen, setAsideOpen, asideSide, asideFloating, setAsideFloating, container: shellEl, theme: theme ?? null, isHome, navbarFloating, sidebarFloating, registerChrome, hasLauncher, launcherCorner, hasFooter, focus: focus ?? null, hasUnsavedChanges: unsavedCount > 0, addUnsavedChanges, drawerWidth }}\n >\n <div ref={(el) => {\n setShellEl(el);\n if (typeof ref === \"function\") ref(el);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = el;\n }} className={cn(\"relative h-screen flex flex-col bg-[var(--ds-bg-canvas)] overflow-hidden\", className)}>\n {skipLink && <SkipLink href={`#${mainId}`} />}\n {layout === \"sidebar-header\" && navbar}\n {layout === \"multi-column\" && navbar}\n\n <div className=\"flex flex-1 min-h-0\">\n {hasSidebar && !isMobile && (\n <div className=\"shrink-0 h-full\">\n {sidebar}\n </div>\n )}\n\n {/* A left-docked aside sits between the sidebar and the content. */}\n {aside && asideSide === \"left\" && aside}\n\n <div className=\"flex-1 flex flex-col min-w-0 min-h-0\">\n {layout === \"sidebar\" && navbar}\n {layout === \"stacked\" && navbar}\n\n <main\n ref={mainRef}\n id={mainId}\n tabIndex={-1} /* the skip link's target: focusable by script, never by Tab */\n className={cn(\n \"flex-1 min-h-0 focus:outline-none\",\n scrollable ? \"overflow-y-auto\" : \"relative\",\n layout === \"multi-column\" && \"flex\",\n )}\n style={{ containerType: \"inline-size\" }}\n >\n {scrollable ? (\n footer ? (\n <div className=\"min-h-full flex flex-col\">\n <div className=\"flex-1\">{children}</div>\n {footer}\n </div>\n ) : children\n ) : (\n <div className=\"absolute inset-0\">{children}</div>\n )}\n </main>\n </div>\n\n {/* The content column is flex-1 min-w-0, so it gives up width to the aside and <main>'s container query fires. */}\n {aside && asideSide === \"right\" && aside}\n </div>\n\n {showMobileDrawer && isMobile && (\n <Drawer\n open={sidebarOpen}\n onClose={() => setSidebarOpen(false)}\n position=\"left\"\n width={mobileMenuWidth ?? \"var(--ds-drawer-width)\"}\n container={shellEl ?? undefined}\n flush={mobileMenuFlush}\n lightBackdrop={mobileMenuLightBackdrop}\n topOffset={layout !== \"stacked\" && navbar != null ? \"var(--ds-navbar-height)\" : undefined}\n >\n {mobileMenu}\n </Drawer>\n )}\n\n {isSmallMobile && hasMobileNav && (\n <div className=\"sticky bottom-0 z-[var(--ds-z-sticky)]\">\n {mobileNav}\n </div>\n )}\n\n {/* Phone width: the Navbar button is the entry point; the launcher is not rendered at all. */}\n {!isSmallMobile && launcher}\n </div>\n </AppShellContext>\n </DrawerWidthCtx>\n </PreferencesContext>\n );\n});\n","import { useState, useCallback, useLayoutEffect, type RefObject } from \"react\";\nimport { readBreakpointPx, type BreakpointKey } from \"./use-breakpoint\";\n\n/**\n * True when the observed element is narrower than the breakpoint — a container\n * measurement, not the viewport, so a layout inside a sidebar shell or the\n * builder's canvas answers for the width it actually has. One implementation\n * for TableToolbar, SettingsLayout and the examples (Sprint 25.2).\n *\n * An unlaid-out element (tests, SSR) reports width 0 and is treated as not\n * compact; tests inject a width by overriding `offsetWidth`.\n */\nexport function useCompact(ref: RefObject<HTMLElement | null>, breakpoint: number | BreakpointKey, band = 0): boolean {\n const px = typeof breakpoint === \"number\" ? breakpoint : readBreakpointPx(breakpoint);\n const width = useElementWidth(ref);\n return useBelow(width, px, band);\n}\n\n/**\n * Whether a width is below a threshold, held across `band` px above it once it is (round 27 review): a layout whose\n * answer changes the width it measures — an aside that collapses removes a page scrollbar, which widens the layout\n * back over the threshold — otherwise flips on every frame at the edge (SplitView's aside toggled about 90 times in\n * 1.5 s with a 15 px scrollbar). The answer turns true below `threshold` and false again only at `threshold + band`.\n * A width of 0 (no layout yet) is never below.\n */\nexport function useBelow(width: number, threshold: number, band = 0): boolean {\n const [below, setBelow] = useState(false);\n const next = width > 0 && width < (below ? threshold + band : threshold);\n // render-time state adjustment: the answer is known now, so no frame paints the other one\n if (next !== below) setBelow(next);\n return next;\n}\n\n/** The element's laid-out width in px, kept current by a ResizeObserver; 0 until it has a layout (tests, SSR). */\nexport function useElementWidth(ref: RefObject<HTMLElement | null>): number {\n const [width, setWidth] = useState(0);\n const check = useCallback(() => {\n const next = ref.current?.offsetWidth ?? 0;\n if (next > 0) setWidth(next);\n }, [ref]);\n useLayoutEffect(() => {\n check();\n if (!ref.current || typeof ResizeObserver === \"undefined\") return;\n const observer = new ResizeObserver(check);\n observer.observe(ref.current);\n return () => observer.disconnect();\n }, [check, ref]);\n return width;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../showcase/src/lib/surface-context.ts"],"names":[],"mappings":";;;AAKO,IAAM,cAAA,GAAiB,cAAc,KAAK;AAM1C,IAAM,YAAA,GAAe,cAAc,KAAK;AAOxC,IAAM,YAAA,GAAe,cAAc,KAAK;AAWxC,IAAM,kBAAA,GAAqB,cAAsC,IAAI,CAAA;AAE5E,SAAS,gBAAgB,IAAA,EAA4B;AACnD,EAAA,MAAM,MAAA,GAAS,WAAW,kBAAkB,CAAA;AAC5C,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,IAAI,CAAC,MAAA,EAAQ;AACb,IAAA,MAAA,CAAO,MAAM,IAAI,CAAA;AACjB,IAAA,OAAO,MAAM,MAAA,CAAO,IAAA,EAAM,KAAK,CAAA;AAAA,EACjC,CAAA,EAAG,CAAC,MAAA,EAAQ,IAAI,CAAC,CAAA;AACnB;AAGO,SAAS,eAAA,GAAkB;AAChC,EAAA,eAAA,CAAgB,QAAQ,CAAA;AAC1B;AAGO,SAAS,gBAAA,GAAmB;AACjC,EAAA,eAAA,CAAgB,SAAS,CAAA;AAC3B;AAQO,SAAS,gBAAgB,EAAE,QAAA,EAAU,OAAO,KAAA,EAAO,MAAA,GAAS,MAAK,EAA6E;AACnJ,EAAA,OAAO,aAAA;AAAA,IAAc,cAAA;AAAA,IAAgB,EAAE,OAAO,KAAA,EAAM;AAAA,IAClD,aAAA;AAAA,MAAc,YAAA;AAAA,MAAc,EAAE,OAAO,IAAA,EAAK;AAAA,MACxC,aAAA;AAAA,QAAc,YAAA;AAAA,QAAc,EAAE,OAAO,KAAA,EAAM;AAAA,QACzC,cAAc,kBAAA,EAAoB,EAAE,KAAA,EAAO,MAAA,IAAU,QAAQ;AAAA;AAAC;AAAC,GAAC;AACxE","file":"chunk-CKWITUSH.js","sourcesContent":["import { createContext, createElement, useContext, useLayoutEffect, type ReactNode } from \"react\";\n\n/**\n * True inside a Card's surface. A StackedList reads it to inset its rows to the card's header (px-ds-5).\n */\nexport const CardSurfaceCtx = createContext(false);\n\n/**\n * True inside a SplitView pane (list, detail, aside). A StackedList reads it to take its inset from the pane\n * (Sprint 25.4 C-5): rows keep their padding so the selection rail sits at the pane's edge and never touches content.\n */\nexport const SplitPaneCtx = createContext(false);\n\n/**\n * True inside a Table or DataGrid card (the phone layout below mobileBreakpoint). An EntityCell reads it to keep\n * the avatar beside the text and align to the value column (Sprint 25.4, round 7: the stacked cell made the card\n * three lines taller than it needed to be).\n */\nexport const TableCardCtx = createContext(false);\n\n/**\n * Sprint 25.14 A44: what a SplitView's list pane holds, as its content reports it while mounted. \"framed\": content that\n * draws its own frame or cards (a KanbanBoard, a CardGrid, a Table, a DataGrid). \"scrolls\": content with no frame of its\n * own that scrolls inside the pane (a StackedList, a Gantt, a VirtualizedList), which the view's hairline frames. The\n * view drops its frame and surface when the pane holds framed content and nothing that scrolls (P32: no frame around\n * what frames itself; a hairline around what scrolls inside). Here, not in SplitView, so a board or a card grid never\n * imports the resizable panels. Null outside a list pane: overlays and the view's other panes reset it (SurfaceBoundary).\n */\nexport type SplitListReport = (kind: \"framed\" | \"scrolls\", present: boolean) => void;\nexport const SplitListFramerCtx = createContext<SplitListReport | null>(null);\n\nfunction useReportToList(kind: \"framed\" | \"scrolls\") {\n const report = useContext(SplitListFramerCtx);\n useLayoutEffect(() => {\n if (!report) return;\n report(kind, true);\n return () => report(kind, false);\n }, [report, kind]);\n}\n\n/** Tell a SplitView whose list pane this sits in that it draws its own frame or cards (A44). */\nexport function useFramesItself() {\n useReportToList(\"framed\");\n}\n\n/** Tell a SplitView whose list pane this sits in that it scrolls inside the pane with no frame of its own (A44). */\nexport function useScrollsInside() {\n useReportToList(\"scrolls\");\n}\n\n/**\n * Where content starts afresh: an overlay's body, an opened table row's panel, a SplitView's pane. What a Card, a pane\n * or a table card told the content around it stops here (the review of 30 September: a StackedList in a Drawer opened\n * from a Card took the card's inset, and one in a Dialog declared in a list pane the pane's, so neither lined up with\n * the overlay's gutter). A pane passes `pane` (its content is in a pane) and the list pane its `framer`.\n */\nexport function SurfaceBoundary({ children, pane = false, framer = null }: { children: ReactNode; pane?: boolean; framer?: SplitListReport | null }) {\n return createElement(CardSurfaceCtx, { value: false },\n createElement(SplitPaneCtx, { value: pane },\n createElement(TableCardCtx, { value: false },\n createElement(SplitListFramerCtx, { value: framer }, children))));\n}\n"]}
|