@lincyaw/aegis-ui 0.17.0 → 0.18.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 (91) hide show
  1. package/dist/components/ui/AnchoredPopover.cjs +2 -0
  2. package/dist/components/ui/AnchoredPopover.cjs.map +1 -0
  3. package/dist/components/ui/AnchoredPopover.d.ts +35 -0
  4. package/dist/components/ui/AnchoredPopover.js +118 -0
  5. package/dist/components/ui/AnchoredPopover.js.map +1 -0
  6. package/dist/components/ui/Breadcrumb.cjs +1 -1
  7. package/dist/components/ui/Breadcrumb.cjs.map +1 -1
  8. package/dist/components/ui/Breadcrumb.d.ts +13 -1
  9. package/dist/components/ui/Breadcrumb.js +28 -19
  10. package/dist/components/ui/Breadcrumb.js.map +1 -1
  11. package/dist/components/ui/CodeBlock.cjs +2 -2
  12. package/dist/components/ui/CodeBlock.cjs.map +1 -1
  13. package/dist/components/ui/CodeBlock.d.ts +19 -1
  14. package/dist/components/ui/CodeBlock.js +86 -36
  15. package/dist/components/ui/CodeBlock.js.map +1 -1
  16. package/dist/components/ui/LineIcon.cjs +2 -0
  17. package/dist/components/ui/LineIcon.cjs.map +1 -0
  18. package/dist/components/ui/LineIcon.d.ts +15 -0
  19. package/dist/components/ui/LineIcon.js +33 -0
  20. package/dist/components/ui/LineIcon.js.map +1 -0
  21. package/dist/components/ui/PaneLayout.cjs +2 -0
  22. package/dist/components/ui/PaneLayout.cjs.map +1 -0
  23. package/dist/components/ui/PaneLayout.d.ts +33 -0
  24. package/dist/components/ui/PaneLayout.js +34 -0
  25. package/dist/components/ui/PaneLayout.js.map +1 -0
  26. package/dist/components/ui/Quote.cjs +2 -0
  27. package/dist/components/ui/Quote.cjs.map +1 -0
  28. package/dist/components/ui/Quote.d.ts +12 -0
  29. package/dist/components/ui/Quote.js +10 -0
  30. package/dist/components/ui/Quote.js.map +1 -0
  31. package/dist/components/ui/SectionDivider.cjs +1 -1
  32. package/dist/components/ui/SectionDivider.cjs.map +1 -1
  33. package/dist/components/ui/SectionDivider.d.ts +7 -1
  34. package/dist/components/ui/SectionDivider.js +9 -7
  35. package/dist/components/ui/SectionDivider.js.map +1 -1
  36. package/dist/components/ui/StatusDot.cjs.map +1 -1
  37. package/dist/components/ui/StatusDot.d.ts +3 -2
  38. package/dist/components/ui/StatusDot.js.map +1 -1
  39. package/dist/components/ui/Toolbar.cjs +1 -1
  40. package/dist/components/ui/Toolbar.cjs.map +1 -1
  41. package/dist/components/ui/Toolbar.d.ts +10 -1
  42. package/dist/components/ui/Toolbar.js +17 -7
  43. package/dist/components/ui/Toolbar.js.map +1 -1
  44. package/dist/components/ui/index.d.ts +9 -1
  45. package/dist/index.cjs +1 -1
  46. package/dist/index.d.ts +1 -1
  47. package/dist/index.js +343 -332
  48. package/dist/index.js.map +1 -1
  49. package/dist/layouts/PageWrapper.cjs +1 -1
  50. package/dist/layouts/PageWrapper.cjs.map +1 -1
  51. package/dist/layouts/PageWrapper.d.ts +7 -1
  52. package/dist/layouts/PageWrapper.js +13 -8
  53. package/dist/layouts/PageWrapper.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.d.ts +1 -1
  57. package/dist/layouts/shell/AegisShell.js +193 -150
  58. package/dist/layouts/shell/AegisShell.js.map +1 -1
  59. package/dist/layouts/shell/ShellMenuToggle.cjs +2 -0
  60. package/dist/layouts/shell/ShellMenuToggle.cjs.map +1 -0
  61. package/dist/layouts/shell/ShellMenuToggle.d.ts +8 -0
  62. package/dist/layouts/shell/ShellMenuToggle.js +23 -0
  63. package/dist/layouts/shell/ShellMenuToggle.js.map +1 -0
  64. package/dist/layouts/shell/Sidebar.cjs +1 -1
  65. package/dist/layouts/shell/Sidebar.cjs.map +1 -1
  66. package/dist/layouts/shell/Sidebar.d.ts +10 -4
  67. package/dist/layouts/shell/Sidebar.js +39 -32
  68. package/dist/layouts/shell/Sidebar.js.map +1 -1
  69. package/dist/layouts/shell/TopHeader.cjs +1 -1
  70. package/dist/layouts/shell/TopHeader.cjs.map +1 -1
  71. package/dist/layouts/shell/TopHeader.d.ts +14 -0
  72. package/dist/layouts/shell/TopHeader.js +127 -110
  73. package/dist/layouts/shell/TopHeader.js.map +1 -1
  74. package/dist/layouts/shell/buildRouteTree.cjs +1 -1
  75. package/dist/layouts/shell/buildRouteTree.cjs.map +1 -1
  76. package/dist/layouts/shell/buildRouteTree.js +5 -5
  77. package/dist/layouts/shell/buildRouteTree.js.map +1 -1
  78. package/dist/layouts/shell/index.d.ts +1 -0
  79. package/dist/layouts/shell/shellNavContext.cjs +2 -0
  80. package/dist/layouts/shell/shellNavContext.cjs.map +1 -0
  81. package/dist/layouts/shell/shellNavContext.d.ts +8 -0
  82. package/dist/layouts/shell/shellNavContext.js +6 -0
  83. package/dist/layouts/shell/shellNavContext.js.map +1 -0
  84. package/dist/layouts/shell/types.d.ts +21 -0
  85. package/dist/locale/strings.cjs +1 -1
  86. package/dist/locale/strings.cjs.map +1 -1
  87. package/dist/locale/strings.d.ts +2 -0
  88. package/dist/locale/strings.js +7 -5
  89. package/dist/locale/strings.js.map +1 -1
  90. package/dist/style.css +1 -1
  91. package/package.json +1 -1
@@ -1,58 +1,108 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import { useRef as y, useCallback as u } from "react";
3
- import { usePrimitiveSurface as C } from "../../agent/core/usePrimitiveSurface.js";
4
- import { useCopyToClipboard as N } from "../../hooks/useCopyToClipboard.js";
1
+ import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
+ import { useRef as m, useState as F, useCallback as b, useMemo as G } from "react";
3
+ import { usePrimitiveSurface as K } from "../../agent/core/usePrimitiveSurface.js";
4
+ import { useCopyToClipboard as L } from "../../hooks/useCopyToClipboard.js";
5
5
  /* empty css */
