gridsmith-ui 0.31.1 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +78 -1
  2. package/README.md +4 -2
  3. package/dist/charts.d.ts +111 -31
  4. package/dist/charts.js +288 -148
  5. package/dist/charts.js.map +1 -1
  6. package/dist/chat.js +6 -6
  7. package/dist/{chunk-EZ3ZGFGA.js → chunk-2724SJO2.js} +12 -4
  8. package/dist/chunk-2724SJO2.js.map +1 -0
  9. package/dist/{chunk-I6JJ7KKP.js → chunk-6NRLTG5W.js} +16 -11
  10. package/dist/chunk-6NRLTG5W.js.map +1 -0
  11. package/dist/{chunk-BHTAVJIG.js → chunk-6XCWKLJZ.js} +41 -6
  12. package/dist/chunk-6XCWKLJZ.js.map +1 -0
  13. package/dist/{chunk-TH272DIC.js → chunk-AB4UQ4G5.js} +125 -235
  14. package/dist/chunk-AB4UQ4G5.js.map +1 -0
  15. package/dist/{chunk-IOHGE4EW.js → chunk-AVSP6NDX.js} +8 -8
  16. package/dist/chunk-AVSP6NDX.js.map +1 -0
  17. package/dist/chunk-F2XMZOUP.js +81 -0
  18. package/dist/chunk-F2XMZOUP.js.map +1 -0
  19. package/dist/{chunk-HQFTP7Y5.js → chunk-FF57N3P7.js} +10 -8
  20. package/dist/chunk-FF57N3P7.js.map +1 -0
  21. package/dist/chunk-GIA4BMGI.js +18 -0
  22. package/dist/chunk-GIA4BMGI.js.map +1 -0
  23. package/dist/{chunk-DR6WEI3A.js → chunk-HCEHTJ5E.js} +3 -3
  24. package/dist/{chunk-DR6WEI3A.js.map → chunk-HCEHTJ5E.js.map} +1 -1
  25. package/dist/{chunk-IZW5XHKA.js → chunk-OWGF362U.js} +10 -8
  26. package/dist/chunk-OWGF362U.js.map +1 -0
  27. package/dist/chunk-P3NUUIL6.js +9 -0
  28. package/dist/chunk-P3NUUIL6.js.map +1 -0
  29. package/dist/{chunk-W3GY5ROH.js → chunk-R2IAK3J3.js} +3 -3
  30. package/dist/{chunk-W3GY5ROH.js.map → chunk-R2IAK3J3.js.map} +1 -1
  31. package/dist/chunk-R7FG4ZQ5.js +16 -0
  32. package/dist/chunk-R7FG4ZQ5.js.map +1 -0
  33. package/dist/{chunk-V73LHNRL.js → chunk-RS624TD5.js} +29 -10
  34. package/dist/chunk-RS624TD5.js.map +1 -0
  35. package/dist/{chunk-DBHVJ7Z3.js → chunk-SS3C24IJ.js} +3 -2
  36. package/dist/chunk-SS3C24IJ.js.map +1 -0
  37. package/dist/{chunk-K3NAFQ4S.js → chunk-TMPPBXX3.js} +3 -3
  38. package/dist/{chunk-K3NAFQ4S.js.map → chunk-TMPPBXX3.js.map} +1 -1
  39. package/dist/{chunk-NDL2JGQ7.js → chunk-UBLBVCQN.js} +5 -5
  40. package/dist/{chunk-NDL2JGQ7.js.map → chunk-UBLBVCQN.js.map} +1 -1
  41. package/dist/{chunk-2TCCSKL3.js → chunk-WD6T57ZJ.js} +5 -5
  42. package/dist/{chunk-2TCCSKL3.js.map → chunk-WD6T57ZJ.js.map} +1 -1
  43. package/dist/{chunk-SLGGZ3MU.js → chunk-WSKPESAX.js} +12 -10
  44. package/dist/chunk-WSKPESAX.js.map +1 -0
  45. package/dist/chunk-ZQV26NND.js +213 -0
  46. package/dist/chunk-ZQV26NND.js.map +1 -0
  47. package/dist/dashboard.d.ts +207 -0
  48. package/dist/dashboard.js +1210 -0
  49. package/dist/dashboard.js.map +1 -0
  50. package/dist/data-grid.js +11 -10
  51. package/dist/data-grid.js.map +1 -1
  52. package/dist/editor-mentions.js +2 -2
  53. package/dist/editor.js +3 -2
  54. package/dist/editor.js.map +1 -1
  55. package/dist/index.d.ts +94 -12
  56. package/dist/index.js +601 -316
  57. package/dist/index.js.map +1 -1
  58. package/dist/kanban.js +9 -9
  59. package/dist/resizable.d.ts +11 -2
  60. package/dist/resizable.js +97 -22
  61. package/dist/resizable.js.map +1 -1
  62. package/dist/roots.css +2 -2
  63. package/dist/tokens.css +6 -6
  64. package/dist/utils.d.ts +51 -1
  65. package/dist/utils.js +55 -4
  66. package/dist/utils.js.map +1 -1
  67. package/dist/virtualized.js +9 -8
  68. package/dist/virtualized.js.map +1 -1
  69. package/dist-static/tokens.css +6 -6
  70. package/package.json +6 -1
  71. package/dist/chunk-BHTAVJIG.js.map +0 -1
  72. package/dist/chunk-DBHVJ7Z3.js.map +0 -1
  73. package/dist/chunk-EZ3ZGFGA.js.map +0 -1
  74. package/dist/chunk-HQFTP7Y5.js.map +0 -1
  75. package/dist/chunk-I6JJ7KKP.js.map +0 -1
  76. package/dist/chunk-IOHGE4EW.js.map +0 -1
  77. package/dist/chunk-IZW5XHKA.js.map +0 -1
  78. package/dist/chunk-KSJTMSYA.js +0 -71
  79. package/dist/chunk-KSJTMSYA.js.map +0 -1
  80. package/dist/chunk-LJYSVZMI.js +0 -25
  81. package/dist/chunk-LJYSVZMI.js.map +0 -1
  82. package/dist/chunk-SLGGZ3MU.js.map +0 -1
  83. package/dist/chunk-TH272DIC.js.map +0 -1
  84. package/dist/chunk-V73LHNRL.js.map +0 -1
