@lincyaw/aegis-ui 0.19.0 → 0.20.1

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 (69) hide show
  1. package/dist/components/ui/AnchoredPopover.cjs +1 -1
  2. package/dist/components/ui/AnchoredPopover.cjs.map +1 -1
  3. package/dist/components/ui/AnchoredPopover.d.ts +7 -1
  4. package/dist/components/ui/AnchoredPopover.js +64 -62
  5. package/dist/components/ui/AnchoredPopover.js.map +1 -1
  6. package/dist/components/ui/DataTable.cjs +1 -1
  7. package/dist/components/ui/DataTable.cjs.map +1 -1
  8. package/dist/components/ui/DataTable.d.ts +11 -1
  9. package/dist/components/ui/DataTable.js +78 -74
  10. package/dist/components/ui/DataTable.js.map +1 -1
  11. package/dist/components/ui/DetailBeside.cjs +1 -1
  12. package/dist/components/ui/DetailBeside.cjs.map +1 -1
  13. package/dist/components/ui/DetailBeside.d.ts +9 -4
  14. package/dist/components/ui/DetailBeside.js +91 -77
  15. package/dist/components/ui/DetailBeside.js.map +1 -1
  16. package/dist/components/ui/IdentityCell.cjs +1 -1
  17. package/dist/components/ui/IdentityCell.cjs.map +1 -1
  18. package/dist/components/ui/IdentityCell.d.ts +6 -1
  19. package/dist/components/ui/IdentityCell.js +17 -15
  20. package/dist/components/ui/IdentityCell.js.map +1 -1
  21. package/dist/components/ui/PaneLayout.cjs +1 -1
  22. package/dist/components/ui/PaneLayout.cjs.map +1 -1
  23. package/dist/components/ui/PaneLayout.d.ts +7 -2
  24. package/dist/components/ui/PaneLayout.js +20 -22
  25. package/dist/components/ui/PaneLayout.js.map +1 -1
  26. package/dist/components/ui/Select.cjs +1 -1
  27. package/dist/components/ui/Select.cjs.map +1 -1
  28. package/dist/components/ui/Select.d.ts +8 -2
  29. package/dist/components/ui/Select.js +44 -38
  30. package/dist/components/ui/Select.js.map +1 -1
  31. package/dist/components/ui/TimeDisplay.cjs +1 -1
  32. package/dist/components/ui/TimeDisplay.cjs.map +1 -1
  33. package/dist/components/ui/TimeDisplay.d.ts +11 -3
  34. package/dist/components/ui/TimeDisplay.js +39 -34
  35. package/dist/components/ui/TimeDisplay.js.map +1 -1
  36. package/dist/components/ui/Timeline.cjs +1 -1
  37. package/dist/components/ui/Timeline.cjs.map +1 -1
  38. package/dist/components/ui/Timeline.d.ts +17 -4
  39. package/dist/components/ui/Timeline.js +88 -67
  40. package/dist/components/ui/Timeline.js.map +1 -1
  41. package/dist/components/ui/Toolbar.cjs.map +1 -1
  42. package/dist/components/ui/Toolbar.d.ts +2 -1
  43. package/dist/components/ui/Toolbar.js.map +1 -1
  44. package/dist/components/ui/TraceTree.cjs +1 -1
  45. package/dist/components/ui/TraceTree.cjs.map +1 -1
  46. package/dist/components/ui/TraceTree.d.ts +7 -1
  47. package/dist/components/ui/TraceTree.js +127 -119
  48. package/dist/components/ui/TraceTree.js.map +1 -1
  49. package/dist/components/ui/linkComponent.cjs +1 -1
  50. package/dist/components/ui/linkComponent.cjs.map +1 -1
  51. package/dist/components/ui/linkComponent.d.ts +6 -4
  52. package/dist/components/ui/linkComponent.js +12 -10
  53. package/dist/components/ui/linkComponent.js.map +1 -1
  54. package/dist/layouts/shell/AegisShell.cjs +1 -1
  55. package/dist/layouts/shell/AegisShell.cjs.map +1 -1
  56. package/dist/layouts/shell/AegisShell.js +24 -24
  57. package/dist/layouts/shell/AegisShell.js.map +1 -1
  58. package/dist/layouts/shell/RouterLink.cjs +1 -1
  59. package/dist/layouts/shell/RouterLink.cjs.map +1 -1
  60. package/dist/layouts/shell/RouterLink.js +14 -12
  61. package/dist/layouts/shell/RouterLink.js.map +1 -1
  62. package/dist/layouts/shell/types.d.ts +6 -0
  63. package/dist/locale/strings.cjs +1 -1
  64. package/dist/locale/strings.cjs.map +1 -1
  65. package/dist/locale/strings.d.ts +2 -0
  66. package/dist/locale/strings.js +7 -5
  67. package/dist/locale/strings.js.map +1 -1
  68. package/dist/style.css +1 -1
  69. package/package.json +1 -1
@@ -1,23 +1,40 @@
1
- import { jsx as o, jsxs as S } from "react/jsx-runtime";
2
- import { useState as Y, useRef as i, useCallback as R, useEffect as G, useMemo as q, useContext as J, createContext as V } from "react";
3
- import { useIsomorphicLayoutEffect as F } from "../../hooks/useIsomorphicLayoutEffect.js";
4
- import { useMediaQuery as X } from "../../hooks/useMediaQuery.js";
5
- import { scrollingAncestorOf as H, viewBoundsOf as Z, scrollerOf as ee } from "../../lib/scrollView.js";
1
+ import { jsx as o, jsxs as L } from "react/jsx-runtime";
2
+ import { useState as J, useRef as s, useCallback as f, useEffect as X, useMemo as V, useContext as Z, createContext as ee } from "react";
3
+ import { useIsomorphicLayoutEffect as W } from "../../hooks/useIsomorphicLayoutEffect.js";
4
+ import { useMediaQuery as te } from "../../hooks/useMediaQuery.js";
5
+ import { scrollingAncestorOf as ne, viewBoundsOf as re, scrollerOf as le } from "../../lib/scrollView.js";
6
6
  /* empty css */
