@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.cjs CHANGED
@@ -195,11 +195,13 @@ __export(src_exports, {
195
195
  LOADER_VARIANTS: () => LOADER_VARIANTS,
196
196
  LOCK_TTL_MS: () => LOCK_TTL_MS,
197
197
  Loader: () => Loader_default,
198
+ MENU_VARIANTS: () => SURFACE_VARIANTS,
198
199
  METERGROUP_ORIENTATIONS: () => METERGROUP_ORIENTATIONS,
199
200
  MODAL_POSITIONS: () => MODAL_POSITIONS,
200
201
  MS_DAY: () => MS_DAY,
201
202
  MULTI_TOGGLE_INDICATORS: () => MULTI_TOGGLE_INDICATORS,
202
203
  MULTI_TOGGLE_VARIANTS: () => MULTI_TOGGLE_VARIANTS,
204
+ Menu: () => Menu,
203
205
  MeterGroup: () => MeterGroup_default,
204
206
  MetricBar: () => MetricBar,
205
207
  Modal: () => Modal_default,
@@ -7685,13 +7687,13 @@ var Parser = class _Parser {
7685
7687
  /** Parse a message body (top-level or a branch body — see parseBranchBody). */
7686
7688
  parseMessage(inPluralBranch = false) {
7687
7689
  const nodes = [];
7688
- let text = "";
7690
+ let text2 = "";
7689
7691
  let pendingSpace = false;
7690
7692
  let hasContent = false;
7691
7693
  const flushText = () => {
7692
- if (text !== "") {
7693
- nodes.push({ type: "text", value: text });
7694
- text = "";
7694
+ if (text2 !== "") {
7695
+ nodes.push({ type: "text", value: text2 });
7696
+ text2 = "";
7695
7697
  }
7696
7698
  };
7697
7699
  while (this.pos < this.src.length) {
@@ -7699,19 +7701,19 @@ var Parser = class _Parser {
7699
7701
  if (ch === "\\") {
7700
7702
  if (this.src[this.pos + 1] === "'") {
7701
7703
  if (pendingSpace) {
7702
- text += " ";
7704
+ text2 += " ";
7703
7705
  pendingSpace = false;
7704
7706
  }
7705
- text += "'";
7707
+ text2 += "'";
7706
7708
  this.pos += 2;
7707
7709
  hasContent = true;
7708
7710
  continue;
7709
7711
  }
7710
7712
  if (pendingSpace) {
7711
- text += " ";
7713
+ text2 += " ";
7712
7714
  pendingSpace = false;
7713
7715
  }
7714
- text += ch;
7716
+ text2 += ch;
7715
7717
  this.pos += 1;
7716
7718
  hasContent = true;
7717
7719
  continue;
@@ -7719,16 +7721,16 @@ var Parser = class _Parser {
7719
7721
  if (ch === "'") {
7720
7722
  if (this.src[this.pos + 1] === "'") {
7721
7723
  if (pendingSpace) {
7722
- text += " ";
7724
+ text2 += " ";
7723
7725
  pendingSpace = false;
7724
7726
  }
7725
- text += "'";
7727
+ text2 += "'";
7726
7728
  this.pos += 2;
7727
7729
  hasContent = true;
7728
7730
  continue;
7729
7731
  }
7730
7732
  if (pendingSpace) {
7731
- text += " ";
7733
+ text2 += " ";
7732
7734
  pendingSpace = false;
7733
7735
  }
7734
7736
  this.pos += 1;
@@ -7740,13 +7742,13 @@ var Parser = class _Parser {
7740
7742
  throw this.err("unterminated quoted section \u2014 a ' opened without a closing '");
7741
7743
  }
7742
7744
  this.pos += 1;
7743
- text += inner;
7745
+ text2 += inner;
7744
7746
  hasContent = true;
7745
7747
  continue;
7746
7748
  }
7747
7749
  if (ch === "{") {
7748
7750
  if (pendingSpace) {
7749
- text += " ";
7751
+ text2 += " ";
7750
7752
  pendingSpace = false;
7751
7753
  }
7752
7754
  flushText();
@@ -7759,7 +7761,7 @@ var Parser = class _Parser {
7759
7761
  }
7760
7762
  if (inPluralBranch && ch === "#") {
7761
7763
  if (pendingSpace) {
7762
- text += " ";
7764
+ text2 += " ";
7763
7765
  pendingSpace = false;
7764
7766
  }
7765
7767
  flushText();
@@ -7774,10 +7776,10 @@ var Parser = class _Parser {
7774
7776
  continue;
7775
7777
  }
7776
7778
  if (pendingSpace) {
7777
- text += " ";
7779
+ text2 += " ";
7778
7780
  pendingSpace = false;
7779
7781
  }
7780
- text += ch;
7782
+ text2 += ch;
7781
7783
  hasContent = true;
7782
7784
  this.pos += 1;
7783
7785
  }
@@ -8215,8 +8217,8 @@ var FULL_MONTH_REGEX = new RegExp(
8215
8217
  "gi"
8216
8218
  );
8217
8219
  var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
8218
- var normalizeToEnglishNames = (text, names) => {
8219
- let out = text;
8220
+ var normalizeToEnglishNames = (text2, names) => {
8221
+ let out = text2;
8220
8222
  const mapSet = (source, target) => {
8221
8223
  if (!source) return;
8222
8224
  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);
@@ -8233,21 +8235,21 @@ var normalizeToEnglishNames = (text, names) => {
8233
8235
  mapSet(names.weekdayShort, WEEKDAY_LABELS_SHORT);
8234
8236
  return out;
8235
8237
  };
8236
- var abbreviateMonthNames = (text) => text.replace(
8238
+ var abbreviateMonthNames = (text2) => text2.replace(
8237
8239
  FULL_MONTH_REGEX,
8238
8240
  (match) => MONTH_NAME_TO_ABBR[match.toLowerCase()] ?? match
8239
8241
  );
8240
8242
  var ABBR_MONTH_REGEX = /\b(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\b/g;
8241
- var expandMonthNames = (text) => text.replace(ABBR_MONTH_REGEX, (match) => {
8243
+ var expandMonthNames = (text2) => text2.replace(ABBR_MONTH_REGEX, (match) => {
8242
8244
  const expanded = MONTH_ABBR_TO_NAME[match.toLowerCase()];
8243
8245
  return expanded ? `${expanded.charAt(0) + expanded.slice(1).toLowerCase()}` : match;
8244
8246
  });
8245
- var parseCandidates = (text) => {
8246
- const candidates = [text, abbreviateMonthNames(text), expandMonthNames(text)];
8247
+ var parseCandidates = (text2) => {
8248
+ const candidates = [text2, abbreviateMonthNames(text2), expandMonthNames(text2)];
8247
8249
  return [...new Set(candidates)];
8248
8250
  };
8249
- var parseDateText = (text, formatString = DEFAULT_DATE_FORMAT, reference = /* @__PURE__ */ new Date(), names) => {
8250
- const trimmed = text.trim();
8251
+ var parseDateText = (text2, formatString = DEFAULT_DATE_FORMAT, reference = /* @__PURE__ */ new Date(), names) => {
8252
+ const trimmed = text2.trim();
8251
8253
  if (!trimmed) return null;
8252
8254
  const candidates = /* @__PURE__ */ new Set();
8253
8255
  for (const candidate of parseCandidates(trimmed)) candidates.add(candidate);
@@ -8264,13 +8266,13 @@ var parseDateText = (text, formatString = DEFAULT_DATE_FORMAT, reference = /* @_
8264
8266
  }
8265
8267
  return null;
8266
8268
  };
8267
- var parseValueText = (text, selectionMode = "single", formatString = DEFAULT_DATE_FORMAT, reference = /* @__PURE__ */ new Date(), names) => {
8268
- const trimmed = text.trim();
8269
+ var parseValueText = (text2, selectionMode = "single", formatString = DEFAULT_DATE_FORMAT, reference = /* @__PURE__ */ new Date(), names) => {
8270
+ const trimmed = text2.trim();
8269
8271
  if (!trimmed) return null;
8270
8272
  if (selectionMode === "single") {
8271
8273
  return parseDateText(trimmed, formatString, reference, names);
8272
8274
  }
8273
- const withTrailingSeparator = /\s-$/.test(text) ? `${text} ` : text;
8275
+ const withTrailingSeparator = /\s-$/.test(text2) ? `${text2} ` : text2;
8274
8276
  const parts = withTrailingSeparator.split(RANGE_SEPARATOR);
8275
8277
  if (parts.length !== 2) return null;
8276
8278
  const start = parseDateText(parts[0], formatString, reference, names);
@@ -10794,9 +10796,9 @@ var sizeTokens = {
10794
10796
  }
10795
10797
  }
10796
10798
  };
10797
- var SpinnerLabel = ({ text }) => {
10799
+ var SpinnerLabel = ({ text: text2 }) => {
10798
10800
  const surface = useSurfaceText();
10799
- return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: (0, import_classnames4.default)("text-sm font-medium", surface.body), children: text });
10801
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: (0, import_classnames4.default)("text-sm font-medium", surface.body), children: text2 });
10800
10802
  };
10801
10803
  var Spinner = import_react151.default.forwardRef(
10802
10804
  ({
@@ -11099,7 +11101,7 @@ var TOOLTIP_ARROW_BORDER = {
11099
11101
  // src/components/TooltipWrapper.tsx
11100
11102
  var import_jsx_runtime154 = require("react/jsx-runtime");
11101
11103
  var TooltipWrapper = ({
11102
- text,
11104
+ text: text2,
11103
11105
  delay = 500,
11104
11106
  position = "top",
11105
11107
  variant = "surface",
@@ -11120,12 +11122,12 @@ var TooltipWrapper = ({
11120
11122
  };
11121
11123
  }, []);
11122
11124
  (0, import_react152.useEffect)(() => {
11123
- if (!text && visible) {
11125
+ if (!text2 && visible) {
11124
11126
  if (timerRef.current) clearTimeout(timerRef.current);
11125
11127
  setVisible(false);
11126
11128
  setPlacement(null);
11127
11129
  }
11128
- }, [text, visible]);
11130
+ }, [text2, visible]);
11129
11131
  const measure = (0, import_react152.useCallback)(() => {
11130
11132
  const el = tooltipRef.current;
11131
11133
  const trigger = triggerRectRef.current;
@@ -11173,7 +11175,7 @@ var TooltipWrapper = ({
11173
11175
  }, [visible, measure]);
11174
11176
  const show = (0, import_react152.useCallback)(
11175
11177
  (e) => {
11176
- if (text) {
11178
+ if (text2) {
11177
11179
  setColorScheme(
11178
11180
  e.currentTarget.closest("[data-color-scheme]")?.getAttribute("data-color-scheme") ?? null
11179
11181
  );
@@ -11187,7 +11189,7 @@ var TooltipWrapper = ({
11187
11189
  children.props.onMouseEnter?.(e);
11188
11190
  }
11189
11191
  },
11190
- [text, delay, children.props]
11192
+ [text2, delay, children.props]
11191
11193
  );
11192
11194
  const hide = (0, import_react152.useCallback)(
11193
11195
  (e) => {
@@ -11210,7 +11212,7 @@ var TooltipWrapper = ({
11210
11212
  // The WAI pattern for tooltips: the relationship is declared only while
11211
11213
  // the tooltip exists — a permanent `aria-describedby` to an absent id is
11212
11214
  // a dangling reference most readers skip silently.
11213
- "aria-describedby": visible && text ? tooltipId : void 0,
11215
+ "aria-describedby": visible && text2 ? tooltipId : void 0,
11214
11216
  onMouseEnter: show,
11215
11217
  onMouseLeave: hide,
11216
11218
  onFocus: show,
@@ -11221,7 +11223,7 @@ var TooltipWrapper = ({
11221
11223
  const vertical = side === "top" || side === "bottom";
11222
11224
  return /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(import_jsx_runtime154.Fragment, { children: [
11223
11225
  child,
11224
- visible && text && (0, import_react_dom.createPortal)(
11226
+ visible && text2 && (0, import_react_dom.createPortal)(
11225
11227
  /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(
11226
11228
  "div",
11227
11229
  {
@@ -11243,7 +11245,7 @@ var TooltipWrapper = ({
11243
11245
  colorScheme === "dark" && "dark"
11244
11246
  ),
11245
11247
  children: [
11246
- text,
11248
+ text2,
11247
11249
  /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
11248
11250
  "span",
11249
11251
  {
@@ -13754,7 +13756,7 @@ var MultiProgressBar = ({
13754
13756
  className,
13755
13757
  ...rest
13756
13758
  }) => {
13757
- const text = useSurfaceText();
13759
+ const text2 = useSurfaceText();
13758
13760
  const renderIcon2 = useIconRenderer();
13759
13761
  const [hoveredKey, setHoveredKey] = (0, import_react162.useState)(null);
13760
13762
  const [tooltip, setTooltip] = (0, import_react162.useState)(null);
@@ -13825,7 +13827,7 @@ var MultiProgressBar = ({
13825
13827
  className: (0, import_classnames17.default)(
13826
13828
  "flex cursor-pointer select-none items-center gap-1.5 whitespace-nowrap",
13827
13829
  "transition-all duration-200",
13828
- isActive ? text.heading : isDimmed ? "opacity-40" : text.muted
13830
+ isActive ? text2.heading : isDimmed ? "opacity-40" : text2.muted
13829
13831
  ),
13830
13832
  onMouseEnter: () => setHoveredKey(s.key),
13831
13833
  onMouseLeave: () => setHoveredKey(null),
@@ -13850,13 +13852,13 @@ var MultiProgressBar = ({
13850
13852
  {
13851
13853
  className: (0, import_classnames17.default)(
13852
13854
  "font-semibold transition-colors duration-200",
13853
- isActive ? text.heading : text.body
13855
+ isActive ? text2.heading : text2.body
13854
13856
  ),
13855
13857
  children: s.displayValue ?? s.value
13856
13858
  }
13857
13859
  ),
13858
13860
  s.label,
13859
- showPercent && /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)("span", { className: text.muted, children: [
13861
+ showPercent && /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)("span", { className: text2.muted, children: [
13860
13862
  "(",
13861
13863
  Math.round(pct),
13862
13864
  "%)"
@@ -13998,7 +14000,7 @@ var MultiProgressBar = ({
13998
14000
  className: (0, import_classnames17.default)(
13999
14001
  tokens.label,
14000
14002
  "font-semibold",
14001
- !hasTextColor(labelClassName) && text.heading,
14003
+ !hasTextColor(labelClassName) && text2.heading,
14002
14004
  labelClassName
14003
14005
  ),
14004
14006
  children: label
@@ -14010,7 +14012,7 @@ var MultiProgressBar = ({
14010
14012
  className: (0, import_classnames17.default)(
14011
14013
  tokens.meta,
14012
14014
  "mt-0.5",
14013
- !hasTextColor(secondaryLabelClassName) && text.muted,
14015
+ !hasTextColor(secondaryLabelClassName) && text2.muted,
14014
14016
  secondaryLabelClassName
14015
14017
  ),
14016
14018
  children: secondaryLabel
@@ -14020,7 +14022,7 @@ var MultiProgressBar = ({
14020
14022
  totalLabel && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
14021
14023
  "span",
14022
14024
  {
14023
- className: (0, import_classnames17.default)(tokens.meta, "font-medium", text.muted),
14025
+ className: (0, import_classnames17.default)(tokens.meta, "font-medium", text2.muted),
14024
14026
  children: totalLabel
14025
14027
  }
14026
14028
  )
@@ -14098,9 +14100,9 @@ var Shimmer_default = Shimmer;
14098
14100
  var import_classnames19 = __toESM(require("classnames"), 1);
14099
14101
  var import_react164 = __toESM(require("react"), 1);
14100
14102
  var import_jsx_runtime168 = require("react/jsx-runtime");
14101
- var StatusSpinnerLabel = ({ text }) => {
14103
+ var StatusSpinnerLabel = ({ text: text2 }) => {
14102
14104
  const surface = useSurfaceText();
14103
- return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("span", { className: (0, import_classnames19.default)("text-sm font-medium", surface.body), children: text });
14105
+ return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("span", { className: (0, import_classnames19.default)("text-sm font-medium", surface.body), children: text2 });
14104
14106
  };
14105
14107
  var StatusSpinner = import_react164.default.forwardRef(
14106
14108
  ({
@@ -16016,7 +16018,7 @@ var DropdownButton_default = DropdownButton;
16016
16018
  var import_classnames28 = __toESM(require("classnames"), 1);
16017
16019
  var import_jsx_runtime177 = require("react/jsx-runtime");
16018
16020
  var Tooltip = ({
16019
- text,
16021
+ text: text2,
16020
16022
  delay = 500,
16021
16023
  position = "top",
16022
16024
  variant = "surface",
@@ -16026,11 +16028,11 @@ var Tooltip = ({
16026
16028
  wrapperClassName,
16027
16029
  children
16028
16030
  }) => {
16029
- if (!text) return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_jsx_runtime177.Fragment, { children });
16031
+ if (!text2) return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_jsx_runtime177.Fragment, { children });
16030
16032
  return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
16031
16033
  TooltipWrapper_default,
16032
16034
  {
16033
- text,
16035
+ text: text2,
16034
16036
  delay,
16035
16037
  position,
16036
16038
  variant,
@@ -16373,9 +16375,9 @@ var InputOtp = (0, import_react172.forwardRef)(function InputOtp2({
16373
16375
  [integerOnly]
16374
16376
  );
16375
16377
  const distribute = (0, import_react172.useCallback)(
16376
- (start, text) => {
16378
+ (start, text2) => {
16377
16379
  const at = Math.min(start, current.length);
16378
- const clean = [...text].filter((char) => isAllowed(char)).slice(0, clampedLength - at);
16380
+ const clean = [...text2].filter((char) => isAllowed(char)).slice(0, clampedLength - at);
16379
16381
  if (!clean.length) return;
16380
16382
  const next = [...chars];
16381
16383
  clean.forEach((char, j) => {
@@ -20510,7 +20512,7 @@ var Checkbox = (0, import_react184.forwardRef)(
20510
20512
  children: description
20511
20513
  }
20512
20514
  ) : null;
20513
- const text = label || descriptionNode ? /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(
20515
+ const text2 = label || descriptionNode ? /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(
20514
20516
  "span",
20515
20517
  {
20516
20518
  className: (0, import_classnames41.default)(
@@ -20564,7 +20566,7 @@ var Checkbox = (0, import_react184.forwardRef)(
20564
20566
  ),
20565
20567
  children: [
20566
20568
  control,
20567
- text
20569
+ text2
20568
20570
  ]
20569
20571
  }
20570
20572
  ),
@@ -23918,7 +23920,7 @@ var safeHref = (href) => {
23918
23920
  if (/^#[^\s"'<>]*$/.test(h)) return h;
23919
23921
  return null;
23920
23922
  };
23921
- 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) => {
23923
+ 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) => {
23922
23924
  const href = safeHref(h);
23923
23925
  if (!href) return t;
23924
23926
  return `<a href="${href}" target="_blank" rel="noopener noreferrer" class="text-blue-600 underline underline-offset-2 dark:text-blue-400">${t}</a>`;
@@ -24262,8 +24264,8 @@ var Chat2 = ({
24262
24264
  fail(err);
24263
24265
  }
24264
24266
  };
24265
- const send = async (text) => {
24266
- const content = text.trim();
24267
+ const send = async (text2) => {
24268
+ const content = text2.trim();
24267
24269
  if (!content || streaming) return;
24268
24270
  setDraft("");
24269
24271
  let chatId = activeIdRef.current;
@@ -24732,7 +24734,7 @@ var ChatRow = ({
24732
24734
  onMenu,
24733
24735
  menuRef
24734
24736
  }) => {
24735
- const [text, setText] = (0, import_react195.useState)(chat.title);
24737
+ const [text2, setText] = (0, import_react195.useState)(chat.title);
24736
24738
  if (renaming) {
24737
24739
  return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
24738
24740
  Input_default,
@@ -24740,13 +24742,13 @@ var ChatRow = ({
24740
24742
  size: "sm",
24741
24743
  autoFocus: true,
24742
24744
  className: "my-0.5",
24743
- value: text,
24745
+ value: text2,
24744
24746
  onChange: (event) => setText(event.target.value),
24745
24747
  onKeyDown: (event) => {
24746
- if (event.key === "Enter") onRenamed(text || chat.title);
24748
+ if (event.key === "Enter") onRenamed(text2 || chat.title);
24747
24749
  if (event.key === "Escape") onCancelRename();
24748
24750
  },
24749
- onBlur: () => onRenamed(text || chat.title)
24751
+ onBlur: () => onRenamed(text2 || chat.title)
24750
24752
  }
24751
24753
  );
24752
24754
  }
@@ -24783,17 +24785,17 @@ var FolderInput = ({
24783
24785
  onDone,
24784
24786
  onCancel
24785
24787
  }) => {
24786
- const [text, setText] = (0, import_react195.useState)(initial);
24788
+ const [text2, setText] = (0, import_react195.useState)(initial);
24787
24789
  return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
24788
24790
  Input_default,
24789
24791
  {
24790
24792
  size: "sm",
24791
24793
  autoFocus: true,
24792
24794
  placeholder: "Folder name",
24793
- value: text,
24795
+ value: text2,
24794
24796
  onChange: (event) => setText(event.target.value),
24795
24797
  onKeyDown: (event) => {
24796
- if (event.key === "Enter") onDone(text);
24798
+ if (event.key === "Enter") onDone(text2);
24797
24799
  if (event.key === "Escape") onCancel();
24798
24800
  }
24799
24801
  }
@@ -31167,10 +31169,10 @@ function PieSeries(props) {
31167
31169
  const lp = Math.max(1e-3, fracs[lb.index] ?? 0);
31168
31170
  const size = 11 * lp;
31169
31171
  if (size < 2) return;
31170
- const text = pctLabel(lb.pct * lp);
31172
+ const text2 = pctLabel(lb.pct * lp);
31171
31173
  c.globalAlpha = lp;
31172
31174
  c.font = `600 ${size}px sans-serif`;
31173
- const w = text.length * size * 0.58 + 12 * lp;
31175
+ const w = text2.length * size * 0.58 + 12 * lp;
31174
31176
  const h = 17 * lp;
31175
31177
  c.fillStyle = shadeColor(lb.color, 0.45);
31176
31178
  if (typeof c.roundRect === "function") {
@@ -31181,7 +31183,7 @@ function PieSeries(props) {
31181
31183
  c.fillRect(lb.x - w / 2, lb.y - h / 2, w, h);
31182
31184
  }
31183
31185
  c.fillStyle = "#fff";
31184
- c.fillText(text, lb.x, lb.y + 0.5);
31186
+ c.fillText(text2, lb.x, lb.y + 0.5);
31185
31187
  c.globalAlpha = 1;
31186
31188
  });
31187
31189
  c.restore();
@@ -31241,8 +31243,8 @@ function PieSeries(props) {
31241
31243
  const lp = Math.max(1e-3, fracs[lb.index] ?? 0);
31242
31244
  const size = 11 * lp;
31243
31245
  if (size < 2) return null;
31244
- const text = pctLabel(lb.pct * lp);
31245
- const w = text.length * size * 0.58 + 12 * lp;
31246
+ const text2 = pctLabel(lb.pct * lp);
31247
+ const w = text2.length * size * 0.58 + 12 * lp;
31246
31248
  const h = 17 * lp;
31247
31249
  return /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("g", { opacity: lp, pointerEvents: "none", children: [
31248
31250
  /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
@@ -31266,7 +31268,7 @@ function PieSeries(props) {
31266
31268
  fontSize: size,
31267
31269
  fontWeight: 600,
31268
31270
  fill: "#fff",
31269
- children: text
31271
+ children: text2
31270
31272
  }
31271
31273
  )
31272
31274
  ] }, lb.index);
@@ -31578,8 +31580,8 @@ function CandlestickSeries(props) {
31578
31580
  }
31579
31581
  if (hovered && hoverItem) {
31580
31582
  const up = hovered.direction !== "down";
31581
- const text = String(Math.round(hoverItem.value * 10) / 10);
31582
- const w = text.length * 6.4 + 12;
31583
+ const text2 = String(Math.round(hoverItem.value * 10) / 10);
31584
+ const w = text2.length * 6.4 + 12;
31583
31585
  const h = 17;
31584
31586
  const top = hovered.highY - 8 - h;
31585
31587
  c.fillStyle = shadeColor(up ? upColor : downColor, 0.45);
@@ -31588,7 +31590,7 @@ function CandlestickSeries(props) {
31588
31590
  c.font = "600 11px sans-serif";
31589
31591
  c.textAlign = "center";
31590
31592
  c.textBaseline = "middle";
31591
- c.fillText(text, hovered.x, top + h / 2);
31593
+ c.fillText(text2, hovered.x, top + h / 2);
31592
31594
  }
31593
31595
  c.restore();
31594
31596
  };
@@ -31726,8 +31728,8 @@ function CandlestickSeries(props) {
31726
31728
  highlightOn && hoveredIndex >= 0 && hoverItem && (() => {
31727
31729
  const k = candles[hoveredIndex];
31728
31730
  const up = k.direction !== "down";
31729
- const text = String(Math.round(hoverItem.value * 10) / 10);
31730
- const w = text.length * 6.4 + 12;
31731
+ const text2 = String(Math.round(hoverItem.value * 10) / 10);
31732
+ const w = text2.length * 6.4 + 12;
31731
31733
  const h = 17;
31732
31734
  const top = k.highY - 8 - h;
31733
31735
  return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("g", { pointerEvents: "none", children: [
@@ -31752,7 +31754,7 @@ function CandlestickSeries(props) {
31752
31754
  fontSize: 11,
31753
31755
  fontWeight: 600,
31754
31756
  fill: "#fff",
31755
- children: text
31757
+ children: text2
31756
31758
  }
31757
31759
  )
31758
31760
  ] });
@@ -34112,7 +34114,7 @@ function DataLabels(props = {}) {
34112
34114
  };
34113
34115
  return /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: [
34114
34116
  endpoints.map((ep) => {
34115
- const text = props.formatter ? props.formatter(ep.value, ep.name) : formatSI(ep.value);
34117
+ const text2 = props.formatter ? props.formatter(ep.value, ep.name) : formatSI(ep.value);
34116
34118
  const renderPoint = {
34117
34119
  seriesId: ep.id,
34118
34120
  seriesName: ep.name,
@@ -34122,7 +34124,7 @@ function DataLabels(props = {}) {
34122
34124
  y: ep.y,
34123
34125
  isLast: true
34124
34126
  };
34125
- const w = text.length * 7 + 14;
34127
+ const w = text2.length * 7 + 14;
34126
34128
  const bx = props.anchor === "margin-left" ? Math.max(2, area2.x - w - 6) : Math.min(width - w - 2, ep.x + 10);
34127
34129
  const by = Math.max(2, Math.min(ep.y - PILL_H / 2, height - PILL_H - 2));
34128
34130
  if (props.render) {
@@ -34146,14 +34148,14 @@ function DataLabels(props = {}) {
34146
34148
  background: ep.color,
34147
34149
  color: "#ffffff"
34148
34150
  },
34149
- children: text
34151
+ children: text2
34150
34152
  },
34151
34153
  ep.id
34152
34154
  );
34153
34155
  }),
34154
34156
  pieSlices.map((sl) => {
34155
- const text = props.formatter ? props.formatter(sl.value, sl.name) : formatSI(sl.value);
34156
- const w = text.length * 7 + 14;
34157
+ const text2 = props.formatter ? props.formatter(sl.value, sl.name) : formatSI(sl.value);
34158
+ const w = text2.length * 7 + 14;
34157
34159
  const bx = Math.max(2, Math.min(width - w - 2, sl.x - w / 2));
34158
34160
  const by = Math.max(2, Math.min(height - PILL_H - 2, sl.y - PILL_H / 2));
34159
34161
  if (props.render) {
@@ -34178,7 +34180,7 @@ function DataLabels(props = {}) {
34178
34180
  background: shadeColor(sl.color, 0.45),
34179
34181
  color: "#ffffff"
34180
34182
  },
34181
- children: text
34183
+ children: text2
34182
34184
  },
34183
34185
  sl.key
34184
34186
  );
@@ -36320,7 +36322,7 @@ var GlassBackground_default = GlassBackground;
36320
36322
  var import_react221 = require("react");
36321
36323
  var import_jsx_runtime238 = require("react/jsx-runtime");
36322
36324
  var TruncatedText = ({
36323
- text,
36325
+ text: text2,
36324
36326
  className,
36325
36327
  delay = 2e3,
36326
36328
  as: Tag = "div",
@@ -36339,11 +36341,11 @@ var TruncatedText = ({
36339
36341
  observer.observe(el);
36340
36342
  check();
36341
36343
  return () => observer.disconnect();
36342
- }, [text]);
36344
+ }, [text2]);
36343
36345
  const inner = /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
36344
36346
  TooltipWrapper_default,
36345
36347
  {
36346
- text: truncated ? text : void 0,
36348
+ text: truncated ? text2 : void 0,
36347
36349
  delay,
36348
36350
  position: tooltipPosition,
36349
36351
  children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
@@ -36358,7 +36360,7 @@ var TruncatedText = ({
36358
36360
  truncated && "rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400",
36359
36361
  className
36360
36362
  ].filter(Boolean).join(" "),
36361
- children: text
36363
+ children: text2
36362
36364
  }
36363
36365
  )
36364
36366
  }
@@ -36440,18 +36442,18 @@ function normaliseValue(value, boolWords) {
36440
36442
  return { display: null, copyText: null, isEmpty: true };
36441
36443
  }
36442
36444
  if (typeof value === "boolean") {
36443
- const text = value ? boolWords.yes : boolWords.no;
36444
- return { display: text, copyText: text, isEmpty: false };
36445
+ const text2 = value ? boolWords.yes : boolWords.no;
36446
+ return { display: text2, copyText: text2, isEmpty: false };
36445
36447
  }
36446
36448
  if (typeof value === "string" || typeof value === "number") {
36447
36449
  return { display: value, copyText: String(value), isEmpty: false };
36448
36450
  }
36449
36451
  return { display: value, copyText: null, isEmpty: false };
36450
36452
  }
36451
- async function writeClipboard(text) {
36453
+ async function writeClipboard(text2) {
36452
36454
  try {
36453
36455
  if (!navigator.clipboard?.writeText) return false;
36454
- await navigator.clipboard.writeText(text);
36456
+ await navigator.clipboard.writeText(text2);
36455
36457
  return true;
36456
36458
  } catch {
36457
36459
  return false;
@@ -36484,7 +36486,7 @@ var InfoRowBody = ({
36484
36486
  rootProps
36485
36487
  }) => {
36486
36488
  const t = useKitT();
36487
- const text = useSurfaceText();
36489
+ const text2 = useSurfaceText();
36488
36490
  const [copyState, setCopyState] = (0, import_react222.useState)("idle");
36489
36491
  const [dismissed, setDismissed] = (0, import_react222.useState)(false);
36490
36492
  const [truncated, setTruncated] = (0, import_react222.useState)(false);
@@ -36522,7 +36524,7 @@ var InfoRowBody = ({
36522
36524
  }, [canTooltip]);
36523
36525
  const loaderInk = `bg-${rowTone}-500/20 dark:bg-${rowTone}-500/25`;
36524
36526
  const loaderText = `text-${rowTone}-500 dark:text-${rowTone}-400`;
36525
- const valueColorClass = hasError ? "text-rose-600 dark:text-rose-400" : isEmpty2 ? text.muted : text.body;
36527
+ const valueColorClass = hasError ? "text-rose-600 dark:text-rose-400" : isEmpty2 ? text2.muted : text2.body;
36526
36528
  const valueSpan = /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
36527
36529
  "span",
36528
36530
  {
@@ -36560,7 +36562,7 @@ var InfoRowBody = ({
36560
36562
  // `!copied` so the confirmation wash is never racing the hover wash for
36561
36563
  // the same property.
36562
36564
  hoverable && copyState === "idle" && trigger.hover,
36563
- !noBorder && !hoverable && `border-b ${text.divider} last:border-0`,
36565
+ !noBorder && !hoverable && `border-b ${text2.divider} last:border-0`,
36564
36566
  copyState === "copied" && "bg-emerald-500/10",
36565
36567
  copyState === "failed" && "bg-rose-500/10",
36566
36568
  className
@@ -36572,7 +36574,7 @@ var InfoRowBody = ({
36572
36574
  {
36573
36575
  className: (0, import_classnames60.default)(
36574
36576
  labelTokens.text,
36575
- !hasTextColor(labelClassName) && text.muted,
36577
+ !hasTextColor(labelClassName) && text2.muted,
36576
36578
  useSmartLayout ? "shrink-0 min-w-0 max-w-[30%] truncate" : `grow shrink-0 ${labelWidth ?? tokens.defaultLabelWidth}`,
36577
36579
  labelClassName
36578
36580
  ),
@@ -36893,7 +36895,7 @@ var PagedPanelBody = ({
36893
36895
  onPrev,
36894
36896
  onNext
36895
36897
  }) => {
36896
- const text = useSurfaceText();
36898
+ const text2 = useSurfaceText();
36897
36899
  const t = useKitT();
36898
36900
  const tokens = SIZE_TOKENS2[size] ?? SIZE_TOKENS2.md;
36899
36901
  const emptySize = PANE_EMPTY_STATE_SIZE[size] ?? PANE_EMPTY_STATE_SIZE.md;
@@ -36906,7 +36908,7 @@ var PagedPanelBody = ({
36906
36908
  className: (0, import_classnames62.default)(
36907
36909
  "flex items-center gap-2 border-b",
36908
36910
  tokens.pad,
36909
- text.divider
36911
+ text2.divider
36910
36912
  ),
36911
36913
  children: [
36912
36914
  /* @__PURE__ */ (0, import_jsx_runtime241.jsx)("div", { className: "shrink-0", children: showNav && /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
@@ -36929,7 +36931,7 @@ var PagedPanelBody = ({
36929
36931
  className: (0, import_classnames62.default)(
36930
36932
  "font-semibold leading-snug truncate",
36931
36933
  tokens.title,
36932
- text.heading
36934
+ text2.heading
36933
36935
  ),
36934
36936
  children: resolvedTitle
36935
36937
  }
@@ -36940,7 +36942,7 @@ var PagedPanelBody = ({
36940
36942
  className: (0, import_classnames62.default)(
36941
36943
  "mt-0.5 truncate",
36942
36944
  tokens.subtitle,
36943
- text.muted
36945
+ text2.muted
36944
36946
  ),
36945
36947
  children: subtitle
36946
36948
  }
@@ -36955,7 +36957,7 @@ var PagedPanelBody = ({
36955
36957
  className: (0, import_classnames62.default)(
36956
36958
  "mt-0.5 tabular-nums",
36957
36959
  tokens.counter,
36958
- text.muted
36960
+ text2.muted
36959
36961
  ),
36960
36962
  children: [
36961
36963
  current + 1,
@@ -38022,7 +38024,7 @@ var HelpBody = ({
38022
38024
  };
38023
38025
  var CollapsibleHelpText = ({
38024
38026
  title,
38025
- text,
38027
+ text: text2,
38026
38028
  maxLength = 160,
38027
38029
  showIcon = false,
38028
38030
  icon = "Help",
@@ -38042,7 +38044,7 @@ var CollapsibleHelpText = ({
38042
38044
  }) => {
38043
38045
  const [expanded, setExpanded] = (0, import_react228.useState)(false);
38044
38046
  const regionId = (0, import_react228.useId)();
38045
- const sanitized = text?.trim() ?? "";
38047
+ const sanitized = text2?.trim() ?? "";
38046
38048
  const needsTruncation = sanitized.length > maxLength;
38047
38049
  const displayText = expanded || !needsTruncation ? sanitized : truncate(sanitized, maxLength);
38048
38050
  const toneTokens3 = getCollapsibleHelpToneTokens(tone);
@@ -39351,7 +39353,7 @@ var DatePicker = (0, import_react234.forwardRef)(
39351
39353
  setViewDate(getViewDate(currentValue, constraints));
39352
39354
  }
39353
39355
  }, [currentValue, constraints]);
39354
- const [text, setText] = (0, import_react234.useState)(() => formatValue(initialValue, format2));
39356
+ const [text2, setText] = (0, import_react234.useState)(() => formatValue(initialValue, format2));
39355
39357
  const [textInvalid, setTextInvalid] = (0, import_react234.useState)(false);
39356
39358
  const [focused, setFocused] = (0, import_react234.useState)(false);
39357
39359
  const focusedRef = (0, import_react234.useRef)(false);
@@ -39508,7 +39510,7 @@ var DatePicker = (0, import_react234.forwardRef)(
39508
39510
  }
39509
39511
  if (event.key === "Enter") {
39510
39512
  const parsed = parseValueText(
39511
- text,
39513
+ text2,
39512
39514
  selectionMode,
39513
39515
  format2,
39514
39516
  /* @__PURE__ */ new Date(),
@@ -39733,7 +39735,7 @@ var DatePicker = (0, import_react234.forwardRef)(
39733
39735
  readOnly: readonly,
39734
39736
  inputMode: "none",
39735
39737
  autoComplete: "off",
39736
- value: text,
39738
+ value: text2,
39737
39739
  onChange: handleTextChange,
39738
39740
  onFocus: (event) => {
39739
39741
  focusedRef.current = true;
@@ -50060,12 +50062,12 @@ var parseSmartVariable = (token) => {
50060
50062
  };
50061
50063
  };
50062
50064
  var matcher = () => new RegExp(SMART_VAR_REGEX.source, "gi");
50063
- var extractVariables = (text) => {
50065
+ var extractVariables = (text2) => {
50064
50066
  const variables = [];
50065
50067
  const seen = /* @__PURE__ */ new Set();
50066
50068
  const regex = matcher();
50067
50069
  let match;
50068
- while ((match = regex.exec(text)) !== null) {
50070
+ while ((match = regex.exec(text2)) !== null) {
50069
50071
  const fullToken = match[0];
50070
50072
  if (seen.has(fullToken)) continue;
50071
50073
  seen.add(fullToken);
@@ -50078,7 +50080,7 @@ var extractVariables = (text) => {
50078
50080
  }
50079
50081
  return variables;
50080
50082
  };
50081
- var hasSmartVariables = (text) => matcher().test(text ?? "");
50083
+ var hasSmartVariables = (text2) => matcher().test(text2 ?? "");
50082
50084
  var splitSmartValue = (value) => {
50083
50085
  const parts = [];
50084
50086
  if (!value) return parts;
@@ -50147,13 +50149,13 @@ var createDefaultResolver = (groups) => (variable) => {
50147
50149
  };
50148
50150
  var resolveSmartValue = (value, resolve2) => {
50149
50151
  const missing = [];
50150
- const text = splitSmartValue(value).map((part) => {
50152
+ const text2 = splitSmartValue(value).map((part) => {
50151
50153
  if (part.kind === "text") return part.text;
50152
50154
  const resolution = resolve2(part.variable);
50153
50155
  if (resolution.state === "missing") missing.push(part.variable);
50154
50156
  return resolution.value;
50155
50157
  }).join("");
50156
- return { text, missing };
50158
+ return { text: text2, missing };
50157
50159
  };
50158
50160
  var createLegacyGroups = (options) => {
50159
50161
  const { globalParameters = [], serviceNames = [], systemVariables = [] } = options;
@@ -51480,7 +51482,7 @@ var StatPager = ({
51480
51482
  onGradient = false,
51481
51483
  className
51482
51484
  }) => {
51483
- const text = useSurfaceText();
51485
+ const text2 = useSurfaceText();
51484
51486
  const tokens = TOKENS2[size] ?? TOKENS2.md;
51485
51487
  if (pager.total <= 1 && label == null) return null;
51486
51488
  return /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)("div", { className: (0, import_classnames87.default)("flex items-center gap-2", className), children: [
@@ -51508,7 +51510,7 @@ var StatPager = ({
51508
51510
  className: (0, import_classnames87.default)(
51509
51511
  "truncate font-semibold",
51510
51512
  tokens.label,
51511
- onGradient ? "text-white" : text.heading
51513
+ onGradient ? "text-white" : text2.heading
51512
51514
  ),
51513
51515
  children: label
51514
51516
  }
@@ -51523,7 +51525,7 @@ var StatPager = ({
51523
51525
  className: (0, import_classnames87.default)(
51524
51526
  "tabular-nums",
51525
51527
  tokens.counter,
51526
- onGradient ? "text-white/70" : text.muted
51528
+ onGradient ? "text-white/70" : text2.muted
51527
51529
  ),
51528
51530
  children: [
51529
51531
  pager.page + 1,
@@ -51987,7 +51989,7 @@ var CHART_TOKENS = {
51987
51989
  };
51988
51990
  var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
51989
51991
  const [hoveredIndex, setHoveredIndex] = (0, import_react260.useState)(null);
51990
- const text = useSurfaceText();
51992
+ const text2 = useSurfaceText();
51991
51993
  const resolvedItems = (0, import_react260.useMemo)(() => {
51992
51994
  const palette = getColorPaletteNames(dataset.items.length);
51993
51995
  return dataset.items.map((item, i) => ({
@@ -52092,7 +52094,7 @@ var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
52092
52094
  className: (0, import_classnames89.default)(
52093
52095
  "mb-1 font-bold leading-none",
52094
52096
  tokens.total,
52095
- onGradient ? "text-white" : text.heading
52097
+ onGradient ? "text-white" : text2.heading
52096
52098
  ),
52097
52099
  children: total
52098
52100
  }
@@ -52103,7 +52105,7 @@ var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
52103
52105
  className: (0, import_classnames89.default)(
52104
52106
  "font-medium leading-tight",
52105
52107
  tokens.center,
52106
- onGradient ? "text-white/70" : text.muted
52108
+ onGradient ? "text-white/70" : text2.muted
52107
52109
  ),
52108
52110
  children: dataset.centerLabel
52109
52111
  }
@@ -52147,7 +52149,7 @@ var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
52147
52149
  className: (0, import_classnames89.default)(
52148
52150
  "truncate transition-colors",
52149
52151
  tokens.legend,
52150
- onGradient ? "text-white/80" : text.body
52152
+ onGradient ? "text-white/80" : text2.body
52151
52153
  ),
52152
52154
  children: item.label
52153
52155
  }
@@ -52159,7 +52161,7 @@ var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
52159
52161
  className: (0, import_classnames89.default)(
52160
52162
  "flex-none font-bold",
52161
52163
  tokens.legend,
52162
- onGradient ? "text-white" : text.heading
52164
+ onGradient ? "text-white" : text2.heading
52163
52165
  ),
52164
52166
  children: item.value
52165
52167
  }
@@ -52214,14 +52216,14 @@ var StatChartTile_default = StatChartTile;
52214
52216
  var import_classnames90 = __toESM(require("classnames"), 1);
52215
52217
  var import_jsx_runtime275 = require("react/jsx-runtime");
52216
52218
  var Breakdown = ({ items, onGradient }) => {
52217
- const text = useSurfaceText();
52219
+ const text2 = useSurfaceText();
52218
52220
  return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)("div", { className: "mt-auto space-y-3 pt-4", children: items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime275.jsxs)("div", { className: "flex items-center justify-between text-sm", children: [
52219
52221
  /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
52220
52222
  "span",
52221
52223
  {
52222
52224
  className: (0, import_classnames90.default)(
52223
52225
  "font-medium",
52224
- onGradient ? "text-white/70" : text.muted
52226
+ onGradient ? "text-white/70" : text2.muted
52225
52227
  ),
52226
52228
  children: item.label
52227
52229
  }
@@ -52231,7 +52233,7 @@ var Breakdown = ({ items, onGradient }) => {
52231
52233
  {
52232
52234
  className: (0, import_classnames90.default)(
52233
52235
  "font-semibold",
52234
- item.color ? `text-${item.color}-600 dark:text-${item.color}-400` : onGradient ? "text-white" : text.body
52236
+ item.color ? `text-${item.color}-600 dark:text-${item.color}-400` : onGradient ? "text-white" : text2.body
52235
52237
  ),
52236
52238
  children: item.value
52237
52239
  }
@@ -52347,7 +52349,7 @@ var CircularProgress = ({ value, color, icon, label, size, strokeWidth, iconSize
52347
52349
  );
52348
52350
  };
52349
52351
  var Goals = ({ goals, tokens, ringSize, onGradient }) => {
52350
- const text = useSurfaceText();
52352
+ const text2 = useSurfaceText();
52351
52353
  return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("div", { className: "flex h-full flex-col justify-center", children: goals.map((goal, idx) => /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(import_react261.default.Fragment, { children: [
52352
52354
  /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(
52353
52355
  "div",
@@ -52378,7 +52380,7 @@ var Goals = ({ goals, tokens, ringSize, onGradient }) => {
52378
52380
  className: (0, import_classnames91.default)(
52379
52381
  "font-bold leading-none",
52380
52382
  tokens.value,
52381
- onGradient ? "text-white" : text.heading
52383
+ onGradient ? "text-white" : text2.heading
52382
52384
  ),
52383
52385
  children: [
52384
52386
  goal.value,
@@ -52392,7 +52394,7 @@ var Goals = ({ goals, tokens, ringSize, onGradient }) => {
52392
52394
  className: (0, import_classnames91.default)(
52393
52395
  "mt-1 font-medium",
52394
52396
  tokens.label,
52395
- onGradient ? "text-white/70" : text.muted
52397
+ onGradient ? "text-white/70" : text2.muted
52396
52398
  ),
52397
52399
  children: goal.label
52398
52400
  }
@@ -52406,7 +52408,7 @@ var Goals = ({ goals, tokens, ringSize, onGradient }) => {
52406
52408
  {
52407
52409
  className: (0, import_classnames91.default)(
52408
52410
  "my-1 h-px w-full border-t",
52409
- onGradient ? "border-white/20" : text.divider
52411
+ onGradient ? "border-white/20" : text2.divider
52410
52412
  )
52411
52413
  }
52412
52414
  )
@@ -52558,7 +52560,7 @@ var StatGraphTile = ({
52558
52560
  const resolvedChartType = chartType ?? (isChartType(variant) ? variant : "bar");
52559
52561
  const surfaceVariant = isChartType(variant) ? void 0 : variant;
52560
52562
  const resolvedTone = tone ?? color;
52561
- const text = useSurfaceText();
52563
+ const text2 = useSurfaceText();
52562
52564
  const isDark = useIsDarkMode();
52563
52565
  const [tooltip, setTooltip] = (0, import_react263.useState)(null);
52564
52566
  const wrapperRef = (0, import_react263.useRef)(null);
@@ -52671,13 +52673,13 @@ var StatGraphTile = ({
52671
52673
  {
52672
52674
  className: (0, import_classnames92.default)(
52673
52675
  "text-xs font-medium",
52674
- gradient ? "text-white/70" : text.muted
52676
+ gradient ? "text-white/70" : text2.muted
52675
52677
  ),
52676
52678
  children: s.label
52677
52679
  }
52678
52680
  )
52679
52681
  ] }, s.key)) });
52680
- }, [showLegend, resolvedChartType, resolvedSeries, getColor, gradient, text.muted]);
52682
+ }, [showLegend, resolvedChartType, resolvedSeries, getColor, gradient, text2.muted]);
52681
52683
  const axisColor = gradient ? "rgba(255,255,255,0.7)" : isDark ? "#94a3b8" : "#64748b";
52682
52684
  const gridColor = gradient ? "rgba(255,255,255,0.2)" : isDark ? "#334155" : "#e2e8f0";
52683
52685
  const renderChart = () => {
@@ -52825,7 +52827,7 @@ var StatGraphTile = ({
52825
52827
  className: (0, import_classnames92.default)(
52826
52828
  "font-bold",
52827
52829
  SPARK_VALUE[size] ?? SPARK_VALUE.md,
52828
- gradient ? "text-white" : text.heading
52830
+ gradient ? "text-white" : text2.heading
52829
52831
  ),
52830
52832
  children: props.value
52831
52833
  }
@@ -52835,7 +52837,7 @@ var StatGraphTile = ({
52835
52837
  {
52836
52838
  className: (0, import_classnames92.default)(
52837
52839
  "mt-1 text-sm",
52838
- gradient ? "text-white/70" : text.muted
52840
+ gradient ? "text-white/70" : text2.muted
52839
52841
  ),
52840
52842
  children: props.subtitle
52841
52843
  }
@@ -57595,8 +57597,8 @@ var TYPE_CONFIG = {
57595
57597
  var NotificationModalBody = ({
57596
57598
  children
57597
57599
  }) => {
57598
- const text = useSurfaceText();
57599
- return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("div", { className: (0, import_classnames99.default)("text-sm", text.body), children });
57600
+ const text2 = useSurfaceText();
57601
+ return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("div", { className: (0, import_classnames99.default)("text-sm", text2.body), children });
57600
57602
  };
57601
57603
  var NotificationModal = ({
57602
57604
  isOpen,
@@ -58781,8 +58783,8 @@ var nodeIsSkipped = (node) => node?.skipped ?? (node?.status === "skipped" ? tru
58781
58783
 
58782
58784
  // ../common/connectionFlow/measure.ts
58783
58785
  var rowHeight = (metrics, hasGlyph, hasSubtitle) => {
58784
- const text = metrics.titleLine + (hasSubtitle ? metrics.bodyLine : 0);
58785
- return hasGlyph ? Math.max(metrics.glyph, text) : text;
58786
+ const text2 = metrics.titleLine + (hasSubtitle ? metrics.bodyLine : 0);
58787
+ return hasGlyph ? Math.max(metrics.glyph, text2) : text2;
58786
58788
  };
58787
58789
  var measureHeader = (node, metrics) => {
58788
58790
  if (!node.title && !node.subtitle) return 0;
@@ -59756,14 +59758,14 @@ var MARGIN = 12;
59756
59758
  var LINE_HEIGHT = 14;
59757
59759
  var captionStub = (options) => 18 + options.cornerRadius;
59758
59760
  var captionEscape = (options) => 2 * captionStub(options) + MARGIN;
59759
- var captionTextWidth = (text) => Array.from(text).reduce(
59761
+ var captionTextWidth = (text2) => Array.from(text2).reduce(
59760
59762
  (sum, c) => sum + ((c.codePointAt(0) ?? 0) >= 11904 ? 12 : /[MW@%]/.test(c) ? 9 : /[ilI.,'!:;| ]/.test(c) ? 3.5 : 6.8),
59761
59763
  0
59762
59764
  );
59763
- function wrapCaption(text, width) {
59765
+ function wrapCaption(text2, width) {
59764
59766
  const lines = [];
59765
59767
  let line3 = "";
59766
- for (const paragraph of text.split(/\r?\n/u)) {
59768
+ for (const paragraph of text2.split(/\r?\n/u)) {
59767
59769
  for (const word of paragraph.split(/\s+/u).filter(Boolean)) {
59768
59770
  if (line3 && captionTextWidth(`${line3} ${word}`) <= width) {
59769
59771
  line3 += ` ${word}`;
@@ -59859,8 +59861,8 @@ function layoutCaptions(nodes, edges, connectors, options) {
59859
59861
  if (route && !segmentsCrossBoxes(route.points, [...nodes, ...boxes]) && (blocked || score(route.points) < score(edge.points)))
59860
59862
  Object.assign(edge, { points: route.points, d: route.d });
59861
59863
  };
59862
- const measure = (text, width, x, y) => {
59863
- const lines = wrapCaption(text, Math.max(10, width - 2 * PADDING));
59864
+ const measure = (text2, width, x, y) => {
59865
+ const lines = wrapCaption(text2, Math.max(10, width - 2 * PADDING));
59864
59866
  const measuredWidth = Math.min(
59865
59867
  width,
59866
59868
  Math.max(...lines.map(captionTextWidth)) + 2 * PADDING
@@ -59899,10 +59901,10 @@ function layoutCaptions(nodes, edges, connectors, options) {
59899
59901
  Object.assign(edge, local);
59900
59902
  }
59901
59903
  avoid(edge, reserved);
59902
- const text = edge.label;
59904
+ const text2 = edge.label;
59903
59905
  const readableWidth = Math.max(
59904
59906
  64,
59905
- Math.min(96, Math.max(...text.split(/\s+/u).map(captionTextWidth))) + 16
59907
+ Math.min(96, Math.max(...text2.split(/\s+/u).map(captionTextWidth))) + 16
59906
59908
  );
59907
59909
  const candidates = [];
59908
59910
  for (let i = 1; i < edge.points.length; i++) {
@@ -59936,7 +59938,7 @@ function layoutCaptions(nodes, edges, connectors, options) {
59936
59938
  );
59937
59939
  for (const candidate of candidates) {
59938
59940
  if (candidate.width < readableWidth) continue;
59939
- const base = measure(text, candidate.width, candidate.x, candidate.y);
59941
+ const base = measure(text2, candidate.width, candidate.x, candidate.y);
59940
59942
  const canMove = !candidate.vertical && candidate.segment > 0 && candidate.segment < edge.points.length - 2;
59941
59943
  const middle = nodes.reduce((sum, n) => sum + n.y + n.height / 2, 0) / Math.max(1, nodes.length);
59942
59944
  const direction = candidate.y >= middle ? 1 : -1;
@@ -59975,7 +59977,7 @@ function layoutCaptions(nodes, edges, connectors, options) {
59975
59977
  }
59976
59978
  if (!edge.caption) {
59977
59979
  const caption = measure(
59978
- text,
59980
+ text2,
59979
59981
  Math.min(240, Math.max(80, options.connectorWidth - 2 * MARGIN)),
59980
59982
  0,
59981
59983
  0
@@ -60046,9 +60048,9 @@ function captionSpacing(nodes, options) {
60046
60048
  };
60047
60049
  nodes.forEach(visit);
60048
60050
  const ranks = new Map(all.map((n, i) => [n.id, i]));
60049
- const reserve = (map, id, text) => {
60050
- if (!text) return;
60051
- const width = captionTextWidth(text);
60051
+ const reserve = (map, id, text2) => {
60052
+ if (!text2) return;
60053
+ const width = captionTextWidth(text2);
60052
60054
  if (width <= Math.max(48, options.connectorWidth - 40)) return;
60053
60055
  const budget = Math.min(
60054
60056
  240,
@@ -60062,7 +60064,7 @@ function captionSpacing(nodes, options) {
60062
60064
  ),
60063
60065
  vertical: Math.max(
60064
60066
  old?.vertical ?? 0,
60065
- wrapCaption(text, budget).length * LINE_HEIGHT + PADDING + 2 * (captionEscape(options) + MARGIN)
60067
+ wrapCaption(text2, budget).length * LINE_HEIGHT + PADDING + 2 * (captionEscape(options) + MARGIN)
60066
60068
  )
60067
60069
  });
60068
60070
  };
@@ -67082,11 +67084,11 @@ function buildTimeScale(rangeStart, rangeEnd, pxPerDay, locale) {
67082
67084
  const columns = seeds.filter((s) => s.end > rangeStart && s.start < rangeEnd).map((s, i) => {
67083
67085
  const clampedStart = Math.max(s.start, rangeStart);
67084
67086
  const clampedEnd = Math.min(s.end, rangeEnd);
67085
- const text = labelOf(s.start);
67087
+ const text2 = labelOf(s.start);
67086
67088
  return {
67087
67089
  id: `${id}-${i}`,
67088
- label: text.label,
67089
- subLabel: text.subLabel,
67090
+ label: text2.label,
67091
+ subLabel: text2.subLabel,
67090
67092
  start: clampedStart,
67091
67093
  end: clampedEnd,
67092
67094
  width: (clampedEnd - clampedStart) / MS_PER_DAY * pxPerDay
@@ -70867,7 +70869,7 @@ var Avatars = ({ users }) => {
70867
70869
  )) });
70868
70870
  };
70869
70871
  var TaskBoardCardBody = ({ card }) => {
70870
- const { surface, size, cardLayout, priorities, locale, text } = useTaskBoard();
70872
+ const { surface, size, cardLayout, priorities, locale, text: text2 } = useTaskBoard();
70871
70873
  const priority = card.priority ? priorities.get(card.priority) : void 0;
70872
70874
  const due = formatDue(card.due, locale);
70873
70875
  const plainChip = (0, import_classnames127.default)("bg-black/5 dark:bg-white/10", surface.muted);
@@ -70924,12 +70926,12 @@ var TaskBoardCardBody = ({ card }) => {
70924
70926
  (hasMeta || card.assignees?.length) && /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "flex items-end gap-2", children: [
70925
70927
  /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: (0, import_classnames127.default)("flex min-w-0 flex-1 flex-wrap items-center gap-2", size.meta, surface.muted), children: [
70926
70928
  priorityChip,
70927
- card.description && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("span", { title: text("notes"), "aria-label": text("notes"), role: "img", children: /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(Details, { className: "h-3.5 w-3.5", "aria-hidden": "true" }) }),
70929
+ card.description && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)("span", { title: text2("notes"), "aria-label": text2("notes"), role: "img", children: /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(Details, { className: "h-3.5 w-3.5", "aria-hidden": "true" }) }),
70928
70930
  card.checklist && /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(
70929
70931
  "span",
70930
70932
  {
70931
70933
  className: "inline-flex items-center gap-1",
70932
- title: text("checklist", { done: card.checklist.done, total: card.checklist.total }),
70934
+ title: text2("checklist", { done: card.checklist.done, total: card.checklist.total }),
70933
70935
  children: [
70934
70936
  /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(CheckCircle, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
70935
70937
  card.checklist.done,
@@ -70938,7 +70940,7 @@ var TaskBoardCardBody = ({ card }) => {
70938
70940
  ]
70939
70941
  }
70940
70942
  ),
70941
- due && /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("span", { "data-card-due": true, className: "inline-flex items-center gap-1", title: text("due", { date: due }), children: [
70943
+ due && /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("span", { "data-card-due": true, className: "inline-flex items-center gap-1", title: text2("due", { date: due }), children: [
70942
70944
  /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(Calendar, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
70943
70945
  due
70944
70946
  ] })
@@ -71041,7 +71043,7 @@ TaskBoardCard.displayName = "TaskBoardCard";
71041
71043
  // src/components/TaskBoard/TaskBoardBucket.tsx
71042
71044
  var import_jsx_runtime320 = require("react/jsx-runtime");
71043
71045
  var TaskBoardBucket = ({ column, lane, cards, className, label }) => {
71044
- const { cardState, cardProps, dropTarget, size, text } = useTaskBoard();
71046
+ const { cardState, cardProps, dropTarget, size, text: text2 } = useTaskBoard();
71045
71047
  const key = bucketKey(column, lane);
71046
71048
  const target = dropTarget && dropTarget.bucket === key ? dropTarget : null;
71047
71049
  return /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
@@ -71053,7 +71055,7 @@ var TaskBoardBucket = ({ column, lane, cards, className, label }) => {
71053
71055
  "data-bucket-column": column,
71054
71056
  "data-bucket-lane": lane ?? "",
71055
71057
  "data-drop": target ? target.valid ? "valid" : "invalid" : void 0,
71056
- title: target && !target.valid ? text("notAllowed") : void 0,
71058
+ title: target && !target.valid ? text2("notAllowed") : void 0,
71057
71059
  className: (0, import_classnames128.default)(
71058
71060
  "flex min-h-12 flex-col rounded-lg transition-colors",
71059
71061
  size.gap,
@@ -71125,7 +71127,7 @@ var TaskBoardAddColumn = ({
71125
71127
  onAdd,
71126
71128
  variant
71127
71129
  }) => {
71128
- const { text, surface, color, size, columnCornerClass } = useTaskBoard();
71130
+ const { text: text2, surface, color, size, columnCornerClass } = useTaskBoard();
71129
71131
  const [editing, setEditing] = (0, import_react296.useState)(false);
71130
71132
  const [title, setTitle] = (0, import_react296.useState)("");
71131
71133
  const trigger = getSurfaceTriggerTokens(color);
@@ -71152,8 +71154,8 @@ var TaskBoardAddColumn = ({
71152
71154
  "input",
71153
71155
  {
71154
71156
  autoFocus: true,
71155
- "aria-label": text("columnName"),
71156
- placeholder: text("columnName"),
71157
+ "aria-label": text2("columnName"),
71158
+ placeholder: text2("columnName"),
71157
71159
  value: title,
71158
71160
  onChange: (e) => setTitle(e.target.value),
71159
71161
  onKeyDown: (e) => {
@@ -71186,7 +71188,7 @@ var TaskBoardAddColumn = ({
71186
71188
  ),
71187
71189
  children: [
71188
71190
  /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(Add, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
71189
- text("addColumn")
71191
+ text2("addColumn")
71190
71192
  ]
71191
71193
  }
71192
71194
  )
@@ -71263,7 +71265,7 @@ function fromDraft(column, d) {
71263
71265
  }
71264
71266
  var limitValid = (wip) => wip.trim() === "" || Number.isInteger(Number(wip)) && Number(wip) >= 1;
71265
71267
  var TaskBoardColumnEditButton = ({ column }) => {
71266
- const { onEditColumn, allColumns, text, surface, color } = useTaskBoard();
71268
+ const { onEditColumn, allColumns, text: text2, surface, color } = useTaskBoard();
71267
71269
  const [open, setOpen] = (0, import_react297.useState)(false);
71268
71270
  const [draft, setDraft] = (0, import_react297.useState)(() => toDraft(column));
71269
71271
  const id = (0, import_react297.useId)();
@@ -71290,7 +71292,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
71290
71292
  "button",
71291
71293
  {
71292
71294
  type: "button",
71293
- "aria-label": text("editColumn", { name: column.title }),
71295
+ "aria-label": text2("editColumn", { name: column.title }),
71294
71296
  className: (0, import_classnames130.default)("shrink-0 rounded p-1", surface.muted, trigger.hover, trigger.focusRing),
71295
71297
  children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(Edit, { className: "h-3.5 w-3.5", "aria-hidden": "true" })
71296
71298
  }
@@ -71308,8 +71310,8 @@ var TaskBoardColumnEditButton = ({ column }) => {
71308
71310
  Input_default,
71309
71311
  {
71310
71312
  size: "sm",
71311
- "aria-label": text("columnName"),
71312
- placeholder: text("columnName"),
71313
+ "aria-label": text2("columnName"),
71314
+ placeholder: text2("columnName"),
71313
71315
  value: draft.title,
71314
71316
  onChange: (e) => setDraft({ ...draft, title: e.target.value }),
71315
71317
  onKeyDown: (e) => {
@@ -71321,7 +71323,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
71321
71323
  }
71322
71324
  ),
71323
71325
  /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
71324
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("span", { className: (0, import_classnames130.default)("text-xs font-semibold", surface.muted), children: text("columnColor") }),
71326
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("span", { className: (0, import_classnames130.default)("text-xs font-semibold", surface.muted), children: text2("columnColor") }),
71325
71327
  /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
71326
71328
  ColorSwatches,
71327
71329
  {
@@ -71334,7 +71336,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
71334
71336
  )
71335
71337
  ] }),
71336
71338
  /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "flex flex-col gap-1", children: [
71337
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("label", { htmlFor: `${id}-wip`, className: (0, import_classnames130.default)("text-xs font-semibold", surface.muted), children: text("wipLimit") }),
71339
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("label", { htmlFor: `${id}-wip`, className: (0, import_classnames130.default)("text-xs font-semibold", surface.muted), children: text2("wipLimit") }),
71338
71340
  /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
71339
71341
  Input_default,
71340
71342
  {
@@ -71343,7 +71345,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
71343
71345
  type: "number",
71344
71346
  min: 1,
71345
71347
  inputMode: "numeric",
71346
- placeholder: text("wipLimitHint"),
71348
+ placeholder: text2("wipLimitHint"),
71347
71349
  value: draft.wip,
71348
71350
  onChange: (e) => setDraft({ ...draft, wip: e.target.value }),
71349
71351
  "aria-invalid": !limitValid(draft.wip) || void 0
@@ -71351,7 +71353,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
71351
71353
  )
71352
71354
  ] }),
71353
71355
  /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "flex flex-col gap-1", children: [
71354
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("label", { htmlFor: `${id}-max`, className: (0, import_classnames130.default)("text-xs font-semibold", surface.muted), children: text("maxItems") }),
71356
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("label", { htmlFor: `${id}-max`, className: (0, import_classnames130.default)("text-xs font-semibold", surface.muted), children: text2("maxItems") }),
71355
71357
  /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
71356
71358
  Input_default,
71357
71359
  {
@@ -71360,7 +71362,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
71360
71362
  type: "number",
71361
71363
  min: 1,
71362
71364
  inputMode: "numeric",
71363
- placeholder: text("maxItemsHint"),
71365
+ placeholder: text2("maxItemsHint"),
71364
71366
  value: draft.max,
71365
71367
  onChange: (e) => setDraft({ ...draft, max: e.target.value }),
71366
71368
  "aria-invalid": !limitValid(draft.max) || void 0
@@ -71371,14 +71373,14 @@ var TaskBoardColumnEditButton = ({ column }) => {
71371
71373
  Toggle_default,
71372
71374
  {
71373
71375
  size: "sm",
71374
- label: text("lockColumn"),
71375
- description: text("lockColumnHint"),
71376
+ label: text2("lockColumn"),
71377
+ description: text2("lockColumnHint"),
71376
71378
  checked: draft.locked,
71377
71379
  onChange: (e) => setDraft({ ...draft, locked: e.target.checked })
71378
71380
  }
71379
71381
  ),
71380
71382
  others.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("fieldset", { className: "flex flex-col gap-1.5", children: [
71381
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("legend", { className: (0, import_classnames130.default)("mb-1 text-xs font-semibold", surface.muted), children: text("acceptsFrom") }),
71383
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("legend", { className: (0, import_classnames130.default)("mb-1 text-xs font-semibold", surface.muted), children: text2("acceptsFrom") }),
71382
71384
  others.map((c) => /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
71383
71385
  Checkbox_default,
71384
71386
  {
@@ -71392,11 +71394,11 @@ var TaskBoardColumnEditButton = ({ column }) => {
71392
71394
  },
71393
71395
  c.id
71394
71396
  )),
71395
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("span", { className: (0, import_classnames130.default)("text-[11px]", surface.muted), children: text("acceptsAny") })
71397
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("span", { className: (0, import_classnames130.default)("text-[11px]", surface.muted), children: text2("acceptsAny") })
71396
71398
  ] }),
71397
71399
  /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "flex justify-end gap-2 pt-1", children: [
71398
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(Button_default, { type: "button", size: "sm", variant: "soft", color: "slate", onClick: () => setOpen(false), children: text("cancel") }),
71399
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(Button_default, { type: "submit", size: "sm", color, disabled: !valid, children: text("save") })
71400
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(Button_default, { type: "button", size: "sm", variant: "soft", color: "slate", onClick: () => setOpen(false), children: text2("cancel") }),
71401
+ /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(Button_default, { type: "submit", size: "sm", color, disabled: !valid, children: text2("save") })
71400
71402
  ] })
71401
71403
  ]
71402
71404
  }
@@ -71418,7 +71420,7 @@ var TaskBoardColumn = ({
71418
71420
  index = 0,
71419
71421
  onToggle
71420
71422
  }) => {
71421
- const { surface, text, color, size, wellSurface, columnCornerClass, onAddCard, draggingColumnId, boardMaxItems, dropTarget } = useTaskBoard();
71423
+ const { surface, text: text2, color, size, wellSurface, columnCornerClass, onAddCard, draggingColumnId, boardMaxItems, dropTarget } = useTaskBoard();
71422
71424
  const refused = Boolean(dropTarget && !dropTarget.valid && dropTarget.bucket === bucketKey(column.id, null));
71423
71425
  const max = effectiveMaxItems(column, boardMaxItems);
71424
71426
  const full = max !== void 0 && count >= max;
@@ -71435,7 +71437,7 @@ var TaskBoardColumn = ({
71435
71437
  type: "button",
71436
71438
  onClick: onToggle,
71437
71439
  "aria-expanded": !column.collapsed,
71438
- "aria-label": text(column.collapsed ? "expand" : "collapse", {
71440
+ "aria-label": text2(column.collapsed ? "expand" : "collapse", {
71439
71441
  name: column.title
71440
71442
  }),
71441
71443
  className: (0, import_classnames131.default)(
@@ -71459,7 +71461,7 @@ var TaskBoardColumn = ({
71459
71461
  "span",
71460
71462
  {
71461
71463
  "data-column-count": true,
71462
- title: column.wipLimit !== void 0 ? text("wip", { count, limit: column.wipLimit }) : void 0,
71464
+ title: column.wipLimit !== void 0 ? text2("wip", { count, limit: column.wipLimit }) : void 0,
71463
71465
  className: (0, import_classnames131.default)(
71464
71466
  "text-xs font-semibold tabular-nums",
71465
71467
  wip === "full" || wip === "over" || full ? tokens.wipFull : surface.muted
@@ -71562,7 +71564,7 @@ var TaskBoardColumn = ({
71562
71564
  column: column.id,
71563
71565
  lane: null,
71564
71566
  cards,
71565
- label: `${column.title}, ${text("cardCount", { count: cards.length })}`
71567
+ label: `${column.title}, ${text2("cardCount", { count: cards.length })}`
71566
71568
  }
71567
71569
  )
71568
71570
  }
@@ -71580,7 +71582,7 @@ var TaskBoardColumn = ({
71580
71582
  ),
71581
71583
  children: [
71582
71584
  /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(Add, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
71583
- text("addCard")
71585
+ text2("addCard")
71584
71586
  ]
71585
71587
  }
71586
71588
  )
@@ -71606,7 +71608,7 @@ var TaskBoardHeader = ({
71606
71608
  people,
71607
71609
  variant
71608
71610
  }) => {
71609
- const { surface, text } = useTaskBoard();
71611
+ const { surface, text: text2 } = useTaskBoard();
71610
71612
  const shown = people?.slice(0, MAX_AVATARS) ?? [];
71611
71613
  const extra = (people?.length ?? 0) - shown.length;
71612
71614
  return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(
@@ -71636,7 +71638,7 @@ var TaskBoardHeader = ({
71636
71638
  {
71637
71639
  "data-taskboard-people": true,
71638
71640
  role: "group",
71639
- "aria-label": text("online", { count: people.length }),
71641
+ "aria-label": text2("online", { count: people.length }),
71640
71642
  className: "flex items-center -space-x-2",
71641
71643
  children: [
71642
71644
  shown.map((p) => /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
@@ -71674,7 +71676,7 @@ var TaskBoardLaneGrid = ({
71674
71676
  onToggleColumn,
71675
71677
  onAddColumn
71676
71678
  }) => {
71677
- const { surface, text, color, size, stickySurface, draggingColumnId, boardMaxItems } = useTaskBoard();
71679
+ const { surface, text: text2, color, size, stickySurface, draggingColumnId, boardMaxItems } = useTaskBoard();
71678
71680
  const fullColumns = new Set(columns.filter((c) => columnAtMax(cards, c, boardMaxItems)).map((c) => c.id));
71679
71681
  const trigger = getSurfaceTriggerTokens(color);
71680
71682
  const template = [
@@ -71689,7 +71691,7 @@ var TaskBoardLaneGrid = ({
71689
71691
  type: "button",
71690
71692
  onClick,
71691
71693
  "aria-expanded": !collapsed,
71692
- "aria-label": text(collapsed ? "expand" : "collapse", { name }),
71694
+ "aria-label": text2(collapsed ? "expand" : "collapse", { name }),
71693
71695
  className: (0, import_classnames133.default)("rounded p-1", surface.muted, trigger.hover, trigger.focusRing),
71694
71696
  children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
71695
71697
  ChevronRight,
@@ -71775,7 +71777,7 @@ var TaskBoardLaneRow = ({
71775
71777
  trailingCell,
71776
71778
  fullColumns
71777
71779
  }) => {
71778
- const { surface, text, color, stickySurface, onAddCard, dropTarget } = useTaskBoard();
71780
+ const { surface, text: text2, color, stickySurface, onAddCard, dropTarget } = useTaskBoard();
71779
71781
  const refusedBucket = dropTarget && !dropTarget.valid ? dropTarget.bucket : null;
71780
71782
  const trigger = getSurfaceTriggerTokens(color);
71781
71783
  const open = !lane.collapsed;
@@ -71826,7 +71828,7 @@ var TaskBoardLaneRow = ({
71826
71828
  {
71827
71829
  type: "button",
71828
71830
  onClick: () => onAddCard({ column: col.id, lane: lane.id }),
71829
- "aria-label": `${text("addCard")} \u2014 ${col.title}, ${lane.title}`,
71831
+ "aria-label": `${text2("addCard")} \u2014 ${col.title}, ${lane.title}`,
71830
71832
  className: (0, import_classnames133.default)(
71831
71833
  "flex items-center justify-center rounded-md py-1 opacity-60 hover:opacity-100 focus-visible:opacity-100",
71832
71834
  surface.muted,
@@ -72181,7 +72183,7 @@ function useTaskBoardDrag(opts) {
72181
72183
  var import_react299 = require("react");
72182
72184
  var isRtl = (el) => el?.closest("[dir]")?.getAttribute("dir") === "rtl";
72183
72185
  function useTaskBoardKeyboard(o) {
72184
- const { rootRef, cards, viewCards, columns, lanes, text, drag } = o;
72186
+ const { rootRef, cards, viewCards, columns, lanes, text: text2, drag } = o;
72185
72187
  const [message, setMessage] = (0, import_react299.useState)("");
72186
72188
  const [activeId, setActiveId] = (0, import_react299.useState)(null);
72187
72189
  const [ownSelection, setOwnSelection] = (0, import_react299.useState)([]);
@@ -72208,9 +72210,9 @@ function useTaskBoardKeyboard(o) {
72208
72210
  const total = (others.get(bucketKey(to.column, to.lane))?.length ?? 0) + 1;
72209
72211
  const values = { column: columnTitle(to.column), index: to.index + 1, total };
72210
72212
  const lane = to.lane ? lanes?.find((l) => l.id === to.lane)?.title : void 0;
72211
- announce(lane ? text("movedLane", { ...values, lane }) : text("moved", values));
72213
+ announce(lane ? text2("movedLane", { ...values, lane }) : text2("moved", values));
72212
72214
  },
72213
- [announce, cards, columns, lanes, columnTitle, text]
72215
+ [announce, cards, columns, lanes, columnTitle, text2]
72214
72216
  );
72215
72217
  const setSelection = (0, import_react299.useCallback)(
72216
72218
  (ids) => {
@@ -72310,20 +72312,20 @@ function useTaskBoardKeyboard(o) {
72310
72312
  e.preventDefault();
72311
72313
  const target = drag.to ?? drag.from;
72312
72314
  refocusRef.current = card.id;
72313
- announce(text("dropped", { title: card.title, column: columnTitle(target.column) }));
72315
+ announce(text2("dropped", { title: card.title, column: columnTitle(target.column) }));
72314
72316
  void o.finish().then((ok) => {
72315
72317
  if (!ok && (target.column !== drag.from.column || target.lane !== drag.from.lane || target.index !== drag.from.index)) {
72316
- announce(text("cancelled"));
72318
+ announce(text2("cancelled"));
72317
72319
  }
72318
72320
  });
72319
72321
  } else if (e.key === "Escape") {
72320
72322
  e.preventDefault();
72321
72323
  refocusRef.current = card.id;
72322
72324
  o.cancel("escape");
72323
- announce(text("cancelled"));
72325
+ announce(text2("cancelled"));
72324
72326
  } else if (e.key === "Tab") {
72325
72327
  o.cancel("blur");
72326
- announce(text("cancelled"));
72328
+ announce(text2("cancelled"));
72327
72329
  } else if (e.key === "Enter") {
72328
72330
  e.preventDefault();
72329
72331
  }
@@ -72333,7 +72335,7 @@ function useTaskBoardKeyboard(o) {
72333
72335
  e.preventDefault();
72334
72336
  if (o.keyboardGrab(card, slot)) {
72335
72337
  refocusRef.current = card.id;
72336
- announce(text("grabbed", { title: card.title }));
72338
+ announce(text2("grabbed", { title: card.title }));
72337
72339
  }
72338
72340
  return;
72339
72341
  }
@@ -72359,7 +72361,7 @@ function useTaskBoardKeyboard(o) {
72359
72361
  }
72360
72362
  }
72361
72363
  }),
72362
- [tabStop, selection, setSelection, viewBuckets, drag, cards, columns, lanes, o, announceSlot, announce, text, columnTitle, focusStep]
72364
+ [tabStop, selection, setSelection, viewBuckets, drag, cards, columns, lanes, o, announceSlot, announce, text2, columnTitle, focusStep]
72363
72365
  );
72364
72366
  return { cardProps, message, selection, announce };
72365
72367
  }
@@ -72870,7 +72872,7 @@ var TaskBoardBody = (props) => {
72870
72872
  surfaceVariant
72871
72873
  } = props;
72872
72874
  const surface = useSurfaceText();
72873
- const text = useTaskBoardText(labels);
72875
+ const text2 = useTaskBoardText(labels);
72874
72876
  const { locale } = useKitEngine();
72875
72877
  const sizeTokens12 = TASKBOARD_SIZES[size] ?? TASKBOARD_SIZES.md;
72876
72878
  const wellSurface = surface.translucent ? GLASS_WELL : SOLID_WELL;
@@ -72903,8 +72905,8 @@ var TaskBoardBody = (props) => {
72903
72905
  if (!holder || holder === selfId) return;
72904
72906
  const peer = collab.userById(holder);
72905
72907
  cancel("held");
72906
- setNotice({ cardId: drag.cardId, text: text("heldShort", { name: peer.name }), color: peer.color ?? peerColor(peer.id) });
72907
- }, [collab, drag, selfId, cancel, text]);
72908
+ setNotice({ cardId: drag.cardId, text: text2("heldShort", { name: peer.name }), color: peer.color ?? peerColor(peer.id) });
72909
+ }, [collab, drag, selfId, cancel, text2]);
72908
72910
  (0, import_react305.useEffect)(() => {
72909
72911
  if (!notice) return;
72910
72912
  const t = setTimeout(() => setNotice(null), NOTICE_MS);
@@ -72916,7 +72918,7 @@ var TaskBoardBody = (props) => {
72916
72918
  viewCards: previewCards,
72917
72919
  columns,
72918
72920
  lanes: viewLanes,
72919
- text,
72921
+ text: text2,
72920
72922
  drag,
72921
72923
  keyboardGrab,
72922
72924
  keyboardMove,
@@ -72935,7 +72937,7 @@ var TaskBoardBody = (props) => {
72935
72937
  rootRef,
72936
72938
  columns,
72937
72939
  enabled: columnEditing,
72938
- text,
72940
+ text: text2,
72939
72941
  announce: keyboard.announce,
72940
72942
  onCommit: (next) => onColumnsChange?.(next)
72941
72943
  });
@@ -72956,7 +72958,7 @@ var TaskBoardBody = (props) => {
72956
72958
  );
72957
72959
  const ctx = (0, import_react305.useMemo)(
72958
72960
  () => ({
72959
- text,
72961
+ text: text2,
72960
72962
  surface,
72961
72963
  color,
72962
72964
  size: sizeTokens12,
@@ -72989,7 +72991,7 @@ var TaskBoardBody = (props) => {
72989
72991
  cardProps: (card, slot) => ({ ...isEditable ? cardHandlers(card, slot) : {}, ...keyboardProps(card, slot) }),
72990
72992
  dropTarget: drag?.to && !drag.valid ? { bucket: bucketKey(drag.to.column, drag.to.lane), index: drag.to.index, valid: false } : null
72991
72993
  }),
72992
- [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]
72994
+ [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]
72993
72995
  );
72994
72996
  const buckets = (0, import_react305.useMemo)(() => bucketCards(previewCards, columns, viewLanes), [previewCards, columns, viewLanes]);
72995
72997
  const draggedCard = drag ? cards.find((c) => c.id === drag.cardId) : void 0;
@@ -73010,12 +73012,12 @@ var TaskBoardBody = (props) => {
73010
73012
  );
73011
73013
  } else if (error) {
73012
73014
  content = /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)("div", { role: "alert", className: "flex flex-1 flex-col items-center justify-center gap-3 p-10 text-center", children: [
73013
- /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("p", { className: (0, import_classnames137.default)("text-sm font-medium", surface.body), children: error === true ? text("error") : error }),
73014
- onRetry && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(Button_default, { size: "sm", variant: "outline", color, onClick: onRetry, children: text("retry") })
73015
+ /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("p", { className: (0, import_classnames137.default)("text-sm font-medium", surface.body), children: error === true ? text2("error") : error }),
73016
+ onRetry && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(Button_default, { size: "sm", variant: "outline", color, onClick: onRetry, children: text2("retry") })
73015
73017
  ] });
73016
73018
  } else {
73017
73019
  content = /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)("div", { className: "flex min-h-0 flex-1 flex-col", children: [
73018
- cards.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("div", { "data-taskboard-empty": true, className: (0, import_classnames137.default)("px-4 pt-4 text-center text-sm", surface.muted), children: emptyState ?? text("empty") }),
73020
+ cards.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("div", { "data-taskboard-empty": true, className: (0, import_classnames137.default)("px-4 pt-4 text-center text-sm", surface.muted), children: emptyState ?? text2("empty") }),
73019
73021
  laneView ? /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
73020
73022
  TaskBoardLaneGrid,
73021
73023
  {
@@ -73062,7 +73064,7 @@ var TaskBoardBody = (props) => {
73062
73064
  role: "application",
73063
73065
  "aria-roledescription": "task board",
73064
73066
  "aria-busy": loading ? true : void 0,
73065
- "aria-label": text("root"),
73067
+ "aria-label": text2("root"),
73066
73068
  className: "flex h-full min-h-0 flex-col",
73067
73069
  children: [
73068
73070
  /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("div", { "data-taskboard-live": true, "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: keyboard.message }),
@@ -73833,12 +73835,365 @@ function hasZone(node) {
73833
73835
  return node != null && node !== false;
73834
73836
  }
73835
73837
 
73836
- // src/contexts/BottomSheetContext.tsx
73838
+ // src/components/Menu/Menu.tsx
73839
+ var import_react311 = __toESM(require("react"), 1);
73840
+ var import_react_router_dom3 = require("react-router-dom");
73841
+ var import_classnames142 = __toESM(require("classnames"), 1);
73842
+
73843
+ // src/components/Menu/MenuPopup.tsx
73837
73844
  var import_react310 = require("react");
73838
73845
  var import_react_dom19 = require("react-dom");
73839
- var import_classnames142 = __toESM(require("classnames"), 1);
73840
73846
  var import_jsx_runtime335 = require("react/jsx-runtime");
73841
- var BottomSheetContext = (0, import_react310.createContext)(null);
73847
+ function MenuPopup({ anchor, placement, width, children }) {
73848
+ const ref = (0, import_react310.useRef)(null);
73849
+ const [style, setStyle] = (0, import_react310.useState)({ visibility: "hidden" });
73850
+ (0, import_react310.useLayoutEffect)(() => {
73851
+ const update = () => {
73852
+ if (!anchor.current || !ref.current) return;
73853
+ const trigger = anchor.current.getBoundingClientRect();
73854
+ const rect = ref.current.getBoundingClientRect();
73855
+ const position = resolveTooltipPlacement({
73856
+ trigger: { left: trigger.left, top: trigger.top, width: trigger.width, height: trigger.height },
73857
+ tooltip: { width: rect.width, height: rect.height },
73858
+ viewport: { width: window.innerWidth, height: window.innerHeight },
73859
+ preferred: placement,
73860
+ align: "grow",
73861
+ offset: 4
73862
+ });
73863
+ setStyle({ left: position.left, top: position.top, zIndex: resolveOverlayZIndex(anchor.current), visibility: "visible" });
73864
+ };
73865
+ update();
73866
+ const observer = typeof ResizeObserver !== "undefined" ? new ResizeObserver(update) : null;
73867
+ if (ref.current) observer?.observe(ref.current);
73868
+ if (anchor.current) observer?.observe(anchor.current);
73869
+ window.addEventListener("resize", update);
73870
+ window.addEventListener("scroll", update, true);
73871
+ return () => {
73872
+ observer?.disconnect();
73873
+ window.removeEventListener("resize", update);
73874
+ window.removeEventListener("scroll", update, true);
73875
+ };
73876
+ }, [anchor, placement, width]);
73877
+ if (typeof document === "undefined") return null;
73878
+ return (0, import_react_dom19.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { ref, style: { position: "fixed", width, maxWidth: "calc(100vw - 16px)", ...style }, children }), document.body);
73879
+ }
73880
+
73881
+ // src/components/Menu/Menu.tsx
73882
+ var import_jsx_runtime336 = require("react/jsx-runtime");
73883
+ 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" };
73884
+ var text = (item) => item.textValue ?? (typeof item.label === "string" ? item.label : item.id);
73885
+ function MenuList({ items, state, depth = 0, parentLabel, onBack, focusOnMount = false, grouped = false }) {
73886
+ const list = (0, import_react311.useRef)(null);
73887
+ const buffer = (0, import_react311.useRef)("");
73888
+ const timer = (0, import_react311.useRef)(void 0);
73889
+ const actions = () => Array.from(list.current?.querySelectorAll("[data-menu-action]") ?? []).filter((el) => el.closest('[role="menu"]') === list.current && el.getAttribute("aria-disabled") !== "true");
73890
+ (0, import_react311.useLayoutEffect)(() => {
73891
+ if (grouped) return;
73892
+ const entries = actions();
73893
+ const selected = entries.find((el) => el === document.activeElement) ?? entries[0];
73894
+ entries.forEach((el) => {
73895
+ el.tabIndex = el === selected ? 0 : -1;
73896
+ });
73897
+ }, [items, grouped]);
73898
+ (0, import_react311.useLayoutEffect)(() => {
73899
+ if (!focusOnMount) return;
73900
+ const frame = requestAnimationFrame(() => actions()[0]?.focus());
73901
+ return () => cancelAnimationFrame(frame);
73902
+ }, [focusOnMount]);
73903
+ (0, import_react311.useEffect)(() => () => clearTimeout(timer.current), []);
73904
+ return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
73905
+ "ul",
73906
+ {
73907
+ ref: list,
73908
+ id: depth === 0 && !grouped ? `${state.owner}-menu` : void 0,
73909
+ role: grouped ? "group" : "menu",
73910
+ "aria-label": parentLabel ?? state.props["aria-label"] ?? "Menu",
73911
+ className: "m-0 list-none space-y-0.5 p-0",
73912
+ onFocusCapture: (event) => {
73913
+ const entries = actions();
73914
+ entries.forEach((el) => {
73915
+ el.tabIndex = el === event.target ? 0 : -1;
73916
+ });
73917
+ },
73918
+ onKeyDown: (event) => {
73919
+ if (event.target.closest('[role="menu"]') !== list.current) return;
73920
+ const entries = actions();
73921
+ const index = entries.indexOf(document.activeElement);
73922
+ let next;
73923
+ if (event.key === "ArrowDown") next = (index + 1) % entries.length;
73924
+ if (event.key === "ArrowUp") next = (index - 1 + entries.length) % entries.length;
73925
+ if (event.key === "Home") next = 0;
73926
+ if (event.key === "End") next = entries.length - 1;
73927
+ if (next !== void 0) {
73928
+ event.preventDefault();
73929
+ event.stopPropagation();
73930
+ entries[next]?.focus();
73931
+ return;
73932
+ }
73933
+ if (event.key === "Escape" || event.key === "ArrowLeft") {
73934
+ if (onBack) {
73935
+ event.preventDefault();
73936
+ event.stopPropagation();
73937
+ onBack();
73938
+ } else if (event.key === "Escape") {
73939
+ event.preventDefault();
73940
+ state.close(true);
73941
+ }
73942
+ return;
73943
+ }
73944
+ if (event.key === "Tab") {
73945
+ state.close(false);
73946
+ return;
73947
+ }
73948
+ if (event.key.length === 1 && event.key !== " " && !event.ctrlKey && !event.metaKey && !event.altKey) {
73949
+ clearTimeout(timer.current);
73950
+ buffer.current += event.key.toLocaleLowerCase();
73951
+ const ordered = [...entries.slice(index + 1), ...entries.slice(0, index + 1)];
73952
+ ordered.find((el) => el.dataset.menuText?.toLocaleLowerCase().startsWith(buffer.current))?.focus();
73953
+ timer.current = setTimeout(() => {
73954
+ buffer.current = "";
73955
+ }, 600);
73956
+ }
73957
+ },
73958
+ children: items.filter((item) => !item.hidden).map((item) => /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(MenuRow, { item, state, depth }, item.id))
73959
+ }
73960
+ );
73961
+ }
73962
+ function MenuRow({ item, state, depth }) {
73963
+ const anchor = (0, import_react311.useRef)(null);
73964
+ const { props } = state;
73965
+ const tiered = (item.submenuMode ?? props.submenuMode) === "tiered";
73966
+ const nested = Boolean(item.items?.some((child) => !child.hidden) || item.content != null);
73967
+ const expanded = tiered ? state.path[depth] === item.id : state.expanded.includes(item.id);
73968
+ const label = text(item);
73969
+ const id = (0, import_react311.useId)();
73970
+ const open = (keyboard) => {
73971
+ if (item.disabled || !nested) return;
73972
+ state.keyboard.current = keyboard;
73973
+ if (tiered) state.setPath([...state.path.slice(0, depth), item.id]);
73974
+ else if (!expanded) state.toggle(item.id);
73975
+ else if (keyboard) document.getElementById(`${id}-submenu`)?.querySelector("[data-menu-action]:not([aria-disabled='true'])")?.focus();
73976
+ };
73977
+ const back = () => {
73978
+ if (tiered) state.setPath(state.path.slice(0, depth));
73979
+ else state.toggle(item.id);
73980
+ anchor.current?.focus();
73981
+ };
73982
+ if (item.type === "separator") return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("li", { role: "separator", className: "my-1.5 border-t border-neutral-200 dark:border-white/10" });
73983
+ if (item.type === "group") return /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)("li", { role: "presentation", children: [
73984
+ item.label && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { className: "px-3 pb-1 pt-3 text-xs font-semibold text-neutral-500 dark:text-neutral-400", children: item.label }),
73985
+ item.items && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(MenuList, { items: item.disabled ? item.items.map((child) => ({ ...child, disabled: true })) : item.items, state, depth, parentLabel: label, grouped: true })
73986
+ ] });
73987
+ const itemTone2 = item.tone ?? props.itemTone ?? props.tone ?? "neutral";
73988
+ const itemPadding = item.padding ?? props.itemPadding;
73989
+ const tokens = getSideMenuItemTokens(itemTone2);
73990
+ const checkable = item.type === "checkbox" || item.type === "radio";
73991
+ const activate = (event) => {
73992
+ if (item.disabled) {
73993
+ event.preventDefault();
73994
+ return;
73995
+ }
73996
+ if (nested) {
73997
+ event.preventDefault();
73998
+ if (expanded) back();
73999
+ else open(true);
74000
+ return;
74001
+ }
74002
+ if (checkable) item.onCheckedChange?.(item.type === "radio" ? true : !item.checked);
74003
+ item.command?.(item);
74004
+ props.onSelect?.(item);
74005
+ if (item.closeOnSelect ?? !checkable) state.close(true);
74006
+ };
74007
+ const content = props.renderItem?.(item, { expanded, checked: Boolean(item.checked) }) ?? /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)(import_jsx_runtime336.Fragment, { children: [
74008
+ /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("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__ */ (0, import_jsx_runtime336.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current" }) : /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(CustomIcon_default, { icon: "Check", size: "sm" })) : import_react311.default.isValidElement(item.icon) ? item.icon : typeof item.icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(CustomIcon_default, { icon: item.icon, size: "sm" }) : null }),
74009
+ /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)("span", { className: "min-w-0 flex-1", children: [
74010
+ /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("span", { className: "block truncate", children: item.label }),
74011
+ item.description && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("span", { className: "block text-xs font-normal opacity-70", children: item.description })
74012
+ ] }),
74013
+ item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("span", { className: "shrink-0 text-xs", children: item.badge }),
74014
+ item.shortcut != null && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("span", { className: "shrink-0 text-xs opacity-60", children: item.shortcut }),
74015
+ item.trailing,
74016
+ nested && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(CollapseChevron, { "aria-hidden": "true", className: (0, import_classnames142.default)("h-3 w-3 shrink-0", !tiered && (expanded ? "-rotate-90" : "rotate-90")) })
74017
+ ] });
74018
+ const rowProps = {
74019
+ id,
74020
+ role: checkable ? item.type === "radio" ? "menuitemradio" : "menuitemcheckbox" : "menuitem",
74021
+ "aria-label": label,
74022
+ "aria-disabled": item.disabled || void 0,
74023
+ "aria-checked": checkable ? Boolean(item.checked) : void 0,
74024
+ "aria-expanded": nested ? expanded : void 0,
74025
+ "aria-haspopup": nested && tiered ? "menu" : void 0,
74026
+ "aria-controls": nested && expanded ? `${id}-submenu` : void 0,
74027
+ "data-menu-action": "",
74028
+ "data-menu-text": label,
74029
+ tabIndex: -1,
74030
+ className: (0, import_classnames142.default)(
74031
+ "flex w-full items-center gap-2 text-left font-medium outline-none transition-colors",
74032
+ itemPadding === void 0 ? rowSizes[props.size ?? "md"] : [rowSizes[props.size ?? "md"].split(" ").filter((token) => token.startsWith("text-")), getSurfacePaddingClass(itemPadding)],
74033
+ getSurfaceCornerClass(item.corner ?? props.itemCorner ?? "rounded-sm"),
74034
+ getSurfaceTriggerTokens(itemTone2).focusRing,
74035
+ 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],
74036
+ expanded && !item.disabled && tokens.bg
74037
+ ),
74038
+ onClick: activate,
74039
+ onKeyDown: (event) => {
74040
+ if (event.key === "ArrowRight" && nested) {
74041
+ event.preventDefault();
74042
+ event.stopPropagation();
74043
+ open(true);
74044
+ }
74045
+ if (event.key === " " && (item.href || item.to)) {
74046
+ event.preventDefault();
74047
+ event.currentTarget.click();
74048
+ }
74049
+ },
74050
+ onMouseEnter: () => {
74051
+ state.cancelLeave();
74052
+ if (tiered && !item.disabled) {
74053
+ if (nested) open(false);
74054
+ else state.setPath(state.path.slice(0, depth));
74055
+ }
74056
+ }
74057
+ };
74058
+ const row = item.to && !nested ? /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(import_react_router_dom3.Link, { ...rowProps, ref: (el) => {
74059
+ anchor.current = el;
74060
+ }, to: item.to, children: content }) : item.href && !nested ? /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("a", { ...rowProps, ref: (el) => {
74061
+ anchor.current = el;
74062
+ }, href: item.href, target: item.target, rel: item.target === "_blank" ? "noopener noreferrer" : void 0, children: content }) : /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("button", { ...rowProps, type: "button", ref: (el) => {
74063
+ anchor.current = el;
74064
+ }, children: content });
74065
+ const submenu = /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)("div", { id: `${id}-submenu`, children: [
74066
+ item.items && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(MenuList, { items: item.items, state, depth: depth + 1, parentLabel: label, onBack: back, focusOnMount: state.keyboard.current }),
74067
+ item.content
74068
+ ] });
74069
+ return /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)("li", { role: "presentation", children: [
74070
+ row,
74071
+ nested && expanded && (tiered ? /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(MenuPopup, { anchor, placement: "right", width: props.width ?? 256, children: /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(MenuSurface, { state, children: submenu }) }) : /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { className: "ml-4 border-l border-neutral-200 pl-1 dark:border-white/10", children: submenu }))
74072
+ ] });
74073
+ }
74074
+ function MenuSurface({ state, children, root = false }) {
74075
+ const { props } = state;
74076
+ return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { "data-menu-owner": state.owner, onMouseEnter: state.cancelLeave, onMouseLeave: state.scheduleLeave, children: /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)(
74077
+ Panel_default,
74078
+ {
74079
+ variant: props.variant ?? "outlined",
74080
+ tone: props.tone ?? "neutral",
74081
+ corner: props.corner,
74082
+ padding: props.padding ?? "xs",
74083
+ glassOpacity: props.glassOpacity,
74084
+ vibrancy: props.vibrancy,
74085
+ specularMode: props.specularMode,
74086
+ className: (0, import_classnames142.default)(
74087
+ root ? props.className : void 0,
74088
+ (!root || props.popup || props.trigger || props.anchorRef) && "backdrop-blur-xl"
74089
+ ),
74090
+ children: [
74091
+ root && props.header && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { className: "mb-2 border-b border-neutral-200 pb-2 dark:border-white/10", children: props.header }),
74092
+ /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { className: (0, import_classnames142.default)("overflow-auto", THIN_SCROLLBAR), style: { maxHeight: `min(${props.maxHeight ?? 400}px, calc(100dvh - 32px))` }, children }),
74093
+ root && props.footer && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { className: "mt-2 border-t border-neutral-200 pt-2 dark:border-white/10", children: props.footer })
74094
+ ]
74095
+ }
74096
+ ) });
74097
+ }
74098
+ function Menu(props) {
74099
+ const owner = (0, import_react311.useId)();
74100
+ const triggerRef = (0, import_react311.useRef)(null);
74101
+ const anchor = props.anchorRef ?? triggerRef;
74102
+ const popup = props.popup ?? Boolean(props.trigger || props.anchorRef);
74103
+ const [internalOpen, setInternalOpen] = (0, import_react311.useState)(props.defaultOpen ?? false);
74104
+ const open = props.open ?? internalOpen;
74105
+ const [expanded, setExpanded] = (0, import_react311.useState)(props.defaultExpandedKeys ?? []);
74106
+ const [path, setPath] = (0, import_react311.useState)([]);
74107
+ const keyboard = (0, import_react311.useRef)(false);
74108
+ const leave = (0, import_react311.useRef)(void 0);
74109
+ const cancelLeave = (0, import_react311.useCallback)(() => clearTimeout(leave.current), []);
74110
+ const requestOpen = (0, import_react311.useCallback)((value) => {
74111
+ if (props.open === void 0) setInternalOpen(value);
74112
+ props.onOpenChange?.(value);
74113
+ if (!value) setPath([]);
74114
+ }, [props.open, props.onOpenChange]);
74115
+ const close = (restore = false) => {
74116
+ setPath([]);
74117
+ if (popup) requestOpen(false);
74118
+ if (restore) {
74119
+ if (anchor.current) anchor.current.focus();
74120
+ else {
74121
+ const root = Array.from(document.querySelectorAll("[data-menu-owner]")).find((el) => el.dataset.menuOwner === owner);
74122
+ root?.querySelector("[data-menu-action]:not([aria-disabled='true'])")?.focus();
74123
+ }
74124
+ }
74125
+ };
74126
+ (0, import_react311.useEffect)(() => {
74127
+ if (popup ? !open : path.length === 0) return;
74128
+ const outside = (event) => {
74129
+ const target = event.target;
74130
+ if (anchor.current?.contains(target)) return;
74131
+ const owned = Array.from(document.querySelectorAll("[data-menu-owner]")).some((el) => el.dataset.menuOwner === owner && el.contains(target));
74132
+ if (!owned) requestOpen(false);
74133
+ };
74134
+ document.addEventListener("pointerdown", outside);
74135
+ return () => document.removeEventListener("pointerdown", outside);
74136
+ }, [popup, open, path.length, anchor, owner, requestOpen]);
74137
+ (0, import_react311.useEffect)(() => () => clearTimeout(leave.current), []);
74138
+ const state = {
74139
+ owner,
74140
+ props,
74141
+ expanded: props.expandedKeys ?? expanded,
74142
+ path,
74143
+ setPath,
74144
+ close,
74145
+ keyboard,
74146
+ cancelLeave,
74147
+ scheduleLeave: () => {
74148
+ cancelLeave();
74149
+ if (path.length && !keyboard.current) leave.current = setTimeout(() => setPath([]), 250);
74150
+ },
74151
+ toggle: (id) => {
74152
+ const current = props.expandedKeys ?? expanded;
74153
+ const next = current.includes(id) ? current.filter((key) => key !== id) : [...current, id];
74154
+ if (props.expandedKeys === void 0) setExpanded(next);
74155
+ props.onExpandedKeysChange?.(next);
74156
+ }
74157
+ };
74158
+ const surface = /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(MenuSurface, { state, root: true, children: /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(MenuList, { items: props.items, state, focusOnMount: popup && open }) });
74159
+ let trigger = null;
74160
+ if (props.trigger) {
74161
+ const original = props.trigger.props;
74162
+ const originalRef = Number(import_react311.default.version.split(".")[0]) >= 19 ? original.ref : props.trigger.ref;
74163
+ trigger = (0, import_react311.cloneElement)(props.trigger, {
74164
+ ref: (el) => {
74165
+ triggerRef.current = el;
74166
+ if (typeof originalRef === "function") originalRef(el);
74167
+ else if (originalRef) originalRef.current = el;
74168
+ },
74169
+ "aria-haspopup": "menu",
74170
+ "aria-expanded": open,
74171
+ "aria-controls": open ? `${owner}-menu` : void 0,
74172
+ onClick: (event) => {
74173
+ original.onClick?.(event);
74174
+ if (!event.defaultPrevented) requestOpen(!open);
74175
+ },
74176
+ onKeyDown: (event) => {
74177
+ original.onKeyDown?.(event);
74178
+ if (!event.defaultPrevented && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
74179
+ event.preventDefault();
74180
+ requestOpen(true);
74181
+ }
74182
+ }
74183
+ });
74184
+ }
74185
+ return /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)(import_jsx_runtime336.Fragment, { children: [
74186
+ trigger,
74187
+ popup ? open && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(MenuPopup, { anchor, placement: props.placement ?? "bottom", width: props.width ?? 256, children: surface }) : /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { style: { width: props.width ?? 256, maxWidth: "100%" }, children: surface })
74188
+ ] });
74189
+ }
74190
+
74191
+ // src/contexts/BottomSheetContext.tsx
74192
+ var import_react312 = require("react");
74193
+ var import_react_dom20 = require("react-dom");
74194
+ var import_classnames143 = __toESM(require("classnames"), 1);
74195
+ var import_jsx_runtime337 = require("react/jsx-runtime");
74196
+ var BottomSheetContext = (0, import_react312.createContext)(null);
73842
74197
  var TRANSITION_MS2 = 260;
73843
74198
  var renderSlot = (slot, controls) => {
73844
74199
  if (!slot) {
@@ -73849,13 +74204,13 @@ var renderSlot = (slot, controls) => {
73849
74204
  var BottomSheetProvider = ({
73850
74205
  children
73851
74206
  }) => {
73852
- const [sheet, setSheet] = (0, import_react310.useState)(null);
73853
- const [isVisible, setIsVisible] = (0, import_react310.useState)(false);
73854
- const pendingCloseRef = (0, import_react310.useRef)(null);
73855
- const dismissSheet = (0, import_react310.useCallback)(() => {
74207
+ const [sheet, setSheet] = (0, import_react312.useState)(null);
74208
+ const [isVisible, setIsVisible] = (0, import_react312.useState)(false);
74209
+ const pendingCloseRef = (0, import_react312.useRef)(null);
74210
+ const dismissSheet = (0, import_react312.useCallback)(() => {
73856
74211
  setIsVisible(false);
73857
74212
  }, []);
73858
- const presentSheet = (0, import_react310.useCallback)((options) => {
74213
+ const presentSheet = (0, import_react312.useCallback)((options) => {
73859
74214
  if (pendingCloseRef.current) {
73860
74215
  clearTimeout(pendingCloseRef.current);
73861
74216
  pendingCloseRef.current = null;
@@ -73868,7 +74223,7 @@ var BottomSheetProvider = ({
73868
74223
  setTimeout(animateIn, 0);
73869
74224
  }
73870
74225
  }, []);
73871
- (0, import_react310.useEffect)(() => {
74226
+ (0, import_react312.useEffect)(() => {
73872
74227
  if (!isVisible && sheet) {
73873
74228
  pendingCloseRef.current = setTimeout(() => {
73874
74229
  sheet.onClose?.();
@@ -73883,7 +74238,7 @@ var BottomSheetProvider = ({
73883
74238
  }
73884
74239
  return void 0;
73885
74240
  }, [isVisible, sheet]);
73886
- (0, import_react310.useEffect)(
74241
+ (0, import_react312.useEffect)(
73887
74242
  () => () => {
73888
74243
  if (pendingCloseRef.current) {
73889
74244
  clearTimeout(pendingCloseRef.current);
@@ -73891,13 +74246,13 @@ var BottomSheetProvider = ({
73891
74246
  },
73892
74247
  []
73893
74248
  );
73894
- const controls = (0, import_react310.useMemo)(
74249
+ const controls = (0, import_react312.useMemo)(
73895
74250
  () => ({
73896
74251
  dismiss: dismissSheet
73897
74252
  }),
73898
74253
  [dismissSheet]
73899
74254
  );
73900
- const contextValue = (0, import_react310.useMemo)(
74255
+ const contextValue = (0, import_react312.useMemo)(
73901
74256
  () => ({
73902
74257
  presentSheet,
73903
74258
  dismissSheet,
@@ -73906,12 +74261,12 @@ var BottomSheetProvider = ({
73906
74261
  }),
73907
74262
  [presentSheet, dismissSheet, sheet, isVisible]
73908
74263
  );
73909
- const overlayNode = typeof document !== "undefined" && sheet ? (0, import_react_dom19.createPortal)(
73910
- /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
73911
- /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
74264
+ const overlayNode = typeof document !== "undefined" && sheet ? (0, import_react_dom20.createPortal)(
74265
+ /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
74266
+ /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
73912
74267
  "div",
73913
74268
  {
73914
- className: (0, import_classnames142.default)(
74269
+ className: (0, import_classnames143.default)(
73915
74270
  "absolute inset-0 bg-neutral-900/40 transition-opacity duration-300",
73916
74271
  isVisible ? "opacity-100 pointer-events-auto" : "opacity-0"
73917
74272
  ),
@@ -73921,24 +74276,24 @@ var BottomSheetProvider = ({
73921
74276
  }
73922
74277
  }
73923
74278
  ),
73924
- /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { className: "relative w-full max-w-4xl px-4 pb-4 sm:px-8", children: /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)(
74279
+ /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("div", { className: "relative w-full max-w-4xl px-4 pb-4 sm:px-8", children: /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
73925
74280
  "section",
73926
74281
  {
73927
74282
  role: "dialog",
73928
74283
  "aria-modal": "true",
73929
- className: (0, import_classnames142.default)(
74284
+ className: (0, import_classnames143.default)(
73930
74285
  "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",
73931
74286
  sheet.className,
73932
74287
  isVisible ? "translate-y-0" : "translate-y-full"
73933
74288
  ),
73934
74289
  style: { minHeight: "25vh", maxHeight: "85vh" },
73935
74290
  children: [
73936
- /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)("header", { className: "flex items-start justify-between gap-3 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
73937
- /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)("div", { className: "space-y-1", children: [
73938
- sheet.title && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
73939
- sheet.description && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
74291
+ /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)("header", { className: "flex items-start justify-between gap-3 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
74292
+ /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)("div", { className: "space-y-1", children: [
74293
+ sheet.title && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
74294
+ sheet.description && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
73940
74295
  ] }),
73941
- (sheet.showCloseButton ?? true) && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
74296
+ (sheet.showCloseButton ?? true) && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
73942
74297
  IconButton_default,
73943
74298
  {
73944
74299
  icon: "Close",
@@ -73950,21 +74305,21 @@ var BottomSheetProvider = ({
73950
74305
  }
73951
74306
  )
73952
74307
  ] }),
73953
- /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: renderSlot(sheet.content, controls) ?? /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("p", { className: "text-sm text-slate-500", children: "No content provided." }) }),
73954
- sheet.actions && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("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) })
74308
+ /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: renderSlot(sheet.content, controls) ?? /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("p", { className: "text-sm text-slate-500", children: "No content provided." }) }),
74309
+ sheet.actions && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("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) })
73955
74310
  ]
73956
74311
  }
73957
74312
  ) })
73958
74313
  ] }),
73959
74314
  document.body
73960
74315
  ) : null;
73961
- return /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)(BottomSheetContext.Provider, { value: contextValue, children: [
74316
+ return /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(BottomSheetContext.Provider, { value: contextValue, children: [
73962
74317
  children,
73963
74318
  overlayNode
73964
74319
  ] });
73965
74320
  };
73966
74321
  var useBottomSheet = () => {
73967
- const context = (0, import_react310.useContext)(BottomSheetContext);
74322
+ const context = (0, import_react312.useContext)(BottomSheetContext);
73968
74323
  if (!context) {
73969
74324
  throw new Error("useBottomSheet must be used within a BottomSheetProvider");
73970
74325
  }
@@ -74598,8 +74953,8 @@ var SYSTEM_VARIABLES = [
74598
74953
  ];
74599
74954
 
74600
74955
  // src/components/MetricBar.tsx
74601
- var import_classnames143 = __toESM(require("classnames"), 1);
74602
- var import_jsx_runtime336 = require("react/jsx-runtime");
74956
+ var import_classnames144 = __toESM(require("classnames"), 1);
74957
+ var import_jsx_runtime338 = require("react/jsx-runtime");
74603
74958
  var MetricBar = ({
74604
74959
  label,
74605
74960
  value,
@@ -74609,7 +74964,7 @@ var MetricBar = ({
74609
74964
  size = "sm",
74610
74965
  className,
74611
74966
  ...rest
74612
- }) => /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
74967
+ }) => /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
74613
74968
  Progress_default,
74614
74969
  {
74615
74970
  ...rest,
@@ -74619,13 +74974,13 @@ var MetricBar = ({
74619
74974
  formatValue: value !== void 0 ? () => String(value) : void 0,
74620
74975
  size,
74621
74976
  color: tone ?? color ?? "blue",
74622
- className: (0, import_classnames143.default)("w-full", className)
74977
+ className: (0, import_classnames144.default)("w-full", className)
74623
74978
  }
74624
74979
  );
74625
74980
  MetricBar.displayName = "MetricBar";
74626
74981
 
74627
74982
  // src/components/NetworkGraph/NetworkGraph.tsx
74628
- var import_react312 = require("react");
74983
+ var import_react314 = require("react");
74629
74984
 
74630
74985
  // src/components/NetworkGraph/model.ts
74631
74986
  var CELL = 64;
@@ -74769,17 +75124,17 @@ function findNetworkPath(edges, source, target) {
74769
75124
  }
74770
75125
 
74771
75126
  // src/components/NetworkGraph/useNetworkCanvas.ts
74772
- var import_react311 = require("react");
75127
+ var import_react313 = require("react");
74773
75128
  function useNetworkCanvas(options) {
74774
- const canvasRef = (0, import_react311.useRef)(null);
74775
- const view = (0, import_react311.useRef)({ x: 0, y: 0, zoom: 1 });
74776
- const size = (0, import_react311.useRef)({ width: 1, height: 1 });
74777
- const latest = (0, import_react311.useRef)(options);
74778
- const frame = (0, import_react311.useRef)(null);
74779
- const [zoom, setZoom] = (0, import_react311.useState)(1);
74780
- const colors3 = (0, import_react311.useRef)(/* @__PURE__ */ new Map());
74781
- const textColor = (0, import_react311.useRef)("#737373");
74782
- const draw = (0, import_react311.useCallback)(() => {
75129
+ const canvasRef = (0, import_react313.useRef)(null);
75130
+ const view = (0, import_react313.useRef)({ x: 0, y: 0, zoom: 1 });
75131
+ const size = (0, import_react313.useRef)({ width: 1, height: 1 });
75132
+ const latest = (0, import_react313.useRef)(options);
75133
+ const frame = (0, import_react313.useRef)(null);
75134
+ const [zoom, setZoom] = (0, import_react313.useState)(1);
75135
+ const colors3 = (0, import_react313.useRef)(/* @__PURE__ */ new Map());
75136
+ const textColor = (0, import_react313.useRef)("#737373");
75137
+ const draw = (0, import_react313.useCallback)(() => {
74783
75138
  const canvas = canvasRef.current;
74784
75139
  const ctx = canvas?.getContext("2d");
74785
75140
  if (!canvas || !ctx) return;
@@ -74879,14 +75234,14 @@ function useNetworkCanvas(options) {
74879
75234
  }
74880
75235
  ctx.globalAlpha = 1;
74881
75236
  }, []);
74882
- const requestDraw = (0, import_react311.useCallback)(() => {
75237
+ const requestDraw = (0, import_react313.useCallback)(() => {
74883
75238
  if (frame.current !== null) return;
74884
75239
  frame.current = requestAnimationFrame(() => {
74885
75240
  frame.current = null;
74886
75241
  draw();
74887
75242
  });
74888
75243
  }, [draw]);
74889
- const update = (0, import_react311.useCallback)(
75244
+ const update = (0, import_react313.useCallback)(
74890
75245
  (next) => {
74891
75246
  view.current = next;
74892
75247
  setZoom(next.zoom);
@@ -74895,7 +75250,7 @@ function useNetworkCanvas(options) {
74895
75250
  },
74896
75251
  [requestDraw]
74897
75252
  );
74898
- const fit = (0, import_react311.useCallback)(
75253
+ const fit = (0, import_react313.useCallback)(
74899
75254
  () => update(
74900
75255
  fitNetwork(
74901
75256
  latest.current.nodes,
@@ -74905,11 +75260,11 @@ function useNetworkCanvas(options) {
74905
75260
  ),
74906
75261
  [update]
74907
75262
  );
74908
- const zoomBy = (0, import_react311.useCallback)(
75263
+ const zoomBy = (0, import_react313.useCallback)(
74909
75264
  (factor, x = size.current.width / 2, y = size.current.height / 2) => update(zoomAt(view.current, factor, x, y)),
74910
75265
  [update]
74911
75266
  );
74912
- const focusNode = (0, import_react311.useCallback)(
75267
+ const focusNode = (0, import_react313.useCallback)(
74913
75268
  (node) => {
74914
75269
  update({
74915
75270
  ...view.current,
@@ -74919,14 +75274,14 @@ function useNetworkCanvas(options) {
74919
75274
  },
74920
75275
  [update]
74921
75276
  );
74922
- (0, import_react311.useEffect)(() => {
75277
+ (0, import_react313.useEffect)(() => {
74923
75278
  latest.current = options;
74924
75279
  requestDraw();
74925
75280
  }, [options, requestDraw]);
74926
- (0, import_react311.useEffect)(() => {
75281
+ (0, import_react313.useEffect)(() => {
74927
75282
  fit();
74928
75283
  }, [options.model, fit]);
74929
- (0, import_react311.useEffect)(() => {
75284
+ (0, import_react313.useEffect)(() => {
74930
75285
  const canvas = canvasRef.current;
74931
75286
  if (!canvas) return;
74932
75287
  const measure = () => {
@@ -74979,7 +75334,7 @@ function useNetworkCanvas(options) {
74979
75334
  }
74980
75335
 
74981
75336
  // src/components/NetworkGraph/NetworkGraph.tsx
74982
- var import_jsx_runtime337 = require("react/jsx-runtime");
75337
+ var import_jsx_runtime339 = require("react/jsx-runtime");
74983
75338
  var NO_COMMUNITIES = [];
74984
75339
  var NO_HIGHLIGHTS = [];
74985
75340
  function NetworkGraph({
@@ -75010,11 +75365,11 @@ function NetworkGraph({
75010
75365
  ...panelProps
75011
75366
  }) {
75012
75367
  const t = useKitT();
75013
- const helpId = (0, import_react312.useId)();
75014
- const layoutRef = (0, import_react312.useRef)(null);
75015
- const [hasLegendSpace, setHasLegendSpace] = (0, import_react312.useState)(true);
75368
+ const helpId = (0, import_react314.useId)();
75369
+ const layoutRef = (0, import_react314.useRef)(null);
75370
+ const [hasLegendSpace, setHasLegendSpace] = (0, import_react314.useState)(true);
75016
75371
  const legendOnRight = legendPosition === "right" || legendPosition === "auto" && hasLegendSpace;
75017
- (0, import_react312.useEffect)(() => {
75372
+ (0, import_react314.useEffect)(() => {
75018
75373
  const element = layoutRef.current;
75019
75374
  if (!element || legendPosition !== "auto") return;
75020
75375
  const measure = () => setHasLegendSpace(element.getBoundingClientRect().width >= 600);
@@ -75023,38 +75378,38 @@ function NetworkGraph({
75023
75378
  observer.observe(element);
75024
75379
  return () => observer.disconnect();
75025
75380
  }, [legendPosition, loading]);
75026
- const model = (0, import_react312.useMemo)(
75381
+ const model = (0, import_react314.useMemo)(
75027
75382
  () => buildNetwork(nodes, edges, communities),
75028
75383
  [nodes, edges, communities]
75029
75384
  );
75030
- const [internalSelected, setInternalSelected] = (0, import_react312.useState)(
75385
+ const [internalSelected, setInternalSelected] = (0, import_react314.useState)(
75031
75386
  defaultSelectedNodeId
75032
75387
  );
75033
- const [hidden, setHidden] = (0, import_react312.useState)(() => /* @__PURE__ */ new Set());
75034
- const [focused, setFocused] = (0, import_react312.useState)(null);
75035
- const [query, setQuery] = (0, import_react312.useState)("");
75036
- const enabled = (0, import_react312.useMemo)(
75388
+ const [hidden, setHidden] = (0, import_react314.useState)(() => /* @__PURE__ */ new Set());
75389
+ const [focused, setFocused] = (0, import_react314.useState)(null);
75390
+ const [query, setQuery] = (0, import_react314.useState)("");
75391
+ const enabled = (0, import_react314.useMemo)(
75037
75392
  () => new Set(
75038
75393
  visibleCommunityIds ?? model.groups.filter((g) => !hidden.has(g.id)).map((g) => g.id)
75039
75394
  ),
75040
75395
  [visibleCommunityIds, model, hidden]
75041
75396
  );
75042
- const visibleNodes = (0, import_react312.useMemo)(
75397
+ const visibleNodes = (0, import_react314.useMemo)(
75043
75398
  () => model.nodes.filter((n) => !n.community || enabled.has(n.community)),
75044
75399
  [model, enabled]
75045
75400
  );
75046
- const visible = (0, import_react312.useMemo)(
75401
+ const visible = (0, import_react314.useMemo)(
75047
75402
  () => new Set(visibleNodes.map((n) => n.id)),
75048
75403
  [visibleNodes]
75049
75404
  );
75050
75405
  const selection = selectedNodeId === void 0 ? internalSelected : selectedNodeId;
75051
75406
  const selected = selection !== null && visible.has(selection) ? selection : null;
75052
75407
  const activeFocus = focused !== null && visible.has(focused) ? focused : null;
75053
- const highlighted = (0, import_react312.useMemo)(
75408
+ const highlighted = (0, import_react314.useMemo)(
75054
75409
  () => new Set(highlightedEdgeIds),
75055
75410
  [highlightedEdgeIds]
75056
75411
  );
75057
- const counts = (0, import_react312.useMemo)(() => {
75412
+ const counts = (0, import_react314.useMemo)(() => {
75058
75413
  const result = /* @__PURE__ */ new Map();
75059
75414
  for (const n of model.nodes)
75060
75415
  if (n.community)
@@ -75074,7 +75429,7 @@ function NetworkGraph({
75074
75429
  onViewportChange
75075
75430
  });
75076
75431
  const locked = disabled || loading;
75077
- const drag = (0, import_react312.useRef)(null);
75432
+ const drag = (0, import_react314.useRef)(null);
75078
75433
  const select = (id) => {
75079
75434
  if (locked) return;
75080
75435
  if (selectedNodeId === void 0) setInternalSelected(id);
@@ -75090,7 +75445,7 @@ function NetworkGraph({
75090
75445
  );
75091
75446
  onVisibleCommunitiesChange?.(ids);
75092
75447
  };
75093
- (0, import_react312.useEffect)(() => {
75448
+ (0, import_react314.useEffect)(() => {
75094
75449
  const element = canvas.canvasRef.current;
75095
75450
  if (!element || locked) return;
75096
75451
  const wheel = (event) => {
@@ -75139,13 +75494,13 @@ function NetworkGraph({
75139
75494
  }
75140
75495
  };
75141
75496
  const focusedNode = model.byId.get(activeFocus ?? selected ?? "");
75142
- const matchingNodes = (0, import_react312.useMemo)(() => {
75497
+ const matchingNodes = (0, import_react314.useMemo)(() => {
75143
75498
  const search = query.toLocaleLowerCase();
75144
75499
  return visibleNodes.filter((n) => (n.label ?? n.id).toLocaleLowerCase().includes(search)).slice(0, 50).map((n) => ({ value: n.id, label: n.label ?? n.id }));
75145
75500
  }, [visibleNodes, query]);
75146
75501
  const graphHeight = Number.isFinite(height) ? Math.max(160, height) : 480;
75147
75502
  const resolvedLegendTone = legendTone === "auto" ? tone : legendTone;
75148
- const legendContent = /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
75503
+ const legendContent = /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
75149
75504
  "fieldset",
75150
75505
  {
75151
75506
  disabled: locked,
@@ -75154,8 +75509,8 @@ function NetworkGraph({
75154
75509
  maxHeight: legendPanel ? Math.max(96, graphHeight - 64) : graphHeight
75155
75510
  },
75156
75511
  children: [
75157
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("legend", { className: "mb-3 text-xs font-semibold uppercase tracking-widest", children: t("kit.networkGraph.communities") }),
75158
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75512
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("legend", { className: "mb-3 text-xs font-semibold uppercase tracking-widest", children: t("kit.networkGraph.communities") }),
75513
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75159
75514
  Checkbox_default,
75160
75515
  {
75161
75516
  size: "sm",
@@ -75166,8 +75521,8 @@ function NetworkGraph({
75166
75521
  onChange: (event) => filter(event.target.checked ? model.groups.map((g) => g.id) : [])
75167
75522
  }
75168
75523
  ),
75169
- model.groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
75170
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75524
+ model.groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
75525
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75171
75526
  Checkbox_default,
75172
75527
  {
75173
75528
  size: "sm",
@@ -75179,12 +75534,12 @@ function NetworkGraph({
75179
75534
  )
75180
75535
  }
75181
75536
  ),
75182
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("span", { className: "text-xs tabular-nums opacity-60", children: counts.get(group.id) ?? 0 })
75537
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("span", { className: "text-xs tabular-nums opacity-60", children: counts.get(group.id) ?? 0 })
75183
75538
  ] }, group.id))
75184
75539
  ]
75185
75540
  }
75186
75541
  );
75187
- return /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75542
+ return /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75188
75543
  Panel_default,
75189
75544
  {
75190
75545
  ...panelProps,
@@ -75195,7 +75550,7 @@ function NetworkGraph({
75195
75550
  loading,
75196
75551
  clickable: false,
75197
75552
  scrollable: false,
75198
- children: /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
75553
+ children: /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
75199
75554
  "div",
75200
75555
  {
75201
75556
  className: "flex min-w-0 flex-col gap-3",
@@ -75203,7 +75558,7 @@ function NetworkGraph({
75203
75558
  "aria-label": ariaLabel ?? t("kit.networkGraph.name"),
75204
75559
  "aria-disabled": locked || void 0,
75205
75560
  children: [
75206
- showControls && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("div", { className: "min-w-40 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75561
+ showControls && /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("div", { className: "min-w-40 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75207
75562
  Combobox_default,
75208
75563
  {
75209
75564
  size: "sm",
@@ -75225,7 +75580,7 @@ function NetworkGraph({
75225
75580
  }
75226
75581
  }
75227
75582
  ) }) }),
75228
- /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
75583
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
75229
75584
  "div",
75230
75585
  {
75231
75586
  ref: layoutRef,
@@ -75233,13 +75588,13 @@ function NetworkGraph({
75233
75588
  style: { flexDirection: legendOnRight ? "row" : "column" },
75234
75589
  "data-legend-position": legendOnRight ? "right" : "bottom",
75235
75590
  children: [
75236
- /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
75591
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
75237
75592
  "div",
75238
75593
  {
75239
75594
  className: "relative min-w-0 flex-1",
75240
75595
  style: { height: graphHeight, minHeight: graphHeight },
75241
75596
  children: [
75242
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75597
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75243
75598
  "canvas",
75244
75599
  {
75245
75600
  ref: canvas.canvasRef,
@@ -75308,11 +75663,11 @@ function NetworkGraph({
75308
75663
  }
75309
75664
  }
75310
75665
  ),
75311
- showControls && /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)("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: [
75312
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75666
+ showControls && /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)("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: [
75667
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75313
75668
  IconButton_default,
75314
75669
  {
75315
- icon: /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
75670
+ icon: /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
75316
75671
  "svg",
75317
75672
  {
75318
75673
  viewBox: "0 0 24 24",
@@ -75323,10 +75678,10 @@ function NetworkGraph({
75323
75678
  strokeLinejoin: "round",
75324
75679
  "aria-hidden": "true",
75325
75680
  children: [
75326
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("path", { d: "M4 9V5a1 1 0 0 1 1-1h4" }),
75327
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("path", { d: "M15 4h4a1 1 0 0 1 1 1v4" }),
75328
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("path", { d: "M20 15v4a1 1 0 0 1-1 1h-4" }),
75329
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("path", { d: "M9 20H5a1 1 0 0 1-1-1v-4" })
75681
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("path", { d: "M4 9V5a1 1 0 0 1 1-1h4" }),
75682
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("path", { d: "M15 4h4a1 1 0 0 1 1 1v4" }),
75683
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("path", { d: "M20 15v4a1 1 0 0 1-1 1h-4" }),
75684
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("path", { d: "M9 20H5a1 1 0 0 1-1-1v-4" })
75330
75685
  ]
75331
75686
  }
75332
75687
  ),
@@ -75339,10 +75694,10 @@ function NetworkGraph({
75339
75694
  onClick: canvas.fit
75340
75695
  }
75341
75696
  ),
75342
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75697
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75343
75698
  IconButton_default,
75344
75699
  {
75345
- icon: /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75700
+ icon: /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75346
75701
  "svg",
75347
75702
  {
75348
75703
  viewBox: "0 0 24 24",
@@ -75351,7 +75706,7 @@ function NetworkGraph({
75351
75706
  strokeWidth: 2,
75352
75707
  strokeLinecap: "round",
75353
75708
  "aria-hidden": "true",
75354
- children: /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("path", { d: "M6 12h12" })
75709
+ children: /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("path", { d: "M6 12h12" })
75355
75710
  }
75356
75711
  ),
75357
75712
  size: "xs",
@@ -75363,7 +75718,7 @@ function NetworkGraph({
75363
75718
  onClick: () => canvas.zoomBy(0.8)
75364
75719
  }
75365
75720
  ),
75366
- /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
75721
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
75367
75722
  "span",
75368
75723
  {
75369
75724
  className: "min-w-[3.5ch] px-1 text-center text-[11px] tabular-nums text-neutral-500 dark:text-neutral-400",
@@ -75374,7 +75729,7 @@ function NetworkGraph({
75374
75729
  ]
75375
75730
  }
75376
75731
  ),
75377
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75732
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75378
75733
  IconButton_default,
75379
75734
  {
75380
75735
  icon: "Add",
@@ -75387,7 +75742,7 @@ function NetworkGraph({
75387
75742
  onClick: () => canvas.zoomBy(1.25)
75388
75743
  }
75389
75744
  ),
75390
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75745
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75391
75746
  IconButton_default,
75392
75747
  {
75393
75748
  icon: "Reset",
@@ -75405,18 +75760,18 @@ function NetworkGraph({
75405
75760
  }
75406
75761
  )
75407
75762
  ] }),
75408
- !visibleNodes.length && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center text-sm", children: emptyMessage ?? t("kit.networkGraph.empty") })
75763
+ !visibleNodes.length && /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center text-sm", children: emptyMessage ?? t("kit.networkGraph.empty") })
75409
75764
  ]
75410
75765
  }
75411
75766
  ),
75412
- showCommunities && model.groups.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75767
+ showCommunities && model.groups.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75413
75768
  "div",
75414
75769
  {
75415
75770
  className: "min-w-0 shrink-0",
75416
75771
  style: {
75417
75772
  width: legendOnRight ? legendPanel ? 224 : 192 : "100%"
75418
75773
  },
75419
- children: legendPanel ? /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75774
+ children: legendPanel ? /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75420
75775
  Panel_default,
75421
75776
  {
75422
75777
  variant: legendVariant === "auto" ? variant : legendVariant,
@@ -75435,8 +75790,8 @@ function NetworkGraph({
75435
75790
  ]
75436
75791
  }
75437
75792
  ),
75438
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("p", { id: helpId, className: "text-xs opacity-70", children: t("kit.networkGraph.instructions") }),
75439
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75793
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("p", { id: helpId, className: "text-xs opacity-70", children: t("kit.networkGraph.instructions") }),
75794
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75440
75795
  "p",
75441
75796
  {
75442
75797
  role: "status",
@@ -75625,11 +75980,13 @@ function NetworkGraph({
75625
75980
  LOADER_VARIANTS,
75626
75981
  LOCK_TTL_MS,
75627
75982
  Loader,
75983
+ MENU_VARIANTS,
75628
75984
  METERGROUP_ORIENTATIONS,
75629
75985
  MODAL_POSITIONS,
75630
75986
  MS_DAY,
75631
75987
  MULTI_TOGGLE_INDICATORS,
75632
75988
  MULTI_TOGGLE_VARIANTS,
75989
+ Menu,
75633
75990
  MeterGroup,
75634
75991
  MetricBar,
75635
75992
  Modal,