6
- import { CopyGlyph as v } from "./CopyGlyph.js";
7
- import { useStrings as x } from "../../locale/useStrings.js";
8
- function A({
9
- code: o,
10
- language: i = "text",
11
- showLineNumbers: p = !1,
12
- maxHeight: l,
13
- className: m,
14
- surface: b
6
+ import { CopyGlyph as z } from "./CopyGlyph.js";
7
+ import { useStrings as E } from "../../locale/useStrings.js";
8
+ function Y({
9
+ code: a,
10
+ language: d = "text",
11
+ showLineNumbers: R = !1,
12
+ maxHeight: _,
13
+ className: S,
14
+ surface: w,
15
+ selectedLines: f,
16
+ onSelectLines: p
15
17
  }) {
16
- const a = y(null), _ = C(
17
- b,
18
- { code: o, language: i },
18
+ const g = m(null), u = m(null), h = m(null), [x, B] = F(null), c = f === void 0 ? x : f, k = p !== void 0, M = R || k, j = K(
19
+ w,
20
+ { code: a, language: d },
19
21
  "code",
20
- a
21
- ), { copied: n, copy: r } = N(1500), c = x(), f = u(() => {
22
- r(o);
23
- }, [r, o]), t = o.split(`
24
- `), g = String(t.length).length, h = ["aegis-code-block", m ?? ""].filter(Boolean).join(" ");
25
- return /* @__PURE__ */ s("div", { ref: a, className: h, ..._, children: [
26
- /* @__PURE__ */ s("div", { className: "aegis-code-block__header", children: [
27
- /* @__PURE__ */ e("span", { className: "aegis-code-block__lang", children: i === "text" ? c.plainTextLanguage : i }),
28
- /* @__PURE__ */ s(
22
+ g
23
+ ), { copied: y, copy: C } = L(1500), r = E(), O = b(() => {
24
+ C(a);
25
+ }, [C, a]), v = a.split(`
26
+ `), T = String(v.length).length, N = b(
27
+ (t) => ({
28
+ getBoundingClientRect: () => {
29
+ const o = u.current?.querySelectorAll(
30
+ ".aegis-code-block__line"
31
+ ), e = o?.[t.start - 1]?.getBoundingClientRect(), l = o?.[t.end - 1]?.getBoundingClientRect();
32
+ return !e || !l ? new DOMRect() : new DOMRect(
33
+ e.left,
34
+ e.top,
35
+ e.width,
36
+ l.bottom - e.top
37
+ );
38
+ },
39
+ contains: (o) => u.current?.contains(o) ?? !1
40
+ }),
41
+ []
42
+ ), A = b(
43
+ (t, o) => {
44
+ const e = o.shiftKey ? h.current : null, n = c?.start === t && c.end === t && e === null ? null : e === null ? { start: t, end: t } : { start: Math.min(e, t), end: Math.max(e, t) };
45
+ e === null && (h.current = n ? t : null), B(n), p?.(n, n ? N(n) : null);
46
+ },
47
+ [c, p, N]
48
+ ), D = G(
49
+ () => c ? (t) => t >= c.start && t <= c.end : () => !1,
50
+ [c]
51
+ ), P = ["aegis-code-block", S ?? ""].filter(Boolean).join(" ");
52
+ return /* @__PURE__ */ i("div", { ref: g, className: P, ...j, children: [
53
+ /* @__PURE__ */ i("div", { className: "aegis-code-block__header", children: [
54
+ /* @__PURE__ */ s("span", { className: "aegis-code-block__lang", children: d === "text" ? r.plainTextLanguage : d }),
55
+ /* @__PURE__ */ i(
29
56
  "button",
30
57
  {
31
58
  type: "button",
32
59
  className: "aegis-code-block__copy",
33
- onClick: f,
34
- "aria-label": c.copyToClipboard,
60
+ onClick: O,
61
+ "aria-label": r.copyToClipboard,
35
62
  children: [
36
- /* @__PURE__ */ e(v, { copied: n }),
37
- n ? c.copied : c.copy
63
+ /* @__PURE__ */ s(z, { copied: y }),
64
+ y ? r.copied : r.copy
38
65
  ]
39
66
  }
40
67
  )
41
68
  ] }),
42
- /* @__PURE__ */ e(
69
+ /* @__PURE__ */ s(
43
70
  "pre",
44
71
  {
72
+ ref: u,
45
73
  className: "aegis-code-block__pre",
46
- style: l === void 0 ? void 0 : { maxHeight: l },
47
- children: /* @__PURE__ */ e("code", { children: t.map((k, d) => /* @__PURE__ */ s("div", { className: "aegis-code-block__line", children: [
48
- p && /* @__PURE__ */ e("span", { className: "aegis-code-block__ln", children: String(d + 1).padStart(g, " ") }),
49
- /* @__PURE__ */ e("span", { className: "aegis-code-block__body", children: k || " " })
50
- ] }, d)) })
74
+ style: _ === void 0 ? void 0 : { maxHeight: _ },
75
+ children: /* @__PURE__ */ s("code", { children: v.map((t, o) => {
76
+ const e = o + 1, l = D(e), n = String(e).padStart(T, " ");
77
+ return /* @__PURE__ */ i(
78
+ "div",
79
+ {
80
+ className: l ? "aegis-code-block__line aegis-code-block__line--selected" : "aegis-code-block__line",
81
+ children: [
82
+ M && (k ? /* @__PURE__ */ s(
83
+ "button",
84
+ {
85
+ type: "button",
86
+ className: "aegis-code-block__ln aegis-code-block__ln--button",
87
+ "aria-label": r.codeLine(e),
88
+ "aria-pressed": l,
89
+ onClick: (q) => {
90
+ A(e, q);
91
+ },
92
+ children: n
93
+ }
94
+ ) : /* @__PURE__ */ s("span", { className: "aegis-code-block__ln", children: n })),
95
+ /* @__PURE__ */ s("span", { className: "aegis-code-block__body", children: t || " " })
96
+ ]
97
+ },
98
+ o
99
+ );
100
+ }) })
51
101
  }
52
102
  )
53
103
  ] });
54
104
  }
55
105
  export {
56
- A as CodeBlock
106
+ Y as CodeBlock
57
107
  };
58
108
  //# sourceMappingURL=CodeBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlock.js","sources":["../../../src/components/ui/CodeBlock.tsx"],"sourcesContent":["import { useCallback, useRef } from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport { useCopyToClipboard } from '../../hooks/useCopyToClipboard';\nimport { useStrings } from '../../locale';\nimport './CodeBlock.css';\nimport { CopyGlyph } from './CopyGlyph';\n\nexport type CodeBlockSurface = PrimitiveSurface<{\n code: string;\n language: string;\n}>;\n\ninterface CodeBlockProps {\n code: string;\n /** Shown as the header label, e.g. `json`, `typescript`, `python`. */\n language?: string;\n showLineNumbers?: boolean;\n /** Caps the code area's height (number → px); longer code scrolls inside. */\n maxHeight?: number | string;\n className?: string;\n surface?: CodeBlockSurface;\n}\n\nexport function CodeBlock({\n code,\n language = 'text',\n showLineNumbers = false,\n maxHeight,\n className,\n surface,\n}: CodeBlockProps) {\n const wrapRef = useRef<HTMLDivElement>(null);\n const agentAttrs = usePrimitiveSurface(\n surface,\n { code, language },\n 'code',\n wrapRef,\n );\n const { copied, copy } = useCopyToClipboard(1500);\n const strings = useStrings();\n\n const handleCopy = useCallback(() => {\n void copy(code);\n }, [copy, code]);\n\n const lines = code.split('\\n');\n const padLen = String(lines.length).length;\n\n const cls = ['aegis-code-block', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <div ref={wrapRef} className={cls} {...agentAttrs}>\n <div className=\"aegis-code-block__header\">\n <span className=\"aegis-code-block__lang\">\n {language === 'text' ? strings.plainTextLanguage : language}\n </span>\n <button\n type=\"button\"\n className=\"aegis-code-block__copy\"\n onClick={handleCopy}\n aria-label={strings.copyToClipboard}\n >\n <CopyGlyph copied={copied} />\n {copied ? strings.copied : strings.copy}\n </button>\n </div>\n <pre\n className=\"aegis-code-block__pre\"\n style={maxHeight === undefined ? undefined : { maxHeight }}\n >\n <code>\n {lines.map((line, i) => (\n <div key={i} className=\"aegis-code-block__line\">\n {showLineNumbers && (\n <span className=\"aegis-code-block__ln\">\n {String(i + 1).padStart(padLen, ' ')}\n </span>\n )}\n <span className=\"aegis-code-block__body\">{line || ' '}</span>\n </div>\n ))}\n </code>\n </pre>\n </div>\n );\n}\n"],"names":["CodeBlock","code","language","showLineNumbers","maxHeight","className","surface","wrapRef","useRef","agentAttrs","usePrimitiveSurface","copied","copy","useCopyToClipboard","strings","useStrings","handleCopy","useCallback","lines","padLen","cls","jsxs","jsx","CopyGlyph","line","i"],"mappings":";;;;;;;AA2BO,SAASA,EAAU;AAAA,EACxB,MAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,iBAAAC,IAAkB;AAAA,EAClB,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AACF,GAAmB;AACjB,QAAMC,IAAUC,EAAuB,IAAI,GACrCC,IAAaC;AAAA,IACjBJ;AAAA,IACA,EAAE,MAAAL,GAAM,UAAAC,EAAA;AAAA,IACR;AAAA,IACAK;AAAA,EAAA,GAEI,EAAE,QAAAI,GAAQ,MAAAC,MAASC,EAAmB,IAAI,GAC1CC,IAAUC,EAAA,GAEVC,IAAaC,EAAY,MAAM;AACnC,IAAKL,EAAKX,CAAI;AAAA,EAChB,GAAG,CAACW,GAAMX,CAAI,CAAC,GAETiB,IAAQjB,EAAK,MAAM;AAAA,CAAI,GACvBkB,IAAS,OAAOD,EAAM,MAAM,EAAE,QAE9BE,IAAM,CAAC,oBAAoBf,KAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1E,2BACG,OAAA,EAAI,KAAKE,GAAS,WAAWa,GAAM,GAAGX,GACrC,UAAA;AAAA,IAAA,gBAAAY,EAAC,OAAA,EAAI,WAAU,4BACb,UAAA;AAAA,MAAA,gBAAAC,EAAC,UAAK,WAAU,0BACb,gBAAa,SAASR,EAAQ,oBAAoBZ,EAAA,CACrD;AAAA,MACA,gBAAAmB;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,SAASL;AAAA,UACT,cAAYF,EAAQ;AAAA,UAEpB,UAAA;AAAA,YAAA,gBAAAQ,EAACC,KAAU,QAAAZ,GAAgB;AAAA,YAC1BA,IAASG,EAAQ,SAASA,EAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACrC,GACF;AAAA,IACA,gBAAAQ;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,OAAOlB,MAAc,SAAY,SAAY,EAAE,WAAAA,EAAA;AAAA,QAE/C,UAAA,gBAAAkB,EAAC,QAAA,EACE,UAAAJ,EAAM,IAAI,CAACM,GAAMC,MAChB,gBAAAJ,EAAC,OAAA,EAAY,WAAU,0BACpB,UAAA;AAAA,UAAAlB,KACC,gBAAAmB,EAAC,QAAA,EAAK,WAAU,wBACb,UAAA,OAAOG,IAAI,CAAC,EAAE,SAASN,GAAQ,GAAG,EAAA,CACrC;AAAA,UAEF,gBAAAG,EAAC,QAAA,EAAK,WAAU,0BAA0B,eAAQ,IAAA,CAAI;AAAA,QAAA,EAAA,GAN9CG,CAOV,CACD,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"CodeBlock.js","sources":["../../../src/components/ui/CodeBlock.tsx"],"sourcesContent":["import { type MouseEvent, useCallback, useMemo, useRef, useState } from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport { useCopyToClipboard } from '../../hooks/useCopyToClipboard';\nimport { useStrings } from '../../locale';\nimport type { PopoverAnchor } from './AnchoredPopover';\nimport './CodeBlock.css';\nimport { CopyGlyph } from './CopyGlyph';\n\n/** Lines `start` to `end`, 1-based and inclusive. */\nexport interface CodeLineRange {\n start: number;\n end: number;\n}\n\nexport type CodeBlockSurface = PrimitiveSurface<{\n code: string;\n language: string;\n}>;\n\ninterface CodeBlockProps {\n code: string;\n /** Shown as the header label, e.g. `json`, `typescript`, `python`. */\n language?: string;\n showLineNumbers?: boolean;\n /** Caps the code area's height (number → px); longer code scrolls inside. */\n maxHeight?: number | string;\n className?: string;\n surface?: CodeBlockSurface;\n /**\n * The selected lines, drawn in the brand's soft surface with a brand rule\n * at their left. Leave it out to let the block keep its own selection.\n */\n selectedLines?: CodeLineRange | null;\n /**\n * Makes the line numbers buttons that select lines: a press selects its\n * line, Shift extends the range from the last line pressed, and pressing\n * the only selected line clears it. Receives the range and an anchor over\n * its lines, for an `AnchoredPopover`; turns line numbers on.\n */\n onSelectLines?: (\n range: CodeLineRange | null,\n anchor: PopoverAnchor | null,\n ) => void;\n}\n\nexport function CodeBlock({\n code,\n language = 'text',\n showLineNumbers = false,\n maxHeight,\n className,\n surface,\n selectedLines,\n onSelectLines,\n}: CodeBlockProps) {\n const wrapRef = useRef<HTMLDivElement>(null);\n const preRef = useRef<HTMLPreElement>(null);\n const pivot = useRef<number | null>(null);\n const [ownSelection, setOwnSelection] = useState<CodeLineRange | null>(null);\n const selection = selectedLines === undefined ? ownSelection : selectedLines;\n const selectable = onSelectLines !== undefined;\n const numbered = showLineNumbers || selectable;\n const agentAttrs = usePrimitiveSurface(\n surface,\n { code, language },\n 'code',\n wrapRef,\n );\n const { copied, copy } = useCopyToClipboard(1500);\n const strings = useStrings();\n\n const handleCopy = useCallback(() => {\n void copy(code);\n }, [copy, code]);\n\n const lines = code.split('\\n');\n const padLen = String(lines.length).length;\n\n const anchorFor = useCallback(\n (range: CodeLineRange): PopoverAnchor => ({\n getBoundingClientRect: () => {\n const rows = preRef.current?.querySelectorAll<HTMLElement>(\n '.aegis-code-block__line',\n );\n const first = rows?.[range.start - 1]?.getBoundingClientRect();\n const last = rows?.[range.end - 1]?.getBoundingClientRect();\n if (!first || !last) {\n return new DOMRect();\n }\n return new DOMRect(\n first.left,\n first.top,\n first.width,\n last.bottom - first.top,\n );\n },\n contains: (node) => preRef.current?.contains(node) ?? false,\n }),\n [],\n );\n\n const handleLinePress = useCallback(\n (line: number, event: MouseEvent<HTMLButtonElement>) => {\n const from = event.shiftKey ? pivot.current : null;\n const only =\n selection?.start === line && selection.end === line && from === null;\n const next: CodeLineRange | null = only\n ? null\n : from === null\n ? { start: line, end: line }\n : { start: Math.min(from, line), end: Math.max(from, line) };\n if (from === null) {\n pivot.current = next ? line : null;\n }\n setOwnSelection(next);\n onSelectLines?.(next, next ? anchorFor(next) : null);\n },\n [selection, onSelectLines, anchorFor],\n );\n\n const selectedSet = useMemo(\n () =>\n selection\n ? (line: number) => line >= selection.start && line <= selection.end\n : () => false,\n [selection],\n );\n\n const cls = ['aegis-code-block', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <div ref={wrapRef} className={cls} {...agentAttrs}>\n <div className=\"aegis-code-block__header\">\n <span className=\"aegis-code-block__lang\">\n {language === 'text' ? strings.plainTextLanguage : language}\n </span>\n <button\n type=\"button\"\n className=\"aegis-code-block__copy\"\n onClick={handleCopy}\n aria-label={strings.copyToClipboard}\n >\n <CopyGlyph copied={copied} />\n {copied ? strings.copied : strings.copy}\n </button>\n </div>\n <pre\n ref={preRef}\n className=\"aegis-code-block__pre\"\n style={maxHeight === undefined ? undefined : { maxHeight }}\n >\n <code>\n {lines.map((line, i) => {\n const number = i + 1;\n const selected = selectedSet(number);\n const label = String(number).padStart(padLen, ' ');\n return (\n <div\n key={i}\n className={\n selected\n ? 'aegis-code-block__line aegis-code-block__line--selected'\n : 'aegis-code-block__line'\n }\n >\n {numbered &&\n (selectable ? (\n <button\n type=\"button\"\n className=\"aegis-code-block__ln aegis-code-block__ln--button\"\n aria-label={strings.codeLine(number)}\n aria-pressed={selected}\n onClick={(event) => {\n handleLinePress(number, event);\n }}\n >\n {label}\n </button>\n ) : (\n <span className=\"aegis-code-block__ln\">{label}</span>\n ))}\n <span className=\"aegis-code-block__body\">{line || ' '}</span>\n </div>\n );\n })}\n </code>\n </pre>\n </div>\n );\n}\n"],"names":["CodeBlock","code","language","showLineNumbers","maxHeight","className","surface","selectedLines","onSelectLines","wrapRef","useRef","preRef","pivot","ownSelection","setOwnSelection","useState","selection","selectable","numbered","agentAttrs","usePrimitiveSurface","copied","copy","useCopyToClipboard","strings","useStrings","handleCopy","useCallback","lines","padLen","anchorFor","range","rows","first","last","node","handleLinePress","line","event","from","next","selectedSet","useMemo","cls","jsxs","jsx","CopyGlyph","i","number","selected","label"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime");;/* empty css */function c({children:i,size:n="md",title:e,className:r}){const s=["aegis-line-icon",`aegis-line-icon--${n}`,r??""].filter(Boolean).join(" ");return o.jsxs("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",role:e===void 0?void 0:"img","aria-hidden":e===void 0?!0:void 0,"aria-label":e,focusable:"false",children:[e!==void 0&&o.jsx("title",{children:e}),i]})}exports.LineIcon=c;
2
+ //# sourceMappingURL=LineIcon.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LineIcon.cjs","sources":["../../../src/components/ui/LineIcon.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './LineIcon.css';\n\nexport interface LineIconProps {\n /**\n * The glyph's geometry on a 24-unit grid: `path`, `circle`, `rect` and\n * the like. The icon strokes them in the current text colour.\n */\n children: ReactNode;\n /** `sm` = `--line-icon-size-sm` (14), `md` 16, `lg` 18. */\n size?: 'sm' | 'md' | 'lg';\n /** Accessible name. Without one the icon is decorative and hidden. */\n title?: string;\n className?: string;\n}\n\n/** A stroked line glyph: 24-unit grid, round caps and joins, no fill. */\nexport function LineIcon({\n children,\n size = 'md',\n title,\n className,\n}: LineIconProps) {\n const cls = ['aegis-line-icon', `aegis-line-icon--${size}`, className ?? '']\n .filter(Boolean)\n .join(' ');\n return (\n <svg\n className={cls}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n role={title === undefined ? undefined : 'img'}\n aria-hidden={title === undefined ? true : undefined}\n aria-label={title}\n focusable=\"false\"\n >\n {title !== undefined && <title>{title}</title>}\n {children}\n </svg>\n );\n}\n"],"names":["LineIcon","children","size","title","className","cls","jsxs","jsx"],"mappings":"mJAkBO,SAASA,EAAS,CACvB,SAAAC,EACA,KAAAC,EAAO,KACP,MAAAC,EACA,UAAAC,CACF,EAAkB,CAChB,MAAMC,EAAM,CAAC,kBAAmB,oBAAoBH,CAAI,GAAIE,GAAa,EAAE,EACxE,OAAO,OAAO,EACd,KAAK,GAAG,EACX,OACEE,EAAAA,KAAC,MAAA,CACC,UAAWD,EACX,QAAQ,YACR,KAAK,OACL,OAAO,eACP,cAAc,QACd,eAAe,QACf,KAAMF,IAAU,OAAY,OAAY,MACxC,cAAaA,IAAU,OAAY,GAAO,OAC1C,aAAYA,EACZ,UAAU,QAET,SAAA,CAAAA,IAAU,QAAaI,EAAAA,IAAC,QAAA,CAAO,SAAAJ,EAAM,EACrCF,CAAA,CAAA,CAAA,CAGP"}
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ export interface LineIconProps {
3
+ /**
4
+ * The glyph's geometry on a 24-unit grid: `path`, `circle`, `rect` and
5
+ * the like. The icon strokes them in the current text colour.
6
+ */
7
+ children: ReactNode;
8
+ /** `sm` = `--line-icon-size-sm` (14), `md` 16, `lg` 18. */
9
+ size?: 'sm' | 'md' | 'lg';
10
+ /** Accessible name. Without one the icon is decorative and hidden. */
11
+ title?: string;
12
+ className?: string;
13
+ }
14
+ /** A stroked line glyph: 24-unit grid, round caps and joins, no fill. */
15
+ export declare function LineIcon({ children, size, title, className, }: LineIconProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
+ /* empty css */
3
+ function d({
4
+ children: i,
5
+ size: e = "md",
6
+ title: o,
7
+ className: n
8
+ }) {
9
+ const r = ["aegis-line-icon", `aegis-line-icon--${e}`, n ?? ""].filter(Boolean).join(" ");
10
+ return /* @__PURE__ */ s(
11
+ "svg",
12
+ {
13
+ className: r,
14
+ viewBox: "0 0 24 24",
15
+ fill: "none",
16
+ stroke: "currentColor",
17
+ strokeLinecap: "round",
18
+ strokeLinejoin: "round",
19
+ role: o === void 0 ? void 0 : "img",
20
+ "aria-hidden": o === void 0 ? !0 : void 0,
21
+ "aria-label": o,
22
+ focusable: "false",
23
+ children: [
24
+ o !== void 0 && /* @__PURE__ */ a("title", { children: o }),
25
+ i
26
+ ]
27
+ }
28
+ );
29
+ }
30
+ export {
31
+ d as LineIcon
32
+ };
33
+ //# sourceMappingURL=LineIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LineIcon.js","sources":["../../../src/components/ui/LineIcon.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './LineIcon.css';\n\nexport interface LineIconProps {\n /**\n * The glyph's geometry on a 24-unit grid: `path`, `circle`, `rect` and\n * the like. The icon strokes them in the current text colour.\n */\n children: ReactNode;\n /** `sm` = `--line-icon-size-sm` (14), `md` 16, `lg` 18. */\n size?: 'sm' | 'md' | 'lg';\n /** Accessible name. Without one the icon is decorative and hidden. */\n title?: string;\n className?: string;\n}\n\n/** A stroked line glyph: 24-unit grid, round caps and joins, no fill. */\nexport function LineIcon({\n children,\n size = 'md',\n title,\n className,\n}: LineIconProps) {\n const cls = ['aegis-line-icon', `aegis-line-icon--${size}`, className ?? '']\n .filter(Boolean)\n .join(' ');\n return (\n <svg\n className={cls}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n role={title === undefined ? undefined : 'img'}\n aria-hidden={title === undefined ? true : undefined}\n aria-label={title}\n focusable=\"false\"\n >\n {title !== undefined && <title>{title}</title>}\n {children}\n </svg>\n );\n}\n"],"names":["LineIcon","children","size","title","className","cls","jsxs","jsx"],"mappings":";;AAkBO,SAASA,EAAS;AAAA,EACvB,UAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,WAAAC;AACF,GAAkB;AAChB,QAAMC,IAAM,CAAC,mBAAmB,oBAAoBH,CAAI,IAAIE,KAAa,EAAE,EACxE,OAAO,OAAO,EACd,KAAK,GAAG;AACX,SACE,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWD;AAAA,MACX,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,MAAMF,MAAU,SAAY,SAAY;AAAA,MACxC,eAAaA,MAAU,SAAY,KAAO;AAAA,MAC1C,cAAYA;AAAA,MACZ,WAAU;AAAA,MAET,UAAA;AAAA,QAAAA,MAAU,UAAa,gBAAAI,EAAC,SAAA,EAAO,UAAAJ,GAAM;AAAA,QACrCF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -0,0 +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;
2
+ //# sourceMappingURL=PaneLayout.cjs.map
@@ -0,0 +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"}
@@ -0,0 +1,33 @@
1
+ import { ReactNode } from 'react';
2
+ export interface PaneLayoutProps {
3
+ /** `row` sets the panes side by side, `column` stacks them. */
4
+ direction?: 'row' | 'column';
5
+ /**
6
+ * `Pane`s, or nested `PaneLayout`s set directly in place of a pane: a
7
+ * nested layout fills its share as a pane does, and is not wrapped in one.
8
+ */
9
+ children: ReactNode;
10
+ className?: string;
11
+ }
12
+ /**
13
+ * A region filled edge to edge by panes, each divided from the next by a
14
+ * hairline, with no gap and no card around them. It grows to fill a flex
15
+ * parent such as a bleed `PageWrapper`; at 768 px or narrower a row stacks
16
+ * and the whole layout scrolls as one.
17
+ */
18
+ export declare function PaneLayout({ direction, children, className, }: PaneLayoutProps): import("react/jsx-runtime").JSX.Element;
19
+ export interface PaneProps {
20
+ /**
21
+ * `fill` shares the room left by the others; `sm`, `md` and `lg` are the
22
+ * fixed `--pane-width-*` widths of a row; `auto` takes its content's size.
23
+ */
24
+ size?: 'fill' | 'sm' | 'md' | 'lg' | 'auto';
25
+ /** `md` insets the content by `--space-6` (`--space-4` at ≤768 px). */
26
+ padding?: 'none' | 'md';
27
+ /** Names the pane for assistive technology, making it a region. */
28
+ label?: string;
29
+ children: ReactNode;
30
+ className?: string;
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;
@@ -0,0 +1,34 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ /* empty css */
3
+ function c({
4
+ direction: n = "row",
5
+ children: o,
6
+ className: a
7
+ }) {
8
+ const e = [
9
+ "aegis-pane-layout",
10
+ `aegis-pane-layout--${n}`,
11
+ a ?? ""
12
+ ].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 });
29
+ }
30
+ export {
31
+ p as Pane,
32
+ c as PaneLayout
33
+ };
34
+ //# sourceMappingURL=PaneLayout.js.map
@@ -0,0 +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;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime");;/* empty css */function i({tone:e="neutral",children:t,className:o}){const u=["aegis-quote",`aegis-quote--${e}`,o??""].filter(Boolean).join(" ");return r.jsx("blockquote",{className:u,children:t})}exports.Quote=i;
2
+ //# sourceMappingURL=Quote.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Quote.cjs","sources":["../../../src/components/ui/Quote.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './Quote.css';\n\nexport interface QuoteProps {\n /**\n * `neutral` sets off text quoted from a source, e.g. a requirement's\n * statement. `warning` is the anomaly tone: quoted failure output only.\n */\n tone?: 'neutral' | 'warning';\n children: ReactNode;\n className?: string;\n}\n\n/** Quoted text set off by a rule down its left edge. */\nexport function Quote({ tone = 'neutral', children, className }: QuoteProps) {\n const cls = ['aegis-quote', `aegis-quote--${tone}`, className ?? '']\n .filter(Boolean)\n .join(' ');\n return <blockquote className={cls}>{children}</blockquote>;\n}\n"],"names":["Quote","tone","children","className","cls","jsx"],"mappings":"gJAeO,SAASA,EAAM,CAAE,KAAAC,EAAO,UAAW,SAAAC,EAAU,UAAAC,GAAyB,CAC3E,MAAMC,EAAM,CAAC,cAAe,gBAAgBH,CAAI,GAAIE,GAAa,EAAE,EAChE,OAAO,OAAO,EACd,KAAK,GAAG,EACX,OAAOE,EAAAA,IAAC,aAAA,CAAW,UAAWD,EAAM,SAAAF,CAAA,CAAS,CAC/C"}
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ export interface QuoteProps {
3
+ /**
4
+ * `neutral` sets off text quoted from a source, e.g. a requirement's
5
+ * statement. `warning` is the anomaly tone: quoted failure output only.
6
+ */
7
+ tone?: 'neutral' | 'warning';
8
+ children: ReactNode;
9
+ className?: string;
10
+ }
11
+ /** Quoted text set off by a rule down its left edge. */
12
+ export declare function Quote({ tone, children, className }: QuoteProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ /* empty css */
3
+ function u({ tone: o = "neutral", children: e, className: t }) {
4
+ const r = ["aegis-quote", `aegis-quote--${o}`, t ?? ""].filter(Boolean).join(" ");
5
+ return /* @__PURE__ */ i("blockquote", { className: r, children: e });
6
+ }
7
+ export {
8
+ u as Quote
9
+ };
10
+ //# sourceMappingURL=Quote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Quote.js","sources":["../../../src/components/ui/Quote.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './Quote.css';\n\nexport interface QuoteProps {\n /**\n * `neutral` sets off text quoted from a source, e.g. a requirement's\n * statement. `warning` is the anomaly tone: quoted failure output only.\n */\n tone?: 'neutral' | 'warning';\n children: ReactNode;\n className?: string;\n}\n\n/** Quoted text set off by a rule down its left edge. */\nexport function Quote({ tone = 'neutral', children, className }: QuoteProps) {\n const cls = ['aegis-quote', `aegis-quote--${tone}`, className ?? '']\n .filter(Boolean)\n .join(' ');\n return <blockquote className={cls}>{children}</blockquote>;\n}\n"],"names":["Quote","tone","children","className","cls","jsx"],"mappings":";;AAeO,SAASA,EAAM,EAAE,MAAAC,IAAO,WAAW,UAAAC,GAAU,WAAAC,KAAyB;AAC3E,QAAMC,IAAM,CAAC,eAAe,gBAAgBH,CAAI,IAAIE,KAAa,EAAE,EAChE,OAAO,OAAO,EACd,KAAK,GAAG;AACX,SAAO,gBAAAE,EAAC,cAAA,EAAW,WAAWD,GAAM,UAAAF,EAAA,CAAS;AAC/C;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");;/* empty css */function a({children:s,extra:i,rule:r=!0,className:n}){const d=["aegis-section-divider",r?"aegis-section-divider--ruled":"",n??""].filter(Boolean).join(" ");return e.jsx("div",{className:d,children:e.jsxs("div",{className:"aegis-section-divider__head",children:[e.jsx("span",{className:"aegis-section-divider__label",children:s}),i&&e.jsx("span",{className:"aegis-section-divider__extra",children:i})]})})}exports.SectionDivider=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");;/* empty css */function t({children:s,extra:i,rule:r=!0,variant:d="meta",className:n}){const a=["aegis-section-divider",r?"aegis-section-divider--ruled":"",d==="group"?"aegis-section-divider--group":"",n??""].filter(Boolean).join(" ");return e.jsx("div",{className:a,children:e.jsxs("div",{className:"aegis-section-divider__head",children:[e.jsx("span",{className:"aegis-section-divider__label",children:s}),i&&e.jsx("span",{className:"aegis-section-divider__extra",children:i})]})})}exports.SectionDivider=t;
2
2
  //# sourceMappingURL=SectionDivider.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionDivider.cjs","sources":["../../../src/components/ui/SectionDivider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './SectionDivider.css';\n\ninterface SectionDividerProps {\n /** Uppercase tracked label. */\n children: ReactNode;\n /** Right-aligned content (chip / link / mono value). */\n extra?: ReactNode;\n /** Render the hairline rule below the label. */\n rule?: boolean;\n className?: string;\n}\n\nexport function SectionDivider({\n children,\n extra,\n rule = true,\n className,\n}: SectionDividerProps) {\n const cls = [\n 'aegis-section-divider',\n rule ? 'aegis-section-divider--ruled' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={cls}>\n <div className=\"aegis-section-divider__head\">\n <span className=\"aegis-section-divider__label\">{children}</span>\n {extra && <span className=\"aegis-section-divider__extra\">{extra}</span>}\n </div>\n </div>\n );\n}\n"],"names":["SectionDivider","children","extra","rule","className","cls","jsxs","jsx"],"mappings":"yJAcO,SAASA,EAAe,CAC7B,SAAAC,EACA,MAAAC,EACA,KAAAC,EAAO,GACP,UAAAC,CACF,EAAwB,CACtB,MAAMC,EAAM,CACV,wBACAF,EAAO,+BAAiC,GACxCC,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,aACG,MAAA,CAAI,UAAWC,EACd,SAAAC,EAAAA,KAAC,MAAA,CAAI,UAAU,8BACb,SAAA,CAAAC,EAAAA,IAAC,OAAA,CAAK,UAAU,+BAAgC,SAAAN,CAAA,CAAS,EACxDC,GAASK,EAAAA,IAAC,OAAA,CAAK,UAAU,+BAAgC,SAAAL,CAAA,CAAM,CAAA,CAAA,CAClE,CAAA,CACF,CAEJ"}
1
+ {"version":3,"file":"SectionDivider.cjs","sources":["../../../src/components/ui/SectionDivider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './SectionDivider.css';\n\ninterface SectionDividerProps {\n /** Uppercase tracked label. */\n children: ReactNode;\n /** Right-aligned content (chip / link / mono value). */\n extra?: ReactNode;\n /** Render the hairline rule below the label. */\n rule?: boolean;\n /**\n * `meta` is the uppercase tracked micro label. `group` names a group of\n * fields or rows inside a pane in the label type role, in sentence case,\n * e.g. 原文 or 验证记录 with its count as the extra.\n */\n variant?: 'meta' | 'group';\n className?: string;\n}\n\nexport function SectionDivider({\n children,\n extra,\n rule = true,\n variant = 'meta',\n className,\n}: SectionDividerProps) {\n const cls = [\n 'aegis-section-divider',\n rule ? 'aegis-section-divider--ruled' : '',\n variant === 'group' ? 'aegis-section-divider--group' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={cls}>\n <div className=\"aegis-section-divider__head\">\n <span className=\"aegis-section-divider__label\">{children}</span>\n {extra && <span className=\"aegis-section-divider__extra\">{extra}</span>}\n </div>\n </div>\n );\n}\n"],"names":["SectionDivider","children","extra","rule","variant","className","cls","jsxs","jsx"],"mappings":"yJAoBO,SAASA,EAAe,CAC7B,SAAAC,EACA,MAAAC,EACA,KAAAC,EAAO,GACP,QAAAC,EAAU,OACV,UAAAC,CACF,EAAwB,CACtB,MAAMC,EAAM,CACV,wBACAH,EAAO,+BAAiC,GACxCC,IAAY,QAAU,+BAAiC,GACvDC,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,aACG,MAAA,CAAI,UAAWC,EACd,SAAAC,EAAAA,KAAC,MAAA,CAAI,UAAU,8BACb,SAAA,CAAAC,EAAAA,IAAC,OAAA,CAAK,UAAU,+BAAgC,SAAAP,CAAA,CAAS,EACxDC,GAASM,EAAAA,IAAC,OAAA,CAAK,UAAU,+BAAgC,SAAAN,CAAA,CAAM,CAAA,CAAA,CAClE,CAAA,CACF,CAEJ"}
@@ -6,7 +6,13 @@ interface SectionDividerProps {
6
6
  extra?: ReactNode;
7
7
  /** Render the hairline rule below the label. */
8
8
  rule?: boolean;
9
+ /**
10
+ * `meta` is the uppercase tracked micro label. `group` names a group of
11
+ * fields or rows inside a pane in the label type role, in sentence case,
12
+ * e.g. 原文 or 验证记录 with its count as the extra.
13
+ */
14
+ variant?: 'meta' | 'group';
9
15
  className?: string;
10
16
  }
11
- export declare function SectionDivider({ children, extra, rule, className, }: SectionDividerProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function SectionDivider({ children, extra, rule, variant, className, }: SectionDividerProps): import("react/jsx-runtime").JSX.Element;
12
18
  export {};
@@ -1,22 +1,24 @@
1
- import { jsx as i, jsxs as n } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as o } from "react/jsx-runtime";
2
2
  /* empty css */
3
- function t({
3
+ function l({
4
4
  children: s,
5
5
  extra: e,
6
- rule: a = !0,
6
+ rule: r = !0,
7
+ variant: a = "meta",
7
8
  className: d
8
9
  }) {
9
- const r = [
10
+ const n = [
10
11
  "aegis-section-divider",
11
- a ? "aegis-section-divider--ruled" : "",
12
+ r ? "aegis-section-divider--ruled" : "",
13
+ a === "group" ? "aegis-section-divider--group" : "",
12
14
  d ?? ""
13
15
  ].filter(Boolean).join(" ");
14
- return /* @__PURE__ */ i("div", { className: r, children: /* @__PURE__ */ n("div", { className: "aegis-section-divider__head", children: [
16
+ return /* @__PURE__ */ i("div", { className: n, children: /* @__PURE__ */ o("div", { className: "aegis-section-divider__head", children: [
15
17
  /* @__PURE__ */ i("span", { className: "aegis-section-divider__label", children: s }),
16
18
  e && /* @__PURE__ */ i("span", { className: "aegis-section-divider__extra", children: e })
17
19
  ] }) });
18
20
  }
19
21
  export {
20
- t as SectionDivider
22
+ l as SectionDivider
21
23
  };
22
24
  //# sourceMappingURL=SectionDivider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionDivider.js","sources":["../../../src/components/ui/SectionDivider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './SectionDivider.css';\n\ninterface SectionDividerProps {\n /** Uppercase tracked label. */\n children: ReactNode;\n /** Right-aligned content (chip / link / mono value). */\n extra?: ReactNode;\n /** Render the hairline rule below the label. */\n rule?: boolean;\n className?: string;\n}\n\nexport function SectionDivider({\n children,\n extra,\n rule = true,\n className,\n}: SectionDividerProps) {\n const cls = [\n 'aegis-section-divider',\n rule ? 'aegis-section-divider--ruled' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={cls}>\n <div className=\"aegis-section-divider__head\">\n <span className=\"aegis-section-divider__label\">{children}</span>\n {extra && <span className=\"aegis-section-divider__extra\">{extra}</span>}\n </div>\n </div>\n );\n}\n"],"names":["SectionDivider","children","extra","rule","className","cls","jsxs","jsx"],"mappings":";;AAcO,SAASA,EAAe;AAAA,EAC7B,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,WAAAC;AACF,GAAwB;AACtB,QAAMC,IAAM;AAAA,IACV;AAAA,IACAF,IAAO,iCAAiC;AAAA,IACxCC,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,2BACG,OAAA,EAAI,WAAWC,GACd,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,+BACb,UAAA;AAAA,IAAA,gBAAAC,EAAC,QAAA,EAAK,WAAU,gCAAgC,UAAAN,EAAA,CAAS;AAAA,IACxDC,KAAS,gBAAAK,EAAC,QAAA,EAAK,WAAU,gCAAgC,UAAAL,EAAA,CAAM;AAAA,EAAA,EAAA,CAClE,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"SectionDivider.js","sources":["../../../src/components/ui/SectionDivider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './SectionDivider.css';\n\ninterface SectionDividerProps {\n /** Uppercase tracked label. */\n children: ReactNode;\n /** Right-aligned content (chip / link / mono value). */\n extra?: ReactNode;\n /** Render the hairline rule below the label. */\n rule?: boolean;\n /**\n * `meta` is the uppercase tracked micro label. `group` names a group of\n * fields or rows inside a pane in the label type role, in sentence case,\n * e.g. 原文 or 验证记录 with its count as the extra.\n */\n variant?: 'meta' | 'group';\n className?: string;\n}\n\nexport function SectionDivider({\n children,\n extra,\n rule = true,\n variant = 'meta',\n className,\n}: SectionDividerProps) {\n const cls = [\n 'aegis-section-divider',\n rule ? 'aegis-section-divider--ruled' : '',\n variant === 'group' ? 'aegis-section-divider--group' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={cls}>\n <div className=\"aegis-section-divider__head\">\n <span className=\"aegis-section-divider__label\">{children}</span>\n {extra && <span className=\"aegis-section-divider__extra\">{extra}</span>}\n </div>\n </div>\n );\n}\n"],"names":["SectionDivider","children","extra","rule","variant","className","cls","jsxs","jsx"],"mappings":";;AAoBO,SAASA,EAAe;AAAA,EAC7B,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,WAAAC;AACF,GAAwB;AACtB,QAAMC,IAAM;AAAA,IACV;AAAA,IACAH,IAAO,iCAAiC;AAAA,IACxCC,MAAY,UAAU,iCAAiC;AAAA,IACvDC,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,2BACG,OAAA,EAAI,WAAWC,GACd,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,+BACb,UAAA;AAAA,IAAA,gBAAAC,EAAC,QAAA,EAAK,WAAU,gCAAgC,UAAAP,EAAA,CAAS;AAAA,IACxDC,KAAS,gBAAAM,EAAC,QAAA,EAAK,WAAU,gCAAgC,UAAAN,EAAA,CAAM;AAAA,EAAA,EAAA,CAClE,EAAA,CACF;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"StatusDot.cjs","sources":["../../../src/components/ui/StatusDot.tsx"],"sourcesContent":["import './StatusDot.css';\n\ninterface StatusDotProps {\n pulse?: boolean;\n /**\n * Fill colour. `warning` is the anomaly red, for failures only; `caution`\n * is `--ink-warn`, for what needs attention but has not failed.\n */\n tone?: 'ink' | 'inverted' | 'warning' | 'caution' | 'muted' | 'success';\n size?: number;\n className?: string;\n}\n\nexport function StatusDot({\n pulse = false,\n tone = 'ink',\n size = 6,\n className,\n}: StatusDotProps) {\n const cls = [\n 'aegis-status-dot',\n `aegis-status-dot--${tone}`,\n pulse ? 'aegis-status-dot--pulse' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <span\n className={cls}\n style={{ width: size, height: size }}\n aria-hidden=\"true\"\n />\n );\n}\n"],"names":["StatusDot","pulse","tone","size","className","cls","jsx"],"mappings":"oJAaO,SAASA,EAAU,CACxB,MAAAC,EAAQ,GACR,KAAAC,EAAO,MACP,KAAAC,EAAO,EACP,UAAAC,CACF,EAAmB,CACjB,MAAMC,EAAM,CACV,mBACA,qBAAqBH,CAAI,GACzBD,EAAQ,0BAA4B,GACpCG,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EACX,OACEE,EAAAA,IAAC,OAAA,CACC,UAAWD,EACX,MAAO,CAAE,MAAOF,EAAM,OAAQA,CAAA,EAC9B,cAAY,MAAA,CAAA,CAGlB"}
1
+ {"version":3,"file":"StatusDot.cjs","sources":["../../../src/components/ui/StatusDot.tsx"],"sourcesContent":["import './StatusDot.css';\n\ninterface StatusDotProps {\n pulse?: boolean;\n /**\n * Fill colour. `warning` is the anomaly red, for failures only; `caution`\n * is `--ink-warn`, for what needs attention but has not failed; `info`\n * is the link blue, for what is current or in progress.\n */\n tone?:\n | 'ink'\n | 'inverted'\n | 'warning'\n | 'caution'\n | 'info'\n | 'muted'\n | 'success';\n size?: number;\n className?: string;\n}\n\nexport function StatusDot({\n pulse = false,\n tone = 'ink',\n size = 6,\n className,\n}: StatusDotProps) {\n const cls = [\n 'aegis-status-dot',\n `aegis-status-dot--${tone}`,\n pulse ? 'aegis-status-dot--pulse' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <span\n className={cls}\n style={{ width: size, height: size }}\n aria-hidden=\"true\"\n />\n );\n}\n"],"names":["StatusDot","pulse","tone","size","className","cls","jsx"],"mappings":"oJAqBO,SAASA,EAAU,CACxB,MAAAC,EAAQ,GACR,KAAAC,EAAO,MACP,KAAAC,EAAO,EACP,UAAAC,CACF,EAAmB,CACjB,MAAMC,EAAM,CACV,mBACA,qBAAqBH,CAAI,GACzBD,EAAQ,0BAA4B,GACpCG,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EACX,OACEE,EAAAA,IAAC,OAAA,CACC,UAAWD,EACX,MAAO,CAAE,MAAOF,EAAM,OAAQA,CAAA,EAC9B,cAAY,MAAA,CAAA,CAGlB"}
@@ -2,9 +2,10 @@ interface StatusDotProps {
2
2
  pulse?: boolean;
3
3
  /**
4
4
  * Fill colour. `warning` is the anomaly red, for failures only; `caution`
5
- * is `--ink-warn`, for what needs attention but has not failed.
5
+ * is `--ink-warn`, for what needs attention but has not failed; `info`
6
+ * is the link blue, for what is current or in progress.
6
7
  */
7
- tone?: 'ink' | 'inverted' | 'warning' | 'caution' | 'muted' | 'success';
8
+ tone?: 'ink' | 'inverted' | 'warning' | 'caution' | 'info' | 'muted' | 'success';
8
9
  size?: number;
9
10
  className?: string;
10
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"StatusDot.js","sources":["../../../src/components/ui/StatusDot.tsx"],"sourcesContent":["import './StatusDot.css';\n\ninterface StatusDotProps {\n pulse?: boolean;\n /**\n * Fill colour. `warning` is the anomaly red, for failures only; `caution`\n * is `--ink-warn`, for what needs attention but has not failed.\n */\n tone?: 'ink' | 'inverted' | 'warning' | 'caution' | 'muted' | 'success';\n size?: number;\n className?: string;\n}\n\nexport function StatusDot({\n pulse = false,\n tone = 'ink',\n size = 6,\n className,\n}: StatusDotProps) {\n const cls = [\n 'aegis-status-dot',\n `aegis-status-dot--${tone}`,\n pulse ? 'aegis-status-dot--pulse' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <span\n className={cls}\n style={{ width: size, height: size }}\n aria-hidden=\"true\"\n />\n );\n}\n"],"names":["StatusDot","pulse","tone","size","className","cls","jsx"],"mappings":";;AAaO,SAASA,EAAU;AAAA,EACxB,OAAAC,IAAQ;AAAA,EACR,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,WAAAC;AACF,GAAmB;AACjB,QAAMC,IAAM;AAAA,IACV;AAAA,IACA,qBAAqBH,CAAI;AAAA,IACzBD,IAAQ,4BAA4B;AAAA,IACpCG,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AACX,SACE,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWD;AAAA,MACX,OAAO,EAAE,OAAOF,GAAM,QAAQA,EAAA;AAAA,MAC9B,eAAY;AAAA,IAAA;AAAA,EAAA;AAGlB;"}
1
+ {"version":3,"file":"StatusDot.js","sources":["../../../src/components/ui/StatusDot.tsx"],"sourcesContent":["import './StatusDot.css';\n\ninterface StatusDotProps {\n pulse?: boolean;\n /**\n * Fill colour. `warning` is the anomaly red, for failures only; `caution`\n * is `--ink-warn`, for what needs attention but has not failed; `info`\n * is the link blue, for what is current or in progress.\n */\n tone?:\n | 'ink'\n | 'inverted'\n | 'warning'\n | 'caution'\n | 'info'\n | 'muted'\n | 'success';\n size?: number;\n className?: string;\n}\n\nexport function StatusDot({\n pulse = false,\n tone = 'ink',\n size = 6,\n className,\n}: StatusDotProps) {\n const cls = [\n 'aegis-status-dot',\n `aegis-status-dot--${tone}`,\n pulse ? 'aegis-status-dot--pulse' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <span\n className={cls}\n style={{ width: size, height: size }}\n aria-hidden=\"true\"\n />\n );\n}\n"],"names":["StatusDot","pulse","tone","size","className","cls","jsx"],"mappings":";;AAqBO,SAASA,EAAU;AAAA,EACxB,OAAAC,IAAQ;AAAA,EACR,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,WAAAC;AACF,GAAmB;AACjB,QAAMC,IAAM;AAAA,IACV;AAAA,IACA,qBAAqBH,CAAI;AAAA,IACzBD,IAAQ,4BAA4B;AAAA,IACpCG,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AACX,SACE,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWD;AAAA,MACX,OAAO,EAAE,OAAOF,GAAM,QAAQA,EAAA;AAAA,MAC9B,eAAY;AAAA,IAAA;AAAA,EAAA;AAGlB;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");;/* empty css */function r({left:i,center:l,right:o,className:s}){const a=["aegis-toolbar",s??""].filter(Boolean).join(" ");return e.jsxs("div",{className:a,children:[e.jsx("div",{className:"aegis-toolbar__left",children:i}),l!==void 0?e.jsx("div",{className:"aegis-toolbar__center",children:l}):null,o!==void 0?e.jsx("div",{className:"aegis-toolbar__right",children:o}):null]})}exports.Toolbar=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");;/* empty css */function t({left:a,center:l,right:o,variant:s="default",className:i}){const r=["aegis-toolbar",s==="default"?"":`aegis-toolbar--${s}`,i??""].filter(Boolean).join(" ");return e.jsxs("div",{className:r,children:[e.jsx("div",{className:"aegis-toolbar__left",children:a}),l!==void 0?e.jsx("div",{className:"aegis-toolbar__center",children:l}):null,o!==void 0?e.jsx("div",{className:"aegis-toolbar__right",children:o}):null]})}exports.Toolbar=t;
2
2
  //# sourceMappingURL=Toolbar.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.cjs","sources":["../../../src/components/ui/Toolbar.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './Toolbar.css';\n\nexport interface ToolbarProps {\n /** Leading controls, e.g. a `SearchInput` and its filter chips. */\n left?: ReactNode;\n center?: ReactNode;\n /** Trailing actions. */\n right?: ReactNode;\n className?: string;\n}\n\n/** A row of controls over a list or table: left, optional center, right. */\nexport function Toolbar({ left, center, right, className }: ToolbarProps) {\n const cls = ['aegis-toolbar', className ?? ''].filter(Boolean).join(' ');\n return (\n <div className={cls}>\n <div className=\"aegis-toolbar__left\">{left}</div>\n {center !== undefined ? (\n <div className=\"aegis-toolbar__center\">{center}</div>\n ) : null}\n {right !== undefined ? (\n <div className=\"aegis-toolbar__right\">{right}</div>\n ) : null}\n </div>\n );\n}\n"],"names":["Toolbar","left","center","right","className","cls","jsxs","jsx"],"mappings":"kJAcO,SAASA,EAAQ,CAAE,KAAAC,EAAM,OAAAC,EAAQ,MAAAC,EAAO,UAAAC,GAA2B,CACxE,MAAMC,EAAM,CAAC,gBAAiBD,GAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EACvE,OACEE,EAAAA,KAAC,MAAA,CAAI,UAAWD,EACd,SAAA,CAAAE,EAAAA,IAAC,MAAA,CAAI,UAAU,sBAAuB,SAAAN,EAAK,EAC1CC,IAAW,OACVK,EAAAA,IAAC,OAAI,UAAU,wBAAyB,WAAO,EAC7C,KACHJ,IAAU,OACTI,EAAAA,IAAC,OAAI,UAAU,uBAAwB,WAAM,EAC3C,IAAA,EACN,CAEJ"}
1
+ {"version":3,"file":"Toolbar.cjs","sources":["../../../src/components/ui/Toolbar.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './Toolbar.css';\n\nexport interface ToolbarProps {\n /** Leading controls, e.g. a `SearchInput` and its filter chips. */\n left?: ReactNode;\n center?: ReactNode;\n /** Trailing actions. */\n right?: ReactNode;\n /**\n * `default` is a padded row over a list or table. `page` is a page's top\n * bar, `--page-bar-height` high: its title on the left (a `PanelTitle`\n * as `h1`), its selectors and buttons on the right. `sub` is the\n * `--sub-bar-height` row under it, e.g. a trace path or a run's facts.\n * Each draws a hairline below; `page` and `sub` sit flush with the page's\n * edges, so a bleed page stacks them over its `PaneLayout`.\n */\n variant?: 'default' | 'page' | 'sub';\n className?: string;\n}\n\n/** A row of controls over a list or table: left, optional center, right. */\nexport function Toolbar({\n left,\n center,\n right,\n variant = 'default',\n className,\n}: ToolbarProps) {\n const cls = [\n 'aegis-toolbar',\n variant === 'default' ? '' : `aegis-toolbar--${variant}`,\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div className={cls}>\n <div className=\"aegis-toolbar__left\">{left}</div>\n {center !== undefined ? (\n <div className=\"aegis-toolbar__center\">{center}</div>\n ) : null}\n {right !== undefined ? (\n <div className=\"aegis-toolbar__right\">{right}</div>\n ) : null}\n </div>\n );\n}\n"],"names":["Toolbar","left","center","right","variant","className","cls","jsxs","jsx"],"mappings":"kJAuBO,SAASA,EAAQ,CACtB,KAAAC,EACA,OAAAC,EACA,MAAAC,EACA,QAAAC,EAAU,UACV,UAAAC,CACF,EAAiB,CACf,MAAMC,EAAM,CACV,gBACAF,IAAY,UAAY,GAAK,kBAAkBA,CAAO,GACtDC,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EACX,OACEE,EAAAA,KAAC,MAAA,CAAI,UAAWD,EACd,SAAA,CAAAE,EAAAA,IAAC,MAAA,CAAI,UAAU,sBAAuB,SAAAP,EAAK,EAC1CC,IAAW,OACVM,EAAAA,IAAC,OAAI,UAAU,wBAAyB,WAAO,EAC7C,KACHL,IAAU,OACTK,EAAAA,IAAC,OAAI,UAAU,uBAAwB,WAAM,EAC3C,IAAA,EACN,CAEJ"}
@@ -5,7 +5,16 @@ export interface ToolbarProps {
5
5
  center?: ReactNode;
6
6
  /** Trailing actions. */
7
7
  right?: ReactNode;
8
+ /**
9
+ * `default` is a padded row over a list or table. `page` is a page's top
10
+ * bar, `--page-bar-height` high: its title on the left (a `PanelTitle`
11
+ * as `h1`), its selectors and buttons on the right. `sub` is the
12
+ * `--sub-bar-height` row under it, e.g. a trace path or a run's facts.
13
+ * Each draws a hairline below; `page` and `sub` sit flush with the page's
14
+ * edges, so a bleed page stacks them over its `PaneLayout`.
15
+ */
16
+ variant?: 'default' | 'page' | 'sub';
8
17
  className?: string;
9
18
  }
10
19
  /** A row of controls over a list or table: left, optional center, right. */
11
- export declare function Toolbar({ left, center, right, className }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function Toolbar({ left, center, right, variant, className, }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,24 @@
1
- import { jsxs as r, jsx as l } from "react/jsx-runtime";
1
+ import { jsxs as t, jsx as l } from "react/jsx-runtime";
2
2
  /* empty css */
3
- function c({ left: a, center: o, right: i, className: e }) {
4
- const s = ["aegis-toolbar", e ?? ""].filter(Boolean).join(" ");
5
- return /* @__PURE__ */ r("div", { className: s, children: [
6
- /* @__PURE__ */ l("div", { className: "aegis-toolbar__left", children: a }),
3
+ function n({
4
+ left: i,
5
+ center: o,
6
+ right: a,
7
+ variant: e = "default",
8
+ className: s
9
+ }) {
10
+ const r = [
11
+ "aegis-toolbar",
12
+ e === "default" ? "" : `aegis-toolbar--${e}`,
13
+ s ?? ""
14
+ ].filter(Boolean).join(" ");
15
+ return /* @__PURE__ */ t("div", { className: r, children: [
16
+ /* @__PURE__ */ l("div", { className: "aegis-toolbar__left", children: i }),
7
17
  o !== void 0 ? /* @__PURE__ */ l("div", { className: "aegis-toolbar__center", children: o }) : null,
8
- i !== void 0 ? /* @__PURE__ */ l("div", { className: "aegis-toolbar__right", children: i }) : null
18
+ a !== void 0 ? /* @__PURE__ */ l("div", { className: "aegis-toolbar__right", children: a }) : null
9
19
  ] });
10
20
  }
11
21
  export {
12
- c as Toolbar
22
+ n as Toolbar
13
23
  };
14
24
  //# sourceMappingURL=Toolbar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.js","sources":["../../../src/components/ui/Toolbar.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './Toolbar.css';\n\nexport interface ToolbarProps {\n /** Leading controls, e.g. a `SearchInput` and its filter chips. */\n left?: ReactNode;\n center?: ReactNode;\n /** Trailing actions. */\n right?: ReactNode;\n className?: string;\n}\n\n/** A row of controls over a list or table: left, optional center, right. */\nexport function Toolbar({ left, center, right, className }: ToolbarProps) {\n const cls = ['aegis-toolbar', className ?? ''].filter(Boolean).join(' ');\n return (\n <div className={cls}>\n <div className=\"aegis-toolbar__left\">{left}</div>\n {center !== undefined ? (\n <div className=\"aegis-toolbar__center\">{center}</div>\n ) : null}\n {right !== undefined ? (\n <div className=\"aegis-toolbar__right\">{right}</div>\n ) : null}\n </div>\n );\n}\n"],"names":["Toolbar","left","center","right","className","cls","jsxs","jsx"],"mappings":";;AAcO,SAASA,EAAQ,EAAE,MAAAC,GAAM,QAAAC,GAAQ,OAAAC,GAAO,WAAAC,KAA2B;AACxE,QAAMC,IAAM,CAAC,iBAAiBD,KAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AACvE,SACE,gBAAAE,EAAC,OAAA,EAAI,WAAWD,GACd,UAAA;AAAA,IAAA,gBAAAE,EAAC,OAAA,EAAI,WAAU,uBAAuB,UAAAN,GAAK;AAAA,IAC1CC,MAAW,SACV,gBAAAK,EAAC,SAAI,WAAU,yBAAyB,aAAO,IAC7C;AAAA,IACHJ,MAAU,SACT,gBAAAI,EAAC,SAAI,WAAU,wBAAwB,aAAM,IAC3C;AAAA,EAAA,GACN;AAEJ;"}
1
+ {"version":3,"file":"Toolbar.js","sources":["../../../src/components/ui/Toolbar.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './Toolbar.css';\n\nexport interface ToolbarProps {\n /** Leading controls, e.g. a `SearchInput` and its filter chips. */\n left?: ReactNode;\n center?: ReactNode;\n /** Trailing actions. */\n right?: ReactNode;\n /**\n * `default` is a padded row over a list or table. `page` is a page's top\n * bar, `--page-bar-height` high: its title on the left (a `PanelTitle`\n * as `h1`), its selectors and buttons on the right. `sub` is the\n * `--sub-bar-height` row under it, e.g. a trace path or a run's facts.\n * Each draws a hairline below; `page` and `sub` sit flush with the page's\n * edges, so a bleed page stacks them over its `PaneLayout`.\n */\n variant?: 'default' | 'page' | 'sub';\n className?: string;\n}\n\n/** A row of controls over a list or table: left, optional center, right. */\nexport function Toolbar({\n left,\n center,\n right,\n variant = 'default',\n className,\n}: ToolbarProps) {\n const cls = [\n 'aegis-toolbar',\n variant === 'default' ? '' : `aegis-toolbar--${variant}`,\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div className={cls}>\n <div className=\"aegis-toolbar__left\">{left}</div>\n {center !== undefined ? (\n <div className=\"aegis-toolbar__center\">{center}</div>\n ) : null}\n {right !== undefined ? (\n <div className=\"aegis-toolbar__right\">{right}</div>\n ) : null}\n </div>\n );\n}\n"],"names":["Toolbar","left","center","right","variant","className","cls","jsxs","jsx"],"mappings":";;AAuBO,SAASA,EAAQ;AAAA,EACtB,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC;AACF,GAAiB;AACf,QAAMC,IAAM;AAAA,IACV;AAAA,IACAF,MAAY,YAAY,KAAK,kBAAkBA,CAAO;AAAA,IACtDC,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AACX,SACE,gBAAAE,EAAC,OAAA,EAAI,WAAWD,GACd,UAAA;AAAA,IAAA,gBAAAE,EAAC,OAAA,EAAI,WAAU,uBAAuB,UAAAP,GAAK;AAAA,IAC1CC,MAAW,SACV,gBAAAM,EAAC,SAAI,WAAU,yBAAyB,aAAO,IAC7C;AAAA,IACHL,MAAU,SACT,gBAAAK,EAAC,SAAI,WAAU,wBAAwB,aAAM,IAC3C;AAAA,EAAA,GACN;AAEJ;"}