@apliteni/apliteni-ui 0.130.0 → 0.131.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.
@@ -94,7 +94,7 @@ var cx = (...a) => a.filter(Boolean).join(" ");
94
94
  var Button = forwardRef3(function Button2({
95
95
  variant = "secondary",
96
96
  size = "md",
97
- icon: icon7,
97
+ icon: icon8,
98
98
  leading,
99
99
  iconRight,
100
100
  iconOnly,
@@ -158,7 +158,7 @@ var Button = forwardRef3(function Button2({
158
158
  className
159
159
  );
160
160
  const labelled = rest["aria-label"] != null || rest["aria-labelledby"] != null;
161
- const fallback = typeof children === "string" && children.trim() ? children.trim() : icon7;
161
+ const fallback = typeof children === "string" && children.trim() ? children.trim() : icon8;
162
162
  const named = iconOnly && !labelled && fallback ? { "aria-label": fallback, title: rest.title ?? fallback } : {};
163
163
  const Root = href === void 0 ? "button" : "a";
164
164
  return /* @__PURE__ */ jsxs3(
@@ -203,7 +203,7 @@ var Button = forwardRef3(function Button2({
203
203
  if (!blockKey(event)) onKeyUp?.(event);
204
204
  },
205
205
  children: [
206
- leading != null ? /* @__PURE__ */ jsx4("span", { "aria-hidden": "true", style: { display: "inline-flex" }, children: leading }) : icon7 && /* @__PURE__ */ jsx4(Icon, { name: icon7 }),
206
+ leading != null ? /* @__PURE__ */ jsx4("span", { "aria-hidden": "true", style: { display: "inline-flex" }, children: leading }) : icon8 && /* @__PURE__ */ jsx4(Icon, { name: icon8 }),
207
207
  !iconOnly && renderedChildren != null && /* @__PURE__ */ jsx4("span", { className: "ui-btn__label-slot", children: /* @__PURE__ */ jsx4("span", { className: "ui-btn__label", ref: labelRef, children: renderedChildren }) }),
208
208
  iconRight && /* @__PURE__ */ jsx4(Icon, { name: iconRight }),
209
209
  busy && /* @__PURE__ */ jsxs3("span", { className: "ui-btn__dots", "aria-hidden": "true", children: [
@@ -223,21 +223,46 @@ function Badge({ variant = "neutral", children }) {
223
223
  return /* @__PURE__ */ jsx5("span", { className: cls, children });
224
224
  }
225
225
 
226
+ // src/primitives/Avatar.tsx
227
+ import { useCallback, useState } from "react";
228
+ import { icon as icon2, avatarHue, avatarInitials } from "@apliteni/apliteni-ui";
229
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
230
+ function Avatar({ personKey, name, src, size = 24, empty = false }) {
231
+ const [failedSrc, setFailedSrc] = useState(null);
232
+ const [loadedSrc, setLoadedSrc] = useState(null);
233
+ const inspectPhoto = useCallback((img) => {
234
+ if (!img || !src || !img.complete) return;
235
+ if (img.naturalWidth > 0) setLoadedSrc(src);
236
+ else setFailedSrc(src);
237
+ }, [src]);
238
+ const base = ["ui-avatar", size === 32 && "ui-avatar--32"];
239
+ const cls = (...more) => [...base, ...more].filter(Boolean).join(" ");
240
+ if (empty) return /* @__PURE__ */ jsx6("span", { className: cls("ui-avatar--empty"), "aria-hidden": "true" });
241
+ const letters = avatarInitials(name);
242
+ if (!letters) {
243
+ return /* @__PURE__ */ jsx6("span", { className: cls("ui-avatar--anon"), "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon2("user") } });
244
+ }
245
+ return /* @__PURE__ */ jsxs4("span", { className: cls(`ui-avatar--h${avatarHue(personKey ?? name)}`), "data-initials": letters.length, "aria-hidden": "true", children: [
246
+ letters,
247
+ src && src !== failedSrc && /* @__PURE__ */ jsx6("img", { ref: inspectPhoto, src, alt: "", loading: "lazy", className: loadedSrc === src ? "is-loaded" : void 0, onLoad: () => setLoadedSrc(src), onError: () => setFailedSrc(src) })
248
+ ] });
249
+ }
250
+
226
251
  // src/primitives/Pill.tsx
227
252
  import { forwardRef as forwardRef4 } from "react";
228
- import { jsx as jsx6 } from "react/jsx-runtime";
253
+ import { jsx as jsx7 } from "react/jsx-runtime";
229
254
  var Pill = forwardRef4(function Pill2({
230
255
  variant,
231
256
  className,
232
257
  ...rest
233
258
  }, ref) {
234
259
  const classes = ["ui-pill", variant && `ui-pill--${variant}`, className].filter(Boolean).join(" ");
235
- return /* @__PURE__ */ jsx6("span", { ...rest, ref, className: classes });
260
+ return /* @__PURE__ */ jsx7("span", { ...rest, ref, className: classes });
236
261
  });
237
262
 
238
263
  // src/primitives/StatusDot.tsx
239
264
  import { forwardRef as forwardRef5 } from "react";
240
- import { jsx as jsx7 } from "react/jsx-runtime";
265
+ import { jsx as jsx8 } from "react/jsx-runtime";
241
266
  var StatusDot = forwardRef5(function StatusDot2({
242
267
  live = false,
243
268
  className,
@@ -245,7 +270,7 @@ var StatusDot = forwardRef5(function StatusDot2({
245
270
  }, ref) {
246
271
  const labelled = Boolean(rest["aria-label"]?.trim() || rest["aria-labelledby"]?.trim());
247
272
  const classes = ["ui-dot", live && "is-live", className].filter(Boolean).join(" ");
248
- return /* @__PURE__ */ jsx7(
273
+ return /* @__PURE__ */ jsx8(
249
274
  "span",
250
275
  {
251
276
  role: labelled ? "img" : void 0,
@@ -258,27 +283,27 @@ var StatusDot = forwardRef5(function StatusDot2({
258
283
  });
259
284
 
260
285
  // src/primitives/Card.tsx
261
- import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
286
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
262
287
  function Card({ title, sub, level = 2, className, children }) {
263
288
  const n = Number(level);
264
289
  const Heading = `h${[2, 3, 4, 5, 6].includes(n) ? n : 2}`;
265
290
  const titled = title != null && title !== false && title !== "";
266
- return /* @__PURE__ */ jsxs4("div", { className: ["ui-card", className].filter(Boolean).join(" "), children: [
267
- titled && /* @__PURE__ */ jsx8(Heading, { className: "ui-card__title", children: title }),
268
- sub != null && /* @__PURE__ */ jsx8("div", { className: "ui-card__sub", children: sub }),
291
+ return /* @__PURE__ */ jsxs5("div", { className: ["ui-card", className].filter(Boolean).join(" "), children: [
292
+ titled && /* @__PURE__ */ jsx9(Heading, { className: "ui-card__title", children: title }),
293
+ sub != null && /* @__PURE__ */ jsx9("div", { className: "ui-card__sub", children: sub }),
269
294
  children
270
295
  ] });
271
296
  }
272
297
 
273
298
  // src/primitives/Callout.tsx
274
299
  import { calloutIcons, icon as kitIcon } from "@apliteni/apliteni-ui";
275
- import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
276
- function Callout({ variant, icon: icon7 = calloutIcons[variant ?? "neutral"], children, actions }) {
277
- return /* @__PURE__ */ jsxs5("div", { className: `ui-callout${variant && variant !== "neutral" ? ` ui-callout--${variant}` : ""}`, role: variant === "danger" ? "alert" : void 0, children: [
278
- /* @__PURE__ */ jsx9("span", { className: "ui-callout__icon", dangerouslySetInnerHTML: { __html: kitIcon(icon7) } }),
279
- /* @__PURE__ */ jsxs5("div", { className: "ui-callout__body", children: [
300
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
301
+ function Callout({ variant, icon: icon8 = calloutIcons[variant ?? "neutral"], children, actions }) {
302
+ return /* @__PURE__ */ jsxs6("div", { className: `ui-callout${variant && variant !== "neutral" ? ` ui-callout--${variant}` : ""}`, role: variant === "danger" ? "alert" : void 0, children: [
303
+ /* @__PURE__ */ jsx10("span", { className: "ui-callout__icon", dangerouslySetInnerHTML: { __html: kitIcon(icon8) } }),
304
+ /* @__PURE__ */ jsxs6("div", { className: "ui-callout__body", children: [
280
305
  children,
281
- actions != null && /* @__PURE__ */ jsx9("div", { className: "ui-toolbar ui-callout__actions", children: actions })
306
+ actions != null && /* @__PURE__ */ jsx10("div", { className: "ui-toolbar ui-callout__actions", children: actions })
282
307
  ] })
283
308
  ] });
284
309
  }
@@ -326,8 +351,8 @@ function placeTip(host, mark, tip, bound, placement = "top") {
326
351
  }
327
352
 
328
353
  // src/Tooltip.tsx
329
- import { useEffect, useId as useId2, useLayoutEffect as useLayoutEffect2, useRef as useRef2, useState } from "react";
330
- import { Fragment, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
354
+ import { useEffect, useId as useId2, useLayoutEffect as useLayoutEffect2, useRef as useRef2, useState as useState2 } from "react";
355
+ import { Fragment, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
331
356
  var DOC_EVENTS = ["pointerdown", "pointercancel", "click", "keydown", "touchend"];
332
357
  var CAPTURED = /* @__PURE__ */ new Set(["pointerdown", "pointercancel"]);
333
358
  var wirings = /* @__PURE__ */ new WeakMap();
@@ -354,10 +379,10 @@ function wireDocument(doc, handlers) {
354
379
  wirings.delete(doc);
355
380
  };
356
381
  }
357
- var Text = ({ label = "", value = "", detail: detail2 = "" }) => /* @__PURE__ */ jsxs6(Fragment, { children: [
358
- /* @__PURE__ */ jsx10("span", { className: "ui-tip__label", hidden: !label, children: label }),
359
- /* @__PURE__ */ jsx10("span", { className: "ui-tip__value", hidden: !value, children: value }),
360
- /* @__PURE__ */ jsx10("span", { className: "ui-tip__detail", hidden: !detail2, children: detail2 })
382
+ var Text = ({ label = "", value = "", detail: detail2 = "" }) => /* @__PURE__ */ jsxs7(Fragment, { children: [
383
+ /* @__PURE__ */ jsx11("span", { className: "ui-tip__label", hidden: !label, children: label }),
384
+ /* @__PURE__ */ jsx11("span", { className: "ui-tip__value", hidden: !value, children: value }),
385
+ /* @__PURE__ */ jsx11("span", { className: "ui-tip__detail", hidden: !detail2, children: detail2 })
361
386
  ] });
362
387
  function Tooltip({ text: text2, label = text2, value, detail: detail2, placement = "top", children }) {
363
388
  const id = useId2();
@@ -369,7 +394,7 @@ function Tooltip({ text: text2, label = text2, value, detail: detail2, placement
369
394
  const pointerKind = useRef2("");
370
395
  const pendingClick = useRef2(null);
371
396
  const dismissed = useRef2(null);
372
- const [mark, setMark] = useState(null);
397
+ const [mark, setMark] = useState2(null);
373
398
  const active = useRef2(null);
374
399
  active.current = mark;
375
400
  const open = mark !== null;
@@ -435,7 +460,7 @@ function Tooltip({ text: text2, label = text2, value, detail: detail2, placement
435
460
  view.removeEventListener("resize", reposition);
436
461
  };
437
462
  }, [open, placement]);
438
- return /* @__PURE__ */ jsxs6(
463
+ return /* @__PURE__ */ jsxs7(
439
464
  "span",
440
465
  {
441
466
  ref: host,
@@ -507,15 +532,15 @@ function Tooltip({ text: text2, label = text2, value, detail: detail2, placement
507
532
  }
508
533
  },
509
534
  children: [
510
- /* @__PURE__ */ jsx10("span", { ref: trigger, className: "ui-focusable", tabIndex: 0, "aria-describedby": id, children }),
511
- /* @__PURE__ */ jsx10("span", { ref: tip, id, "data-tip": "", role: "tooltip", className: `ui-tip${open ? " is-open" : ""}`, children: /* @__PURE__ */ jsx10(Text, { label, value, detail: detail2 }) })
535
+ /* @__PURE__ */ jsx11("span", { ref: trigger, className: "ui-focusable", tabIndex: 0, "aria-describedby": id, children }),
536
+ /* @__PURE__ */ jsx11("span", { ref: tip, id, "data-tip": "", role: "tooltip", className: `ui-tip${open ? " is-open" : ""}`, children: /* @__PURE__ */ jsx11(Text, { label, value, detail: detail2 }) })
512
537
  ]
513
538
  }
514
539
  );
515
540
  }
516
541
 
517
542
  // src/primitives/StatBand.tsx
518
- import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
543
+ import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
519
544
  var GLYPH = { up: "arrowUp", down: "arrowDown", flat: "minus" };
520
545
  var directionOf = (text2) => {
521
546
  const t = text2.trim();
@@ -523,20 +548,20 @@ var directionOf = (text2) => {
523
548
  };
524
549
  var hasChange = (d) => !!d && d.value != null && d.value !== "";
525
550
  function ContextRow({ caption, delta, basisId }) {
526
- if (!hasChange(delta)) return caption ? /* @__PURE__ */ jsx11("dd", { className: "ui-stat__caption", children: caption }) : null;
527
- const lead = caption ? /* @__PURE__ */ jsxs7(Fragment2, { children: [
528
- /* @__PURE__ */ jsx11("span", { className: "ui-stat__caption", children: caption }),
551
+ if (!hasChange(delta)) return caption ? /* @__PURE__ */ jsx12("dd", { className: "ui-stat__caption", children: caption }) : null;
552
+ const lead = caption ? /* @__PURE__ */ jsxs8(Fragment2, { children: [
553
+ /* @__PURE__ */ jsx12("span", { className: "ui-stat__caption", children: caption }),
529
554
  " "
530
555
  ] }) : null;
531
556
  const dir = delta.direction && GLYPH[delta.direction] ? delta.direction : directionOf(delta.value);
532
557
  const own = delta.basis || "";
533
- return /* @__PURE__ */ jsxs7("dd", { className: "ui-stat__delta", "aria-describedby": !own && basisId ? basisId : void 0, children: [
558
+ return /* @__PURE__ */ jsxs8("dd", { className: "ui-stat__delta", "aria-describedby": !own && basisId ? basisId : void 0, children: [
534
559
  lead,
535
- /* @__PURE__ */ jsx11(Icon, { name: GLYPH[dir] }),
536
- delta.tooltip ? /* @__PURE__ */ jsx11(Tooltip, { text: delta.tooltip, children: /* @__PURE__ */ jsx11("span", { className: "ui-stat__change", children: delta.value }) }) : /* @__PURE__ */ jsx11("span", { className: "ui-stat__change", children: delta.value }),
537
- own ? /* @__PURE__ */ jsxs7(Fragment2, { children: [
560
+ /* @__PURE__ */ jsx12(Icon, { name: GLYPH[dir] }),
561
+ delta.tooltip ? /* @__PURE__ */ jsx12(Tooltip, { text: delta.tooltip, children: /* @__PURE__ */ jsx12("span", { className: "ui-stat__change", children: delta.value }) }) : /* @__PURE__ */ jsx12("span", { className: "ui-stat__change", children: delta.value }),
562
+ own ? /* @__PURE__ */ jsxs8(Fragment2, { children: [
538
563
  " ",
539
- /* @__PURE__ */ jsx11("span", { className: "ui-stat__basis", children: own })
564
+ /* @__PURE__ */ jsx12("span", { className: "ui-stat__basis", children: own })
540
565
  ] }) : null
541
566
  ] });
542
567
  }
@@ -545,16 +570,16 @@ function StatBand({ stats, variant = "tiles", basis, basisId: sharedBasisId, lab
545
570
  const v = ["band", "tiles", "open"].includes(variant) ? variant : "tiles";
546
571
  const basisId = basis ? `${id || auto}-basis` : sharedBasisId;
547
572
  const root = ["ui-stats", `ui-stats--${v}`, v === "band" && "ui-card"].filter(Boolean).join(" ");
548
- return /* @__PURE__ */ jsxs7("div", { className: root, role: label ? "group" : void 0, "aria-label": label || void 0, children: [
549
- basis ? /* @__PURE__ */ jsx11("p", { className: "ui-stats__basis", id: basisId, children: basis }) : null,
550
- /* @__PURE__ */ jsx11("dl", { className: "ui-stats__list", children: stats.map((s, i) => {
573
+ return /* @__PURE__ */ jsxs8("div", { className: root, role: label ? "group" : void 0, "aria-label": label || void 0, children: [
574
+ basis ? /* @__PURE__ */ jsx12("p", { className: "ui-stats__basis", id: basisId, children: basis }) : null,
575
+ /* @__PURE__ */ jsx12("dl", { className: "ui-stats__list", children: stats.map((s, i) => {
551
576
  const tone = hasChange(s.delta) && (s.delta.tone === "good" || s.delta.tone === "bad") ? s.delta.tone : "";
552
577
  const cls = ["ui-stat", tone && `ui-stat--${tone}`, v === "tiles" && "ui-card ui-card--pad-sm"].filter(Boolean).join(" ");
553
- return /* @__PURE__ */ jsxs7("div", { className: cls, children: [
554
- /* @__PURE__ */ jsx11("dt", { className: "ui-stat__label", children: s.label }),
555
- /* @__PURE__ */ jsx11("dd", { className: "ui-stat__value", children: s.value }),
556
- /* @__PURE__ */ jsx11(ContextRow, { caption: s.caption, delta: s.delta, basisId }),
557
- s.trend ? /* @__PURE__ */ jsx11("dd", { className: "ui-stat__trend", children: s.trend }) : null
578
+ return /* @__PURE__ */ jsxs8("div", { className: cls, children: [
579
+ /* @__PURE__ */ jsx12("dt", { className: "ui-stat__label", children: s.label }),
580
+ /* @__PURE__ */ jsx12("dd", { className: "ui-stat__value", children: s.value }),
581
+ /* @__PURE__ */ jsx12(ContextRow, { caption: s.caption, delta: s.delta, basisId }),
582
+ s.trend ? /* @__PURE__ */ jsx12("dd", { className: "ui-stat__trend", children: s.trend }) : null
558
583
  ] }, `${s.label}-${i}`);
559
584
  }) })
560
585
  ] });
@@ -574,7 +599,7 @@ import {
574
599
  useEffect as useEffect2,
575
600
  useLayoutEffect as useLayoutEffect3,
576
601
  useRef as useRef3,
577
- useState as useState2
602
+ useState as useState3
578
603
  } from "react";
579
604
  import { transitionMs } from "@apliteni/apliteni-ui";
580
605
  var FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), details > summary:first-of-type';
@@ -694,8 +719,8 @@ function exit(entry) {
694
719
  }
695
720
  var EXIT_SLACK_MS = 50;
696
721
  function usePresence(open, root, panel) {
697
- const [present, setPresent] = useState2(open);
698
- const [entered, setEntered] = useState2(false);
722
+ const [present, setPresent] = useState3(open);
723
+ const [entered, setEntered] = useState3(false);
699
724
  if (open && !present) setPresent(true);
700
725
  const shown = open && entered;
701
726
  useIsoLayoutEffect(() => {
@@ -744,7 +769,7 @@ function usePresence(open, root, panel) {
744
769
  }
745
770
  function useDialog(active, { root, panel, body, initialFocus }, onClose) {
746
771
  const parent = useContext(DialogScope);
747
- const [scope] = useState2(() => ({ parent }));
772
+ const [scope] = useState3(() => ({ parent }));
748
773
  const close = useRef3(onClose);
749
774
  useIsoLayoutEffect(() => {
750
775
  close.current = onClose;
@@ -768,7 +793,7 @@ function useDialog(active, { root, panel, body, initialFocus }, onClose) {
768
793
  }
769
794
 
770
795
  // src/Modal.tsx
771
- import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
796
+ import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
772
797
  function Modal({ open, title, onClose, footer, children, initialFocusRef, role = "dialog" }) {
773
798
  const id = useId4();
774
799
  const titleId = `${id}-title`;
@@ -780,7 +805,7 @@ function Modal({ open, title, onClose, footer, children, initialFocusRef, role =
780
805
  const scope = useDialog(shown, { root, panel, body, initialFocus: initialFocusRef }, onClose);
781
806
  if (!mounted) return null;
782
807
  return createPortal(
783
- /* @__PURE__ */ jsx12(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsx12("div", { className: shown ? "rx-scrim is-open" : "rx-scrim", ref: root, onMouseDown: dismissOnScrim(onClose), children: /* @__PURE__ */ jsxs8(
808
+ /* @__PURE__ */ jsx13(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsx13("div", { className: shown ? "rx-scrim is-open" : "rx-scrim", ref: root, onMouseDown: dismissOnScrim(onClose), children: /* @__PURE__ */ jsxs9(
784
809
  "div",
785
810
  {
786
811
  className: "rx-modal",
@@ -791,12 +816,12 @@ function Modal({ open, title, onClose, footer, children, initialFocusRef, role =
791
816
  tabIndex: -1,
792
817
  ref: panel,
793
818
  children: [
794
- /* @__PURE__ */ jsxs8("div", { className: "rx-modal__head", children: [
795
- /* @__PURE__ */ jsx12("h2", { className: "rx-modal__title", id: titleId, children: title }),
796
- /* @__PURE__ */ jsx12(Button, { variant: "ghost", size: "sm", iconOnly: true, icon: "x", "aria-label": "Close", onClick: onClose })
819
+ /* @__PURE__ */ jsxs9("div", { className: "rx-modal__head", children: [
820
+ /* @__PURE__ */ jsx13("h2", { className: "rx-modal__title", id: titleId, children: title }),
821
+ /* @__PURE__ */ jsx13(Button, { variant: "ghost", size: "sm", iconOnly: true, icon: "x", "aria-label": "Close", onClick: onClose })
797
822
  ] }),
798
- /* @__PURE__ */ jsx12("div", { className: "rx-modal__body", id: bodyId, ref: body, children }),
799
- footer && /* @__PURE__ */ jsx12("div", { className: "rx-modal__foot", children: footer })
823
+ /* @__PURE__ */ jsx13("div", { className: "rx-modal__body", id: bodyId, ref: body, children }),
824
+ footer && /* @__PURE__ */ jsx13("div", { className: "rx-modal__foot", children: footer })
800
825
  ]
801
826
  }
802
827
  ) }) }),
@@ -805,7 +830,7 @@ function Modal({ open, title, onClose, footer, children, initialFocusRef, role =
805
830
  }
806
831
 
807
832
  // src/Confirm.tsx
808
- import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
833
+ import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
809
834
  function Confirm({
810
835
  open,
811
836
  title,
@@ -818,7 +843,7 @@ function Confirm({
818
843
  onCancel
819
844
  }) {
820
845
  const safeAction = useRef5(null);
821
- return /* @__PURE__ */ jsx13(
846
+ return /* @__PURE__ */ jsx14(
822
847
  Modal,
823
848
  {
824
849
  open,
@@ -826,9 +851,9 @@ function Confirm({
826
851
  onClose: onCancel,
827
852
  role: "alertdialog",
828
853
  initialFocusRef: safeAction,
829
- footer: /* @__PURE__ */ jsxs9(Fragment3, { children: [
830
- /* @__PURE__ */ jsx13(Button, { ref: safeAction, variant: "ghost", onClick: onCancel, children: cancelLabel }),
831
- /* @__PURE__ */ jsx13(Button, { variant: danger ? "danger" : "primary", busy, onClick: onConfirm, children: confirmLabel })
854
+ footer: /* @__PURE__ */ jsxs10(Fragment3, { children: [
855
+ /* @__PURE__ */ jsx14(Button, { ref: safeAction, variant: "ghost", onClick: onCancel, children: cancelLabel }),
856
+ /* @__PURE__ */ jsx14(Button, { variant: danger ? "danger" : "primary", busy, onClick: onConfirm, children: confirmLabel })
832
857
  ] }),
833
858
  children: body
834
859
  }
@@ -838,7 +863,7 @@ function Confirm({
838
863
  // src/Drawer.tsx
839
864
  import { useId as useId5, useRef as useRef6 } from "react";
840
865
  import { createPortal as createPortal2 } from "react-dom";
841
- import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
866
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
842
867
  function Drawer({
843
868
  open,
844
869
  title,
@@ -858,9 +883,9 @@ function Drawer({
858
883
  if (!mounted) return null;
859
884
  const cls = ["ui-drawer", `ui-drawer--${side}`, `ui-drawer--${size}`, shown && "is-open"].filter(Boolean).join(" ");
860
885
  return createPortal2(
861
- /* @__PURE__ */ jsx14(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsxs10("div", { className: cls, ref: root, children: [
862
- /* @__PURE__ */ jsx14("div", { className: "ui-drawer__scrim", onMouseDown: dismissOnScrim(onClose) }),
863
- /* @__PURE__ */ jsxs10(
886
+ /* @__PURE__ */ jsx15(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsxs11("div", { className: cls, ref: root, children: [
887
+ /* @__PURE__ */ jsx15("div", { className: "ui-drawer__scrim", onMouseDown: dismissOnScrim(onClose) }),
888
+ /* @__PURE__ */ jsxs11(
864
889
  "aside",
865
890
  {
866
891
  className: "ui-drawer__panel",
@@ -870,12 +895,12 @@ function Drawer({
870
895
  tabIndex: -1,
871
896
  ref: panel,
872
897
  children: [
873
- /* @__PURE__ */ jsxs10("header", { className: "ui-drawer__header", children: [
874
- /* @__PURE__ */ jsx14("h2", { className: "ui-drawer__title", id: titleId, children: title }),
875
- /* @__PURE__ */ jsx14("button", { type: "button", className: "ui-drawer__close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx14(Icon, { name: "x" }) })
898
+ /* @__PURE__ */ jsxs11("header", { className: "ui-drawer__header", children: [
899
+ /* @__PURE__ */ jsx15("h2", { className: "ui-drawer__title", id: titleId, children: title }),
900
+ /* @__PURE__ */ jsx15("button", { type: "button", className: "ui-drawer__close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx15(Icon, { name: "x" }) })
876
901
  ] }),
877
- /* @__PURE__ */ jsx14("div", { className: "ui-drawer__body", ref: body, children }),
878
- footer && /* @__PURE__ */ jsx14("footer", { className: "ui-drawer__footer", children: footer })
902
+ /* @__PURE__ */ jsx15("div", { className: "ui-drawer__body", ref: body, children }),
903
+ footer && /* @__PURE__ */ jsx15("footer", { className: "ui-drawer__footer", children: footer })
879
904
  ]
880
905
  }
881
906
  )
@@ -885,12 +910,12 @@ function Drawer({
885
910
  }
886
911
 
887
912
  // src/CommandPalette.tsx
888
- import { useCallback, useEffect as useEffect3, useId as useId6, useMemo, useRef as useRef7, useState as useState3 } from "react";
913
+ import { useCallback as useCallback2, useEffect as useEffect3, useId as useId6, useMemo, useRef as useRef7, useState as useState4 } from "react";
889
914
  import { createPortal as createPortal3 } from "react-dom";
890
- import { rankGroups, icon as icon2 } from "@apliteni/apliteni-ui";
891
- import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
915
+ import { rankGroups, icon as icon3 } from "@apliteni/apliteni-ui";
916
+ import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
892
917
  var cx2 = (...a) => a.filter(Boolean).join(" ");
893
- var Glyph = ({ name, className }) => /* @__PURE__ */ jsx15("span", { className, "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon2(name) } });
918
+ var Glyph = ({ name, className }) => /* @__PURE__ */ jsx16("span", { className, "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon3(name) } });
894
919
  var keysOf = (shortcut) => shortcut == null ? [] : Array.isArray(shortcut) ? shortcut : [shortcut];
895
920
  function CommandPalette({
896
921
  open,
@@ -909,8 +934,8 @@ function CommandPalette({
909
934
  const root = useRef7(null);
910
935
  const panel = useRef7(null);
911
936
  const search = useRef7(null);
912
- const [query, setQuery] = useState3("");
913
- const [at, setAt] = useState3(0);
937
+ const [query, setQuery] = useState4("");
938
+ const [at, setAt] = useState4(0);
914
939
  useEffect3(() => {
915
940
  if (open) {
916
941
  setQuery("");
@@ -927,7 +952,7 @@ function CommandPalette({
927
952
  setAt(0);
928
953
  }, [query]);
929
954
  const scope = useDialog(open, { root, panel, body: search }, onClose);
930
- const run = useCallback((item, newTab) => {
955
+ const run = useCallback2((item, newTab) => {
931
956
  if (isDisabled(item)) return;
932
957
  onSelect?.(item, { newTab });
933
958
  if (item.danger && item.onConfirm) {
@@ -955,9 +980,9 @@ function CommandPalette({
955
980
  const listId = `${uid}-list`;
956
981
  let n = 0;
957
982
  return createPortal3(
958
- /* @__PURE__ */ jsx15(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsxs11("div", { className: cx2("ui-cmdk", density === "roomy" && "ui-cmdk--roomy", "is-open"), ref: root, children: [
959
- /* @__PURE__ */ jsx15("div", { className: "ui-cmdk__scrim", onMouseDown: dismissOnScrim(onClose) }),
960
- /* @__PURE__ */ jsxs11(
983
+ /* @__PURE__ */ jsx16(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsxs12("div", { className: cx2("ui-cmdk", density === "roomy" && "ui-cmdk--roomy", "is-open"), ref: root, children: [
984
+ /* @__PURE__ */ jsx16("div", { className: "ui-cmdk__scrim", onMouseDown: dismissOnScrim(onClose) }),
985
+ /* @__PURE__ */ jsxs12(
961
986
  "div",
962
987
  {
963
988
  className: "ui-cmdk__panel",
@@ -968,9 +993,9 @@ function CommandPalette({
968
993
  ref: panel,
969
994
  onKeyDown,
970
995
  children: [
971
- /* @__PURE__ */ jsxs11("div", { className: "ui-cmdk__search", ref: search, children: [
972
- /* @__PURE__ */ jsx15(Glyph, { name: "search", className: "ui-cmdk__search-ic" }),
973
- /* @__PURE__ */ jsx15(
996
+ /* @__PURE__ */ jsxs12("div", { className: "ui-cmdk__search", ref: search, children: [
997
+ /* @__PURE__ */ jsx16(Glyph, { name: "search", className: "ui-cmdk__search-ic" }),
998
+ /* @__PURE__ */ jsx16(
974
999
  "input",
975
1000
  {
976
1001
  className: "ui-cmdk__input",
@@ -992,19 +1017,19 @@ function CommandPalette({
992
1017
  }
993
1018
  )
994
1019
  ] }),
995
- /* @__PURE__ */ jsx15("div", { className: "ui-cmdk__list", id: listId, role: "listbox", "aria-label": `${label} results`, children: shown.map((group, gi) => /* @__PURE__ */ jsxs11(
1020
+ /* @__PURE__ */ jsx16("div", { className: "ui-cmdk__list", id: listId, role: "listbox", "aria-label": `${label} results`, children: shown.map((group, gi) => /* @__PURE__ */ jsxs12(
996
1021
  "div",
997
1022
  {
998
1023
  className: "ui-cmdk__group",
999
1024
  role: "group",
1000
1025
  "aria-labelledby": group.label ? `${uid}-g${gi}` : void 0,
1001
1026
  children: [
1002
- group.label && /* @__PURE__ */ jsx15("div", { className: "ui-cmdk__group-head", id: `${uid}-g${gi}`, children: group.label }),
1027
+ group.label && /* @__PURE__ */ jsx16("div", { className: "ui-cmdk__group-head", id: `${uid}-g${gi}`, children: group.label }),
1003
1028
  group.items.map((item) => {
1004
1029
  const disabled = isDisabled(item);
1005
1030
  const id = `${uid}-o${n++}`;
1006
1031
  const on = item === active;
1007
- return /* @__PURE__ */ jsxs11(
1032
+ return /* @__PURE__ */ jsxs12(
1008
1033
  "div",
1009
1034
  {
1010
1035
  id,
@@ -1024,13 +1049,13 @@ function CommandPalette({
1024
1049
  },
1025
1050
  onClick: (e) => run(item, e.metaKey || e.ctrlKey),
1026
1051
  children: [
1027
- item.icon && /* @__PURE__ */ jsx15(Glyph, { name: item.icon, className: "ui-cmdk__ic" }),
1028
- /* @__PURE__ */ jsxs11("span", { className: "ui-cmdk__main", children: [
1029
- /* @__PURE__ */ jsx15("span", { className: "ui-cmdk__label", children: item.label }),
1030
- item.description && /* @__PURE__ */ jsx15("span", { className: "ui-cmdk__desc", children: item.description })
1052
+ item.icon && /* @__PURE__ */ jsx16(Glyph, { name: item.icon, className: "ui-cmdk__ic" }),
1053
+ /* @__PURE__ */ jsxs12("span", { className: "ui-cmdk__main", children: [
1054
+ /* @__PURE__ */ jsx16("span", { className: "ui-cmdk__label", children: item.label }),
1055
+ item.description && /* @__PURE__ */ jsx16("span", { className: "ui-cmdk__desc", children: item.description })
1031
1056
  ] }),
1032
- item.badge && /* @__PURE__ */ jsx15("span", { className: "ui-cmdk__badge", children: item.badge }),
1033
- keysOf(item.shortcut).length > 0 && /* @__PURE__ */ jsx15("span", { className: "ui-cmdk__keys", "aria-hidden": "true", children: keysOf(item.shortcut).map((k) => /* @__PURE__ */ jsx15("kbd", { className: "ui-cmdk__key", children: k }, k)) })
1057
+ item.badge && /* @__PURE__ */ jsx16("span", { className: "ui-cmdk__badge", children: item.badge }),
1058
+ keysOf(item.shortcut).length > 0 && /* @__PURE__ */ jsx16("span", { className: "ui-cmdk__keys", "aria-hidden": "true", children: keysOf(item.shortcut).map((k) => /* @__PURE__ */ jsx16("kbd", { className: "ui-cmdk__key", children: k }, k)) })
1034
1059
  ]
1035
1060
  },
1036
1061
  item.id
@@ -1040,20 +1065,20 @@ function CommandPalette({
1040
1065
  },
1041
1066
  group.label ?? `g${gi}`
1042
1067
  )) }),
1043
- /* @__PURE__ */ jsx15("p", { className: "ui-cmdk__empty", hidden: countOf(shown) > 0, children: empty }),
1044
- /* @__PURE__ */ jsx15("p", { className: "ui-sr", role: "status", "aria-live": "polite", children: countOf(shown) === 0 ? "No results" : `${countOf(shown)} result${countOf(shown) === 1 ? "" : "s"}` }),
1045
- hint && /* @__PURE__ */ jsxs11("div", { className: "ui-cmdk__foot", "aria-hidden": "true", children: [
1046
- /* @__PURE__ */ jsxs11("span", { children: [
1047
- /* @__PURE__ */ jsx15("kbd", { className: "ui-cmdk__key", children: "\u2191" }),
1048
- /* @__PURE__ */ jsx15("kbd", { className: "ui-cmdk__key", children: "\u2193" }),
1068
+ /* @__PURE__ */ jsx16("p", { className: "ui-cmdk__empty", hidden: countOf(shown) > 0, children: empty }),
1069
+ /* @__PURE__ */ jsx16("p", { className: "ui-sr", role: "status", "aria-live": "polite", children: countOf(shown) === 0 ? "No results" : `${countOf(shown)} result${countOf(shown) === 1 ? "" : "s"}` }),
1070
+ hint && /* @__PURE__ */ jsxs12("div", { className: "ui-cmdk__foot", "aria-hidden": "true", children: [
1071
+ /* @__PURE__ */ jsxs12("span", { children: [
1072
+ /* @__PURE__ */ jsx16("kbd", { className: "ui-cmdk__key", children: "\u2191" }),
1073
+ /* @__PURE__ */ jsx16("kbd", { className: "ui-cmdk__key", children: "\u2193" }),
1049
1074
  " move"
1050
1075
  ] }),
1051
- /* @__PURE__ */ jsxs11("span", { children: [
1052
- /* @__PURE__ */ jsx15("kbd", { className: "ui-cmdk__key", children: "\u21B5" }),
1076
+ /* @__PURE__ */ jsxs12("span", { children: [
1077
+ /* @__PURE__ */ jsx16("kbd", { className: "ui-cmdk__key", children: "\u21B5" }),
1053
1078
  " run"
1054
1079
  ] }),
1055
- /* @__PURE__ */ jsxs11("span", { children: [
1056
- /* @__PURE__ */ jsx15("kbd", { className: "ui-cmdk__key", children: "esc" }),
1080
+ /* @__PURE__ */ jsxs12("span", { children: [
1081
+ /* @__PURE__ */ jsx16("kbd", { className: "ui-cmdk__key", children: "esc" }),
1057
1082
  " close"
1058
1083
  ] })
1059
1084
  ] })
@@ -1078,13 +1103,13 @@ function rowId(uid, groups, item) {
1078
1103
  }
1079
1104
 
1080
1105
  // src/DataTable.tsx
1081
- import { useCallback as useCallback2, useEffect as useEffect5, useMemo as useMemo2, useRef as useRef9, useState as useState5 } from "react";
1106
+ import { useCallback as useCallback3, useEffect as useEffect5, useMemo as useMemo2, useRef as useRef9, useState as useState6 } from "react";
1082
1107
  import { DEFAULT_PAGE_SIZE as DEFAULT_PAGE_SIZE2 } from "@apliteni/apliteni-ui";
1083
1108
 
1084
1109
  // src/Pagination.tsx
1085
- import { useEffect as useEffect4, useId as useId7, useRef as useRef8, useState as useState4 } from "react";
1110
+ import { useEffect as useEffect4, useId as useId7, useRef as useRef8, useState as useState5 } from "react";
1086
1111
  import { DEFAULT_PAGE_SIZE } from "@apliteni/apliteni-ui";
1087
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
1112
+ import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
1088
1113
  var GHOST_SM = "ui-btn ui-btn--ghost ui-btn--sm";
1089
1114
  var VARIANTS = ["steps", "numbered", "jump"];
1090
1115
  var cx3 = (...a) => a.filter(Boolean).join(" ");
@@ -1127,8 +1152,8 @@ function Pagination({
1127
1152
  onPageSizeChange
1128
1153
  }) {
1129
1154
  const auto = useId7();
1130
- const [draft, setDraft] = useState4("");
1131
- const [drafting, setDrafting] = useState4(false);
1155
+ const [draft, setDraft] = useState5("");
1156
+ const [drafting, setDrafting] = useState5(false);
1132
1157
  const nav = useRef8(null);
1133
1158
  const pressed = useRef8(null);
1134
1159
  const uid = id ?? auto;
@@ -1139,7 +1164,7 @@ function Pagination({
1139
1164
  const rows = counted ? Math.max(0, asRows) : null;
1140
1165
  const last = counted ? Math.max(1, Math.ceil(rows / size)) : null;
1141
1166
  const at = counted ? Math.min(Math.max(1, int(page, 1)), last) : Math.min(Math.max(1, int(page, 1)), CAP - 1);
1142
- const [draftFor, setDraftFor] = useState4(at);
1167
+ const [draftFor, setDraftFor] = useState5(at);
1143
1168
  if (draftFor !== at) {
1144
1169
  setDraftFor(at);
1145
1170
  setDraft("");
@@ -1176,7 +1201,7 @@ function Pagination({
1176
1201
  const step = (label_, target, disabled) => (
1177
1202
  // A control at an end is disabled and stays where it is: removing it slides
1178
1203
  // the next control under a pointer already travelling toward it.
1179
- /* @__PURE__ */ jsx16(
1204
+ /* @__PURE__ */ jsx17(
1180
1205
  "button",
1181
1206
  {
1182
1207
  type: "button",
@@ -1215,14 +1240,14 @@ function Pagination({
1215
1240
  if (single) {
1216
1241
  steps = null;
1217
1242
  } else if (!counted) {
1218
- steps = /* @__PURE__ */ jsxs12("div", { className: "ui-pager__steps", children: [
1243
+ steps = /* @__PURE__ */ jsxs13("div", { className: "ui-pager__steps", children: [
1219
1244
  step("Prev", Math.max(1, at - 1), atStart),
1220
1245
  step("Next", at + 1, !hasMore)
1221
1246
  ] });
1222
1247
  } else {
1223
1248
  let middle = null;
1224
1249
  if (kind === "numbered") {
1225
- middle = slotsFor(at, last).map((n, i) => n == null ? /* @__PURE__ */ jsx16("span", { className: "ui-pager__gap", "aria-hidden": "true", children: "\u2026" }, `gap${i}`) : /* @__PURE__ */ jsx16(
1250
+ middle = slotsFor(at, last).map((n, i) => n == null ? /* @__PURE__ */ jsx17("span", { className: "ui-pager__gap", "aria-hidden": "true", children: "\u2026" }, `gap${i}`) : /* @__PURE__ */ jsx17(
1226
1251
  "button",
1227
1252
  {
1228
1253
  type: "button",
@@ -1237,9 +1262,9 @@ function Pagination({
1237
1262
  n
1238
1263
  ));
1239
1264
  } else if (kind === "jump") {
1240
- middle = /* @__PURE__ */ jsxs12("span", { className: "ui-pager__jump", children: [
1241
- /* @__PURE__ */ jsx16("label", { htmlFor: `${uid}-jump`, children: "Page" }),
1242
- /* @__PURE__ */ jsx16(
1265
+ middle = /* @__PURE__ */ jsxs13("span", { className: "ui-pager__jump", children: [
1266
+ /* @__PURE__ */ jsx17("label", { htmlFor: `${uid}-jump`, children: "Page" }),
1267
+ /* @__PURE__ */ jsx17(
1243
1268
  "input",
1244
1269
  {
1245
1270
  className: "ui-input ui-pager__jump-input",
@@ -1262,13 +1287,13 @@ function Pagination({
1262
1287
  }
1263
1288
  }
1264
1289
  ),
1265
- /* @__PURE__ */ jsxs12("span", { className: "ui-pager__jump-of", children: [
1290
+ /* @__PURE__ */ jsxs13("span", { className: "ui-pager__jump-of", children: [
1266
1291
  "of ",
1267
1292
  fmt(last)
1268
1293
  ] })
1269
1294
  ] });
1270
1295
  }
1271
- steps = /* @__PURE__ */ jsxs12("div", { className: "ui-pager__steps", children: [
1296
+ steps = /* @__PURE__ */ jsxs13("div", { className: "ui-pager__steps", children: [
1272
1297
  ends ? step("First", 1, atStart) : null,
1273
1298
  step("Prev", Math.max(1, at - 1), atStart),
1274
1299
  middle,
@@ -1276,7 +1301,7 @@ function Pagination({
1276
1301
  ends ? step("Last", last, atEnd) : null
1277
1302
  ] });
1278
1303
  }
1279
- return /* @__PURE__ */ jsxs12(
1304
+ return /* @__PURE__ */ jsxs13(
1280
1305
  "nav",
1281
1306
  {
1282
1307
  ref: nav,
@@ -1284,10 +1309,10 @@ function Pagination({
1284
1309
  "aria-label": label,
1285
1310
  "aria-busy": loading ? true : void 0,
1286
1311
  children: [
1287
- /* @__PURE__ */ jsx16("p", { className: "ui-pager__status", "aria-live": "polite", "aria-atomic": "true", children: status }),
1288
- sizes.length ? /* @__PURE__ */ jsxs12("div", { className: "ui-pager__size", children: [
1289
- /* @__PURE__ */ jsx16("label", { className: "ui-pager__size-label", htmlFor: `${uid}-size`, children: "Rows" }),
1290
- /* @__PURE__ */ jsx16(
1312
+ /* @__PURE__ */ jsx17("p", { className: "ui-pager__status", "aria-live": "polite", "aria-atomic": "true", children: status }),
1313
+ sizes.length ? /* @__PURE__ */ jsxs13("div", { className: "ui-pager__size", children: [
1314
+ /* @__PURE__ */ jsx17("label", { className: "ui-pager__size-label", htmlFor: `${uid}-size`, children: "Rows" }),
1315
+ /* @__PURE__ */ jsx17(
1291
1316
  "select",
1292
1317
  {
1293
1318
  className: "ui-select ui-pager__size-select",
@@ -1295,7 +1320,7 @@ function Pagination({
1295
1320
  disabled: loading,
1296
1321
  value: size,
1297
1322
  onChange: (e) => onPageSizeChange?.(Number(e.target.value)),
1298
- children: sizes.map((s) => /* @__PURE__ */ jsx16("option", { value: s, children: fmt(s) }, s))
1323
+ children: sizes.map((s) => /* @__PURE__ */ jsx17("option", { value: s, children: fmt(s) }, s))
1299
1324
  }
1300
1325
  )
1301
1326
  ] }) : null,
@@ -1306,7 +1331,7 @@ function Pagination({
1306
1331
  }
1307
1332
 
1308
1333
  // src/DataTable.tsx
1309
- import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
1334
+ import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
1310
1335
  var NO_SORT = { key: void 0, dir: -1 };
1311
1336
  function sortTableRows(rows, sort) {
1312
1337
  if (sort.key === void 0) return [...rows];
@@ -1343,12 +1368,12 @@ function DataTable({
1343
1368
  }) {
1344
1369
  const scrollable = stickyHeader || pinnedIdentity;
1345
1370
  const table = useRef9(null);
1346
- const [pagerHost, setPagerHost] = useState5(null);
1347
- const holdPagerBox = useCallback2(
1371
+ const [pagerHost, setPagerHost] = useState6(null);
1372
+ const holdPagerBox = useCallback3(
1348
1373
  (box) => setPagerHost(box?.parentElement ?? null),
1349
1374
  []
1350
1375
  );
1351
- const [strip2, setStrip] = useState5();
1376
+ const [strip2, setStrip] = useState6();
1352
1377
  useEffect5(() => {
1353
1378
  const el = table.current;
1354
1379
  const host = pagerHost;
@@ -1369,16 +1394,16 @@ function DataTable({
1369
1394
  measure();
1370
1395
  return () => observer.disconnect();
1371
1396
  }, [pagerHost, columns, rows]);
1372
- const [localSort, setLocalSort] = useState5(
1397
+ const [localSort, setLocalSort] = useState6(
1373
1398
  { key: columns.find((c) => c.sortable)?.key, dir: -1 }
1374
1399
  );
1375
1400
  const owned = controlledPage === void 0;
1376
1401
  const sort = controlledSort ?? (owned ? localSort : NO_SORT);
1377
1402
  const sortIsKnown = owned || controlledSort !== void 0;
1378
- const [localPage, setLocalPage] = useState5(1);
1379
- const [localSize, setLocalSize] = useState5(DEFAULT_PAGE_SIZE2);
1403
+ const [localPage, setLocalPage] = useState6(1);
1404
+ const [localSize, setLocalSize] = useState6(DEFAULT_PAGE_SIZE2);
1380
1405
  const size = sizeOf(pageSize, owned ? localSize : rows.length || DEFAULT_PAGE_SIZE2);
1381
- const [pagedSort, setPagedSort] = useState5(sort);
1406
+ const [pagedSort, setPagedSort] = useState6(sort);
1382
1407
  if (pagedSort.key !== sort.key || pagedSort.dir !== sort.dir) {
1383
1408
  setPagedSort(sort);
1384
1409
  setLocalPage(1);
@@ -1401,7 +1426,7 @@ function DataTable({
1401
1426
  onSortChange?.(next);
1402
1427
  toFirstPage();
1403
1428
  };
1404
- const caret = (k) => /* @__PURE__ */ jsx17(
1429
+ const caret = (k) => /* @__PURE__ */ jsx18(
1405
1430
  "svg",
1406
1431
  {
1407
1432
  className: "rx-caret",
@@ -1413,31 +1438,31 @@ function DataTable({
1413
1438
  strokeLinejoin: "round",
1414
1439
  "aria-hidden": "true",
1415
1440
  focusable: "false",
1416
- children: sort.key === k ? /* @__PURE__ */ jsx17("path", { d: "m8 10 4 4 4-4" }) : /* @__PURE__ */ jsxs13(Fragment4, { children: [
1417
- /* @__PURE__ */ jsx17("path", { d: "m8 9 4-4 4 4" }),
1418
- /* @__PURE__ */ jsx17("path", { d: "m8 15 4 4 4-4" })
1441
+ children: sort.key === k ? /* @__PURE__ */ jsx18("path", { d: "m8 10 4 4 4-4" }) : /* @__PURE__ */ jsxs14(Fragment4, { children: [
1442
+ /* @__PURE__ */ jsx18("path", { d: "m8 9 4-4 4 4" }),
1443
+ /* @__PURE__ */ jsx18("path", { d: "m8 15 4 4 4-4" })
1419
1444
  ] })
1420
1445
  }
1421
1446
  );
1422
1447
  const pageAllOn = selectable && slice.length > 0 && slice.every((r) => selected.has(r.name));
1423
1448
  const pageSomeOn = selectable && !pageAllOn && slice.some((r) => selected.has(r.name));
1424
- return /* @__PURE__ */ jsxs13(Fragment4, { children: [
1425
- /* @__PURE__ */ jsx17(
1449
+ return /* @__PURE__ */ jsxs14(Fragment4, { children: [
1450
+ /* @__PURE__ */ jsx18(
1426
1451
  "div",
1427
1452
  {
1428
1453
  className: scrollable ? "ui-table-scroll" : void 0,
1429
1454
  role: scrollable ? "region" : void 0,
1430
1455
  "aria-label": scrollable ? scrollLabel : void 0,
1431
1456
  tabIndex: scrollable ? 0 : void 0,
1432
- children: /* @__PURE__ */ jsxs13(
1457
+ children: /* @__PURE__ */ jsxs14(
1433
1458
  "table",
1434
1459
  {
1435
1460
  ref: table,
1436
1461
  className: ["ui-table ui-table--hover", (density === "dense" || !density && dense) && "ui-table--dense", density === "compact" && "ui-table--compact", stickyHeader && "ui-table--sticky", pinnedIdentity && "ui-table--pinned"].filter(Boolean).join(" "),
1437
1462
  "aria-busy": loading || void 0,
1438
1463
  children: [
1439
- /* @__PURE__ */ jsx17("thead", { children: /* @__PURE__ */ jsxs13("tr", { children: [
1440
- selectable ? /* @__PURE__ */ jsx17("th", { scope: "col", className: "ui-table__selection", children: /* @__PURE__ */ jsx17(
1464
+ /* @__PURE__ */ jsx18("thead", { children: /* @__PURE__ */ jsxs14("tr", { children: [
1465
+ selectable ? /* @__PURE__ */ jsx18("th", { scope: "col", className: "ui-table__selection", children: /* @__PURE__ */ jsx18(
1441
1466
  "input",
1442
1467
  {
1443
1468
  type: "checkbox",
@@ -1453,7 +1478,7 @@ function DataTable({
1453
1478
  // The sort control is a real <button> inside the header cell. It used to be
1454
1479
  // role="button" ON the <th>, which threw away the columnheader role and put
1455
1480
  // aria-sort on a role that forbids it.
1456
- /* @__PURE__ */ jsx17(
1481
+ /* @__PURE__ */ jsx18(
1457
1482
  "th",
1458
1483
  {
1459
1484
  scope: "col",
@@ -1463,8 +1488,8 @@ function DataTable({
1463
1488
  // The label is its own box so it can truncate: in a pinned
1464
1489
  // identity column on a phone the header is capped, and a bare
1465
1490
  // text node would push the caret out of the cell instead.
1466
- /* @__PURE__ */ jsxs13("button", { type: "button", className: "rx-sort", onClick: () => onSort(c.key), children: [
1467
- /* @__PURE__ */ jsx17("span", { className: "rx-sort__label", children: c.label }),
1491
+ /* @__PURE__ */ jsxs14("button", { type: "button", className: "rx-sort", onClick: () => onSort(c.key), children: [
1492
+ /* @__PURE__ */ jsx18("span", { className: "rx-sort__label", children: c.label }),
1468
1493
  caret(c.key)
1469
1494
  ] })
1470
1495
  ) : c.label
@@ -1473,10 +1498,10 @@ function DataTable({
1473
1498
  )
1474
1499
  ))
1475
1500
  ] }) }),
1476
- /* @__PURE__ */ jsxs13("tbody", { children: [
1477
- !slice.length && /* @__PURE__ */ jsx17("tr", { children: /* @__PURE__ */ jsx17("td", { colSpan: columns.length + (selectable ? 1 : 0), children: loading ? "Loading rows\u2026" : empty }) }),
1478
- slice.map((r) => /* @__PURE__ */ jsxs13("tr", { children: [
1479
- selectable ? /* @__PURE__ */ jsx17("td", { className: "ui-table__selection", children: /* @__PURE__ */ jsx17(
1501
+ /* @__PURE__ */ jsxs14("tbody", { children: [
1502
+ !slice.length && /* @__PURE__ */ jsx18("tr", { children: /* @__PURE__ */ jsx18("td", { colSpan: columns.length + (selectable ? 1 : 0), children: loading ? "Loading rows\u2026" : empty }) }),
1503
+ slice.map((r) => /* @__PURE__ */ jsxs14("tr", { children: [
1504
+ selectable ? /* @__PURE__ */ jsx18("td", { className: "ui-table__selection", children: /* @__PURE__ */ jsx18(
1480
1505
  "input",
1481
1506
  {
1482
1507
  type: "checkbox",
@@ -1485,7 +1510,7 @@ function DataTable({
1485
1510
  onChange: () => onToggle(r.name)
1486
1511
  }
1487
1512
  ) }) : null,
1488
- columns.map((c, columnIndex) => /* @__PURE__ */ jsx17("td", { className: [c.num && "ui-table__num", pinnedIdentity && columnIndex === 0 && "ui-table__identity", c.linked && "ui-table__linked"].filter(Boolean).join(" "), children: c.render ? c.render(r) : String(r[c.key]) }, c.key))
1513
+ columns.map((c, columnIndex) => /* @__PURE__ */ jsx18("td", { className: [c.num && "ui-table__num", pinnedIdentity && columnIndex === 0 && "ui-table__identity", c.linked && "ui-table__linked"].filter(Boolean).join(" "), children: c.render ? c.render(r) : String(r[c.key]) }, c.key))
1489
1514
  ] }, r.name))
1490
1515
  ] })
1491
1516
  ]
@@ -1498,13 +1523,13 @@ function DataTable({
1498
1523
  // The two are siblings, and no selector sizes one to the other, so the width is
1499
1524
  // measured: a cap rather than a width, so a pager wider than the table wraps
1500
1525
  // inside it and a table wider than the room still leaves the strip in the room.
1501
- /* @__PURE__ */ jsx17(
1526
+ /* @__PURE__ */ jsx18(
1502
1527
  "div",
1503
1528
  {
1504
1529
  className: "rx-table-pager",
1505
1530
  ref: holdPagerBox,
1506
1531
  style: strip2 ? { maxWidth: strip2.width, marginInlineStart: strip2.inset || void 0 } : void 0,
1507
- children: /* @__PURE__ */ jsx17(
1532
+ children: /* @__PURE__ */ jsx18(
1508
1533
  Pagination,
1509
1534
  {
1510
1535
  page,
@@ -1532,7 +1557,7 @@ function DataTable({
1532
1557
  import { PAGE_SIZES as KIT_PAGE_SIZES, DEFAULT_PAGE_SIZE as KIT_DEFAULT_PAGE_SIZE } from "@apliteni/apliteni-ui";
1533
1558
 
1534
1559
  // src/Loading.tsx
1535
- import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
1560
+ import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
1536
1561
  var cx4 = (...a) => a.filter(Boolean).join(" ");
1537
1562
  function Skeleton({ lines = 3, width, height, radius, className }) {
1538
1563
  const widths = Array.isArray(lines) ? lines : null;
@@ -1542,19 +1567,19 @@ function Skeleton({ lines = 3, width, height, radius, className }) {
1542
1567
  if (!w && !height && !radius) return void 0;
1543
1568
  return { ...w && { width: w }, ...height && { height }, ...radius && { borderRadius: radius } };
1544
1569
  };
1545
- return /* @__PURE__ */ jsx18("div", { className: cx4("ui-skel", className), "aria-hidden": "true", children: Array.from({ length: n }, (_, i) => /* @__PURE__ */ jsx18("span", { className: "ui-skel__bar m-skeleton", style: styleFor(i) }, i)) });
1570
+ return /* @__PURE__ */ jsx19("div", { className: cx4("ui-skel", className), "aria-hidden": "true", children: Array.from({ length: n }, (_, i) => /* @__PURE__ */ jsx19("span", { className: "ui-skel__bar m-skeleton", style: styleFor(i) }, i)) });
1546
1571
  }
1547
1572
  function SkeletonTable({ rows = 5, cols = 4, head = true }) {
1548
- const cells = Array.from({ length: Math.max(1, cols) }, (_, i) => /* @__PURE__ */ jsx18("span", { className: "ui-skel__bar m-skeleton" }, i));
1549
- return /* @__PURE__ */ jsxs14(
1573
+ const cells = Array.from({ length: Math.max(1, cols) }, (_, i) => /* @__PURE__ */ jsx19("span", { className: "ui-skel__bar m-skeleton" }, i));
1574
+ return /* @__PURE__ */ jsxs15(
1550
1575
  "div",
1551
1576
  {
1552
1577
  className: "ui-skel ui-skel--table",
1553
1578
  style: { "--skel-cols": Math.max(1, cols) },
1554
1579
  "aria-hidden": "true",
1555
1580
  children: [
1556
- head && /* @__PURE__ */ jsx18("div", { className: "ui-skel__row ui-skel__row--head", children: cells }),
1557
- Array.from({ length: Math.max(1, rows) }, (_, i) => /* @__PURE__ */ jsx18("div", { className: "ui-skel__row", children: cells }, i))
1581
+ head && /* @__PURE__ */ jsx19("div", { className: "ui-skel__row ui-skel__row--head", children: cells }),
1582
+ Array.from({ length: Math.max(1, rows) }, (_, i) => /* @__PURE__ */ jsx19("div", { className: "ui-skel__row", children: cells }, i))
1558
1583
  ]
1559
1584
  }
1560
1585
  );
@@ -1567,7 +1592,7 @@ function BusyRegion({
1567
1592
  className,
1568
1593
  children
1569
1594
  }) {
1570
- return /* @__PURE__ */ jsxs14(
1595
+ return /* @__PURE__ */ jsxs15(
1571
1596
  "div",
1572
1597
  {
1573
1598
  className: cx4("ui-busy", className),
@@ -1575,8 +1600,8 @@ function BusyRegion({
1575
1600
  "aria-live": "polite",
1576
1601
  "aria-busy": busy,
1577
1602
  children: [
1578
- /* @__PURE__ */ jsx18("span", { className: "ui-sr", children: busy ? label : message }),
1579
- /* @__PURE__ */ jsx18("div", { className: "ui-busy__body", children: busy ? placeholder ?? /* @__PURE__ */ jsx18(Skeleton, { lines: 3 }) : children })
1603
+ /* @__PURE__ */ jsx19("span", { className: "ui-sr", children: busy ? label : message }),
1604
+ /* @__PURE__ */ jsx19("div", { className: "ui-busy__body", children: busy ? placeholder ?? /* @__PURE__ */ jsx19(Skeleton, { lines: 3 }) : children })
1580
1605
  ]
1581
1606
  }
1582
1607
  );
@@ -1585,31 +1610,31 @@ function Denied({
1585
1610
  title = "You don\u2019t have access",
1586
1611
  sub,
1587
1612
  need,
1588
- icon: icon7 = "lock",
1613
+ icon: icon8 = "lock",
1589
1614
  className,
1590
1615
  children
1591
1616
  }) {
1592
- return /* @__PURE__ */ jsxs14("div", { className: cx4("ui-denied", className), children: [
1593
- /* @__PURE__ */ jsx18("div", { className: "ui-denied__seal", children: /* @__PURE__ */ jsx18(Icon, { name: icon7 }) }),
1594
- /* @__PURE__ */ jsx18("div", { className: "ui-denied__title", children: title }),
1595
- sub && /* @__PURE__ */ jsx18("div", { className: "ui-denied__sub", children: sub }),
1596
- need && /* @__PURE__ */ jsxs14("div", { className: "ui-denied__need", children: [
1617
+ return /* @__PURE__ */ jsxs15("div", { className: cx4("ui-denied", className), children: [
1618
+ /* @__PURE__ */ jsx19("div", { className: "ui-denied__seal", children: /* @__PURE__ */ jsx19(Icon, { name: icon8 }) }),
1619
+ /* @__PURE__ */ jsx19("div", { className: "ui-denied__title", children: title }),
1620
+ sub && /* @__PURE__ */ jsx19("div", { className: "ui-denied__sub", children: sub }),
1621
+ need && /* @__PURE__ */ jsxs15("div", { className: "ui-denied__need", children: [
1597
1622
  "Needs ",
1598
- /* @__PURE__ */ jsx18("code", { className: "ui-code", children: need })
1623
+ /* @__PURE__ */ jsx19("code", { className: "ui-code", children: need })
1599
1624
  ] }),
1600
- children && /* @__PURE__ */ jsx18("div", { className: "ui-denied__actions", children })
1625
+ children && /* @__PURE__ */ jsx19("div", { className: "ui-denied__actions", children })
1601
1626
  ] });
1602
1627
  }
1603
1628
 
1604
1629
  // src/DatePicker.tsx
1605
1630
  import {
1606
- useCallback as useCallback3,
1631
+ useCallback as useCallback4,
1607
1632
  useEffect as useEffect6,
1608
1633
  useMemo as useMemo3,
1609
1634
  useRef as useRef10,
1610
- useState as useState6
1635
+ useState as useState7
1611
1636
  } from "react";
1612
- import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
1637
+ import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
1613
1638
  var cx5 = (...a) => a.filter(Boolean).join(" ");
1614
1639
  var pad = (n) => String(n).padStart(2, "0");
1615
1640
  var DAY_MS = 864e5;
@@ -1618,7 +1643,7 @@ var MONTH_RE = /^(\d{4})-(\d{2})$/;
1618
1643
  var DAY_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
1619
1644
  var PHONE_MAX = 560;
1620
1645
  function usePhone() {
1621
- const [phone, setPhone] = useState6(false);
1646
+ const [phone, setPhone] = useState7(false);
1622
1647
  useEffect6(() => {
1623
1648
  const query = typeof window === "undefined" ? null : window.matchMedia?.(`(max-width: ${PHONE_MAX}px)`);
1624
1649
  if (!query) return;
@@ -1717,11 +1742,11 @@ function DatePicker({
1717
1742
  const root = useRef10(null);
1718
1743
  const trigger = useRef10(null);
1719
1744
  const grid = useRef10(null);
1720
- const [selfOpen, setSelfOpen] = useState6(defaultOpen);
1745
+ const [selfOpen, setSelfOpen] = useState7(defaultOpen);
1721
1746
  const open = openProp ?? selfOpen;
1722
- const [selfValue, setSelfValue] = useState6(defaultValue);
1747
+ const [selfValue, setSelfValue] = useState7(defaultValue);
1723
1748
  const picked = value !== void 0 ? value : selfValue;
1724
- const [selfRange, setSelfRange] = useState6(defaultRange ?? { start: null, end: null });
1749
+ const [selfRange, setSelfRange] = useState7(defaultRange ?? { start: null, end: null });
1725
1750
  const span = range !== void 0 ? range : selfRange;
1726
1751
  const names = useMemo3(() => ({
1727
1752
  month: new Intl.DateTimeFormat(locale, { month: "long", timeZone: "UTC" }),
@@ -1734,7 +1759,7 @@ function DatePicker({
1734
1759
  weekdayShort: new Intl.DateTimeFormat(locale, { weekday: "short", timeZone: "UTC" })
1735
1760
  }), [locale]);
1736
1761
  const monthLabels = useMemo3(() => evenMonthLabels(names.monthShort), [names]);
1737
- const at = useCallback3((index) => new Date(
1762
+ const at = useCallback4((index) => new Date(
1738
1763
  grain === "month" ? Date.UTC(Math.floor(index / 12), index % 12, 1) : index * DAY_MS
1739
1764
  ), [grain]);
1740
1765
  const lo = toIndex(min, grain, "start");
@@ -1752,9 +1777,9 @@ function DatePicker({
1752
1777
  return grain === "month" ? monthOf(now) : now;
1753
1778
  }, [today, grain]);
1754
1779
  const anchor = toIndex(picked, grain) ?? toIndex(picksRange ? span.start ?? span.end : null, grain) ?? todayIndex;
1755
- const [cursor, setCursor] = useState6(() => clamp(anchor, lo, hi));
1780
+ const [cursor, setCursor] = useState7(() => clamp(anchor, lo, hi));
1756
1781
  const land = useRef10(false);
1757
- const setOpen = useCallback3((next) => {
1782
+ const setOpen = useCallback4((next) => {
1758
1783
  if (openProp === void 0) setSelfOpen(next);
1759
1784
  onOpenChange?.(next);
1760
1785
  }, [openProp, onOpenChange]);
@@ -1791,7 +1816,7 @@ function DatePicker({
1791
1816
  const columns = grain === "month" ? 3 : 7;
1792
1817
  const page = grain === "month" ? Math.floor(cursor / 12) : monthOf(cursor);
1793
1818
  const caption = grain === "month" ? String(page) : names.monthYear.format(at(firstDayOf(page)));
1794
- const periodName = useCallback3((index) => grain === "month" ? names.monthYear.format(at(index)) : `${names.weekday.format(at(index))} ${names.day.format(at(index))}`, [grain, names, at]);
1819
+ const periodName = useCallback4((index) => grain === "month" ? names.monthYear.format(at(index)) : `${names.weekday.format(at(index))} ${names.day.format(at(index))}`, [grain, names, at]);
1795
1820
  const count = grain === "month" ? 12 : daysInMonth(page);
1796
1821
  const first = grain === "month" ? page * 12 : firstDayOf(page);
1797
1822
  const last = first + count - 1;
@@ -1927,10 +1952,10 @@ function DatePicker({
1927
1952
  }
1928
1953
  const noneBefore = lo != null && first <= lo;
1929
1954
  const noneAfter = hi != null && last >= hi;
1930
- const calendar = /* @__PURE__ */ jsxs15("div", { className: cx5("ui-datepicker__body", asSheet && "is-sheet"), children: [
1931
- picksRange && presets?.length ? /* @__PURE__ */ jsx19("div", { className: "ui-datepicker__presets", role: "group", "aria-label": "Period shortcuts", children: presets.map((preset) => {
1955
+ const calendar = /* @__PURE__ */ jsxs16("div", { className: cx5("ui-datepicker__body", asSheet && "is-sheet"), children: [
1956
+ picksRange && presets?.length ? /* @__PURE__ */ jsx20("div", { className: "ui-datepicker__presets", role: "group", "aria-label": "Period shortcuts", children: presets.map((preset) => {
1932
1957
  const within = allowed(preset);
1933
- return /* @__PURE__ */ jsx19(
1958
+ return /* @__PURE__ */ jsx20(
1934
1959
  "button",
1935
1960
  {
1936
1961
  type: "button",
@@ -1942,9 +1967,9 @@ function DatePicker({
1942
1967
  preset.label
1943
1968
  );
1944
1969
  }) }) : null,
1945
- /* @__PURE__ */ jsxs15("div", { className: "ui-datepicker__calendar", children: [
1946
- /* @__PURE__ */ jsxs15("div", { className: "ui-datepicker__head", children: [
1947
- /* @__PURE__ */ jsx19(
1970
+ /* @__PURE__ */ jsxs16("div", { className: "ui-datepicker__calendar", children: [
1971
+ /* @__PURE__ */ jsxs16("div", { className: "ui-datepicker__head", children: [
1972
+ /* @__PURE__ */ jsx20(
1948
1973
  "button",
1949
1974
  {
1950
1975
  type: "button",
@@ -1952,11 +1977,11 @@ function DatePicker({
1952
1977
  "aria-label": stepBack,
1953
1978
  disabled: noneBefore,
1954
1979
  onClick: () => stepPage(-1),
1955
- children: /* @__PURE__ */ jsx19(Icon, { name: "chevronLeft" })
1980
+ children: /* @__PURE__ */ jsx20(Icon, { name: "chevronLeft" })
1956
1981
  }
1957
1982
  ),
1958
- /* @__PURE__ */ jsx19("span", { className: "ui-datepicker__caption", "aria-live": "polite", children: caption }),
1959
- /* @__PURE__ */ jsx19(
1983
+ /* @__PURE__ */ jsx20("span", { className: "ui-datepicker__caption", "aria-live": "polite", children: caption }),
1984
+ /* @__PURE__ */ jsx20(
1960
1985
  "button",
1961
1986
  {
1962
1987
  type: "button",
@@ -1964,11 +1989,11 @@ function DatePicker({
1964
1989
  "aria-label": stepOn,
1965
1990
  disabled: noneAfter,
1966
1991
  onClick: () => stepPage(1),
1967
- children: /* @__PURE__ */ jsx19(Icon, { name: "chevronRight" })
1992
+ children: /* @__PURE__ */ jsx20(Icon, { name: "chevronRight" })
1968
1993
  }
1969
1994
  )
1970
1995
  ] }),
1971
- /* @__PURE__ */ jsxs15(
1996
+ /* @__PURE__ */ jsxs16(
1972
1997
  "div",
1973
1998
  {
1974
1999
  className: cx5("ui-datepicker__grid", grain === "day" && "is-days"),
@@ -1977,7 +2002,7 @@ function DatePicker({
1977
2002
  ref: grid,
1978
2003
  onKeyDown: onGridKeyDown,
1979
2004
  children: [
1980
- weekdays.length > 0 && /* @__PURE__ */ jsx19("div", { className: "ui-datepicker__row", role: "row", children: weekdays.map((weekday) => /* @__PURE__ */ jsx19(
2005
+ weekdays.length > 0 && /* @__PURE__ */ jsx20("div", { className: "ui-datepicker__row", role: "row", children: weekdays.map((weekday) => /* @__PURE__ */ jsx20(
1981
2006
  "span",
1982
2007
  {
1983
2008
  className: "ui-datepicker__weekday",
@@ -1987,13 +2012,13 @@ function DatePicker({
1987
2012
  },
1988
2013
  weekday.long
1989
2014
  )) }),
1990
- rows.map((cellsInRow, r) => /* @__PURE__ */ jsx19("div", { className: "ui-datepicker__row", role: "row", children: cellsInRow.map((cell, c) => cell ? /* @__PURE__ */ jsx19(
2015
+ rows.map((cellsInRow, r) => /* @__PURE__ */ jsx20("div", { className: "ui-datepicker__row", role: "row", children: cellsInRow.map((cell, c) => cell ? /* @__PURE__ */ jsx20(
1991
2016
  "span",
1992
2017
  {
1993
2018
  className: "ui-datepicker__cell",
1994
2019
  role: "gridcell",
1995
2020
  "aria-selected": isPicked(cell.index),
1996
- children: /* @__PURE__ */ jsx19(
2021
+ children: /* @__PURE__ */ jsx20(
1997
2022
  "button",
1998
2023
  {
1999
2024
  type: "button",
@@ -2012,12 +2037,12 @@ function DatePicker({
2012
2037
  "aria-label": state(cell),
2013
2038
  onClick: () => pick(cell),
2014
2039
  onFocus: () => setCursor(cell.index),
2015
- children: /* @__PURE__ */ jsx19("span", { className: "ui-datepicker__num", children: cell.label })
2040
+ children: /* @__PURE__ */ jsx20("span", { className: "ui-datepicker__num", children: cell.label })
2016
2041
  }
2017
2042
  )
2018
2043
  },
2019
2044
  cell.period
2020
- ) : /* @__PURE__ */ jsx19("span", { className: "ui-datepicker__cell is-empty", role: "gridcell" }, `e${r}-${c}`)) }, `r${r}`))
2045
+ ) : /* @__PURE__ */ jsx20("span", { className: "ui-datepicker__cell is-empty", role: "gridcell" }, `e${r}-${c}`)) }, `r${r}`))
2021
2046
  ]
2022
2047
  }
2023
2048
  )
@@ -2027,8 +2052,8 @@ function DatePicker({
2027
2052
  // `open` on the root whichever form the panel takes, so the trigger's
2028
2053
  // chevron flips for the sheet as it does for the popover. The panel rules
2029
2054
  // it also switches on have no panel to find while the sheet is up.
2030
- /* @__PURE__ */ jsxs15("div", { className: cx5("ui-dropdown", "ui-datepicker", open && "open"), ref: root, children: [
2031
- /* @__PURE__ */ jsxs15(
2055
+ /* @__PURE__ */ jsxs16("div", { className: cx5("ui-dropdown", "ui-datepicker", open && "open"), ref: root, children: [
2056
+ /* @__PURE__ */ jsxs16(
2032
2057
  "button",
2033
2058
  {
2034
2059
  type: "button",
@@ -2044,8 +2069,8 @@ function DatePicker({
2044
2069
  setOpen(!open);
2045
2070
  },
2046
2071
  children: [
2047
- /* @__PURE__ */ jsx19("span", { className: "ui-dropdown__value", children: shown ?? empty }),
2048
- /* @__PURE__ */ jsx19("span", { className: "ui-dropdown__chevron", "aria-hidden": "true" })
2072
+ /* @__PURE__ */ jsx20("span", { className: "ui-dropdown__value", children: shown ?? empty }),
2073
+ /* @__PURE__ */ jsx20("span", { className: "ui-dropdown__chevron", "aria-hidden": "true" })
2049
2074
  ]
2050
2075
  }
2051
2076
  ),
@@ -2056,8 +2081,8 @@ function DatePicker({
2056
2081
  // without taking the sheet's affordances left a phone reader with no
2057
2082
  // visible way out and a Tab that walked into the live page behind it.
2058
2083
  // why: guidelines/drawer.md
2059
- /* @__PURE__ */ jsx19(Drawer, { open, side: "bottom", size: "md", title: name, onClose: () => setOpen(false), children: calendar })
2060
- ) : /* @__PURE__ */ jsx19(
2084
+ /* @__PURE__ */ jsx20(Drawer, { open, side: "bottom", size: "md", title: name, onClose: () => setOpen(false), children: calendar })
2085
+ ) : /* @__PURE__ */ jsx20(
2061
2086
  "div",
2062
2087
  {
2063
2088
  className: cx5("ui-dropdown__panel", "ui-datepicker__panel", align === "end" && "is-end"),
@@ -2075,15 +2100,15 @@ function DatePicker({
2075
2100
  // src/Dropdown.tsx
2076
2101
  import {
2077
2102
  Fragment as Fragment5,
2078
- useCallback as useCallback4,
2103
+ useCallback as useCallback5,
2079
2104
  useContext as useContext2,
2080
2105
  useEffect as useEffect7,
2081
2106
  useId as useId8,
2082
2107
  useRef as useRef11,
2083
- useState as useState7
2108
+ useState as useState8
2084
2109
  } from "react";
2085
2110
  import {
2086
- icon as icon3,
2111
+ icon as icon4,
2087
2112
  dropdownMatch,
2088
2113
  dropdownFiltering,
2089
2114
  filterPanelFit,
@@ -2098,7 +2123,7 @@ import { createContext as createContext2 } from "react";
2098
2123
  var FieldContext = createContext2(null);
2099
2124
 
2100
2125
  // src/Dropdown.tsx
2101
- import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
2126
+ import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
2102
2127
  var EXIT_SLACK_MS2 = 50;
2103
2128
  var SETTLE_MS = 450;
2104
2129
  var inPanel = (node) => {
@@ -2107,12 +2132,12 @@ var inPanel = (node) => {
2107
2132
  };
2108
2133
  var cx6 = (...a) => a.filter(Boolean).join(" ");
2109
2134
  var isRow = (it) => Boolean(it) && it !== "---" && !it.separator;
2110
- var Glyph2 = ({ name, className, hidden }) => /* @__PURE__ */ jsx20(
2135
+ var Glyph2 = ({ name, className, hidden }) => /* @__PURE__ */ jsx21(
2111
2136
  "span",
2112
2137
  {
2113
2138
  className,
2114
2139
  "aria-hidden": hidden ? "true" : void 0,
2115
- dangerouslySetInnerHTML: { __html: icon3(name) }
2140
+ dangerouslySetInnerHTML: { __html: icon4(name) }
2116
2141
  }
2117
2142
  );
2118
2143
  function RowBadge({ badge }) {
@@ -2120,12 +2145,17 @@ function RowBadge({ badge }) {
2120
2145
  const given = typeof badge === "string" ? "" : badge.tone || "";
2121
2146
  let tone = given || (/^live$/i.test(String(text2)) ? "live" : "neutral");
2122
2147
  if (!given && tone === "neutral" && /^(?:off|unset|disabled|archive|archived)$/i.test(text2)) tone = "state";
2123
- return /* @__PURE__ */ jsx20("span", { className: `ui-dropdown__badge is-${tone}`, children: text2 });
2148
+ return /* @__PURE__ */ jsx21("span", { className: `ui-dropdown__badge is-${tone}`, children: text2 });
2124
2149
  }
2125
2150
  var keyOf = (it) => it.value != null ? `v:${it.value}` : `l:${it.label}`;
2126
2151
  var itemsIn = (panel) => Array.from(panel?.querySelectorAll("[data-dd-item]") ?? []).filter((el) => el.getAttribute("aria-disabled") !== "true" && !el.hidden);
2127
2152
  var openNow = /* @__PURE__ */ new Set();
2128
2153
  var composing = (e) => e.isComposing || e.keyCode === 229;
2154
+ var countOf2 = (count, rows) => {
2155
+ if (count == null) return null;
2156
+ const n = count === true ? rows.filter((it) => !it.avatar?.empty).length : Number(count);
2157
+ return Number.isFinite(n) && n >= 0 ? n : null;
2158
+ };
2129
2159
  var SEARCH_DEFAULTS = {
2130
2160
  placeholder: "Search",
2131
2161
  empty: "No match for \u201C{q}\u201D",
@@ -2159,11 +2189,11 @@ function Dropdown({
2159
2189
  onSelect,
2160
2190
  row
2161
2191
  }) {
2162
- const [selfOpen, setSelfOpen] = useState7(defaultOpen);
2192
+ const [selfOpen, setSelfOpen] = useState8(defaultOpen);
2163
2193
  const open = openProp ?? selfOpen;
2164
- const [pick, setPick] = useState7(null);
2165
- const [query, setQuery] = useState7(() => search && search !== true ? search.query || "" : "");
2166
- const [activeKey, setActiveKey] = useState7(null);
2194
+ const [pick, setPick] = useState8(null);
2195
+ const [query, setQuery] = useState8(() => search && search !== true ? search.query || "" : "");
2196
+ const [activeKey, setActiveKey] = useState8(null);
2167
2197
  const root = useRef11(null);
2168
2198
  const panel = useRef11(null);
2169
2199
  const trigger = useRef11(null);
@@ -2174,7 +2204,7 @@ function Dropdown({
2174
2204
  const uid = id ?? auto;
2175
2205
  const inField = useContext2(FieldContext);
2176
2206
  const fieldName = inField && id === inField.id && !(ariaLabel && triggerContent != null) ? { id: `${uid}-trigger`, labelId: inField.labelId, labelledBy: `${inField.labelId} ${uid}-trigger` } : null;
2177
- const setOpen = useCallback4((next) => {
2207
+ const setOpen = useCallback5((next) => {
2178
2208
  if (openProp === void 0) setSelfOpen(next);
2179
2209
  onOpenChange?.(next);
2180
2210
  }, [openProp, onOpenChange]);
@@ -2260,9 +2290,17 @@ function Dropdown({
2260
2290
  el.classList.remove("is-closing");
2261
2291
  };
2262
2292
  }, [open]);
2263
- const sx = search ? { ...SEARCH_DEFAULTS, ...strip(search === true ? {} : search) } : null;
2264
2293
  const entries = sections?.length ? sections.flatMap((s) => s.items || []) : items || [];
2265
2294
  const rows = entries.filter(isRow);
2295
+ const given_ = search ? strip(search === true ? {} : search) : null;
2296
+ const n = given_ ? countOf2(given_.count, rows) : null;
2297
+ const counted = n == null ? void 0 : `Search ${n} ${given_?.noun || "people"}`;
2298
+ const sx = given_ ? {
2299
+ ...SEARCH_DEFAULTS,
2300
+ ...given_,
2301
+ placeholder: given_.placeholder || counted || SEARCH_DEFAULTS.placeholder,
2302
+ label: given_.label || counted
2303
+ } : null;
2266
2304
  const isSelect = variant === "select" || variant == null && rows.some((it) => it.selected || it.value != null);
2267
2305
  const listRole = isSelect ? "listbox" : "menu";
2268
2306
  const asOption = isSelect || Boolean(sx);
@@ -2275,6 +2313,8 @@ function Dropdown({
2275
2313
  }, [givenKey, pick]);
2276
2314
  const picked = pickedKey != null ? rows.find((it) => keyOf(it) === pickedKey) : void 0;
2277
2315
  const shown = value != null ? value : isSelect ? picked?.label ?? given?.label : null;
2316
+ const marked2 = isSelect && rows.some((it) => it.avatar);
2317
+ const chosen = marked2 ? value != null ? rows.find((it) => it.label === value) : picked ?? given : void 0;
2278
2318
  const selectedOf = (it) => pickedKey != null ? it.disabled ? !!it.selected : keyOf(it) === pickedKey : !!it.selected;
2279
2319
  const hiddenBy = (it) => Boolean(sx) && !dropdownMatch(it.label, query);
2280
2320
  const filtering = Boolean(sx) && dropdownFiltering(query);
@@ -2506,7 +2546,7 @@ function Dropdown({
2506
2546
  };
2507
2547
  function renderRow(entry, key) {
2508
2548
  if (!isRow(entry)) {
2509
- return /* @__PURE__ */ jsx20("div", { className: "ui-dropdown__sep", role: "separator", hidden: filtering || void 0 }, key);
2549
+ return /* @__PURE__ */ jsx21("div", { className: "ui-dropdown__sep", role: "separator", hidden: filtering || void 0 }, key);
2510
2550
  }
2511
2551
  const disabled2 = !!entry.disabled;
2512
2552
  const selected = selectedOf(entry);
@@ -2528,23 +2568,23 @@ function Dropdown({
2528
2568
  ...asLink ? { href: entry.href, ...entry.target ? { target: entry.target } : null } : null,
2529
2569
  ...sx ? { id: rowIds.get(entry), hidden: hiddenBy(entry) || void 0 } : null,
2530
2570
  onClick: (e) => choose(entry, e),
2531
- children: /* @__PURE__ */ jsxs16(Fragment6, { children: [
2532
- entry.icon && /* @__PURE__ */ jsx20(Glyph2, { name: entry.icon, className: "ui-dropdown__ic" }),
2533
- /* @__PURE__ */ jsxs16("span", { className: "ui-dropdown__main", children: [
2534
- /* @__PURE__ */ jsx20("span", { className: "ui-dropdown__label", children: entry.label }),
2535
- entry.description && /* @__PURE__ */ jsx20("span", { className: "ui-dropdown__desc", children: entry.description })
2571
+ children: /* @__PURE__ */ jsxs17(Fragment6, { children: [
2572
+ entry.avatar ? /* @__PURE__ */ jsx21(Avatar, { personKey: entry.avatar.key, name: entry.avatar.name, src: entry.avatar.src, empty: entry.avatar.empty }) : entry.icon && /* @__PURE__ */ jsx21(Glyph2, { name: entry.icon, className: "ui-dropdown__ic" }),
2573
+ /* @__PURE__ */ jsxs17("span", { className: "ui-dropdown__main", children: [
2574
+ /* @__PURE__ */ jsx21("span", { className: "ui-dropdown__label", children: entry.label }),
2575
+ entry.description && /* @__PURE__ */ jsx21("span", { className: "ui-dropdown__desc", children: entry.description })
2536
2576
  ] }),
2537
- entry.badge ? /* @__PURE__ */ jsx20(RowBadge, { badge: entry.badge }) : null,
2538
- asOption && /* @__PURE__ */ jsx20(Glyph2, { name: "check", className: "ui-dropdown__tick", hidden: true })
2577
+ entry.badge ? /* @__PURE__ */ jsx21(RowBadge, { badge: entry.badge }) : null,
2578
+ asOption && /* @__PURE__ */ jsx21(Glyph2, { name: "check", className: "ui-dropdown__tick", hidden: true })
2539
2579
  ] })
2540
2580
  };
2541
- if (row) return /* @__PURE__ */ jsx20(Fragment5, { children: row(entry, props) }, key);
2581
+ if (row) return /* @__PURE__ */ jsx21(Fragment5, { children: row(entry, props) }, key);
2542
2582
  const Tag = asLink ? "a" : "div";
2543
- return /* @__PURE__ */ jsx20(Tag, { ...props }, key);
2583
+ return /* @__PURE__ */ jsx21(Tag, { ...props }, key);
2544
2584
  }
2545
2585
  const body = sections?.length ? sections.map((section, si) => {
2546
2586
  const gone = filtering && !(section.items || []).some((it) => isRow(it) && !hiddenBy(it));
2547
- return /* @__PURE__ */ jsxs16(
2587
+ return /* @__PURE__ */ jsxs17(
2548
2588
  "div",
2549
2589
  {
2550
2590
  className: "ui-dropdown__section",
@@ -2552,7 +2592,7 @@ function Dropdown({
2552
2592
  "aria-label": section.label || void 0,
2553
2593
  hidden: gone || void 0,
2554
2594
  children: [
2555
- section.label && /* @__PURE__ */ jsx20("div", { className: "ui-dropdown__group", role: "presentation", children: section.label }),
2595
+ section.label && /* @__PURE__ */ jsx21("div", { className: "ui-dropdown__group", role: "presentation", children: section.label }),
2556
2596
  (section.items || []).map((entry, i) => renderRow(entry, `s${si}-${i}`))
2557
2597
  ]
2558
2598
  },
@@ -2560,12 +2600,12 @@ function Dropdown({
2560
2600
  );
2561
2601
  }) : (items || []).map((entry, i) => renderRow(entry, `i${i}`));
2562
2602
  const cap = scroll && scroll !== true ? { "--ui-dropdown-cap": typeof scroll === "number" ? `${scroll}px` : scroll } : void 0;
2563
- const none = sx && filtering && !visible.length ? /* @__PURE__ */ jsxs16(Fragment6, { children: [
2564
- /* @__PURE__ */ jsx20("span", { className: "ui-dropdown__none-title", children: sx.empty.replace("{q}", () => query.trim()) }),
2565
- /* @__PURE__ */ jsx20("span", { className: "ui-dropdown__none-hint", children: sx.hint })
2603
+ const none = sx && filtering && !visible.length ? /* @__PURE__ */ jsxs17(Fragment6, { children: [
2604
+ /* @__PURE__ */ jsx21("span", { className: "ui-dropdown__none-title", children: sx.empty.replace("{q}", () => query.trim()) }),
2605
+ /* @__PURE__ */ jsx21("span", { className: "ui-dropdown__none-hint", children: sx.hint })
2566
2606
  ] }) : null;
2567
- return /* @__PURE__ */ jsxs16("div", { className: cx6("ui-dropdown", open && "open"), id, ref: root, onKeyDown, children: [
2568
- /* @__PURE__ */ jsxs16(
2607
+ return /* @__PURE__ */ jsxs17("div", { className: cx6("ui-dropdown", open && "open"), id, ref: root, onKeyDown, children: [
2608
+ /* @__PURE__ */ jsxs17(
2569
2609
  "button",
2570
2610
  {
2571
2611
  type: "button",
@@ -2585,15 +2625,16 @@ function Dropdown({
2585
2625
  setOpen(!open);
2586
2626
  },
2587
2627
  children: [
2588
- triggerContent != null ? triggerContent : /* @__PURE__ */ jsxs16(Fragment6, { children: [
2589
- label && /* @__PURE__ */ jsx20("span", { className: "ui-dropdown__pre", children: label }),
2590
- /* @__PURE__ */ jsx20("span", { className: "ui-dropdown__value", children: shown != null ? shown : placeholder })
2628
+ triggerContent != null ? triggerContent : /* @__PURE__ */ jsxs17(Fragment6, { children: [
2629
+ marked2 && (chosen?.avatar ? /* @__PURE__ */ jsx21(Avatar, { personKey: chosen.avatar.key, name: chosen.avatar.name, src: chosen.avatar.src, empty: chosen.avatar.empty }) : /* @__PURE__ */ jsx21(Avatar, { empty: true })),
2630
+ label && /* @__PURE__ */ jsx21("span", { className: "ui-dropdown__pre", children: label }),
2631
+ /* @__PURE__ */ jsx21("span", { className: cx6("ui-dropdown__value", marked2 && !chosen && "is-placeholder"), children: shown != null ? shown : placeholder })
2591
2632
  ] }),
2592
- chevron && /* @__PURE__ */ jsx20("span", { className: "ui-dropdown__chevron", "aria-hidden": "true" })
2633
+ chevron && /* @__PURE__ */ jsx21("span", { className: "ui-dropdown__chevron", "aria-hidden": "true" })
2593
2634
  ]
2594
2635
  }
2595
2636
  ),
2596
- /* @__PURE__ */ jsxs16(
2637
+ /* @__PURE__ */ jsxs17(
2597
2638
  "div",
2598
2639
  {
2599
2640
  className: cx6(
@@ -2614,10 +2655,10 @@ function Dropdown({
2614
2655
  onMouseMove,
2615
2656
  children: [
2616
2657
  header,
2617
- sx ? /* @__PURE__ */ jsxs16(Fragment6, { children: [
2618
- /* @__PURE__ */ jsxs16("div", { className: "ui-dropdown__search", children: [
2619
- /* @__PURE__ */ jsx20(Glyph2, { name: "search", className: "ui-dropdown__search-ic", hidden: true }),
2620
- /* @__PURE__ */ jsx20(
2658
+ sx ? /* @__PURE__ */ jsxs17(Fragment6, { children: [
2659
+ /* @__PURE__ */ jsxs17("div", { className: "ui-dropdown__search", children: [
2660
+ /* @__PURE__ */ jsx21(Glyph2, { name: "search", className: "ui-dropdown__search-ic", hidden: true }),
2661
+ /* @__PURE__ */ jsx21(
2621
2662
  "input",
2622
2663
  {
2623
2664
  className: "ui-dropdown__search-input",
@@ -2641,8 +2682,8 @@ function Dropdown({
2641
2682
  }
2642
2683
  )
2643
2684
  ] }),
2644
- /* @__PURE__ */ jsx20("div", { className: "ui-dropdown__list", role: "listbox", id: listId, "aria-label": name, style: cap, children: body }),
2645
- /* @__PURE__ */ jsx20(
2685
+ /* @__PURE__ */ jsx21("div", { className: "ui-dropdown__list", role: "listbox", id: listId, "aria-label": name, style: cap, children: body }),
2686
+ /* @__PURE__ */ jsx21(
2646
2687
  "div",
2647
2688
  {
2648
2689
  className: "ui-dropdown__none",
@@ -2667,7 +2708,7 @@ function strip(o) {
2667
2708
  }
2668
2709
 
2669
2710
  // src/BackLink.tsx
2670
- import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
2711
+ import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
2671
2712
  var BARE = "Back";
2672
2713
  var SCRIPTED = /^javascript:/i;
2673
2714
  var LEADING = /^[\u0000-\u0020]+/;
@@ -2686,7 +2727,7 @@ function BackLink({
2686
2727
  const name = text(label).replace(SAID, "");
2687
2728
  const bare = !name || name.toLowerCase() === BARE.toLowerCase();
2688
2729
  const Tag = as ?? "a";
2689
- return /* @__PURE__ */ jsxs17(
2730
+ return /* @__PURE__ */ jsxs18(
2690
2731
  Tag,
2691
2732
  {
2692
2733
  className: ["ui-back", className].filter(Boolean).join(" "),
@@ -2694,8 +2735,8 @@ function BackLink({
2694
2735
  "aria-label": bare ? void 0 : `${BARE} to ${name}`,
2695
2736
  ...rest,
2696
2737
  children: [
2697
- /* @__PURE__ */ jsx21(Icon, { name: "chevronLeft" }),
2698
- /* @__PURE__ */ jsx21("span", { className: "ui-back__label", children: bare ? BARE : name })
2738
+ /* @__PURE__ */ jsx22(Icon, { name: "chevronLeft" }),
2739
+ /* @__PURE__ */ jsx22("span", { className: "ui-back__label", children: bare ? BARE : name })
2699
2740
  ]
2700
2741
  }
2701
2742
  );
@@ -2703,41 +2744,41 @@ function BackLink({
2703
2744
 
2704
2745
  // src/TableValues.tsx
2705
2746
  import { formatNumericValue, formatDeltaValue } from "@apliteni/apliteni-ui";
2706
- import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
2747
+ import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
2707
2748
  function NumericValue(props) {
2708
2749
  const value = formatNumericValue(props);
2709
- return /* @__PURE__ */ jsx22("span", { children: /* @__PURE__ */ jsxs18("span", { className: "ui-value", "aria-label": value.missing, children: [
2750
+ return /* @__PURE__ */ jsx23("span", { children: /* @__PURE__ */ jsxs19("span", { className: "ui-value", "aria-label": value.missing, children: [
2710
2751
  value.text,
2711
- value.unit && /* @__PURE__ */ jsx22("span", { className: "ui-value__unit", children: value.unit })
2752
+ value.unit && /* @__PURE__ */ jsx23("span", { className: "ui-value__unit", children: value.unit })
2712
2753
  ] }) });
2713
2754
  }
2714
2755
  function DeltaValue(props) {
2715
2756
  const value = formatDeltaValue(props);
2716
- return /* @__PURE__ */ jsx22("span", { children: /* @__PURE__ */ jsx22("span", { className: value.className, "aria-describedby": value.basisId || void 0, children: value.text }) });
2757
+ return /* @__PURE__ */ jsx23("span", { children: /* @__PURE__ */ jsx23("span", { className: value.className, "aria-describedby": value.basisId || void 0, children: value.text }) });
2717
2758
  }
2718
2759
  function RowIdentity({ symbol, name, logo, href }) {
2719
2760
  const Tag = href ? "a" : "span";
2720
- return /* @__PURE__ */ jsxs18(Tag, { className: "ui-identity", href, children: [
2721
- /* @__PURE__ */ jsxs18("span", { className: "ui-identity__logo", "aria-hidden": "true", children: [
2722
- /* @__PURE__ */ jsx22("span", { children: symbol.slice(0, 1) }),
2723
- logo && /* @__PURE__ */ jsx22("img", { src: logo, alt: "", onLoad: (e) => {
2761
+ return /* @__PURE__ */ jsxs19(Tag, { className: "ui-identity", href, children: [
2762
+ /* @__PURE__ */ jsxs19("span", { className: "ui-identity__logo", "aria-hidden": "true", children: [
2763
+ /* @__PURE__ */ jsx23("span", { children: symbol.slice(0, 1) }),
2764
+ logo && /* @__PURE__ */ jsx23("img", { src: logo, alt: "", onLoad: (e) => {
2724
2765
  e.currentTarget.hidden = false;
2725
2766
  }, onError: (e) => {
2726
2767
  e.currentTarget.hidden = true;
2727
2768
  } })
2728
2769
  ] }),
2729
- /* @__PURE__ */ jsx22("span", { className: "ui-identity__symbol", children: symbol }),
2730
- /* @__PURE__ */ jsx22("span", { className: "ui-identity__name", children: name })
2770
+ /* @__PURE__ */ jsx23("span", { className: "ui-identity__symbol", children: symbol }),
2771
+ /* @__PURE__ */ jsx23("span", { className: "ui-identity__name", children: name })
2731
2772
  ] });
2732
2773
  }
2733
2774
 
2734
2775
  // src/Segmented.tsx
2735
2776
  import { segmentedNextIndex } from "@apliteni/apliteni-ui";
2736
- import { jsx as jsx23 } from "react/jsx-runtime";
2777
+ import { jsx as jsx24 } from "react/jsx-runtime";
2737
2778
  function Segmented({ options, value, onChange, label, appearance = "pill", size, block = false, disabled = false }) {
2738
2779
  const enabled = options.filter((o) => !o.disabled);
2739
2780
  const tabValue = enabled.some((o) => o.value === value) ? value : enabled[0]?.value;
2740
- return /* @__PURE__ */ jsx23("div", { className: `ui-seg${size === "sm" ? " ui-seg--sm" : ""}${block ? " ui-seg--block" : ""}${appearance === "underline" ? " ui-seg--underline" : ""}`, role: "toolbar", "aria-label": label, children: options.map((option) => /* @__PURE__ */ jsx23(
2781
+ return /* @__PURE__ */ jsx24("div", { className: `ui-seg${size === "sm" ? " ui-seg--sm" : ""}${block ? " ui-seg--block" : ""}${appearance === "underline" ? " ui-seg--underline" : ""}`, role: "toolbar", "aria-label": label, children: options.map((option) => /* @__PURE__ */ jsx24(
2741
2782
  "button",
2742
2783
  {
2743
2784
  type: "button",
@@ -2763,17 +2804,17 @@ function Segmented({ options, value, onChange, label, appearance = "pill", size,
2763
2804
  }
2764
2805
 
2765
2806
  // src/FilterBar.tsx
2766
- import { useRef as useRef12, useState as useState8 } from "react";
2807
+ import { useRef as useRef12, useState as useState9 } from "react";
2767
2808
  import { filterChipText, filterChipName, filterChipUnset, filterChipItems, focusNextStop } from "@apliteni/apliteni-ui";
2768
- import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
2809
+ import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
2769
2810
  var SEARCH_AT = 10;
2770
2811
  var isRow2 = (entry) => entry !== "---" && !entry.separator;
2771
2812
  function FilterBar({ filters, label = "Filters", clearLabel = "Clear all", clearVariant = "ghost", add, addLabel = "Filter", disabled = false, busy = false, onRemove, onClear, onChange, onAdd }) {
2772
2813
  const bar = useRef12(null);
2773
2814
  const focused = useRef12(null);
2774
2815
  const landing = useRef12(null);
2775
- const [opened, setOpened] = useState8({});
2776
- const [adding, setAdding] = useState8(false);
2816
+ const [opened, setOpened] = useState9({});
2817
+ const [adding, setAdding] = useState9(false);
2777
2818
  const blocked = disabled || busy;
2778
2819
  const offer = (add || []).filter((entry) => !filters.some((filter) => filter.id === entry.id));
2779
2820
  const source = /* @__PURE__ */ new Map();
@@ -2808,7 +2849,7 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all", clear
2808
2849
  if (target) target.focus();
2809
2850
  else focusNextStop(bar.current);
2810
2851
  });
2811
- return /* @__PURE__ */ jsx24("div", { children: /* @__PURE__ */ jsxs19(
2852
+ return /* @__PURE__ */ jsx25("div", { children: /* @__PURE__ */ jsxs20(
2812
2853
  "fieldset",
2813
2854
  {
2814
2855
  ref: bar,
@@ -2821,8 +2862,8 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all", clear
2821
2862
  if (event.relatedTarget && !event.currentTarget.contains(event.relatedTarget)) focused.current = null;
2822
2863
  },
2823
2864
  children: [
2824
- /* @__PURE__ */ jsx24("legend", { className: "ui-filter-bar__legend", children: label }),
2825
- filters.map((filter, index) => /* @__PURE__ */ jsxs19(
2865
+ /* @__PURE__ */ jsx25("legend", { className: "ui-filter-bar__legend", children: label }),
2866
+ filters.map((filter, index) => /* @__PURE__ */ jsxs20(
2826
2867
  "fieldset",
2827
2868
  {
2828
2869
  className: "ui-filter-bar__chip",
@@ -2832,14 +2873,14 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all", clear
2832
2873
  focused.current = { id: filter.id, index };
2833
2874
  },
2834
2875
  children: [
2835
- /* @__PURE__ */ jsx24("legend", { className: "ui-filter-bar__legend", children: filter.label }),
2836
- /* @__PURE__ */ jsx24(
2876
+ /* @__PURE__ */ jsx25("legend", { className: "ui-filter-bar__legend", children: filter.label }),
2877
+ /* @__PURE__ */ jsx25(
2837
2878
  Dropdown,
2838
2879
  {
2839
2880
  items: filterChipItems(filter),
2840
2881
  variant: "select",
2841
2882
  ariaLabel: filterChipName(filter),
2842
- triggerContent: /* @__PURE__ */ jsx24("span", { className: filterChipUnset(filter) ? "ui-dropdown__value is-placeholder" : "ui-dropdown__value", children: filterChipText(filter) }),
2883
+ triggerContent: /* @__PURE__ */ jsx25("span", { className: filterChipUnset(filter) ? "ui-dropdown__value is-placeholder" : "ui-dropdown__value", children: filterChipText(filter) }),
2843
2884
  open: !blocked && !filter.disabled && (opened[filter.id] && opened[filter.id].against === filter.open ? opened[filter.id].open : !!filter.open),
2844
2885
  onOpenChange: (open) => setOpened((previous) => ({ ...previous, [filter.id]: { open, against: filter.open } })),
2845
2886
  onSelect: (value) => {
@@ -2847,7 +2888,7 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all", clear
2847
2888
  }
2848
2889
  }
2849
2890
  ),
2850
- /* @__PURE__ */ jsx24(
2891
+ /* @__PURE__ */ jsx25(
2851
2892
  "button",
2852
2893
  {
2853
2894
  type: "button",
@@ -2864,16 +2905,16 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all", clear
2864
2905
  },
2865
2906
  filter.id
2866
2907
  )),
2867
- offering && /* @__PURE__ */ jsx24("div", { "data-filter-add": "", onFocus: () => {
2908
+ offering && /* @__PURE__ */ jsx25("div", { "data-filter-add": "", onFocus: () => {
2868
2909
  focused.current = null;
2869
- }, children: /* @__PURE__ */ jsx24(
2910
+ }, children: /* @__PURE__ */ jsx25(
2870
2911
  Dropdown,
2871
2912
  {
2872
2913
  variant: "menu",
2873
2914
  sections,
2874
2915
  ariaLabel: addLabel,
2875
- triggerContent: /* @__PURE__ */ jsxs19(Fragment7, { children: [
2876
- /* @__PURE__ */ jsx24(Icon, { name: "plus" }),
2916
+ triggerContent: /* @__PURE__ */ jsxs20(Fragment7, { children: [
2917
+ /* @__PURE__ */ jsx25(Icon, { name: "plus" }),
2877
2918
  addLabel
2878
2919
  ] }),
2879
2920
  search: options >= SEARCH_AT && { label: `Search ${label.toLowerCase()}` },
@@ -2887,9 +2928,9 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all", clear
2887
2928
  }
2888
2929
  }
2889
2930
  ) }),
2890
- filters.length > 0 && /* @__PURE__ */ jsx24("span", { "data-filter-clear": "", onFocus: () => {
2931
+ filters.length > 0 && /* @__PURE__ */ jsx25("span", { "data-filter-clear": "", onFocus: () => {
2891
2932
  focused.current = { id: null, index: 0 };
2892
- }, children: /* @__PURE__ */ jsx24(Button, { size: "sm", variant: clearVariant, onClick: () => {
2933
+ }, children: /* @__PURE__ */ jsx25(Button, { size: "sm", variant: clearVariant, onClick: () => {
2893
2934
  if (!blocked) onClear();
2894
2935
  }, children: clearLabel }) })
2895
2936
  ]
@@ -2898,34 +2939,34 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all", clear
2898
2939
  }
2899
2940
 
2900
2941
  // src/KeyValueList.tsx
2901
- import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
2942
+ import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
2902
2943
  function detail({ value, redacted }) {
2903
- if (redacted) return /* @__PURE__ */ jsxs20("span", { className: "ui-kv__hidden", children: [
2904
- /* @__PURE__ */ jsx25(Icon, { name: "eyeOff" }),
2944
+ if (redacted) return /* @__PURE__ */ jsxs21("span", { className: "ui-kv__hidden", children: [
2945
+ /* @__PURE__ */ jsx26(Icon, { name: "eyeOff" }),
2905
2946
  "Hidden"
2906
2947
  ] });
2907
2948
  if (value == null) return "\u2014";
2908
2949
  return typeof value === "boolean" ? String(value) : value;
2909
2950
  }
2910
2951
  function KeyValueList({ rows, columns = 1, className, ...rest }) {
2911
- return /* @__PURE__ */ jsx25("dl", { ...rest, className: ["ui-kv", columns === 2 && "ui-kv--two-columns", className].filter(Boolean).join(" "), children: rows.map((row, index) => /* @__PURE__ */ jsxs20("div", { className: "ui-drawer__row", children: [
2912
- /* @__PURE__ */ jsx25("dt", { children: row.label }),
2913
- /* @__PURE__ */ jsx25("dd", { children: detail(row) })
2952
+ return /* @__PURE__ */ jsx26("dl", { ...rest, className: ["ui-kv", columns === 2 && "ui-kv--two-columns", className].filter(Boolean).join(" "), children: rows.map((row, index) => /* @__PURE__ */ jsxs21("div", { className: "ui-drawer__row", children: [
2953
+ /* @__PURE__ */ jsx26("dt", { children: row.label }),
2954
+ /* @__PURE__ */ jsx26("dd", { children: detail(row) })
2914
2955
  ] }, index)) });
2915
2956
  }
2916
2957
  function DrawerSection({ title, headingLevel = 3, className, children, ...rest }) {
2917
2958
  const Heading = `h${headingLevel}`;
2918
- return /* @__PURE__ */ jsxs20("section", { ...rest, className: ["ui-drawer__section", className].filter(Boolean).join(" "), children: [
2919
- title != null && /* @__PURE__ */ jsx25(Heading, { className: "ui-drawer__section-title", children: title }),
2959
+ return /* @__PURE__ */ jsxs21("section", { ...rest, className: ["ui-drawer__section", className].filter(Boolean).join(" "), children: [
2960
+ title != null && /* @__PURE__ */ jsx26(Heading, { className: "ui-drawer__section-title", children: title }),
2920
2961
  children
2921
2962
  ] });
2922
2963
  }
2923
2964
 
2924
2965
  // src/Snippet.tsx
2925
- import { useEffect as useEffect8, useRef as useRef13, useState as useState9 } from "react";
2926
- import { Fragment as Fragment8, jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
2966
+ import { useEffect as useEffect8, useRef as useRef13, useState as useState10 } from "react";
2967
+ import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
2927
2968
  function Snippet({ label = "shell", code = "", children, copy = true, reveal = false, copyLabel = "Copy code" }) {
2928
- const [status, setStatus] = useState9("idle");
2969
+ const [status, setStatus] = useState10("idle");
2929
2970
  const request = useRef13(0);
2930
2971
  const timer = useRef13(void 0);
2931
2972
  useEffect8(() => {
@@ -2948,11 +2989,11 @@ function Snippet({ label = "shell", code = "", children, copy = true, reveal = f
2948
2989
  if (current === request.current) setStatus("failed");
2949
2990
  }
2950
2991
  }
2951
- return /* @__PURE__ */ jsxs21("div", { className: reveal ? "ui-snippet ui-snippet--reveal" : "ui-snippet", children: [
2952
- /* @__PURE__ */ jsxs21("div", { className: "ui-snippet__bar", children: [
2953
- /* @__PURE__ */ jsx26("span", { children: label }),
2954
- copy && /* @__PURE__ */ jsxs21(Fragment8, { children: [
2955
- /* @__PURE__ */ jsx26(
2992
+ return /* @__PURE__ */ jsxs22("div", { className: reveal ? "ui-snippet ui-snippet--reveal" : "ui-snippet", children: [
2993
+ /* @__PURE__ */ jsxs22("div", { className: "ui-snippet__bar", children: [
2994
+ /* @__PURE__ */ jsx27("span", { children: label }),
2995
+ copy && /* @__PURE__ */ jsxs22(Fragment8, { children: [
2996
+ /* @__PURE__ */ jsx27(
2956
2997
  "button",
2957
2998
  {
2958
2999
  type: "button",
@@ -2960,20 +3001,20 @@ function Snippet({ label = "shell", code = "", children, copy = true, reveal = f
2960
3001
  "aria-label": copyLabel,
2961
3002
  title: copyLabel,
2962
3003
  onClick: handleCopy,
2963
- children: /* @__PURE__ */ jsx26(Icon, { name: status === "idle" ? "copy" : "check" })
3004
+ children: /* @__PURE__ */ jsx27(Icon, { name: status === "idle" ? "copy" : "check" })
2964
3005
  }
2965
3006
  ),
2966
- /* @__PURE__ */ jsx26("span", { className: "ui-sr ui-snippet__status", role: "status", "aria-live": "polite", children: status === "copied" ? "Copied" : status === "failed" ? "Copy failed" : "" })
3007
+ /* @__PURE__ */ jsx27("span", { className: "ui-sr ui-snippet__status", role: "status", "aria-live": "polite", children: status === "copied" ? "Copied" : status === "failed" ? "Copy failed" : "" })
2967
3008
  ] })
2968
3009
  ] }),
2969
- /* @__PURE__ */ jsx26("pre", { children: children ?? code })
3010
+ /* @__PURE__ */ jsx27("pre", { children: children ?? code })
2970
3011
  ] });
2971
3012
  }
2972
3013
 
2973
3014
  // src/Tabs.tsx
2974
3015
  import { useEffect as useEffect9, useId as useId9, useRef as useRef14 } from "react";
2975
3016
  import { playEntrance } from "@apliteni/apliteni-ui/motion";
2976
- import { Fragment as Fragment9, jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
3017
+ import { Fragment as Fragment9, jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
2977
3018
  function Tabs({ items, value, onChange, label }) {
2978
3019
  const id = useId9();
2979
3020
  const previous = useRef14(value);
@@ -2983,8 +3024,8 @@ function Tabs({ items, value, onChange, label }) {
2983
3024
  if (previous.current !== value) playEntrance(activePanel.current);
2984
3025
  previous.current = value;
2985
3026
  }, [value]);
2986
- return /* @__PURE__ */ jsxs22("div", { className: "ui-tabs", children: [
2987
- /* @__PURE__ */ jsx27("div", { className: "ui-tabs__list", role: "tablist", "aria-label": label, children: items.map((item, i) => /* @__PURE__ */ jsxs22(
3027
+ return /* @__PURE__ */ jsxs23("div", { className: "ui-tabs", children: [
3028
+ /* @__PURE__ */ jsx28("div", { className: "ui-tabs__list", role: "tablist", "aria-label": label, children: items.map((item, i) => /* @__PURE__ */ jsxs23(
2988
3029
  "button",
2989
3030
  {
2990
3031
  type: "button",
@@ -3022,7 +3063,7 @@ function Tabs({ items, value, onChange, label }) {
3022
3063
  },
3023
3064
  children: [
3024
3065
  item.label,
3025
- item.count != null && /* @__PURE__ */ jsxs22(Fragment9, { children: [
3066
+ item.count != null && /* @__PURE__ */ jsxs23(Fragment9, { children: [
3026
3067
  " ",
3027
3068
  item.count
3028
3069
  ] })
@@ -3030,7 +3071,7 @@ function Tabs({ items, value, onChange, label }) {
3030
3071
  },
3031
3072
  item.value
3032
3073
  )) }),
3033
- /* @__PURE__ */ jsx27("div", { className: "ui-tabs__panels", children: items.map((item, i) => /* @__PURE__ */ jsx27(
3074
+ /* @__PURE__ */ jsx28("div", { className: "ui-tabs__panels", children: items.map((item, i) => /* @__PURE__ */ jsx28(
3034
3075
  "div",
3035
3076
  {
3036
3077
  className: "ui-tabs__panel",
@@ -3050,7 +3091,7 @@ function Tabs({ items, value, onChange, label }) {
3050
3091
  // src/Timeline.tsx
3051
3092
  import { useEffect as useEffect10, useRef as useRef15 } from "react";
3052
3093
  import { playEntrance as playEntrance2, prefersReducedMotion } from "@apliteni/apliteni-ui/motion";
3053
- import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
3094
+ import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
3054
3095
  var kindIcons = { person: "user", rule: "bolt", reversal: "refresh" };
3055
3096
  function Timeline({ events, className, ...rest }) {
3056
3097
  const previousIds = useRef15(new Set(events.map((event) => event.id)));
@@ -3067,7 +3108,7 @@ function Timeline({ events, className, ...rest }) {
3067
3108
  }
3068
3109
  previousIds.current = new Set(events.map((event) => event.id));
3069
3110
  }, [events]);
3070
- return /* @__PURE__ */ jsx28("ol", { ...rest, role: "list", className: ["ui-timeline", events.some((event) => event.kind) && "ui-timeline--kinds", className].filter(Boolean).join(" "), children: events.map((event, index) => /* @__PURE__ */ jsxs23(
3111
+ return /* @__PURE__ */ jsx29("ol", { ...rest, role: "list", className: ["ui-timeline", events.some((event) => event.kind) && "ui-timeline--kinds", className].filter(Boolean).join(" "), children: events.map((event, index) => /* @__PURE__ */ jsxs24(
3071
3112
  "li",
3072
3113
  {
3073
3114
  className: "ui-timeline__event",
@@ -3076,20 +3117,20 @@ function Timeline({ events, className, ...rest }) {
3076
3117
  else rows.current.delete(event.id);
3077
3118
  },
3078
3119
  children: [
3079
- /* @__PURE__ */ jsx28("span", { "aria-hidden": "true", className: [
3120
+ /* @__PURE__ */ jsx29("span", { "aria-hidden": "true", className: [
3080
3121
  "ui-timeline__marker",
3081
3122
  event.kind && "ui-timeline__marker--kind",
3082
3123
  event.kind === "reversal" && "ui-timeline__marker--reversal"
3083
- ].filter(Boolean).join(" "), children: event.kind && /* @__PURE__ */ jsx28(Icon, { name: kindIcons[event.kind] }) }),
3084
- /* @__PURE__ */ jsxs23("div", { className: "ui-timeline__head", children: [
3085
- /* @__PURE__ */ jsx28("span", { className: "ui-timeline__actor", children: event.actor }),
3086
- /* @__PURE__ */ jsx28("time", { dateTime: event.dateTime, children: event.timestamp }),
3087
- index === events.length - 1 && event.relativeTimestamp && /* @__PURE__ */ jsx28("span", { className: "ui-timeline__relative", children: event.relativeTimestamp })
3124
+ ].filter(Boolean).join(" "), children: event.kind && /* @__PURE__ */ jsx29(Icon, { name: kindIcons[event.kind] }) }),
3125
+ /* @__PURE__ */ jsxs24("div", { className: "ui-timeline__head", children: [
3126
+ /* @__PURE__ */ jsx29("span", { className: "ui-timeline__actor", children: event.actor }),
3127
+ /* @__PURE__ */ jsx29("time", { dateTime: event.dateTime, children: event.timestamp }),
3128
+ index === events.length - 1 && event.relativeTimestamp && /* @__PURE__ */ jsx29("span", { className: "ui-timeline__relative", children: event.relativeTimestamp })
3088
3129
  ] }),
3089
- /* @__PURE__ */ jsx28("p", { className: "ui-timeline__description", children: event.description }),
3090
- (event.meta != null || event.undo) && /* @__PURE__ */ jsxs23("div", { className: "ui-timeline__meta", children: [
3091
- event.meta != null && /* @__PURE__ */ jsx28("span", { children: event.meta }),
3092
- event.undo && /* @__PURE__ */ jsx28(Button, { variant: "ghost", size: "xs", className: "ui-btn ui-btn--ghost ui-btn--xs ui-timeline__undo", "aria-label": event.undo.label, onClick: event.undo.onUndo, children: "Undo" })
3130
+ /* @__PURE__ */ jsx29("p", { className: "ui-timeline__description", children: event.description }),
3131
+ (event.meta != null || event.undo) && /* @__PURE__ */ jsxs24("div", { className: "ui-timeline__meta", children: [
3132
+ event.meta != null && /* @__PURE__ */ jsx29("span", { children: event.meta }),
3133
+ event.undo && /* @__PURE__ */ jsx29(Button, { variant: "ghost", size: "xs", className: "ui-btn ui-btn--ghost ui-btn--xs ui-timeline__undo", "aria-label": event.undo.label, onClick: event.undo.onUndo, children: "Undo" })
3093
3134
  ] })
3094
3135
  ]
3095
3136
  },
@@ -3098,29 +3139,29 @@ function Timeline({ events, className, ...rest }) {
3098
3139
  }
3099
3140
 
3100
3141
  // src/Field.tsx
3101
- import { forwardRef as forwardRef6, useEffect as useEffect11, useId as useId10, useRef as useRef16, useState as useState10 } from "react";
3102
- import { esc, icon as icon4 } from "@apliteni/apliteni-ui";
3103
- import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
3142
+ import { forwardRef as forwardRef6, useEffect as useEffect11, useId as useId10, useRef as useRef16, useState as useState11 } from "react";
3143
+ import { esc, icon as icon5 } from "@apliteni/apliteni-ui";
3144
+ import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
3104
3145
  function messages(id, hint, error) {
3105
3146
  return [error && `${id}-error`, hint && `${id}-hint`].filter(Boolean).join(" ") || void 0;
3106
3147
  }
3107
3148
  function Frame({ id, labelId, label, hint, error, required, children }) {
3108
- return /* @__PURE__ */ jsxs24("div", { className: "ui-field", children: [
3109
- /* @__PURE__ */ jsxs24("label", { className: "ui-field__label", id: labelId, htmlFor: id, children: [
3149
+ return /* @__PURE__ */ jsxs25("div", { className: "ui-field", children: [
3150
+ /* @__PURE__ */ jsxs25("label", { className: "ui-field__label", id: labelId, htmlFor: id, children: [
3110
3151
  label,
3111
- required && /* @__PURE__ */ jsx29("span", { className: "ui-field__req", "aria-hidden": "true", children: "*" })
3152
+ required && /* @__PURE__ */ jsx30("span", { className: "ui-field__req", "aria-hidden": "true", children: "*" })
3112
3153
  ] }),
3113
3154
  children,
3114
- error && /* @__PURE__ */ jsx29(
3155
+ error && /* @__PURE__ */ jsx30(
3115
3156
  "div",
3116
3157
  {
3117
3158
  id: `${id}-error`,
3118
3159
  className: "ui-field__error",
3119
3160
  role: "alert",
3120
- dangerouslySetInnerHTML: { __html: icon4("alert") + esc(error) }
3161
+ dangerouslySetInnerHTML: { __html: icon5("alert") + esc(error) }
3121
3162
  }
3122
3163
  ),
3123
- hint && /* @__PURE__ */ jsx29("div", { id: `${id}-hint`, className: "ui-field__hint", children: hint })
3164
+ hint && /* @__PURE__ */ jsx30("div", { id: `${id}-hint`, className: "ui-field__hint", children: hint })
3124
3165
  ] });
3125
3166
  }
3126
3167
  function wiring(id, hint, error) {
@@ -3130,13 +3171,13 @@ function Field({ id: suppliedId, label, hint, error, required, children }) {
3130
3171
  const generatedId = useId10();
3131
3172
  const id = suppliedId ?? generatedId;
3132
3173
  const labelId = `${id}-label`;
3133
- return /* @__PURE__ */ jsx29(Frame, { ...{ id, labelId, label, hint, error, required }, children: /* @__PURE__ */ jsx29(FieldContext.Provider, { value: { id, labelId }, children: children({ ...wiring(id, hint, error), required }) }) });
3174
+ return /* @__PURE__ */ jsx30(Frame, { ...{ id, labelId, label, hint, error, required }, children: /* @__PURE__ */ jsx30(FieldContext.Provider, { value: { id, labelId }, children: children({ ...wiring(id, hint, error), required }) }) });
3134
3175
  }
3135
3176
  var TextField = forwardRef6(function TextField2({ label, hint, error, required, type = "text", unit, icon: glyph, className = "", ...props }, ref) {
3136
3177
  const id = useId10();
3137
3178
  const hasUnit = type === "number" && !!unit;
3138
3179
  const describedBy = [messages(id, hint, error), hasUnit ? `${id}-unit` : ""].filter(Boolean).join(" ") || void 0;
3139
- const control = /* @__PURE__ */ jsx29(
3180
+ const control = /* @__PURE__ */ jsx30(
3140
3181
  "input",
3141
3182
  {
3142
3183
  ref,
@@ -3149,19 +3190,19 @@ var TextField = forwardRef6(function TextField2({ label, hint, error, required,
3149
3190
  className: `ui-input${error ? " is-invalid" : ""} ${className}`
3150
3191
  }
3151
3192
  );
3152
- const unitSpan = hasUnit ? /* @__PURE__ */ jsx29("span", { id: `${id}-unit`, className: "ui-field-number__unit", children: unit }) : null;
3153
- return /* @__PURE__ */ jsx29(Frame, { ...{ id, label, hint, error, required }, children: glyph ? /* @__PURE__ */ jsxs24("div", { className: `ui-input-group${hasUnit ? " ui-field-number" : ""}`, children: [
3154
- /* @__PURE__ */ jsx29("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon4(glyph) } }),
3193
+ const unitSpan = hasUnit ? /* @__PURE__ */ jsx30("span", { id: `${id}-unit`, className: "ui-field-number__unit", children: unit }) : null;
3194
+ return /* @__PURE__ */ jsx30(Frame, { ...{ id, label, hint, error, required }, children: glyph ? /* @__PURE__ */ jsxs25("div", { className: `ui-input-group${hasUnit ? " ui-field-number" : ""}`, children: [
3195
+ /* @__PURE__ */ jsx30("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon5(glyph) } }),
3155
3196
  control,
3156
3197
  unitSpan
3157
- ] }) : hasUnit ? /* @__PURE__ */ jsxs24("div", { className: "ui-field-number", children: [
3198
+ ] }) : hasUnit ? /* @__PURE__ */ jsxs25("div", { className: "ui-field-number", children: [
3158
3199
  control,
3159
3200
  unitSpan
3160
3201
  ] }) : control });
3161
3202
  });
3162
3203
  function TextArea({ label, hint, error, required, className = "", ...props }) {
3163
3204
  const id = useId10();
3164
- return /* @__PURE__ */ jsx29(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx29(
3205
+ return /* @__PURE__ */ jsx30(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx30(
3165
3206
  "textarea",
3166
3207
  {
3167
3208
  rows: 4,
@@ -3174,7 +3215,7 @@ function TextArea({ label, hint, error, required, className = "", ...props }) {
3174
3215
  }
3175
3216
  function SelectField({ label, hint, error, required, className = "", children, ...props }) {
3176
3217
  const id = useId10();
3177
- return /* @__PURE__ */ jsx29(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx29(
3218
+ return /* @__PURE__ */ jsx30(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx30(
3178
3219
  "select",
3179
3220
  {
3180
3221
  ...props,
@@ -3188,8 +3229,8 @@ function SelectField({ label, hint, error, required, className = "", children, .
3188
3229
  function FileField({ label, hint, error, required, disabled, onFileChange, className = "", ...props }) {
3189
3230
  const id = useId10();
3190
3231
  const input = useRef16(null);
3191
- const [file, setFile] = useState10(null);
3192
- const [dragging, setDragging] = useState10(false);
3232
+ const [file, setFile] = useState11(null);
3233
+ const [dragging, setDragging] = useState11(false);
3193
3234
  useEffect11(() => {
3194
3235
  const form = input.current?.form;
3195
3236
  const reset = () => {
@@ -3203,7 +3244,7 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
3203
3244
  setFile(next);
3204
3245
  onFileChange?.(next);
3205
3246
  };
3206
- return /* @__PURE__ */ jsx29(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsxs24(
3247
+ return /* @__PURE__ */ jsx30(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsxs25(
3207
3248
  "div",
3208
3249
  {
3209
3250
  className: `ui-file${dragging && !disabled ? " is-dragging" : ""}${file ? " has-file" : ""}${error ? " is-invalid" : ""}${disabled ? " is-disabled" : ""}`,
@@ -3224,12 +3265,12 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
3224
3265
  update(transfer.files[0]);
3225
3266
  },
3226
3267
  children: [
3227
- /* @__PURE__ */ jsx29("span", { className: "ui-file__glyph", children: /* @__PURE__ */ jsx29(Icon, { name: "upload" }) }),
3228
- /* @__PURE__ */ jsx29("div", { "aria-live": "polite", children: file ? file.name : "Drop a file here" }),
3229
- /* @__PURE__ */ jsx29("div", { children: "or choose one from your device" }),
3230
- /* @__PURE__ */ jsxs24("span", { className: "ui-file__choose", children: [
3231
- /* @__PURE__ */ jsx29("span", { className: "ui-btn ui-btn--secondary ui-btn--sm", "aria-hidden": "true", "aria-disabled": disabled || void 0, children: file ? "Replace file" : "Choose file" }),
3232
- /* @__PURE__ */ jsx29(
3268
+ /* @__PURE__ */ jsx30("span", { className: "ui-file__glyph", children: /* @__PURE__ */ jsx30(Icon, { name: "upload" }) }),
3269
+ /* @__PURE__ */ jsx30("div", { "aria-live": "polite", children: file ? file.name : "Drop a file here" }),
3270
+ /* @__PURE__ */ jsx30("div", { children: "or choose one from your device" }),
3271
+ /* @__PURE__ */ jsxs25("span", { className: "ui-file__choose", children: [
3272
+ /* @__PURE__ */ jsx30("span", { className: "ui-btn ui-btn--secondary ui-btn--sm", "aria-hidden": "true", "aria-disabled": disabled || void 0, children: file ? "Replace file" : "Choose file" }),
3273
+ /* @__PURE__ */ jsx30(
3233
3274
  "input",
3234
3275
  {
3235
3276
  ...props,
@@ -3249,8 +3290,8 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
3249
3290
  }
3250
3291
 
3251
3292
  // src/FileDrop.tsx
3252
- import { useRef as useRef17, useState as useState11 } from "react";
3253
- import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
3293
+ import { useRef as useRef17, useState as useState12 } from "react";
3294
+ import { Fragment as Fragment10, jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
3254
3295
  var MARKS = {
3255
3296
  uploading: "clock",
3256
3297
  done: "circleCheck",
@@ -3284,7 +3325,7 @@ function FileDrop({
3284
3325
  className
3285
3326
  }) {
3286
3327
  const input = useRef17(null);
3287
- const [over, setOver] = useState11(false);
3328
+ const [over, setOver] = useState12(false);
3288
3329
  const status = file?.status ?? "uploading";
3289
3330
  const word = status === "error" ? file?.error ?? WORDS.error : file?.state ?? WORDS[status];
3290
3331
  const [stem, ext] = splitName(file?.name ?? "");
@@ -3295,7 +3336,7 @@ function FileDrop({
3295
3336
  const take = (chosen) => {
3296
3337
  if (chosen && !disabled) onFile?.(chosen);
3297
3338
  };
3298
- return /* @__PURE__ */ jsxs25(
3339
+ return /* @__PURE__ */ jsxs26(
3299
3340
  "div",
3300
3341
  {
3301
3342
  className: cx7("ui-drop", disabled && "is-disabled", className),
@@ -3315,16 +3356,16 @@ function FileDrop({
3315
3356
  },
3316
3357
  children: [
3317
3358
  children,
3318
- /* @__PURE__ */ jsxs25("div", { className: "ui-drop__row", children: [
3319
- file ? /* @__PURE__ */ jsxs25("div", { className: cx7("ui-drop__file", status === "error" && "ui-drop__file--failed"), children: [
3320
- /* @__PURE__ */ jsxs25("div", { className: "ui-drop__line", children: [
3321
- /* @__PURE__ */ jsxs25("span", { className: "ui-drop__name", title: file.name, children: [
3322
- /* @__PURE__ */ jsx30("span", { className: "ui-drop__stem", children: stem }),
3323
- /* @__PURE__ */ jsx30("span", { className: "ui-drop__ext", children: ext })
3359
+ /* @__PURE__ */ jsxs26("div", { className: "ui-drop__row", children: [
3360
+ file ? /* @__PURE__ */ jsxs26("div", { className: cx7("ui-drop__file", status === "error" && "ui-drop__file--failed"), children: [
3361
+ /* @__PURE__ */ jsxs26("div", { className: "ui-drop__line", children: [
3362
+ /* @__PURE__ */ jsxs26("span", { className: "ui-drop__name", title: file.name, children: [
3363
+ /* @__PURE__ */ jsx31("span", { className: "ui-drop__stem", children: stem }),
3364
+ /* @__PURE__ */ jsx31("span", { className: "ui-drop__ext", children: ext })
3324
3365
  ] }),
3325
- (onRemove || status === "error" && onRetry) && /* @__PURE__ */ jsxs25("span", { className: "ui-drop__actions", children: [
3326
- status === "error" && onRetry && /* @__PURE__ */ jsx30(Button, { size: "sm", icon: "refresh", onClick: onRetry, disabled, children: retryLabel }),
3327
- onRemove && /* @__PURE__ */ jsx30(
3366
+ (onRemove || status === "error" && onRetry) && /* @__PURE__ */ jsxs26("span", { className: "ui-drop__actions", children: [
3367
+ status === "error" && onRetry && /* @__PURE__ */ jsx31(Button, { size: "sm", icon: "refresh", onClick: onRetry, disabled, children: retryLabel }),
3368
+ onRemove && /* @__PURE__ */ jsx31(
3328
3369
  Button,
3329
3370
  {
3330
3371
  variant: "ghost",
@@ -3336,21 +3377,21 @@ function FileDrop({
3336
3377
  )
3337
3378
  ] })
3338
3379
  ] }),
3339
- (showSize || showWord) && /* @__PURE__ */ jsxs25(
3380
+ (showSize || showWord) && /* @__PURE__ */ jsxs26(
3340
3381
  "div",
3341
3382
  {
3342
3383
  className: cx7("ui-drop__facts", status === "error" && "ui-drop__error"),
3343
3384
  role: status === "error" ? "alert" : void 0,
3344
3385
  children: [
3345
- showSize && /* @__PURE__ */ jsx30("span", { className: "ui-drop__size", children: file.size }),
3346
- showWord && /* @__PURE__ */ jsxs25("span", { className: "ui-drop__state", children: [
3347
- /* @__PURE__ */ jsx30(Icon, { name: MARKS[status] }),
3348
- /* @__PURE__ */ jsx30("span", { className: "ui-drop__word", title: word, children: word })
3386
+ showSize && /* @__PURE__ */ jsx31("span", { className: "ui-drop__size", children: file.size }),
3387
+ showWord && /* @__PURE__ */ jsxs26("span", { className: "ui-drop__state", children: [
3388
+ /* @__PURE__ */ jsx31(Icon, { name: MARKS[status] }),
3389
+ /* @__PURE__ */ jsx31("span", { className: "ui-drop__word", title: word, children: word })
3349
3390
  ] })
3350
3391
  ]
3351
3392
  }
3352
3393
  ),
3353
- hasBar && /* @__PURE__ */ jsx30(
3394
+ hasBar && /* @__PURE__ */ jsx31(
3354
3395
  "span",
3355
3396
  {
3356
3397
  className: "ui-drop__bar",
@@ -3359,11 +3400,11 @@ function FileDrop({
3359
3400
  "aria-valuenow": file.progress,
3360
3401
  "aria-valuemin": 0,
3361
3402
  "aria-valuemax": 100,
3362
- children: /* @__PURE__ */ jsx30("span", { style: { width: `${file.progress}%` } })
3403
+ children: /* @__PURE__ */ jsx31("span", { style: { width: `${file.progress}%` } })
3363
3404
  }
3364
3405
  )
3365
- ] }) : /* @__PURE__ */ jsxs25(Fragment10, { children: [
3366
- /* @__PURE__ */ jsx30(
3406
+ ] }) : /* @__PURE__ */ jsxs26(Fragment10, { children: [
3407
+ /* @__PURE__ */ jsx31(
3367
3408
  Button,
3368
3409
  {
3369
3410
  size: "sm",
@@ -3373,9 +3414,9 @@ function FileDrop({
3373
3414
  children: label
3374
3415
  }
3375
3416
  ),
3376
- note && /* @__PURE__ */ jsx30("p", { className: "ui-drop__note", children: note })
3417
+ note && /* @__PURE__ */ jsx31("p", { className: "ui-drop__note", children: note })
3377
3418
  ] }),
3378
- /* @__PURE__ */ jsx30(
3419
+ /* @__PURE__ */ jsx31(
3379
3420
  "input",
3380
3421
  {
3381
3422
  ref: input,
@@ -3391,7 +3432,7 @@ function FileDrop({
3391
3432
  }
3392
3433
  )
3393
3434
  ] }),
3394
- showTarget && /* @__PURE__ */ jsx30("div", { className: "ui-drop__target", "aria-hidden": "true", children: dropLabel })
3435
+ showTarget && /* @__PURE__ */ jsx31("div", { className: "ui-drop__target", "aria-hidden": "true", children: dropLabel })
3395
3436
  ]
3396
3437
  }
3397
3438
  );
@@ -3399,12 +3440,12 @@ function FileDrop({
3399
3440
 
3400
3441
  // src/SearchField.tsx
3401
3442
  import { forwardRef as forwardRef7 } from "react";
3402
- import { icon as icon5 } from "@apliteni/apliteni-ui";
3403
- import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
3443
+ import { icon as icon6 } from "@apliteni/apliteni-ui";
3444
+ import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
3404
3445
  var SearchField = forwardRef7(function SearchField2({ ariaLabel, className, ...props }, ref) {
3405
- return /* @__PURE__ */ jsxs26("div", { className: "ui-input-group", children: [
3406
- /* @__PURE__ */ jsx31("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon5("search") } }),
3407
- /* @__PURE__ */ jsx31(
3446
+ return /* @__PURE__ */ jsxs27("div", { className: "ui-input-group", children: [
3447
+ /* @__PURE__ */ jsx32("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon6("search") } }),
3448
+ /* @__PURE__ */ jsx32(
3408
3449
  "input",
3409
3450
  {
3410
3451
  ref,
@@ -3418,9 +3459,9 @@ var SearchField = forwardRef7(function SearchField2({ ariaLabel, className, ...p
3418
3459
  });
3419
3460
 
3420
3461
  // src/Toast.tsx
3421
- import { createContext as createContext3, useCallback as useCallback5, useContext as useContext3, useEffect as useEffect12, useLayoutEffect as useLayoutEffect4, useRef as useRef18, useState as useState12 } from "react";
3462
+ import { createContext as createContext3, useCallback as useCallback6, useContext as useContext3, useEffect as useEffect12, useLayoutEffect as useLayoutEffect4, useRef as useRef18, useState as useState13 } from "react";
3422
3463
  import { createPortal as createPortal4 } from "react-dom";
3423
- import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
3464
+ import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
3424
3465
  var Context = createContext3(null);
3425
3466
  var glyphs = { success: "circleCheck", danger: "circleX", warn: "circleAlert", info: "info", neutral: "bolt" };
3426
3467
  function useToast() {
@@ -3430,16 +3471,16 @@ function useToast() {
3430
3471
  }
3431
3472
  function Notice({ notice, remove }) {
3432
3473
  const root = useRef18(null);
3433
- const [leaving2, setLeaving] = useState12(false);
3474
+ const [leaving2, setLeaving] = useState13(false);
3434
3475
  const dismissed = useRef18(false);
3435
- const [hovered, setHovered] = useState12(false);
3436
- const [focused, setFocused] = useState12(false);
3476
+ const [hovered, setHovered] = useState13(false);
3477
+ const [focused, setFocused] = useState13(false);
3437
3478
  const paused = hovered || focused;
3438
3479
  const tone = notice.tone ?? "success";
3439
3480
  const timed = !notice.action && notice.timer !== false && notice.timer !== 0;
3440
3481
  const duration = typeof notice.timer === "number" ? notice.timer * 1e3 : 5e3;
3441
3482
  const remaining = useRef18(duration);
3442
- const dismiss = useCallback5(() => {
3483
+ const dismiss = useCallback6(() => {
3443
3484
  if (dismissed.current) return;
3444
3485
  dismissed.current = true;
3445
3486
  if (typeof matchMedia === "function" && matchMedia("(prefers-reduced-motion: reduce)").matches) remove();
@@ -3468,7 +3509,7 @@ function Notice({ notice, remove }) {
3468
3509
  remaining.current = Math.max(0, remaining.current - (Date.now() - started));
3469
3510
  };
3470
3511
  }, [dismiss, leaving2, paused, timed]);
3471
- return /* @__PURE__ */ jsxs27(
3512
+ return /* @__PURE__ */ jsxs28(
3472
3513
  "div",
3473
3514
  {
3474
3515
  ref: root,
@@ -3482,12 +3523,12 @@ function Notice({ notice, remove }) {
3482
3523
  if (!event.currentTarget.contains(event.relatedTarget)) setFocused(false);
3483
3524
  },
3484
3525
  children: [
3485
- /* @__PURE__ */ jsx32("span", { className: "ui-toast__icon", children: /* @__PURE__ */ jsx32(Icon, { name: glyphs[tone] }) }),
3486
- /* @__PURE__ */ jsxs27("div", { className: "ui-toast__body", children: [
3487
- /* @__PURE__ */ jsx32("div", { className: "ui-toast__title", children: notice.title }),
3488
- !notice.compact && notice.text && /* @__PURE__ */ jsx32("div", { className: "ui-toast__text", children: notice.text })
3526
+ /* @__PURE__ */ jsx33("span", { className: "ui-toast__icon", children: /* @__PURE__ */ jsx33(Icon, { name: glyphs[tone] }) }),
3527
+ /* @__PURE__ */ jsxs28("div", { className: "ui-toast__body", children: [
3528
+ /* @__PURE__ */ jsx33("div", { className: "ui-toast__title", children: notice.title }),
3529
+ !notice.compact && notice.text && /* @__PURE__ */ jsx33("div", { className: "ui-toast__text", children: notice.text })
3489
3530
  ] }),
3490
- notice.action && /* @__PURE__ */ jsx32(
3531
+ notice.action && /* @__PURE__ */ jsx33(
3491
3532
  "button",
3492
3533
  {
3493
3534
  type: "button",
@@ -3502,8 +3543,8 @@ function Notice({ notice, remove }) {
3502
3543
  children: notice.action.label
3503
3544
  }
3504
3545
  ),
3505
- notice.dismissible !== false && /* @__PURE__ */ jsx32("button", { type: "button", className: "ui-toast__close", "aria-label": "Dismiss", disabled: leaving2, onClick: dismiss, children: /* @__PURE__ */ jsx32(Icon, { name: "x" }) }),
3506
- timed && /* @__PURE__ */ jsx32(
3546
+ notice.dismissible !== false && /* @__PURE__ */ jsx33("button", { type: "button", className: "ui-toast__close", "aria-label": "Dismiss", disabled: leaving2, onClick: dismiss, children: /* @__PURE__ */ jsx33(Icon, { name: "x" }) }),
3547
+ timed && /* @__PURE__ */ jsx33(
3507
3548
  "span",
3508
3549
  {
3509
3550
  className: "ui-toast__timer is-running",
@@ -3536,40 +3577,40 @@ function usePublishedReach(stack2, count) {
3536
3577
  }, [stack2, count]);
3537
3578
  }
3538
3579
  function Toast({ children }) {
3539
- const [entries, setEntries] = useState12([]);
3580
+ const [entries, setEntries] = useState13([]);
3540
3581
  const nextId = useRef18(0);
3541
3582
  const stack2 = useRef18(null);
3542
- const push = useCallback5((notice) => {
3583
+ const push = useCallback6((notice) => {
3543
3584
  const id = nextId.current++;
3544
3585
  const remove = () => setEntries((current) => current.filter((entry) => entry.id !== id));
3545
3586
  setEntries((current) => [...current, { id, notice, remove }]);
3546
3587
  }, []);
3547
3588
  usePublishedReach(stack2, entries.length);
3548
- return /* @__PURE__ */ jsxs27(Context.Provider, { value: push, children: [
3589
+ return /* @__PURE__ */ jsxs28(Context.Provider, { value: push, children: [
3549
3590
  children,
3550
3591
  typeof document !== "undefined" && createPortal4(
3551
- /* @__PURE__ */ jsx32("div", { className: "ui-toast-stack rx-toast-stack", ref: stack2, children: entries.map((entry) => /* @__PURE__ */ jsx32(Notice, { notice: entry.notice, remove: entry.remove }, entry.id)) }),
3592
+ /* @__PURE__ */ jsx33("div", { className: "ui-toast-stack rx-toast-stack", ref: stack2, children: entries.map((entry) => /* @__PURE__ */ jsx33(Notice, { notice: entry.notice, remove: entry.remove }, entry.id)) }),
3552
3593
  document.body
3553
3594
  )
3554
3595
  ] });
3555
3596
  }
3556
3597
 
3557
3598
  // src/AppShell.tsx
3558
- import { useEffect as useEffect14, useId as useId12, useRef as useRef19, useState as useState14 } from "react";
3599
+ import { useEffect as useEffect14, useId as useId12, useRef as useRef19, useState as useState15 } from "react";
3559
3600
  import { paletteHotkey, prism, railCollapsed } from "@apliteni/apliteni-ui";
3560
3601
 
3561
3602
  // src/SidebarNav.tsx
3562
- import { forwardRef as forwardRef8, useEffect as useEffect13, useId as useId11, useState as useState13 } from "react";
3603
+ import { forwardRef as forwardRef8, useEffect as useEffect13, useId as useId11, useState as useState14 } from "react";
3563
3604
  import { ENTRANCE_FALLBACK_MS } from "@apliteni/apliteni-ui/motion";
3564
- import { Fragment as Fragment11, jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
3605
+ import { Fragment as Fragment11, jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
3565
3606
  var badgeText = (badge) => typeof badge === "object" ? badge.text : badge;
3566
3607
  function Row({ item, active, activeIs, collapsed, renderLink, sub }) {
3567
3608
  const uid = useId11();
3568
3609
  const group = !sub && !!item.items?.length;
3569
3610
  const childActive = group && item.items.some((child) => child.id === active);
3570
- const [expanded, setExpanded] = useState13();
3611
+ const [expanded, setExpanded] = useState14();
3571
3612
  const open = expanded ?? item.defaultOpen ?? childActive;
3572
- const [entering, setEntering] = useState13(false);
3613
+ const [entering, setEntering] = useState14(false);
3573
3614
  useEffect13(() => {
3574
3615
  if (!entering) return;
3575
3616
  const timer = setTimeout(() => setEntering(false), ENTRANCE_FALLBACK_MS);
@@ -3587,15 +3628,15 @@ function Row({ item, active, activeIs, collapsed, renderLink, sub }) {
3587
3628
  item.disabled && "is-disabled",
3588
3629
  item.danger && "is-danger"
3589
3630
  ].filter(Boolean).join(" ");
3590
- const children = /* @__PURE__ */ jsxs28(Fragment11, { children: [
3591
- (item.leading ?? item.icon) && /* @__PURE__ */ jsx33("span", { className: "ui-nav__ic", children: item.leading ?? /* @__PURE__ */ jsx33(Icon, { name: item.icon }) }),
3592
- /* @__PURE__ */ jsx33("span", { className: "ui-nav__label", children: item.label }),
3593
- count != null && count !== "" && /* @__PURE__ */ jsx33("span", { className: `ui-nav__badge is-${typeof item.badge === "object" ? item.badge.tone ?? "neutral" : "neutral"}`, children: count }),
3594
- group && /* @__PURE__ */ jsx33("span", { className: "ui-nav__caret", "aria-hidden": "true" })
3631
+ const children = /* @__PURE__ */ jsxs29(Fragment11, { children: [
3632
+ (item.leading ?? item.icon) && /* @__PURE__ */ jsx34("span", { className: "ui-nav__ic", children: item.leading ?? /* @__PURE__ */ jsx34(Icon, { name: item.icon }) }),
3633
+ /* @__PURE__ */ jsx34("span", { className: "ui-nav__label", children: item.label }),
3634
+ count != null && count !== "" && /* @__PURE__ */ jsx34("span", { className: `ui-nav__badge is-${typeof item.badge === "object" ? item.badge.tone ?? "neutral" : "neutral"}`, children: count }),
3635
+ group && /* @__PURE__ */ jsx34("span", { className: "ui-nav__caret", "aria-hidden": "true" })
3595
3636
  ] });
3596
3637
  const common = { className, "aria-label": name, title: collapsed ? name : void 0, children };
3597
- if (group) return /* @__PURE__ */ jsxs28("li", { className: `ui-nav__group${open ? " is-open" : ""}`, children: [
3598
- /* @__PURE__ */ jsx33(
3638
+ if (group) return /* @__PURE__ */ jsxs29("li", { className: `ui-nav__group${open ? " is-open" : ""}`, children: [
3639
+ /* @__PURE__ */ jsx34(
3599
3640
  "button",
3600
3641
  {
3601
3642
  ...common,
@@ -3609,22 +3650,22 @@ function Row({ item, active, activeIs, collapsed, renderLink, sub }) {
3609
3650
  }
3610
3651
  }
3611
3652
  ),
3612
- /* @__PURE__ */ jsx33("ul", { id: uid, className: `ui-nav__sub${entering ? " is-entering" : ""}`, hidden: !open, onAnimationEnd: () => setEntering(false), children: item.items.map((child) => /* @__PURE__ */ jsx33(Row, { item: child, active, activeIs, collapsed, renderLink, sub: true }, child.id)) })
3653
+ /* @__PURE__ */ jsx34("ul", { id: uid, className: `ui-nav__sub${entering ? " is-entering" : ""}`, hidden: !open, onAnimationEnd: () => setEntering(false), children: item.items.map((child) => /* @__PURE__ */ jsx34(Row, { item: child, active, activeIs, collapsed, renderLink, sub: true }, child.id)) })
3613
3654
  ] });
3614
- if (item.disabled) return /* @__PURE__ */ jsx33("li", { children: /* @__PURE__ */ jsx33("span", { ...common, role: "link", "aria-disabled": "true" }) });
3655
+ if (item.disabled) return /* @__PURE__ */ jsx34("li", { children: /* @__PURE__ */ jsx34("span", { ...common, role: "link", "aria-disabled": "true" }) });
3615
3656
  const props = {
3616
3657
  ...common,
3617
3658
  href: item.href ?? `#${item.id}`,
3618
3659
  target: item.target,
3619
3660
  "aria-current": isActive ? activeIs === "section" ? "true" : "page" : void 0
3620
3661
  };
3621
- return /* @__PURE__ */ jsx33("li", { children: renderLink ? renderLink(item, props) : /* @__PURE__ */ jsx33("a", { ...props }) });
3662
+ return /* @__PURE__ */ jsx34("li", { children: renderLink ? renderLink(item, props) : /* @__PURE__ */ jsx34("a", { ...props }) });
3622
3663
  }
3623
3664
  function Section({ section, ...props }) {
3624
3665
  const uid = useId11();
3625
- return /* @__PURE__ */ jsxs28("div", { className: "ui-nav__section", children: [
3626
- section.label && /* @__PURE__ */ jsx33("div", { className: "ui-nav__cap", id: uid, "aria-hidden": props.collapsed || void 0, children: section.label }),
3627
- /* @__PURE__ */ jsx33("ul", { className: "ui-nav__list", "aria-labelledby": section.label ? uid : void 0, children: section.items.map((item) => /* @__PURE__ */ jsx33(Row, { item, ...props }, item.id)) })
3666
+ return /* @__PURE__ */ jsxs29("div", { className: "ui-nav__section", children: [
3667
+ section.label && /* @__PURE__ */ jsx34("div", { className: "ui-nav__cap", id: uid, "aria-hidden": props.collapsed || void 0, children: section.label }),
3668
+ /* @__PURE__ */ jsx34("ul", { className: "ui-nav__list", "aria-labelledby": section.label ? uid : void 0, children: section.items.map((item) => /* @__PURE__ */ jsx34(Row, { item, ...props }, item.id)) })
3628
3669
  ] });
3629
3670
  }
3630
3671
  var SidebarNav = forwardRef8(function SidebarNav2({
@@ -3639,8 +3680,8 @@ var SidebarNav = forwardRef8(function SidebarNav2({
3639
3680
  "aria-label": label = "Sidebar",
3640
3681
  ...rest
3641
3682
  }, ref) {
3642
- return /* @__PURE__ */ jsxs28("nav", { ...rest, ref, "aria-label": label, className: ["ui-nav", "ui-nav--side", collapsed && "is-collapsed", className].filter(Boolean).join(" "), children: [
3643
- (sections?.length ? sections : [{ items }]).map((section, index) => /* @__PURE__ */ jsx33(
3683
+ return /* @__PURE__ */ jsxs29("nav", { ...rest, ref, "aria-label": label, className: ["ui-nav", "ui-nav--side", collapsed && "is-collapsed", className].filter(Boolean).join(" "), children: [
3684
+ (sections?.length ? sections : [{ items }]).map((section, index) => /* @__PURE__ */ jsx34(
3644
3685
  Section,
3645
3686
  {
3646
3687
  section,
@@ -3651,14 +3692,14 @@ var SidebarNav = forwardRef8(function SidebarNav2({
3651
3692
  },
3652
3693
  index
3653
3694
  )),
3654
- footer && /* @__PURE__ */ jsx33("div", { className: "ui-nav__foot", children: footer })
3695
+ footer && /* @__PURE__ */ jsx34("div", { className: "ui-nav__foot", children: footer })
3655
3696
  ] });
3656
3697
  });
3657
3698
 
3658
3699
  // src/ThemeToggle.tsx
3659
3700
  import { useSyncExternalStore } from "react";
3660
3701
  import { themeIcon } from "@apliteni/apliteni-ui";
3661
- import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
3702
+ import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
3662
3703
  var STORAGE_KEY = "apliteni-strategy-theme";
3663
3704
  var CHOICE_EVENT = "apliteni-theme-choice";
3664
3705
  var THEME_INIT_SCRIPT = `(()=>{let t;try{t=localStorage.getItem('apliteni-strategy-theme')}catch{}document.documentElement.setAttribute('data-theme',t==='dark'||t==='light'?t:window.matchMedia?.('(prefers-color-scheme: light)').matches?'light':'dark')})()`;
@@ -3716,10 +3757,10 @@ function ThemeToggle({ labelled = false }) {
3716
3757
  }
3717
3758
  window.dispatchEvent(new Event(CHOICE_EVENT));
3718
3759
  };
3719
- const button = /* @__PURE__ */ jsx34("button", { type: "button", className: "toggle", "aria-label": name, title: name, onClick: toggle, children: /* @__PURE__ */ jsx34("span", { className: "ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: themeIcon(theme) } }) });
3720
- return labelled ? /* @__PURE__ */ jsxs29("span", { className: "ui-theme-toggle", children: [
3760
+ const button = /* @__PURE__ */ jsx35("button", { type: "button", className: "toggle", "aria-label": name, title: name, onClick: toggle, children: /* @__PURE__ */ jsx35("span", { className: "ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: themeIcon(theme) } }) });
3761
+ return labelled ? /* @__PURE__ */ jsxs30("span", { className: "ui-theme-toggle", children: [
3721
3762
  button,
3722
- /* @__PURE__ */ jsxs29("span", { children: [
3763
+ /* @__PURE__ */ jsxs30("span", { children: [
3723
3764
  label,
3724
3765
  " theme"
3725
3766
  ] })
@@ -3727,7 +3768,7 @@ function ThemeToggle({ labelled = false }) {
3727
3768
  }
3728
3769
 
3729
3770
  // src/AppShell.tsx
3730
- import { Fragment as Fragment12, jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
3771
+ import { Fragment as Fragment12, jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
3731
3772
  var path = (value) => value.split(/[?#]/)[0].replace(/\/+$/, "") || "/";
3732
3773
  function AppShell({
3733
3774
  sections,
@@ -3751,9 +3792,9 @@ function AppShell({
3751
3792
  renderLink
3752
3793
  }) {
3753
3794
  const uid = useId12();
3754
- const [collapsed, setCollapsed] = useState14(defaultCollapsed);
3755
- const [search, setSearch] = useState14(false);
3756
- const [menu, setMenu] = useState14(false);
3795
+ const [collapsed, setCollapsed] = useState15(defaultCollapsed);
3796
+ const [search, setSearch] = useState15(false);
3797
+ const [menu, setMenu] = useState15(false);
3757
3798
  const menuButton = useRef19(null);
3758
3799
  const current = path(pathname);
3759
3800
  const active = sections.filter((section) => current === path(section.href) || path(section.href) !== "/" && current.startsWith(`${path(section.href)}/`)).sort((a, b) => path(b.href).length - path(a.href).length)[0];
@@ -3792,7 +3833,7 @@ function AppShell({
3792
3833
  } catch {
3793
3834
  }
3794
3835
  };
3795
- const sidebar = (label) => /* @__PURE__ */ jsx35(
3836
+ const sidebar = (label) => /* @__PURE__ */ jsx36(
3796
3837
  SidebarNav,
3797
3838
  {
3798
3839
  "aria-label": label,
@@ -3804,34 +3845,33 @@ function AppShell({
3804
3845
  const linkProps = { ...props, onClick: (event) => {
3805
3846
  if (!event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey) setMenu(false);
3806
3847
  } };
3807
- return renderLink ? renderLink(section, linkProps) : /* @__PURE__ */ jsx35("a", { ...linkProps });
3848
+ return renderLink ? renderLink(section, linkProps) : /* @__PURE__ */ jsx36("a", { ...linkProps });
3808
3849
  }
3809
3850
  }
3810
3851
  );
3811
3852
  const foldLabel = collapsed ? "Expand sidebar" : "Collapse sidebar";
3812
3853
  const navigable = sections.length > 1 || Boolean(back);
3813
- const initials = account.name.trim().split(/\s+/).map((part) => part[0]).slice(0, 2).join("");
3814
- const lockup = /* @__PURE__ */ jsxs30("a", { className: "ui-app__brand", href: brandHref, "aria-label": word, children: [
3815
- brand ?? /* @__PURE__ */ jsx35("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(uid, 24) } }),
3816
- /* @__PURE__ */ jsx35("span", { children: word })
3854
+ const lockup = /* @__PURE__ */ jsxs31("a", { className: "ui-app__brand", href: brandHref, "aria-label": word, children: [
3855
+ brand ?? /* @__PURE__ */ jsx36("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(uid, 24) } }),
3856
+ /* @__PURE__ */ jsx36("span", { children: word })
3817
3857
  ] });
3818
- return /* @__PURE__ */ jsxs30("div", { className: `ui-app ui-app--topbar ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
3819
- navigable && /* @__PURE__ */ jsxs30("div", { className: "ui-app__rail", role: "region", "aria-label": "Sidebar", children: [
3820
- /* @__PURE__ */ jsx35("div", { className: "ui-app__head", children: lockup }),
3858
+ return /* @__PURE__ */ jsxs31("div", { className: `ui-app ui-app--topbar ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
3859
+ navigable && /* @__PURE__ */ jsxs31("div", { className: "ui-app__rail", role: "region", "aria-label": "Sidebar", children: [
3860
+ /* @__PURE__ */ jsx36("div", { className: "ui-app__head", children: lockup }),
3821
3861
  sidebar("Sections"),
3822
- /* @__PURE__ */ jsx35("div", { className: "ui-app__foot", children: /* @__PURE__ */ jsx35("div", { className: "ui-app__fold-row", children: /* @__PURE__ */ jsxs30("button", { type: "button", className: "ui-nav__item ui-app__fold", "aria-expanded": !collapsed, "aria-label": foldLabel, onClick: fold, children: [
3823
- /* @__PURE__ */ jsx35("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsxs30("svg", { className: "ui-icon", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
3824
- /* @__PURE__ */ jsx35("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
3825
- /* @__PURE__ */ jsx35("path", { className: "ui-app__fold-seam", d: "M9 3v18" }),
3826
- /* @__PURE__ */ jsx35("path", { className: "ui-app__fold-arrow", d: "m16 15-3-3 3-3" })
3862
+ /* @__PURE__ */ jsx36("div", { className: "ui-app__foot", children: /* @__PURE__ */ jsx36("div", { className: "ui-app__fold-row", children: /* @__PURE__ */ jsxs31("button", { type: "button", className: "ui-nav__item ui-app__fold", "aria-expanded": !collapsed, "aria-label": foldLabel, onClick: fold, children: [
3863
+ /* @__PURE__ */ jsx36("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsxs31("svg", { className: "ui-icon", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
3864
+ /* @__PURE__ */ jsx36("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
3865
+ /* @__PURE__ */ jsx36("path", { className: "ui-app__fold-seam", d: "M9 3v18" }),
3866
+ /* @__PURE__ */ jsx36("path", { className: "ui-app__fold-arrow", d: "m16 15-3-3 3-3" })
3827
3867
  ] }) }),
3828
- /* @__PURE__ */ jsx35("span", { className: "ui-nav__label", children: foldLabel })
3868
+ /* @__PURE__ */ jsx36("span", { className: "ui-nav__label", children: foldLabel })
3829
3869
  ] }) }) })
3830
3870
  ] }),
3831
- /* @__PURE__ */ jsxs30("div", { className: "ui-app__well", children: [
3832
- /* @__PURE__ */ jsxs30("header", { className: "ui-app__bar", children: [
3833
- navigable && /* @__PURE__ */ jsxs30(Fragment12, { children: [
3834
- /* @__PURE__ */ jsx35(
3871
+ /* @__PURE__ */ jsxs31("div", { className: "ui-app__well", children: [
3872
+ /* @__PURE__ */ jsxs31("header", { className: "ui-app__bar", children: [
3873
+ navigable && /* @__PURE__ */ jsxs31(Fragment12, { children: [
3874
+ /* @__PURE__ */ jsx36(
3835
3875
  Button,
3836
3876
  {
3837
3877
  ref: menuButton,
@@ -3845,19 +3885,19 @@ function AppShell({
3845
3885
  onClick: () => setMenu(true)
3846
3886
  }
3847
3887
  ),
3848
- /* @__PURE__ */ jsx35("a", { className: "ui-app__brand ui-app__brand--band", href: brandHref, "aria-label": word, children: brand ?? /* @__PURE__ */ jsx35("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(`${uid}-band`, 24) } }) })
3888
+ /* @__PURE__ */ jsx36("a", { className: "ui-app__brand ui-app__brand--band", href: brandHref, "aria-label": word, children: brand ?? /* @__PURE__ */ jsx36("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(`${uid}-band`, 24) } }) })
3849
3889
  ] }),
3850
3890
  !navigable && lockup,
3851
- /* @__PURE__ */ jsxs30("button", { type: "button", className: "ui-app__search", "aria-haspopup": "dialog", onClick: () => setSearch(true), children: [
3852
- /* @__PURE__ */ jsx35("span", { className: "ui-app__search-ic", children: /* @__PURE__ */ jsx35(Icon, { name: "search" }) }),
3853
- /* @__PURE__ */ jsx35("span", { className: "ui-app__search-txt", children: searchLabel }),
3854
- /* @__PURE__ */ jsx35("span", { className: "ui-app__search-short", "aria-hidden": "true", children: searchShortLabel }),
3855
- /* @__PURE__ */ jsx35("kbd", { className: "ui-cmdk__key", children: paletteHotkey() })
3891
+ /* @__PURE__ */ jsxs31("button", { type: "button", className: "ui-app__search", "aria-haspopup": "dialog", onClick: () => setSearch(true), children: [
3892
+ /* @__PURE__ */ jsx36("span", { className: "ui-app__search-ic", children: /* @__PURE__ */ jsx36(Icon, { name: "search" }) }),
3893
+ /* @__PURE__ */ jsx36("span", { className: "ui-app__search-txt", children: searchLabel }),
3894
+ /* @__PURE__ */ jsx36("span", { className: "ui-app__search-short", "aria-hidden": "true", children: searchShortLabel }),
3895
+ /* @__PURE__ */ jsx36("kbd", { className: "ui-cmdk__key", children: paletteHotkey() })
3856
3896
  ] }),
3857
- /* @__PURE__ */ jsx35("span", { className: "ui-app__bar-gap" }),
3858
- bandControl && /* @__PURE__ */ jsx35("span", { className: "ui-react-app__band-control", children: bandControl }),
3859
- /* @__PURE__ */ jsx35(ThemeToggle, {}),
3860
- /* @__PURE__ */ jsx35("div", { className: "ui-app__user ui-app__user--bar", children: /* @__PURE__ */ jsx35(
3897
+ /* @__PURE__ */ jsx36("span", { className: "ui-app__bar-gap" }),
3898
+ bandControl && /* @__PURE__ */ jsx36("span", { className: "ui-react-app__band-control", children: bandControl }),
3899
+ /* @__PURE__ */ jsx36(ThemeToggle, {}),
3900
+ /* @__PURE__ */ jsx36("div", { className: "ui-app__user ui-app__user--bar", children: /* @__PURE__ */ jsx36(
3861
3901
  Dropdown,
3862
3902
  {
3863
3903
  variant: "menu",
@@ -3866,57 +3906,57 @@ function AppShell({
3866
3906
  ariaLabel: `Signed in as ${account.name}, ${account.email}`,
3867
3907
  triggerClass: "ui-app__user-trigger",
3868
3908
  panelClass: "ui-app__user-panel",
3869
- triggerContent: /* @__PURE__ */ jsx35("span", { className: "ui-app__av", "aria-hidden": "true", children: initials }),
3870
- header: /* @__PURE__ */ jsxs30("div", { className: "ui-dropdown__head", children: [
3871
- /* @__PURE__ */ jsx35("b", { children: account.name }),
3872
- /* @__PURE__ */ jsx35("span", { children: account.email })
3909
+ triggerContent: /* @__PURE__ */ jsx36("span", { className: "ui-app__av", "aria-hidden": "true", children: /* @__PURE__ */ jsx36(Avatar, { personKey: account.email || account.name, name: account.name, size: 32 }) }),
3910
+ header: /* @__PURE__ */ jsxs31("div", { className: "ui-dropdown__head", children: [
3911
+ /* @__PURE__ */ jsx36("b", { children: account.name }),
3912
+ /* @__PURE__ */ jsx36("span", { children: account.email })
3873
3913
  ] }),
3874
3914
  items: [{ label: "Sign out", icon: "logout", danger: true }],
3875
3915
  onSelect: onSignOut
3876
3916
  }
3877
3917
  ) })
3878
3918
  ] }),
3879
- /* @__PURE__ */ jsxs30("main", { className: `ui-app__main${width === "wide" ? " ui-app__main--wide" : ""}`, children: [
3880
- back && /* @__PURE__ */ jsx35(BackLink, { ...back }),
3881
- /* @__PURE__ */ jsx35("h1", { children: title }),
3882
- lede && /* @__PURE__ */ jsx35("p", { className: "ui-app__sub", children: lede }),
3883
- actions && /* @__PURE__ */ jsx35("div", { className: "ui-react-app__actions", children: actions }),
3884
- /* @__PURE__ */ jsx35("div", { className: "ui-app__body", children })
3919
+ /* @__PURE__ */ jsxs31("main", { className: `ui-app__main${width === "wide" ? " ui-app__main--wide" : ""}`, children: [
3920
+ back && /* @__PURE__ */ jsx36(BackLink, { ...back }),
3921
+ /* @__PURE__ */ jsx36("h1", { children: title }),
3922
+ lede && /* @__PURE__ */ jsx36("p", { className: "ui-app__sub", children: lede }),
3923
+ actions && /* @__PURE__ */ jsx36("div", { className: "ui-react-app__actions", children: actions }),
3924
+ /* @__PURE__ */ jsx36("div", { className: "ui-app__body", children })
3885
3925
  ] })
3886
3926
  ] }),
3887
- navigable && /* @__PURE__ */ jsx35(Drawer, { open: menu, onClose: () => setMenu(false), title: word, side: "left", size: "sm", children: /* @__PURE__ */ jsx35("div", { className: "ui-react-app__menu", children: sidebar("Menu sections") }) }),
3888
- /* @__PURE__ */ jsx35(CommandPalette, { ...palette ?? { groups: [{ items: sections.map((section) => ({ id: section.href, ...section })) }] }, open: search, onClose: () => setSearch(false) })
3927
+ navigable && /* @__PURE__ */ jsx36(Drawer, { open: menu, onClose: () => setMenu(false), title: word, side: "left", size: "sm", children: /* @__PURE__ */ jsx36("div", { className: "ui-react-app__menu", children: sidebar("Menu sections") }) }),
3928
+ /* @__PURE__ */ jsx36(CommandPalette, { ...palette ?? { groups: [{ items: sections.map((section) => ({ id: section.href, ...section })) }] }, open: search, onClose: () => setSearch(false) })
3889
3929
  ] });
3890
3930
  }
3891
3931
 
3892
3932
  // src/EmptyState.tsx
3893
3933
  import { icon as kitIcon2, illo } from "@apliteni/apliteni-ui";
3894
- import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
3934
+ import { jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
3895
3935
  var cases = {
3896
3936
  "first-run": { title: "Nothing needs you yet", sub: "New items will appear here when they need your attention.", icon: "check" },
3897
3937
  "no-matches": { title: "No results in this view", sub: "Try another search or clear your filters.", icon: "search" },
3898
3938
  "not-found": { title: "We can't find that page", sub: "Check the address or return to the home page.", icon: "folder" },
3899
3939
  "not-yet-built": { title: "This ships later", sub: "This screen is not available yet. Check back later.", icon: "clock" }
3900
3940
  };
3901
- function EmptyState({ variant = "first-run", title, sub, icon: icon7, art, actions }) {
3941
+ function EmptyState({ variant = "first-run", title, sub, icon: icon8, art, actions }) {
3902
3942
  const preset = cases[variant];
3903
3943
  const heading = title ?? preset.title;
3904
3944
  const guidance = sub ?? preset.sub;
3905
- const glyph = icon7 ?? preset.icon;
3906
- return /* @__PURE__ */ jsxs31("div", { className: "ui-empty", children: [
3907
- art ? typeof art === "string" ? /* @__PURE__ */ jsx36("div", { className: "ui-empty__art", dangerouslySetInnerHTML: { __html: /<svg/.test(art) ? art : illo(art) } }) : /* @__PURE__ */ jsx36("div", { className: "ui-empty__art", "aria-hidden": "true", children: art }) : glyph ? /* @__PURE__ */ jsx36("div", { className: "ui-empty__icon", dangerouslySetInnerHTML: { __html: kitIcon2(glyph) } }) : null,
3908
- heading && /* @__PURE__ */ jsx36("div", { className: "ui-empty__title", children: heading }),
3909
- guidance && /* @__PURE__ */ jsx36("div", { className: "ui-empty__sub", children: guidance }),
3910
- actions && /* @__PURE__ */ jsx36("div", { className: "ui-empty__actions", children: actions })
3945
+ const glyph = icon8 ?? preset.icon;
3946
+ return /* @__PURE__ */ jsxs32("div", { className: "ui-empty", children: [
3947
+ art ? typeof art === "string" ? /* @__PURE__ */ jsx37("div", { className: "ui-empty__art", dangerouslySetInnerHTML: { __html: /<svg/.test(art) ? art : illo(art) } }) : /* @__PURE__ */ jsx37("div", { className: "ui-empty__art", "aria-hidden": "true", children: art }) : glyph ? /* @__PURE__ */ jsx37("div", { className: "ui-empty__icon", dangerouslySetInnerHTML: { __html: kitIcon2(glyph) } }) : null,
3948
+ heading && /* @__PURE__ */ jsx37("div", { className: "ui-empty__title", children: heading }),
3949
+ guidance && /* @__PURE__ */ jsx37("div", { className: "ui-empty__sub", children: guidance }),
3950
+ actions && /* @__PURE__ */ jsx37("div", { className: "ui-empty__actions", children: actions })
3911
3951
  ] });
3912
3952
  }
3913
3953
 
3914
3954
  // src/Success.tsx
3915
- import { forwardRef as forwardRef9, useEffect as useEffect15, useRef as useRef20, useState as useState15 } from "react";
3916
- import { jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
3955
+ import { forwardRef as forwardRef9, useEffect as useEffect15, useRef as useRef20, useState as useState16 } from "react";
3956
+ import { jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
3917
3957
  var SuccessCheck = forwardRef9(function SuccessCheck2({ variant = "line", className, ...rest }, ref) {
3918
3958
  const circled = variant === "circled";
3919
- return /* @__PURE__ */ jsxs32(
3959
+ return /* @__PURE__ */ jsxs33(
3920
3960
  "svg",
3921
3961
  {
3922
3962
  ...rest,
@@ -3928,18 +3968,18 @@ var SuccessCheck = forwardRef9(function SuccessCheck2({ variant = "line", classN
3928
3968
  "aria-hidden": "true",
3929
3969
  focusable: "false",
3930
3970
  children: [
3931
- circled && /* @__PURE__ */ jsx37("path", { className: "ui-sx__circle", d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
3932
- /* @__PURE__ */ jsx37("path", { className: "ui-sx__tick", d: circled ? "M22 4L12 14.01l-3-3" : "M20 6L9 17l-5-5" })
3971
+ circled && /* @__PURE__ */ jsx38("path", { className: "ui-sx__circle", d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
3972
+ /* @__PURE__ */ jsx38("path", { className: "ui-sx__tick", d: circled ? "M22 4L12 14.01l-3-3" : "M20 6L9 17l-5-5" })
3933
3973
  ]
3934
3974
  }
3935
3975
  );
3936
3976
  });
3937
3977
  var SuccessPanel = forwardRef9(function SuccessPanel2({ title = "Done", sub, check = "line", className, ...rest }, ref) {
3938
3978
  const circled = check === "circled";
3939
- return /* @__PURE__ */ jsxs32("div", { ...rest, ref, className: ["ui-success", className].filter(Boolean).join(" "), children: [
3940
- /* @__PURE__ */ jsx37("div", { className: ["ui-success__check", circled && "ui-success__check--circled"].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx37(SuccessCheck, { variant: circled ? "circled" : "line" }) }),
3941
- /* @__PURE__ */ jsx37("div", { className: "ui-success__title", children: title }),
3942
- sub && /* @__PURE__ */ jsx37("div", { className: "ui-success__sub", children: sub })
3979
+ return /* @__PURE__ */ jsxs33("div", { ...rest, ref, className: ["ui-success", className].filter(Boolean).join(" "), children: [
3980
+ /* @__PURE__ */ jsx38("div", { className: ["ui-success__check", circled && "ui-success__check--circled"].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx38(SuccessCheck, { variant: circled ? "circled" : "line" }) }),
3981
+ /* @__PURE__ */ jsx38("div", { className: "ui-success__title", children: title }),
3982
+ sub && /* @__PURE__ */ jsx38("div", { className: "ui-success__sub", children: sub })
3943
3983
  ] });
3944
3984
  });
3945
3985
  var pieces = [
@@ -3959,7 +3999,7 @@ var pieces = [
3959
3999
  [80, 0.36, -20, "c", 1.05]
3960
4000
  ];
3961
4001
  function Countdown({ seconds, label = "Redirecting", onDone }) {
3962
- const [remaining, setRemaining] = useState15(seconds);
4002
+ const [remaining, setRemaining] = useState16(seconds);
3963
4003
  const callback = useRef20(onDone);
3964
4004
  useEffect15(() => {
3965
4005
  callback.current = onDone;
@@ -3976,12 +4016,12 @@ function Countdown({ seconds, label = "Redirecting", onDone }) {
3976
4016
  }, 1e3);
3977
4017
  return () => clearInterval(timer);
3978
4018
  }, [seconds]);
3979
- return /* @__PURE__ */ jsxs32("div", { className: "ui-sx__count", "data-sx-count": "", style: { "--sx-secs": `${seconds}s` }, children: [
3980
- /* @__PURE__ */ jsx37("span", { className: "ui-sx__count-ring", "aria-hidden": "true" }),
3981
- /* @__PURE__ */ jsxs32("span", { className: "ui-sx__count-text", children: [
4019
+ return /* @__PURE__ */ jsxs33("div", { className: "ui-sx__count", "data-sx-count": "", style: { "--sx-secs": `${seconds}s` }, children: [
4020
+ /* @__PURE__ */ jsx38("span", { className: "ui-sx__count-ring", "aria-hidden": "true" }),
4021
+ /* @__PURE__ */ jsxs33("span", { className: "ui-sx__count-text", children: [
3982
4022
  label,
3983
4023
  " in ",
3984
- /* @__PURE__ */ jsx37("b", { "data-sx-num": "", children: remaining }),
4024
+ /* @__PURE__ */ jsx38("b", { "data-sx-num": "", children: remaining }),
3985
4025
  "s"
3986
4026
  ] })
3987
4027
  ] });
@@ -4008,7 +4048,7 @@ var Success = forwardRef9(function Success2({
4008
4048
  const seconds = countdown?.seconds;
4009
4049
  const duration = seconds != null && Number.isFinite(seconds) && seconds >= 1 ? Math.floor(seconds) : 5;
4010
4050
  const mark = check === "circled" ? "circled" : "line";
4011
- return /* @__PURE__ */ jsxs32(
4051
+ return /* @__PURE__ */ jsxs33(
4012
4052
  "div",
4013
4053
  {
4014
4054
  role: "status",
@@ -4017,16 +4057,16 @@ var Success = forwardRef9(function Success2({
4017
4057
  ref,
4018
4058
  className: ["ui-sx", `ui-sx--${layout}`, `ui-sx--check-${mark}`, confetti && "ui-sx--confetti", className].filter(Boolean).join(" "),
4019
4059
  children: [
4020
- confetti && /* @__PURE__ */ jsx37("div", { className: "ui-sx__confetti", "aria-hidden": "true", children: pieces.map(
4021
- ([x, d, r, t, s], index) => /* @__PURE__ */ jsx37("i", { className: `ui-sx__piece ui-sx__piece--${t}`, style: { left: `${x}%`, "--sx-d": `${d}s`, "--sx-r": `${r}deg`, "--sx-s": s } }, index)
4060
+ confetti && /* @__PURE__ */ jsx38("div", { className: "ui-sx__confetti", "aria-hidden": "true", children: pieces.map(
4061
+ ([x, d, r, t, s], index) => /* @__PURE__ */ jsx38("i", { className: `ui-sx__piece ui-sx__piece--${t}`, style: { left: `${x}%`, "--sx-d": `${d}s`, "--sx-r": `${r}deg`, "--sx-s": s } }, index)
4022
4062
  ) }),
4023
- /* @__PURE__ */ jsxs32("div", { className: "ui-sx__inner", children: [
4024
- /* @__PURE__ */ jsx37("div", { className: "ui-sx__visual", children: /* @__PURE__ */ jsx37(SuccessCheck, { variant: mark }) }),
4025
- /* @__PURE__ */ jsxs32("div", { className: "ui-sx__content", children: [
4026
- /* @__PURE__ */ jsx37(Heading, { className: "ui-sx__title", children: title }),
4027
- body && /* @__PURE__ */ jsx37("p", { className: "ui-sx__body", children: body }),
4028
- hasActions && /* @__PURE__ */ jsx37("div", { className: "ui-sx__actions", children: actions }),
4029
- countdown && /* @__PURE__ */ jsx37(Countdown, { seconds: duration, label: countdown.label, onDone: onCountdownEnd }, duration)
4063
+ /* @__PURE__ */ jsxs33("div", { className: "ui-sx__inner", children: [
4064
+ /* @__PURE__ */ jsx38("div", { className: "ui-sx__visual", children: /* @__PURE__ */ jsx38(SuccessCheck, { variant: mark }) }),
4065
+ /* @__PURE__ */ jsxs33("div", { className: "ui-sx__content", children: [
4066
+ /* @__PURE__ */ jsx38(Heading, { className: "ui-sx__title", children: title }),
4067
+ body && /* @__PURE__ */ jsx38("p", { className: "ui-sx__body", children: body }),
4068
+ hasActions && /* @__PURE__ */ jsx38("div", { className: "ui-sx__actions", children: actions }),
4069
+ countdown && /* @__PURE__ */ jsx38(Countdown, { seconds: duration, label: countdown.label, onDone: onCountdownEnd }, duration)
4030
4070
  ] })
4031
4071
  ] })
4032
4072
  ]
@@ -4036,16 +4076,16 @@ var Success = forwardRef9(function Success2({
4036
4076
 
4037
4077
  // src/Chart.tsx
4038
4078
  import {
4039
- useCallback as useCallback6,
4079
+ useCallback as useCallback7,
4040
4080
  useEffect as useEffect16,
4041
4081
  useId as useId13,
4042
4082
  useLayoutEffect as useLayoutEffect5,
4043
4083
  useMemo as useMemo4,
4044
4084
  useRef as useRef21,
4045
- useState as useState16
4085
+ useState as useState17
4046
4086
  } from "react";
4047
4087
  import { CHART_FLOOR, bridgeWalk, chartScale, pointTarget } from "@apliteni/apliteni-ui";
4048
- import { Fragment as Fragment13, jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
4088
+ import { Fragment as Fragment13, jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
4049
4089
  var HEIGHT = { months: 216, bridge: 216, spark: 32 };
4050
4090
  var PAD = 2;
4051
4091
  var ZERO_INSET = 1.5;
@@ -4083,7 +4123,7 @@ function barPath(m) {
4083
4123
  return `M${px(x)} ${px(roundBottom ? bottom - r : bottom)}V${px(roundTop ? top + r : top)}` + (roundTop ? `${arc(r, -r, 1)}h${px(w - r * 2)}${arc(r, r, 1)}` : `h${px(w)}`) + `V${px(roundBottom ? bottom - r : bottom)}` + (roundBottom ? `${arc(-r, r, 1)}h${px(-(w - r * 2))}${arc(-r, -r, 1)}` : `h${px(-w)}`) + "z";
4084
4124
  }
4085
4125
  function useTapFloor() {
4086
- const [floor, setFloor] = useState16(TARGET);
4126
+ const [floor, setFloor] = useState17(TARGET);
4087
4127
  useEffect16(() => {
4088
4128
  const query = typeof window === "undefined" ? null : window.matchMedia?.(`(max-width: ${PHONE_MAX2}px) and (pointer: coarse)`);
4089
4129
  if (!query) return;
@@ -4218,11 +4258,11 @@ function Chart(props) {
4218
4258
  const opening = useRef21(false);
4219
4259
  const pointerFocus = useRef21(false);
4220
4260
  const floor = useTapFloor();
4221
- const [width, setWidth] = useState16(0);
4222
- const [openId, setOpenId] = useState16(null);
4223
- const [rawCursor, setCursor] = useState16(0);
4224
- const [said, setSaid] = useState16("");
4225
- const [ownPick, setOwnPick] = useState16(null);
4261
+ const [width, setWidth] = useState17(0);
4262
+ const [openId, setOpenId] = useState17(null);
4263
+ const [rawCursor, setCursor] = useState17(0);
4264
+ const [said, setSaid] = useState17("");
4265
+ const [ownPick, setOwnPick] = useState17(null);
4226
4266
  const pick = selected === void 0 ? ownPick : selected;
4227
4267
  const steps = props.variant === "bridge" ? props.steps : void 0;
4228
4268
  const bridgeTones = props.variant === "bridge" ? props.tones : void 0;
@@ -4237,7 +4277,7 @@ function Chart(props) {
4237
4277
  const boxHeight = Math.max(plotHeight, floor);
4238
4278
  const boxTop = -(boxHeight - plotHeight) / 2;
4239
4279
  const span = scale.max - scale.min || 1;
4240
- const y = useCallback6(
4280
+ const y = useCallback7(
4241
4281
  (value) => PAD + (scale.max - value) / span * (plotHeight - PAD * 2),
4242
4282
  [scale.max, span, plotHeight]
4243
4283
  );
@@ -4250,7 +4290,7 @@ function Chart(props) {
4250
4290
  cap * lanes + LANE_GAP * (lanes - 1)
4251
4291
  ));
4252
4292
  const barWidth = (groupWidth - LANE_GAP * (lanes - 1)) / lanes;
4253
- const centre = useCallback6((column) => column * colWidth + colWidth / 2, [colWidth]);
4293
+ const centre = useCallback7((column) => column * colWidth + colWidth / 2, [colWidth]);
4254
4294
  const marks = useMemo4(() => {
4255
4295
  const out = frame.bars.map((bar) => {
4256
4296
  let top = Math.min(y(bar.from), y(bar.to));
@@ -4324,7 +4364,7 @@ function Chart(props) {
4324
4364
  return [...out, ...dots];
4325
4365
  }, [frame, lines, keys, columns, centre, barWidth, groupWidth, y, floor, colWidth, plotWidth, boxTop, boxHeight]);
4326
4366
  const byId = useMemo4(() => new Map(marks.map((m) => [m.id, m])), [marks]);
4327
- const lead = useCallback6((column) => marks.find((m) => m.column === column), [marks]);
4367
+ const lead = useCallback7((column) => marks.find((m) => m.column === column), [marks]);
4328
4368
  const open = openId ? byId.get(openId) : void 0;
4329
4369
  useEffect16(() => {
4330
4370
  const el = plot.current;
@@ -4336,7 +4376,7 @@ function Chart(props) {
4336
4376
  observer.observe(el);
4337
4377
  return () => observer.disconnect();
4338
4378
  }, []);
4339
- const syncEdges = useCallback6(() => {
4379
+ const syncEdges = useCallback7(() => {
4340
4380
  const el = scroller.current;
4341
4381
  if (!el) return;
4342
4382
  const last = el.scrollWidth - el.clientWidth;
@@ -4377,7 +4417,7 @@ function Chart(props) {
4377
4417
  setOpenId(id);
4378
4418
  };
4379
4419
  const markAt = (target) => target.closest?.("[data-mark]")?.getAttribute("data-mark") ?? null;
4380
- const announce = useCallback6((column, picked = pick) => {
4420
+ const announce = useCallback7((column, picked = pick) => {
4381
4421
  const where = columns[column];
4382
4422
  if (!where) return;
4383
4423
  const values = marks.filter((m) => m.column === column).map((m) => `${m.name} ${format(m.value)}`).join(". ") || "No value";
@@ -4421,7 +4461,7 @@ function Chart(props) {
4421
4461
  const estimated = columns.filter((c) => c.estimated);
4422
4462
  const estimatedTone = marks.find((m) => m.estimated && m.kind === "bar")?.tone ?? keys[0]?.tone ?? "neutral";
4423
4463
  const hitBand = (band) => band === "up" ? { y: PAD, h: Math.max(zero - PAD, TARGET) } : band === "down" ? { y: zero, h: Math.max(plotHeight - PAD - zero, TARGET) } : { y: PAD, h: Math.max(plotHeight - PAD * 2, TARGET) };
4424
- return /* @__PURE__ */ jsxs33(
4464
+ return /* @__PURE__ */ jsxs34(
4425
4465
  "div",
4426
4466
  {
4427
4467
  className: cx8("ui-chart", `ui-chart--${variant}`, selectable && "ui-chart--pick", className),
@@ -4432,9 +4472,9 @@ function Chart(props) {
4432
4472
  "--ui-chart-pad": `${PAD}px`
4433
4473
  },
4434
4474
  children: [
4435
- !spark && keys.length > 0 && /* @__PURE__ */ jsxs33("ul", { className: "ui-chart__legend", children: [
4436
- keys.map((key) => /* @__PURE__ */ jsxs33("li", { className: cx8("ui-chart__key", `ui-chart__tone--${key.tone}`), children: [
4437
- key.shape === "line" ? /* @__PURE__ */ jsx38("svg", { className: "ui-chart__key-mark", width: "18", height: "12", viewBox: "0 0 18 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx38("path", { className: "ui-chart__key-line", d: "M1 9 L6 5 L12 7 L17 3" }) }) : /* @__PURE__ */ jsx38("svg", { className: "ui-chart__key-mark", width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx38(
4475
+ !spark && keys.length > 0 && /* @__PURE__ */ jsxs34("ul", { className: "ui-chart__legend", children: [
4476
+ keys.map((key) => /* @__PURE__ */ jsxs34("li", { className: cx8("ui-chart__key", `ui-chart__tone--${key.tone}`), children: [
4477
+ key.shape === "line" ? /* @__PURE__ */ jsx39("svg", { className: "ui-chart__key-mark", width: "18", height: "12", viewBox: "0 0 18 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx39("path", { className: "ui-chart__key-line", d: "M1 9 L6 5 L12 7 L17 3" }) }) : /* @__PURE__ */ jsx39("svg", { className: "ui-chart__key-mark", width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx39(
4438
4478
  "rect",
4439
4479
  {
4440
4480
  className: "ui-chart__key-swatch",
@@ -4447,12 +4487,12 @@ function Chart(props) {
4447
4487
  ) }),
4448
4488
  key.name
4449
4489
  ] }, key.id)),
4450
- estimated.length > 0 && /* @__PURE__ */ jsxs33("li", { className: cx8("ui-chart__key", `ui-chart__tone--${estimatedTone}`), children: [
4451
- /* @__PURE__ */ jsx38("svg", { className: "ui-chart__key-mark", width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx38("rect", { className: "ui-chart__key-estimated", x: "1.5", y: "1.5", width: "9", height: "9", rx: "1" }) }),
4490
+ estimated.length > 0 && /* @__PURE__ */ jsxs34("li", { className: cx8("ui-chart__key", `ui-chart__tone--${estimatedTone}`), children: [
4491
+ /* @__PURE__ */ jsx39("svg", { className: "ui-chart__key-mark", width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx39("rect", { className: "ui-chart__key-estimated", x: "1.5", y: "1.5", width: "9", height: "9", rx: "1" }) }),
4452
4492
  "Estimated"
4453
4493
  ] })
4454
4494
  ] }),
4455
- /* @__PURE__ */ jsxs33(
4495
+ /* @__PURE__ */ jsxs34(
4456
4496
  "div",
4457
4497
  {
4458
4498
  ref: frameEl,
@@ -4476,8 +4516,8 @@ function Chart(props) {
4476
4516
  setSaid("");
4477
4517
  },
4478
4518
  children: [
4479
- !spark && scale.ticks.length > 0 && /* @__PURE__ */ jsx38("div", { className: "ui-chart__axis", "aria-hidden": "true", children: [...scale.ticks].reverse().map((tick) => /* @__PURE__ */ jsx38("span", { className: "ui-chart__tick", children: formatAxis(tick) }, tick)) }),
4480
- /* @__PURE__ */ jsx38("div", { ref: scroller, className: "ui-chart__scroll", tabIndex: -1, onScroll: () => {
4519
+ !spark && scale.ticks.length > 0 && /* @__PURE__ */ jsx39("div", { className: "ui-chart__axis", "aria-hidden": "true", children: [...scale.ticks].reverse().map((tick) => /* @__PURE__ */ jsx39("span", { className: "ui-chart__tick", children: formatAxis(tick) }, tick)) }),
4520
+ /* @__PURE__ */ jsx39("div", { ref: scroller, className: "ui-chart__scroll", tabIndex: -1, onScroll: () => {
4481
4521
  syncEdges();
4482
4522
  const anchor = [...svgEl.current?.querySelectorAll("[data-anchor]") ?? []].find((el) => el.getAttribute("data-anchor") === openId);
4483
4523
  if (!anchor || !scroller.current || !frameEl.current || !tipEl.current) return;
@@ -4485,8 +4525,8 @@ function Chart(props) {
4485
4525
  const view = scroller.current.getBoundingClientRect();
4486
4526
  if (mark.right <= view.left || mark.left >= view.right) setOpenId(null);
4487
4527
  else placeTip(frameEl.current, anchor, tipEl.current, frameEl.current);
4488
- }, children: /* @__PURE__ */ jsxs33("div", { ref: plot, className: "ui-chart__plot", children: [
4489
- /* @__PURE__ */ jsxs33(
4528
+ }, children: /* @__PURE__ */ jsxs34("div", { ref: plot, className: "ui-chart__plot", children: [
4529
+ /* @__PURE__ */ jsxs34(
4490
4530
  "svg",
4491
4531
  {
4492
4532
  ref: svgEl,
@@ -4546,7 +4586,7 @@ function Chart(props) {
4546
4586
  announce(mark.column, selectable ? mark.column : pick);
4547
4587
  },
4548
4588
  children: [
4549
- !spark && pick !== null && pick >= 0 && pick < count && /* @__PURE__ */ jsx38(
4589
+ !spark && pick !== null && pick >= 0 && pick < count && /* @__PURE__ */ jsx39(
4550
4590
  "rect",
4551
4591
  {
4552
4592
  className: "ui-chart__band",
@@ -4559,7 +4599,7 @@ function Chart(props) {
4559
4599
  frame.links && frame.bars.slice(0, -1).map((bar, i) => {
4560
4600
  const from = byId.get(bar.id);
4561
4601
  const to = byId.get(frame.bars[i + 1].id);
4562
- return from && to ? /* @__PURE__ */ jsx38(
4602
+ return from && to ? /* @__PURE__ */ jsx39(
4563
4603
  "line",
4564
4604
  {
4565
4605
  className: "ui-chart__carry",
@@ -4571,7 +4611,7 @@ function Chart(props) {
4571
4611
  `carry-${bar.id}`
4572
4612
  ) : null;
4573
4613
  }),
4574
- !spark && scale.ticks.filter((tick) => tick !== 0).map((tick) => /* @__PURE__ */ jsx38(
4614
+ !spark && scale.ticks.filter((tick) => tick !== 0).map((tick) => /* @__PURE__ */ jsx39(
4575
4615
  "line",
4576
4616
  {
4577
4617
  className: "ui-chart__grid",
@@ -4582,7 +4622,7 @@ function Chart(props) {
4582
4622
  },
4583
4623
  `grid-${tick}`
4584
4624
  )),
4585
- !spark && scale.ticks.includes(0) && /* @__PURE__ */ jsx38(
4625
+ !spark && scale.ticks.includes(0) && /* @__PURE__ */ jsx39(
4586
4626
  "line",
4587
4627
  {
4588
4628
  className: "ui-chart__zero",
@@ -4592,7 +4632,7 @@ function Chart(props) {
4592
4632
  y2: px(y(0))
4593
4633
  }
4594
4634
  ),
4595
- marks.filter((m) => m.kind === "bar").map((mark) => /* @__PURE__ */ jsx38(
4635
+ marks.filter((m) => m.kind === "bar").map((mark) => /* @__PURE__ */ jsx39(
4596
4636
  "path",
4597
4637
  {
4598
4638
  className: cx8(
@@ -4605,7 +4645,7 @@ function Chart(props) {
4605
4645
  `bar-${mark.id}`
4606
4646
  )),
4607
4647
  ["casing", "stroke"].map((layer) => lines.flatMap(
4608
- (line) => line.values.slice(1).map((value, i) => Number.isFinite(value) && Number.isFinite(line.values[i]) ? /* @__PURE__ */ jsx38(
4648
+ (line) => line.values.slice(1).map((value, i) => Number.isFinite(value) && Number.isFinite(line.values[i]) ? /* @__PURE__ */ jsx39(
4609
4649
  "line",
4610
4650
  {
4611
4651
  className: layer === "casing" ? "ui-chart__line-casing" : cx8(
@@ -4621,7 +4661,7 @@ function Chart(props) {
4621
4661
  `${line.id}-${layer}-${i}`
4622
4662
  ) : null)
4623
4663
  )),
4624
- lines.flatMap((line) => line.values.map((value, i) => Number.isFinite(value) && !Number.isFinite(line.values[i - 1]) && !Number.isFinite(line.values[i + 1]) ? /* @__PURE__ */ jsx38(
4664
+ lines.flatMap((line) => line.values.map((value, i) => Number.isFinite(value) && !Number.isFinite(line.values[i - 1]) && !Number.isFinite(line.values[i + 1]) ? /* @__PURE__ */ jsx39(
4625
4665
  "circle",
4626
4666
  {
4627
4667
  className: cx8("ui-chart__isolated", `ui-chart__tone--${line.tone}`),
@@ -4631,8 +4671,8 @@ function Chart(props) {
4631
4671
  },
4632
4672
  `isolated-${line.id}-${i}`
4633
4673
  ) : null)),
4634
- marks.map((mark) => /* @__PURE__ */ jsxs33("g", { "data-mark": mark.id, children: [
4635
- mark.kind === "bar" ? /* @__PURE__ */ jsx38(
4674
+ marks.map((mark) => /* @__PURE__ */ jsxs34("g", { "data-mark": mark.id, children: [
4675
+ mark.kind === "bar" ? /* @__PURE__ */ jsx39(
4636
4676
  "rect",
4637
4677
  {
4638
4678
  className: "ui-chart__hit",
@@ -4641,7 +4681,7 @@ function Chart(props) {
4641
4681
  y: px(hitBand(mark.band).y),
4642
4682
  height: px(hitBand(mark.band).h)
4643
4683
  }
4644
- ) : /* @__PURE__ */ jsx38(
4684
+ ) : /* @__PURE__ */ jsx39(
4645
4685
  "rect",
4646
4686
  {
4647
4687
  className: "ui-chart__hit",
@@ -4651,7 +4691,7 @@ function Chart(props) {
4651
4691
  height: px(mark.hit?.h ?? TARGET)
4652
4692
  }
4653
4693
  ),
4654
- /* @__PURE__ */ jsx38(
4694
+ /* @__PURE__ */ jsx39(
4655
4695
  "rect",
4656
4696
  {
4657
4697
  "data-anchor": mark.id,
@@ -4666,7 +4706,7 @@ function Chart(props) {
4666
4706
  ]
4667
4707
  }
4668
4708
  ),
4669
- !spark && /* @__PURE__ */ jsx38("div", { className: "ui-chart__periods", "aria-hidden": "true", children: columns.map((column, i) => /* @__PURE__ */ jsx38(
4709
+ !spark && /* @__PURE__ */ jsx39("div", { className: "ui-chart__periods", "aria-hidden": "true", children: columns.map((column, i) => /* @__PURE__ */ jsx39(
4670
4710
  "span",
4671
4711
  {
4672
4712
  className: cx8("ui-chart__period", pick === i && "is-selected"),
@@ -4675,35 +4715,35 @@ function Chart(props) {
4675
4715
  `${column.label}-${i}`
4676
4716
  )) })
4677
4717
  ] }) }),
4678
- /* @__PURE__ */ jsx38("span", { ref: tipEl, className: cx8("ui-tip", openId && "is-open"), role: open ? "tooltip" : void 0, children: open && /* @__PURE__ */ jsxs33(Fragment13, { children: [
4679
- /* @__PURE__ */ jsx38("span", { className: "ui-tip__label", children: spark ? columns[open.column]?.label : `${open.name}, ${columns[open.column]?.label}` }),
4680
- /* @__PURE__ */ jsx38("span", { className: "ui-tip__value", children: format(open.value) }),
4681
- (stateOf(columns[open.column]) || open.detail) && /* @__PURE__ */ jsx38("span", { className: "ui-tip__detail", children: stateOf(columns[open.column]) || open.detail })
4718
+ /* @__PURE__ */ jsx39("span", { ref: tipEl, className: cx8("ui-tip", openId && "is-open"), role: open ? "tooltip" : void 0, children: open && /* @__PURE__ */ jsxs34(Fragment13, { children: [
4719
+ /* @__PURE__ */ jsx39("span", { className: "ui-tip__label", children: spark ? columns[open.column]?.label : `${open.name}, ${columns[open.column]?.label}` }),
4720
+ /* @__PURE__ */ jsx39("span", { className: "ui-tip__value", children: format(open.value) }),
4721
+ (stateOf(columns[open.column]) || open.detail) && /* @__PURE__ */ jsx39("span", { className: "ui-tip__detail", children: stateOf(columns[open.column]) || open.detail })
4682
4722
  ] }) })
4683
4723
  ]
4684
4724
  }
4685
4725
  ),
4686
- /* @__PURE__ */ jsx38("div", { className: "ui-sr", role: "status", children: said }),
4687
- showTable && /* @__PURE__ */ jsxs33("details", { className: "ui-chart__data", children: [
4688
- /* @__PURE__ */ jsx38("summary", { className: "ui-focusable", children: "Values as a table" }),
4689
- /* @__PURE__ */ jsx38(
4726
+ /* @__PURE__ */ jsx39("div", { className: "ui-sr", role: "status", children: said }),
4727
+ showTable && /* @__PURE__ */ jsxs34("details", { className: "ui-chart__data", children: [
4728
+ /* @__PURE__ */ jsx39("summary", { className: "ui-focusable", children: "Values as a table" }),
4729
+ /* @__PURE__ */ jsx39(
4690
4730
  "div",
4691
4731
  {
4692
4732
  className: "ui-table-scroll",
4693
4733
  role: "region",
4694
4734
  tabIndex: 0,
4695
4735
  "aria-label": `${title}, as a table. Scroll for more columns.`,
4696
- children: /* @__PURE__ */ jsxs33("table", { className: "ui-table", "aria-label": title, children: [
4697
- /* @__PURE__ */ jsx38("thead", { children: /* @__PURE__ */ jsx38("tr", { children: tableHead.map((head, i) => /* @__PURE__ */ jsx38("th", { scope: "col", className: cx8(i > 0 && "ui-table__num"), children: head }, head)) }) }),
4698
- /* @__PURE__ */ jsx38("tbody", { children: tableRows.map((row, i) => /* @__PURE__ */ jsxs33("tr", { "aria-current": pick === i ? true : void 0, children: [
4699
- /* @__PURE__ */ jsxs33("th", { scope: "row", children: [
4736
+ children: /* @__PURE__ */ jsxs34("table", { className: "ui-table", "aria-label": title, children: [
4737
+ /* @__PURE__ */ jsx39("thead", { children: /* @__PURE__ */ jsx39("tr", { children: tableHead.map((head, i) => /* @__PURE__ */ jsx39("th", { scope: "col", className: cx8(i > 0 && "ui-table__num"), children: head }, head)) }) }),
4738
+ /* @__PURE__ */ jsx39("tbody", { children: tableRows.map((row, i) => /* @__PURE__ */ jsxs34("tr", { "aria-current": pick === i ? true : void 0, children: [
4739
+ /* @__PURE__ */ jsxs34("th", { scope: "row", children: [
4700
4740
  row.column.label,
4701
- row.column.estimated && /* @__PURE__ */ jsxs33(Fragment13, { children: [
4741
+ row.column.estimated && /* @__PURE__ */ jsxs34(Fragment13, { children: [
4702
4742
  " ",
4703
- /* @__PURE__ */ jsx38("span", { className: "ui-chart__state", children: stateOf(row.column) })
4743
+ /* @__PURE__ */ jsx39("span", { className: "ui-chart__state", children: stateOf(row.column) })
4704
4744
  ] })
4705
4745
  ] }),
4706
- row.cells.map((cell, j) => /* @__PURE__ */ jsx38("td", { className: "ui-table__num", children: cell }, tableHead[j + 1]))
4746
+ row.cells.map((cell, j) => /* @__PURE__ */ jsx39("td", { className: "ui-table__num", children: cell }, tableHead[j + 1]))
4707
4747
  ] }, `${row.column.label}-${i}`)) })
4708
4748
  ] })
4709
4749
  }
@@ -4717,7 +4757,7 @@ function Chart(props) {
4717
4757
  // src/AccentPicker.tsx
4718
4758
  import { forwardRef as forwardRef10 } from "react";
4719
4759
  import { ACCENTS, accentSwatchStyle } from "@apliteni/apliteni-ui";
4720
- import { jsx as jsx39 } from "react/jsx-runtime";
4760
+ import { jsx as jsx40 } from "react/jsx-runtime";
4721
4761
  var AccentPicker = forwardRef10(function AccentPicker2({
4722
4762
  value,
4723
4763
  onChange,
@@ -4726,7 +4766,7 @@ var AccentPicker = forwardRef10(function AccentPicker2({
4726
4766
  "aria-label": label = "Accent",
4727
4767
  ...rest
4728
4768
  }, ref) {
4729
- return /* @__PURE__ */ jsx39(
4769
+ return /* @__PURE__ */ jsx40(
4730
4770
  "div",
4731
4771
  {
4732
4772
  ...rest,
@@ -4737,7 +4777,7 @@ var AccentPicker = forwardRef10(function AccentPicker2({
4737
4777
  "aria-label": label,
4738
4778
  children: options.map((accent) => {
4739
4779
  const title = accent.charAt(0).toUpperCase() + accent.slice(1);
4740
- return /* @__PURE__ */ jsx39(
4780
+ return /* @__PURE__ */ jsx40(
4741
4781
  "button",
4742
4782
  {
4743
4783
  type: "button",
@@ -4758,7 +4798,7 @@ var AccentPicker = forwardRef10(function AccentPicker2({
4758
4798
  // src/NavTabs.tsx
4759
4799
  import { Fragment as Fragment14, forwardRef as forwardRef11, useEffect as useEffect17, useRef as useRef22, useImperativeHandle as useImperativeHandle2 } from "react";
4760
4800
  import { safeUrl, observeNavFit, revealCurrentNav, revealFocusedNav } from "@apliteni/apliteni-ui";
4761
- import { Fragment as Fragment15, jsx as jsx40, jsxs as jsxs34 } from "react/jsx-runtime";
4801
+ import { Fragment as Fragment15, jsx as jsx41, jsxs as jsxs35 } from "react/jsx-runtime";
4762
4802
  var NavTabs = forwardRef11(function NavTabs2({
4763
4803
  items,
4764
4804
  active,
@@ -4776,7 +4816,7 @@ var NavTabs = forwardRef11(function NavTabs2({
4776
4816
  useEffect17(() => {
4777
4817
  if (navRef.current) revealCurrentNav(navRef.current);
4778
4818
  }, [active, signature]);
4779
- return /* @__PURE__ */ jsx40(
4819
+ return /* @__PURE__ */ jsx41(
4780
4820
  "nav",
4781
4821
  {
4782
4822
  ...rest,
@@ -4789,11 +4829,11 @@ var NavTabs = forwardRef11(function NavTabs2({
4789
4829
  },
4790
4830
  children: items.map((item) => {
4791
4831
  const badge = item.badge != null && typeof item.badge === "object" ? item.badge : { text: item.badge, tone: void 0 };
4792
- const inner = /* @__PURE__ */ jsxs34(Fragment15, { children: [
4793
- /* @__PURE__ */ jsx40("span", { className: "ui-nav__tab-label", children: item.label }),
4794
- badge.text != null && badge.text !== "" && /* @__PURE__ */ jsx40("span", { className: `ui-nav__badge is-${badge.tone || "neutral"}`, children: badge.text })
4832
+ const inner = /* @__PURE__ */ jsxs35(Fragment15, { children: [
4833
+ /* @__PURE__ */ jsx41("span", { className: "ui-nav__tab-label", children: item.label }),
4834
+ badge.text != null && badge.text !== "" && /* @__PURE__ */ jsx41("span", { className: `ui-nav__badge is-${badge.tone || "neutral"}`, children: badge.text })
4795
4835
  ] });
4796
- if (item.disabled) return /* @__PURE__ */ jsx40("span", { className: "ui-nav__tab is-disabled", "aria-disabled": "true", children: inner }, item.id);
4836
+ if (item.disabled) return /* @__PURE__ */ jsx41("span", { className: "ui-nav__tab is-disabled", "aria-disabled": "true", children: inner }, item.id);
4797
4837
  const current = item.id === active;
4798
4838
  const linkProps = {
4799
4839
  className: ["ui-nav__tab", current && "is-active"].filter(Boolean).join(" "),
@@ -4802,7 +4842,7 @@ var NavTabs = forwardRef11(function NavTabs2({
4802
4842
  "aria-current": current ? "page" : void 0,
4803
4843
  children: inner
4804
4844
  };
4805
- return /* @__PURE__ */ jsx40(Fragment14, { children: renderLink ? renderLink(item, linkProps) : /* @__PURE__ */ jsx40("a", { ...linkProps }) }, item.id);
4845
+ return /* @__PURE__ */ jsx41(Fragment14, { children: renderLink ? renderLink(item, linkProps) : /* @__PURE__ */ jsx41("a", { ...linkProps }) }, item.id);
4806
4846
  })
4807
4847
  }
4808
4848
  );
@@ -4810,8 +4850,8 @@ var NavTabs = forwardRef11(function NavTabs2({
4810
4850
 
4811
4851
  // src/Breadcrumbs.tsx
4812
4852
  import { forwardRef as forwardRef12 } from "react";
4813
- import { icon as icon6, safeUrl as safeUrl2 } from "@apliteni/apliteni-ui";
4814
- import { Fragment as Fragment16, jsx as jsx41, jsxs as jsxs35 } from "react/jsx-runtime";
4853
+ import { icon as icon7, safeUrl as safeUrl2 } from "@apliteni/apliteni-ui";
4854
+ import { Fragment as Fragment16, jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
4815
4855
  var Breadcrumbs = forwardRef12(function Breadcrumbs2({
4816
4856
  items,
4817
4857
  renderLink,
@@ -4819,21 +4859,21 @@ var Breadcrumbs = forwardRef12(function Breadcrumbs2({
4819
4859
  "aria-label": ariaLabel = "Breadcrumb",
4820
4860
  ...rest
4821
4861
  }, ref) {
4822
- return /* @__PURE__ */ jsx41(
4862
+ return /* @__PURE__ */ jsx42(
4823
4863
  "nav",
4824
4864
  {
4825
4865
  ...rest,
4826
4866
  ref,
4827
4867
  className: ["ui-nav", "ui-nav--crumbs", className].filter(Boolean).join(" "),
4828
4868
  "aria-label": ariaLabel,
4829
- children: /* @__PURE__ */ jsx41("ol", { className: "ui-nav__crumbs", children: items.map((item, index) => {
4869
+ children: /* @__PURE__ */ jsx42("ol", { className: "ui-nav__crumbs", children: items.map((item, index) => {
4830
4870
  const current = index === items.length - 1;
4831
- const inner = /* @__PURE__ */ jsxs35(Fragment16, { children: [
4832
- item.icon && /* @__PURE__ */ jsx41("span", { className: "ui-nav__ic", dangerouslySetInnerHTML: { __html: icon6(item.icon) } }),
4833
- /* @__PURE__ */ jsx41("span", { className: "ui-nav__crumb-label", children: item.label })
4871
+ const inner = /* @__PURE__ */ jsxs36(Fragment16, { children: [
4872
+ item.icon && /* @__PURE__ */ jsx42("span", { className: "ui-nav__ic", dangerouslySetInnerHTML: { __html: icon7(item.icon) } }),
4873
+ /* @__PURE__ */ jsx42("span", { className: "ui-nav__crumb-label", children: item.label })
4834
4874
  ] });
4835
4875
  const linkProps = !current && item.href ? { className: "ui-nav__crumb", href: safeUrl2(item.href), target: item.target, children: inner } : null;
4836
- return /* @__PURE__ */ jsx41("li", { className: "ui-nav__crumb-item", children: linkProps ? renderLink ? renderLink(item, linkProps) : /* @__PURE__ */ jsx41("a", { ...linkProps }) : /* @__PURE__ */ jsx41(
4876
+ return /* @__PURE__ */ jsx42("li", { className: "ui-nav__crumb-item", children: linkProps ? renderLink ? renderLink(item, linkProps) : /* @__PURE__ */ jsx42("a", { ...linkProps }) : /* @__PURE__ */ jsx42(
4837
4877
  "span",
4838
4878
  {
4839
4879
  className: ["ui-nav__crumb", current && "is-current"].filter(Boolean).join(" "),
@@ -4852,6 +4892,7 @@ var DEFAULT_PAGE_SIZE3 = KIT_DEFAULT_PAGE_SIZE;
4852
4892
  export {
4853
4893
  AccentPicker,
4854
4894
  AppShell,
4895
+ Avatar,
4855
4896
  BackLink,
4856
4897
  Badge,
4857
4898
  Breadcrumbs,