package/dist/kanban.js CHANGED
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import { DropdownMenu } from './chunk-2TCCSKL3.js';
3
- import { useFillHeight, FillContext } from './chunk-DBHVJ7Z3.js';
4
- import { Badge } from './chunk-SLGGZ3MU.js';
5
- import { useKeyboardScroll } from './chunk-KSJTMSYA.js';
6
- import { useFramesItself } from './chunk-V73LHNRL.js';
7
- import { Button } from './chunk-HQFTP7Y5.js';
2
+ import { useFramesItself } from './chunk-RS624TD5.js';
3
+ import { Badge } from './chunk-WSKPESAX.js';
4
+ import { useTextOverflow } from './chunk-R2IAK3J3.js';
5
+ import { DropdownMenu } from './chunk-WD6T57ZJ.js';
6
+ import { useFillHeight, FillContext } from './chunk-SS3C24IJ.js';
7
+ import { Button } from './chunk-FF57N3P7.js';
8
8
  import './chunk-ZHUVLBCC.js';
9
9
  import './chunk-7RKC5C7G.js';
10
- import { useTextOverflow } from './chunk-W3GY5ROH.js';
11
- import { useRevealFocus, AutoTooltip } from './chunk-DR6WEI3A.js';
10
+ import { useKeyboardScroll } from './chunk-F2XMZOUP.js';
11
+ import { useRevealFocus, AutoTooltip } from './chunk-HCEHTJ5E.js';
12
12
  import { Icon } from './chunk-53F7GVBQ.js';
13
- import { cn, FOCUS_INSET, FOCUS_RING } from './chunk-EZ3ZGFGA.js';
13
+ import { cn, FOCUS_INSET, FOCUS_RING } from './chunk-2724SJO2.js';
14
14
  import { useState, useRef, useLayoutEffect, useMemo, useCallback, useContext } from 'react';
15
15
  import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCorners, DragOverlay, useDroppable } from '@dnd-kit/core';
16
16
  import { sortableKeyboardCoordinates, SortableContext, verticalListSortingStrategy, useSortable, arrayMove } from '@dnd-kit/sortable';
