@cjlapao/ui-kit 0.2.14 → 0.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6999,13 +6999,13 @@ var Parser = class _Parser {
6999
6999
  /** Parse a message body (top-level or a branch body — see parseBranchBody). */
7000
7000
  parseMessage(inPluralBranch = false) {
7001
7001
  const nodes = [];
7002
- let text = "";
7002
+ let text2 = "";
7003
7003
  let pendingSpace = false;
7004
7004
  let hasContent = false;
7005
7005
  const flushText = () => {
7006
- if (text !== "") {
7007
- nodes.push({ type: "text", value: text });
7008
- text = "";
7006
+ if (text2 !== "") {
7007
+ nodes.push({ type: "text", value: text2 });
7008
+ text2 = "";
7009
7009
  }
7010
7010
  };
7011
7011
  while (this.pos < this.src.length) {
@@ -7013,19 +7013,19 @@ var Parser = class _Parser {
7013
7013
  if (ch === "\\") {
7014
7014
  if (this.src[this.pos + 1] === "'") {
7015
7015
  if (pendingSpace) {
7016
- text += " ";
7016
+ text2 += " ";
7017
7017
  pendingSpace = false;
7018
7018
  }
7019
- text += "'";
7019
+ text2 += "'";
7020
7020
  this.pos += 2;
7021
7021
  hasContent = true;
7022
7022
  continue;
7023
7023
  }
7024
7024
  if (pendingSpace) {
7025
- text += " ";
7025
+ text2 += " ";
7026
7026
  pendingSpace = false;
7027
7027
  }
7028
- text += ch;
7028
+ text2 += ch;
7029
7029
  this.pos += 1;
7030
7030
  hasContent = true;
7031
7031
  continue;
@@ -7033,16 +7033,16 @@ var Parser = class _Parser {
7033
7033
  if (ch === "'") {
7034
7034
  if (this.src[this.pos + 1] === "'") {
7035
7035
  if (pendingSpace) {
7036
- text += " ";
7036
+ text2 += " ";
7037
7037
  pendingSpace = false;
7038
7038
  }
7039
- text += "'";
7039
+ text2 += "'";
7040
7040
  this.pos += 2;
7041
7041
  hasContent = true;
7042
7042
  continue;
7043
7043
  }
7044
7044
  if (pendingSpace) {
7045
- text += " ";
7045
+ text2 += " ";
7046
7046
  pendingSpace = false;
7047
7047
  }
7048
7048
  this.pos += 1;
@@ -7054,13 +7054,13 @@ var Parser = class _Parser {
7054
7054
  throw this.err("unterminated quoted section \u2014 a ' opened without a closing '");
7055
7055
  }
7056
7056
  this.pos += 1;
7057
- text += inner;
7057
+ text2 += inner;
7058
7058
  hasContent = true;
7059
7059
  continue;
7060
7060
  }
7061
7061
  if (ch === "{") {
7062
7062
  if (pendingSpace) {
7063
- text += " ";
7063
+ text2 += " ";
7064
7064
  pendingSpace = false;
7065
7065
  }
7066
7066
  flushText();
@@ -7073,7 +7073,7 @@ var Parser = class _Parser {
7073
7073
  }
7074
7074
  if (inPluralBranch && ch === "#") {
7075
7075
  if (pendingSpace) {
7076
- text += " ";
7076
+ text2 += " ";
7077
7077
  pendingSpace = false;
7078
7078
  }
7079
7079
  flushText();
@@ -7088,10 +7088,10 @@ var Parser = class _Parser {
7088
7088
  continue;
7089
7089
  }
7090
7090
  if (pendingSpace) {
7091
- text += " ";
7091
+ text2 += " ";
7092
7092
  pendingSpace = false;
7093
7093
  }
7094
- text += ch;
7094
+ text2 += ch;
7095
7095
  hasContent = true;
7096
7096
  this.pos += 1;
7097
7097
  }
@@ -7529,8 +7529,8 @@ var FULL_MONTH_REGEX = new RegExp(
7529
7529
  "gi"
7530
7530
  );
7531
7531
  var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7532
- var normalizeToEnglishNames = (text, names) => {
7533
- let out = text;
7532
+ var normalizeToEnglishNames = (text2, names) => {
7533
+ let out = text2;
7534
7534
  const mapSet = (source, target) => {
7535
7535
  if (!source) return;
7536
7536
  const pairs = source.map((s, i) => [s, target[i]]).filter(([s, t]) => s && t && s.toLowerCase() !== t.toLowerCase()).sort((a, b) => b[0].length - a[0].length);
@@ -7547,21 +7547,21 @@ var normalizeToEnglishNames = (text, names) => {
7547
7547
  mapSet(names.weekdayShort, WEEKDAY_LABELS_SHORT);
7548
7548
  return out;
7549
7549
  };
7550
- var abbreviateMonthNames = (text) => text.replace(
7550
+ var abbreviateMonthNames = (text2) => text2.replace(
7551
7551
  FULL_MONTH_REGEX,
7552
7552
  (match) => MONTH_NAME_TO_ABBR[match.toLowerCase()] ?? match
7553
7553
  );
7554
7554
  var ABBR_MONTH_REGEX = /\b(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\b/g;
7555
- var expandMonthNames = (text) => text.replace(ABBR_MONTH_REGEX, (match) => {
7555
+ var expandMonthNames = (text2) => text2.replace(ABBR_MONTH_REGEX, (match) => {
7556
7556
  const expanded = MONTH_ABBR_TO_NAME[match.toLowerCase()];
7557
7557
  return expanded ? `${expanded.charAt(0) + expanded.slice(1).toLowerCase()}` : match;
7558
7558
  });
7559
- var parseCandidates = (text) => {
7560
- const candidates = [text, abbreviateMonthNames(text), expandMonthNames(text)];
7559
+ var parseCandidates = (text2) => {
7560
+ const candidates = [text2, abbreviateMonthNames(text2), expandMonthNames(text2)];
7561
7561
  return [...new Set(candidates)];
7562
7562
  };
7563
- var parseDateText = (text, formatString = DEFAULT_DATE_FORMAT, reference = /* @__PURE__ */ new Date(), names) => {
7564
- const trimmed = text.trim();
7563
+ var parseDateText = (text2, formatString = DEFAULT_DATE_FORMAT, reference = /* @__PURE__ */ new Date(), names) => {
7564
+ const trimmed = text2.trim();
7565
7565
  if (!trimmed) return null;
7566
7566
  const candidates = /* @__PURE__ */ new Set();
7567
7567
  for (const candidate of parseCandidates(trimmed)) candidates.add(candidate);
@@ -7578,13 +7578,13 @@ var parseDateText = (text, formatString = DEFAULT_DATE_FORMAT, reference = /* @_
7578
7578
  }
7579
7579
  return null;
7580
7580
  };
7581
- var parseValueText = (text, selectionMode = "single", formatString = DEFAULT_DATE_FORMAT, reference = /* @__PURE__ */ new Date(), names) => {
7582
- const trimmed = text.trim();
7581
+ var parseValueText = (text2, selectionMode = "single", formatString = DEFAULT_DATE_FORMAT, reference = /* @__PURE__ */ new Date(), names) => {
7582
+ const trimmed = text2.trim();
7583
7583
  if (!trimmed) return null;
7584
7584
  if (selectionMode === "single") {
7585
7585
  return parseDateText(trimmed, formatString, reference, names);
7586
7586
  }
7587
- const withTrailingSeparator = /\s-$/.test(text) ? `${text} ` : text;
7587
+ const withTrailingSeparator = /\s-$/.test(text2) ? `${text2} ` : text2;
7588
7588
  const parts = withTrailingSeparator.split(RANGE_SEPARATOR);
7589
7589
  if (parts.length !== 2) return null;
7590
7590
  const start = parseDateText(parts[0], formatString, reference, names);
@@ -10108,9 +10108,9 @@ var sizeTokens = {
10108
10108
  }
10109
10109
  }
10110
10110
  };
10111
- var SpinnerLabel = ({ text }) => {
10111
+ var SpinnerLabel = ({ text: text2 }) => {
10112
10112
  const surface = useSurfaceText();
10113
- return /* @__PURE__ */ jsx153("span", { className: classNames4("text-sm font-medium", surface.body), children: text });
10113
+ return /* @__PURE__ */ jsx153("span", { className: classNames4("text-sm font-medium", surface.body), children: text2 });
10114
10114
  };
10115
10115
  var Spinner = React6.forwardRef(
10116
10116
  ({
@@ -10419,7 +10419,7 @@ var TOOLTIP_ARROW_BORDER = {
10419
10419
  // src/components/TooltipWrapper.tsx
10420
10420
  import { Fragment as Fragment2, jsx as jsx154, jsxs as jsxs56 } from "react/jsx-runtime";
10421
10421
  var TooltipWrapper = ({
10422
- text,
10422
+ text: text2,
10423
10423
  delay = 500,
10424
10424
  position = "top",
10425
10425
  variant = "surface",
@@ -10440,12 +10440,12 @@ var TooltipWrapper = ({
10440
10440
  };
10441
10441
  }, []);
10442
10442
  useEffect(() => {
10443
- if (!text && visible) {
10443
+ if (!text2 && visible) {
10444
10444
  if (timerRef.current) clearTimeout(timerRef.current);
10445
10445
  setVisible(false);
10446
10446
  setPlacement(null);
10447
10447
  }
10448
- }, [text, visible]);
10448
+ }, [text2, visible]);
10449
10449
  const measure = useCallback(() => {
10450
10450
  const el = tooltipRef.current;
10451
10451
  const trigger = triggerRectRef.current;
@@ -10493,7 +10493,7 @@ var TooltipWrapper = ({
10493
10493
  }, [visible, measure]);
10494
10494
  const show = useCallback(
10495
10495
  (e) => {
10496
- if (text) {
10496
+ if (text2) {
10497
10497
  setColorScheme(
10498
10498
  e.currentTarget.closest("[data-color-scheme]")?.getAttribute("data-color-scheme") ?? null
10499
10499
  );
@@ -10507,7 +10507,7 @@ var TooltipWrapper = ({
10507
10507
  children.props.onMouseEnter?.(e);
10508
10508
  }
10509
10509
  },
10510
- [text, delay, children.props]
10510
+ [text2, delay, children.props]
10511
10511
  );
10512
10512
  const hide = useCallback(
10513
10513
  (e) => {
@@ -10530,7 +10530,7 @@ var TooltipWrapper = ({
10530
10530
  // The WAI pattern for tooltips: the relationship is declared only while
10531
10531
  // the tooltip exists — a permanent `aria-describedby` to an absent id is
10532
10532
  // a dangling reference most readers skip silently.
10533
- "aria-describedby": visible && text ? tooltipId : void 0,
10533
+ "aria-describedby": visible && text2 ? tooltipId : void 0,
10534
10534
  onMouseEnter: show,
10535
10535
  onMouseLeave: hide,
10536
10536
  onFocus: show,
@@ -10541,7 +10541,7 @@ var TooltipWrapper = ({
10541
10541
  const vertical = side === "top" || side === "bottom";
10542
10542
  return /* @__PURE__ */ jsxs56(Fragment2, { children: [
10543
10543
  child,
10544
- visible && text && createPortal(
10544
+ visible && text2 && createPortal(
10545
10545
  /* @__PURE__ */ jsxs56(
10546
10546
  "div",
10547
10547
  {
@@ -10563,7 +10563,7 @@ var TooltipWrapper = ({
10563
10563
  colorScheme === "dark" && "dark"
10564
10564
  ),
10565
10565
  children: [
10566
- text,
10566
+ text2,
10567
10567
  /* @__PURE__ */ jsx154(
10568
10568
  "span",
10569
10569
  {
@@ -13079,7 +13079,7 @@ var MultiProgressBar = ({
13079
13079
  className,
13080
13080
  ...rest
13081
13081
  }) => {
13082
- const text = useSurfaceText();
13082
+ const text2 = useSurfaceText();
13083
13083
  const renderIcon2 = useIconRenderer();
13084
13084
  const [hoveredKey, setHoveredKey] = useState3(null);
13085
13085
  const [tooltip, setTooltip] = useState3(null);
@@ -13150,7 +13150,7 @@ var MultiProgressBar = ({
13150
13150
  className: classNames17(
13151
13151
  "flex cursor-pointer select-none items-center gap-1.5 whitespace-nowrap",
13152
13152
  "transition-all duration-200",
13153
- isActive ? text.heading : isDimmed ? "opacity-40" : text.muted
13153
+ isActive ? text2.heading : isDimmed ? "opacity-40" : text2.muted
13154
13154
  ),
13155
13155
  onMouseEnter: () => setHoveredKey(s.key),
13156
13156
  onMouseLeave: () => setHoveredKey(null),
@@ -13175,13 +13175,13 @@ var MultiProgressBar = ({
13175
13175
  {
13176
13176
  className: classNames17(
13177
13177
  "font-semibold transition-colors duration-200",
13178
- isActive ? text.heading : text.body
13178
+ isActive ? text2.heading : text2.body
13179
13179
  ),
13180
13180
  children: s.displayValue ?? s.value
13181
13181
  }
13182
13182
  ),
13183
13183
  s.label,
13184
- showPercent && /* @__PURE__ */ jsxs68("span", { className: text.muted, children: [
13184
+ showPercent && /* @__PURE__ */ jsxs68("span", { className: text2.muted, children: [
13185
13185
  "(",
13186
13186
  Math.round(pct),
13187
13187
  "%)"
@@ -13323,7 +13323,7 @@ var MultiProgressBar = ({
13323
13323
  className: classNames17(
13324
13324
  tokens.label,
13325
13325
  "font-semibold",
13326
- !hasTextColor(labelClassName) && text.heading,
13326
+ !hasTextColor(labelClassName) && text2.heading,
13327
13327
  labelClassName
13328
13328
  ),
13329
13329
  children: label
@@ -13335,7 +13335,7 @@ var MultiProgressBar = ({
13335
13335
  className: classNames17(
13336
13336
  tokens.meta,
13337
13337
  "mt-0.5",
13338
- !hasTextColor(secondaryLabelClassName) && text.muted,
13338
+ !hasTextColor(secondaryLabelClassName) && text2.muted,
13339
13339
  secondaryLabelClassName
13340
13340
  ),
13341
13341
  children: secondaryLabel
@@ -13345,7 +13345,7 @@ var MultiProgressBar = ({
13345
13345
  totalLabel && /* @__PURE__ */ jsx166(
13346
13346
  "span",
13347
13347
  {
13348
- className: classNames17(tokens.meta, "font-medium", text.muted),
13348
+ className: classNames17(tokens.meta, "font-medium", text2.muted),
13349
13349
  children: totalLabel
13350
13350
  }
13351
13351
  )
@@ -13423,9 +13423,9 @@ var Shimmer_default = Shimmer;
13423
13423
  import classNames19 from "classnames";
13424
13424
  import React18 from "react";
13425
13425
  import { jsx as jsx168, jsxs as jsxs69 } from "react/jsx-runtime";
13426
- var StatusSpinnerLabel = ({ text }) => {
13426
+ var StatusSpinnerLabel = ({ text: text2 }) => {
13427
13427
  const surface = useSurfaceText();
13428
- return /* @__PURE__ */ jsx168("span", { className: classNames19("text-sm font-medium", surface.body), children: text });
13428
+ return /* @__PURE__ */ jsx168("span", { className: classNames19("text-sm font-medium", surface.body), children: text2 });
13429
13429
  };
13430
13430
  var StatusSpinner = React18.forwardRef(
13431
13431
  ({
@@ -15352,7 +15352,7 @@ var DropdownButton_default = DropdownButton;
15352
15352
  import classNames28 from "classnames";
15353
15353
  import { Fragment as Fragment10, jsx as jsx177 } from "react/jsx-runtime";
15354
15354
  var Tooltip = ({
15355
- text,
15355
+ text: text2,
15356
15356
  delay = 500,
15357
15357
  position = "top",
15358
15358
  variant = "surface",
@@ -15362,11 +15362,11 @@ var Tooltip = ({
15362
15362
  wrapperClassName,
15363
15363
  children
15364
15364
  }) => {
15365
- if (!text) return /* @__PURE__ */ jsx177(Fragment10, { children });
15365
+ if (!text2) return /* @__PURE__ */ jsx177(Fragment10, { children });
15366
15366
  return /* @__PURE__ */ jsx177(
15367
15367
  TooltipWrapper_default,
15368
15368
  {
15369
- text,
15369
+ text: text2,
15370
15370
  delay,
15371
15371
  position,
15372
15372
  variant,
@@ -15717,9 +15717,9 @@ var InputOtp = forwardRef151(function InputOtp2({
15717
15717
  [integerOnly]
15718
15718
  );
15719
15719
  const distribute = useCallback4(
15720
- (start, text) => {
15720
+ (start, text2) => {
15721
15721
  const at = Math.min(start, current.length);
15722
- const clean = [...text].filter((char) => isAllowed(char)).slice(0, clampedLength - at);
15722
+ const clean = [...text2].filter((char) => isAllowed(char)).slice(0, clampedLength - at);
15723
15723
  if (!clean.length) return;
15724
15724
  const next = [...chars];
15725
15725
  clean.forEach((char, j) => {
@@ -19918,7 +19918,7 @@ var Checkbox = forwardRef157(
19918
19918
  children: description
19919
19919
  }
19920
19920
  ) : null;
19921
- const text = label || descriptionNode ? /* @__PURE__ */ jsxs87(
19921
+ const text2 = label || descriptionNode ? /* @__PURE__ */ jsxs87(
19922
19922
  "span",
19923
19923
  {
19924
19924
  className: classNames41(
@@ -19972,7 +19972,7 @@ var Checkbox = forwardRef157(
19972
19972
  ),
19973
19973
  children: [
19974
19974
  control,
19975
- text
19975
+ text2
19976
19976
  ]
19977
19977
  }
19978
19978
  ),
@@ -23345,7 +23345,7 @@ var safeHref = (href) => {
23345
23345
  if (/^#[^\s"'<>]*$/.test(h)) return h;
23346
23346
  return null;
23347
23347
  };
23348
- var inline = (text) => text.replace(/`([^`]+)`/g, (_m, c) => `<code class="rounded bg-black/10 px-1 py-0.5 font-mono text-[0.85em] dark:bg-white/10">${c}</code>`).replace(/\*\*([^*\n]+)\*\*/g, (_m, c) => `<strong>${c}</strong>`).replace(/(^|[^*])\*([^*\n]+)\*/g, (_m, p, c) => `${p}<em>${c}</em>`).replace(/\[([^\]]+)\]\(([^)\s]+)\)/g, (_m, t, h) => {
23348
+ var inline = (text2) => text2.replace(/`([^`]+)`/g, (_m, c) => `<code class="rounded bg-black/10 px-1 py-0.5 font-mono text-[0.85em] dark:bg-white/10">${c}</code>`).replace(/\*\*([^*\n]+)\*\*/g, (_m, c) => `<strong>${c}</strong>`).replace(/(^|[^*])\*([^*\n]+)\*/g, (_m, p, c) => `${p}<em>${c}</em>`).replace(/\[([^\]]+)\]\(([^)\s]+)\)/g, (_m, t, h) => {
23349
23349
  const href = safeHref(h);
23350
23350
  if (!href) return t;
23351
23351
  return `<a href="${href}" target="_blank" rel="noopener noreferrer" class="text-blue-600 underline underline-offset-2 dark:text-blue-400">${t}</a>`;
@@ -23689,8 +23689,8 @@ var Chat2 = ({
23689
23689
  fail(err);
23690
23690
  }
23691
23691
  };
23692
- const send = async (text) => {
23693
- const content = text.trim();
23692
+ const send = async (text2) => {
23693
+ const content = text2.trim();
23694
23694
  if (!content || streaming) return;
23695
23695
  setDraft("");
23696
23696
  let chatId = activeIdRef.current;
@@ -24159,7 +24159,7 @@ var ChatRow = ({
24159
24159
  onMenu,
24160
24160
  menuRef
24161
24161
  }) => {
24162
- const [text, setText] = useState28(chat.title);
24162
+ const [text2, setText] = useState28(chat.title);
24163
24163
  if (renaming) {
24164
24164
  return /* @__PURE__ */ jsx206(
24165
24165
  Input_default,
@@ -24167,13 +24167,13 @@ var ChatRow = ({
24167
24167
  size: "sm",
24168
24168
  autoFocus: true,
24169
24169
  className: "my-0.5",
24170
- value: text,
24170
+ value: text2,
24171
24171
  onChange: (event) => setText(event.target.value),
24172
24172
  onKeyDown: (event) => {
24173
- if (event.key === "Enter") onRenamed(text || chat.title);
24173
+ if (event.key === "Enter") onRenamed(text2 || chat.title);
24174
24174
  if (event.key === "Escape") onCancelRename();
24175
24175
  },
24176
- onBlur: () => onRenamed(text || chat.title)
24176
+ onBlur: () => onRenamed(text2 || chat.title)
24177
24177
  }
24178
24178
  );
24179
24179
  }
@@ -24210,17 +24210,17 @@ var FolderInput = ({
24210
24210
  onDone,
24211
24211
  onCancel
24212
24212
  }) => {
24213
- const [text, setText] = useState28(initial);
24213
+ const [text2, setText] = useState28(initial);
24214
24214
  return /* @__PURE__ */ jsx206(
24215
24215
  Input_default,
24216
24216
  {
24217
24217
  size: "sm",
24218
24218
  autoFocus: true,
24219
24219
  placeholder: "Folder name",
24220
- value: text,
24220
+ value: text2,
24221
24221
  onChange: (event) => setText(event.target.value),
24222
24222
  onKeyDown: (event) => {
24223
- if (event.key === "Enter") onDone(text);
24223
+ if (event.key === "Enter") onDone(text2);
24224
24224
  if (event.key === "Escape") onCancel();
24225
24225
  }
24226
24226
  }
@@ -30613,10 +30613,10 @@ function PieSeries(props) {
30613
30613
  const lp = Math.max(1e-3, fracs[lb.index] ?? 0);
30614
30614
  const size = 11 * lp;
30615
30615
  if (size < 2) return;
30616
- const text = pctLabel(lb.pct * lp);
30616
+ const text2 = pctLabel(lb.pct * lp);
30617
30617
  c.globalAlpha = lp;
30618
30618
  c.font = `600 ${size}px sans-serif`;
30619
- const w = text.length * size * 0.58 + 12 * lp;
30619
+ const w = text2.length * size * 0.58 + 12 * lp;
30620
30620
  const h = 17 * lp;
30621
30621
  c.fillStyle = shadeColor(lb.color, 0.45);
30622
30622
  if (typeof c.roundRect === "function") {
@@ -30627,7 +30627,7 @@ function PieSeries(props) {
30627
30627
  c.fillRect(lb.x - w / 2, lb.y - h / 2, w, h);
30628
30628
  }
30629
30629
  c.fillStyle = "#fff";
30630
- c.fillText(text, lb.x, lb.y + 0.5);
30630
+ c.fillText(text2, lb.x, lb.y + 0.5);
30631
30631
  c.globalAlpha = 1;
30632
30632
  });
30633
30633
  c.restore();
@@ -30687,8 +30687,8 @@ function PieSeries(props) {
30687
30687
  const lp = Math.max(1e-3, fracs[lb.index] ?? 0);
30688
30688
  const size = 11 * lp;
30689
30689
  if (size < 2) return null;
30690
- const text = pctLabel(lb.pct * lp);
30691
- const w = text.length * size * 0.58 + 12 * lp;
30690
+ const text2 = pctLabel(lb.pct * lp);
30691
+ const w = text2.length * size * 0.58 + 12 * lp;
30692
30692
  const h = 17 * lp;
30693
30693
  return /* @__PURE__ */ jsxs107("g", { opacity: lp, pointerEvents: "none", children: [
30694
30694
  /* @__PURE__ */ jsx214(
@@ -30712,7 +30712,7 @@ function PieSeries(props) {
30712
30712
  fontSize: size,
30713
30713
  fontWeight: 600,
30714
30714
  fill: "#fff",
30715
- children: text
30715
+ children: text2
30716
30716
  }
30717
30717
  )
30718
30718
  ] }, lb.index);
@@ -31024,8 +31024,8 @@ function CandlestickSeries(props) {
31024
31024
  }
31025
31025
  if (hovered && hoverItem) {
31026
31026
  const up = hovered.direction !== "down";
31027
- const text = String(Math.round(hoverItem.value * 10) / 10);
31028
- const w = text.length * 6.4 + 12;
31027
+ const text2 = String(Math.round(hoverItem.value * 10) / 10);
31028
+ const w = text2.length * 6.4 + 12;
31029
31029
  const h = 17;
31030
31030
  const top = hovered.highY - 8 - h;
31031
31031
  c.fillStyle = shadeColor(up ? upColor : downColor, 0.45);
@@ -31034,7 +31034,7 @@ function CandlestickSeries(props) {
31034
31034
  c.font = "600 11px sans-serif";
31035
31035
  c.textAlign = "center";
31036
31036
  c.textBaseline = "middle";
31037
- c.fillText(text, hovered.x, top + h / 2);
31037
+ c.fillText(text2, hovered.x, top + h / 2);
31038
31038
  }
31039
31039
  c.restore();
31040
31040
  };
@@ -31172,8 +31172,8 @@ function CandlestickSeries(props) {
31172
31172
  highlightOn && hoveredIndex >= 0 && hoverItem && (() => {
31173
31173
  const k = candles[hoveredIndex];
31174
31174
  const up = k.direction !== "down";
31175
- const text = String(Math.round(hoverItem.value * 10) / 10);
31176
- const w = text.length * 6.4 + 12;
31175
+ const text2 = String(Math.round(hoverItem.value * 10) / 10);
31176
+ const w = text2.length * 6.4 + 12;
31177
31177
  const h = 17;
31178
31178
  const top = k.highY - 8 - h;
31179
31179
  return /* @__PURE__ */ jsxs108("g", { pointerEvents: "none", children: [
@@ -31198,7 +31198,7 @@ function CandlestickSeries(props) {
31198
31198
  fontSize: 11,
31199
31199
  fontWeight: 600,
31200
31200
  fill: "#fff",
31201
- children: text
31201
+ children: text2
31202
31202
  }
31203
31203
  )
31204
31204
  ] });
@@ -33562,7 +33562,7 @@ function DataLabels(props = {}) {
33562
33562
  };
33563
33563
  return /* @__PURE__ */ jsxs119("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: [
33564
33564
  endpoints.map((ep) => {
33565
- const text = props.formatter ? props.formatter(ep.value, ep.name) : formatSI(ep.value);
33565
+ const text2 = props.formatter ? props.formatter(ep.value, ep.name) : formatSI(ep.value);
33566
33566
  const renderPoint = {
33567
33567
  seriesId: ep.id,
33568
33568
  seriesName: ep.name,
@@ -33572,7 +33572,7 @@ function DataLabels(props = {}) {
33572
33572
  y: ep.y,
33573
33573
  isLast: true
33574
33574
  };
33575
- const w = text.length * 7 + 14;
33575
+ const w = text2.length * 7 + 14;
33576
33576
  const bx = props.anchor === "margin-left" ? Math.max(2, area2.x - w - 6) : Math.min(width - w - 2, ep.x + 10);
33577
33577
  const by = Math.max(2, Math.min(ep.y - PILL_H / 2, height - PILL_H - 2));
33578
33578
  if (props.render) {
@@ -33596,14 +33596,14 @@ function DataLabels(props = {}) {
33596
33596
  background: ep.color,
33597
33597
  color: "#ffffff"
33598
33598
  },
33599
- children: text
33599
+ children: text2
33600
33600
  },
33601
33601
  ep.id
33602
33602
  );
33603
33603
  }),
33604
33604
  pieSlices.map((sl) => {
33605
- const text = props.formatter ? props.formatter(sl.value, sl.name) : formatSI(sl.value);
33606
- const w = text.length * 7 + 14;
33605
+ const text2 = props.formatter ? props.formatter(sl.value, sl.name) : formatSI(sl.value);
33606
+ const w = text2.length * 7 + 14;
33607
33607
  const bx = Math.max(2, Math.min(width - w - 2, sl.x - w / 2));
33608
33608
  const by = Math.max(2, Math.min(height - PILL_H - 2, sl.y - PILL_H / 2));
33609
33609
  if (props.render) {
@@ -33628,7 +33628,7 @@ function DataLabels(props = {}) {
33628
33628
  background: shadeColor(sl.color, 0.45),
33629
33629
  color: "#ffffff"
33630
33630
  },
33631
- children: text
33631
+ children: text2
33632
33632
  },
33633
33633
  sl.key
33634
33634
  );
@@ -35770,7 +35770,7 @@ var GlassBackground_default = GlassBackground;
35770
35770
  import { useEffect as useEffect38, useRef as useRef36, useState as useState33 } from "react";
35771
35771
  import { jsx as jsx238 } from "react/jsx-runtime";
35772
35772
  var TruncatedText = ({
35773
- text,
35773
+ text: text2,
35774
35774
  className,
35775
35775
  delay = 2e3,
35776
35776
  as: Tag = "div",
@@ -35789,11 +35789,11 @@ var TruncatedText = ({
35789
35789
  observer.observe(el);
35790
35790
  check();
35791
35791
  return () => observer.disconnect();
35792
- }, [text]);
35792
+ }, [text2]);
35793
35793
  const inner = /* @__PURE__ */ jsx238(
35794
35794
  TooltipWrapper_default,
35795
35795
  {
35796
- text: truncated ? text : void 0,
35796
+ text: truncated ? text2 : void 0,
35797
35797
  delay,
35798
35798
  position: tooltipPosition,
35799
35799
  children: /* @__PURE__ */ jsx238(
@@ -35808,7 +35808,7 @@ var TruncatedText = ({
35808
35808
  truncated && "rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400",
35809
35809
  className
35810
35810
  ].filter(Boolean).join(" "),
35811
- children: text
35811
+ children: text2
35812
35812
  }
35813
35813
  )
35814
35814
  }
@@ -35884,18 +35884,18 @@ function normaliseValue(value, boolWords) {
35884
35884
  return { display: null, copyText: null, isEmpty: true };
35885
35885
  }
35886
35886
  if (typeof value === "boolean") {
35887
- const text = value ? boolWords.yes : boolWords.no;
35888
- return { display: text, copyText: text, isEmpty: false };
35887
+ const text2 = value ? boolWords.yes : boolWords.no;
35888
+ return { display: text2, copyText: text2, isEmpty: false };
35889
35889
  }
35890
35890
  if (typeof value === "string" || typeof value === "number") {
35891
35891
  return { display: value, copyText: String(value), isEmpty: false };
35892
35892
  }
35893
35893
  return { display: value, copyText: null, isEmpty: false };
35894
35894
  }
35895
- async function writeClipboard(text) {
35895
+ async function writeClipboard(text2) {
35896
35896
  try {
35897
35897
  if (!navigator.clipboard?.writeText) return false;
35898
- await navigator.clipboard.writeText(text);
35898
+ await navigator.clipboard.writeText(text2);
35899
35899
  return true;
35900
35900
  } catch {
35901
35901
  return false;
@@ -35928,7 +35928,7 @@ var InfoRowBody = ({
35928
35928
  rootProps
35929
35929
  }) => {
35930
35930
  const t = useKitT();
35931
- const text = useSurfaceText();
35931
+ const text2 = useSurfaceText();
35932
35932
  const [copyState, setCopyState] = useState34("idle");
35933
35933
  const [dismissed, setDismissed] = useState34(false);
35934
35934
  const [truncated, setTruncated] = useState34(false);
@@ -35966,7 +35966,7 @@ var InfoRowBody = ({
35966
35966
  }, [canTooltip]);
35967
35967
  const loaderInk = `bg-${rowTone}-500/20 dark:bg-${rowTone}-500/25`;
35968
35968
  const loaderText = `text-${rowTone}-500 dark:text-${rowTone}-400`;
35969
- const valueColorClass = hasError ? "text-rose-600 dark:text-rose-400" : isEmpty2 ? text.muted : text.body;
35969
+ const valueColorClass = hasError ? "text-rose-600 dark:text-rose-400" : isEmpty2 ? text2.muted : text2.body;
35970
35970
  const valueSpan = (
35971
35971
  // The truncated value is the tooltip's anchor: focusable (with a
35972
35972
  // focus-visible ring) only when there is a tooltip to reveal, so
@@ -36010,7 +36010,7 @@ var InfoRowBody = ({
36010
36010
  // `!copied` so the confirmation wash is never racing the hover wash for
36011
36011
  // the same property.
36012
36012
  hoverable && copyState === "idle" && trigger.hover,
36013
- !noBorder && !hoverable && `border-b ${text.divider} last:border-0`,
36013
+ !noBorder && !hoverable && `border-b ${text2.divider} last:border-0`,
36014
36014
  copyState === "copied" && "bg-emerald-500/10",
36015
36015
  copyState === "failed" && "bg-rose-500/10",
36016
36016
  className
@@ -36022,7 +36022,7 @@ var InfoRowBody = ({
36022
36022
  {
36023
36023
  className: classNames60(
36024
36024
  labelTokens.text,
36025
- !hasTextColor(labelClassName) && text.muted,
36025
+ !hasTextColor(labelClassName) && text2.muted,
36026
36026
  useSmartLayout ? "shrink-0 min-w-0 max-w-[30%] truncate" : `grow shrink-0 ${labelWidth ?? tokens.defaultLabelWidth}`,
36027
36027
  labelClassName
36028
36028
  ),
@@ -36343,7 +36343,7 @@ var PagedPanelBody = ({
36343
36343
  onPrev,
36344
36344
  onNext
36345
36345
  }) => {
36346
- const text = useSurfaceText();
36346
+ const text2 = useSurfaceText();
36347
36347
  const t = useKitT();
36348
36348
  const tokens = SIZE_TOKENS2[size] ?? SIZE_TOKENS2.md;
36349
36349
  const emptySize = PANE_EMPTY_STATE_SIZE[size] ?? PANE_EMPTY_STATE_SIZE.md;
@@ -36356,7 +36356,7 @@ var PagedPanelBody = ({
36356
36356
  className: classNames62(
36357
36357
  "flex items-center gap-2 border-b",
36358
36358
  tokens.pad,
36359
- text.divider
36359
+ text2.divider
36360
36360
  ),
36361
36361
  children: [
36362
36362
  /* @__PURE__ */ jsx241("div", { className: "shrink-0", children: showNav && /* @__PURE__ */ jsx241(
@@ -36379,7 +36379,7 @@ var PagedPanelBody = ({
36379
36379
  className: classNames62(
36380
36380
  "font-semibold leading-snug truncate",
36381
36381
  tokens.title,
36382
- text.heading
36382
+ text2.heading
36383
36383
  ),
36384
36384
  children: resolvedTitle
36385
36385
  }
@@ -36390,7 +36390,7 @@ var PagedPanelBody = ({
36390
36390
  className: classNames62(
36391
36391
  "mt-0.5 truncate",
36392
36392
  tokens.subtitle,
36393
- text.muted
36393
+ text2.muted
36394
36394
  ),
36395
36395
  children: subtitle
36396
36396
  }
@@ -36405,7 +36405,7 @@ var PagedPanelBody = ({
36405
36405
  className: classNames62(
36406
36406
  "mt-0.5 tabular-nums",
36407
36407
  tokens.counter,
36408
- text.muted
36408
+ text2.muted
36409
36409
  ),
36410
36410
  children: [
36411
36411
  current + 1,
@@ -37479,7 +37479,7 @@ var HelpBody = ({
37479
37479
  };
37480
37480
  var CollapsibleHelpText = ({
37481
37481
  title,
37482
- text,
37482
+ text: text2,
37483
37483
  maxLength = 160,
37484
37484
  showIcon = false,
37485
37485
  icon = "Help",
@@ -37499,7 +37499,7 @@ var CollapsibleHelpText = ({
37499
37499
  }) => {
37500
37500
  const [expanded, setExpanded] = useState40(false);
37501
37501
  const regionId = useId27();
37502
- const sanitized = text?.trim() ?? "";
37502
+ const sanitized = text2?.trim() ?? "";
37503
37503
  const needsTruncation = sanitized.length > maxLength;
37504
37504
  const displayText = expanded || !needsTruncation ? sanitized : truncate(sanitized, maxLength);
37505
37505
  const toneTokens3 = getCollapsibleHelpToneTokens(tone);
@@ -38821,7 +38821,7 @@ var DatePicker = forwardRef160(
38821
38821
  setViewDate(getViewDate(currentValue, constraints));
38822
38822
  }
38823
38823
  }, [currentValue, constraints]);
38824
- const [text, setText] = useState44(() => formatValue(initialValue, format2));
38824
+ const [text2, setText] = useState44(() => formatValue(initialValue, format2));
38825
38825
  const [textInvalid, setTextInvalid] = useState44(false);
38826
38826
  const [focused, setFocused] = useState44(false);
38827
38827
  const focusedRef = useRef43(false);
@@ -38978,7 +38978,7 @@ var DatePicker = forwardRef160(
38978
38978
  }
38979
38979
  if (event.key === "Enter") {
38980
38980
  const parsed = parseValueText(
38981
- text,
38981
+ text2,
38982
38982
  selectionMode,
38983
38983
  format2,
38984
38984
  /* @__PURE__ */ new Date(),
@@ -39203,7 +39203,7 @@ var DatePicker = forwardRef160(
39203
39203
  readOnly: readonly,
39204
39204
  inputMode: "none",
39205
39205
  autoComplete: "off",
39206
- value: text,
39206
+ value: text2,
39207
39207
  onChange: handleTextChange,
39208
39208
  onFocus: (event) => {
39209
39209
  focusedRef.current = true;
@@ -49603,12 +49603,12 @@ var parseSmartVariable = (token) => {
49603
49603
  };
49604
49604
  };
49605
49605
  var matcher = () => new RegExp(SMART_VAR_REGEX.source, "gi");
49606
- var extractVariables = (text) => {
49606
+ var extractVariables = (text2) => {
49607
49607
  const variables = [];
49608
49608
  const seen = /* @__PURE__ */ new Set();
49609
49609
  const regex = matcher();
49610
49610
  let match;
49611
- while ((match = regex.exec(text)) !== null) {
49611
+ while ((match = regex.exec(text2)) !== null) {
49612
49612
  const fullToken = match[0];
49613
49613
  if (seen.has(fullToken)) continue;
49614
49614
  seen.add(fullToken);
@@ -49621,7 +49621,7 @@ var extractVariables = (text) => {
49621
49621
  }
49622
49622
  return variables;
49623
49623
  };
49624
- var hasSmartVariables = (text) => matcher().test(text ?? "");
49624
+ var hasSmartVariables = (text2) => matcher().test(text2 ?? "");
49625
49625
  var splitSmartValue = (value) => {
49626
49626
  const parts = [];
49627
49627
  if (!value) return parts;
@@ -49690,13 +49690,13 @@ var createDefaultResolver = (groups) => (variable) => {
49690
49690
  };
49691
49691
  var resolveSmartValue = (value, resolve2) => {
49692
49692
  const missing = [];
49693
- const text = splitSmartValue(value).map((part) => {
49693
+ const text2 = splitSmartValue(value).map((part) => {
49694
49694
  if (part.kind === "text") return part.text;
49695
49695
  const resolution = resolve2(part.variable);
49696
49696
  if (resolution.state === "missing") missing.push(part.variable);
49697
49697
  return resolution.value;
49698
49698
  }).join("");
49699
- return { text, missing };
49699
+ return { text: text2, missing };
49700
49700
  };
49701
49701
  var createLegacyGroups = (options) => {
49702
49702
  const { globalParameters = [], serviceNames = [], systemVariables = [] } = options;
@@ -51023,7 +51023,7 @@ var StatPager = ({
51023
51023
  onGradient = false,
51024
51024
  className
51025
51025
  }) => {
51026
- const text = useSurfaceText();
51026
+ const text2 = useSurfaceText();
51027
51027
  const tokens = TOKENS2[size] ?? TOKENS2.md;
51028
51028
  if (pager.total <= 1 && label == null) return null;
51029
51029
  return /* @__PURE__ */ jsxs157("div", { className: classNames87("flex items-center gap-2", className), children: [
@@ -51051,7 +51051,7 @@ var StatPager = ({
51051
51051
  className: classNames87(
51052
51052
  "truncate font-semibold",
51053
51053
  tokens.label,
51054
- onGradient ? "text-white" : text.heading
51054
+ onGradient ? "text-white" : text2.heading
51055
51055
  ),
51056
51056
  children: label
51057
51057
  }
@@ -51066,7 +51066,7 @@ var StatPager = ({
51066
51066
  className: classNames87(
51067
51067
  "tabular-nums",
51068
51068
  tokens.counter,
51069
- onGradient ? "text-white/70" : text.muted
51069
+ onGradient ? "text-white/70" : text2.muted
51070
51070
  ),
51071
51071
  children: [
51072
51072
  pager.page + 1,
@@ -51530,7 +51530,7 @@ var CHART_TOKENS = {
51530
51530
  };
51531
51531
  var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
51532
51532
  const [hoveredIndex, setHoveredIndex] = useState64(null);
51533
- const text = useSurfaceText();
51533
+ const text2 = useSurfaceText();
51534
51534
  const resolvedItems = useMemo39(() => {
51535
51535
  const palette = getColorPaletteNames(dataset.items.length);
51536
51536
  return dataset.items.map((item, i) => ({
@@ -51635,7 +51635,7 @@ var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
51635
51635
  className: classNames89(
51636
51636
  "mb-1 font-bold leading-none",
51637
51637
  tokens.total,
51638
- onGradient ? "text-white" : text.heading
51638
+ onGradient ? "text-white" : text2.heading
51639
51639
  ),
51640
51640
  children: total
51641
51641
  }
@@ -51646,7 +51646,7 @@ var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
51646
51646
  className: classNames89(
51647
51647
  "font-medium leading-tight",
51648
51648
  tokens.center,
51649
- onGradient ? "text-white/70" : text.muted
51649
+ onGradient ? "text-white/70" : text2.muted
51650
51650
  ),
51651
51651
  children: dataset.centerLabel
51652
51652
  }
@@ -51690,7 +51690,7 @@ var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
51690
51690
  className: classNames89(
51691
51691
  "truncate transition-colors",
51692
51692
  tokens.legend,
51693
- onGradient ? "text-white/80" : text.body
51693
+ onGradient ? "text-white/80" : text2.body
51694
51694
  ),
51695
51695
  children: item.label
51696
51696
  }
@@ -51702,7 +51702,7 @@ var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
51702
51702
  className: classNames89(
51703
51703
  "flex-none font-bold",
51704
51704
  tokens.legend,
51705
- onGradient ? "text-white" : text.heading
51705
+ onGradient ? "text-white" : text2.heading
51706
51706
  ),
51707
51707
  children: item.value
51708
51708
  }
@@ -51757,14 +51757,14 @@ var StatChartTile_default = StatChartTile;
51757
51757
  import classNames90 from "classnames";
51758
51758
  import { jsx as jsx275, jsxs as jsxs160 } from "react/jsx-runtime";
51759
51759
  var Breakdown = ({ items, onGradient }) => {
51760
- const text = useSurfaceText();
51760
+ const text2 = useSurfaceText();
51761
51761
  return /* @__PURE__ */ jsx275("div", { className: "mt-auto space-y-3 pt-4", children: items.map((item, idx) => /* @__PURE__ */ jsxs160("div", { className: "flex items-center justify-between text-sm", children: [
51762
51762
  /* @__PURE__ */ jsx275(
51763
51763
  "span",
51764
51764
  {
51765
51765
  className: classNames90(
51766
51766
  "font-medium",
51767
- onGradient ? "text-white/70" : text.muted
51767
+ onGradient ? "text-white/70" : text2.muted
51768
51768
  ),
51769
51769
  children: item.label
51770
51770
  }
@@ -51774,7 +51774,7 @@ var Breakdown = ({ items, onGradient }) => {
51774
51774
  {
51775
51775
  className: classNames90(
51776
51776
  "font-semibold",
51777
- item.color ? `text-${item.color}-600 dark:text-${item.color}-400` : onGradient ? "text-white" : text.body
51777
+ item.color ? `text-${item.color}-600 dark:text-${item.color}-400` : onGradient ? "text-white" : text2.body
51778
51778
  ),
51779
51779
  children: item.value
51780
51780
  }
@@ -51890,7 +51890,7 @@ var CircularProgress = ({ value, color, icon, label, size, strokeWidth, iconSize
51890
51890
  );
51891
51891
  };
51892
51892
  var Goals = ({ goals, tokens, ringSize, onGradient }) => {
51893
- const text = useSurfaceText();
51893
+ const text2 = useSurfaceText();
51894
51894
  return /* @__PURE__ */ jsx276("div", { className: "flex h-full flex-col justify-center", children: goals.map((goal, idx) => /* @__PURE__ */ jsxs161(React73.Fragment, { children: [
51895
51895
  /* @__PURE__ */ jsxs161(
51896
51896
  "div",
@@ -51921,7 +51921,7 @@ var Goals = ({ goals, tokens, ringSize, onGradient }) => {
51921
51921
  className: classNames91(
51922
51922
  "font-bold leading-none",
51923
51923
  tokens.value,
51924
- onGradient ? "text-white" : text.heading
51924
+ onGradient ? "text-white" : text2.heading
51925
51925
  ),
51926
51926
  children: [
51927
51927
  goal.value,
@@ -51935,7 +51935,7 @@ var Goals = ({ goals, tokens, ringSize, onGradient }) => {
51935
51935
  className: classNames91(
51936
51936
  "mt-1 font-medium",
51937
51937
  tokens.label,
51938
- onGradient ? "text-white/70" : text.muted
51938
+ onGradient ? "text-white/70" : text2.muted
51939
51939
  ),
51940
51940
  children: goal.label
51941
51941
  }
@@ -51949,7 +51949,7 @@ var Goals = ({ goals, tokens, ringSize, onGradient }) => {
51949
51949
  {
51950
51950
  className: classNames91(
51951
51951
  "my-1 h-px w-full border-t",
51952
- onGradient ? "border-white/20" : text.divider
51952
+ onGradient ? "border-white/20" : text2.divider
51953
51953
  )
51954
51954
  }
51955
51955
  )
@@ -52117,7 +52117,7 @@ var StatGraphTile = ({
52117
52117
  const resolvedChartType = chartType ?? (isChartType(variant) ? variant : "bar");
52118
52118
  const surfaceVariant = isChartType(variant) ? void 0 : variant;
52119
52119
  const resolvedTone = tone ?? color;
52120
- const text = useSurfaceText();
52120
+ const text2 = useSurfaceText();
52121
52121
  const isDark = useIsDarkMode();
52122
52122
  const [tooltip, setTooltip] = useState66(null);
52123
52123
  const wrapperRef = useRef58(null);
@@ -52230,13 +52230,13 @@ var StatGraphTile = ({
52230
52230
  {
52231
52231
  className: classNames92(
52232
52232
  "text-xs font-medium",
52233
- gradient ? "text-white/70" : text.muted
52233
+ gradient ? "text-white/70" : text2.muted
52234
52234
  ),
52235
52235
  children: s.label
52236
52236
  }
52237
52237
  )
52238
52238
  ] }, s.key)) });
52239
- }, [showLegend, resolvedChartType, resolvedSeries, getColor, gradient, text.muted]);
52239
+ }, [showLegend, resolvedChartType, resolvedSeries, getColor, gradient, text2.muted]);
52240
52240
  const axisColor = gradient ? "rgba(255,255,255,0.7)" : isDark ? "#94a3b8" : "#64748b";
52241
52241
  const gridColor = gradient ? "rgba(255,255,255,0.2)" : isDark ? "#334155" : "#e2e8f0";
52242
52242
  const renderChart = () => {
@@ -52384,7 +52384,7 @@ var StatGraphTile = ({
52384
52384
  className: classNames92(
52385
52385
  "font-bold",
52386
52386
  SPARK_VALUE[size] ?? SPARK_VALUE.md,
52387
- gradient ? "text-white" : text.heading
52387
+ gradient ? "text-white" : text2.heading
52388
52388
  ),
52389
52389
  children: props.value
52390
52390
  }
@@ -52394,7 +52394,7 @@ var StatGraphTile = ({
52394
52394
  {
52395
52395
  className: classNames92(
52396
52396
  "mt-1 text-sm",
52397
- gradient ? "text-white/70" : text.muted
52397
+ gradient ? "text-white/70" : text2.muted
52398
52398
  ),
52399
52399
  children: props.subtitle
52400
52400
  }
@@ -57175,8 +57175,8 @@ var TYPE_CONFIG = {
57175
57175
  var NotificationModalBody = ({
57176
57176
  children
57177
57177
  }) => {
57178
- const text = useSurfaceText();
57179
- return /* @__PURE__ */ jsx287("div", { className: classNames99("text-sm", text.body), children });
57178
+ const text2 = useSurfaceText();
57179
+ return /* @__PURE__ */ jsx287("div", { className: classNames99("text-sm", text2.body), children });
57180
57180
  };
57181
57181
  var NotificationModal = ({
57182
57182
  isOpen,
@@ -58375,8 +58375,8 @@ var nodeIsSkipped = (node) => node?.skipped ?? (node?.status === "skipped" ? tru
58375
58375
 
58376
58376
  // ../common/connectionFlow/measure.ts
58377
58377
  var rowHeight = (metrics, hasGlyph, hasSubtitle) => {
58378
- const text = metrics.titleLine + (hasSubtitle ? metrics.bodyLine : 0);
58379
- return hasGlyph ? Math.max(metrics.glyph, text) : text;
58378
+ const text2 = metrics.titleLine + (hasSubtitle ? metrics.bodyLine : 0);
58379
+ return hasGlyph ? Math.max(metrics.glyph, text2) : text2;
58380
58380
  };
58381
58381
  var measureHeader = (node, metrics) => {
58382
58382
  if (!node.title && !node.subtitle) return 0;
@@ -59350,14 +59350,14 @@ var MARGIN = 12;
59350
59350
  var LINE_HEIGHT = 14;
59351
59351
  var captionStub = (options) => 18 + options.cornerRadius;
59352
59352
  var captionEscape = (options) => 2 * captionStub(options) + MARGIN;
59353
- var captionTextWidth = (text) => Array.from(text).reduce(
59353
+ var captionTextWidth = (text2) => Array.from(text2).reduce(
59354
59354
  (sum, c) => sum + ((c.codePointAt(0) ?? 0) >= 11904 ? 12 : /[MW@%]/.test(c) ? 9 : /[ilI.,'!:;| ]/.test(c) ? 3.5 : 6.8),
59355
59355
  0
59356
59356
  );
59357
- function wrapCaption(text, width) {
59357
+ function wrapCaption(text2, width) {
59358
59358
  const lines = [];
59359
59359
  let line3 = "";
59360
- for (const paragraph of text.split(/\r?\n/u)) {
59360
+ for (const paragraph of text2.split(/\r?\n/u)) {
59361
59361
  for (const word of paragraph.split(/\s+/u).filter(Boolean)) {
59362
59362
  if (line3 && captionTextWidth(`${line3} ${word}`) <= width) {
59363
59363
  line3 += ` ${word}`;
@@ -59453,8 +59453,8 @@ function layoutCaptions(nodes, edges, connectors, options) {
59453
59453
  if (route && !segmentsCrossBoxes(route.points, [...nodes, ...boxes]) && (blocked || score(route.points) < score(edge.points)))
59454
59454
  Object.assign(edge, { points: route.points, d: route.d });
59455
59455
  };
59456
- const measure = (text, width, x, y) => {
59457
- const lines = wrapCaption(text, Math.max(10, width - 2 * PADDING));
59456
+ const measure = (text2, width, x, y) => {
59457
+ const lines = wrapCaption(text2, Math.max(10, width - 2 * PADDING));
59458
59458
  const measuredWidth = Math.min(
59459
59459
  width,
59460
59460
  Math.max(...lines.map(captionTextWidth)) + 2 * PADDING
@@ -59493,10 +59493,10 @@ function layoutCaptions(nodes, edges, connectors, options) {
59493
59493
  Object.assign(edge, local);
59494
59494
  }
59495
59495
  avoid(edge, reserved);
59496
- const text = edge.label;
59496
+ const text2 = edge.label;
59497
59497
  const readableWidth = Math.max(
59498
59498
  64,
59499
- Math.min(96, Math.max(...text.split(/\s+/u).map(captionTextWidth))) + 16
59499
+ Math.min(96, Math.max(...text2.split(/\s+/u).map(captionTextWidth))) + 16
59500
59500
  );
59501
59501
  const candidates = [];
59502
59502
  for (let i = 1; i < edge.points.length; i++) {
@@ -59530,7 +59530,7 @@ function layoutCaptions(nodes, edges, connectors, options) {
59530
59530
  );
59531
59531
  for (const candidate of candidates) {
59532
59532
  if (candidate.width < readableWidth) continue;
59533
- const base = measure(text, candidate.width, candidate.x, candidate.y);
59533
+ const base = measure(text2, candidate.width, candidate.x, candidate.y);
59534
59534
  const canMove = !candidate.vertical && candidate.segment > 0 && candidate.segment < edge.points.length - 2;
59535
59535
  const middle = nodes.reduce((sum, n) => sum + n.y + n.height / 2, 0) / Math.max(1, nodes.length);
59536
59536
  const direction = candidate.y >= middle ? 1 : -1;
@@ -59569,7 +59569,7 @@ function layoutCaptions(nodes, edges, connectors, options) {
59569
59569
  }
59570
59570
  if (!edge.caption) {
59571
59571
  const caption = measure(
59572
- text,
59572
+ text2,
59573
59573
  Math.min(240, Math.max(80, options.connectorWidth - 2 * MARGIN)),
59574
59574
  0,
59575
59575
  0
@@ -59640,9 +59640,9 @@ function captionSpacing(nodes, options) {
59640
59640
  };
59641
59641
  nodes.forEach(visit);
59642
59642
  const ranks = new Map(all.map((n, i) => [n.id, i]));
59643
- const reserve = (map, id, text) => {
59644
- if (!text) return;
59645
- const width = captionTextWidth(text);
59643
+ const reserve = (map, id, text2) => {
59644
+ if (!text2) return;
59645
+ const width = captionTextWidth(text2);
59646
59646
  if (width <= Math.max(48, options.connectorWidth - 40)) return;
59647
59647
  const budget = Math.min(
59648
59648
  240,
@@ -59656,7 +59656,7 @@ function captionSpacing(nodes, options) {
59656
59656
  ),
59657
59657
  vertical: Math.max(
59658
59658
  old?.vertical ?? 0,
59659
- wrapCaption(text, budget).length * LINE_HEIGHT + PADDING + 2 * (captionEscape(options) + MARGIN)
59659
+ wrapCaption(text2, budget).length * LINE_HEIGHT + PADDING + 2 * (captionEscape(options) + MARGIN)
59660
59660
  )
59661
59661
  });
59662
59662
  };
@@ -66689,11 +66689,11 @@ function buildTimeScale(rangeStart, rangeEnd, pxPerDay, locale) {
66689
66689
  const columns = seeds.filter((s) => s.end > rangeStart && s.start < rangeEnd).map((s, i) => {
66690
66690
  const clampedStart = Math.max(s.start, rangeStart);
66691
66691
  const clampedEnd = Math.min(s.end, rangeEnd);
66692
- const text = labelOf(s.start);
66692
+ const text2 = labelOf(s.start);
66693
66693
  return {
66694
66694
  id: `${id}-${i}`,
66695
- label: text.label,
66696
- subLabel: text.subLabel,
66695
+ label: text2.label,
66696
+ subLabel: text2.subLabel,
66697
66697
  start: clampedStart,
66698
66698
  end: clampedEnd,
66699
66699
  width: (clampedEnd - clampedStart) / MS_PER_DAY * pxPerDay
@@ -70474,7 +70474,7 @@ var Avatars = ({ users }) => {
70474
70474
  )) });
70475
70475
  };
70476
70476
  var TaskBoardCardBody = ({ card }) => {
70477
- const { surface, size, cardLayout, priorities, locale, text } = useTaskBoard();
70477
+ const { surface, size, cardLayout, priorities, locale, text: text2 } = useTaskBoard();
70478
70478
  const priority = card.priority ? priorities.get(card.priority) : void 0;
70479
70479
  const due = formatDue(card.due, locale);
70480
70480
  const plainChip = classNames127("bg-black/5 dark:bg-white/10", surface.muted);
@@ -70531,12 +70531,12 @@ var TaskBoardCardBody = ({ card }) => {
70531
70531
  (hasMeta || card.assignees?.length) && /* @__PURE__ */ jsxs197("div", { className: "flex items-end gap-2", children: [
70532
70532
  /* @__PURE__ */ jsxs197("div", { className: classNames127("flex min-w-0 flex-1 flex-wrap items-center gap-2", size.meta, surface.muted), children: [
70533
70533
  priorityChip,
70534
- card.description && /* @__PURE__ */ jsx319("span", { title: text("notes"), "aria-label": text("notes"), role: "img", children: /* @__PURE__ */ jsx319(Details, { className: "h-3.5 w-3.5", "aria-hidden": "true" }) }),
70534
+ card.description && /* @__PURE__ */ jsx319("span", { title: text2("notes"), "aria-label": text2("notes"), role: "img", children: /* @__PURE__ */ jsx319(Details, { className: "h-3.5 w-3.5", "aria-hidden": "true" }) }),
70535
70535
  card.checklist && /* @__PURE__ */ jsxs197(
70536
70536
  "span",
70537
70537
  {
70538
70538
  className: "inline-flex items-center gap-1",
70539
- title: text("checklist", { done: card.checklist.done, total: card.checklist.total }),
70539
+ title: text2("checklist", { done: card.checklist.done, total: card.checklist.total }),
70540
70540
  children: [
70541
70541
  /* @__PURE__ */ jsx319(CheckCircle, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
70542
70542
  card.checklist.done,
@@ -70545,7 +70545,7 @@ var TaskBoardCardBody = ({ card }) => {
70545
70545
  ]
70546
70546
  }
70547
70547
  ),
70548
- due && /* @__PURE__ */ jsxs197("span", { "data-card-due": true, className: "inline-flex items-center gap-1", title: text("due", { date: due }), children: [
70548
+ due && /* @__PURE__ */ jsxs197("span", { "data-card-due": true, className: "inline-flex items-center gap-1", title: text2("due", { date: due }), children: [
70549
70549
  /* @__PURE__ */ jsx319(Calendar, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
70550
70550
  due
70551
70551
  ] })
@@ -70648,7 +70648,7 @@ TaskBoardCard.displayName = "TaskBoardCard";
70648
70648
  // src/components/TaskBoard/TaskBoardBucket.tsx
70649
70649
  import { jsx as jsx320 } from "react/jsx-runtime";
70650
70650
  var TaskBoardBucket = ({ column, lane, cards, className, label }) => {
70651
- const { cardState, cardProps, dropTarget, size, text } = useTaskBoard();
70651
+ const { cardState, cardProps, dropTarget, size, text: text2 } = useTaskBoard();
70652
70652
  const key = bucketKey(column, lane);
70653
70653
  const target = dropTarget && dropTarget.bucket === key ? dropTarget : null;
70654
70654
  return /* @__PURE__ */ jsx320(
@@ -70660,7 +70660,7 @@ var TaskBoardBucket = ({ column, lane, cards, className, label }) => {
70660
70660
  "data-bucket-column": column,
70661
70661
  "data-bucket-lane": lane ?? "",
70662
70662
  "data-drop": target ? target.valid ? "valid" : "invalid" : void 0,
70663
- title: target && !target.valid ? text("notAllowed") : void 0,
70663
+ title: target && !target.valid ? text2("notAllowed") : void 0,
70664
70664
  className: classNames128(
70665
70665
  "flex min-h-12 flex-col rounded-lg transition-colors",
70666
70666
  size.gap,
@@ -70732,7 +70732,7 @@ var TaskBoardAddColumn = ({
70732
70732
  onAdd,
70733
70733
  variant
70734
70734
  }) => {
70735
- const { text, surface, color, size, columnCornerClass } = useTaskBoard();
70735
+ const { text: text2, surface, color, size, columnCornerClass } = useTaskBoard();
70736
70736
  const [editing, setEditing] = useState86(false);
70737
70737
  const [title, setTitle] = useState86("");
70738
70738
  const trigger = getSurfaceTriggerTokens(color);
@@ -70759,8 +70759,8 @@ var TaskBoardAddColumn = ({
70759
70759
  "input",
70760
70760
  {
70761
70761
  autoFocus: true,
70762
- "aria-label": text("columnName"),
70763
- placeholder: text("columnName"),
70762
+ "aria-label": text2("columnName"),
70763
+ placeholder: text2("columnName"),
70764
70764
  value: title,
70765
70765
  onChange: (e) => setTitle(e.target.value),
70766
70766
  onKeyDown: (e) => {
@@ -70793,7 +70793,7 @@ var TaskBoardAddColumn = ({
70793
70793
  ),
70794
70794
  children: [
70795
70795
  /* @__PURE__ */ jsx321(Add, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
70796
- text("addColumn")
70796
+ text2("addColumn")
70797
70797
  ]
70798
70798
  }
70799
70799
  )
@@ -70870,7 +70870,7 @@ function fromDraft(column, d) {
70870
70870
  }
70871
70871
  var limitValid = (wip) => wip.trim() === "" || Number.isInteger(Number(wip)) && Number(wip) >= 1;
70872
70872
  var TaskBoardColumnEditButton = ({ column }) => {
70873
- const { onEditColumn, allColumns, text, surface, color } = useTaskBoard();
70873
+ const { onEditColumn, allColumns, text: text2, surface, color } = useTaskBoard();
70874
70874
  const [open, setOpen] = useState87(false);
70875
70875
  const [draft, setDraft] = useState87(() => toDraft(column));
70876
70876
  const id = useId45();
@@ -70897,7 +70897,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
70897
70897
  "button",
70898
70898
  {
70899
70899
  type: "button",
70900
- "aria-label": text("editColumn", { name: column.title }),
70900
+ "aria-label": text2("editColumn", { name: column.title }),
70901
70901
  className: classNames130("shrink-0 rounded p-1", surface.muted, trigger.hover, trigger.focusRing),
70902
70902
  children: /* @__PURE__ */ jsx322(Edit, { className: "h-3.5 w-3.5", "aria-hidden": "true" })
70903
70903
  }
@@ -70915,8 +70915,8 @@ var TaskBoardColumnEditButton = ({ column }) => {
70915
70915
  Input_default,
70916
70916
  {
70917
70917
  size: "sm",
70918
- "aria-label": text("columnName"),
70919
- placeholder: text("columnName"),
70918
+ "aria-label": text2("columnName"),
70919
+ placeholder: text2("columnName"),
70920
70920
  value: draft.title,
70921
70921
  onChange: (e) => setDraft({ ...draft, title: e.target.value }),
70922
70922
  onKeyDown: (e) => {
@@ -70928,7 +70928,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
70928
70928
  }
70929
70929
  ),
70930
70930
  /* @__PURE__ */ jsxs199("div", { className: "flex flex-col gap-1.5", children: [
70931
- /* @__PURE__ */ jsx322("span", { className: classNames130("text-xs font-semibold", surface.muted), children: text("columnColor") }),
70931
+ /* @__PURE__ */ jsx322("span", { className: classNames130("text-xs font-semibold", surface.muted), children: text2("columnColor") }),
70932
70932
  /* @__PURE__ */ jsx322(
70933
70933
  ColorSwatches,
70934
70934
  {
@@ -70941,7 +70941,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
70941
70941
  )
70942
70942
  ] }),
70943
70943
  /* @__PURE__ */ jsxs199("div", { className: "flex flex-col gap-1", children: [
70944
- /* @__PURE__ */ jsx322("label", { htmlFor: `${id}-wip`, className: classNames130("text-xs font-semibold", surface.muted), children: text("wipLimit") }),
70944
+ /* @__PURE__ */ jsx322("label", { htmlFor: `${id}-wip`, className: classNames130("text-xs font-semibold", surface.muted), children: text2("wipLimit") }),
70945
70945
  /* @__PURE__ */ jsx322(
70946
70946
  Input_default,
70947
70947
  {
@@ -70950,7 +70950,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
70950
70950
  type: "number",
70951
70951
  min: 1,
70952
70952
  inputMode: "numeric",
70953
- placeholder: text("wipLimitHint"),
70953
+ placeholder: text2("wipLimitHint"),
70954
70954
  value: draft.wip,
70955
70955
  onChange: (e) => setDraft({ ...draft, wip: e.target.value }),
70956
70956
  "aria-invalid": !limitValid(draft.wip) || void 0
@@ -70958,7 +70958,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
70958
70958
  )
70959
70959
  ] }),
70960
70960
  /* @__PURE__ */ jsxs199("div", { className: "flex flex-col gap-1", children: [
70961
- /* @__PURE__ */ jsx322("label", { htmlFor: `${id}-max`, className: classNames130("text-xs font-semibold", surface.muted), children: text("maxItems") }),
70961
+ /* @__PURE__ */ jsx322("label", { htmlFor: `${id}-max`, className: classNames130("text-xs font-semibold", surface.muted), children: text2("maxItems") }),
70962
70962
  /* @__PURE__ */ jsx322(
70963
70963
  Input_default,
70964
70964
  {
@@ -70967,7 +70967,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
70967
70967
  type: "number",
70968
70968
  min: 1,
70969
70969
  inputMode: "numeric",
70970
- placeholder: text("maxItemsHint"),
70970
+ placeholder: text2("maxItemsHint"),
70971
70971
  value: draft.max,
70972
70972
  onChange: (e) => setDraft({ ...draft, max: e.target.value }),
70973
70973
  "aria-invalid": !limitValid(draft.max) || void 0
@@ -70978,14 +70978,14 @@ var TaskBoardColumnEditButton = ({ column }) => {
70978
70978
  Toggle_default,
70979
70979
  {
70980
70980
  size: "sm",
70981
- label: text("lockColumn"),
70982
- description: text("lockColumnHint"),
70981
+ label: text2("lockColumn"),
70982
+ description: text2("lockColumnHint"),
70983
70983
  checked: draft.locked,
70984
70984
  onChange: (e) => setDraft({ ...draft, locked: e.target.checked })
70985
70985
  }
70986
70986
  ),
70987
70987
  others.length > 0 && /* @__PURE__ */ jsxs199("fieldset", { className: "flex flex-col gap-1.5", children: [
70988
- /* @__PURE__ */ jsx322("legend", { className: classNames130("mb-1 text-xs font-semibold", surface.muted), children: text("acceptsFrom") }),
70988
+ /* @__PURE__ */ jsx322("legend", { className: classNames130("mb-1 text-xs font-semibold", surface.muted), children: text2("acceptsFrom") }),
70989
70989
  others.map((c) => /* @__PURE__ */ jsx322(
70990
70990
  Checkbox_default,
70991
70991
  {
@@ -70999,11 +70999,11 @@ var TaskBoardColumnEditButton = ({ column }) => {
70999
70999
  },
71000
71000
  c.id
71001
71001
  )),
71002
- /* @__PURE__ */ jsx322("span", { className: classNames130("text-[11px]", surface.muted), children: text("acceptsAny") })
71002
+ /* @__PURE__ */ jsx322("span", { className: classNames130("text-[11px]", surface.muted), children: text2("acceptsAny") })
71003
71003
  ] }),
71004
71004
  /* @__PURE__ */ jsxs199("div", { className: "flex justify-end gap-2 pt-1", children: [
71005
- /* @__PURE__ */ jsx322(Button_default, { type: "button", size: "sm", variant: "soft", color: "slate", onClick: () => setOpen(false), children: text("cancel") }),
71006
- /* @__PURE__ */ jsx322(Button_default, { type: "submit", size: "sm", color, disabled: !valid, children: text("save") })
71005
+ /* @__PURE__ */ jsx322(Button_default, { type: "button", size: "sm", variant: "soft", color: "slate", onClick: () => setOpen(false), children: text2("cancel") }),
71006
+ /* @__PURE__ */ jsx322(Button_default, { type: "submit", size: "sm", color, disabled: !valid, children: text2("save") })
71007
71007
  ] })
71008
71008
  ]
71009
71009
  }
@@ -71025,7 +71025,7 @@ var TaskBoardColumn = ({
71025
71025
  index = 0,
71026
71026
  onToggle
71027
71027
  }) => {
71028
- const { surface, text, color, size, wellSurface, columnCornerClass, onAddCard, draggingColumnId, boardMaxItems, dropTarget } = useTaskBoard();
71028
+ const { surface, text: text2, color, size, wellSurface, columnCornerClass, onAddCard, draggingColumnId, boardMaxItems, dropTarget } = useTaskBoard();
71029
71029
  const refused = Boolean(dropTarget && !dropTarget.valid && dropTarget.bucket === bucketKey(column.id, null));
71030
71030
  const max = effectiveMaxItems(column, boardMaxItems);
71031
71031
  const full = max !== void 0 && count >= max;
@@ -71042,7 +71042,7 @@ var TaskBoardColumn = ({
71042
71042
  type: "button",
71043
71043
  onClick: onToggle,
71044
71044
  "aria-expanded": !column.collapsed,
71045
- "aria-label": text(column.collapsed ? "expand" : "collapse", {
71045
+ "aria-label": text2(column.collapsed ? "expand" : "collapse", {
71046
71046
  name: column.title
71047
71047
  }),
71048
71048
  className: classNames131(
@@ -71066,7 +71066,7 @@ var TaskBoardColumn = ({
71066
71066
  "span",
71067
71067
  {
71068
71068
  "data-column-count": true,
71069
- title: column.wipLimit !== void 0 ? text("wip", { count, limit: column.wipLimit }) : void 0,
71069
+ title: column.wipLimit !== void 0 ? text2("wip", { count, limit: column.wipLimit }) : void 0,
71070
71070
  className: classNames131(
71071
71071
  "text-xs font-semibold tabular-nums",
71072
71072
  wip === "full" || wip === "over" || full ? tokens.wipFull : surface.muted
@@ -71169,7 +71169,7 @@ var TaskBoardColumn = ({
71169
71169
  column: column.id,
71170
71170
  lane: null,
71171
71171
  cards,
71172
- label: `${column.title}, ${text("cardCount", { count: cards.length })}`
71172
+ label: `${column.title}, ${text2("cardCount", { count: cards.length })}`
71173
71173
  }
71174
71174
  )
71175
71175
  }
@@ -71187,7 +71187,7 @@ var TaskBoardColumn = ({
71187
71187
  ),
71188
71188
  children: [
71189
71189
  /* @__PURE__ */ jsx323(Add, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
71190
- text("addCard")
71190
+ text2("addCard")
71191
71191
  ]
71192
71192
  }
71193
71193
  )
@@ -71213,7 +71213,7 @@ var TaskBoardHeader = ({
71213
71213
  people,
71214
71214
  variant
71215
71215
  }) => {
71216
- const { surface, text } = useTaskBoard();
71216
+ const { surface, text: text2 } = useTaskBoard();
71217
71217
  const shown = people?.slice(0, MAX_AVATARS) ?? [];
71218
71218
  const extra = (people?.length ?? 0) - shown.length;
71219
71219
  return /* @__PURE__ */ jsxs201(
@@ -71243,7 +71243,7 @@ var TaskBoardHeader = ({
71243
71243
  {
71244
71244
  "data-taskboard-people": true,
71245
71245
  role: "group",
71246
- "aria-label": text("online", { count: people.length }),
71246
+ "aria-label": text2("online", { count: people.length }),
71247
71247
  className: "flex items-center -space-x-2",
71248
71248
  children: [
71249
71249
  shown.map((p) => /* @__PURE__ */ jsx324(
@@ -71281,7 +71281,7 @@ var TaskBoardLaneGrid = ({
71281
71281
  onToggleColumn,
71282
71282
  onAddColumn
71283
71283
  }) => {
71284
- const { surface, text, color, size, stickySurface, draggingColumnId, boardMaxItems } = useTaskBoard();
71284
+ const { surface, text: text2, color, size, stickySurface, draggingColumnId, boardMaxItems } = useTaskBoard();
71285
71285
  const fullColumns = new Set(columns.filter((c) => columnAtMax(cards, c, boardMaxItems)).map((c) => c.id));
71286
71286
  const trigger = getSurfaceTriggerTokens(color);
71287
71287
  const template = [
@@ -71296,7 +71296,7 @@ var TaskBoardLaneGrid = ({
71296
71296
  type: "button",
71297
71297
  onClick,
71298
71298
  "aria-expanded": !collapsed,
71299
- "aria-label": text(collapsed ? "expand" : "collapse", { name }),
71299
+ "aria-label": text2(collapsed ? "expand" : "collapse", { name }),
71300
71300
  className: classNames133("rounded p-1", surface.muted, trigger.hover, trigger.focusRing),
71301
71301
  children: /* @__PURE__ */ jsx325(
71302
71302
  ChevronRight,
@@ -71382,7 +71382,7 @@ var TaskBoardLaneRow = ({
71382
71382
  trailingCell,
71383
71383
  fullColumns
71384
71384
  }) => {
71385
- const { surface, text, color, stickySurface, onAddCard, dropTarget } = useTaskBoard();
71385
+ const { surface, text: text2, color, stickySurface, onAddCard, dropTarget } = useTaskBoard();
71386
71386
  const refusedBucket = dropTarget && !dropTarget.valid ? dropTarget.bucket : null;
71387
71387
  const trigger = getSurfaceTriggerTokens(color);
71388
71388
  const open = !lane.collapsed;
@@ -71433,7 +71433,7 @@ var TaskBoardLaneRow = ({
71433
71433
  {
71434
71434
  type: "button",
71435
71435
  onClick: () => onAddCard({ column: col.id, lane: lane.id }),
71436
- "aria-label": `${text("addCard")} \u2014 ${col.title}, ${lane.title}`,
71436
+ "aria-label": `${text2("addCard")} \u2014 ${col.title}, ${lane.title}`,
71437
71437
  className: classNames133(
71438
71438
  "flex items-center justify-center rounded-md py-1 opacity-60 hover:opacity-100 focus-visible:opacity-100",
71439
71439
  surface.muted,
@@ -71788,7 +71788,7 @@ function useTaskBoardDrag(opts) {
71788
71788
  import { useCallback as useCallback47, useLayoutEffect as useLayoutEffect24, useMemo as useMemo63, useRef as useRef73, useState as useState89 } from "react";
71789
71789
  var isRtl = (el) => el?.closest("[dir]")?.getAttribute("dir") === "rtl";
71790
71790
  function useTaskBoardKeyboard(o) {
71791
- const { rootRef, cards, viewCards, columns, lanes, text, drag } = o;
71791
+ const { rootRef, cards, viewCards, columns, lanes, text: text2, drag } = o;
71792
71792
  const [message, setMessage] = useState89("");
71793
71793
  const [activeId, setActiveId] = useState89(null);
71794
71794
  const [ownSelection, setOwnSelection] = useState89([]);
@@ -71815,9 +71815,9 @@ function useTaskBoardKeyboard(o) {
71815
71815
  const total = (others.get(bucketKey(to.column, to.lane))?.length ?? 0) + 1;
71816
71816
  const values = { column: columnTitle(to.column), index: to.index + 1, total };
71817
71817
  const lane = to.lane ? lanes?.find((l) => l.id === to.lane)?.title : void 0;
71818
- announce(lane ? text("movedLane", { ...values, lane }) : text("moved", values));
71818
+ announce(lane ? text2("movedLane", { ...values, lane }) : text2("moved", values));
71819
71819
  },
71820
- [announce, cards, columns, lanes, columnTitle, text]
71820
+ [announce, cards, columns, lanes, columnTitle, text2]
71821
71821
  );
71822
71822
  const setSelection = useCallback47(
71823
71823
  (ids) => {
@@ -71917,20 +71917,20 @@ function useTaskBoardKeyboard(o) {
71917
71917
  e.preventDefault();
71918
71918
  const target = drag.to ?? drag.from;
71919
71919
  refocusRef.current = card.id;
71920
- announce(text("dropped", { title: card.title, column: columnTitle(target.column) }));
71920
+ announce(text2("dropped", { title: card.title, column: columnTitle(target.column) }));
71921
71921
  void o.finish().then((ok) => {
71922
71922
  if (!ok && (target.column !== drag.from.column || target.lane !== drag.from.lane || target.index !== drag.from.index)) {
71923
- announce(text("cancelled"));
71923
+ announce(text2("cancelled"));
71924
71924
  }
71925
71925
  });
71926
71926
  } else if (e.key === "Escape") {
71927
71927
  e.preventDefault();
71928
71928
  refocusRef.current = card.id;
71929
71929
  o.cancel("escape");
71930
- announce(text("cancelled"));
71930
+ announce(text2("cancelled"));
71931
71931
  } else if (e.key === "Tab") {
71932
71932
  o.cancel("blur");
71933
- announce(text("cancelled"));
71933
+ announce(text2("cancelled"));
71934
71934
  } else if (e.key === "Enter") {
71935
71935
  e.preventDefault();
71936
71936
  }
@@ -71940,7 +71940,7 @@ function useTaskBoardKeyboard(o) {
71940
71940
  e.preventDefault();
71941
71941
  if (o.keyboardGrab(card, slot)) {
71942
71942
  refocusRef.current = card.id;
71943
- announce(text("grabbed", { title: card.title }));
71943
+ announce(text2("grabbed", { title: card.title }));
71944
71944
  }
71945
71945
  return;
71946
71946
  }
@@ -71966,7 +71966,7 @@ function useTaskBoardKeyboard(o) {
71966
71966
  }
71967
71967
  }
71968
71968
  }),
71969
- [tabStop, selection, setSelection, viewBuckets, drag, cards, columns, lanes, o, announceSlot, announce, text, columnTitle, focusStep]
71969
+ [tabStop, selection, setSelection, viewBuckets, drag, cards, columns, lanes, o, announceSlot, announce, text2, columnTitle, focusStep]
71970
71970
  );
71971
71971
  return { cardProps, message, selection, announce };
71972
71972
  }
@@ -72477,7 +72477,7 @@ var TaskBoardBody = (props) => {
72477
72477
  surfaceVariant
72478
72478
  } = props;
72479
72479
  const surface = useSurfaceText();
72480
- const text = useTaskBoardText(labels);
72480
+ const text2 = useTaskBoardText(labels);
72481
72481
  const { locale } = useKitEngine();
72482
72482
  const sizeTokens12 = TASKBOARD_SIZES[size] ?? TASKBOARD_SIZES.md;
72483
72483
  const wellSurface = surface.translucent ? GLASS_WELL : SOLID_WELL;
@@ -72510,8 +72510,8 @@ var TaskBoardBody = (props) => {
72510
72510
  if (!holder || holder === selfId) return;
72511
72511
  const peer = collab.userById(holder);
72512
72512
  cancel("held");
72513
- setNotice({ cardId: drag.cardId, text: text("heldShort", { name: peer.name }), color: peer.color ?? peerColor(peer.id) });
72514
- }, [collab, drag, selfId, cancel, text]);
72513
+ setNotice({ cardId: drag.cardId, text: text2("heldShort", { name: peer.name }), color: peer.color ?? peerColor(peer.id) });
72514
+ }, [collab, drag, selfId, cancel, text2]);
72515
72515
  useEffect78(() => {
72516
72516
  if (!notice) return;
72517
72517
  const t = setTimeout(() => setNotice(null), NOTICE_MS);
@@ -72523,7 +72523,7 @@ var TaskBoardBody = (props) => {
72523
72523
  viewCards: previewCards,
72524
72524
  columns,
72525
72525
  lanes: viewLanes,
72526
- text,
72526
+ text: text2,
72527
72527
  drag,
72528
72528
  keyboardGrab,
72529
72529
  keyboardMove,
@@ -72542,7 +72542,7 @@ var TaskBoardBody = (props) => {
72542
72542
  rootRef,
72543
72543
  columns,
72544
72544
  enabled: columnEditing,
72545
- text,
72545
+ text: text2,
72546
72546
  announce: keyboard.announce,
72547
72547
  onCommit: (next) => onColumnsChange?.(next)
72548
72548
  });
@@ -72563,7 +72563,7 @@ var TaskBoardBody = (props) => {
72563
72563
  );
72564
72564
  const ctx = useMemo66(
72565
72565
  () => ({
72566
- text,
72566
+ text: text2,
72567
72567
  surface,
72568
72568
  color,
72569
72569
  size: sizeTokens12,
@@ -72596,7 +72596,7 @@ var TaskBoardBody = (props) => {
72596
72596
  cardProps: (card, slot) => ({ ...isEditable ? cardHandlers(card, slot) : {}, ...keyboardProps(card, slot) }),
72597
72597
  dropTarget: drag?.to && !drag.valid ? { bucket: bucketKey(drag.to.column, drag.to.lane), index: drag.to.index, valid: false } : null
72598
72598
  }),
72599
- [text, surface, color, sizeTokens12, cardLayout, priorities, locale, isEditable, renderCard, onCardOpen, onCardContextMenu, onAddCard, wellSurface, columnCornerClass, columnEditing, columnDrag.gripProps, columnDrag.drag, editColumn, columns, maxItems, selected, drag, pending, cardHandlers, keyboardProps, heldPeer, notice]
72599
+ [text2, surface, color, sizeTokens12, cardLayout, priorities, locale, isEditable, renderCard, onCardOpen, onCardContextMenu, onAddCard, wellSurface, columnCornerClass, columnEditing, columnDrag.gripProps, columnDrag.drag, editColumn, columns, maxItems, selected, drag, pending, cardHandlers, keyboardProps, heldPeer, notice]
72600
72600
  );
72601
72601
  const buckets = useMemo66(() => bucketCards(previewCards, columns, viewLanes), [previewCards, columns, viewLanes]);
72602
72602
  const draggedCard = drag ? cards.find((c) => c.id === drag.cardId) : void 0;
@@ -72617,12 +72617,12 @@ var TaskBoardBody = (props) => {
72617
72617
  );
72618
72618
  } else if (error) {
72619
72619
  content = /* @__PURE__ */ jsxs205("div", { role: "alert", className: "flex flex-1 flex-col items-center justify-center gap-3 p-10 text-center", children: [
72620
- /* @__PURE__ */ jsx329("p", { className: classNames137("text-sm font-medium", surface.body), children: error === true ? text("error") : error }),
72621
- onRetry && /* @__PURE__ */ jsx329(Button_default, { size: "sm", variant: "outline", color, onClick: onRetry, children: text("retry") })
72620
+ /* @__PURE__ */ jsx329("p", { className: classNames137("text-sm font-medium", surface.body), children: error === true ? text2("error") : error }),
72621
+ onRetry && /* @__PURE__ */ jsx329(Button_default, { size: "sm", variant: "outline", color, onClick: onRetry, children: text2("retry") })
72622
72622
  ] });
72623
72623
  } else {
72624
72624
  content = /* @__PURE__ */ jsxs205("div", { className: "flex min-h-0 flex-1 flex-col", children: [
72625
- cards.length === 0 && /* @__PURE__ */ jsx329("div", { "data-taskboard-empty": true, className: classNames137("px-4 pt-4 text-center text-sm", surface.muted), children: emptyState ?? text("empty") }),
72625
+ cards.length === 0 && /* @__PURE__ */ jsx329("div", { "data-taskboard-empty": true, className: classNames137("px-4 pt-4 text-center text-sm", surface.muted), children: emptyState ?? text2("empty") }),
72626
72626
  laneView ? /* @__PURE__ */ jsx329(
72627
72627
  TaskBoardLaneGrid,
72628
72628
  {
@@ -72669,7 +72669,7 @@ var TaskBoardBody = (props) => {
72669
72669
  role: "application",
72670
72670
  "aria-roledescription": "task board",
72671
72671
  "aria-busy": loading ? true : void 0,
72672
- "aria-label": text("root"),
72672
+ "aria-label": text2("root"),
72673
72673
  className: "flex h-full min-h-0 flex-col",
72674
72674
  children: [
72675
72675
  /* @__PURE__ */ jsx329("div", { "data-taskboard-live": true, "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: keyboard.message }),
@@ -73455,19 +73455,372 @@ function hasZone(node) {
73455
73455
  return node != null && node !== false;
73456
73456
  }
73457
73457
 
73458
+ // src/components/Menu/Menu.tsx
73459
+ import React106, { cloneElement as cloneElement4, useCallback as useCallback53, useEffect as useEffect81, useId as useId47, useLayoutEffect as useLayoutEffect29, useRef as useRef81, useState as useState97 } from "react";
73460
+ import { Link as Link3 } from "react-router-dom";
73461
+ import classNames142 from "classnames";
73462
+
73463
+ // src/components/Menu/MenuPopup.tsx
73464
+ import { useLayoutEffect as useLayoutEffect28, useRef as useRef80, useState as useState96 } from "react";
73465
+ import { createPortal as createPortal19 } from "react-dom";
73466
+ import { jsx as jsx335 } from "react/jsx-runtime";
73467
+ function MenuPopup({ anchor, placement, width, children }) {
73468
+ const ref = useRef80(null);
73469
+ const [style, setStyle] = useState96({ visibility: "hidden" });
73470
+ useLayoutEffect28(() => {
73471
+ const update = () => {
73472
+ if (!anchor.current || !ref.current) return;
73473
+ const trigger = anchor.current.getBoundingClientRect();
73474
+ const rect = ref.current.getBoundingClientRect();
73475
+ const position = resolveTooltipPlacement({
73476
+ trigger: { left: trigger.left, top: trigger.top, width: trigger.width, height: trigger.height },
73477
+ tooltip: { width: rect.width, height: rect.height },
73478
+ viewport: { width: window.innerWidth, height: window.innerHeight },
73479
+ preferred: placement,
73480
+ align: "grow",
73481
+ offset: 4
73482
+ });
73483
+ setStyle({ left: position.left, top: position.top, zIndex: resolveOverlayZIndex(anchor.current), visibility: "visible" });
73484
+ };
73485
+ update();
73486
+ const observer = typeof ResizeObserver !== "undefined" ? new ResizeObserver(update) : null;
73487
+ if (ref.current) observer?.observe(ref.current);
73488
+ if (anchor.current) observer?.observe(anchor.current);
73489
+ window.addEventListener("resize", update);
73490
+ window.addEventListener("scroll", update, true);
73491
+ return () => {
73492
+ observer?.disconnect();
73493
+ window.removeEventListener("resize", update);
73494
+ window.removeEventListener("scroll", update, true);
73495
+ };
73496
+ }, [anchor, placement, width]);
73497
+ if (typeof document === "undefined") return null;
73498
+ return createPortal19(/* @__PURE__ */ jsx335("div", { ref, style: { position: "fixed", width, maxWidth: "calc(100vw - 16px)", ...style }, children }), document.body);
73499
+ }
73500
+
73501
+ // src/components/Menu/Menu.tsx
73502
+ import { Fragment as Fragment54, jsx as jsx336, jsxs as jsxs209 } from "react/jsx-runtime";
73503
+ var rowSizes = { xs: "px-2 py-1 text-xs", sm: "px-2.5 py-1.5 text-xs", md: "px-3 py-2 text-sm", lg: "px-4 py-2.5 text-base", xl: "px-5 py-3 text-lg" };
73504
+ var text = (item) => item.textValue ?? (typeof item.label === "string" ? item.label : item.id);
73505
+ function MenuList({ items, state, depth = 0, parentLabel, onBack, focusOnMount = false, grouped = false }) {
73506
+ const list = useRef81(null);
73507
+ const buffer = useRef81("");
73508
+ const timer = useRef81(void 0);
73509
+ const actions = () => Array.from(list.current?.querySelectorAll("[data-menu-action]") ?? []).filter((el) => el.closest('[role="menu"]') === list.current && el.getAttribute("aria-disabled") !== "true");
73510
+ useLayoutEffect29(() => {
73511
+ if (grouped) return;
73512
+ const entries = actions();
73513
+ const selected = entries.find((el) => el === document.activeElement) ?? entries[0];
73514
+ entries.forEach((el) => {
73515
+ el.tabIndex = el === selected ? 0 : -1;
73516
+ });
73517
+ }, [items, grouped]);
73518
+ useLayoutEffect29(() => {
73519
+ if (!focusOnMount) return;
73520
+ const frame = requestAnimationFrame(() => actions()[0]?.focus());
73521
+ return () => cancelAnimationFrame(frame);
73522
+ }, [focusOnMount]);
73523
+ useEffect81(() => () => clearTimeout(timer.current), []);
73524
+ return /* @__PURE__ */ jsx336(
73525
+ "ul",
73526
+ {
73527
+ ref: list,
73528
+ id: depth === 0 && !grouped ? `${state.owner}-menu` : void 0,
73529
+ role: grouped ? "group" : "menu",
73530
+ "aria-label": parentLabel ?? state.props["aria-label"] ?? "Menu",
73531
+ className: "m-0 list-none space-y-0.5 p-0",
73532
+ onFocusCapture: (event) => {
73533
+ const entries = actions();
73534
+ entries.forEach((el) => {
73535
+ el.tabIndex = el === event.target ? 0 : -1;
73536
+ });
73537
+ },
73538
+ onKeyDown: (event) => {
73539
+ if (event.target.closest('[role="menu"]') !== list.current) return;
73540
+ const entries = actions();
73541
+ const index = entries.indexOf(document.activeElement);
73542
+ let next;
73543
+ if (event.key === "ArrowDown") next = (index + 1) % entries.length;
73544
+ if (event.key === "ArrowUp") next = (index - 1 + entries.length) % entries.length;
73545
+ if (event.key === "Home") next = 0;
73546
+ if (event.key === "End") next = entries.length - 1;
73547
+ if (next !== void 0) {
73548
+ event.preventDefault();
73549
+ event.stopPropagation();
73550
+ entries[next]?.focus();
73551
+ return;
73552
+ }
73553
+ if (event.key === "Escape" || event.key === "ArrowLeft") {
73554
+ if (onBack) {
73555
+ event.preventDefault();
73556
+ event.stopPropagation();
73557
+ onBack();
73558
+ } else if (event.key === "Escape") {
73559
+ event.preventDefault();
73560
+ state.close(true);
73561
+ }
73562
+ return;
73563
+ }
73564
+ if (event.key === "Tab") {
73565
+ state.close(false);
73566
+ return;
73567
+ }
73568
+ if (event.key.length === 1 && event.key !== " " && !event.ctrlKey && !event.metaKey && !event.altKey) {
73569
+ clearTimeout(timer.current);
73570
+ buffer.current += event.key.toLocaleLowerCase();
73571
+ const ordered = [...entries.slice(index + 1), ...entries.slice(0, index + 1)];
73572
+ ordered.find((el) => el.dataset.menuText?.toLocaleLowerCase().startsWith(buffer.current))?.focus();
73573
+ timer.current = setTimeout(() => {
73574
+ buffer.current = "";
73575
+ }, 600);
73576
+ }
73577
+ },
73578
+ children: items.filter((item) => !item.hidden).map((item) => /* @__PURE__ */ jsx336(MenuRow, { item, state, depth }, item.id))
73579
+ }
73580
+ );
73581
+ }
73582
+ function MenuRow({ item, state, depth }) {
73583
+ const anchor = useRef81(null);
73584
+ const { props } = state;
73585
+ const tiered = (item.submenuMode ?? props.submenuMode) === "tiered";
73586
+ const nested = Boolean(item.items?.some((child) => !child.hidden) || item.content != null);
73587
+ const expanded = tiered ? state.path[depth] === item.id : state.expanded.includes(item.id);
73588
+ const label = text(item);
73589
+ const id = useId47();
73590
+ const open = (keyboard) => {
73591
+ if (item.disabled || !nested) return;
73592
+ state.keyboard.current = keyboard;
73593
+ if (tiered) state.setPath([...state.path.slice(0, depth), item.id]);
73594
+ else if (!expanded) state.toggle(item.id);
73595
+ else if (keyboard) document.getElementById(`${id}-submenu`)?.querySelector("[data-menu-action]:not([aria-disabled='true'])")?.focus();
73596
+ };
73597
+ const back = () => {
73598
+ if (tiered) state.setPath(state.path.slice(0, depth));
73599
+ else state.toggle(item.id);
73600
+ anchor.current?.focus();
73601
+ };
73602
+ if (item.type === "separator") return /* @__PURE__ */ jsx336("li", { role: "separator", className: "my-1.5 border-t border-neutral-200 dark:border-white/10" });
73603
+ if (item.type === "group") return /* @__PURE__ */ jsxs209("li", { role: "presentation", children: [
73604
+ item.label && /* @__PURE__ */ jsx336("div", { className: "px-3 pb-1 pt-3 text-xs font-semibold text-neutral-500 dark:text-neutral-400", children: item.label }),
73605
+ item.items && /* @__PURE__ */ jsx336(MenuList, { items: item.disabled ? item.items.map((child) => ({ ...child, disabled: true })) : item.items, state, depth, parentLabel: label, grouped: true })
73606
+ ] });
73607
+ const itemTone2 = item.tone ?? props.itemTone ?? props.tone ?? "neutral";
73608
+ const itemPadding = item.padding ?? props.itemPadding;
73609
+ const tokens = getSideMenuItemTokens(itemTone2);
73610
+ const checkable = item.type === "checkbox" || item.type === "radio";
73611
+ const activate = (event) => {
73612
+ if (item.disabled) {
73613
+ event.preventDefault();
73614
+ return;
73615
+ }
73616
+ if (nested) {
73617
+ event.preventDefault();
73618
+ if (expanded) back();
73619
+ else open(true);
73620
+ return;
73621
+ }
73622
+ if (checkable) item.onCheckedChange?.(item.type === "radio" ? true : !item.checked);
73623
+ item.command?.(item);
73624
+ props.onSelect?.(item);
73625
+ if (item.closeOnSelect ?? !checkable) state.close(true);
73626
+ };
73627
+ const content = props.renderItem?.(item, { expanded, checked: Boolean(item.checked) }) ?? /* @__PURE__ */ jsxs209(Fragment54, { children: [
73628
+ /* @__PURE__ */ jsx336("span", { "aria-hidden": "true", className: "inline-flex h-5 w-5 shrink-0 items-center justify-center", children: checkable ? item.checked && (item.type === "radio" ? /* @__PURE__ */ jsx336("span", { className: "h-1.5 w-1.5 rounded-full bg-current" }) : /* @__PURE__ */ jsx336(CustomIcon_default, { icon: "Check", size: "sm" })) : React106.isValidElement(item.icon) ? item.icon : typeof item.icon === "string" ? /* @__PURE__ */ jsx336(CustomIcon_default, { icon: item.icon, size: "sm" }) : null }),
73629
+ /* @__PURE__ */ jsxs209("span", { className: "min-w-0 flex-1", children: [
73630
+ /* @__PURE__ */ jsx336("span", { className: "block truncate", children: item.label }),
73631
+ item.description && /* @__PURE__ */ jsx336("span", { className: "block text-xs font-normal opacity-70", children: item.description })
73632
+ ] }),
73633
+ item.badge != null && /* @__PURE__ */ jsx336("span", { className: "shrink-0 text-xs", children: item.badge }),
73634
+ item.shortcut != null && /* @__PURE__ */ jsx336("span", { className: "shrink-0 text-xs opacity-60", children: item.shortcut }),
73635
+ item.trailing,
73636
+ nested && /* @__PURE__ */ jsx336(CollapseChevron, { "aria-hidden": "true", className: classNames142("h-3 w-3 shrink-0", !tiered && (expanded ? "-rotate-90" : "rotate-90")) })
73637
+ ] });
73638
+ const rowProps = {
73639
+ id,
73640
+ role: checkable ? item.type === "radio" ? "menuitemradio" : "menuitemcheckbox" : "menuitem",
73641
+ "aria-label": label,
73642
+ "aria-disabled": item.disabled || void 0,
73643
+ "aria-checked": checkable ? Boolean(item.checked) : void 0,
73644
+ "aria-expanded": nested ? expanded : void 0,
73645
+ "aria-haspopup": nested && tiered ? "menu" : void 0,
73646
+ "aria-controls": nested && expanded ? `${id}-submenu` : void 0,
73647
+ "data-menu-action": "",
73648
+ "data-menu-text": label,
73649
+ tabIndex: -1,
73650
+ className: classNames142(
73651
+ "flex w-full items-center gap-2 text-left font-medium outline-none transition-colors",
73652
+ itemPadding === void 0 ? rowSizes[props.size ?? "md"] : [rowSizes[props.size ?? "md"].split(" ").filter((token) => token.startsWith("text-")), getSurfacePaddingClass(itemPadding)],
73653
+ getSurfaceCornerClass(item.corner ?? props.itemCorner ?? "rounded-sm"),
73654
+ getSurfaceTriggerTokens(itemTone2).focusRing,
73655
+ item.disabled ? "cursor-not-allowed opacity-40" : item.danger ? "text-rose-700 hover:bg-rose-50 dark:text-rose-300 dark:hover:bg-rose-500/10" : [tokens.hoverBg, tokens.hoverText],
73656
+ expanded && !item.disabled && tokens.bg
73657
+ ),
73658
+ onClick: activate,
73659
+ onKeyDown: (event) => {
73660
+ if (event.key === "ArrowRight" && nested) {
73661
+ event.preventDefault();
73662
+ event.stopPropagation();
73663
+ open(true);
73664
+ }
73665
+ if (event.key === " " && (item.href || item.to)) {
73666
+ event.preventDefault();
73667
+ event.currentTarget.click();
73668
+ }
73669
+ },
73670
+ onMouseEnter: () => {
73671
+ state.cancelLeave();
73672
+ if (tiered && !item.disabled) {
73673
+ if (nested) open(false);
73674
+ else state.setPath(state.path.slice(0, depth));
73675
+ }
73676
+ }
73677
+ };
73678
+ const row = item.to && !nested ? /* @__PURE__ */ jsx336(Link3, { ...rowProps, ref: (el) => {
73679
+ anchor.current = el;
73680
+ }, to: item.to, children: content }) : item.href && !nested ? /* @__PURE__ */ jsx336("a", { ...rowProps, ref: (el) => {
73681
+ anchor.current = el;
73682
+ }, href: item.href, target: item.target, rel: item.target === "_blank" ? "noopener noreferrer" : void 0, children: content }) : /* @__PURE__ */ jsx336("button", { ...rowProps, type: "button", ref: (el) => {
73683
+ anchor.current = el;
73684
+ }, children: content });
73685
+ const submenu = /* @__PURE__ */ jsxs209("div", { id: `${id}-submenu`, children: [
73686
+ item.items && /* @__PURE__ */ jsx336(MenuList, { items: item.items, state, depth: depth + 1, parentLabel: label, onBack: back, focusOnMount: state.keyboard.current }),
73687
+ item.content
73688
+ ] });
73689
+ return /* @__PURE__ */ jsxs209("li", { role: "presentation", children: [
73690
+ row,
73691
+ nested && expanded && (tiered ? /* @__PURE__ */ jsx336(MenuPopup, { anchor, placement: "right", width: props.width ?? 256, children: /* @__PURE__ */ jsx336(MenuSurface, { state, children: submenu }) }) : /* @__PURE__ */ jsx336("div", { className: "ml-4 border-l border-neutral-200 pl-1 dark:border-white/10", children: submenu }))
73692
+ ] });
73693
+ }
73694
+ function MenuSurface({ state, children, root = false }) {
73695
+ const { props } = state;
73696
+ return /* @__PURE__ */ jsx336("div", { "data-menu-owner": state.owner, onMouseEnter: state.cancelLeave, onMouseLeave: state.scheduleLeave, children: /* @__PURE__ */ jsxs209(
73697
+ Panel_default,
73698
+ {
73699
+ variant: props.variant ?? "outlined",
73700
+ tone: props.tone ?? "neutral",
73701
+ corner: props.corner,
73702
+ padding: props.padding ?? "xs",
73703
+ glassOpacity: props.glassOpacity,
73704
+ vibrancy: props.vibrancy,
73705
+ specularMode: props.specularMode,
73706
+ className: classNames142(
73707
+ root ? props.className : void 0,
73708
+ (!root || props.popup || props.trigger || props.anchorRef) && "backdrop-blur-xl"
73709
+ ),
73710
+ children: [
73711
+ root && props.header && /* @__PURE__ */ jsx336("div", { className: "mb-2 border-b border-neutral-200 pb-2 dark:border-white/10", children: props.header }),
73712
+ /* @__PURE__ */ jsx336("div", { className: classNames142("overflow-auto", THIN_SCROLLBAR), style: { maxHeight: `min(${props.maxHeight ?? 400}px, calc(100dvh - 32px))` }, children }),
73713
+ root && props.footer && /* @__PURE__ */ jsx336("div", { className: "mt-2 border-t border-neutral-200 pt-2 dark:border-white/10", children: props.footer })
73714
+ ]
73715
+ }
73716
+ ) });
73717
+ }
73718
+ function Menu(props) {
73719
+ const owner = useId47();
73720
+ const triggerRef = useRef81(null);
73721
+ const anchor = props.anchorRef ?? triggerRef;
73722
+ const popup = props.popup ?? Boolean(props.trigger || props.anchorRef);
73723
+ const [internalOpen, setInternalOpen] = useState97(props.defaultOpen ?? false);
73724
+ const open = props.open ?? internalOpen;
73725
+ const [expanded, setExpanded] = useState97(props.defaultExpandedKeys ?? []);
73726
+ const [path, setPath] = useState97([]);
73727
+ const keyboard = useRef81(false);
73728
+ const leave = useRef81(void 0);
73729
+ const cancelLeave = useCallback53(() => clearTimeout(leave.current), []);
73730
+ const requestOpen = useCallback53((value) => {
73731
+ if (props.open === void 0) setInternalOpen(value);
73732
+ props.onOpenChange?.(value);
73733
+ if (!value) setPath([]);
73734
+ }, [props.open, props.onOpenChange]);
73735
+ const close = (restore = false) => {
73736
+ setPath([]);
73737
+ if (popup) requestOpen(false);
73738
+ if (restore) {
73739
+ if (anchor.current) anchor.current.focus();
73740
+ else {
73741
+ const root = Array.from(document.querySelectorAll("[data-menu-owner]")).find((el) => el.dataset.menuOwner === owner);
73742
+ root?.querySelector("[data-menu-action]:not([aria-disabled='true'])")?.focus();
73743
+ }
73744
+ }
73745
+ };
73746
+ useEffect81(() => {
73747
+ if (popup ? !open : path.length === 0) return;
73748
+ const outside = (event) => {
73749
+ const target = event.target;
73750
+ if (anchor.current?.contains(target)) return;
73751
+ const owned = Array.from(document.querySelectorAll("[data-menu-owner]")).some((el) => el.dataset.menuOwner === owner && el.contains(target));
73752
+ if (!owned) requestOpen(false);
73753
+ };
73754
+ document.addEventListener("pointerdown", outside);
73755
+ return () => document.removeEventListener("pointerdown", outside);
73756
+ }, [popup, open, path.length, anchor, owner, requestOpen]);
73757
+ useEffect81(() => () => clearTimeout(leave.current), []);
73758
+ const state = {
73759
+ owner,
73760
+ props,
73761
+ expanded: props.expandedKeys ?? expanded,
73762
+ path,
73763
+ setPath,
73764
+ close,
73765
+ keyboard,
73766
+ cancelLeave,
73767
+ scheduleLeave: () => {
73768
+ cancelLeave();
73769
+ if (path.length && !keyboard.current) leave.current = setTimeout(() => setPath([]), 250);
73770
+ },
73771
+ toggle: (id) => {
73772
+ const current = props.expandedKeys ?? expanded;
73773
+ const next = current.includes(id) ? current.filter((key) => key !== id) : [...current, id];
73774
+ if (props.expandedKeys === void 0) setExpanded(next);
73775
+ props.onExpandedKeysChange?.(next);
73776
+ }
73777
+ };
73778
+ const surface = /* @__PURE__ */ jsx336(MenuSurface, { state, root: true, children: /* @__PURE__ */ jsx336(MenuList, { items: props.items, state, focusOnMount: popup && open }) });
73779
+ let trigger = null;
73780
+ if (props.trigger) {
73781
+ const original = props.trigger.props;
73782
+ const originalRef = Number(React106.version.split(".")[0]) >= 19 ? original.ref : props.trigger.ref;
73783
+ trigger = cloneElement4(props.trigger, {
73784
+ ref: (el) => {
73785
+ triggerRef.current = el;
73786
+ if (typeof originalRef === "function") originalRef(el);
73787
+ else if (originalRef) originalRef.current = el;
73788
+ },
73789
+ "aria-haspopup": "menu",
73790
+ "aria-expanded": open,
73791
+ "aria-controls": open ? `${owner}-menu` : void 0,
73792
+ onClick: (event) => {
73793
+ original.onClick?.(event);
73794
+ if (!event.defaultPrevented) requestOpen(!open);
73795
+ },
73796
+ onKeyDown: (event) => {
73797
+ original.onKeyDown?.(event);
73798
+ if (!event.defaultPrevented && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
73799
+ event.preventDefault();
73800
+ requestOpen(true);
73801
+ }
73802
+ }
73803
+ });
73804
+ }
73805
+ return /* @__PURE__ */ jsxs209(Fragment54, { children: [
73806
+ trigger,
73807
+ popup ? open && /* @__PURE__ */ jsx336(MenuPopup, { anchor, placement: props.placement ?? "bottom", width: props.width ?? 256, children: surface }) : /* @__PURE__ */ jsx336("div", { style: { width: props.width ?? 256, maxWidth: "100%" }, children: surface })
73808
+ ] });
73809
+ }
73810
+
73458
73811
  // src/contexts/BottomSheetContext.tsx
73459
73812
  import {
73460
73813
  createContext as createContext9,
73461
- useCallback as useCallback53,
73814
+ useCallback as useCallback54,
73462
73815
  useContext as useContext9,
73463
- useEffect as useEffect81,
73816
+ useEffect as useEffect82,
73464
73817
  useMemo as useMemo69,
73465
- useRef as useRef80,
73466
- useState as useState96
73818
+ useRef as useRef82,
73819
+ useState as useState98
73467
73820
  } from "react";
73468
- import { createPortal as createPortal19 } from "react-dom";
73469
- import classNames142 from "classnames";
73470
- import { jsx as jsx335, jsxs as jsxs209 } from "react/jsx-runtime";
73821
+ import { createPortal as createPortal20 } from "react-dom";
73822
+ import classNames143 from "classnames";
73823
+ import { jsx as jsx337, jsxs as jsxs210 } from "react/jsx-runtime";
73471
73824
  var BottomSheetContext = createContext9(null);
73472
73825
  var TRANSITION_MS2 = 260;
73473
73826
  var renderSlot = (slot, controls) => {
@@ -73479,13 +73832,13 @@ var renderSlot = (slot, controls) => {
73479
73832
  var BottomSheetProvider = ({
73480
73833
  children
73481
73834
  }) => {
73482
- const [sheet, setSheet] = useState96(null);
73483
- const [isVisible, setIsVisible] = useState96(false);
73484
- const pendingCloseRef = useRef80(null);
73485
- const dismissSheet = useCallback53(() => {
73835
+ const [sheet, setSheet] = useState98(null);
73836
+ const [isVisible, setIsVisible] = useState98(false);
73837
+ const pendingCloseRef = useRef82(null);
73838
+ const dismissSheet = useCallback54(() => {
73486
73839
  setIsVisible(false);
73487
73840
  }, []);
73488
- const presentSheet = useCallback53((options) => {
73841
+ const presentSheet = useCallback54((options) => {
73489
73842
  if (pendingCloseRef.current) {
73490
73843
  clearTimeout(pendingCloseRef.current);
73491
73844
  pendingCloseRef.current = null;
@@ -73498,7 +73851,7 @@ var BottomSheetProvider = ({
73498
73851
  setTimeout(animateIn, 0);
73499
73852
  }
73500
73853
  }, []);
73501
- useEffect81(() => {
73854
+ useEffect82(() => {
73502
73855
  if (!isVisible && sheet) {
73503
73856
  pendingCloseRef.current = setTimeout(() => {
73504
73857
  sheet.onClose?.();
@@ -73513,7 +73866,7 @@ var BottomSheetProvider = ({
73513
73866
  }
73514
73867
  return void 0;
73515
73868
  }, [isVisible, sheet]);
73516
- useEffect81(
73869
+ useEffect82(
73517
73870
  () => () => {
73518
73871
  if (pendingCloseRef.current) {
73519
73872
  clearTimeout(pendingCloseRef.current);
@@ -73536,12 +73889,12 @@ var BottomSheetProvider = ({
73536
73889
  }),
73537
73890
  [presentSheet, dismissSheet, sheet, isVisible]
73538
73891
  );
73539
- const overlayNode = typeof document !== "undefined" && sheet ? createPortal19(
73540
- /* @__PURE__ */ jsxs209("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
73541
- /* @__PURE__ */ jsx335(
73892
+ const overlayNode = typeof document !== "undefined" && sheet ? createPortal20(
73893
+ /* @__PURE__ */ jsxs210("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
73894
+ /* @__PURE__ */ jsx337(
73542
73895
  "div",
73543
73896
  {
73544
- className: classNames142(
73897
+ className: classNames143(
73545
73898
  "absolute inset-0 bg-neutral-900/40 transition-opacity duration-300",
73546
73899
  isVisible ? "opacity-100 pointer-events-auto" : "opacity-0"
73547
73900
  ),
@@ -73551,24 +73904,24 @@ var BottomSheetProvider = ({
73551
73904
  }
73552
73905
  }
73553
73906
  ),
73554
- /* @__PURE__ */ jsx335("div", { className: "relative w-full max-w-4xl px-4 pb-4 sm:px-8", children: /* @__PURE__ */ jsxs209(
73907
+ /* @__PURE__ */ jsx337("div", { className: "relative w-full max-w-4xl px-4 pb-4 sm:px-8", children: /* @__PURE__ */ jsxs210(
73555
73908
  "section",
73556
73909
  {
73557
73910
  role: "dialog",
73558
73911
  "aria-modal": "true",
73559
- className: classNames142(
73912
+ className: classNames143(
73560
73913
  "pointer-events-auto ml-auto flex w-full flex-col rounded-t-3xl border border-slate-200 bg-white shadow-2xl transition-transform duration-300 dark:border-slate-700 dark:bg-slate-900",
73561
73914
  sheet.className,
73562
73915
  isVisible ? "translate-y-0" : "translate-y-full"
73563
73916
  ),
73564
73917
  style: { minHeight: "25vh", maxHeight: "85vh" },
73565
73918
  children: [
73566
- /* @__PURE__ */ jsxs209("header", { className: "flex items-start justify-between gap-3 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
73567
- /* @__PURE__ */ jsxs209("div", { className: "space-y-1", children: [
73568
- sheet.title && /* @__PURE__ */ jsx335("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
73569
- sheet.description && /* @__PURE__ */ jsx335("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
73919
+ /* @__PURE__ */ jsxs210("header", { className: "flex items-start justify-between gap-3 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
73920
+ /* @__PURE__ */ jsxs210("div", { className: "space-y-1", children: [
73921
+ sheet.title && /* @__PURE__ */ jsx337("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
73922
+ sheet.description && /* @__PURE__ */ jsx337("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
73570
73923
  ] }),
73571
- (sheet.showCloseButton ?? true) && /* @__PURE__ */ jsx335(
73924
+ (sheet.showCloseButton ?? true) && /* @__PURE__ */ jsx337(
73572
73925
  IconButton_default,
73573
73926
  {
73574
73927
  icon: "Close",
@@ -73580,15 +73933,15 @@ var BottomSheetProvider = ({
73580
73933
  }
73581
73934
  )
73582
73935
  ] }),
73583
- /* @__PURE__ */ jsx335("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: renderSlot(sheet.content, controls) ?? /* @__PURE__ */ jsx335("p", { className: "text-sm text-slate-500", children: "No content provided." }) }),
73584
- sheet.actions && /* @__PURE__ */ jsx335("div", { className: "flex flex-wrap items-center justify-end gap-3 border-t border-slate-200 px-6 py-4 dark:border-slate-800", children: renderSlot(sheet.actions, controls) })
73936
+ /* @__PURE__ */ jsx337("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: renderSlot(sheet.content, controls) ?? /* @__PURE__ */ jsx337("p", { className: "text-sm text-slate-500", children: "No content provided." }) }),
73937
+ sheet.actions && /* @__PURE__ */ jsx337("div", { className: "flex flex-wrap items-center justify-end gap-3 border-t border-slate-200 px-6 py-4 dark:border-slate-800", children: renderSlot(sheet.actions, controls) })
73585
73938
  ]
73586
73939
  }
73587
73940
  ) })
73588
73941
  ] }),
73589
73942
  document.body
73590
73943
  ) : null;
73591
- return /* @__PURE__ */ jsxs209(BottomSheetContext.Provider, { value: contextValue, children: [
73944
+ return /* @__PURE__ */ jsxs210(BottomSheetContext.Provider, { value: contextValue, children: [
73592
73945
  children,
73593
73946
  overlayNode
73594
73947
  ] });
@@ -74228,8 +74581,8 @@ var SYSTEM_VARIABLES = [
74228
74581
  ];
74229
74582
 
74230
74583
  // src/components/MetricBar.tsx
74231
- import classNames143 from "classnames";
74232
- import { jsx as jsx336 } from "react/jsx-runtime";
74584
+ import classNames144 from "classnames";
74585
+ import { jsx as jsx338 } from "react/jsx-runtime";
74233
74586
  var MetricBar = ({
74234
74587
  label,
74235
74588
  value,
@@ -74239,7 +74592,7 @@ var MetricBar = ({
74239
74592
  size = "sm",
74240
74593
  className,
74241
74594
  ...rest
74242
- }) => /* @__PURE__ */ jsx336(
74595
+ }) => /* @__PURE__ */ jsx338(
74243
74596
  Progress_default,
74244
74597
  {
74245
74598
  ...rest,
@@ -74249,13 +74602,13 @@ var MetricBar = ({
74249
74602
  formatValue: value !== void 0 ? () => String(value) : void 0,
74250
74603
  size,
74251
74604
  color: tone ?? color ?? "blue",
74252
- className: classNames143("w-full", className)
74605
+ className: classNames144("w-full", className)
74253
74606
  }
74254
74607
  );
74255
74608
  MetricBar.displayName = "MetricBar";
74256
74609
 
74257
74610
  // src/components/NetworkGraph/NetworkGraph.tsx
74258
- import { useEffect as useEffect83, useId as useId47, useMemo as useMemo70, useRef as useRef82, useState as useState98 } from "react";
74611
+ import { useEffect as useEffect84, useId as useId48, useMemo as useMemo70, useRef as useRef84, useState as useState100 } from "react";
74259
74612
 
74260
74613
  // src/components/NetworkGraph/model.ts
74261
74614
  var CELL = 64;
@@ -74399,17 +74752,17 @@ function findNetworkPath(edges, source, target) {
74399
74752
  }
74400
74753
 
74401
74754
  // src/components/NetworkGraph/useNetworkCanvas.ts
74402
- import { useCallback as useCallback54, useEffect as useEffect82, useRef as useRef81, useState as useState97 } from "react";
74755
+ import { useCallback as useCallback55, useEffect as useEffect83, useRef as useRef83, useState as useState99 } from "react";
74403
74756
  function useNetworkCanvas(options) {
74404
- const canvasRef = useRef81(null);
74405
- const view = useRef81({ x: 0, y: 0, zoom: 1 });
74406
- const size = useRef81({ width: 1, height: 1 });
74407
- const latest = useRef81(options);
74408
- const frame = useRef81(null);
74409
- const [zoom, setZoom] = useState97(1);
74410
- const colors3 = useRef81(/* @__PURE__ */ new Map());
74411
- const textColor = useRef81("#737373");
74412
- const draw = useCallback54(() => {
74757
+ const canvasRef = useRef83(null);
74758
+ const view = useRef83({ x: 0, y: 0, zoom: 1 });
74759
+ const size = useRef83({ width: 1, height: 1 });
74760
+ const latest = useRef83(options);
74761
+ const frame = useRef83(null);
74762
+ const [zoom, setZoom] = useState99(1);
74763
+ const colors3 = useRef83(/* @__PURE__ */ new Map());
74764
+ const textColor = useRef83("#737373");
74765
+ const draw = useCallback55(() => {
74413
74766
  const canvas = canvasRef.current;
74414
74767
  const ctx = canvas?.getContext("2d");
74415
74768
  if (!canvas || !ctx) return;
@@ -74509,14 +74862,14 @@ function useNetworkCanvas(options) {
74509
74862
  }
74510
74863
  ctx.globalAlpha = 1;
74511
74864
  }, []);
74512
- const requestDraw = useCallback54(() => {
74865
+ const requestDraw = useCallback55(() => {
74513
74866
  if (frame.current !== null) return;
74514
74867
  frame.current = requestAnimationFrame(() => {
74515
74868
  frame.current = null;
74516
74869
  draw();
74517
74870
  });
74518
74871
  }, [draw]);
74519
- const update = useCallback54(
74872
+ const update = useCallback55(
74520
74873
  (next) => {
74521
74874
  view.current = next;
74522
74875
  setZoom(next.zoom);
@@ -74525,7 +74878,7 @@ function useNetworkCanvas(options) {
74525
74878
  },
74526
74879
  [requestDraw]
74527
74880
  );
74528
- const fit = useCallback54(
74881
+ const fit = useCallback55(
74529
74882
  () => update(
74530
74883
  fitNetwork(
74531
74884
  latest.current.nodes,
@@ -74535,11 +74888,11 @@ function useNetworkCanvas(options) {
74535
74888
  ),
74536
74889
  [update]
74537
74890
  );
74538
- const zoomBy = useCallback54(
74891
+ const zoomBy = useCallback55(
74539
74892
  (factor, x = size.current.width / 2, y = size.current.height / 2) => update(zoomAt(view.current, factor, x, y)),
74540
74893
  [update]
74541
74894
  );
74542
- const focusNode = useCallback54(
74895
+ const focusNode = useCallback55(
74543
74896
  (node) => {
74544
74897
  update({
74545
74898
  ...view.current,
@@ -74549,14 +74902,14 @@ function useNetworkCanvas(options) {
74549
74902
  },
74550
74903
  [update]
74551
74904
  );
74552
- useEffect82(() => {
74905
+ useEffect83(() => {
74553
74906
  latest.current = options;
74554
74907
  requestDraw();
74555
74908
  }, [options, requestDraw]);
74556
- useEffect82(() => {
74909
+ useEffect83(() => {
74557
74910
  fit();
74558
74911
  }, [options.model, fit]);
74559
- useEffect82(() => {
74912
+ useEffect83(() => {
74560
74913
  const canvas = canvasRef.current;
74561
74914
  if (!canvas) return;
74562
74915
  const measure = () => {
@@ -74609,7 +74962,7 @@ function useNetworkCanvas(options) {
74609
74962
  }
74610
74963
 
74611
74964
  // src/components/NetworkGraph/NetworkGraph.tsx
74612
- import { jsx as jsx337, jsxs as jsxs210 } from "react/jsx-runtime";
74965
+ import { jsx as jsx339, jsxs as jsxs211 } from "react/jsx-runtime";
74613
74966
  var NO_COMMUNITIES = [];
74614
74967
  var NO_HIGHLIGHTS = [];
74615
74968
  function NetworkGraph({
@@ -74640,11 +74993,11 @@ function NetworkGraph({
74640
74993
  ...panelProps
74641
74994
  }) {
74642
74995
  const t = useKitT();
74643
- const helpId = useId47();
74644
- const layoutRef = useRef82(null);
74645
- const [hasLegendSpace, setHasLegendSpace] = useState98(true);
74996
+ const helpId = useId48();
74997
+ const layoutRef = useRef84(null);
74998
+ const [hasLegendSpace, setHasLegendSpace] = useState100(true);
74646
74999
  const legendOnRight = legendPosition === "right" || legendPosition === "auto" && hasLegendSpace;
74647
- useEffect83(() => {
75000
+ useEffect84(() => {
74648
75001
  const element = layoutRef.current;
74649
75002
  if (!element || legendPosition !== "auto") return;
74650
75003
  const measure = () => setHasLegendSpace(element.getBoundingClientRect().width >= 600);
@@ -74657,12 +75010,12 @@ function NetworkGraph({
74657
75010
  () => buildNetwork(nodes, edges, communities),
74658
75011
  [nodes, edges, communities]
74659
75012
  );
74660
- const [internalSelected, setInternalSelected] = useState98(
75013
+ const [internalSelected, setInternalSelected] = useState100(
74661
75014
  defaultSelectedNodeId
74662
75015
  );
74663
- const [hidden, setHidden] = useState98(() => /* @__PURE__ */ new Set());
74664
- const [focused, setFocused] = useState98(null);
74665
- const [query, setQuery] = useState98("");
75016
+ const [hidden, setHidden] = useState100(() => /* @__PURE__ */ new Set());
75017
+ const [focused, setFocused] = useState100(null);
75018
+ const [query, setQuery] = useState100("");
74666
75019
  const enabled = useMemo70(
74667
75020
  () => new Set(
74668
75021
  visibleCommunityIds ?? model.groups.filter((g) => !hidden.has(g.id)).map((g) => g.id)
@@ -74704,7 +75057,7 @@ function NetworkGraph({
74704
75057
  onViewportChange
74705
75058
  });
74706
75059
  const locked = disabled || loading;
74707
- const drag = useRef82(null);
75060
+ const drag = useRef84(null);
74708
75061
  const select = (id) => {
74709
75062
  if (locked) return;
74710
75063
  if (selectedNodeId === void 0) setInternalSelected(id);
@@ -74720,7 +75073,7 @@ function NetworkGraph({
74720
75073
  );
74721
75074
  onVisibleCommunitiesChange?.(ids);
74722
75075
  };
74723
- useEffect83(() => {
75076
+ useEffect84(() => {
74724
75077
  const element = canvas.canvasRef.current;
74725
75078
  if (!element || locked) return;
74726
75079
  const wheel = (event) => {
@@ -74775,7 +75128,7 @@ function NetworkGraph({
74775
75128
  }, [visibleNodes, query]);
74776
75129
  const graphHeight = Number.isFinite(height) ? Math.max(160, height) : 480;
74777
75130
  const resolvedLegendTone = legendTone === "auto" ? tone : legendTone;
74778
- const legendContent = /* @__PURE__ */ jsxs210(
75131
+ const legendContent = /* @__PURE__ */ jsxs211(
74779
75132
  "fieldset",
74780
75133
  {
74781
75134
  disabled: locked,
@@ -74784,8 +75137,8 @@ function NetworkGraph({
74784
75137
  maxHeight: legendPanel ? Math.max(96, graphHeight - 64) : graphHeight
74785
75138
  },
74786
75139
  children: [
74787
- /* @__PURE__ */ jsx337("legend", { className: "mb-3 text-xs font-semibold uppercase tracking-widest", children: t("kit.networkGraph.communities") }),
74788
- /* @__PURE__ */ jsx337(
75140
+ /* @__PURE__ */ jsx339("legend", { className: "mb-3 text-xs font-semibold uppercase tracking-widest", children: t("kit.networkGraph.communities") }),
75141
+ /* @__PURE__ */ jsx339(
74789
75142
  Checkbox_default,
74790
75143
  {
74791
75144
  size: "sm",
@@ -74796,8 +75149,8 @@ function NetworkGraph({
74796
75149
  onChange: (event) => filter(event.target.checked ? model.groups.map((g) => g.id) : [])
74797
75150
  }
74798
75151
  ),
74799
- model.groups.map((group) => /* @__PURE__ */ jsxs210("div", { className: "flex items-center justify-between gap-2", children: [
74800
- /* @__PURE__ */ jsx337(
75152
+ model.groups.map((group) => /* @__PURE__ */ jsxs211("div", { className: "flex items-center justify-between gap-2", children: [
75153
+ /* @__PURE__ */ jsx339(
74801
75154
  Checkbox_default,
74802
75155
  {
74803
75156
  size: "sm",
@@ -74809,12 +75162,12 @@ function NetworkGraph({
74809
75162
  )
74810
75163
  }
74811
75164
  ),
74812
- /* @__PURE__ */ jsx337("span", { className: "text-xs tabular-nums opacity-60", children: counts.get(group.id) ?? 0 })
75165
+ /* @__PURE__ */ jsx339("span", { className: "text-xs tabular-nums opacity-60", children: counts.get(group.id) ?? 0 })
74813
75166
  ] }, group.id))
74814
75167
  ]
74815
75168
  }
74816
75169
  );
74817
- return /* @__PURE__ */ jsx337(
75170
+ return /* @__PURE__ */ jsx339(
74818
75171
  Panel_default,
74819
75172
  {
74820
75173
  ...panelProps,
@@ -74825,7 +75178,7 @@ function NetworkGraph({
74825
75178
  loading,
74826
75179
  clickable: false,
74827
75180
  scrollable: false,
74828
- children: /* @__PURE__ */ jsxs210(
75181
+ children: /* @__PURE__ */ jsxs211(
74829
75182
  "div",
74830
75183
  {
74831
75184
  className: "flex min-w-0 flex-col gap-3",
@@ -74833,7 +75186,7 @@ function NetworkGraph({
74833
75186
  "aria-label": ariaLabel ?? t("kit.networkGraph.name"),
74834
75187
  "aria-disabled": locked || void 0,
74835
75188
  children: [
74836
- showControls && /* @__PURE__ */ jsx337("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsx337("div", { className: "min-w-40 flex-1", children: /* @__PURE__ */ jsx337(
75189
+ showControls && /* @__PURE__ */ jsx339("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsx339("div", { className: "min-w-40 flex-1", children: /* @__PURE__ */ jsx339(
74837
75190
  Combobox_default,
74838
75191
  {
74839
75192
  size: "sm",
@@ -74855,7 +75208,7 @@ function NetworkGraph({
74855
75208
  }
74856
75209
  }
74857
75210
  ) }) }),
74858
- /* @__PURE__ */ jsxs210(
75211
+ /* @__PURE__ */ jsxs211(
74859
75212
  "div",
74860
75213
  {
74861
75214
  ref: layoutRef,
@@ -74863,13 +75216,13 @@ function NetworkGraph({
74863
75216
  style: { flexDirection: legendOnRight ? "row" : "column" },
74864
75217
  "data-legend-position": legendOnRight ? "right" : "bottom",
74865
75218
  children: [
74866
- /* @__PURE__ */ jsxs210(
75219
+ /* @__PURE__ */ jsxs211(
74867
75220
  "div",
74868
75221
  {
74869
75222
  className: "relative min-w-0 flex-1",
74870
75223
  style: { height: graphHeight, minHeight: graphHeight },
74871
75224
  children: [
74872
- /* @__PURE__ */ jsx337(
75225
+ /* @__PURE__ */ jsx339(
74873
75226
  "canvas",
74874
75227
  {
74875
75228
  ref: canvas.canvasRef,
@@ -74938,11 +75291,11 @@ function NetworkGraph({
74938
75291
  }
74939
75292
  }
74940
75293
  ),
74941
- showControls && /* @__PURE__ */ jsxs210("div", { className: "absolute bottom-3 right-3 z-10 flex items-center gap-0.5 rounded-lg border border-neutral-200 bg-white/90 p-1 shadow-sm backdrop-blur dark:border-neutral-700 dark:bg-neutral-900/90", children: [
74942
- /* @__PURE__ */ jsx337(
75294
+ showControls && /* @__PURE__ */ jsxs211("div", { className: "absolute bottom-3 right-3 z-10 flex items-center gap-0.5 rounded-lg border border-neutral-200 bg-white/90 p-1 shadow-sm backdrop-blur dark:border-neutral-700 dark:bg-neutral-900/90", children: [
75295
+ /* @__PURE__ */ jsx339(
74943
75296
  IconButton_default,
74944
75297
  {
74945
- icon: /* @__PURE__ */ jsxs210(
75298
+ icon: /* @__PURE__ */ jsxs211(
74946
75299
  "svg",
74947
75300
  {
74948
75301
  viewBox: "0 0 24 24",
@@ -74953,10 +75306,10 @@ function NetworkGraph({
74953
75306
  strokeLinejoin: "round",
74954
75307
  "aria-hidden": "true",
74955
75308
  children: [
74956
- /* @__PURE__ */ jsx337("path", { d: "M4 9V5a1 1 0 0 1 1-1h4" }),
74957
- /* @__PURE__ */ jsx337("path", { d: "M15 4h4a1 1 0 0 1 1 1v4" }),
74958
- /* @__PURE__ */ jsx337("path", { d: "M20 15v4a1 1 0 0 1-1 1h-4" }),
74959
- /* @__PURE__ */ jsx337("path", { d: "M9 20H5a1 1 0 0 1-1-1v-4" })
75309
+ /* @__PURE__ */ jsx339("path", { d: "M4 9V5a1 1 0 0 1 1-1h4" }),
75310
+ /* @__PURE__ */ jsx339("path", { d: "M15 4h4a1 1 0 0 1 1 1v4" }),
75311
+ /* @__PURE__ */ jsx339("path", { d: "M20 15v4a1 1 0 0 1-1 1h-4" }),
75312
+ /* @__PURE__ */ jsx339("path", { d: "M9 20H5a1 1 0 0 1-1-1v-4" })
74960
75313
  ]
74961
75314
  }
74962
75315
  ),
@@ -74969,10 +75322,10 @@ function NetworkGraph({
74969
75322
  onClick: canvas.fit
74970
75323
  }
74971
75324
  ),
74972
- /* @__PURE__ */ jsx337(
75325
+ /* @__PURE__ */ jsx339(
74973
75326
  IconButton_default,
74974
75327
  {
74975
- icon: /* @__PURE__ */ jsx337(
75328
+ icon: /* @__PURE__ */ jsx339(
74976
75329
  "svg",
74977
75330
  {
74978
75331
  viewBox: "0 0 24 24",
@@ -74981,7 +75334,7 @@ function NetworkGraph({
74981
75334
  strokeWidth: 2,
74982
75335
  strokeLinecap: "round",
74983
75336
  "aria-hidden": "true",
74984
- children: /* @__PURE__ */ jsx337("path", { d: "M6 12h12" })
75337
+ children: /* @__PURE__ */ jsx339("path", { d: "M6 12h12" })
74985
75338
  }
74986
75339
  ),
74987
75340
  size: "xs",
@@ -74993,7 +75346,7 @@ function NetworkGraph({
74993
75346
  onClick: () => canvas.zoomBy(0.8)
74994
75347
  }
74995
75348
  ),
74996
- /* @__PURE__ */ jsxs210(
75349
+ /* @__PURE__ */ jsxs211(
74997
75350
  "span",
74998
75351
  {
74999
75352
  className: "min-w-[3.5ch] px-1 text-center text-[11px] tabular-nums text-neutral-500 dark:text-neutral-400",
@@ -75004,7 +75357,7 @@ function NetworkGraph({
75004
75357
  ]
75005
75358
  }
75006
75359
  ),
75007
- /* @__PURE__ */ jsx337(
75360
+ /* @__PURE__ */ jsx339(
75008
75361
  IconButton_default,
75009
75362
  {
75010
75363
  icon: "Add",
@@ -75017,7 +75370,7 @@ function NetworkGraph({
75017
75370
  onClick: () => canvas.zoomBy(1.25)
75018
75371
  }
75019
75372
  ),
75020
- /* @__PURE__ */ jsx337(
75373
+ /* @__PURE__ */ jsx339(
75021
75374
  IconButton_default,
75022
75375
  {
75023
75376
  icon: "Reset",
@@ -75035,18 +75388,18 @@ function NetworkGraph({
75035
75388
  }
75036
75389
  )
75037
75390
  ] }),
75038
- !visibleNodes.length && /* @__PURE__ */ jsx337("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center text-sm", children: emptyMessage ?? t("kit.networkGraph.empty") })
75391
+ !visibleNodes.length && /* @__PURE__ */ jsx339("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center text-sm", children: emptyMessage ?? t("kit.networkGraph.empty") })
75039
75392
  ]
75040
75393
  }
75041
75394
  ),
75042
- showCommunities && model.groups.length > 0 && /* @__PURE__ */ jsx337(
75395
+ showCommunities && model.groups.length > 0 && /* @__PURE__ */ jsx339(
75043
75396
  "div",
75044
75397
  {
75045
75398
  className: "min-w-0 shrink-0",
75046
75399
  style: {
75047
75400
  width: legendOnRight ? legendPanel ? 224 : 192 : "100%"
75048
75401
  },
75049
- children: legendPanel ? /* @__PURE__ */ jsx337(
75402
+ children: legendPanel ? /* @__PURE__ */ jsx339(
75050
75403
  Panel_default,
75051
75404
  {
75052
75405
  variant: legendVariant === "auto" ? variant : legendVariant,
@@ -75065,8 +75418,8 @@ function NetworkGraph({
75065
75418
  ]
75066
75419
  }
75067
75420
  ),
75068
- /* @__PURE__ */ jsx337("p", { id: helpId, className: "text-xs opacity-70", children: t("kit.networkGraph.instructions") }),
75069
- /* @__PURE__ */ jsx337(
75421
+ /* @__PURE__ */ jsx339("p", { id: helpId, className: "text-xs opacity-70", children: t("kit.networkGraph.instructions") }),
75422
+ /* @__PURE__ */ jsx339(
75070
75423
  "p",
75071
75424
  {
75072
75425
  role: "status",
@@ -75254,11 +75607,13 @@ export {
75254
75607
  LOADER_VARIANTS,
75255
75608
  LOCK_TTL_MS,
75256
75609
  Loader_default as Loader,
75610
+ SURFACE_VARIANTS as MENU_VARIANTS,
75257
75611
  METERGROUP_ORIENTATIONS,
75258
75612
  MODAL_POSITIONS,
75259
75613
  MS_DAY,
75260
75614
  MULTI_TOGGLE_INDICATORS,
75261
75615
  MULTI_TOGGLE_VARIANTS,
75616
+ Menu,
75262
75617
  MeterGroup_default as MeterGroup,
75263
75618
  MetricBar,
75264
75619
  Modal_default as Modal,