7
- import { Pane as U } from "./PaneLayout.js";
8
- import { SelectedRowDetailContext as k } from "./selectedRowDetail.js";
9
- const te = "(max-width: 768px)", D = V(null);
10
- function ne(r, c, d, p, s) {
11
- const f = s.top + p, a = r.top < f ? r.top - f : Math.max(r.bottom - s.bottom, 0);
12
- return Math.max(a, c + d - s.bottom);
7
+ import { Pane as Y } from "./PaneLayout.js";
8
+ import { SelectedRowDetailContext as O } from "./selectedRowDetail.js";
9
+ const oe = "(max-width: 768px)", D = ee(null);
10
+ function se(r, c, d, b, v) {
11
+ const a = v.top + b, i = r.top < a ? r.top - a : Math.max(r.bottom - v.bottom, 0);
12
+ return Math.max(i, c + d - v.bottom);
13
13
  }
14
- function re({ boxRef: r }) {
15
- const c = J(D);
14
+ function ie({ boxRef: r }) {
15
+ const c = Z(D);
16
16
  return /* @__PURE__ */ o("div", { ref: r, className: "aegis-detail-beside__inline", role: "group", children: c });
17
17
  }
18
- function fe(r) {
19
- const { detail: c, children: d, revealKey: p } = r, s = r.layout === "panes", f = s ? null : r.scrollContainer ?? null, a = X(te), [L, x] = Y(!1), m = i(null), C = i(null), b = i(null), B = i(null), O = i(null), h = i(null), g = i(!1), T = i(0), _ = i(p), M = i(void 0), N = i({ children: d, detail: c }), u = R(() => {
20
- const e = h.current, t = b.current, n = C.current;
18
+ function ge(r) {
19
+ const { detail: c, children: d, revealKey: b } = r, v = r.layout === "panes", a = v || r.scrollContainer === "nearest", i = v || r.scrollContainer === "nearest" ? null : r.scrollContainer ?? null, m = te(oe), [T, w] = J(!1), h = s(null), _ = s(null), R = s(null), M = s(null), j = s(null), g = s(null), p = s(!1), z = s(0), N = s(b), E = s(void 0), S = s({ children: d, detail: c }), A = s(i), C = f(
20
+ () => a && h.current !== null ? ne(h.current) : i,
21
+ [a, i]
22
+ ), F = f(
23
+ (e) => {
24
+ const t = C();
25
+ if (t === null)
26
+ e.style.removeProperty("--detail-beside-view-height"), e.style.removeProperty("--detail-beside-sticky-top");
27
+ else {
28
+ const { paddingTop: n, paddingBottom: l } = getComputedStyle(t), y = t.clientHeight - parseFloat(n) - parseFloat(l);
29
+ e.style.setProperty(
30
+ "--detail-beside-view-height",
31
+ `${String(y)}px`
32
+ ), e.style.setProperty("--detail-beside-sticky-top", "0px");
33
+ }
34
+ },
35
+ [C]
36
+ ), u = f(() => {
37
+ const e = g.current, t = R.current, n = _.current;
21
38
  if (e === null) {
22
39
  n?.style.removeProperty("height");
23
40
  return;
@@ -25,116 +42,113 @@ function fe(r) {
25
42
  if (t === null)
26
43
  return;
27
44
  const l = e.getBoundingClientRect();
28
- if (n === null) {
45
+ if (F(t), n === null)
29
46
  t.style.setProperty(
30
47
  "--aegis-detail-beside-row-height",
31
48
  `${String(l.height)}px`
32
49
  );
33
- const v = s && m.current !== null ? H(m.current) : null;
34
- v === null ? (t.style.removeProperty("--detail-beside-view-height"), t.style.removeProperty("--detail-beside-sticky-top")) : (t.style.setProperty(
35
- "--detail-beside-view-height",
36
- `${String(v.clientHeight)}px`
37
- ), t.style.setProperty("--detail-beside-sticky-top", "0px"));
38
- } else {
39
- const v = n.getBoundingClientRect().top;
40
- n.style.height = `${String(Math.max(l.top - v, 0))}px`;
50
+ else {
51
+ const y = n.getBoundingClientRect().top;
52
+ n.style.height = `${String(Math.max(l.top - y, 0))}px`;
41
53
  }
42
- }, [s]), P = R(() => {
54
+ }, [F]), P = f(() => {
43
55
  u();
44
- const e = h.current, t = m.current, n = b.current, l = B.current !== null;
56
+ const e = g.current, t = h.current, n = R.current, l = M.current !== null;
45
57
  if (e === null || t === null || n === null && !l)
46
58
  return;
47
- const v = s ? H(t) : f, $ = e.getBoundingClientRect(), I = C.current, Q = ne(
48
- $,
49
- I === null ? $.bottom : I.getBoundingClientRect().top,
59
+ const y = C(), q = e.getBoundingClientRect(), H = _.current, U = se(
60
+ q,
61
+ H === null ? q.bottom : H.getBoundingClientRect().top,
50
62
  n === null ? 0 : n.getBoundingClientRect().height,
51
63
  n === null ? 0 : parseFloat(getComputedStyle(n).scrollMarginTop),
52
- Z(v)
53
- ), E = ee(v);
54
- Math.abs(Q) >= 1 && E.scrollBy({ top: Q, behavior: "instant" }), O.current = E, T.current = E.scrollTop;
55
- }, [s, u, f]), y = R(() => {
56
- M.current = _.current, B.current?.parentElement?.scrollTo({
64
+ re(y)
65
+ ), k = le(y);
66
+ Math.abs(U) >= 1 && k.scrollBy({ top: U, behavior: "instant" }), j.current = k, z.current = k.scrollTop;
67
+ }, [u, C]), x = f(() => {
68
+ E.current = N.current, M.current?.parentElement?.scrollTo({
57
69
  top: 0,
58
70
  behavior: "instant"
59
- }), g.current = !0, x(!0), queueMicrotask(() => {
60
- P(), x(!1);
71
+ }), p.current = !0, w(!0), queueMicrotask(() => {
72
+ P(), w(!1);
61
73
  });
62
- }, [P]), j = R(
74
+ }, [P]), K = f(
63
75
  (e) => {
64
- const t = e !== h.current;
65
- h.current = e, e === null ? (g.current = !1, x(!1), u()) : M.current !== _.current ? y() : (t && (g.current = !1), u());
76
+ const t = e !== g.current;
77
+ g.current = e, e === null ? (p.current = !1, w(!1), u()) : E.current !== N.current ? x() : (t && (p.current = !1), u());
66
78
  },
67
- [u, y]
68
- ), z = R(() => {
69
- x(!0);
79
+ [u, x]
80
+ ), $ = f(() => {
81
+ w(!0);
70
82
  }, []);
71
- F(() => {
72
- const e = N.current.children !== d || N.current.detail !== c;
73
- N.current = { children: d, detail: c }, _.current = p, M.current !== p && h.current !== null ? y() : (e && (g.current = !1), u());
74
- }), F(() => {
75
- const e = m.current;
83
+ W(() => {
84
+ const e = S.current.children !== d || S.current.detail !== c;
85
+ S.current = { children: d, detail: c }, N.current = b;
86
+ const t = A.current !== i;
87
+ A.current = i, (t || E.current !== b) && g.current !== null ? x() : (e && (p.current = !1), u());
88
+ }), W(() => {
89
+ const e = h.current;
76
90
  if (e === null)
77
91
  return;
78
92
  const t = new ResizeObserver(() => {
79
- g.current ? P() : u();
93
+ p.current ? P() : u();
80
94
  });
81
- for (const l of a ? [e] : [e, b.current])
95
+ for (const l of m ? [e] : [e, R.current])
82
96
  l !== null && t.observe(l);
83
97
  const n = (l) => {
84
- l.target instanceof Node && h.current?.contains(l.target) && y();
98
+ l.target instanceof Node && g.current?.contains(l.target) && x();
85
99
  };
86
100
  return e.addEventListener("click", n), () => {
87
101
  t.disconnect(), e.removeEventListener("click", n);
88
102
  };
89
- }, [a, u, P, y]), G(() => {
103
+ }, [m, u, P, x]), X(() => {
90
104
  const e = () => {
91
- const l = O.current;
92
- l !== null && Math.abs(l.scrollTop - T.current) >= 1 && (g.current = !1);
93
- }, t = s ? document : f ?? window, n = { capture: s, passive: !0 };
105
+ const l = j.current;
106
+ l !== null && Math.abs(l.scrollTop - z.current) >= 1 && (p.current = !1);
107
+ }, t = a ? document : i ?? window, n = { capture: a, passive: !0 };
94
108
  return t.addEventListener("scroll", e, n), () => {
95
109
  t.removeEventListener("scroll", e, n);
96
110
  };
97
- }, [s, f]);
98
- const A = q(
99
- () => a ? /* @__PURE__ */ o(re, { boxRef: b }) : null,
100
- [a]
101
- ), K = q(
102
- () => ({ placeRow: j, awaitRow: z, inline: A }),
103
- [j, z, A]
104
- ), w = /* @__PURE__ */ o(k.Provider, { value: null, children: c });
111
+ }, [a, i]);
112
+ const I = V(
113
+ () => m ? /* @__PURE__ */ o(ie, { boxRef: R }) : null,
114
+ [m]
115
+ ), Q = V(
116
+ () => ({ placeRow: K, awaitRow: $, inline: I }),
117
+ [K, $, I]
118
+ ), B = /* @__PURE__ */ o(O.Provider, { value: null, children: c });
105
119
  if (r.layout === "panes")
106
- return /* @__PURE__ */ o(k.Provider, { value: K, children: /* @__PURE__ */ S(D.Provider, { value: w, children: [
107
- /* @__PURE__ */ o(U, { size: "fill", ...r.listPane, children: /* @__PURE__ */ o(
120
+ return /* @__PURE__ */ o(O.Provider, { value: Q, children: /* @__PURE__ */ L(D.Provider, { value: B, children: [
121
+ /* @__PURE__ */ o(Y, { size: "fill", ...r.listPane, children: /* @__PURE__ */ o(
108
122
  "div",
109
123
  {
110
- ref: m,
124
+ ref: h,
111
125
  className: "aegis-detail-beside__list",
112
- "aria-busy": L || void 0,
126
+ "aria-busy": T || void 0,
113
127
  children: d
114
128
  }
115
129
  ) }),
116
- !a && /* @__PURE__ */ o(U, { size: "lg", ...r.detailPane, children: /* @__PURE__ */ o("div", { ref: B, children: w }) })
130
+ !m && /* @__PURE__ */ o(Y, { size: "lg", ...r.detailPane, children: /* @__PURE__ */ o("div", { ref: M, children: B }) })
117
131
  ] }) });
118
- const W = ["aegis-detail-beside", r.className ?? ""].filter(Boolean).join(" ");
119
- return /* @__PURE__ */ o(k.Provider, { value: K, children: /* @__PURE__ */ o(D.Provider, { value: w, children: /* @__PURE__ */ S(
132
+ const G = ["aegis-detail-beside", r.className ?? ""].filter(Boolean).join(" ");
133
+ return /* @__PURE__ */ o(O.Provider, { value: Q, children: /* @__PURE__ */ o(D.Provider, { value: B, children: /* @__PURE__ */ L(
120
134
  "div",
121
135
  {
122
- className: W,
136
+ className: G,
123
137
  style: {
124
138
  "--aegis-detail-beside-columns": r.columns
125
139
  },
126
- "aria-busy": L || void 0,
140
+ "aria-busy": T || void 0,
127
141
  children: [
128
- /* @__PURE__ */ o("div", { ref: m, className: "aegis-detail-beside__list", children: d }),
129
- !a && /* @__PURE__ */ S("div", { className: "aegis-detail-beside__side", children: [
130
- /* @__PURE__ */ o("div", { ref: C }),
131
- /* @__PURE__ */ o("div", { ref: b, className: "aegis-detail-beside__detail", children: w })
142
+ /* @__PURE__ */ o("div", { ref: h, className: "aegis-detail-beside__list", children: d }),
143
+ !m && /* @__PURE__ */ L("div", { className: "aegis-detail-beside__side", children: [
144
+ /* @__PURE__ */ o("div", { ref: _ }),
145
+ /* @__PURE__ */ o("div", { ref: R, className: "aegis-detail-beside__detail", children: B })
132
146
  ] })
133
147
  ]
134
148
  }
135
149
  ) }) });
136
150
  }
137
151
  export {
138
- fe as DetailBeside
152
+ ge as DetailBeside
139
153
  };
140
154
  //# sourceMappingURL=DetailBeside.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DetailBeside.js","sources":["../../../src/components/ui/DetailBeside.tsx"],"sourcesContent":["import {\n type CSSProperties,\n type ReactNode,\n type RefObject,\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect';\nimport { useMediaQuery } from '../../hooks/useMediaQuery';\nimport {\n type ViewBounds,\n scrollerOf,\n scrollingAncestorOf,\n viewBoundsOf,\n} from '../../lib/scrollView';\nimport './DetailBeside.css';\nimport { Pane, type PaneProps } from './PaneLayout';\nimport {\n type SelectedRowDetail,\n SelectedRowDetailContext,\n} from './selectedRowDetail';\n\ninterface DetailBesideBaseProps {\n /**\n * The selected item's detail: one element, such as a `Panel` titled with\n * the item's name. Render it anew from the host's data whenever that\n * data changes: that render tells DetailBeside the change was new data,\n * so the page stays where it is. A detail that fetches its own data and\n * redraws without this host rendering leaves the page following the row,\n * and its next change of size scrolls the page.\n */\n detail: ReactNode;\n /**\n * The list: a `TraceTree`, `FileTree`, `DataTable`, `TreeTable` or\n * `ServiceMap`, in a Panel say. The detail follows the row it draws\n * selected. Like `detail`, render it anew from the host's data whenever\n * that data changes, so the page stays where it is on new data; a list\n * that fetches its own data and redraws without this host rendering\n * leaves the page following the row, and its next change of size scrolls\n * the page.\n */\n children: ReactNode;\n /**\n * The selection as the page's address names it, or null where the\n * address names none and the list shows a default. It changes only by\n * the viewer's doing: a click, a key, a link, back or forward. The page\n * scrolls to the selected row when this changes, and on the first\n * placement after mount; a row that comes into place for new data, such\n * as a default the data moved, is only levelled with.\n */\n revealKey: string | null;\n}\n\n/** The column form: the list and the detail in a grid of their own. */\nexport interface DetailBesideColumnsProps extends DetailBesideBaseProps {\n layout?: 'columns';\n /**\n * `grid-template-columns` of the list and the detail above 768 px, e.g.\n * `'3fr 2fr'`. The detail is never taller than the view, so a long Panel\n * scrolls its body.\n */\n columns: string;\n /** The element that scrolls the page; omitted or null means the viewport. */\n scrollContainer?: HTMLElement | null;\n className?: string;\n}\n\n/** A `Pane` of the pane form, as `Pane` takes it but for its content. */\nexport type DetailBesidePane = Omit<PaneProps, 'children'>;\n\n/**\n * The pane form: the list and the detail as two `Pane`s, set directly in a\n * `PaneLayout` after any panes that come before the list.\n */\nexport interface DetailBesidePanesProps extends DetailBesideBaseProps {\n layout: 'panes';\n /** The list's pane; `size` defaults to `fill`. */\n listPane?: DetailBesidePane;\n /** The detail's pane above 768 px; `size` defaults to `lg`. */\n detailPane?: DetailBesidePane;\n}\n\nexport type DetailBesideProps =\n | DetailBesideColumnsProps\n | DetailBesidePanesProps;\n\nconst NARROW_QUERY = '(max-width: 768px)';\n\n/**\n * The detail as the inline slot draws it. It is kept out of the context the\n * lists read, so a new detail re-renders the slot and not the list.\n */\nconst DetailContext = createContext<ReactNode>(null);\n\n/**\n * How far to scroll so the row is in the view, clear of the `inset` at the\n * view's top, and the detail, whose top can rise no higher than `ceiling`,\n * fits above the view's bottom.\n */\nfunction revealDistance(\n row: DOMRect,\n ceiling: number,\n height: number,\n inset: number,\n view: ViewBounds,\n): number {\n const top = view.top + inset;\n const toRow =\n row.top < top ? row.top - top : Math.max(row.bottom - view.bottom, 0);\n return Math.max(toRow, ceiling + height - view.bottom);\n}\n\n/** The detail right after the selected row, at 768 px and below. */\nfunction InlineDetail({ boxRef }: { boxRef: RefObject<HTMLDivElement> }) {\n const detail = useContext(DetailContext);\n return (\n <div ref={boxRef} className=\"aegis-detail-beside__inline\" role=\"group\">\n {detail}\n </div>\n );\n}\n\n/**\n * A tree, table or map with the selected item's detail beside it. Above\n * 768 px the detail stands in a column on the right, level with the\n * selected row: when the row is too low for it, its bottom meets the\n * view's bottom, and while the page scrolls it stays in the view below\n * the header; while the list draws no row selected, it stands at the\n * column's top. At 768 px and below the list draws the detail right after\n * the selected row, the rows that follow under it; a map draws it over\n * the map, under the node. When the page opens with a selection,\n * `revealKey` changes or the viewer clicks the selected row, the page\n * scrolls at once, as little as it takes to show the row and the detail\n * whole, and again whenever the list or the detail changes size, until the\n * viewer scrolls or the host renders a new list or detail. Any other\n * placement, such as new data moving the selection or the rows, levels\n * the detail with its row by the same rule and leaves the page where it\n * is; the browser's scroll anchoring can still move it when rows arrive\n * above the view, unless the host sets `overflow-anchor: none` on its\n * scroller. The wrapper is `aria-busy` while a selected row it reveals is\n * still on its way.\n *\n * With `layout=\"panes\"` the list and the detail are two `Pane`s of the\n * `PaneLayout` it is set in, divided by a hairline, and each scrolls on its\n * own. Above 768 px the detail stands at its pane's top, and a reveal\n * scrolls the list's pane to the row and the detail's pane to its top. At\n * 768 px and below there is only the list's pane, which draws the detail\n * right after the selected row as the column form does, and a reveal\n * scrolls the nearest scroller around it, the stacked `PaneLayout` in a\n * bleed page. The list is `aria-busy` while a selected row is on its way.\n */\nexport function DetailBeside(props: DetailBesideProps) {\n const { detail, children, revealKey } = props;\n const panes = props.layout === 'panes';\n const scrollContainer = panes ? null : (props.scrollContainer ?? null);\n const narrow = useMediaQuery(NARROW_QUERY);\n const [busy, setBusy] = useState(false);\n const listRef = useRef<HTMLDivElement>(null);\n const spacerRef = useRef<HTMLDivElement>(null);\n const detailRef = useRef<HTMLDivElement>(null);\n /** Above 768 px in the pane form, the detail's box, whose parent is its pane. */\n const detailPaneRef = useRef<HTMLDivElement>(null);\n /** The scroller of the last reveal, whose scroll by the viewer ends following. */\n const scrollerRef = useRef<HTMLElement | null>(null);\n const rowRef = useRef<HTMLElement | null>(null);\n /** Whether the page is still where the last reveal left it. */\n const followRef = useRef(false);\n const revealedAtRef = useRef(0);\n /** The latest render's revealKey, and the last reveal's: undefined before the first. */\n const revealKeyRef = useRef(revealKey);\n const revealedKeyRef = useRef<string | null | undefined>(undefined);\n /** The latest render's list and detail, which change when the host renders them anew. */\n const shownRef = useRef({ children, detail });\n\n /**\n * Sets the detail level with the row: above 768 px through the spacer's\n * height, at and below by telling the inline detail how tall the row is.\n * While the list draws no row selected, such as when a filter or a closed\n * parent hides it, the detail stands at the top of its column.\n */\n const place = useCallback(() => {\n const row = rowRef.current;\n const box = detailRef.current;\n const spacer = spacerRef.current;\n if (row === null) {\n spacer?.style.removeProperty('height');\n return;\n }\n if (box === null) {\n return;\n }\n const rowBox = row.getBoundingClientRect();\n if (spacer === null) {\n box.style.setProperty(\n '--aegis-detail-beside-row-height',\n `${String(rowBox.height)}px`,\n );\n const scroller =\n panes && listRef.current !== null\n ? scrollingAncestorOf(listRef.current)\n : null;\n if (scroller === null) {\n box.style.removeProperty('--detail-beside-view-height');\n box.style.removeProperty('--detail-beside-sticky-top');\n } else {\n box.style.setProperty(\n '--detail-beside-view-height',\n `${String(scroller.clientHeight)}px`,\n );\n box.style.setProperty('--detail-beside-sticky-top', '0px');\n }\n } else {\n const top = spacer.getBoundingClientRect().top;\n spacer.style.height = `${String(Math.max(rowBox.top - top, 0))}px`;\n }\n }, [panes]);\n\n /** Places the row and scrolls as little as it takes to show it and its detail whole. */\n const reveal = useCallback(() => {\n place();\n const row = rowRef.current;\n const list = listRef.current;\n const box = detailRef.current;\n // The detail's own pane, above 768 px, leaves only the row to show.\n const besidePane = detailPaneRef.current !== null;\n if (row === null || list === null || (box === null && !besidePane)) {\n return;\n }\n const container = panes ? scrollingAncestorOf(list) : scrollContainer;\n const rowBox = row.getBoundingClientRect();\n const spacer = spacerRef.current;\n const distance = revealDistance(\n rowBox,\n spacer === null ? rowBox.bottom : spacer.getBoundingClientRect().top,\n box === null ? 0 : box.getBoundingClientRect().height,\n box === null ? 0 : parseFloat(getComputedStyle(box).scrollMarginTop),\n viewBoundsOf(container),\n );\n const scroller = scrollerOf(container);\n if (Math.abs(distance) >= 1) {\n scroller.scrollBy({ top: distance, behavior: 'instant' });\n }\n scrollerRef.current = scroller;\n revealedAtRef.current = scroller.scrollTop;\n }, [panes, place, scrollContainer]);\n\n // A list places its row while React attaches refs, before the detail's\n // own ref is in and before the re-renders its layout effects ask for,\n // so the reveal waits for the commit to finish.\n const revealSoon = useCallback(() => {\n revealedKeyRef.current = revealKeyRef.current;\n detailPaneRef.current?.parentElement?.scrollTo({\n top: 0,\n behavior: 'instant',\n });\n followRef.current = true;\n setBusy(true);\n queueMicrotask(() => {\n reveal();\n setBusy(false);\n });\n }, [reveal]);\n\n // A row placed while a reveal is due is revealed; any other is levelled\n // with, and a new one ends following.\n const placeRow = useCallback(\n (row: HTMLElement | null) => {\n const fresh = row !== rowRef.current;\n rowRef.current = row;\n if (row === null) {\n followRef.current = false;\n setBusy(false);\n place();\n } else if (revealedKeyRef.current !== revealKeyRef.current) {\n revealSoon();\n } else {\n if (fresh) {\n followRef.current = false;\n }\n place();\n }\n },\n [place, revealSoon],\n );\n\n const awaitRow = useCallback(() => {\n setBusy(true);\n }, []);\n\n // Runs after the lists have placed their rows in this commit, so a new\n // revealKey reveals the row it selects. A render by the host without one\n // ends following.\n useIsomorphicLayoutEffect(() => {\n const rendered =\n shownRef.current.children !== children ||\n shownRef.current.detail !== detail;\n shownRef.current = { children, detail };\n revealKeyRef.current = revealKey;\n if (revealedKeyRef.current !== revealKey && rowRef.current !== null) {\n revealSoon();\n } else {\n if (rendered) {\n followRef.current = false;\n }\n place();\n }\n });\n\n useIsomorphicLayoutEffect(() => {\n const list = listRef.current;\n if (list === null) {\n return undefined;\n }\n const observer = new ResizeObserver(() => {\n if (followRef.current) {\n reveal();\n } else {\n place();\n }\n });\n // At 768 px and below the detail lies inside the list.\n for (const box of narrow ? [list] : [list, detailRef.current]) {\n if (box !== null) {\n observer.observe(box);\n }\n }\n const activate = (event: MouseEvent): void => {\n if (\n event.target instanceof Node &&\n rowRef.current?.contains(event.target)\n ) {\n revealSoon();\n }\n };\n list.addEventListener('click', activate);\n return () => {\n observer.disconnect();\n list.removeEventListener('click', activate);\n };\n }, [narrow, place, reveal, revealSoon]);\n\n useEffect(() => {\n const scrolled = (): void => {\n const scroller = scrollerRef.current;\n if (\n scroller !== null &&\n Math.abs(scroller.scrollTop - revealedAtRef.current) >= 1\n ) {\n followRef.current = false;\n }\n };\n // The pane form's scroller is whichever holds the list, found at each\n // reveal; scroll events do not bubble, but they pass the document.\n const target = panes ? document : (scrollContainer ?? window);\n const options = { capture: panes, passive: true };\n target.addEventListener('scroll', scrolled, options);\n return () => {\n target.removeEventListener('scroll', scrolled, options);\n };\n }, [panes, scrollContainer]);\n\n const inline = useMemo(\n () => (narrow ? <InlineDetail boxRef={detailRef} /> : null),\n [narrow],\n );\n const slot = useMemo(\n (): SelectedRowDetail => ({ placeRow, awaitRow, inline }),\n [placeRow, awaitRow, inline],\n );\n const isolated = (\n <SelectedRowDetailContext.Provider value={null}>\n {detail}\n </SelectedRowDetailContext.Provider>\n );\n\n if (props.layout === 'panes') {\n return (\n <SelectedRowDetailContext.Provider value={slot}>\n <DetailContext.Provider value={isolated}>\n <Pane size=\"fill\" {...props.listPane}>\n <div\n ref={listRef}\n className=\"aegis-detail-beside__list\"\n aria-busy={busy || undefined}\n >\n {children}\n </div>\n </Pane>\n {!narrow && (\n <Pane size=\"lg\" {...props.detailPane}>\n <div ref={detailPaneRef}>{isolated}</div>\n </Pane>\n )}\n </DetailContext.Provider>\n </SelectedRowDetailContext.Provider>\n );\n }\n\n const cls = ['aegis-detail-beside', props.className ?? '']\n .filter(Boolean)\n .join(' ');\n\n return (\n <SelectedRowDetailContext.Provider value={slot}>\n <DetailContext.Provider value={isolated}>\n <div\n className={cls}\n style={\n {\n '--aegis-detail-beside-columns': props.columns,\n } as CSSProperties\n }\n aria-busy={busy || undefined}\n >\n <div ref={listRef} className=\"aegis-detail-beside__list\">\n {children}\n </div>\n {!narrow && (\n <div className=\"aegis-detail-beside__side\">\n <div ref={spacerRef} />\n <div ref={detailRef} className=\"aegis-detail-beside__detail\">\n {isolated}\n </div>\n </div>\n )}\n </div>\n </DetailContext.Provider>\n </SelectedRowDetailContext.Provider>\n );\n}\n"],"names":["NARROW_QUERY","DetailContext","createContext","revealDistance","row","ceiling","height","inset","view","top","toRow","InlineDetail","boxRef","detail","useContext","jsx","DetailBeside","props","children","revealKey","panes","scrollContainer","narrow","useMediaQuery","busy","setBusy","useState","listRef","useRef","spacerRef","detailRef","detailPaneRef","scrollerRef","rowRef","followRef","revealedAtRef","revealKeyRef","revealedKeyRef","shownRef","place","useCallback","box","spacer","rowBox","scroller","scrollingAncestorOf","reveal","list","besidePane","container","distance","viewBoundsOf","scrollerOf","revealSoon","placeRow","fresh","awaitRow","useIsomorphicLayoutEffect","rendered","observer","activate","event","useEffect","scrolled","target","options","inline","useMemo","slot","isolated","SelectedRowDetailContext","jsxs","Pane","cls"],"mappings":";;;;;;;;AA4FA,MAAMA,KAAe,sBAMfC,IAAgBC,EAAyB,IAAI;AAOnD,SAASC,GACPC,GACAC,GACAC,GACAC,GACAC,GACQ;AACR,QAAMC,IAAMD,EAAK,MAAMD,GACjBG,IACJN,EAAI,MAAMK,IAAML,EAAI,MAAMK,IAAM,KAAK,IAAIL,EAAI,SAASI,EAAK,QAAQ,CAAC;AACtE,SAAO,KAAK,IAAIE,GAAOL,IAAUC,IAASE,EAAK,MAAM;AACvD;AAGA,SAASG,GAAa,EAA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1B,UAAA,gBAAAF;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,KAAKY;AAAA,UACL,WAAU;AAAA,UACV,aAAWH,KAAQ;AAAA,UAElB,UAAAN;AAAA,QAAA;AAAA,MAAA,GAEL;AAAA,MACC,CAACI,KACA,gBAAAP,EAACyD,GAAA,EAAK,MAAK,MAAM,GAAGvD,EAAM,YACxB,UAAA,gBAAAF,EAAC,OAAA,EAAI,KAAKgB,GAAgB,aAAS,EAAA,CACrC;AAAA,IAAA,EAAA,CAEJ,EAAA,CACF;AAIJ,QAAM0C,IAAM,CAAC,uBAAuBxD,EAAM,aAAa,EAAE,EACtD,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAF,EAACuD,EAAyB,UAAzB,EAAkC,OAAOF,GACxC,UAAA,gBAAArD,EAACd,EAAc,UAAd,EAAuB,OAAOoE,GAC7B,UAAA,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWE;AAAA,MACX,OACE;AAAA,QACE,iCAAiCxD,EAAM;AAAA,MAAA;AAAA,MAG3C,aAAWO,KAAQ;AAAA,MAEnB,UAAA;AAAA,QAAA,gBAAAT,EAAC,OAAA,EAAI,KAAKY,GAAS,WAAU,6BAC1B,UAAAT,GACH;AAAA,QACC,CAACI,KACA,gBAAAiD,EAAC,OAAA,EAAI,WAAU,6BACb,UAAA;AAAA,UAAA,gBAAAxD,EAAC,OAAA,EAAI,KAAKc,EAAA,CAAW;AAAA,4BACpB,OAAA,EAAI,KAAKC,GAAW,WAAU,+BAC5B,UAAAuC,EAAA,CACH;AAAA,QAAA,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAGN,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"DetailBeside.js","sources":["../../../src/components/ui/DetailBeside.tsx"],"sourcesContent":["import {\n type CSSProperties,\n type ReactNode,\n type RefObject,\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect';\nimport { useMediaQuery } from '../../hooks/useMediaQuery';\nimport {\n type ViewBounds,\n scrollerOf,\n scrollingAncestorOf,\n viewBoundsOf,\n} from '../../lib/scrollView';\nimport './DetailBeside.css';\nimport { Pane, type PaneProps } from './PaneLayout';\nimport {\n type SelectedRowDetail,\n SelectedRowDetailContext,\n} from './selectedRowDetail';\n\ninterface DetailBesideBaseProps {\n /**\n * The selected item's detail: one element, such as a `Panel` titled with\n * the item's name. Render it anew from the host's data whenever that\n * data changes: that render tells DetailBeside the change was new data,\n * so the page stays where it is. A detail that fetches its own data and\n * redraws without this host rendering leaves the page following the row,\n * and its next change of size scrolls the page.\n */\n detail: ReactNode;\n /**\n * The list: a `TraceTree`, `FileTree`, `DataTable`, `TreeTable` or\n * `ServiceMap`, in a Panel say. The detail follows the row it draws\n * selected. Like `detail`, render it anew from the host's data whenever\n * that data changes, so the page stays where it is on new data; a list\n * that fetches its own data and redraws without this host rendering\n * leaves the page following the row, and its next change of size scrolls\n * the page.\n */\n children: ReactNode;\n /**\n * The selection as the page's address names it, or null where the\n * address names none and the list shows a default. It changes only by\n * the viewer's doing: a click, a key, a link, back or forward. The page\n * scrolls to the selected row when this changes, and on the first\n * placement after mount; a row that comes into place for new data, such\n * as a default the data moved, is only levelled with.\n */\n revealKey: string | null;\n}\n\n/** The column form: the list and the detail in a grid of their own. */\nexport interface DetailBesideColumnsProps extends DetailBesideBaseProps {\n layout?: 'columns';\n /**\n * `grid-template-columns` of the list and the detail above 768 px, e.g.\n * `'3fr 2fr'`. The detail is never taller than the view, so a long Panel\n * scrolls its body.\n */\n columns: string;\n /**\n * The element that scrolls the page; omitted or null means the viewport.\n * `nearest` is the nearest element around the list that scrolls, found at\n * each reveal, such as the `Pane` the DetailBeside is set in. Inside an\n * element the detail is never taller than that element's view.\n */\n scrollContainer?: HTMLElement | null | 'nearest';\n className?: string;\n}\n\n/** A `Pane` of the pane form, as `Pane` takes it but for its content. */\nexport type DetailBesidePane = Omit<PaneProps, 'children'>;\n\n/**\n * The pane form: the list and the detail as two `Pane`s, set directly in a\n * `PaneLayout` after any panes that come before the list.\n */\nexport interface DetailBesidePanesProps extends DetailBesideBaseProps {\n layout: 'panes';\n /** The list's pane; `size` defaults to `fill`. */\n listPane?: DetailBesidePane;\n /** The detail's pane above 768 px; `size` defaults to `lg`. */\n detailPane?: DetailBesidePane;\n}\n\nexport type DetailBesideProps =\n | DetailBesideColumnsProps\n | DetailBesidePanesProps;\n\nconst NARROW_QUERY = '(max-width: 768px)';\n\n/**\n * The detail as the inline slot draws it. It is kept out of the context the\n * lists read, so a new detail re-renders the slot and not the list.\n */\nconst DetailContext = createContext<ReactNode>(null);\n\n/**\n * How far to scroll so the row is in the view, clear of the `inset` at the\n * view's top, and the detail, whose top can rise no higher than `ceiling`,\n * fits above the view's bottom.\n */\nfunction revealDistance(\n row: DOMRect,\n ceiling: number,\n height: number,\n inset: number,\n view: ViewBounds,\n): number {\n const top = view.top + inset;\n const toRow =\n row.top < top ? row.top - top : Math.max(row.bottom - view.bottom, 0);\n return Math.max(toRow, ceiling + height - view.bottom);\n}\n\n/** The detail right after the selected row, at 768 px and below. */\nfunction InlineDetail({ boxRef }: { boxRef: RefObject<HTMLDivElement> }) {\n const detail = useContext(DetailContext);\n return (\n <div ref={boxRef} className=\"aegis-detail-beside__inline\" role=\"group\">\n {detail}\n </div>\n );\n}\n\n/**\n * A tree, table or map with the selected item's detail beside it. Above\n * 768 px the detail stands in a column on the right, level with the\n * selected row: when the row is too low for it, its bottom meets the\n * view's bottom, and while the page scrolls it stays in the view below\n * the header; while the list draws no row selected, it stands at the\n * column's top. At 768 px and below the list draws the detail right after\n * the selected row, the rows that follow under it; a map draws it over\n * the map, under the node. When the page opens with a selection,\n * `revealKey` changes or the viewer clicks the selected row, the page\n * scrolls at once, as little as it takes to show the row and the detail\n * whole, and again whenever the list or the detail changes size, until the\n * viewer scrolls or the host renders a new list or detail. Any other\n * placement, such as new data moving the selection or the rows, levels\n * the detail with its row by the same rule and leaves the page where it\n * is; the browser's scroll anchoring can still move it when rows arrive\n * above the view, unless the host sets `overflow-anchor: none` on its\n * scroller. The wrapper is `aria-busy` while a selected row it reveals is\n * still on its way.\n *\n * With `layout=\"panes\"` the list and the detail are two `Pane`s of the\n * `PaneLayout` it is set in, divided by a hairline, and each scrolls on its\n * own. Above 768 px the detail stands at its pane's top, and a reveal\n * scrolls the list's pane to the row and the detail's pane to its top. At\n * 768 px and below there is only the list's pane, which draws the detail\n * right after the selected row as the column form does, and a reveal\n * scrolls the nearest scroller around it, the window in a bleed page,\n * which grows with its stacked panes. The list is `aria-busy` while a selected row is on its way.\n */\nexport function DetailBeside(props: DetailBesideProps) {\n const { detail, children, revealKey } = props;\n const panes = props.layout === 'panes';\n /** Whether the scroller is whichever holds the list, found when needed. */\n const nearest = panes || props.scrollContainer === 'nearest';\n const scrollContainer =\n panes || props.scrollContainer === 'nearest'\n ? null\n : (props.scrollContainer ?? null);\n const narrow = useMediaQuery(NARROW_QUERY);\n const [busy, setBusy] = useState(false);\n const listRef = useRef<HTMLDivElement>(null);\n const spacerRef = useRef<HTMLDivElement>(null);\n const detailRef = useRef<HTMLDivElement>(null);\n /** Above 768 px in the pane form, the detail's box, whose parent is its pane. */\n const detailPaneRef = useRef<HTMLDivElement>(null);\n /** The scroller of the last reveal, whose scroll by the viewer ends following. */\n const scrollerRef = useRef<HTMLElement | null>(null);\n const rowRef = useRef<HTMLElement | null>(null);\n /** Whether the page is still where the last reveal left it. */\n const followRef = useRef(false);\n const revealedAtRef = useRef(0);\n /** The latest render's revealKey, and the last reveal's: undefined before the first. */\n const revealKeyRef = useRef(revealKey);\n const revealedKeyRef = useRef<string | null | undefined>(undefined);\n /** The latest render's list and detail, which change when the host renders them anew. */\n const shownRef = useRef({ children, detail });\n /** The scroll container of the latest render; a new one is revealed in anew. */\n const containerRef = useRef(scrollContainer);\n\n /** The element that scrolls the list, or null for the viewport. */\n const scrollerOfList = useCallback(\n (): HTMLElement | null =>\n nearest && listRef.current !== null\n ? scrollingAncestorOf(listRef.current)\n : scrollContainer,\n [nearest, scrollContainer],\n );\n\n /** Bounds the detail by the view of the element that scrolls it. */\n const fitView = useCallback(\n (box: HTMLElement) => {\n const scroller = scrollerOfList();\n if (scroller === null) {\n box.style.removeProperty('--detail-beside-view-height');\n box.style.removeProperty('--detail-beside-sticky-top');\n } else {\n // A sticky box sticks inside the scroller's padding.\n const { paddingTop, paddingBottom } = getComputedStyle(scroller);\n const height =\n scroller.clientHeight -\n parseFloat(paddingTop) -\n parseFloat(paddingBottom);\n box.style.setProperty(\n '--detail-beside-view-height',\n `${String(height)}px`,\n );\n box.style.setProperty('--detail-beside-sticky-top', '0px');\n }\n },\n [scrollerOfList],\n );\n\n /**\n * Sets the detail level with the row: above 768 px through the spacer's\n * height, at and below by telling the inline detail how tall the row is.\n * While the list draws no row selected, such as when a filter or a closed\n * parent hides it, the detail stands at the top of its column.\n */\n const place = useCallback(() => {\n const row = rowRef.current;\n const box = detailRef.current;\n const spacer = spacerRef.current;\n if (row === null) {\n spacer?.style.removeProperty('height');\n return;\n }\n if (box === null) {\n return;\n }\n const rowBox = row.getBoundingClientRect();\n fitView(box);\n if (spacer === null) {\n box.style.setProperty(\n '--aegis-detail-beside-row-height',\n `${String(rowBox.height)}px`,\n );\n } else {\n const top = spacer.getBoundingClientRect().top;\n spacer.style.height = `${String(Math.max(rowBox.top - top, 0))}px`;\n }\n }, [fitView]);\n\n /** Places the row and scrolls as little as it takes to show it and its detail whole. */\n const reveal = useCallback(() => {\n place();\n const row = rowRef.current;\n const list = listRef.current;\n const box = detailRef.current;\n // The detail's own pane, above 768 px, leaves only the row to show.\n const besidePane = detailPaneRef.current !== null;\n if (row === null || list === null || (box === null && !besidePane)) {\n return;\n }\n const container = scrollerOfList();\n const rowBox = row.getBoundingClientRect();\n const spacer = spacerRef.current;\n const distance = revealDistance(\n rowBox,\n spacer === null ? rowBox.bottom : spacer.getBoundingClientRect().top,\n box === null ? 0 : box.getBoundingClientRect().height,\n box === null ? 0 : parseFloat(getComputedStyle(box).scrollMarginTop),\n viewBoundsOf(container),\n );\n const scroller = scrollerOf(container);\n if (Math.abs(distance) >= 1) {\n scroller.scrollBy({ top: distance, behavior: 'instant' });\n }\n scrollerRef.current = scroller;\n revealedAtRef.current = scroller.scrollTop;\n }, [place, scrollerOfList]);\n\n // A list places its row while React attaches refs, before the detail's\n // own ref is in and before the re-renders its layout effects ask for,\n // so the reveal waits for the commit to finish.\n const revealSoon = useCallback(() => {\n revealedKeyRef.current = revealKeyRef.current;\n detailPaneRef.current?.parentElement?.scrollTo({\n top: 0,\n behavior: 'instant',\n });\n followRef.current = true;\n setBusy(true);\n queueMicrotask(() => {\n reveal();\n setBusy(false);\n });\n }, [reveal]);\n\n // A row placed while a reveal is due is revealed; any other is levelled\n // with, and a new one ends following.\n const placeRow = useCallback(\n (row: HTMLElement | null) => {\n const fresh = row !== rowRef.current;\n rowRef.current = row;\n if (row === null) {\n followRef.current = false;\n setBusy(false);\n place();\n } else if (revealedKeyRef.current !== revealKeyRef.current) {\n revealSoon();\n } else {\n if (fresh) {\n followRef.current = false;\n }\n place();\n }\n },\n [place, revealSoon],\n );\n\n const awaitRow = useCallback(() => {\n setBusy(true);\n }, []);\n\n // Runs after the lists have placed their rows in this commit, so a new\n // revealKey reveals the row it selects. A render by the host without one\n // ends following.\n useIsomorphicLayoutEffect(() => {\n const rendered =\n shownRef.current.children !== children ||\n shownRef.current.detail !== detail;\n shownRef.current = { children, detail };\n revealKeyRef.current = revealKey;\n const moved = containerRef.current !== scrollContainer;\n containerRef.current = scrollContainer;\n if (\n (moved || revealedKeyRef.current !== revealKey) &&\n rowRef.current !== null\n ) {\n revealSoon();\n } else {\n if (rendered) {\n followRef.current = false;\n }\n place();\n }\n });\n\n useIsomorphicLayoutEffect(() => {\n const list = listRef.current;\n if (list === null) {\n return undefined;\n }\n const observer = new ResizeObserver(() => {\n if (followRef.current) {\n reveal();\n } else {\n place();\n }\n });\n // At 768 px and below the detail lies inside the list.\n for (const box of narrow ? [list] : [list, detailRef.current]) {\n if (box !== null) {\n observer.observe(box);\n }\n }\n const activate = (event: MouseEvent): void => {\n if (\n event.target instanceof Node &&\n rowRef.current?.contains(event.target)\n ) {\n revealSoon();\n }\n };\n list.addEventListener('click', activate);\n return () => {\n observer.disconnect();\n list.removeEventListener('click', activate);\n };\n }, [narrow, place, reveal, revealSoon]);\n\n useEffect(() => {\n const scrolled = (): void => {\n const scroller = scrollerRef.current;\n if (\n scroller !== null &&\n Math.abs(scroller.scrollTop - revealedAtRef.current) >= 1\n ) {\n followRef.current = false;\n }\n };\n // A nearest scroller is whichever holds the list, found at each\n // reveal; scroll events do not bubble, but they pass the document.\n const target = nearest ? document : (scrollContainer ?? window);\n const options = { capture: nearest, passive: true };\n target.addEventListener('scroll', scrolled, options);\n return () => {\n target.removeEventListener('scroll', scrolled, options);\n };\n }, [nearest, scrollContainer]);\n\n const inline = useMemo(\n () => (narrow ? <InlineDetail boxRef={detailRef} /> : null),\n [narrow],\n );\n const slot = useMemo(\n (): SelectedRowDetail => ({ placeRow, awaitRow, inline }),\n [placeRow, awaitRow, inline],\n );\n const isolated = (\n <SelectedRowDetailContext.Provider value={null}>\n {detail}\n </SelectedRowDetailContext.Provider>\n );\n\n if (props.layout === 'panes') {\n return (\n <SelectedRowDetailContext.Provider value={slot}>\n <DetailContext.Provider value={isolated}>\n <Pane size=\"fill\" {...props.listPane}>\n <div\n ref={listRef}\n className=\"aegis-detail-beside__list\"\n aria-busy={busy || undefined}\n >\n {children}\n </div>\n </Pane>\n {!narrow && (\n <Pane size=\"lg\" {...props.detailPane}>\n <div ref={detailPaneRef}>{isolated}</div>\n </Pane>\n )}\n </DetailContext.Provider>\n </SelectedRowDetailContext.Provider>\n );\n }\n\n const cls = ['aegis-detail-beside', props.className ?? '']\n .filter(Boolean)\n .join(' ');\n\n return (\n <SelectedRowDetailContext.Provider value={slot}>\n <DetailContext.Provider value={isolated}>\n <div\n className={cls}\n style={\n {\n '--aegis-detail-beside-columns': props.columns,\n } as CSSProperties\n }\n aria-busy={busy || undefined}\n >\n <div ref={listRef} className=\"aegis-detail-beside__list\">\n {children}\n </div>\n {!narrow && (\n <div className=\"aegis-detail-beside__side\">\n <div ref={spacerRef} />\n <div ref={detailRef} className=\"aegis-detail-beside__detail\">\n {isolated}\n </div>\n </div>\n )}\n </div>\n </DetailContext.Provider>\n </SelectedRowDetailContext.Provider>\n );\n}\n"],"names":["NARROW_QUERY","DetailContext","createContext","revealDistance","row","ceiling","height","inset","view","top","toRow","InlineDetail","boxRef","detail","useContext","jsx","DetailBeside","props","children","revealKey","panes","nearest","scrollContainer","narrow","useMediaQuery","busy","setBusy","useState","listRef","useRef","spacerRef","detailRef","detailPaneRef","scrollerRef","rowRef","followRef","revealedAtRef","revealKeyRef","revealedKeyRef","shownRef","containerRef","scrollerOfList","useCallback","scrollingAncestorOf","fitView","box","scroller","paddingTop","paddingBottom","place","spacer","rowBox","reveal","list","besidePane","container","distance","viewBoundsOf","scrollerOf","revealSoon","placeRow","fresh","awaitRow","useIsomorphicLayoutEffect","rendered","moved","observer","activate","event","useEffect","scrolled","target","options","inline","useMemo","slot","isolated","SelectedRowDetailContext","jsxs","Pane","cls"],"mappings":";;;;;;;;AAiGA,MAAMA,KAAe,sBAMfC,IAAgBC,GAAyB,IAAI;AAOnD,SAASC,GACPC,GACAC,GACAC,GACAC,GACAC,GACQ;AACR,QAAMC,IAAMD,EAAK,MAAMD,GACjBG,IACJN,EAAI,MAAMK,IAAML,EAAI,MAAMK,IAAM,KAAK,IAAIL,EAAI,SAASI,EAAK,QAAQ,CAAC;AACtE,SAAO,KAAK,IAAIE,GAAOL,IAAUC,IAASE,EAAK,MAAM;AACvD;AAGA,SAASG,GAAa,EAAE,QAAAC,KAAiD;AACvE,QAAMC,IAASC,EAAWb,CAAa;AACvC,SACE,gBAAAc,EAAC,SAAI,KAAKH,GAAQ,WA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gBAAA/D,EAAC,OAAA,EAAI,KAAKe,EAAA,CAAW;AAAA,4BACpB,OAAA,EAAI,KAAKC,GAAW,WAAU,+BAC5B,UAAA6C,EAAA,CACH;AAAA,QAAA,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAGN,EAAA,CACF;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("./Avatar.cjs");;/* empty css */const m=require("./linkComponent.cjs");function y({name:i,secondary:l,avatar:n=!1,colorSlot:s,to:t,linkComponent:a,inline:c=!1,wrap:r=!1,className:d}){const o=a??m.DefaultLink,u=["aegis-identity-cell",c?"aegis-identity-cell--inline":"",r?"aegis-identity-cell--wrap":"",d??""].filter(Boolean).join(" ");return e.jsxs("span",{className:u,children:[n?e.jsx("span",{className:"aegis-identity-cell__avatar","aria-hidden":"true",children:e.jsx(g.Avatar,{name:i,size:"sm",colorSlot:s})}):null,e.jsxs("span",{className:"aegis-identity-cell__text",title:i,children:[t===void 0?e.jsx("span",{className:"aegis-identity-cell__name",children:i}):e.jsx(o,{to:t,className:"aegis-identity-cell__name aegis-identity-cell__name--link",children:i}),l?e.jsx("span",{className:"aegis-identity-cell__secondary",title:typeof l=="string"?l:void 0,children:l}):null]})]})}exports.IdentityCell=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("./Avatar.cjs");;/* empty css */const y=require("./linkComponent.cjs");function _({name:i,secondary:l,avatar:n=!1,colorSlot:s,to:t,ariaLabel:a,linkComponent:c,inline:r=!1,wrap:d=!1,className:o}){const u=c??y.DefaultLink,g=["aegis-identity-cell",r?"aegis-identity-cell--inline":"",d?"aegis-identity-cell--wrap":"",o??""].filter(Boolean).join(" ");return e.jsxs("span",{className:g,children:[n?e.jsx("span",{className:"aegis-identity-cell__avatar","aria-hidden":"true",children:e.jsx(m.Avatar,{name:i,size:"sm",colorSlot:s})}):null,e.jsxs("span",{className:"aegis-identity-cell__text",title:i,children:[t===void 0?e.jsx("span",{className:"aegis-identity-cell__name",children:i}):e.jsx(u,{to:t,className:"aegis-identity-cell__name aegis-identity-cell__name--link","aria-label":a,children:i}),l?e.jsx("span",{className:"aegis-identity-cell__secondary",title:typeof l=="string"?l:void 0,children:l}):null]})]})}exports.IdentityCell=_;
2
2
  //# sourceMappingURL=IdentityCell.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"IdentityCell.cjs","sources":["../../../src/components/ui/IdentityCell.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Avatar, type AvatarColorSlot } from './Avatar';\nimport './IdentityCell.css';\nimport { DefaultLink, type LinkComponent } from './linkComponent';\n\ninterface IdentityCellProps {\n /** Primary line, e.g. a model or task name. Truncates; the full name shows on hover. */\n name: string;\n /** Muted `--font-mono` line under the name for an id or path, e.g. `source / task`; a string shows in full on hover. */\n secondary?: ReactNode;\n /** Leads with an Avatar of the name's initials. */\n avatar?: boolean;\n /** Avatar colour from the chart series colours, so it matches that series. */\n colorSlot?: AvatarColorSlot;\n /** Makes the name a link to this destination. */\n to?: string;\n /** Renders the link. Defaults to an `<a href>`; routed apps pass their Link adapter. */\n linkComponent?: LinkComponent;\n /** Puts the secondary text beside the name on one line. */\n inline?: boolean;\n /** Wraps the name and the secondary text, breaking anywhere, instead of truncating, so a long\n * name never widens the card or list it sits in. */\n wrap?: boolean;\n className?: string;\n}\n\nexport function IdentityCell({\n name,\n secondary,\n avatar = false,\n colorSlot,\n to,\n linkComponent,\n inline = false,\n wrap = false,\n className,\n}: IdentityCellProps) {\n const LinkImpl = linkComponent ?? DefaultLink;\n const cls = [\n 'aegis-identity-cell',\n inline ? 'aegis-identity-cell--inline' : '',\n wrap ? 'aegis-identity-cell--wrap' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span className={cls}>\n {avatar ? (\n <span className=\"aegis-identity-cell__avatar\" aria-hidden=\"true\">\n <Avatar name={name} size=\"sm\" colorSlot={colorSlot} />\n </span>\n ) : null}\n <span className=\"aegis-identity-cell__text\" title={name}>\n {to === undefined ? (\n <span className=\"aegis-identity-cell__name\">{name}</span>\n ) : (\n <LinkImpl\n to={to}\n className=\"aegis-identity-cell__name aegis-identity-cell__name--link\"\n >\n {name}\n </LinkImpl>\n )}\n {secondary ? (\n <span\n className=\"aegis-identity-cell__secondary\"\n title={typeof secondary === 'string' ? secondary : undefined}\n >\n {secondary}\n </span>\n ) : null}\n </span>\n </span>\n );\n}\n"],"names":["IdentityCell","name","secondary","avatar","colorSlot","to","linkComponent","inline","wrap","className","LinkImpl","DefaultLink","cls","jsxs","jsx","Avatar"],"mappings":"wNA2BO,SAASA,EAAa,CAC3B,KAAAC,EACA,UAAAC,EACA,OAAAC,EAAS,GACT,UAAAC,EACA,GAAAC,EAAA,cACAC,EACA,OAAAC,EAAS,GACT,KAAAC,EAAO,GACP,UAAAC,CACF,EAAsB,CACpB,MAAMC,EAAWJ,GAAiBK,EAAAA,YAC5BC,EAAM,CACV,sBACAL,EAAS,8BAAgC,GACzCC,EAAO,4BAA8B,GACrCC,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEI,EAAAA,KAAC,OAAA,CAAK,UAAWD,EACd,SAAA,CAAAT,EACCW,EAAAA,IAAC,OAAA,CAAK,UAAU,8BAA8B,cAAY,OACxD,SAAAA,EAAAA,IAACC,EAAAA,OAAA,CAAO,KAAAd,EAAY,KAAK,KAAK,UAAAG,CAAA,CAAsB,EACtD,EACE,KACJS,EAAAA,KAAC,OAAA,CAAK,UAAU,4BAA4B,MAAOZ,EAChD,SAAA,CAAAI,IAAO,OACNS,EAAAA,IAAC,OAAA,CAAK,UAAU,4BAA6B,WAAK,EAElDA,EAAAA,IAACJ,EAAA,CACC,GAAAL,EACA,UAAU,4DAET,SAAAJ,CAAA,CAAA,EAGJC,EACCY,EAAAA,IAAC,OAAA,CACC,UAAU,iCACV,MAAO,OAAOZ,GAAc,SAAWA,EAAY,OAElD,SAAAA,CAAA,CAAA,EAED,IAAA,CAAA,CACN,CAAA,EACF,CAEJ"}
1
+ {"version":3,"file":"IdentityCell.cjs","sources":["../../../src/components/ui/IdentityCell.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Avatar, type AvatarColorSlot } from './Avatar';\nimport './IdentityCell.css';\nimport { DefaultLink, type LinkComponent } from './linkComponent';\n\ninterface IdentityCellProps {\n /** Primary line, e.g. a model or task name. Truncates; the full name shows on hover. */\n name: string;\n /** Muted `--font-mono` line under the name for an id or path, e.g. `source / task`; a string shows in full on hover. */\n secondary?: ReactNode;\n /** Leads with an Avatar of the name's initials. */\n avatar?: boolean;\n /** Avatar colour from the chart series colours, so it matches that series. */\n colorSlot?: AvatarColorSlot;\n /** Makes the name a link to this destination. */\n to?: string;\n /**\n * The link's accessible name when the name shown is short, e.g. \"Expand\n * trace\" for a link that shows \"Expand\".\n */\n ariaLabel?: string;\n /** Renders the link. Defaults to an `<a href>`; routed apps pass their Link adapter. */\n linkComponent?: LinkComponent;\n /** Puts the secondary text beside the name on one line. */\n inline?: boolean;\n /** Wraps the name and the secondary text, breaking anywhere, instead of truncating, so a long\n * name never widens the card or list it sits in. */\n wrap?: boolean;\n className?: string;\n}\n\nexport function IdentityCell({\n name,\n secondary,\n avatar = false,\n colorSlot,\n to,\n ariaLabel,\n linkComponent,\n inline = false,\n wrap = false,\n className,\n}: IdentityCellProps) {\n const LinkImpl = linkComponent ?? DefaultLink;\n const cls = [\n 'aegis-identity-cell',\n inline ? 'aegis-identity-cell--inline' : '',\n wrap ? 'aegis-identity-cell--wrap' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span className={cls}>\n {avatar ? (\n <span className=\"aegis-identity-cell__avatar\" aria-hidden=\"true\">\n <Avatar name={name} size=\"sm\" colorSlot={colorSlot} />\n </span>\n ) : null}\n <span className=\"aegis-identity-cell__text\" title={name}>\n {to === undefined ? (\n <span className=\"aegis-identity-cell__name\">{name}</span>\n ) : (\n <LinkImpl\n to={to}\n className=\"aegis-identity-cell__name aegis-identity-cell__name--link\"\n aria-label={ariaLabel}\n >\n {name}\n </LinkImpl>\n )}\n {secondary ? (\n <span\n className=\"aegis-identity-cell__secondary\"\n title={typeof secondary === 'string' ? secondary : undefined}\n >\n {secondary}\n </span>\n ) : null}\n </span>\n </span>\n );\n}\n"],"names":["IdentityCell","name","secondary","avatar","colorSlot","to","ariaLabel","linkComponent","inline","wrap","className","LinkImpl","DefaultLink","cls","jsxs","jsx","Avatar"],"mappings":"wNAgCO,SAASA,EAAa,CAC3B,KAAAC,EACA,UAAAC,EACA,OAAAC,EAAS,GACT,UAAAC,EACA,GAAAC,EACA,UAAAC,EAAA,cACAC,EACA,OAAAC,EAAS,GACT,KAAAC,EAAO,GACP,UAAAC,CACF,EAAsB,CACpB,MAAMC,EAAWJ,GAAiBK,EAAAA,YAC5BC,EAAM,CACV,sBACAL,EAAS,8BAAgC,GACzCC,EAAO,4BAA8B,GACrCC,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEI,EAAAA,KAAC,OAAA,CAAK,UAAWD,EACd,SAAA,CAAAV,EACCY,EAAAA,IAAC,OAAA,CAAK,UAAU,8BAA8B,cAAY,OACxD,SAAAA,EAAAA,IAACC,EAAAA,OAAA,CAAO,KAAAf,EAAY,KAAK,KAAK,UAAAG,CAAA,CAAsB,EACtD,EACE,KACJU,EAAAA,KAAC,OAAA,CAAK,UAAU,4BAA4B,MAAOb,EAChD,SAAA,CAAAI,IAAO,OACNU,EAAAA,IAAC,OAAA,CAAK,UAAU,4BAA6B,WAAK,EAElDA,EAAAA,IAACJ,EAAA,CACC,GAAAN,EACA,UAAU,4DACV,aAAYC,EAEX,SAAAL,CAAA,CAAA,EAGJC,EACCa,EAAAA,IAAC,OAAA,CACC,UAAU,iCACV,MAAO,OAAOb,GAAc,SAAWA,EAAY,OAElD,SAAAA,CAAA,CAAA,EAED,IAAA,CAAA,CACN,CAAA,EACF,CAEJ"}
@@ -12,6 +12,11 @@ interface IdentityCellProps {
12
12
  colorSlot?: AvatarColorSlot;
13
13
  /** Makes the name a link to this destination. */
14
14
  to?: string;
15
+ /**
16
+ * The link's accessible name when the name shown is short, e.g. "Expand
17
+ * trace" for a link that shows "Expand".
18
+ */
19
+ ariaLabel?: string;
15
20
  /** Renders the link. Defaults to an `<a href>`; routed apps pass their Link adapter. */
16
21
  linkComponent?: LinkComponent;
17
22
  /** Puts the secondary text beside the name on one line. */
@@ -21,5 +26,5 @@ interface IdentityCellProps {
21
26
  wrap?: boolean;
22
27
  className?: string;
23
28
  }
24
- export declare function IdentityCell({ name, secondary, avatar, colorSlot, to, linkComponent, inline, wrap, className, }: IdentityCellProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare function IdentityCell({ name, secondary, avatar, colorSlot, to, ariaLabel, linkComponent, inline, wrap, className, }: IdentityCellProps): import("react/jsx-runtime").JSX.Element;
25
30
  export {};
@@ -1,32 +1,34 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import { Avatar as _ } from "./Avatar.js";
2
+ import { Avatar as f } from "./Avatar.js";
3
3
  /* empty css */
4
- import { DefaultLink as f } from "./linkComponent.js";
5
- function N({
4
+ import { DefaultLink as g } from "./linkComponent.js";
5
+ function v({
6
6
  name: i,
7
7
  secondary: l,
8
8
  avatar: s = !1,
9
9
  colorSlot: n,
10
10
  to: t,
11
- linkComponent: c,
12
- inline: r = !1,
13
- wrap: d = !1,
14
- className: m
11
+ ariaLabel: c,
12
+ linkComponent: r,
13
+ inline: d = !1,
14
+ wrap: m = !1,
15
+ className: o
15
16
  }) {
16
- const o = c ?? f, p = [
17
+ const p = r ?? g, _ = [
17
18
  "aegis-identity-cell",
18
- r ? "aegis-identity-cell--inline" : "",
19
- d ? "aegis-identity-cell--wrap" : "",
20
- m ?? ""
19
+ d ? "aegis-identity-cell--inline" : "",
20
+ m ? "aegis-identity-cell--wrap" : "",
21
+ o ?? ""
21
22
  ].filter(Boolean).join(" ");
22
- return /* @__PURE__ */ a("span", { className: p, children: [
23
- s ? /* @__PURE__ */ e("span", { className: "aegis-identity-cell__avatar", "aria-hidden": "true", children: /* @__PURE__ */ e(_, { name: i, size: "sm", colorSlot: n }) }) : null,
23
+ return /* @__PURE__ */ a("span", { className: _, children: [
24
+ s ? /* @__PURE__ */ e("span", { className: "aegis-identity-cell__avatar", "aria-hidden": "true", children: /* @__PURE__ */ e(f, { name: i, size: "sm", colorSlot: n }) }) : null,
24
25
  /* @__PURE__ */ a("span", { className: "aegis-identity-cell__text", title: i, children: [
25
26
  t === void 0 ? /* @__PURE__ */ e("span", { className: "aegis-identity-cell__name", children: i }) : /* @__PURE__ */ e(
26
- o,
27
+ p,
27
28
  {
28
29
  to: t,
29
30
  className: "aegis-identity-cell__name aegis-identity-cell__name--link",
31
+ "aria-label": c,
30
32
  children: i
31
33
  }
32
34
  ),
@@ -42,6 +44,6 @@ function N({
42
44
  ] });
43
45
  }
44
46
  export {
45
- N as IdentityCell
47
+ v as IdentityCell
46
48
  };
47
49
  //# sourceMappingURL=IdentityCell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IdentityCell.js","sources":["../../../src/components/ui/IdentityCell.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Avatar, type AvatarColorSlot } from './Avatar';\nimport './IdentityCell.css';\nimport { DefaultLink, type LinkComponent } from './linkComponent';\n\ninterface IdentityCellProps {\n /** Primary line, e.g. a model or task name. Truncates; the full name shows on hover. */\n name: string;\n /** Muted `--font-mono` line under the name for an id or path, e.g. `source / task`; a string shows in full on hover. */\n secondary?: ReactNode;\n /** Leads with an Avatar of the name's initials. */\n avatar?: boolean;\n /** Avatar colour from the chart series colours, so it matches that series. */\n colorSlot?: AvatarColorSlot;\n /** Makes the name a link to this destination. */\n to?: string;\n /** Renders the link. Defaults to an `<a href>`; routed apps pass their Link adapter. */\n linkComponent?: LinkComponent;\n /** Puts the secondary text beside the name on one line. */\n inline?: boolean;\n /** Wraps the name and the secondary text, breaking anywhere, instead of truncating, so a long\n * name never widens the card or list it sits in. */\n wrap?: boolean;\n className?: string;\n}\n\nexport function IdentityCell({\n name,\n secondary,\n avatar = false,\n colorSlot,\n to,\n linkComponent,\n inline = false,\n wrap = false,\n className,\n}: IdentityCellProps) {\n const LinkImpl = linkComponent ?? DefaultLink;\n const cls = [\n 'aegis-identity-cell',\n inline ? 'aegis-identity-cell--inline' : '',\n wrap ? 'aegis-identity-cell--wrap' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span className={cls}>\n {avatar ? (\n <span className=\"aegis-identity-cell__avatar\" aria-hidden=\"true\">\n <Avatar name={name} size=\"sm\" colorSlot={colorSlot} />\n </span>\n ) : null}\n <span className=\"aegis-identity-cell__text\" title={name}>\n {to === undefined ? (\n <span className=\"aegis-identity-cell__name\">{name}</span>\n ) : (\n <LinkImpl\n to={to}\n className=\"aegis-identity-cell__name aegis-identity-cell__name--link\"\n >\n {name}\n </LinkImpl>\n )}\n {secondary ? (\n <span\n className=\"aegis-identity-cell__secondary\"\n title={typeof secondary === 'string' ? secondary : undefined}\n >\n {secondary}\n </span>\n ) : null}\n </span>\n </span>\n );\n}\n"],"names":["IdentityCell","name","secondary","avatar","colorSlot","to","linkComponent","inline","wrap","className","LinkImpl","DefaultLink","cls","jsxs","jsx","Avatar"],"mappings":";;;;AA2BO,SAASA,EAAa;AAAA,EAC3B,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,WAAAC;AAAA,EACA,IAAAC;AAAA,EACA,eAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,MAAAC,IAAO;AAAA,EACP,WAAAC;AACF,GAAsB;AACpB,QAAMC,IAAWJ,KAAiBK,GAC5BC,IAAM;AAAA,IACV;AAAA,IACAL,IAAS,gCAAgC;AAAA,IACzCC,IAAO,8BAA8B;AAAA,IACrCC,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAI,EAAC,QAAA,EAAK,WAAWD,GACd,UAAA;AAAA,IAAAT,IACC,gBAAAW,EAAC,QAAA,EAAK,WAAU,+BAA8B,eAAY,QACxD,UAAA,gBAAAA,EAACC,GAAA,EAAO,MAAAd,GAAY,MAAK,MAAK,WAAAG,EAAA,CAAsB,GACtD,IACE;AAAA,IACJ,gBAAAS,EAAC,QAAA,EAAK,WAAU,6BAA4B,OAAOZ,GAChD,UAAA;AAAA,MAAAI,MAAO,SACN,gBAAAS,EAAC,QAAA,EAAK,WAAU,6BAA6B,aAAK,IAElD,gBAAAA;AAAA,QAACJ;AAAA,QAAA;AAAA,UACC,IAAAL;AAAA,UACA,WAAU;AAAA,UAET,UAAAJ;AAAA,QAAA;AAAA,MAAA;AAAA,MAGJC,IACC,gBAAAY;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,OAAO,OAAOZ,KAAc,WAAWA,IAAY;AAAA,UAElD,UAAAA;AAAA,QAAA;AAAA,MAAA,IAED;AAAA,IAAA,EAAA,CACN;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"IdentityCell.js","sources":["../../../src/components/ui/IdentityCell.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Avatar, type AvatarColorSlot } from './Avatar';\nimport './IdentityCell.css';\nimport { DefaultLink, type LinkComponent } from './linkComponent';\n\ninterface IdentityCellProps {\n /** Primary line, e.g. a model or task name. Truncates; the full name shows on hover. */\n name: string;\n /** Muted `--font-mono` line under the name for an id or path, e.g. `source / task`; a string shows in full on hover. */\n secondary?: ReactNode;\n /** Leads with an Avatar of the name's initials. */\n avatar?: boolean;\n /** Avatar colour from the chart series colours, so it matches that series. */\n colorSlot?: AvatarColorSlot;\n /** Makes the name a link to this destination. */\n to?: string;\n /**\n * The link's accessible name when the name shown is short, e.g. \"Expand\n * trace\" for a link that shows \"Expand\".\n */\n ariaLabel?: string;\n /** Renders the link. Defaults to an `<a href>`; routed apps pass their Link adapter. */\n linkComponent?: LinkComponent;\n /** Puts the secondary text beside the name on one line. */\n inline?: boolean;\n /** Wraps the name and the secondary text, breaking anywhere, instead of truncating, so a long\n * name never widens the card or list it sits in. */\n wrap?: boolean;\n className?: string;\n}\n\nexport function IdentityCell({\n name,\n secondary,\n avatar = false,\n colorSlot,\n to,\n ariaLabel,\n linkComponent,\n inline = false,\n wrap = false,\n className,\n}: IdentityCellProps) {\n const LinkImpl = linkComponent ?? DefaultLink;\n const cls = [\n 'aegis-identity-cell',\n inline ? 'aegis-identity-cell--inline' : '',\n wrap ? 'aegis-identity-cell--wrap' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span className={cls}>\n {avatar ? (\n <span className=\"aegis-identity-cell__avatar\" aria-hidden=\"true\">\n <Avatar name={name} size=\"sm\" colorSlot={colorSlot} />\n </span>\n ) : null}\n <span className=\"aegis-identity-cell__text\" title={name}>\n {to === undefined ? (\n <span className=\"aegis-identity-cell__name\">{name}</span>\n ) : (\n <LinkImpl\n to={to}\n className=\"aegis-identity-cell__name aegis-identity-cell__name--link\"\n aria-label={ariaLabel}\n >\n {name}\n </LinkImpl>\n )}\n {secondary ? (\n <span\n className=\"aegis-identity-cell__secondary\"\n title={typeof secondary === 'string' ? secondary : undefined}\n >\n {secondary}\n </span>\n ) : null}\n </span>\n </span>\n );\n}\n"],"names":["IdentityCell","name","secondary","avatar","colorSlot","to","ariaLabel","linkComponent","inline","wrap","className","LinkImpl","DefaultLink","cls","jsxs","jsx","Avatar"],"mappings":";;;;AAgCO,SAASA,EAAa;AAAA,EAC3B,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,WAAAC;AAAA,EACA,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,MAAAC,IAAO;AAAA,EACP,WAAAC;AACF,GAAsB;AACpB,QAAMC,IAAWJ,KAAiBK,GAC5BC,IAAM;AAAA,IACV;AAAA,IACAL,IAAS,gCAAgC;AAAA,IACzCC,IAAO,8BAA8B;AAAA,IACrCC,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAI,EAAC,QAAA,EAAK,WAAWD,GACd,UAAA;AAAA,IAAAV,IACC,gBAAAY,EAAC,QAAA,EAAK,WAAU,+BAA8B,eAAY,QACxD,UAAA,gBAAAA,EAACC,GAAA,EAAO,MAAAf,GAAY,MAAK,MAAK,WAAAG,EAAA,CAAsB,GACtD,IACE;AAAA,IACJ,gBAAAU,EAAC,QAAA,EAAK,WAAU,6BAA4B,OAAOb,GAChD,UAAA;AAAA,MAAAI,MAAO,SACN,gBAAAU,EAAC,QAAA,EAAK,WAAU,6BAA6B,aAAK,IAElD,gBAAAA;AAAA,QAACJ;AAAA,QAAA;AAAA,UACC,IAAAN;AAAA,UACA,WAAU;AAAA,UACV,cAAYC;AAAA,UAEX,UAAAL;AAAA,QAAA;AAAA,MAAA;AAAA,MAGJC,IACC,gBAAAa;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,OAAO,OAAOb,KAAc,WAAWA,IAAY;AAAA,UAElD,UAAAA;AAAA,QAAA;AAAA,MAAA,IAED;AAAA,IAAA,EAAA,CACN;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime");;/* empty css */function l({direction:n="row",children:i,className:e}){const a=["aegis-pane-layout",`aegis-pane-layout--${n}`,e??""].filter(Boolean).join(" ");return s.jsx("div",{className:a,children:i})}function r({size:n="fill",padding:i="md",label:e,children:a,className:t}){const o=["aegis-pane",`aegis-pane--${n}`,`aegis-pane--padding-${i}`,t??""].filter(Boolean).join(" ");return e===void 0?s.jsx("div",{className:o,children:a}):s.jsx("section",{className:o,"aria-label":e,children:a})}exports.Pane=r;exports.PaneLayout=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react");;/* empty css */function u({direction:n="row",children:s,className:e}){const a=["aegis-pane-layout",`aegis-pane-layout--${n}`,e??""].filter(Boolean).join(" ");return i.jsx("div",{className:a,children:s})}const r=c.forwardRef(({size:n="fill",padding:s="md",label:e,children:a,className:l},o)=>{const t=["aegis-pane",`aegis-pane--${n}`,`aegis-pane--padding-${s}`,l??""].filter(Boolean).join(" ");return e===void 0?i.jsx("div",{ref:o,className:t,children:a}):i.jsx("section",{ref:o,className:t,"aria-label":e,children:a})});r.displayName="Pane";exports.Pane=r;exports.PaneLayout=u;
2
2
  //# sourceMappingURL=PaneLayout.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaneLayout.cjs","sources":["../../../src/components/ui/PaneLayout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './PaneLayout.css';\n\nexport interface PaneLayoutProps {\n /** `row` sets the panes side by side, `column` stacks them. */\n direction?: 'row' | 'column';\n /**\n * `Pane`s, or nested `PaneLayout`s set directly in place of a pane: a\n * nested layout fills its share as a pane does, and is not wrapped in one.\n */\n children: ReactNode;\n className?: string;\n}\n\n/**\n * A region filled edge to edge by panes, each divided from the next by a\n * hairline, with no gap and no card around them. It grows to fill a flex\n * parent such as a bleed `PageWrapper`; at 768 px or narrower a row stacks\n * and the whole layout scrolls as one.\n */\nexport function PaneLayout({\n direction = 'row',\n children,\n className,\n}: PaneLayoutProps) {\n const cls = [\n 'aegis-pane-layout',\n `aegis-pane-layout--${direction}`,\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return <div className={cls}>{children}</div>;\n}\n\nexport interface PaneProps {\n /**\n * `fill` shares the room left by the others; `sm`, `md` and `lg` are the\n * fixed `--pane-width-*` widths of a row; `auto` takes its content's size.\n */\n size?: 'fill' | 'sm' | 'md' | 'lg' | 'auto';\n /** `md` insets the content by `--space-6` (`--space-4` at ≤768 px). */\n padding?: 'none' | 'md';\n /** Names the pane for assistive technology, making it a region. */\n label?: string;\n children: ReactNode;\n className?: string;\n}\n\n/** One pane of a `PaneLayout`; it scrolls its own content. */\nexport function Pane({\n size = 'fill',\n padding = 'md',\n label,\n children,\n className,\n}: PaneProps) {\n const cls = [\n 'aegis-pane',\n `aegis-pane--${size}`,\n `aegis-pane--padding-${padding}`,\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return label === undefined ? (\n <div className={cls}>{children}</div>\n ) : (\n <section className={cls} aria-label={label}>\n {children}\n </section>\n );\n}\n"],"names":["PaneLayout","direction","children","className","cls","jsx","Pane","size","padding","label"],"mappings":"qJAqBO,SAASA,EAAW,CACzB,UAAAC,EAAY,MACZ,SAAAC,EACA,UAAAC,CACF,EAAoB,CAClB,MAAMC,EAAM,CACV,oBACA,sBAAsBH,CAAS,GAC/BE,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EACX,OAAOE,EAAAA,IAAC,MAAA,CAAI,UAAWD,EAAM,SAAAF,CAAA,CAAS,CACxC,CAiBO,SAASI,EAAK,CACnB,KAAAC,EAAO,OACP,QAAAC,EAAU,KACV,MAAAC,EACA,SAAAP,EACA,UAAAC,CACF,EAAc,CACZ,MAAMC,EAAM,CACV,aACA,eAAeG,CAAI,GACnB,uBAAuBC,CAAO,GAC9BL,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EACX,OAAOM,IAAU,OACfJ,EAAAA,IAAC,MAAA,CAAI,UAAWD,EAAM,SAAAF,CAAA,CAAS,EAE/BG,EAAAA,IAAC,UAAA,CAAQ,UAAWD,EAAK,aAAYK,EAClC,SAAAP,EACH,CAEJ"}
1
+ {"version":3,"file":"PaneLayout.cjs","sources":["../../../src/components/ui/PaneLayout.tsx"],"sourcesContent":["import { type ReactNode, type Ref, forwardRef } from 'react';\n\nimport './PaneLayout.css';\n\nexport interface PaneLayoutProps {\n /** `row` sets the panes side by side, `column` stacks them. */\n direction?: 'row' | 'column';\n /**\n * `Pane`s, or nested `PaneLayout`s set directly in place of a pane: a\n * nested layout fills its share as a pane does, and is not wrapped in one.\n */\n children: ReactNode;\n className?: string;\n}\n\n/**\n * A region filled edge to edge by panes, each divided from the next by a\n * hairline, with no gap and no card around them. It grows to fill a flex\n * parent such as a bleed `PageWrapper`; at 768 px or narrower a row stacks\n * and the whole layout scrolls as one.\n */\nexport function PaneLayout({\n direction = 'row',\n children,\n className,\n}: PaneLayoutProps) {\n const cls = [\n 'aegis-pane-layout',\n `aegis-pane-layout--${direction}`,\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return <div className={cls}>{children}</div>;\n}\n\nexport interface PaneProps {\n /**\n * `fill` shares the room left by the others; `sm`, `md` and `lg` are the\n * fixed `--pane-width-*` widths of a row; `auto` takes its content's size.\n */\n size?: 'fill' | 'sm' | 'md' | 'lg' | 'auto';\n /** `md` insets the content by `--space-6` (`--space-4` at ≤768 px). */\n padding?: 'none' | 'md';\n /** Names the pane for assistive technology, making it a region. */\n label?: string;\n children: ReactNode;\n className?: string;\n}\n\n/**\n * One pane of a `PaneLayout`; it scrolls its own content. Its ref is that\n * scrolling element, so a host can pass it on as a `scrollContainer`, e.g.\n * to a `DetailBeside` in the pane, whose selected row then comes into view\n * inside the pane.\n */\nexport const Pane = forwardRef<HTMLElement, PaneProps>(\n ({ size = 'fill', padding = 'md', label, children, className }, ref) => {\n const cls = [\n 'aegis-pane',\n `aegis-pane--${size}`,\n `aegis-pane--padding-${padding}`,\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return label === undefined ? (\n <div ref={ref as Ref<HTMLDivElement>} className={cls}>\n {children}\n </div>\n ) : (\n <section ref={ref} className={cls} aria-label={label}>\n {children}\n </section>\n );\n },\n);\n\nPane.displayName = 'Pane';\n"],"names":["PaneLayout","direction","children","className","cls","jsx","Pane","forwardRef","size","padding","label","ref"],"mappings":"wKAqBO,SAASA,EAAW,CACzB,UAAAC,EAAY,MACZ,SAAAC,EACA,UAAAC,CACF,EAAoB,CAClB,MAAMC,EAAM,CACV,oBACA,sBAAsBH,CAAS,GAC/BE,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EACX,OAAOE,EAAAA,IAAC,MAAA,CAAI,UAAWD,EAAM,SAAAF,CAAA,CAAS,CACxC,CAsBO,MAAMI,EAAOC,EAAAA,WAClB,CAAC,CAAE,KAAAC,EAAO,OAAQ,QAAAC,EAAU,KAAM,MAAAC,EAAO,SAAAR,EAAU,UAAAC,CAAA,EAAaQ,IAAQ,CACtE,MAAMP,EAAM,CACV,aACA,eAAeI,CAAI,GACnB,uBAAuBC,CAAO,GAC9BN,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EACX,OAAOO,IAAU,OACfL,MAAC,MAAA,CAAI,IAAAM,EAAiC,UAAWP,EAC9C,SAAAF,CAAA,CACH,EAEAG,MAAC,WAAQ,IAAAM,EAAU,UAAWP,EAAK,aAAYM,EAC5C,SAAAR,EACH,CAEJ,CACF,EAEAI,EAAK,YAAc"}
@@ -29,5 +29,10 @@ export interface PaneProps {
29
29
  children: ReactNode;
30
30
  className?: string;
31
31
  }
32
- /** One pane of a `PaneLayout`; it scrolls its own content. */
33
- export declare function Pane({ size, padding, label, children, className, }: PaneProps): import("react/jsx-runtime").JSX.Element;
32
+ /**
33
+ * One pane of a `PaneLayout`; it scrolls its own content. Its ref is that
34
+ * scrolling element, so a host can pass it on as a `scrollContainer`, e.g.
35
+ * to a `DetailBeside` in the pane, whose selected row then comes into view
36
+ * inside the pane.
37
+ */
38
+ export declare const Pane: import('react').ForwardRefExoticComponent<PaneProps & import('react').RefAttributes<HTMLElement>>;
@@ -1,34 +1,32 @@
1
- import { jsx as i } from "react/jsx-runtime";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { forwardRef as l } from "react";
2
3
  /* empty css */
3
- function c({
4
- direction: n = "row",
5
- children: o,
4
+ function f({
5
+ direction: o = "row",
6
+ children: i,
6
7
  className: a
7
8
  }) {
8
9
  const e = [
9
10
  "aegis-pane-layout",
10
- `aegis-pane-layout--${n}`,
11
+ `aegis-pane-layout--${o}`,
11
12
  a ?? ""
12
13
  ].filter(Boolean).join(" ");
13
- return /* @__PURE__ */ i("div", { className: e, children: o });
14
- }
15
- function p({
16
- size: n = "fill",
17
- padding: o = "md",
18
- label: a,
19
- children: e,
20
- className: t
21
- }) {
22
- const s = [
23
- "aegis-pane",
24
- `aegis-pane--${n}`,
25
- `aegis-pane--padding-${o}`,
26
- t ?? ""
27
- ].filter(Boolean).join(" ");
28
- return a === void 0 ? /* @__PURE__ */ i("div", { className: s, children: e }) : /* @__PURE__ */ i("section", { className: s, "aria-label": a, children: e });
14
+ return /* @__PURE__ */ n("div", { className: e, children: i });
29
15
  }
16
+ const p = l(
17
+ ({ size: o = "fill", padding: i = "md", label: a, children: e, className: r }, s) => {
18
+ const t = [
19
+ "aegis-pane",
20
+ `aegis-pane--${o}`,
21
+ `aegis-pane--padding-${i}`,
22
+ r ?? ""
23
+ ].filter(Boolean).join(" ");
24
+ return a === void 0 ? /* @__PURE__ */ n("div", { ref: s, className: t, children: e }) : /* @__PURE__ */ n("section", { ref: s, className: t, "aria-label": a, children: e });
25
+ }
26
+ );
27
+ p.displayName = "Pane";
30
28
  export {
31
29
  p as Pane,
32
- c as PaneLayout
30
+ f as PaneLayout
33
31
  };
34
32
  //# sourceMappingURL=PaneLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaneLayout.js","sources":["../../../src/components/ui/PaneLayout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './PaneLayout.css';\n\nexport interface PaneLayoutProps {\n /** `row` sets the panes side by side, `column` stacks them. */\n direction?: 'row' | 'column';\n /**\n * `Pane`s, or nested `PaneLayout`s set directly in place of a pane: a\n * nested layout fills its share as a pane does, and is not wrapped in one.\n */\n children: ReactNode;\n className?: string;\n}\n\n/**\n * A region filled edge to edge by panes, each divided from the next by a\n * hairline, with no gap and no card around them. It grows to fill a flex\n * parent such as a bleed `PageWrapper`; at 768 px or narrower a row stacks\n * and the whole layout scrolls as one.\n */\nexport function PaneLayout({\n direction = 'row',\n children,\n className,\n}: PaneLayoutProps) {\n const cls = [\n 'aegis-pane-layout',\n `aegis-pane-layout--${direction}`,\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return <div className={cls}>{children}</div>;\n}\n\nexport interface PaneProps {\n /**\n * `fill` shares the room left by the others; `sm`, `md` and `lg` are the\n * fixed `--pane-width-*` widths of a row; `auto` takes its content's size.\n */\n size?: 'fill' | 'sm' | 'md' | 'lg' | 'auto';\n /** `md` insets the content by `--space-6` (`--space-4` at ≤768 px). */\n padding?: 'none' | 'md';\n /** Names the pane for assistive technology, making it a region. */\n label?: string;\n children: ReactNode;\n className?: string;\n}\n\n/** One pane of a `PaneLayout`; it scrolls its own content. */\nexport function Pane({\n size = 'fill',\n padding = 'md',\n label,\n children,\n className,\n}: PaneProps) {\n const cls = [\n 'aegis-pane',\n `aegis-pane--${size}`,\n `aegis-pane--padding-${padding}`,\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return label === undefined ? (\n <div className={cls}>{children}</div>\n ) : (\n <section className={cls} aria-label={label}>\n {children}\n </section>\n );\n}\n"],"names":["PaneLayout","direction","children","className","cls","jsx","Pane","size","padding","label"],"mappings":";;AAqBO,SAASA,EAAW;AAAA,EACzB,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC;AACF,GAAoB;AAClB,QAAMC,IAAM;AAAA,IACV;AAAA,IACA,sBAAsBH,CAAS;AAAA,IAC/BE,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AACX,SAAO,gBAAAE,EAAC,OAAA,EAAI,WAAWD,GAAM,UAAAF,EAAA,CAAS;AACxC;AAiBO,SAASI,EAAK;AAAA,EACnB,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,OAAAC;AAAA,EACA,UAAAP;AAAA,EACA,WAAAC;AACF,GAAc;AACZ,QAAMC,IAAM;AAAA,IACV;AAAA,IACA,eAAeG,CAAI;AAAA,IACnB,uBAAuBC,CAAO;AAAA,IAC9BL,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AACX,SAAOM,MAAU,SACf,gBAAAJ,EAAC,OAAA,EAAI,WAAWD,GAAM,UAAAF,EAAA,CAAS,IAE/B,gBAAAG,EAAC,WAAA,EAAQ,WAAWD,GAAK,cAAYK,GAClC,UAAAP,GACH;AAEJ;"}
1
+ {"version":3,"file":"PaneLayout.js","sources":["../../../src/components/ui/PaneLayout.tsx"],"sourcesContent":["import { type ReactNode, type Ref, forwardRef } from 'react';\n\nimport './PaneLayout.css';\n\nexport interface PaneLayoutProps {\n /** `row` sets the panes side by side, `column` stacks them. */\n direction?: 'row' | 'column';\n /**\n * `Pane`s, or nested `PaneLayout`s set directly in place of a pane: a\n * nested layout fills its share as a pane does, and is not wrapped in one.\n */\n children: ReactNode;\n className?: string;\n}\n\n/**\n * A region filled edge to edge by panes, each divided from the next by a\n * hairline, with no gap and no card around them. It grows to fill a flex\n * parent such as a bleed `PageWrapper`; at 768 px or narrower a row stacks\n * and the whole layout scrolls as one.\n */\nexport function PaneLayout({\n direction = 'row',\n children,\n className,\n}: PaneLayoutProps) {\n const cls = [\n 'aegis-pane-layout',\n `aegis-pane-layout--${direction}`,\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return <div className={cls}>{children}</div>;\n}\n\nexport interface PaneProps {\n /**\n * `fill` shares the room left by the others; `sm`, `md` and `lg` are the\n * fixed `--pane-width-*` widths of a row; `auto` takes its content's size.\n */\n size?: 'fill' | 'sm' | 'md' | 'lg' | 'auto';\n /** `md` insets the content by `--space-6` (`--space-4` at ≤768 px). */\n padding?: 'none' | 'md';\n /** Names the pane for assistive technology, making it a region. */\n label?: string;\n children: ReactNode;\n className?: string;\n}\n\n/**\n * One pane of a `PaneLayout`; it scrolls its own content. Its ref is that\n * scrolling element, so a host can pass it on as a `scrollContainer`, e.g.\n * to a `DetailBeside` in the pane, whose selected row then comes into view\n * inside the pane.\n */\nexport const Pane = forwardRef<HTMLElement, PaneProps>(\n ({ size = 'fill', padding = 'md', label, children, className }, ref) => {\n const cls = [\n 'aegis-pane',\n `aegis-pane--${size}`,\n `aegis-pane--padding-${padding}`,\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return label === undefined ? (\n <div ref={ref as Ref<HTMLDivElement>} className={cls}>\n {children}\n </div>\n ) : (\n <section ref={ref} className={cls} aria-label={label}>\n {children}\n </section>\n );\n },\n);\n\nPane.displayName = 'Pane';\n"],"names":["PaneLayout","direction","children","className","cls","jsx","Pane","forwardRef","size","padding","label","ref"],"mappings":";;;AAqBO,SAASA,EAAW;AAAA,EACzB,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC;AACF,GAAoB;AAClB,QAAMC,IAAM;AAAA,IACV;AAAA,IACA,sBAAsBH,CAAS;AAAA,IAC/BE,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AACX,SAAO,gBAAAE,EAAC,OAAA,EAAI,WAAWD,GAAM,UAAAF,EAAA,CAAS;AACxC;AAsBO,MAAMI,IAAOC;AAAA,EAClB,CAAC,EAAE,MAAAC,IAAO,QAAQ,SAAAC,IAAU,MAAM,OAAAC,GAAO,UAAAR,GAAU,WAAAC,EAAA,GAAaQ,MAAQ;AACtE,UAAMP,IAAM;AAAA,MACV;AAAA,MACA,eAAeI,CAAI;AAAA,MACnB,uBAAuBC,CAAO;AAAA,MAC9BN,KAAa;AAAA,IAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AACX,WAAOO,MAAU,SACf,gBAAAL,EAAC,OAAA,EAAI,KAAAM,GAAiC,WAAWP,GAC9C,UAAAF,EAAA,CACH,IAEA,gBAAAG,EAAC,aAAQ,KAAAM,GAAU,WAAWP,GAAK,cAAYM,GAC5C,UAAAR,GACH;AAAA,EAEJ;AACF;AAEAI,EAAK,cAAc;"}