@@ -42,8 +42,17 @@ type SplitViewFrame = "fill" | "page";
42
42
  interface SplitViewProps {
43
43
  /** The list (an inbox, a queue): it scrolls on its own. */
44
44
  list: ReactNode;
45
- /** The selected item (a thread, a record): it fills the height and scrolls on its own. */
45
+ /**
46
+ * The selected item (a thread, a record): it fills the height and scrolls on its own. The pane insets it at the page's
47
+ * gutter, so pass content with no padding classes; a SectionHeading variant="pane" placed first is the item's header,
48
+ * inset once, its rule reaching the pane's edges (Sprint 25.33 C1).
49
+ */
46
50
  detail: ReactNode;
51
+ /**
52
+ * The detail is one full-bleed piece that runs to the pane's edges and owns its inset: a conversation with its header,
53
+ * its own scroller and its composer, a preview, an editor. The pane then adds no inset of its own (Sprint 25.33 C1).
54
+ */
55
+ detailFlush?: boolean;
47
56
  /** 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`. */
48
57
  aside?: ReactNode;
49
58
  /** Names the aside's toggle and Drawer. */
@@ -112,6 +121,6 @@ interface SplitViewProps {
112
121
  * The page owns the selection and assembles the contents; keyboard movement
113
122
  * through the list is the list's job (StackedList selectedId).
114
123
  */
115
- declare function SplitView({ list, detail, aside, asideTitle, detailOpen, onDetailClose, detailMode, closedDetail, closeLabel, backLabel, detailPath, listWidth, listMinWidth, asideWidth, collapseBelow, asideCollapseBelow, detailMinWidth, bordered, frame, "aria-label": ariaLabel, className, }: SplitViewProps): react_jsx_runtime.JSX.Element;
124
+ declare function SplitView({ list, detail, detailFlush, aside, asideTitle, detailOpen, onDetailClose, detailMode, closedDetail, closeLabel, backLabel, detailPath, listWidth, listMinWidth, asideWidth, collapseBelow, asideCollapseBelow, detailMinWidth, bordered, frame, "aria-label": ariaLabel, className, }: SplitViewProps): react_jsx_runtime.JSX.Element;
116
125
 
117
126
  export { ResizableHandle, ResizablePanel, ResizablePanelGroup, SplitView, type SplitViewFrame, type SplitViewProps };
package/dist/resizable.js CHANGED
@@ -1,18 +1,19 @@
1
1
  "use client";
2
- import { useCompact, useElementWidth, useBelow, crumbGoes, useAppShell, Breadcrumbs, Drawer } from './chunk-TH272DIC.js';
3
- import { useFillHeight, FillContext } from './chunk-DBHVJ7Z3.js';
4
- import { useKeyboardScroll } from './chunk-KSJTMSYA.js';
2
+ import { crumbGoes, useAppShell, useBulkBarHost, BulkBarHostCtx, BulkBarSpacer, Breadcrumbs, Drawer, bulkBarRoom, BULK_BAR_LAYER } from './chunk-AB4UQ4G5.js';
5
3
  import './chunk-QOMP4D6V.js';
6
4
  import './chunk-7QLXYRPD.js';
5
+ import { PANE_INSET, SurfaceBoundary } from './chunk-RS624TD5.js';
6
+ import './chunk-R2IAK3J3.js';
7
+ import { useCompact, useElementWidth, useBelow } from './chunk-ZQV26NND.js';
7
8
  import './chunk-72SDAX54.js';
8
- import { SurfaceBoundary } from './chunk-V73LHNRL.js';
9
- import { Button } from './chunk-HQFTP7Y5.js';
9
+ import { useFillHeight, FillContext } from './chunk-SS3C24IJ.js';
10
+ import { Button } from './chunk-FF57N3P7.js';
10
11
  import { useBreakpoint } from './chunk-ZHUVLBCC.js';
11
12
  import './chunk-7RKC5C7G.js';
12
- import './chunk-W3GY5ROH.js';
13
- import './chunk-DR6WEI3A.js';
13
+ import { useKeyboardScroll } from './chunk-F2XMZOUP.js';
14
+ import './chunk-HCEHTJ5E.js';
14
15
  import { Icon, warnOnce } from './chunk-53F7GVBQ.js';
15
- import { cn, GROUP_FOCUS_RING, isTabStop, tabStops, rememberFocus, FOCUS_INSET } from './chunk-EZ3ZGFGA.js';
16
+ import { cn, GROUP_FOCUS_RING, isTabStop, tabStops, rememberFocus, FOCUS_INSET } from './chunk-2724SJO2.js';
16
17
  import { Group, Panel, Separator } from 'react-resizable-panels';
17
18
  import { createContext, useContext, useRef, useState, useCallback, useEffect, useLayoutEffect } from 'react';
18
19
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -146,9 +147,55 @@ function ResizableHandle({
146
147
  );
147
148
  }
148
149
  var THRESHOLD_BAND = 17;
150
+ var paneScroll = (inset) => cn("min-h-0 overflow-y-auto scroll-p-[4px]", inset);
151
+ var clear = (colour) => colour === "transparent" || /^rgba\(.*,\s*0\)$/.test(colour);
152
+ function drawsOrClips(el) {
153
+ const cs = getComputedStyle(el);
154
+ if (cs.display === "contents") return false;
155
+ const edge = (width, style) => parseFloat(width) > 0 && style !== "none" && style !== "hidden";
156
+ return edge(cs.borderLeftWidth, cs.borderLeftStyle) || edge(cs.borderRightWidth, cs.borderRightStyle) || edge(cs.borderTopWidth, cs.borderTopStyle) || edge(cs.borderBottomWidth, cs.borderBottomStyle) || cs.backgroundImage !== "none" || !clear(cs.backgroundColor) || cs.boxShadow !== "none" || cs.overflowX !== "visible";
157
+ }
158
+ function pageBleed(parent, column) {
159
+ for (let el = parent; el && el !== column; el = el.parentElement) if (drawsOrClips(el)) return null;
160
+ const cs = getComputedStyle(column);
161
+ const left = parseFloat(cs.paddingLeft) || 0;
162
+ const right = parseFloat(cs.paddingRight) || 0;
163
+ if (left + right === 0) return null;
164
+ if (parent !== column) {
165
+ const p = parent.getBoundingClientRect();
166
+ const c = column.getBoundingClientRect();
167
+ const start = c.left + column.clientLeft + left;
168
+ const end = c.left + column.clientLeft + column.clientWidth - right;
169
+ if (Math.abs(p.left - start) > 1 || Math.abs(p.right - end) > 1) return null;
170
+ }
171
+ return { left, right };
172
+ }
173
+ function usePageBleed(ref, on) {
174
+ const [bleed, setBleed] = useState(null);
175
+ useLayoutEffect(() => {
176
+ const parent = ref.current?.parentElement;
177
+ const column = parent?.closest("[data-page-column]");
178
+ if (!on || !parent || !column) {
179
+ setBleed(null);
180
+ return;
181
+ }
182
+ const measure = () => {
183
+ const next = pageBleed(parent, column);
184
+ setBleed((prev) => prev?.left === next?.left && prev?.right === next?.right ? prev : next);
185
+ };
186
+ measure();
187
+ if (typeof ResizeObserver === "undefined") return;
188
+ const observer = new ResizeObserver(measure);
189
+ observer.observe(column);
190
+ observer.observe(parent);
191
+ return () => observer.disconnect();
192
+ }, [ref, on]);
193
+ return on ? bleed : null;
194
+ }
149
195
  function SplitView({
150
196
  list,
151
197
  detail,
198
+ detailFlush = false,
152
199
  aside,
153
200
  asideTitle = "Details",
154
201
  detailOpen = false,
@@ -188,13 +235,18 @@ function SplitView({
188
235
  const region = ariaLabel ? { role: "region", "aria-label": ariaLabel } : {};
189
236
  const path = detailPath && detailPath.length > 0 ? detailPath.map((crumb, i) => i === detailPath.length - 1 && !crumbGoes(crumb) && onDetailClose ? { ...crumb, onClick: onDetailClose } : crumb) : null;
190
237
  const isFill = frame === "fill";
191
- const listHolds = useRef({ framed: 0, scrolls: 0 });
238
+ const listHolds = useRef({ framed: 0, scrolls: 0, edge: 0, inset: 0 });
192
239
  const [framesItself, setFramesItself] = useState(false);
240
+ const [listFlush, setListFlush] = useState(false);
193
241
  const reportToList = useCallback((kind, present) => {
194
242
  const held = listHolds.current;
195
243
  held[kind] = Math.max(0, held[kind] + (present ? 1 : -1));
244
+ if (held.framed === 0 && held.scrolls === 0 && held.edge === 0 && held.inset === 0) return;
196
245
  setFramesItself(held.framed > 0 && held.scrolls === 0);
246
+ setListFlush(held.framed > 0 || held.edge > 0);
197
247
  }, []);
248
+ const listInset = listFlush ? void 0 : PANE_INSET.list;
249
+ const detailInset = detailFlush ? void 0 : PANE_INSET.detail;
198
250
  const onCanvas = isFill || framesItself;
199
251
  const shell = useAppShell();
200
252
  const pageFill = useFillHeight(rootRef, !isFill);
@@ -231,6 +283,11 @@ function SplitView({
231
283
  useKeyboardScroll(stackedListScroll, listName, compact);
232
284
  useKeyboardScroll(stackedDetailScroll, itemName, compact, true);
233
285
  const fillStyle = isFill && shell?.hasFooter ? { height: "var(--ds-main-height, 100%)" } : pageFill != null ? { height: pageFill } : void 0;
286
+ const phone = useBreakpoint("sm");
287
+ const bleed = usePageBleed(rootRef, phone && !isFill);
288
+ const reach = bleed && (!onCanvas || detailOnPhone) ? bleed : null;
289
+ const squared = reach ? { borderLeftWidth: 0, borderRightWidth: 0, borderRadius: 0 } : void 0;
290
+ const rootStyle = reach ? { ...fillStyle, ...squared, marginLeft: -reach.left, marginRight: -reach.right, width: `calc(100% + ${reach.left + reach.right}px)` } : fillStyle;
234
291
  const itemSurface = !onCanvas ? void 0 : isFill ? "bg-[var(--ds-bg-surface)]" : 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)]");
235
292
  const surface = cn(
236
293
  "h-full min-h-0 w-full",
@@ -239,8 +296,18 @@ function SplitView({
239
296
  bordered && !onCanvas && "border-[length:var(--ds-border-width)] border-[var(--ds-border-subtle)] rounded-[var(--ds-radius-md)] overflow-hidden",
240
297
  className
241
298
  );
242
- const listContent = /* @__PURE__ */ jsx(SurfaceBoundary, { pane: "list", framer: reportToList, children: list });
243
- const detailContent = /* @__PURE__ */ jsx(SurfaceBoundary, { pane: "detail", children: detail });
299
+ const listBar = useBulkBarHost();
300
+ const detailBar = useBulkBarHost();
301
+ const barRoom = (room) => room ? { scrollPaddingBottom: bulkBarRoom(room) } : void 0;
302
+ const listContent = /* @__PURE__ */ jsxs(Fragment, { children: [
303
+ /* @__PURE__ */ jsx(BulkBarHostCtx, { value: listBar.value, children: /* @__PURE__ */ jsx(SurfaceBoundary, { pane: "list", framer: reportToList, padded: !listFlush, children: list }) }),
304
+ /* @__PURE__ */ jsx(BulkBarSpacer, { room: listBar.room })
305
+ ] });
306
+ const detailContent = /* @__PURE__ */ jsxs(Fragment, { children: [
307
+ /* @__PURE__ */ jsx(BulkBarHostCtx, { value: detailBar.value, children: /* @__PURE__ */ jsx(SurfaceBoundary, { pane: "detail", padded: !detailFlush, children: detail }) }),
308
+ /* @__PURE__ */ jsx(BulkBarSpacer, { room: detailBar.room })
309
+ ] });
310
+ const barLayer = (bar) => /* @__PURE__ */ jsx("div", { ref: bar.setLayer, "data-bulk-bar-layer": "", className: BULK_BAR_LAYER });
244
311
  const [listPct, setListPct] = useState(listWidth);
245
312
  const paneRef = useRef(null);
246
313
  const shown = useRef(null);
@@ -276,24 +343,28 @@ function SplitView({
276
343
  if (compact) {
277
344
  const showDetail2 = detailOnPhone;
278
345
  const phoneAside = showDetail2 && !!aside;
279
- return /* @__PURE__ */ jsx(FillContext, { value: true, children: /* @__PURE__ */ jsxs("div", { ref: rootRef, "data-split-view": showDetail2 ? "detail" : "list", "data-frame": frame, "data-fill": pageFill != null ? "" : void 0, ...region, className: cn(surface, "flex flex-col"), style: fillStyle, children: [
280
- showDetail2 && /* @__PURE__ */ jsxs("div", { className: cn("flex-1 min-h-0 flex flex-col", itemSurface), children: [
346
+ return /* @__PURE__ */ jsx(FillContext, { value: true, children: /* @__PURE__ */ jsxs("div", { ref: rootRef, "data-split-view": showDetail2 ? "detail" : "list", "data-frame": frame, "data-fill": pageFill != null ? "" : void 0, "data-edge-to-edge": reach ? "" : void 0, ...region, className: cn(surface, "relative flex flex-col"), style: rootStyle, children: [
347
+ showDetail2 && /* @__PURE__ */ jsxs("div", { className: cn("relative flex-1 min-h-0 flex flex-col", itemSurface), style: itemSurface ? squared : void 0, children: [
281
348
  /* @__PURE__ */ jsxs("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"), children: [
282
349
  path ? /* @__PURE__ */ jsx(Breadcrumbs, { items: path, maxItems: 3, "aria-label": "Path", className: "min-w-0" }) : /* @__PURE__ */ jsx(Button, { type: "button", variant: "link", size: "sm", iconLeft: /* @__PURE__ */ jsx(Icon, { name: "arrow-left", size: 14 }), onClick: onDetailClose ?? (() => setListShown(true)), children: backLabel }),
283
350
  phoneAside && /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "sm", iconLeft: /* @__PURE__ */ jsx(Icon, { name: "info", size: 14 }), onClick: () => setAsideWantsOpen(true), "aria-expanded": asideWantsOpen, children: asideTitle })
284
351
  ] }),
285
- /* @__PURE__ */ jsx("div", { ref: setStackedDetailScroll, className: cn("flex-1 min-h-0 overflow-y-auto scroll-p-[4px]", FOCUS_INSET), children: detailContent })
352
+ /* @__PURE__ */ jsx("div", { ref: setStackedDetailScroll, "data-pane-scroll": "detail", className: cn("flex-1", paneScroll(detailInset), FOCUS_INSET), style: barRoom(detailBar.room), children: detailContent }),
353
+ barLayer(detailBar)
286
354
  ] }),
287
355
  /* @__PURE__ */ jsx(
288
356
  "div",
289
357
  {
290
358
  ref: setStackedListScroll,
291
- className: cn("flex-1 min-h-0 overflow-y-auto scroll-p-[4px]", FOCUS_INSET),
359
+ "data-pane-scroll": "list",
360
+ className: cn("flex-1", paneScroll(listInset), FOCUS_INSET),
292
361
  hidden: showDetail2 || void 0,
362
+ style: barRoom(listBar.room),
293
363
  onClickCapture: onDetailClose ? void 0 : () => setListShown(false),
294
364
  children: listContent
295
365
  }
296
366
  ),
367
+ !showDetail2 && barLayer(listBar),
297
368
  phoneAside && /* @__PURE__ */ jsx(Drawer, { open: asideWantsOpen, onClose: () => setAsideWantsOpen(false), title: asideTitle, position: "right", children: aside })
298
369
  ] }) });
299
370
  }
@@ -307,7 +378,7 @@ function SplitView({
307
378
  ] })
308
379
  ] }) : null;
309
380
  const showDetail = !hiding || detailOpen;
310
- return /* @__PURE__ */ jsx(FillContext, { value: true, children: /* @__PURE__ */ jsxs("div", { ref: rootRef, "data-split-view": hiding && !detailOpen ? "list" : "split", "data-frame": frame, "data-fill": pageFill != null ? "" : void 0, ...region, className: surface, style: fillStyle, children: [
381
+ return /* @__PURE__ */ jsx(FillContext, { value: true, children: /* @__PURE__ */ jsxs("div", { ref: rootRef, "data-split-view": hiding && !detailOpen ? "list" : "split", "data-frame": frame, "data-fill": pageFill != null ? "" : void 0, "data-edge-to-edge": reach ? "" : void 0, ...region, className: surface, style: rootStyle, children: [
311
382
  /* @__PURE__ */ jsxs(
312
383
  ResizablePanelGroup,
313
384
  {
@@ -319,19 +390,23 @@ function SplitView({
319
390
  if (hiding && layout.detail != null && layout.list != null) setListPct(layout.list);
320
391
  },
321
392
  children: [
322
- /* @__PURE__ */ jsx(ResizablePanel, { id: "list", defaultSize: `${hiding ? detailOpen ? listPct : 100 : listWidth}%`, minSize: `${listMinWidth}%`, children: /* @__PURE__ */ jsx("div", { ref: setListScroll, "data-pane": "list", className: cn("h-full min-h-0 overflow-y-auto scroll-p-[4px]", FOCUS_INSET), onFocus: hiding ? (e) => {
323
- lastInList.current = e.target;
324
- } : void 0, children: listContent }) }),
393
+ /* @__PURE__ */ jsxs(ResizablePanel, { id: "list", className: "relative", defaultSize: `${hiding ? detailOpen ? listPct : 100 : listWidth}%`, minSize: `${listMinWidth}%`, children: [
394
+ /* @__PURE__ */ jsx("div", { ref: setListScroll, "data-pane": "list", "data-pane-scroll": "list", className: cn("h-full", paneScroll(listInset), FOCUS_INSET), style: barRoom(listBar.room), onFocus: hiding ? (e) => {
395
+ lastInList.current = e.target;
396
+ } : void 0, children: listContent }),
397
+ barLayer(listBar)
398
+ ] }),
325
399
  showDetail && /* @__PURE__ */ jsxs(Fragment, { children: [
326
400
  /* @__PURE__ */ jsx(ResizableHandle, { withHandle: true }),
327
- /* @__PURE__ */ jsx(ResizablePanel, { id: "detail", minSize: "30%", children: /* @__PURE__ */ jsxs("div", { ref: paneRef, "data-pane": "detail", className: cn("h-full min-h-0 flex flex-col", itemSurface), onKeyDown: hiding ? onPaneKeyDown : void 0, children: [
401
+ /* @__PURE__ */ jsx(ResizablePanel, { id: "detail", minSize: "30%", children: /* @__PURE__ */ jsxs("div", { ref: paneRef, "data-pane": "detail", className: cn("relative h-full min-h-0 flex flex-col", itemSurface), onKeyDown: hiding ? onPaneKeyDown : void 0, children: [
328
402
  paneBar,
329
- /* @__PURE__ */ jsx("div", { ref: setDetailScroll, className: cn("flex-1 min-h-0 overflow-y-auto scroll-p-[4px]", FOCUS_INSET), children: detailContent })
403
+ /* @__PURE__ */ jsx("div", { ref: setDetailScroll, "data-pane-scroll": "detail", className: cn("flex-1", paneScroll(detailInset), FOCUS_INSET), style: barRoom(detailBar.room), children: detailContent }),
404
+ barLayer(detailBar)
330
405
  ] }) })
331
406
  ] }),
332
407
  showAside && !asideCollapsed && /* @__PURE__ */ jsxs(Fragment, { children: [
333
408
  /* @__PURE__ */ jsx(ResizableHandle, { withHandle: true }),
334
- /* @__PURE__ */ jsx(ResizablePanel, { id: "aside", defaultSize: `${asideWidth}%`, minSize: "15%", children: /* @__PURE__ */ jsx("div", { ref: setAsideScroll, "data-pane": "aside", className: cn("h-full min-h-0 overflow-y-auto py-ds-5 px-[var(--ds-page-gutter)] scroll-p-[4px]", itemSurface, FOCUS_INSET), children: /* @__PURE__ */ jsx(SurfaceBoundary, { pane: "aside", children: aside }) }) })
409
+ /* @__PURE__ */ jsx(ResizablePanel, { id: "aside", defaultSize: `${asideWidth}%`, minSize: "15%", children: /* @__PURE__ */ jsx("div", { ref: setAsideScroll, "data-pane": "aside", "data-pane-scroll": "aside", className: cn("h-full", paneScroll(PANE_INSET.detail), itemSurface, FOCUS_INSET), children: /* @__PURE__ */ jsx(SurfaceBoundary, { pane: "aside", children: aside }) }) })
335
410
  ] })
336
411
  ]
337
412
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../showcase/src/components/ResizablePanels.tsx","../../../showcase/src/components/SplitView.tsx"],"names":["PanelGroup","PanelResizeHandle","useRef","useLayoutEffect","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,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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,kFAAA,EAAoF,aAAa,WAAW,CAAA,EAAG,QAAA,kBAAAA,GAAAA,CAAC,eAAA,EAAA,EAAgB,IAAA,EAAK,OAAA,EAAS,QAAA,EAAA,KAAA,EAAM,GAAkB,CAAA,EAClO;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, GROUP_FOCUS_RING } 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 // the grip is kept in view whenever it can show: always with withHandle, and on keyboard focus without it\n useGripInView(gripRef, !isVertical);\n\n return (\n <PanelResizeHandle\n className={cn(\n // a group: its keyboard focus is drawn round its grip (Sprint 30), as a full-length line's outline would be cut off\n // at both its ends by the panels it divides; the line itself shows no outline of its own\n \"group relative flex items-center justify-center bg-[var(--ds-border-default)] outline-none\",\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 \"[&[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 {/* the grip: always with withHandle; without it, shown while the handle has keyboard focus, to carry its outline */}\n <div\n ref={gripRef}\n aria-hidden=\"true\"\n className={cn(\n \"z-10 items-center justify-center rounded-[var(--ds-radius-sm)]\",\n withHandle ? \"flex\" : \"hidden group-focus-visible:flex\",\n GROUP_FOCUS_RING,\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 </PanelResizeHandle>\n );\n}\n","import { useCallback, useEffect, useLayoutEffect, useRef, useState, type KeyboardEvent, type ReactNode } from \"react\";\nimport { cn, FOCUS_INSET } 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 { useKeyboardScroll } from \"../lib/use-keyboard-scroll\";\nimport { warnOnce } from \"../lib/dev-warn\";\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 // Sprint 25.29 item 16: with `detailOpen` and no `onDetailClose`, the phone's Back couldn't work, and a page that keeps\n // its detail open stranded a phone user away from the list (run 79's folder tree). Without the handler the view keeps\n // its own \"showing the list\" on phones, so Back works, and a press in the list shows the detail again; with it, the\n // page decides, as before.\n const [listShown, setListShown] = useState(false);\n if (listShown && (onDetailClose || !detailOpen || !compact)) setListShown(false);\n useEffect(() => {\n if (detailOpen && !onDetailClose && detailMode === \"stack\") {\n warnOnce(\"SplitView\", \"detailOpen is set without onDetailClose: below the collapse width, Back can only show the list again, and the page never hears of it. Pass onDetailClose to close the detail.\");\n }\n }, [detailOpen, onDetailClose, detailMode]);\n // On a phone, the detail giving way to the list (Back, the page's or the view's own) leaves focus on the list's chosen\n // item, else its first control, never on the page\n const detailOnPhone = compact && detailMode === \"stack\" && detailOpen && !listShown;\n const wasDetailOnPhone = useRef(detailOnPhone);\n useLayoutEffect(() => {\n const was = wasDetailOnPhone.current;\n wasDetailOnPhone.current = detailOnPhone;\n if (!was || detailOnPhone) return;\n const active = document.activeElement;\n if (active && active !== document.body && active.isConnected) return;\n const pane = stackedListScroll;\n const chosen = pane?.querySelector<HTMLElement>('[aria-current=\"true\"], [aria-current=\"page\"], [aria-selected=\"true\"]');\n const target = (chosen && (isTabStop(chosen) ? chosen : tabStops(chosen)[0])) || (pane ? tabStops(pane)[0] : undefined);\n (target ?? pane)?.focus();\n });\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 = detailOnPhone;\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 // a link, alone at the start of the header (Sprint 25.19 G4, page_composition#51): its words line up with the header's edge\n : <Button type=\"button\" variant=\"link\" size=\"sm\" iconLeft={<Icon name=\"arrow-left\" size={14} />} onClick={onDetailClose ?? (() => setListShown(true))}>{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 scroll-p-[4px]\", 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 scroll-p-[4px]\", FOCUS_INSET)} hidden={showDetail || undefined}\n onClickCapture={onDetailClose ? undefined : () => setListShown(false)}>{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 {/* scroll padding: what the keyboard reaches comes into view with room for its outline (Sprint 30, P3); a list's\n rows run to the pane's edges and draw their outline inside (StackedList) */}\n <div ref={setListScroll} data-pane=\"list\" className={cn(\"h-full min-h-0 overflow-y-auto scroll-p-[4px]\", 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 scroll-p-[4px]\", 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)] scroll-p-[4px]\", 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"]}
1
+ {"version":3,"sources":["../../../showcase/src/components/ResizablePanels.tsx","../../../showcase/src/components/SplitView.tsx"],"names":["PanelGroup","PanelResizeHandle","useLayoutEffect","useRef","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,S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W,CAAA,EAAG,WAAW,CAAA,EAAG,KAAA,EAAO,QAAQ,SAAA,CAAU,IAAI,GAAI,QAAA,EAAA,aAAA,EAAc,CAAA;AAAA,cAClK,SAAS,SAAS;AAAA,aAAA,EACrB,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,aAAa,CAAA,EAAG,UAAU,CAAA,CAAA,CAAA,EAAK,OAAA,EAAQ,OAEhE,QAAA,kBAAAA,GAAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAK,gBAAgB,WAAA,EAAU,OAAA,EAAQ,kBAAA,EAAiB,OAAA,EAAQ,WAAW,EAAA,CAAG,QAAA,EAAU,UAAA,CAAW,UAAA,CAAW,MAAM,CAAA,EAAG,WAAA,EAAa,WAAW,CAAA,EAAG,0BAAAA,GAAAA,CAAC,eAAA,EAAA,EAAgB,MAAK,OAAA,EAAS,QAAA,EAAA,KAAA,EAAM,GAAkB,CAAA,EAChN;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, GROUP_FOCUS_RING } 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 // the grip is kept in view whenever it can show: always with withHandle, and on keyboard focus without it\n useGripInView(gripRef, !isVertical);\n\n return (\n <PanelResizeHandle\n className={cn(\n // a group: its keyboard focus is drawn round its grip (Sprint 30), as a full-length line's outline would be cut off\n // at both its ends by the panels it divides; the line itself shows no outline of its own\n \"group relative flex items-center justify-center bg-[var(--ds-border-default)] outline-none\",\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 \"[&[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 {/* the grip: always with withHandle; without it, shown while the handle has keyboard focus, to carry its outline */}\n <div\n ref={gripRef}\n aria-hidden=\"true\"\n className={cn(\n \"z-10 items-center justify-center rounded-[var(--ds-radius-sm)]\",\n withHandle ? \"flex\" : \"hidden group-focus-visible:flex\",\n GROUP_FOCUS_RING,\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 </PanelResizeHandle>\n );\n}\n","import { useCallback, useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type KeyboardEvent, type ReactNode, type RefObject } from \"react\";\nimport { cn, FOCUS_INSET } from \"../lib/utils\";\nimport { useBelow, useCompact, useElementWidth } from \"../lib/use-compact\";\nimport { useBreakpoint } from \"../lib/use-breakpoint\";\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 { PANE_INSET, 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 { BulkBarHostCtx, BulkBarSpacer, useBulkBarHost, BULK_BAR_LAYER, bulkBarRoom } from \"../lib/bulk-bar-host\";\nimport { useKeyboardScroll } from \"../lib/use-keyboard-scroll\";\nimport { warnOnce } from \"../lib/dev-warn\";\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\n/**\n * A pane's scroller, with the pane's inset (C1): what the keyboard reaches comes into view with room for its outline (Sprint\n * 30, P3). Each scroller adds FOCUS_INSET on its own tag, as every element given to useKeyboardScroll does.\n */\nconst paneScroll = (inset?: string) => cn(\"min-h-0 overflow-y-auto scroll-p-[4px]\", inset);\n\n/** How far a view reaches past the page's gutter on each side, in px (C3). */\ninterface Bleed { left: number; right: number }\n\nconst clear = (colour: string) => colour === \"transparent\" || /^rgba\\(.*,\\s*0\\)$/.test(colour);\n\n/** Whether an element draws something of its own (an edge, a fill, a shadow) or clips what reaches past it. */\nfunction drawsOrClips(el: HTMLElement): boolean {\n const cs = getComputedStyle(el);\n if (cs.display === \"contents\") return false;\n const edge = (width: string, style: string) => parseFloat(width) > 0 && style !== \"none\" && style !== \"hidden\";\n return edge(cs.borderLeftWidth, cs.borderLeftStyle) || edge(cs.borderRightWidth, cs.borderRightStyle)\n || edge(cs.borderTopWidth, cs.borderTopStyle) || edge(cs.borderBottomWidth, cs.borderBottomStyle)\n || cs.backgroundImage !== \"none\" || !clear(cs.backgroundColor) || cs.boxShadow !== \"none\" || cs.overflowX !== \"visible\";\n}\n\n/**\n * The page's gutter on each side when the view's parent spans the page column's content and nothing between the two\n * draws or clips, else null: a view in a Card, a grid's cell or a bordered box keeps its place (C3: frame=\"page\" is the\n * default there too, so the frame is never the key).\n */\nfunction pageBleed(parent: HTMLElement, column: HTMLElement): Bleed | null {\n for (let el: HTMLElement | null = parent; el && el !== column; el = el.parentElement) if (drawsOrClips(el)) return null;\n const cs = getComputedStyle(column);\n const left = parseFloat(cs.paddingLeft) || 0;\n const right = parseFloat(cs.paddingRight) || 0;\n if (left + right === 0) return null;\n if (parent !== column) {\n const p = parent.getBoundingClientRect();\n const c = column.getBoundingClientRect();\n const start = c.left + column.clientLeft + left;\n const end = c.left + column.clientLeft + column.clientWidth - right;\n if (Math.abs(p.left - start) > 1 || Math.abs(p.right - end) > 1) return null;\n }\n return { left, right };\n}\n\n/**\n * Sprint 25.33 C3 (run 97, the owner: \"On mobile there's too much padding inside the container\"): on a phone a page-frame\n * view that spans its PageContainer's column runs edge to edge, as a Dialog does there (Dialog.tsx), its content at the\n * page's gutter. Keyed on the screen's width and on spanning the column, never on `compact`: the view measures its own\n * width to collapse (with a 17 px band), and reaching two gutters wider would flip that back and forth. So this measures\n * the view's parent and the column, never the view, and its answer can't change with its own reach.\n */\nfunction usePageBleed(ref: RefObject<HTMLElement | null>, on: boolean): Bleed | null {\n const [bleed, setBleed] = useState<Bleed | null>(null);\n useLayoutEffect(() => {\n const parent = ref.current?.parentElement;\n const column = parent?.closest<HTMLElement>(\"[data-page-column]\");\n if (!on || !parent || !column) {\n setBleed(null);\n return;\n }\n const measure = () => {\n const next = pageBleed(parent, column);\n setBleed((prev) => (prev?.left === next?.left && prev?.right === next?.right ? prev : next));\n };\n measure();\n if (typeof ResizeObserver === \"undefined\") return;\n const observer = new ResizeObserver(measure);\n observer.observe(column);\n observer.observe(parent);\n return () => observer.disconnect();\n }, [ref, on]);\n return on ? bleed : null;\n}\n\nexport interface SplitViewProps {\n /** The list (an inbox, a queue): it scrolls on its own. */\n list: ReactNode;\n /**\n * The selected item (a thread, a record): it fills the height and scrolls on its own. The pane insets it at the page's\n * gutter, so pass content with no padding classes; a SectionHeading variant=\"pane\" placed first is the item's header,\n * inset once, its rule reaching the pane's edges (Sprint 25.33 C1).\n */\n detail: ReactNode;\n /**\n * The detail is one full-bleed piece that runs to the pane's edges and owns its inset: a conversation with its header,\n * its own scroller and its composer, a preview, an editor. The pane then adds no inset of its own (Sprint 25.33 C1).\n */\n detailFlush?: boolean;\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 detailFlush = false,\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, edge: 0, inset: 0 });\n const [framesItself, setFramesItself] = useState(false);\n // Sprint 25.33 C1 (the owner: \"there's no one size fits all\"): a pane pads what's in it, unless the thing runs edge to\n // edge. The list pane is flush while it holds a list or a board, found at any depth by the same report: a list of\n // full-width bands (a StackedList, a VirtualizedList), a plan (a Gantt) or what frames itself (a KanbanBoard, a\n // CardGrid, a Table, a DataGrid). A tree, a form, text or a timeline there is padded.\n const [listFlush, setListFlush] = 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 // the fix pass of 25.33 (S-9): while nothing in the pane reports (an empty result, a spinner, a reload between lists),\n // the last decision stands, so a search row of the page's own above the list doesn't move as its list empties, nor\n // the view's frame. A tree reports it wants the inset, so a page that swaps its list for a tree pads again; a form or\n // text, which report nothing, keep the decision before them\n if (held.framed === 0 && held.scrolls === 0 && held.edge === 0 && held.inset === 0) return;\n setFramesItself(held.framed > 0 && held.scrolls === 0);\n setListFlush(held.framed > 0 || held.edge > 0);\n }, []);\n const listInset = listFlush ? undefined : PANE_INSET.list;\n // the detail pads at the page's gutter unless the page says it is one full-bleed piece (a thread, a preview, an editor)\n const detailInset = detailFlush ? undefined : PANE_INSET.detail;\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 // Sprint 25.29 item 16: with `detailOpen` and no `onDetailClose`, the phone's Back couldn't work, and a page that keeps\n // its detail open stranded a phone user away from the list (run 79's folder tree). Without the handler the view keeps\n // its own \"showing the list\" on phones, so Back works, and a press in the list shows the detail again; with it, the\n // page decides, as before.\n const [listShown, setListShown] = useState(false);\n if (listShown && (onDetailClose || !detailOpen || !compact)) setListShown(false);\n useEffect(() => {\n if (detailOpen && !onDetailClose && detailMode === \"stack\") {\n warnOnce(\"SplitView\", \"detailOpen is set without onDetailClose: below the collapse width, Back can only show the list again, and the page never hears of it. Pass onDetailClose to close the detail.\");\n }\n }, [detailOpen, onDetailClose, detailMode]);\n // On a phone, the detail giving way to the list (Back, the page's or the view's own) leaves focus on the list's chosen\n // item, else its first control, never on the page\n const detailOnPhone = compact && detailMode === \"stack\" && detailOpen && !listShown;\n const wasDetailOnPhone = useRef(detailOnPhone);\n useLayoutEffect(() => {\n const was = wasDetailOnPhone.current;\n wasDetailOnPhone.current = detailOnPhone;\n if (!was || detailOnPhone) return;\n const active = document.activeElement;\n if (active && active !== document.body && active.isConnected) return;\n const pane = stackedListScroll;\n const chosen = pane?.querySelector<HTMLElement>('[aria-current=\"true\"], [aria-current=\"page\"], [aria-selected=\"true\"]');\n const target = (chosen && (isTabStop(chosen) ? chosen : tabStops(chosen)[0])) || (pane ? tabStops(pane)[0] : undefined);\n (target ?? pane)?.focus();\n });\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 // C3: on a phone a page frame spanning its page's column runs edge to edge, dropping its side edges and its corners,\n // while it draws a surface: a board on the canvas keeps its place at the page's gutter until an item opens over it\n const phone = useBreakpoint(\"sm\");\n const bleed = usePageBleed(rootRef, phone && !isFill);\n const reach = bleed && (!onCanvas || detailOnPhone) ? bleed : null;\n const squared: CSSProperties | undefined = reach ? { borderLeftWidth: 0, borderRightWidth: 0, borderRadius: 0 } : undefined;\n const rootStyle: CSSProperties | undefined = reach\n ? { ...fillStyle, ...squared, marginLeft: -reach.left, marginRight: -reach.right, width: `calc(100% + ${reach.left + reach.right}px)` }\n : fillStyle;\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 // each tells its content whether it pads it, so a pane header cancels the padding and a list lines up (C1)\n // Sprint 25.33 B2: a bulk-action bar in a pane floats at that pane's foot, so a list's bar never covers the open item\n // (its composer), and the pane keeps room for it under its last row\n const listBar = useBulkBarHost();\n const detailBar = useBulkBarHost();\n const barRoom = (room: number) => (room ? { scrollPaddingBottom: bulkBarRoom(room) } : undefined);\n const listContent = <><BulkBarHostCtx value={listBar.value}><SurfaceBoundary pane=\"list\" framer={reportToList} padded={!listFlush}>{list}</SurfaceBoundary></BulkBarHostCtx><BulkBarSpacer room={listBar.room} /></>;\n const detailContent = <><BulkBarHostCtx value={detailBar.value}><SurfaceBoundary pane=\"detail\" padded={!detailFlush}>{detail}</SurfaceBoundary></BulkBarHostCtx><BulkBarSpacer room={detailBar.room} /></>;\n const barLayer = (bar: ReturnType<typeof useBulkBarHost>) => <div ref={bar.setLayer} data-bulk-bar-layer=\"\" className={BULK_BAR_LAYER} />;\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 = detailOnPhone;\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} data-edge-to-edge={reach ? \"\" : undefined} {...region} className={cn(surface, \"relative flex flex-col\")} style={rootStyle}>\n {showDetail && (\n <div className={cn(\"relative flex-1 min-h-0 flex flex-col\", itemSurface)} style={itemSurface ? squared : undefined}>\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 // a link, alone at the start of the header (Sprint 25.19 G4, page_composition#51): its words line up with the header's edge\n : <Button type=\"button\" variant=\"link\" size=\"sm\" iconLeft={<Icon name=\"arrow-left\" size={14} />} onClick={onDetailClose ?? (() => setListShown(true))}>{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 {/* C1: the phone's stacked panes pad as they do side by side */}\n <div ref={setStackedDetailScroll} data-pane-scroll=\"detail\" className={cn(\"flex-1\", paneScroll(detailInset), FOCUS_INSET)} style={barRoom(detailBar.room)}>{detailContent}</div>\n {barLayer(detailBar)}\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} data-pane-scroll=\"list\" className={cn(\"flex-1\", paneScroll(listInset), FOCUS_INSET)} hidden={showDetail || undefined} style={barRoom(listBar.room)}\n onClickCapture={onDetailClose ? undefined : () => setListShown(false)}>{listContent}</div>\n {/* the list's bar goes with the list while the item shows over it */}\n {!showDetail && barLayer(listBar)}\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} data-edge-to-edge={reach ? \"\" : undefined} {...region} className={surface} style={rootStyle}>\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\" className=\"relative\" defaultSize={`${hiding ? (detailOpen ? listPct : 100) : listWidth}%`} minSize={`${listMinWidth}%`}>\n {/* scroll padding: what the keyboard reaches comes into view with room for its outline (Sprint 30, P3); a list's\n rows run to the pane's edges and draw their outline inside (StackedList), and anything else is padded (C1) */}\n <div ref={setListScroll} data-pane=\"list\" data-pane-scroll=\"list\" className={cn(\"h-full\", paneScroll(listInset), FOCUS_INSET)} style={barRoom(listBar.room)} onFocus={hiding ? (e) => { lastInList.current = e.target; } : undefined}>\n {listContent}\n </div>\n {barLayer(listBar)}\n </ResizablePanel>\n {showDetail && (\n <>\n <ResizableHandle withHandle />\n <ResizablePanel id=\"detail\" minSize=\"30%\">\n <div ref={paneRef} data-pane=\"detail\" className={cn(\"relative h-full min-h-0 flex flex-col\", itemSurface)} onKeyDown={hiding ? onPaneKeyDown : undefined}>\n {paneBar}\n <div ref={setDetailScroll} data-pane-scroll=\"detail\" className={cn(\"flex-1\", paneScroll(detailInset), FOCUS_INSET)} style={barRoom(detailBar.room)}>{detailContent}</div>\n {barLayer(detailBar)}\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\" data-pane-scroll=\"aside\" className={cn(\"h-full\", paneScroll(PANE_INSET.detail), 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
@@ -490,7 +490,7 @@
490
490
  --ds-nav-h-track-gap: 0px;
491
491
  --ds-nav-h-badge-bg: var(--ds-accent-primary);
492
492
 
493
- --ds-nav-v-active-bg: var(--ds-tab-active-bg);
493
+ --ds-nav-v-active-bg: var(--ds-accent-subtle);
494
494
  --ds-nav-v-active-text: var(--ds-accent-ink);
495
495
  --ds-nav-v-active-rail: var(--ds-border-width-thick);
496
496
  --ds-nav-v-item-radius: var(--ds-radius-sm);
@@ -499,7 +499,7 @@
499
499
  --ds-nav-v-badge-bg: var(--ds-accent-primary);
500
500
  --ds-nav-v-active-muted: var(--ds-text-secondary);
501
501
 
502
- --ds-tree-active-bg: var(--ds-tab-active-bg);
502
+ --ds-tree-active-bg: var(--ds-accent-subtle);
503
503
  --ds-tree-active-text: var(--ds-accent-ink);
504
504
  --ds-tree-active-muted: var(--ds-text-muted);
505
505
  --ds-tree-active-rail: var(--ds-border-width-thick);