@cjlapao/ui-kit 0.2.13 → 0.2.15

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,
@@ -219,9 +221,12 @@ __export(src_exports, {
219
221
  OTP_VARIANTS: () => OTP_VARIANTS,
220
222
  OrganizationChart: () => OrganizationChart_default,
221
223
  PAGED_PANEL_LOADERS: () => PAGED_PANEL_LOADERS,
224
+ PAGE_BODY_LAYOUT_VARIANTS: () => PAGE_BODY_LAYOUT_VARIANTS,
222
225
  PAGE_HEADER_VARIANTS: () => SURFACE_VARIANTS,
223
226
  PANEL_HERO_TITLE_ELEMENTS: () => PANEL_HERO_TITLE_ELEMENTS,
224
227
  PANEL_HERO_VARIANTS: () => PANEL_HERO_VARIANTS,
228
+ PANEL_SLIDE_DURATION_MS: () => PANEL_SLIDE_DURATION_MS,
229
+ PANEL_SLIDE_EASING: () => PANEL_SLIDE_EASING,
225
230
  PANEL_TONE_FOR_FIELD: () => PANEL_TONE_FOR_FIELD,
226
231
  PANE_EMPTY_STATE_SIZE: () => PANE_EMPTY_STATE_SIZE,
227
232
  PILL_CORNERS: () => PILL_CORNERS,
@@ -612,6 +617,7 @@ __export(src_exports, {
612
617
  normalizeString: () => normalizeString,
613
618
  normalizeStringToUpper: () => normalizeStringToUpper,
614
619
  oklchToHex: () => oklchToHex,
620
+ panelSlideTransition: () => panelSlideTransition,
615
621
  parseImageSource: () => parseImageSource,
616
622
  parseMessage: () => parseMessage,
617
623
  parseSmartVariable: () => parseSmartVariable,
@@ -5974,6 +5980,9 @@ var surfaceCornerRem = {
5974
5980
  };
5975
5981
  var DEFAULT_SURFACE_CORNER = "rounded-md";
5976
5982
  var COLLAPSED_RAIL_WIDTH = 56;
5983
+ var PANEL_SLIDE_DURATION_MS = 450;
5984
+ var PANEL_SLIDE_EASING = "cubic-bezier(0.32, 0.72, 0, 1)";
5985
+ var panelSlideTransition = (...properties) => properties.map((property) => `${property} ${PANEL_SLIDE_DURATION_MS}ms ${PANEL_SLIDE_EASING}`).join(", ");
5977
5986
  var DEFAULT_CONTROL_CORNER = "rounded-lg";
5978
5987
  var SURFACE_VARIANT_FOR_FIELD = {
5979
5988
  flat: "outlined",
@@ -7678,13 +7687,13 @@ var Parser = class _Parser {
7678
7687
  /** Parse a message body (top-level or a branch body — see parseBranchBody). */
7679
7688
  parseMessage(inPluralBranch = false) {
7680
7689
  const nodes = [];
7681
- let text = "";
7690
+ let text2 = "";
7682
7691
  let pendingSpace = false;
7683
7692
  let hasContent = false;
7684
7693
  const flushText = () => {
7685
- if (text !== "") {
7686
- nodes.push({ type: "text", value: text });
7687
- text = "";
7694
+ if (text2 !== "") {
7695
+ nodes.push({ type: "text", value: text2 });
7696
+ text2 = "";
7688
7697
  }
7689
7698
  };
7690
7699
  while (this.pos < this.src.length) {
@@ -7692,19 +7701,19 @@ var Parser = class _Parser {
7692
7701
  if (ch === "\\") {
7693
7702
  if (this.src[this.pos + 1] === "'") {
7694
7703
  if (pendingSpace) {
7695
- text += " ";
7704
+ text2 += " ";
7696
7705
  pendingSpace = false;
7697
7706
  }
7698
- text += "'";
7707
+ text2 += "'";
7699
7708
  this.pos += 2;
7700
7709
  hasContent = true;
7701
7710
  continue;
7702
7711
  }
7703
7712
  if (pendingSpace) {
7704
- text += " ";
7713
+ text2 += " ";
7705
7714
  pendingSpace = false;
7706
7715
  }
7707
- text += ch;
7716
+ text2 += ch;
7708
7717
  this.pos += 1;
7709
7718
  hasContent = true;
7710
7719
  continue;
@@ -7712,16 +7721,16 @@ var Parser = class _Parser {
7712
7721
  if (ch === "'") {
7713
7722
  if (this.src[this.pos + 1] === "'") {
7714
7723
  if (pendingSpace) {
7715
- text += " ";
7724
+ text2 += " ";
7716
7725
  pendingSpace = false;
7717
7726
  }
7718
- text += "'";
7727
+ text2 += "'";
7719
7728
  this.pos += 2;
7720
7729
  hasContent = true;
7721
7730
  continue;
7722
7731
  }
7723
7732
  if (pendingSpace) {
7724
- text += " ";
7733
+ text2 += " ";
7725
7734
  pendingSpace = false;
7726
7735
  }
7727
7736
  this.pos += 1;
@@ -7733,13 +7742,13 @@ var Parser = class _Parser {
7733
7742
  throw this.err("unterminated quoted section \u2014 a ' opened without a closing '");
7734
7743
  }
7735
7744
  this.pos += 1;
7736
- text += inner;
7745
+ text2 += inner;
7737
7746
  hasContent = true;
7738
7747
  continue;
7739
7748
  }
7740
7749
  if (ch === "{") {
7741
7750
  if (pendingSpace) {
7742
- text += " ";
7751
+ text2 += " ";
7743
7752
  pendingSpace = false;
7744
7753
  }
7745
7754
  flushText();
@@ -7752,7 +7761,7 @@ var Parser = class _Parser {
7752
7761
  }
7753
7762
  if (inPluralBranch && ch === "#") {
7754
7763
  if (pendingSpace) {
7755
- text += " ";
7764
+ text2 += " ";
7756
7765
  pendingSpace = false;
7757
7766
  }
7758
7767
  flushText();
@@ -7767,10 +7776,10 @@ var Parser = class _Parser {
7767
7776
  continue;
7768
7777
  }
7769
7778
  if (pendingSpace) {
7770
- text += " ";
7779
+ text2 += " ";
7771
7780
  pendingSpace = false;
7772
7781
  }
7773
- text += ch;
7782
+ text2 += ch;
7774
7783
  hasContent = true;
7775
7784
  this.pos += 1;
7776
7785
  }
@@ -8208,8 +8217,8 @@ var FULL_MONTH_REGEX = new RegExp(
8208
8217
  "gi"
8209
8218
  );
8210
8219
  var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
8211
- var normalizeToEnglishNames = (text, names) => {
8212
- let out = text;
8220
+ var normalizeToEnglishNames = (text2, names) => {
8221
+ let out = text2;
8213
8222
  const mapSet = (source, target) => {
8214
8223
  if (!source) return;
8215
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);
@@ -8226,21 +8235,21 @@ var normalizeToEnglishNames = (text, names) => {
8226
8235
  mapSet(names.weekdayShort, WEEKDAY_LABELS_SHORT);
8227
8236
  return out;
8228
8237
  };
8229
- var abbreviateMonthNames = (text) => text.replace(
8238
+ var abbreviateMonthNames = (text2) => text2.replace(
8230
8239
  FULL_MONTH_REGEX,
8231
8240
  (match) => MONTH_NAME_TO_ABBR[match.toLowerCase()] ?? match
8232
8241
  );
8233
8242
  var ABBR_MONTH_REGEX = /\b(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\b/g;
8234
- var expandMonthNames = (text) => text.replace(ABBR_MONTH_REGEX, (match) => {
8243
+ var expandMonthNames = (text2) => text2.replace(ABBR_MONTH_REGEX, (match) => {
8235
8244
  const expanded = MONTH_ABBR_TO_NAME[match.toLowerCase()];
8236
8245
  return expanded ? `${expanded.charAt(0) + expanded.slice(1).toLowerCase()}` : match;
8237
8246
  });
8238
- var parseCandidates = (text) => {
8239
- const candidates = [text, abbreviateMonthNames(text), expandMonthNames(text)];
8247
+ var parseCandidates = (text2) => {
8248
+ const candidates = [text2, abbreviateMonthNames(text2), expandMonthNames(text2)];
8240
8249
  return [...new Set(candidates)];
8241
8250
  };
8242
- var parseDateText = (text, formatString = DEFAULT_DATE_FORMAT, reference = /* @__PURE__ */ new Date(), names) => {
8243
- const trimmed = text.trim();
8251
+ var parseDateText = (text2, formatString = DEFAULT_DATE_FORMAT, reference = /* @__PURE__ */ new Date(), names) => {
8252
+ const trimmed = text2.trim();
8244
8253
  if (!trimmed) return null;
8245
8254
  const candidates = /* @__PURE__ */ new Set();
8246
8255
  for (const candidate of parseCandidates(trimmed)) candidates.add(candidate);
@@ -8257,13 +8266,13 @@ var parseDateText = (text, formatString = DEFAULT_DATE_FORMAT, reference = /* @_
8257
8266
  }
8258
8267
  return null;
8259
8268
  };
8260
- var parseValueText = (text, selectionMode = "single", formatString = DEFAULT_DATE_FORMAT, reference = /* @__PURE__ */ new Date(), names) => {
8261
- const trimmed = text.trim();
8269
+ var parseValueText = (text2, selectionMode = "single", formatString = DEFAULT_DATE_FORMAT, reference = /* @__PURE__ */ new Date(), names) => {
8270
+ const trimmed = text2.trim();
8262
8271
  if (!trimmed) return null;
8263
8272
  if (selectionMode === "single") {
8264
8273
  return parseDateText(trimmed, formatString, reference, names);
8265
8274
  }
8266
- const withTrailingSeparator = /\s-$/.test(text) ? `${text} ` : text;
8275
+ const withTrailingSeparator = /\s-$/.test(text2) ? `${text2} ` : text2;
8267
8276
  const parts = withTrailingSeparator.split(RANGE_SEPARATOR);
8268
8277
  if (parts.length !== 2) return null;
8269
8278
  const start = parseDateText(parts[0], formatString, reference, names);
@@ -10787,9 +10796,9 @@ var sizeTokens = {
10787
10796
  }
10788
10797
  }
10789
10798
  };
10790
- var SpinnerLabel = ({ text }) => {
10799
+ var SpinnerLabel = ({ text: text2 }) => {
10791
10800
  const surface = useSurfaceText();
10792
- 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 });
10793
10802
  };
10794
10803
  var Spinner = import_react151.default.forwardRef(
10795
10804
  ({
@@ -11092,7 +11101,7 @@ var TOOLTIP_ARROW_BORDER = {
11092
11101
  // src/components/TooltipWrapper.tsx
11093
11102
  var import_jsx_runtime154 = require("react/jsx-runtime");
11094
11103
  var TooltipWrapper = ({
11095
- text,
11104
+ text: text2,
11096
11105
  delay = 500,
11097
11106
  position = "top",
11098
11107
  variant = "surface",
@@ -11113,12 +11122,12 @@ var TooltipWrapper = ({
11113
11122
  };
11114
11123
  }, []);
11115
11124
  (0, import_react152.useEffect)(() => {
11116
- if (!text && visible) {
11125
+ if (!text2 && visible) {
11117
11126
  if (timerRef.current) clearTimeout(timerRef.current);
11118
11127
  setVisible(false);
11119
11128
  setPlacement(null);
11120
11129
  }
11121
- }, [text, visible]);
11130
+ }, [text2, visible]);
11122
11131
  const measure = (0, import_react152.useCallback)(() => {
11123
11132
  const el = tooltipRef.current;
11124
11133
  const trigger = triggerRectRef.current;
@@ -11166,7 +11175,7 @@ var TooltipWrapper = ({
11166
11175
  }, [visible, measure]);
11167
11176
  const show = (0, import_react152.useCallback)(
11168
11177
  (e) => {
11169
- if (text) {
11178
+ if (text2) {
11170
11179
  setColorScheme(
11171
11180
  e.currentTarget.closest("[data-color-scheme]")?.getAttribute("data-color-scheme") ?? null
11172
11181
  );
@@ -11180,7 +11189,7 @@ var TooltipWrapper = ({
11180
11189
  children.props.onMouseEnter?.(e);
11181
11190
  }
11182
11191
  },
11183
- [text, delay, children.props]
11192
+ [text2, delay, children.props]
11184
11193
  );
11185
11194
  const hide = (0, import_react152.useCallback)(
11186
11195
  (e) => {
@@ -11203,7 +11212,7 @@ var TooltipWrapper = ({
11203
11212
  // The WAI pattern for tooltips: the relationship is declared only while
11204
11213
  // the tooltip exists — a permanent `aria-describedby` to an absent id is
11205
11214
  // a dangling reference most readers skip silently.
11206
- "aria-describedby": visible && text ? tooltipId : void 0,
11215
+ "aria-describedby": visible && text2 ? tooltipId : void 0,
11207
11216
  onMouseEnter: show,
11208
11217
  onMouseLeave: hide,
11209
11218
  onFocus: show,
@@ -11214,7 +11223,7 @@ var TooltipWrapper = ({
11214
11223
  const vertical = side === "top" || side === "bottom";
11215
11224
  return /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(import_jsx_runtime154.Fragment, { children: [
11216
11225
  child,
11217
- visible && text && (0, import_react_dom.createPortal)(
11226
+ visible && text2 && (0, import_react_dom.createPortal)(
11218
11227
  /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(
11219
11228
  "div",
11220
11229
  {
@@ -11236,7 +11245,7 @@ var TooltipWrapper = ({
11236
11245
  colorScheme === "dark" && "dark"
11237
11246
  ),
11238
11247
  children: [
11239
- text,
11248
+ text2,
11240
11249
  /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
11241
11250
  "span",
11242
11251
  {
@@ -13747,7 +13756,7 @@ var MultiProgressBar = ({
13747
13756
  className,
13748
13757
  ...rest
13749
13758
  }) => {
13750
- const text = useSurfaceText();
13759
+ const text2 = useSurfaceText();
13751
13760
  const renderIcon2 = useIconRenderer();
13752
13761
  const [hoveredKey, setHoveredKey] = (0, import_react162.useState)(null);
13753
13762
  const [tooltip, setTooltip] = (0, import_react162.useState)(null);
@@ -13818,7 +13827,7 @@ var MultiProgressBar = ({
13818
13827
  className: (0, import_classnames17.default)(
13819
13828
  "flex cursor-pointer select-none items-center gap-1.5 whitespace-nowrap",
13820
13829
  "transition-all duration-200",
13821
- isActive ? text.heading : isDimmed ? "opacity-40" : text.muted
13830
+ isActive ? text2.heading : isDimmed ? "opacity-40" : text2.muted
13822
13831
  ),
13823
13832
  onMouseEnter: () => setHoveredKey(s.key),
13824
13833
  onMouseLeave: () => setHoveredKey(null),
@@ -13843,13 +13852,13 @@ var MultiProgressBar = ({
13843
13852
  {
13844
13853
  className: (0, import_classnames17.default)(
13845
13854
  "font-semibold transition-colors duration-200",
13846
- isActive ? text.heading : text.body
13855
+ isActive ? text2.heading : text2.body
13847
13856
  ),
13848
13857
  children: s.displayValue ?? s.value
13849
13858
  }
13850
13859
  ),
13851
13860
  s.label,
13852
- 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: [
13853
13862
  "(",
13854
13863
  Math.round(pct),
13855
13864
  "%)"
@@ -13991,7 +14000,7 @@ var MultiProgressBar = ({
13991
14000
  className: (0, import_classnames17.default)(
13992
14001
  tokens.label,
13993
14002
  "font-semibold",
13994
- !hasTextColor(labelClassName) && text.heading,
14003
+ !hasTextColor(labelClassName) && text2.heading,
13995
14004
  labelClassName
13996
14005
  ),
13997
14006
  children: label
@@ -14003,7 +14012,7 @@ var MultiProgressBar = ({
14003
14012
  className: (0, import_classnames17.default)(
14004
14013
  tokens.meta,
14005
14014
  "mt-0.5",
14006
- !hasTextColor(secondaryLabelClassName) && text.muted,
14015
+ !hasTextColor(secondaryLabelClassName) && text2.muted,
14007
14016
  secondaryLabelClassName
14008
14017
  ),
14009
14018
  children: secondaryLabel
@@ -14013,7 +14022,7 @@ var MultiProgressBar = ({
14013
14022
  totalLabel && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
14014
14023
  "span",
14015
14024
  {
14016
- className: (0, import_classnames17.default)(tokens.meta, "font-medium", text.muted),
14025
+ className: (0, import_classnames17.default)(tokens.meta, "font-medium", text2.muted),
14017
14026
  children: totalLabel
14018
14027
  }
14019
14028
  )
@@ -14091,9 +14100,9 @@ var Shimmer_default = Shimmer;
14091
14100
  var import_classnames19 = __toESM(require("classnames"), 1);
14092
14101
  var import_react164 = __toESM(require("react"), 1);
14093
14102
  var import_jsx_runtime168 = require("react/jsx-runtime");
14094
- var StatusSpinnerLabel = ({ text }) => {
14103
+ var StatusSpinnerLabel = ({ text: text2 }) => {
14095
14104
  const surface = useSurfaceText();
14096
- 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 });
14097
14106
  };
14098
14107
  var StatusSpinner = import_react164.default.forwardRef(
14099
14108
  ({
@@ -14956,7 +14965,13 @@ var CollapseToggleButton = ({
14956
14965
  size = "sm",
14957
14966
  ...rest
14958
14967
  }) => {
14959
- const flipped = edge === "right" ? collapsed : !collapsed;
14968
+ const towardEdge = !collapsed;
14969
+ const rotation = {
14970
+ right: towardEdge ? "" : "rotate-180",
14971
+ left: towardEdge ? "rotate-180" : "",
14972
+ bottom: towardEdge ? "rotate-90" : "-rotate-90",
14973
+ top: towardEdge ? "-rotate-90" : "rotate-90"
14974
+ }[edge];
14960
14975
  return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
14961
14976
  IconButton_default,
14962
14977
  {
@@ -14965,7 +14980,7 @@ var CollapseToggleButton = ({
14965
14980
  {
14966
14981
  className: (0, import_classnames23.default)(
14967
14982
  "transition-transform duration-200 motion-reduce:transition-none",
14968
- flipped && "rotate-180"
14983
+ rotation
14969
14984
  )
14970
14985
  }
14971
14986
  ),
@@ -16003,7 +16018,7 @@ var DropdownButton_default = DropdownButton;
16003
16018
  var import_classnames28 = __toESM(require("classnames"), 1);
16004
16019
  var import_jsx_runtime177 = require("react/jsx-runtime");
16005
16020
  var Tooltip = ({
16006
- text,
16021
+ text: text2,
16007
16022
  delay = 500,
16008
16023
  position = "top",
16009
16024
  variant = "surface",
@@ -16013,11 +16028,11 @@ var Tooltip = ({
16013
16028
  wrapperClassName,
16014
16029
  children
16015
16030
  }) => {
16016
- 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 });
16017
16032
  return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
16018
16033
  TooltipWrapper_default,
16019
16034
  {
16020
- text,
16035
+ text: text2,
16021
16036
  delay,
16022
16037
  position,
16023
16038
  variant,
@@ -16360,9 +16375,9 @@ var InputOtp = (0, import_react172.forwardRef)(function InputOtp2({
16360
16375
  [integerOnly]
16361
16376
  );
16362
16377
  const distribute = (0, import_react172.useCallback)(
16363
- (start, text) => {
16378
+ (start, text2) => {
16364
16379
  const at = Math.min(start, current.length);
16365
- const clean = [...text].filter((char) => isAllowed(char)).slice(0, clampedLength - at);
16380
+ const clean = [...text2].filter((char) => isAllowed(char)).slice(0, clampedLength - at);
16366
16381
  if (!clean.length) return;
16367
16382
  const next = [...chars];
16368
16383
  clean.forEach((char, j) => {
@@ -20497,7 +20512,7 @@ var Checkbox = (0, import_react184.forwardRef)(
20497
20512
  children: description
20498
20513
  }
20499
20514
  ) : null;
20500
- const text = label || descriptionNode ? /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(
20515
+ const text2 = label || descriptionNode ? /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(
20501
20516
  "span",
20502
20517
  {
20503
20518
  className: (0, import_classnames41.default)(
@@ -20551,7 +20566,7 @@ var Checkbox = (0, import_react184.forwardRef)(
20551
20566
  ),
20552
20567
  children: [
20553
20568
  control,
20554
- text
20569
+ text2
20555
20570
  ]
20556
20571
  }
20557
20572
  ),
@@ -23046,7 +23061,8 @@ var PageHeader = ({
23046
23061
  className = "",
23047
23062
  ...rest
23048
23063
  }) => {
23049
- const sharedSurface = variant !== "default" && variant !== "floating" && variant !== "floating-glass";
23064
+ const plain = variant === "none" || variant === "plain";
23065
+ const sharedSurface = !plain && variant !== "default" && variant !== "floating" && variant !== "floating-glass";
23050
23066
  const surface = variant === "floating" || variant === "floating-glass" ? getSidebarSurfaceTokens(variant, accentColor) : null;
23051
23067
  const pair = surface ? "xs" : "none";
23052
23068
  const gutter = {
@@ -23072,7 +23088,7 @@ var PageHeader = ({
23072
23088
  surface.border,
23073
23089
  surface.shadow,
23074
23090
  surface.fill
23075
- ) : !sharedSurface && (0, import_classnames53.default)("border-b", SIDE_MENU_HEADER_FILL, SIDE_MENU_HEADER_SEAM),
23091
+ ) : !sharedSurface && !plain && (0, import_classnames53.default)("border-b", SIDE_MENU_HEADER_FILL, SIDE_MENU_HEADER_SEAM),
23076
23092
  className
23077
23093
  ),
23078
23094
  children: [
@@ -23904,7 +23920,7 @@ var safeHref = (href) => {
23904
23920
  if (/^#[^\s"'<>]*$/.test(h)) return h;
23905
23921
  return null;
23906
23922
  };
23907
- 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) => {
23908
23924
  const href = safeHref(h);
23909
23925
  if (!href) return t;
23910
23926
  return `<a href="${href}" target="_blank" rel="noopener noreferrer" class="text-blue-600 underline underline-offset-2 dark:text-blue-400">${t}</a>`;
@@ -24248,8 +24264,8 @@ var Chat2 = ({
24248
24264
  fail(err);
24249
24265
  }
24250
24266
  };
24251
- const send = async (text) => {
24252
- const content = text.trim();
24267
+ const send = async (text2) => {
24268
+ const content = text2.trim();
24253
24269
  if (!content || streaming) return;
24254
24270
  setDraft("");
24255
24271
  let chatId = activeIdRef.current;
@@ -24718,7 +24734,7 @@ var ChatRow = ({
24718
24734
  onMenu,
24719
24735
  menuRef
24720
24736
  }) => {
24721
- const [text, setText] = (0, import_react195.useState)(chat.title);
24737
+ const [text2, setText] = (0, import_react195.useState)(chat.title);
24722
24738
  if (renaming) {
24723
24739
  return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
24724
24740
  Input_default,
@@ -24726,13 +24742,13 @@ var ChatRow = ({
24726
24742
  size: "sm",
24727
24743
  autoFocus: true,
24728
24744
  className: "my-0.5",
24729
- value: text,
24745
+ value: text2,
24730
24746
  onChange: (event) => setText(event.target.value),
24731
24747
  onKeyDown: (event) => {
24732
- if (event.key === "Enter") onRenamed(text || chat.title);
24748
+ if (event.key === "Enter") onRenamed(text2 || chat.title);
24733
24749
  if (event.key === "Escape") onCancelRename();
24734
24750
  },
24735
- onBlur: () => onRenamed(text || chat.title)
24751
+ onBlur: () => onRenamed(text2 || chat.title)
24736
24752
  }
24737
24753
  );
24738
24754
  }
@@ -24769,17 +24785,17 @@ var FolderInput = ({
24769
24785
  onDone,
24770
24786
  onCancel
24771
24787
  }) => {
24772
- const [text, setText] = (0, import_react195.useState)(initial);
24788
+ const [text2, setText] = (0, import_react195.useState)(initial);
24773
24789
  return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
24774
24790
  Input_default,
24775
24791
  {
24776
24792
  size: "sm",
24777
24793
  autoFocus: true,
24778
24794
  placeholder: "Folder name",
24779
- value: text,
24795
+ value: text2,
24780
24796
  onChange: (event) => setText(event.target.value),
24781
24797
  onKeyDown: (event) => {
24782
- if (event.key === "Enter") onDone(text);
24798
+ if (event.key === "Enter") onDone(text2);
24783
24799
  if (event.key === "Escape") onCancel();
24784
24800
  }
24785
24801
  }
@@ -31153,10 +31169,10 @@ function PieSeries(props) {
31153
31169
  const lp = Math.max(1e-3, fracs[lb.index] ?? 0);
31154
31170
  const size = 11 * lp;
31155
31171
  if (size < 2) return;
31156
- const text = pctLabel(lb.pct * lp);
31172
+ const text2 = pctLabel(lb.pct * lp);
31157
31173
  c.globalAlpha = lp;
31158
31174
  c.font = `600 ${size}px sans-serif`;
31159
- const w = text.length * size * 0.58 + 12 * lp;
31175
+ const w = text2.length * size * 0.58 + 12 * lp;
31160
31176
  const h = 17 * lp;
31161
31177
  c.fillStyle = shadeColor(lb.color, 0.45);
31162
31178
  if (typeof c.roundRect === "function") {
@@ -31167,7 +31183,7 @@ function PieSeries(props) {
31167
31183
  c.fillRect(lb.x - w / 2, lb.y - h / 2, w, h);
31168
31184
  }
31169
31185
  c.fillStyle = "#fff";
31170
- c.fillText(text, lb.x, lb.y + 0.5);
31186
+ c.fillText(text2, lb.x, lb.y + 0.5);
31171
31187
  c.globalAlpha = 1;
31172
31188
  });
31173
31189
  c.restore();
@@ -31227,8 +31243,8 @@ function PieSeries(props) {
31227
31243
  const lp = Math.max(1e-3, fracs[lb.index] ?? 0);
31228
31244
  const size = 11 * lp;
31229
31245
  if (size < 2) return null;
31230
- const text = pctLabel(lb.pct * lp);
31231
- 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;
31232
31248
  const h = 17 * lp;
31233
31249
  return /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("g", { opacity: lp, pointerEvents: "none", children: [
31234
31250
  /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
@@ -31252,7 +31268,7 @@ function PieSeries(props) {
31252
31268
  fontSize: size,
31253
31269
  fontWeight: 600,
31254
31270
  fill: "#fff",
31255
- children: text
31271
+ children: text2
31256
31272
  }
31257
31273
  )
31258
31274
  ] }, lb.index);
@@ -31564,8 +31580,8 @@ function CandlestickSeries(props) {
31564
31580
  }
31565
31581
  if (hovered && hoverItem) {
31566
31582
  const up = hovered.direction !== "down";
31567
- const text = String(Math.round(hoverItem.value * 10) / 10);
31568
- 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;
31569
31585
  const h = 17;
31570
31586
  const top = hovered.highY - 8 - h;
31571
31587
  c.fillStyle = shadeColor(up ? upColor : downColor, 0.45);
@@ -31574,7 +31590,7 @@ function CandlestickSeries(props) {
31574
31590
  c.font = "600 11px sans-serif";
31575
31591
  c.textAlign = "center";
31576
31592
  c.textBaseline = "middle";
31577
- c.fillText(text, hovered.x, top + h / 2);
31593
+ c.fillText(text2, hovered.x, top + h / 2);
31578
31594
  }
31579
31595
  c.restore();
31580
31596
  };
@@ -31712,8 +31728,8 @@ function CandlestickSeries(props) {
31712
31728
  highlightOn && hoveredIndex >= 0 && hoverItem && (() => {
31713
31729
  const k = candles[hoveredIndex];
31714
31730
  const up = k.direction !== "down";
31715
- const text = String(Math.round(hoverItem.value * 10) / 10);
31716
- 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;
31717
31733
  const h = 17;
31718
31734
  const top = k.highY - 8 - h;
31719
31735
  return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("g", { pointerEvents: "none", children: [
@@ -31738,7 +31754,7 @@ function CandlestickSeries(props) {
31738
31754
  fontSize: 11,
31739
31755
  fontWeight: 600,
31740
31756
  fill: "#fff",
31741
- children: text
31757
+ children: text2
31742
31758
  }
31743
31759
  )
31744
31760
  ] });
@@ -34098,7 +34114,7 @@ function DataLabels(props = {}) {
34098
34114
  };
34099
34115
  return /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: [
34100
34116
  endpoints.map((ep) => {
34101
- 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);
34102
34118
  const renderPoint = {
34103
34119
  seriesId: ep.id,
34104
34120
  seriesName: ep.name,
@@ -34108,7 +34124,7 @@ function DataLabels(props = {}) {
34108
34124
  y: ep.y,
34109
34125
  isLast: true
34110
34126
  };
34111
- const w = text.length * 7 + 14;
34127
+ const w = text2.length * 7 + 14;
34112
34128
  const bx = props.anchor === "margin-left" ? Math.max(2, area2.x - w - 6) : Math.min(width - w - 2, ep.x + 10);
34113
34129
  const by = Math.max(2, Math.min(ep.y - PILL_H / 2, height - PILL_H - 2));
34114
34130
  if (props.render) {
@@ -34132,14 +34148,14 @@ function DataLabels(props = {}) {
34132
34148
  background: ep.color,
34133
34149
  color: "#ffffff"
34134
34150
  },
34135
- children: text
34151
+ children: text2
34136
34152
  },
34137
34153
  ep.id
34138
34154
  );
34139
34155
  }),
34140
34156
  pieSlices.map((sl) => {
34141
- const text = props.formatter ? props.formatter(sl.value, sl.name) : formatSI(sl.value);
34142
- 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;
34143
34159
  const bx = Math.max(2, Math.min(width - w - 2, sl.x - w / 2));
34144
34160
  const by = Math.max(2, Math.min(height - PILL_H - 2, sl.y - PILL_H / 2));
34145
34161
  if (props.render) {
@@ -34164,7 +34180,7 @@ function DataLabels(props = {}) {
34164
34180
  background: shadeColor(sl.color, 0.45),
34165
34181
  color: "#ffffff"
34166
34182
  },
34167
- children: text
34183
+ children: text2
34168
34184
  },
34169
34185
  sl.key
34170
34186
  );
@@ -36306,7 +36322,7 @@ var GlassBackground_default = GlassBackground;
36306
36322
  var import_react221 = require("react");
36307
36323
  var import_jsx_runtime238 = require("react/jsx-runtime");
36308
36324
  var TruncatedText = ({
36309
- text,
36325
+ text: text2,
36310
36326
  className,
36311
36327
  delay = 2e3,
36312
36328
  as: Tag = "div",
@@ -36325,11 +36341,11 @@ var TruncatedText = ({
36325
36341
  observer.observe(el);
36326
36342
  check();
36327
36343
  return () => observer.disconnect();
36328
- }, [text]);
36344
+ }, [text2]);
36329
36345
  const inner = /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
36330
36346
  TooltipWrapper_default,
36331
36347
  {
36332
- text: truncated ? text : void 0,
36348
+ text: truncated ? text2 : void 0,
36333
36349
  delay,
36334
36350
  position: tooltipPosition,
36335
36351
  children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
@@ -36344,7 +36360,7 @@ var TruncatedText = ({
36344
36360
  truncated && "rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400",
36345
36361
  className
36346
36362
  ].filter(Boolean).join(" "),
36347
- children: text
36363
+ children: text2
36348
36364
  }
36349
36365
  )
36350
36366
  }
@@ -36426,18 +36442,18 @@ function normaliseValue(value, boolWords) {
36426
36442
  return { display: null, copyText: null, isEmpty: true };
36427
36443
  }
36428
36444
  if (typeof value === "boolean") {
36429
- const text = value ? boolWords.yes : boolWords.no;
36430
- return { display: text, copyText: text, isEmpty: false };
36445
+ const text2 = value ? boolWords.yes : boolWords.no;
36446
+ return { display: text2, copyText: text2, isEmpty: false };
36431
36447
  }
36432
36448
  if (typeof value === "string" || typeof value === "number") {
36433
36449
  return { display: value, copyText: String(value), isEmpty: false };
36434
36450
  }
36435
36451
  return { display: value, copyText: null, isEmpty: false };
36436
36452
  }
36437
- async function writeClipboard(text) {
36453
+ async function writeClipboard(text2) {
36438
36454
  try {
36439
36455
  if (!navigator.clipboard?.writeText) return false;
36440
- await navigator.clipboard.writeText(text);
36456
+ await navigator.clipboard.writeText(text2);
36441
36457
  return true;
36442
36458
  } catch {
36443
36459
  return false;
@@ -36470,7 +36486,7 @@ var InfoRowBody = ({
36470
36486
  rootProps
36471
36487
  }) => {
36472
36488
  const t = useKitT();
36473
- const text = useSurfaceText();
36489
+ const text2 = useSurfaceText();
36474
36490
  const [copyState, setCopyState] = (0, import_react222.useState)("idle");
36475
36491
  const [dismissed, setDismissed] = (0, import_react222.useState)(false);
36476
36492
  const [truncated, setTruncated] = (0, import_react222.useState)(false);
@@ -36508,7 +36524,7 @@ var InfoRowBody = ({
36508
36524
  }, [canTooltip]);
36509
36525
  const loaderInk = `bg-${rowTone}-500/20 dark:bg-${rowTone}-500/25`;
36510
36526
  const loaderText = `text-${rowTone}-500 dark:text-${rowTone}-400`;
36511
- 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;
36512
36528
  const valueSpan = /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
36513
36529
  "span",
36514
36530
  {
@@ -36546,7 +36562,7 @@ var InfoRowBody = ({
36546
36562
  // `!copied` so the confirmation wash is never racing the hover wash for
36547
36563
  // the same property.
36548
36564
  hoverable && copyState === "idle" && trigger.hover,
36549
- !noBorder && !hoverable && `border-b ${text.divider} last:border-0`,
36565
+ !noBorder && !hoverable && `border-b ${text2.divider} last:border-0`,
36550
36566
  copyState === "copied" && "bg-emerald-500/10",
36551
36567
  copyState === "failed" && "bg-rose-500/10",
36552
36568
  className
@@ -36558,7 +36574,7 @@ var InfoRowBody = ({
36558
36574
  {
36559
36575
  className: (0, import_classnames60.default)(
36560
36576
  labelTokens.text,
36561
- !hasTextColor(labelClassName) && text.muted,
36577
+ !hasTextColor(labelClassName) && text2.muted,
36562
36578
  useSmartLayout ? "shrink-0 min-w-0 max-w-[30%] truncate" : `grow shrink-0 ${labelWidth ?? tokens.defaultLabelWidth}`,
36563
36579
  labelClassName
36564
36580
  ),
@@ -36879,7 +36895,7 @@ var PagedPanelBody = ({
36879
36895
  onPrev,
36880
36896
  onNext
36881
36897
  }) => {
36882
- const text = useSurfaceText();
36898
+ const text2 = useSurfaceText();
36883
36899
  const t = useKitT();
36884
36900
  const tokens = SIZE_TOKENS2[size] ?? SIZE_TOKENS2.md;
36885
36901
  const emptySize = PANE_EMPTY_STATE_SIZE[size] ?? PANE_EMPTY_STATE_SIZE.md;
@@ -36892,7 +36908,7 @@ var PagedPanelBody = ({
36892
36908
  className: (0, import_classnames62.default)(
36893
36909
  "flex items-center gap-2 border-b",
36894
36910
  tokens.pad,
36895
- text.divider
36911
+ text2.divider
36896
36912
  ),
36897
36913
  children: [
36898
36914
  /* @__PURE__ */ (0, import_jsx_runtime241.jsx)("div", { className: "shrink-0", children: showNav && /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
@@ -36915,7 +36931,7 @@ var PagedPanelBody = ({
36915
36931
  className: (0, import_classnames62.default)(
36916
36932
  "font-semibold leading-snug truncate",
36917
36933
  tokens.title,
36918
- text.heading
36934
+ text2.heading
36919
36935
  ),
36920
36936
  children: resolvedTitle
36921
36937
  }
@@ -36926,7 +36942,7 @@ var PagedPanelBody = ({
36926
36942
  className: (0, import_classnames62.default)(
36927
36943
  "mt-0.5 truncate",
36928
36944
  tokens.subtitle,
36929
- text.muted
36945
+ text2.muted
36930
36946
  ),
36931
36947
  children: subtitle
36932
36948
  }
@@ -36941,7 +36957,7 @@ var PagedPanelBody = ({
36941
36957
  className: (0, import_classnames62.default)(
36942
36958
  "mt-0.5 tabular-nums",
36943
36959
  tokens.counter,
36944
- text.muted
36960
+ text2.muted
36945
36961
  ),
36946
36962
  children: [
36947
36963
  current + 1,
@@ -38008,7 +38024,7 @@ var HelpBody = ({
38008
38024
  };
38009
38025
  var CollapsibleHelpText = ({
38010
38026
  title,
38011
- text,
38027
+ text: text2,
38012
38028
  maxLength = 160,
38013
38029
  showIcon = false,
38014
38030
  icon = "Help",
@@ -38028,7 +38044,7 @@ var CollapsibleHelpText = ({
38028
38044
  }) => {
38029
38045
  const [expanded, setExpanded] = (0, import_react228.useState)(false);
38030
38046
  const regionId = (0, import_react228.useId)();
38031
- const sanitized = text?.trim() ?? "";
38047
+ const sanitized = text2?.trim() ?? "";
38032
38048
  const needsTruncation = sanitized.length > maxLength;
38033
38049
  const displayText = expanded || !needsTruncation ? sanitized : truncate(sanitized, maxLength);
38034
38050
  const toneTokens3 = getCollapsibleHelpToneTokens(tone);
@@ -39337,7 +39353,7 @@ var DatePicker = (0, import_react234.forwardRef)(
39337
39353
  setViewDate(getViewDate(currentValue, constraints));
39338
39354
  }
39339
39355
  }, [currentValue, constraints]);
39340
- const [text, setText] = (0, import_react234.useState)(() => formatValue(initialValue, format2));
39356
+ const [text2, setText] = (0, import_react234.useState)(() => formatValue(initialValue, format2));
39341
39357
  const [textInvalid, setTextInvalid] = (0, import_react234.useState)(false);
39342
39358
  const [focused, setFocused] = (0, import_react234.useState)(false);
39343
39359
  const focusedRef = (0, import_react234.useRef)(false);
@@ -39494,7 +39510,7 @@ var DatePicker = (0, import_react234.forwardRef)(
39494
39510
  }
39495
39511
  if (event.key === "Enter") {
39496
39512
  const parsed = parseValueText(
39497
- text,
39513
+ text2,
39498
39514
  selectionMode,
39499
39515
  format2,
39500
39516
  /* @__PURE__ */ new Date(),
@@ -39719,7 +39735,7 @@ var DatePicker = (0, import_react234.forwardRef)(
39719
39735
  readOnly: readonly,
39720
39736
  inputMode: "none",
39721
39737
  autoComplete: "off",
39722
- value: text,
39738
+ value: text2,
39723
39739
  onChange: handleTextChange,
39724
39740
  onFocus: (event) => {
39725
39741
  focusedRef.current = true;
@@ -43464,6 +43480,21 @@ var InlinePanel_default = InlinePanel;
43464
43480
  // src/components/SideMenu.tsx
43465
43481
  var import_react_router_dom2 = require("react-router-dom");
43466
43482
  var import_react246 = __toESM(require("react"), 1);
43483
+
43484
+ // ../common/theme/noise.ts
43485
+ var NOISE_BACKGROUND_IMAGE = `url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`;
43486
+ var LIGHT = "mix-blend-multiply opacity-[0.08]";
43487
+ var DARK = "mix-blend-overlay opacity-[0.4]";
43488
+ function getNoiseBlendClasses(scheme = "auto") {
43489
+ if (scheme === "light") return LIGHT;
43490
+ if (scheme === "dark") return DARK;
43491
+ return `${LIGHT} dark:mix-blend-overlay dark:opacity-[0.4]`;
43492
+ }
43493
+ function getNoiseBackgroundSize(scale) {
43494
+ return scale !== void 0 && Number.isFinite(scale) && scale > 0 ? `${200 * scale}px ${200 * scale}px` : void 0;
43495
+ }
43496
+
43497
+ // src/components/SideMenu.tsx
43467
43498
  var import_jsx_runtime259 = require("react/jsx-runtime");
43468
43499
  var EMPTY_VIEW_OPTIONS = [];
43469
43500
  var NOISE_STYLE = {
@@ -43808,6 +43839,7 @@ var SideMenu = ({
43808
43839
  footerDetails,
43809
43840
  footerDetailsTone,
43810
43841
  noise = false,
43842
+ noiseScale,
43811
43843
  loading = false,
43812
43844
  loaderType = "skeleton",
43813
43845
  loaderTitle,
@@ -44458,7 +44490,8 @@ var SideMenu = ({
44458
44490
  "div",
44459
44491
  {
44460
44492
  className: `absolute inset-0 opacity-[0.4] pointer-events-none mix-blend-overlay ${surface.radius}`,
44461
- style: NOISE_STYLE
44493
+ "data-sidemenu-noise": true,
44494
+ style: { ...NOISE_STYLE, backgroundSize: getNoiseBackgroundSize(noiseScale) }
44462
44495
  }
44463
44496
  ),
44464
44497
  /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
@@ -44804,18 +44837,6 @@ var import_react251 = require("react");
44804
44837
  // src/components/SidePanel.tsx
44805
44838
  var import_react250 = require("react");
44806
44839
  var import_classnames80 = __toESM(require("classnames"), 1);
44807
-
44808
- // ../common/theme/noise.ts
44809
- var NOISE_BACKGROUND_IMAGE = `url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`;
44810
- var LIGHT = "mix-blend-multiply opacity-[0.08]";
44811
- var DARK = "mix-blend-overlay opacity-[0.4]";
44812
- function getNoiseBlendClasses(scheme = "auto") {
44813
- if (scheme === "light") return LIGHT;
44814
- if (scheme === "dark") return DARK;
44815
- return `${LIGHT} dark:mix-blend-overlay dark:opacity-[0.4]`;
44816
- }
44817
-
44818
- // src/components/SidePanel.tsx
44819
44840
  var import_jsx_runtime263 = require("react/jsx-runtime");
44820
44841
  var LEGACY_PANEL_VARIANTS = {
44821
44842
  sidebar: "elevated",
@@ -44825,20 +44846,46 @@ var LEGACY_PANEL_VARIANTS = {
44825
44846
  };
44826
44847
  var resolvePanelVariant2 = (variant) => variant in LEGACY_PANEL_VARIANTS ? LEGACY_PANEL_VARIANTS[variant] : variant;
44827
44848
  var getSidePanelTextTokens = (variant) => getSurfaceTextTokens(resolvePanelVariant2(variant));
44828
- var INSET_GAP_Y_CLASS = "inset-y-4";
44849
+ var INSET_GAP = {
44850
+ xs: { x: "inset-x-1", y: "inset-y-1", px: "px-1", py: "py-1" },
44851
+ sm: { x: "inset-x-2", y: "inset-y-2", px: "px-2", py: "py-2" },
44852
+ md: { x: "inset-x-4", y: "inset-y-4", px: "px-4", py: "py-4" },
44853
+ lg: { x: "inset-x-6", y: "inset-y-6", px: "px-6", py: "py-6" },
44854
+ xl: { x: "inset-x-8", y: "inset-y-8", px: "px-8", py: "py-8" }
44855
+ };
44856
+ var INSET_BORDER = {
44857
+ right: "border-y border-l",
44858
+ left: "border-y border-r",
44859
+ top: "border-x border-b",
44860
+ bottom: "border-x border-t"
44861
+ };
44862
+ var FLUSH_BORDER = {
44863
+ right: "border-l",
44864
+ left: "border-r",
44865
+ top: "border-b",
44866
+ bottom: "border-t"
44867
+ };
44868
+ var BAR_INSET = {
44869
+ none: { x: "inset-x-0", y: "inset-y-0" },
44870
+ rounded: { x: "inset-x-1", y: "inset-y-1" },
44871
+ "rounded-sm": { x: "inset-x-2", y: "inset-y-2" },
44872
+ "rounded-md": { x: "inset-x-4", y: "inset-y-4" },
44873
+ "rounded-lg": { x: "inset-x-6", y: "inset-y-6" },
44874
+ "rounded-xl": { x: "inset-x-8", y: "inset-y-8" }
44875
+ };
44829
44876
  var INNER_CORNER = {
44830
44877
  // (`"auto"` is absent by design: SidePanel's own default is `rounded`, and
44831
44878
  // corner lookups below resolve it to the theme default.)
44832
- none: { right: "", left: "" },
44833
- rounded: { right: "rounded-l-sm", left: "rounded-r-sm" },
44834
- "rounded-sm": { right: "rounded-l-lg", left: "rounded-r-lg" },
44835
- "rounded-md": { right: "rounded-l-2xl", left: "rounded-r-2xl" },
44836
- "rounded-lg": { right: "rounded-l-3xl", left: "rounded-r-3xl" },
44837
- "rounded-xl": { right: "rounded-l-4xl", left: "rounded-r-4xl" }
44838
- };
44839
- var SIDE_PANEL_SIDES = ["left", "right"];
44840
- var OPEN_DURATION_MS = 450;
44841
- var OPEN_EASING = "cubic-bezier(0.32, 0.72, 0, 1)";
44879
+ none: { right: "", left: "", top: "", bottom: "" },
44880
+ rounded: { right: "rounded-l-sm", left: "rounded-r-sm", top: "rounded-b-sm", bottom: "rounded-t-sm" },
44881
+ "rounded-sm": { right: "rounded-l-lg", left: "rounded-r-lg", top: "rounded-b-lg", bottom: "rounded-t-lg" },
44882
+ "rounded-md": { right: "rounded-l-2xl", left: "rounded-r-2xl", top: "rounded-b-2xl", bottom: "rounded-t-2xl" },
44883
+ "rounded-lg": { right: "rounded-l-3xl", left: "rounded-r-3xl", top: "rounded-b-3xl", bottom: "rounded-t-3xl" },
44884
+ "rounded-xl": { right: "rounded-l-4xl", left: "rounded-r-4xl", top: "rounded-b-4xl", bottom: "rounded-t-4xl" }
44885
+ };
44886
+ var SIDE_PANEL_SIDES = ["left", "right", "top", "bottom"];
44887
+ var OPEN_DURATION_MS = PANEL_SLIDE_DURATION_MS;
44888
+ var OPEN_EASING = PANEL_SLIDE_EASING;
44842
44889
  var SIZE_TOKENS4 = {
44843
44890
  xs: {
44844
44891
  pad: "px-2 py-1.5",
@@ -44879,6 +44926,9 @@ var SidePanel = ({
44879
44926
  subtitle,
44880
44927
  icon,
44881
44928
  width = 420,
44929
+ height = 240,
44930
+ minHeight = 120,
44931
+ maxHeight = 600,
44882
44932
  headerActions,
44883
44933
  footer,
44884
44934
  children,
@@ -44898,6 +44948,7 @@ var SidePanel = ({
44898
44948
  side = "right",
44899
44949
  overlay = false,
44900
44950
  noise = false,
44951
+ noiseScale,
44901
44952
  inset,
44902
44953
  corner = DEFAULT_SURFACE_CORNER,
44903
44954
  collapsible = false,
@@ -44909,6 +44960,7 @@ var SidePanel = ({
44909
44960
  }) => {
44910
44961
  const t = useKitT();
44911
44962
  warnIfMissingTitle("SidePanel", title);
44963
+ const vertical = side === "top" || side === "bottom";
44912
44964
  const effectiveTone = tone ?? color ?? "neutral";
44913
44965
  const sizeToken = SIZE_TOKENS4[size] ?? SIZE_TOKENS4.md;
44914
44966
  const legacyVariant = variant in LEGACY_PANEL_VARIANTS;
@@ -44922,10 +44974,13 @@ var SidePanel = ({
44922
44974
  surfaceTone
44923
44975
  );
44924
44976
  const surfaceText = getSidePanelTextTokens(variant);
44925
- const isInset = inset ?? surface.offset !== "";
44926
- const cornerClass = INNER_CORNER[corner === "auto" ? DEFAULT_SURFACE_CORNER : corner][side];
44927
- const borderClass = surface.border ? `${surface.border} ${isInset ? side === "right" ? "border-y border-l" : "border-y border-r" : surface.borderSides === "all" ? "border" : side === "right" ? "border-l" : "border-r"}` : "";
44928
- const shadowClass = side === "left" ? surface.shadow : surface.shadowRight;
44977
+ const insetValue = inset ?? surface.offset !== "";
44978
+ const insetSize = insetValue === true ? "md" : insetValue === false || insetValue === "none" ? null : insetValue;
44979
+ const isInset = insetSize !== null;
44980
+ const insetGap = insetSize ? INSET_GAP[insetSize] : null;
44981
+ const cornerClass = docked ? getSurfaceCornerClass(corner) : INNER_CORNER[corner === "auto" ? DEFAULT_SURFACE_CORNER : corner][side];
44982
+ const borderClass = surface.border ? `${surface.border} ${docked ? "border" : isInset ? INSET_BORDER[side] : surface.borderSides === "all" ? "border" : FLUSH_BORDER[side]}` : "";
44983
+ const shadowClass = side === "right" ? surface.shadowRight : surface.shadow;
44929
44984
  const [mounted, setMounted] = (0, import_react250.useState)(isOpen);
44930
44985
  const [entered, setEntered] = (0, import_react250.useState)(isOpen);
44931
44986
  const prevOpenRef = (0, import_react250.useRef)(isOpen);
@@ -44946,10 +45001,11 @@ var SidePanel = ({
44946
45001
  }, [mounted, isOpen, entered]);
44947
45002
  const handleTransitionEnd = (event) => {
44948
45003
  if (event.target !== event.currentTarget) return;
44949
- if (event.propertyName !== "width") return;
45004
+ if (event.propertyName !== (vertical ? "height" : "width")) return;
44950
45005
  if (!isOpen) setMounted(false);
44951
45006
  };
44952
45007
  const [currentWidth, setCurrentWidth] = (0, import_react250.useState)(width);
45008
+ const [currentHeight, setCurrentHeight] = (0, import_react250.useState)(height);
44953
45009
  const isDraggingRef = (0, import_react250.useRef)(false);
44954
45010
  const [isDragging, setIsDragging] = (0, import_react250.useState)(false);
44955
45011
  const startXRef = (0, import_react250.useRef)(0);
@@ -44957,15 +45013,25 @@ var SidePanel = ({
44957
45013
  (0, import_react250.useEffect)(() => {
44958
45014
  if (!isDraggingRef.current) setCurrentWidth(width);
44959
45015
  }, [width]);
45016
+ (0, import_react250.useEffect)(() => {
45017
+ if (!isDraggingRef.current) setCurrentHeight(height);
45018
+ }, [height]);
44960
45019
  const onMouseDown = (0, import_react250.useCallback)(
44961
45020
  (e) => {
44962
45021
  if (!resizable) return;
44963
45022
  e.preventDefault();
44964
45023
  isDraggingRef.current = true;
44965
45024
  setIsDragging(true);
44966
- startXRef.current = e.clientX;
44967
- startWidthRef.current = currentWidth;
45025
+ startXRef.current = vertical ? e.clientY : e.clientX;
45026
+ startWidthRef.current = vertical ? currentHeight : currentWidth;
44968
45027
  const onMouseMove = (ev) => {
45028
+ if (vertical) {
45029
+ const delta2 = side === "bottom" ? startXRef.current - ev.clientY : ev.clientY - startXRef.current;
45030
+ setCurrentHeight(
45031
+ Math.min(maxHeight, Math.max(minHeight, startWidthRef.current + delta2))
45032
+ );
45033
+ return;
45034
+ }
44969
45035
  const delta = side === "right" ? startXRef.current - ev.clientX : ev.clientX - startXRef.current;
44970
45036
  const next = Math.min(
44971
45037
  maxWidth,
@@ -44974,7 +45040,7 @@ var SidePanel = ({
44974
45040
  setCurrentWidth(next);
44975
45041
  };
44976
45042
  document.body.style.userSelect = "none";
44977
- document.body.style.cursor = "col-resize";
45043
+ document.body.style.cursor = vertical ? "row-resize" : "col-resize";
44978
45044
  const onMouseUp = () => {
44979
45045
  isDraggingRef.current = false;
44980
45046
  setIsDragging(false);
@@ -44986,9 +45052,10 @@ var SidePanel = ({
44986
45052
  window.addEventListener("mousemove", onMouseMove);
44987
45053
  window.addEventListener("mouseup", onMouseUp);
44988
45054
  },
44989
- [resizable, currentWidth, minWidth, maxWidth, side]
45055
+ [resizable, vertical, currentWidth, currentHeight, minWidth, maxWidth, minHeight, maxHeight, side]
44990
45056
  );
44991
45057
  const resolvedWidth = resizable ? currentWidth : width;
45058
+ const resolvedHeight = resizable ? currentHeight : height;
44992
45059
  const [internalCollapsed, setInternalCollapsed] = (0, import_react250.useState)(defaultCollapsed);
44993
45060
  const isCollapsed = collapsible && (collapsed ?? internalCollapsed);
44994
45061
  const toggleCollapsed = () => {
@@ -44997,6 +45064,7 @@ var SidePanel = ({
44997
45064
  onCollapsedChange?.(next);
44998
45065
  };
44999
45066
  const shellWidth = isCollapsed ? COLLAPSED_RAIL_WIDTH : resolvedWidth;
45067
+ const shellHeight = isCollapsed ? COLLAPSED_RAIL_WIDTH : resolvedHeight;
45000
45068
  const collapseButton = (label) => /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
45001
45069
  CollapseToggleButton,
45002
45070
  {
@@ -45011,39 +45079,38 @@ var SidePanel = ({
45011
45079
  (e) => {
45012
45080
  if (!resizable) return;
45013
45081
  const step = 20;
45014
- const grow = side === "right" ? e.key === "ArrowLeft" : e.key === "ArrowRight";
45015
- const shrink = side === "right" ? e.key === "ArrowRight" : e.key === "ArrowLeft";
45082
+ const growKey = { right: "ArrowLeft", left: "ArrowRight", bottom: "ArrowUp", top: "ArrowDown" }[side];
45083
+ const shrinkKey = { right: "ArrowRight", left: "ArrowLeft", bottom: "ArrowDown", top: "ArrowUp" }[side];
45084
+ const grow = e.key === growKey;
45085
+ const shrink = e.key === shrinkKey;
45086
+ const [min, max, current, set] = vertical ? [minHeight, maxHeight, currentHeight, setCurrentHeight] : [minWidth, maxWidth, currentWidth, setCurrentWidth];
45016
45087
  if (e.key === "Home") {
45017
45088
  e.preventDefault();
45018
- setCurrentWidth(minWidth);
45089
+ set(min);
45019
45090
  return;
45020
45091
  }
45021
45092
  if (e.key === "End") {
45022
45093
  e.preventDefault();
45023
- setCurrentWidth(maxWidth);
45094
+ set(max);
45024
45095
  return;
45025
45096
  }
45026
45097
  if (!grow && !shrink) return;
45027
45098
  e.preventDefault();
45028
- setCurrentWidth(
45029
- Math.min(
45030
- maxWidth,
45031
- Math.max(minWidth, currentWidth + (grow ? step : -step))
45032
- )
45033
- );
45099
+ set(Math.min(max, Math.max(min, current + (grow ? step : -step))));
45034
45100
  },
45035
- [resizable, side, currentWidth, minWidth, maxWidth]
45101
+ [resizable, vertical, side, currentWidth, currentHeight, minWidth, maxWidth, minHeight, maxHeight]
45036
45102
  );
45037
45103
  if (!mounted || docked && !isOpen) return null;
45038
- const edgeOffset = entered ? shellWidth : 0;
45104
+ const edgeOffset = entered ? vertical ? shellHeight : shellWidth : 0;
45039
45105
  const barTone = isDragging ? `opacity-100 bg-${effectiveTone}-500` : `bg-${effectiveTone}-400 opacity-0 group-hover:opacity-70 group-active:opacity-100`;
45040
- const edgeProperty = side === "right" ? "right" : "left";
45106
+ const gripTone = isDragging ? `opacity-100 bg-${effectiveTone}-500` : `bg-${effectiveTone}-400 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100`;
45107
+ const edgeProperty = side;
45041
45108
  const handleStyle = {
45042
45109
  [edgeProperty]: edgeOffset,
45043
45110
  transition: isDragging ? void 0 : `${edgeProperty} ${OPEN_DURATION_MS}ms ${OPEN_EASING}, opacity ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
45044
45111
  };
45045
45112
  const handleParked = isCollapsed;
45046
- return /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(import_jsx_runtime263.Fragment, { children: [
45113
+ const panel = /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(import_jsx_runtime263.Fragment, { children: [
45047
45114
  /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
45048
45115
  "div",
45049
45116
  {
@@ -45051,22 +45118,22 @@ var SidePanel = ({
45051
45118
  "data-sp-shell": true,
45052
45119
  "data-collapsed": collapsible ? isCollapsed : void 0,
45053
45120
  className: (0, import_classnames80.default)(
45054
- docked ? "relative h-full w-full overflow-hidden" : "absolute z-40 overflow-hidden",
45055
- !docked && (isInset ? INSET_GAP_Y_CLASS : "top-0 h-full"),
45056
- side === "right" ? "right-0" : "left-0",
45121
+ docked ? (0, import_classnames80.default)("relative shrink-0 overflow-hidden", vertical ? "w-full" : "h-full") : "absolute z-40 overflow-hidden",
45122
+ !docked && (vertical ? insetGap ? insetGap.x : "left-0 w-full" : insetGap ? insetGap.y : "top-0 h-full"),
45123
+ !docked && { right: "right-0", left: "left-0", top: "top-0", bottom: "bottom-0" }[side],
45057
45124
  cornerClass,
45058
45125
  legacyVariant && borderClass,
45059
45126
  legacyVariant ? shadowClass : panelOuterChrome
45060
45127
  ),
45061
45128
  style: {
45062
- width: docked ? "100%" : entered ? shellWidth : 0,
45129
+ ...vertical ? { height: entered ? shellHeight : 0 } : { width: entered ? shellWidth : 0 },
45063
45130
  // Inline rather than `transition-[width] duration-… ease-…`: an
45064
45131
  // arbitrary easing utility would have to survive the safelist, and
45065
45132
  // this curve is not themeable anyway. It decelerates hard at the end,
45066
45133
  // which is what stops the panel feeling like it snaps into place.
45067
45134
  // Suppressed while resizing so the panel tracks the pointer exactly
45068
45135
  // rather than lagging a third of a second behind it.
45069
- transition: isDragging ? void 0 : `width ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
45136
+ transition: isDragging ? void 0 : `${vertical ? "height" : "width"} ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
45070
45137
  },
45071
45138
  onTransitionEnd: handleTransitionEnd,
45072
45139
  children: [
@@ -45106,7 +45173,7 @@ var SidePanel = ({
45106
45173
  getNoiseBlendClasses(),
45107
45174
  cornerClass
45108
45175
  ),
45109
- style: { backgroundImage: NOISE_BACKGROUND_IMAGE }
45176
+ style: { backgroundImage: NOISE_BACKGROUND_IMAGE, backgroundSize: getNoiseBackgroundSize(noiseScale) }
45110
45177
  }
45111
45178
  ),
45112
45179
  /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
@@ -45116,12 +45183,13 @@ var SidePanel = ({
45116
45183
  inert: isCollapsed || void 0,
45117
45184
  "aria-hidden": isCollapsed || void 0,
45118
45185
  className: (0, import_classnames80.default)(
45119
- "relative flex h-full flex-col transition-opacity duration-200 motion-reduce:transition-none",
45186
+ "flex flex-col transition-opacity duration-200 motion-reduce:transition-none",
45187
+ side === "top" ? "absolute inset-x-0 bottom-0" : "relative h-full",
45120
45188
  side === "left" && "ml-auto",
45121
45189
  isCollapsed && "opacity-0",
45122
45190
  className
45123
45191
  ),
45124
- style: { width: docked ? "100%" : resolvedWidth },
45192
+ style: vertical ? { height: resolvedHeight } : { width: resolvedWidth },
45125
45193
  onKeyDown,
45126
45194
  children: [
45127
45195
  /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
@@ -45158,7 +45226,9 @@ var SidePanel = ({
45158
45226
  )
45159
45227
  ] }),
45160
45228
  /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)("div", { className: "flex shrink-0 items-center gap-1 pt-0.5", children: [
45161
- collapsible && collapseButton(t("kit.sidepanel.collapse")),
45229
+ collapsible && collapseButton(
45230
+ t("kit.sidepanel.collapse")
45231
+ ),
45162
45232
  headerActions,
45163
45233
  onClose && !collapsible && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
45164
45234
  IconButton_default,
@@ -45185,10 +45255,10 @@ var SidePanel = ({
45185
45255
  {
45186
45256
  "data-sp-collapsed": true,
45187
45257
  className: (0, import_classnames80.default)(
45188
- "absolute inset-y-0 flex flex-col items-center gap-3 py-3",
45189
- side === "right" ? "left-0" : "right-0"
45258
+ "absolute flex items-center gap-3",
45259
+ vertical ? "inset-x-0 top-0 flex-row px-3" : (0, import_classnames80.default)("inset-y-0 flex-col py-3", side === "right" ? "left-0" : "right-0")
45190
45260
  ),
45191
- style: { width: COLLAPSED_RAIL_WIDTH },
45261
+ style: vertical ? { height: COLLAPSED_RAIL_WIDTH } : { width: COLLAPSED_RAIL_WIDTH },
45192
45262
  children: [
45193
45263
  collapseButton(t("kit.sidepanel.expand")),
45194
45264
  (collapsedLabel ?? title) && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
@@ -45196,7 +45266,8 @@ var SidePanel = ({
45196
45266
  {
45197
45267
  "data-sp-collapsed-label": true,
45198
45268
  className: (0, import_classnames80.default)(
45199
- "min-h-0 truncate text-xs font-semibold uppercase tracking-[0.2em] [writing-mode:vertical-rl]",
45269
+ "truncate text-xs font-semibold uppercase tracking-[0.2em]",
45270
+ vertical ? "min-w-0" : "min-h-0 [writing-mode:vertical-rl]",
45200
45271
  surfaceText.muted
45201
45272
  ),
45202
45273
  children: collapsedLabel ?? title
@@ -45225,7 +45296,7 @@ var SidePanel = ({
45225
45296
  }
45226
45297
  }
45227
45298
  ),
45228
- resizable && !docked && // ARIA 1.2 resizable separator: focusable (tabIndex), arrow keys /
45299
+ resizable && // ARIA 1.2 resizable separator: focusable (tabIndex), arrow keys /
45229
45300
  // Home / End resize, aria-valuenow|min|max report the width. Parked
45230
45301
  // (collapsed), it drops the role and every aria-* and leaves the tab
45231
45302
  // order — see `handleParked`.
@@ -45237,15 +45308,16 @@ var SidePanel = ({
45237
45308
  onKeyDown: handleParked ? void 0 : onSeparatorKeyDown,
45238
45309
  role: handleParked ? void 0 : "separator",
45239
45310
  "aria-hidden": handleParked || void 0,
45240
- "aria-orientation": handleParked ? void 0 : "vertical",
45311
+ "aria-orientation": handleParked ? void 0 : vertical ? "horizontal" : "vertical",
45241
45312
  "aria-label": handleParked ? void 0 : t("kit.sidepanel.resize"),
45242
- "aria-valuenow": handleParked ? void 0 : resolvedWidth,
45243
- "aria-valuemin": handleParked ? void 0 : minWidth,
45244
- "aria-valuemax": handleParked ? void 0 : maxWidth,
45313
+ "aria-valuenow": handleParked ? void 0 : vertical ? resolvedHeight : resolvedWidth,
45314
+ "aria-valuemin": handleParked ? void 0 : vertical ? minHeight : minWidth,
45315
+ "aria-valuemax": handleParked ? void 0 : vertical ? maxHeight : maxWidth,
45245
45316
  tabIndex: handleParked ? -1 : 0,
45246
45317
  className: (0, import_classnames80.default)(
45247
- "group absolute z-40 w-3 cursor-col-resize bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 dark:focus-visible:ring-blue-500",
45248
- isInset ? INSET_GAP_Y_CLASS : "inset-y-0",
45318
+ "group absolute z-40 bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 dark:focus-visible:ring-blue-500",
45319
+ vertical ? "h-3 cursor-row-resize" : "w-3 cursor-col-resize",
45320
+ vertical ? insetGap ? insetGap.x : "inset-x-0" : insetGap ? insetGap.y : "inset-y-0",
45249
45321
  handleParked && "pointer-events-none opacity-0"
45250
45322
  ),
45251
45323
  style: handleStyle,
@@ -45256,8 +45328,16 @@ var SidePanel = ({
45256
45328
  className: (0, import_classnames80.default)(
45257
45329
  // A hairline bar, centred on the panel edge (2px wide at -1px),
45258
45330
  // so the grip below sits on it as a bulge on one centre line.
45259
- "absolute inset-y-2 w-0.5 rounded-full transition duration-150",
45260
- side === "right" ? "-right-px" : "-left-px",
45331
+ // Inset by the corner radius, so the line stops where the
45332
+ // rounded corner starts instead of running past the curve.
45333
+ "absolute rounded-full transition duration-150",
45334
+ BAR_INSET[corner === "auto" ? DEFAULT_SURFACE_CORNER : corner][vertical ? "x" : "y"],
45335
+ {
45336
+ right: "w-0.5 -right-px",
45337
+ left: "w-0.5 -left-px",
45338
+ bottom: "h-0.5 -bottom-px",
45339
+ top: "h-0.5 -top-px"
45340
+ }[side],
45261
45341
  barTone
45262
45342
  )
45263
45343
  }
@@ -45268,8 +45348,8 @@ var SidePanel = ({
45268
45348
  "aria-hidden": "true",
45269
45349
  "data-sp-grip": true,
45270
45350
  className: (0, import_classnames80.default)(
45271
- "pointer-events-none absolute top-1/2 h-10 w-1 -translate-y-1/2",
45272
- side === "right" ? "-right-0.5" : "-left-0.5"
45351
+ "pointer-events-none absolute",
45352
+ vertical ? (0, import_classnames80.default)("left-1/2 h-1 w-10 -translate-x-1/2", side === "bottom" ? "-bottom-0.5" : "-top-0.5") : (0, import_classnames80.default)("top-1/2 h-10 w-1 -translate-y-1/2", side === "right" ? "-right-0.5" : "-left-0.5")
45273
45353
  ),
45274
45354
  children: [
45275
45355
  /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
@@ -45277,8 +45357,8 @@ var SidePanel = ({
45277
45357
  {
45278
45358
  "data-sp-grip-rest": true,
45279
45359
  className: (0, import_classnames80.default)(
45280
- "absolute inset-0 rounded-full bg-neutral-400 transition-opacity duration-150 dark:bg-neutral-500",
45281
- isDragging ? "opacity-0" : "opacity-40 group-hover:opacity-0 group-focus-visible:opacity-0"
45360
+ "absolute inset-0 rounded-full bg-neutral-300 transition-opacity duration-150 dark:bg-neutral-600",
45361
+ isDragging ? "opacity-0" : "opacity-100 group-hover:opacity-0 group-focus-visible:opacity-0"
45282
45362
  )
45283
45363
  }
45284
45364
  ),
@@ -45286,7 +45366,7 @@ var SidePanel = ({
45286
45366
  "span",
45287
45367
  {
45288
45368
  "data-sp-grip-active": true,
45289
- className: (0, import_classnames80.default)("absolute inset-0 rounded-full transition duration-150", barTone)
45369
+ className: (0, import_classnames80.default)("absolute inset-0 rounded-full transition duration-150", gripTone)
45290
45370
  }
45291
45371
  )
45292
45372
  ]
@@ -45296,6 +45376,20 @@ var SidePanel = ({
45296
45376
  }
45297
45377
  )
45298
45378
  ] });
45379
+ return docked ? /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
45380
+ "div",
45381
+ {
45382
+ "data-sp-dock": true,
45383
+ className: (0, import_classnames80.default)(
45384
+ "relative flex shrink-0",
45385
+ vertical ? "w-full flex-col" : "h-full",
45386
+ // Inset docked: the gap is padding on the wrapper, so the panel is
45387
+ // shorter (narrower) than its zone; the handle matches it above.
45388
+ insetGap && (vertical ? insetGap.px : insetGap.py)
45389
+ ),
45390
+ children: panel
45391
+ }
45392
+ ) : panel;
45299
45393
  };
45300
45394
  var SidePanel_default = SidePanel;
45301
45395
 
@@ -49968,12 +50062,12 @@ var parseSmartVariable = (token) => {
49968
50062
  };
49969
50063
  };
49970
50064
  var matcher = () => new RegExp(SMART_VAR_REGEX.source, "gi");
49971
- var extractVariables = (text) => {
50065
+ var extractVariables = (text2) => {
49972
50066
  const variables = [];
49973
50067
  const seen = /* @__PURE__ */ new Set();
49974
50068
  const regex = matcher();
49975
50069
  let match;
49976
- while ((match = regex.exec(text)) !== null) {
50070
+ while ((match = regex.exec(text2)) !== null) {
49977
50071
  const fullToken = match[0];
49978
50072
  if (seen.has(fullToken)) continue;
49979
50073
  seen.add(fullToken);
@@ -49986,7 +50080,7 @@ var extractVariables = (text) => {
49986
50080
  }
49987
50081
  return variables;
49988
50082
  };
49989
- var hasSmartVariables = (text) => matcher().test(text ?? "");
50083
+ var hasSmartVariables = (text2) => matcher().test(text2 ?? "");
49990
50084
  var splitSmartValue = (value) => {
49991
50085
  const parts = [];
49992
50086
  if (!value) return parts;
@@ -50055,13 +50149,13 @@ var createDefaultResolver = (groups) => (variable) => {
50055
50149
  };
50056
50150
  var resolveSmartValue = (value, resolve2) => {
50057
50151
  const missing = [];
50058
- const text = splitSmartValue(value).map((part) => {
50152
+ const text2 = splitSmartValue(value).map((part) => {
50059
50153
  if (part.kind === "text") return part.text;
50060
50154
  const resolution = resolve2(part.variable);
50061
50155
  if (resolution.state === "missing") missing.push(part.variable);
50062
50156
  return resolution.value;
50063
50157
  }).join("");
50064
- return { text, missing };
50158
+ return { text: text2, missing };
50065
50159
  };
50066
50160
  var createLegacyGroups = (options) => {
50067
50161
  const { globalParameters = [], serviceNames = [], systemVariables = [] } = options;
@@ -51388,7 +51482,7 @@ var StatPager = ({
51388
51482
  onGradient = false,
51389
51483
  className
51390
51484
  }) => {
51391
- const text = useSurfaceText();
51485
+ const text2 = useSurfaceText();
51392
51486
  const tokens = TOKENS2[size] ?? TOKENS2.md;
51393
51487
  if (pager.total <= 1 && label == null) return null;
51394
51488
  return /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)("div", { className: (0, import_classnames87.default)("flex items-center gap-2", className), children: [
@@ -51416,7 +51510,7 @@ var StatPager = ({
51416
51510
  className: (0, import_classnames87.default)(
51417
51511
  "truncate font-semibold",
51418
51512
  tokens.label,
51419
- onGradient ? "text-white" : text.heading
51513
+ onGradient ? "text-white" : text2.heading
51420
51514
  ),
51421
51515
  children: label
51422
51516
  }
@@ -51431,7 +51525,7 @@ var StatPager = ({
51431
51525
  className: (0, import_classnames87.default)(
51432
51526
  "tabular-nums",
51433
51527
  tokens.counter,
51434
- onGradient ? "text-white/70" : text.muted
51528
+ onGradient ? "text-white/70" : text2.muted
51435
51529
  ),
51436
51530
  children: [
51437
51531
  pager.page + 1,
@@ -51895,7 +51989,7 @@ var CHART_TOKENS = {
51895
51989
  };
51896
51990
  var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
51897
51991
  const [hoveredIndex, setHoveredIndex] = (0, import_react260.useState)(null);
51898
- const text = useSurfaceText();
51992
+ const text2 = useSurfaceText();
51899
51993
  const resolvedItems = (0, import_react260.useMemo)(() => {
51900
51994
  const palette = getColorPaletteNames(dataset.items.length);
51901
51995
  return dataset.items.map((item, i) => ({
@@ -52000,7 +52094,7 @@ var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
52000
52094
  className: (0, import_classnames89.default)(
52001
52095
  "mb-1 font-bold leading-none",
52002
52096
  tokens.total,
52003
- onGradient ? "text-white" : text.heading
52097
+ onGradient ? "text-white" : text2.heading
52004
52098
  ),
52005
52099
  children: total
52006
52100
  }
@@ -52011,7 +52105,7 @@ var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
52011
52105
  className: (0, import_classnames89.default)(
52012
52106
  "font-medium leading-tight",
52013
52107
  tokens.center,
52014
- onGradient ? "text-white/70" : text.muted
52108
+ onGradient ? "text-white/70" : text2.muted
52015
52109
  ),
52016
52110
  children: dataset.centerLabel
52017
52111
  }
@@ -52055,7 +52149,7 @@ var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
52055
52149
  className: (0, import_classnames89.default)(
52056
52150
  "truncate transition-colors",
52057
52151
  tokens.legend,
52058
- onGradient ? "text-white/80" : text.body
52152
+ onGradient ? "text-white/80" : text2.body
52059
52153
  ),
52060
52154
  children: item.label
52061
52155
  }
@@ -52067,7 +52161,7 @@ var Donut = ({ dataset, tokens, chartSize, onGradient }) => {
52067
52161
  className: (0, import_classnames89.default)(
52068
52162
  "flex-none font-bold",
52069
52163
  tokens.legend,
52070
- onGradient ? "text-white" : text.heading
52164
+ onGradient ? "text-white" : text2.heading
52071
52165
  ),
52072
52166
  children: item.value
52073
52167
  }
@@ -52122,14 +52216,14 @@ var StatChartTile_default = StatChartTile;
52122
52216
  var import_classnames90 = __toESM(require("classnames"), 1);
52123
52217
  var import_jsx_runtime275 = require("react/jsx-runtime");
52124
52218
  var Breakdown = ({ items, onGradient }) => {
52125
- const text = useSurfaceText();
52219
+ const text2 = useSurfaceText();
52126
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: [
52127
52221
  /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
52128
52222
  "span",
52129
52223
  {
52130
52224
  className: (0, import_classnames90.default)(
52131
52225
  "font-medium",
52132
- onGradient ? "text-white/70" : text.muted
52226
+ onGradient ? "text-white/70" : text2.muted
52133
52227
  ),
52134
52228
  children: item.label
52135
52229
  }
@@ -52139,7 +52233,7 @@ var Breakdown = ({ items, onGradient }) => {
52139
52233
  {
52140
52234
  className: (0, import_classnames90.default)(
52141
52235
  "font-semibold",
52142
- 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
52143
52237
  ),
52144
52238
  children: item.value
52145
52239
  }
@@ -52255,7 +52349,7 @@ var CircularProgress = ({ value, color, icon, label, size, strokeWidth, iconSize
52255
52349
  );
52256
52350
  };
52257
52351
  var Goals = ({ goals, tokens, ringSize, onGradient }) => {
52258
- const text = useSurfaceText();
52352
+ const text2 = useSurfaceText();
52259
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: [
52260
52354
  /* @__PURE__ */ (0, import_jsx_runtime276.jsxs)(
52261
52355
  "div",
@@ -52286,7 +52380,7 @@ var Goals = ({ goals, tokens, ringSize, onGradient }) => {
52286
52380
  className: (0, import_classnames91.default)(
52287
52381
  "font-bold leading-none",
52288
52382
  tokens.value,
52289
- onGradient ? "text-white" : text.heading
52383
+ onGradient ? "text-white" : text2.heading
52290
52384
  ),
52291
52385
  children: [
52292
52386
  goal.value,
@@ -52300,7 +52394,7 @@ var Goals = ({ goals, tokens, ringSize, onGradient }) => {
52300
52394
  className: (0, import_classnames91.default)(
52301
52395
  "mt-1 font-medium",
52302
52396
  tokens.label,
52303
- onGradient ? "text-white/70" : text.muted
52397
+ onGradient ? "text-white/70" : text2.muted
52304
52398
  ),
52305
52399
  children: goal.label
52306
52400
  }
@@ -52314,7 +52408,7 @@ var Goals = ({ goals, tokens, ringSize, onGradient }) => {
52314
52408
  {
52315
52409
  className: (0, import_classnames91.default)(
52316
52410
  "my-1 h-px w-full border-t",
52317
- onGradient ? "border-white/20" : text.divider
52411
+ onGradient ? "border-white/20" : text2.divider
52318
52412
  )
52319
52413
  }
52320
52414
  )
@@ -52466,7 +52560,7 @@ var StatGraphTile = ({
52466
52560
  const resolvedChartType = chartType ?? (isChartType(variant) ? variant : "bar");
52467
52561
  const surfaceVariant = isChartType(variant) ? void 0 : variant;
52468
52562
  const resolvedTone = tone ?? color;
52469
- const text = useSurfaceText();
52563
+ const text2 = useSurfaceText();
52470
52564
  const isDark = useIsDarkMode();
52471
52565
  const [tooltip, setTooltip] = (0, import_react263.useState)(null);
52472
52566
  const wrapperRef = (0, import_react263.useRef)(null);
@@ -52579,13 +52673,13 @@ var StatGraphTile = ({
52579
52673
  {
52580
52674
  className: (0, import_classnames92.default)(
52581
52675
  "text-xs font-medium",
52582
- gradient ? "text-white/70" : text.muted
52676
+ gradient ? "text-white/70" : text2.muted
52583
52677
  ),
52584
52678
  children: s.label
52585
52679
  }
52586
52680
  )
52587
52681
  ] }, s.key)) });
52588
- }, [showLegend, resolvedChartType, resolvedSeries, getColor, gradient, text.muted]);
52682
+ }, [showLegend, resolvedChartType, resolvedSeries, getColor, gradient, text2.muted]);
52589
52683
  const axisColor = gradient ? "rgba(255,255,255,0.7)" : isDark ? "#94a3b8" : "#64748b";
52590
52684
  const gridColor = gradient ? "rgba(255,255,255,0.2)" : isDark ? "#334155" : "#e2e8f0";
52591
52685
  const renderChart = () => {
@@ -52733,7 +52827,7 @@ var StatGraphTile = ({
52733
52827
  className: (0, import_classnames92.default)(
52734
52828
  "font-bold",
52735
52829
  SPARK_VALUE[size] ?? SPARK_VALUE.md,
52736
- gradient ? "text-white" : text.heading
52830
+ gradient ? "text-white" : text2.heading
52737
52831
  ),
52738
52832
  children: props.value
52739
52833
  }
@@ -52743,7 +52837,7 @@ var StatGraphTile = ({
52743
52837
  {
52744
52838
  className: (0, import_classnames92.default)(
52745
52839
  "mt-1 text-sm",
52746
- gradient ? "text-white/70" : text.muted
52840
+ gradient ? "text-white/70" : text2.muted
52747
52841
  ),
52748
52842
  children: props.subtitle
52749
52843
  }
@@ -57503,8 +57597,8 @@ var TYPE_CONFIG = {
57503
57597
  var NotificationModalBody = ({
57504
57598
  children
57505
57599
  }) => {
57506
- const text = useSurfaceText();
57507
- 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 });
57508
57602
  };
57509
57603
  var NotificationModal = ({
57510
57604
  isOpen,
@@ -58689,8 +58783,8 @@ var nodeIsSkipped = (node) => node?.skipped ?? (node?.status === "skipped" ? tru
58689
58783
 
58690
58784
  // ../common/connectionFlow/measure.ts
58691
58785
  var rowHeight = (metrics, hasGlyph, hasSubtitle) => {
58692
- const text = metrics.titleLine + (hasSubtitle ? metrics.bodyLine : 0);
58693
- 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;
58694
58788
  };
58695
58789
  var measureHeader = (node, metrics) => {
58696
58790
  if (!node.title && !node.subtitle) return 0;
@@ -59664,14 +59758,14 @@ var MARGIN = 12;
59664
59758
  var LINE_HEIGHT = 14;
59665
59759
  var captionStub = (options) => 18 + options.cornerRadius;
59666
59760
  var captionEscape = (options) => 2 * captionStub(options) + MARGIN;
59667
- var captionTextWidth = (text) => Array.from(text).reduce(
59761
+ var captionTextWidth = (text2) => Array.from(text2).reduce(
59668
59762
  (sum, c) => sum + ((c.codePointAt(0) ?? 0) >= 11904 ? 12 : /[MW@%]/.test(c) ? 9 : /[ilI.,'!:;| ]/.test(c) ? 3.5 : 6.8),
59669
59763
  0
59670
59764
  );
59671
- function wrapCaption(text, width) {
59765
+ function wrapCaption(text2, width) {
59672
59766
  const lines = [];
59673
59767
  let line3 = "";
59674
- for (const paragraph of text.split(/\r?\n/u)) {
59768
+ for (const paragraph of text2.split(/\r?\n/u)) {
59675
59769
  for (const word of paragraph.split(/\s+/u).filter(Boolean)) {
59676
59770
  if (line3 && captionTextWidth(`${line3} ${word}`) <= width) {
59677
59771
  line3 += ` ${word}`;
@@ -59767,8 +59861,8 @@ function layoutCaptions(nodes, edges, connectors, options) {
59767
59861
  if (route && !segmentsCrossBoxes(route.points, [...nodes, ...boxes]) && (blocked || score(route.points) < score(edge.points)))
59768
59862
  Object.assign(edge, { points: route.points, d: route.d });
59769
59863
  };
59770
- const measure = (text, width, x, y) => {
59771
- 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));
59772
59866
  const measuredWidth = Math.min(
59773
59867
  width,
59774
59868
  Math.max(...lines.map(captionTextWidth)) + 2 * PADDING
@@ -59807,10 +59901,10 @@ function layoutCaptions(nodes, edges, connectors, options) {
59807
59901
  Object.assign(edge, local);
59808
59902
  }
59809
59903
  avoid(edge, reserved);
59810
- const text = edge.label;
59904
+ const text2 = edge.label;
59811
59905
  const readableWidth = Math.max(
59812
59906
  64,
59813
- 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
59814
59908
  );
59815
59909
  const candidates = [];
59816
59910
  for (let i = 1; i < edge.points.length; i++) {
@@ -59844,7 +59938,7 @@ function layoutCaptions(nodes, edges, connectors, options) {
59844
59938
  );
59845
59939
  for (const candidate of candidates) {
59846
59940
  if (candidate.width < readableWidth) continue;
59847
- const base = measure(text, candidate.width, candidate.x, candidate.y);
59941
+ const base = measure(text2, candidate.width, candidate.x, candidate.y);
59848
59942
  const canMove = !candidate.vertical && candidate.segment > 0 && candidate.segment < edge.points.length - 2;
59849
59943
  const middle = nodes.reduce((sum, n) => sum + n.y + n.height / 2, 0) / Math.max(1, nodes.length);
59850
59944
  const direction = candidate.y >= middle ? 1 : -1;
@@ -59883,7 +59977,7 @@ function layoutCaptions(nodes, edges, connectors, options) {
59883
59977
  }
59884
59978
  if (!edge.caption) {
59885
59979
  const caption = measure(
59886
- text,
59980
+ text2,
59887
59981
  Math.min(240, Math.max(80, options.connectorWidth - 2 * MARGIN)),
59888
59982
  0,
59889
59983
  0
@@ -59954,9 +60048,9 @@ function captionSpacing(nodes, options) {
59954
60048
  };
59955
60049
  nodes.forEach(visit);
59956
60050
  const ranks = new Map(all.map((n, i) => [n.id, i]));
59957
- const reserve = (map, id, text) => {
59958
- if (!text) return;
59959
- const width = captionTextWidth(text);
60051
+ const reserve = (map, id, text2) => {
60052
+ if (!text2) return;
60053
+ const width = captionTextWidth(text2);
59960
60054
  if (width <= Math.max(48, options.connectorWidth - 40)) return;
59961
60055
  const budget = Math.min(
59962
60056
  240,
@@ -59970,7 +60064,7 @@ function captionSpacing(nodes, options) {
59970
60064
  ),
59971
60065
  vertical: Math.max(
59972
60066
  old?.vertical ?? 0,
59973
- wrapCaption(text, budget).length * LINE_HEIGHT + PADDING + 2 * (captionEscape(options) + MARGIN)
60067
+ wrapCaption(text2, budget).length * LINE_HEIGHT + PADDING + 2 * (captionEscape(options) + MARGIN)
59974
60068
  )
59975
60069
  });
59976
60070
  };
@@ -66075,6 +66169,7 @@ var WorkflowTrackerRail = ({
66075
66169
  defaultCollapsed = false,
66076
66170
  onCollapsedChange,
66077
66171
  fillHeight = false,
66172
+ flush = true,
66078
66173
  expandLabel = "Expand workflow rail",
66079
66174
  collapseLabel = "Collapse workflow rail",
66080
66175
  renderStepPopover,
@@ -66117,15 +66212,19 @@ var WorkflowTrackerRail = ({
66117
66212
  scrollable: false,
66118
66213
  flexBody: scrollBody,
66119
66214
  className: (0, import_classnames115.default)(
66120
- collapsible && "max-w-full shrink-0 transition-[width] duration-200 ease-in-out motion-reduce:transition-none",
66215
+ collapsible && "max-w-full shrink-0",
66121
66216
  fillHeight && "h-full min-h-0 self-stretch",
66122
66217
  className,
66123
66218
  cardClassName
66124
66219
  ),
66125
66220
  style: collapsible ? {
66221
+ // SidePanel's curve, not `duration-200 ease-in-out` (which read
66222
+ // as a snap). Padding rides it too: collapsing drops it to none,
66223
+ // and snapping it mid-sweep was a visible jump.
66224
+ transition: panelSlideTransition("width", "padding"),
66126
66225
  ...style,
66127
66226
  width: isCollapsed ? COLLAPSED_RAIL_WIDTH : style?.width ?? 360,
66128
- ...isCollapsed ? side === "left" ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } : { borderTopRightRadius: 0, borderBottomRightRadius: 0 } : {}
66227
+ ...flush ? side === "left" ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } : { borderTopRightRadius: 0, borderBottomRightRadius: 0 } : {}
66129
66228
  } : style,
66130
66229
  "aria-busy": loading || void 0,
66131
66230
  "data-collapsed": collapsible ? isCollapsed : void 0,
@@ -66985,11 +67084,11 @@ function buildTimeScale(rangeStart, rangeEnd, pxPerDay, locale) {
66985
67084
  const columns = seeds.filter((s) => s.end > rangeStart && s.start < rangeEnd).map((s, i) => {
66986
67085
  const clampedStart = Math.max(s.start, rangeStart);
66987
67086
  const clampedEnd = Math.min(s.end, rangeEnd);
66988
- const text = labelOf(s.start);
67087
+ const text2 = labelOf(s.start);
66989
67088
  return {
66990
67089
  id: `${id}-${i}`,
66991
- label: text.label,
66992
- subLabel: text.subLabel,
67090
+ label: text2.label,
67091
+ subLabel: text2.subLabel,
66993
67092
  start: clampedStart,
66994
67093
  end: clampedEnd,
66995
67094
  width: (clampedEnd - clampedStart) / MS_PER_DAY * pxPerDay
@@ -70770,7 +70869,7 @@ var Avatars = ({ users }) => {
70770
70869
  )) });
70771
70870
  };
70772
70871
  var TaskBoardCardBody = ({ card }) => {
70773
- const { surface, size, cardLayout, priorities, locale, text } = useTaskBoard();
70872
+ const { surface, size, cardLayout, priorities, locale, text: text2 } = useTaskBoard();
70774
70873
  const priority = card.priority ? priorities.get(card.priority) : void 0;
70775
70874
  const due = formatDue(card.due, locale);
70776
70875
  const plainChip = (0, import_classnames127.default)("bg-black/5 dark:bg-white/10", surface.muted);
@@ -70827,12 +70926,12 @@ var TaskBoardCardBody = ({ card }) => {
70827
70926
  (hasMeta || card.assignees?.length) && /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "flex items-end gap-2", children: [
70828
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: [
70829
70928
  priorityChip,
70830
- 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" }) }),
70831
70930
  card.checklist && /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(
70832
70931
  "span",
70833
70932
  {
70834
70933
  className: "inline-flex items-center gap-1",
70835
- title: text("checklist", { done: card.checklist.done, total: card.checklist.total }),
70934
+ title: text2("checklist", { done: card.checklist.done, total: card.checklist.total }),
70836
70935
  children: [
70837
70936
  /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(CheckCircle, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
70838
70937
  card.checklist.done,
@@ -70841,7 +70940,7 @@ var TaskBoardCardBody = ({ card }) => {
70841
70940
  ]
70842
70941
  }
70843
70942
  ),
70844
- 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: [
70845
70944
  /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(Calendar, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
70846
70945
  due
70847
70946
  ] })
@@ -70944,7 +71043,7 @@ TaskBoardCard.displayName = "TaskBoardCard";
70944
71043
  // src/components/TaskBoard/TaskBoardBucket.tsx
70945
71044
  var import_jsx_runtime320 = require("react/jsx-runtime");
70946
71045
  var TaskBoardBucket = ({ column, lane, cards, className, label }) => {
70947
- const { cardState, cardProps, dropTarget, size, text } = useTaskBoard();
71046
+ const { cardState, cardProps, dropTarget, size, text: text2 } = useTaskBoard();
70948
71047
  const key = bucketKey(column, lane);
70949
71048
  const target = dropTarget && dropTarget.bucket === key ? dropTarget : null;
70950
71049
  return /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
@@ -70956,7 +71055,7 @@ var TaskBoardBucket = ({ column, lane, cards, className, label }) => {
70956
71055
  "data-bucket-column": column,
70957
71056
  "data-bucket-lane": lane ?? "",
70958
71057
  "data-drop": target ? target.valid ? "valid" : "invalid" : void 0,
70959
- title: target && !target.valid ? text("notAllowed") : void 0,
71058
+ title: target && !target.valid ? text2("notAllowed") : void 0,
70960
71059
  className: (0, import_classnames128.default)(
70961
71060
  "flex min-h-12 flex-col rounded-lg transition-colors",
70962
71061
  size.gap,
@@ -71028,7 +71127,7 @@ var TaskBoardAddColumn = ({
71028
71127
  onAdd,
71029
71128
  variant
71030
71129
  }) => {
71031
- const { text, surface, color, size, columnCornerClass } = useTaskBoard();
71130
+ const { text: text2, surface, color, size, columnCornerClass } = useTaskBoard();
71032
71131
  const [editing, setEditing] = (0, import_react296.useState)(false);
71033
71132
  const [title, setTitle] = (0, import_react296.useState)("");
71034
71133
  const trigger = getSurfaceTriggerTokens(color);
@@ -71055,8 +71154,8 @@ var TaskBoardAddColumn = ({
71055
71154
  "input",
71056
71155
  {
71057
71156
  autoFocus: true,
71058
- "aria-label": text("columnName"),
71059
- placeholder: text("columnName"),
71157
+ "aria-label": text2("columnName"),
71158
+ placeholder: text2("columnName"),
71060
71159
  value: title,
71061
71160
  onChange: (e) => setTitle(e.target.value),
71062
71161
  onKeyDown: (e) => {
@@ -71089,7 +71188,7 @@ var TaskBoardAddColumn = ({
71089
71188
  ),
71090
71189
  children: [
71091
71190
  /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(Add, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
71092
- text("addColumn")
71191
+ text2("addColumn")
71093
71192
  ]
71094
71193
  }
71095
71194
  )
@@ -71166,7 +71265,7 @@ function fromDraft(column, d) {
71166
71265
  }
71167
71266
  var limitValid = (wip) => wip.trim() === "" || Number.isInteger(Number(wip)) && Number(wip) >= 1;
71168
71267
  var TaskBoardColumnEditButton = ({ column }) => {
71169
- const { onEditColumn, allColumns, text, surface, color } = useTaskBoard();
71268
+ const { onEditColumn, allColumns, text: text2, surface, color } = useTaskBoard();
71170
71269
  const [open, setOpen] = (0, import_react297.useState)(false);
71171
71270
  const [draft, setDraft] = (0, import_react297.useState)(() => toDraft(column));
71172
71271
  const id = (0, import_react297.useId)();
@@ -71193,7 +71292,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
71193
71292
  "button",
71194
71293
  {
71195
71294
  type: "button",
71196
- "aria-label": text("editColumn", { name: column.title }),
71295
+ "aria-label": text2("editColumn", { name: column.title }),
71197
71296
  className: (0, import_classnames130.default)("shrink-0 rounded p-1", surface.muted, trigger.hover, trigger.focusRing),
71198
71297
  children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(Edit, { className: "h-3.5 w-3.5", "aria-hidden": "true" })
71199
71298
  }
@@ -71211,8 +71310,8 @@ var TaskBoardColumnEditButton = ({ column }) => {
71211
71310
  Input_default,
71212
71311
  {
71213
71312
  size: "sm",
71214
- "aria-label": text("columnName"),
71215
- placeholder: text("columnName"),
71313
+ "aria-label": text2("columnName"),
71314
+ placeholder: text2("columnName"),
71216
71315
  value: draft.title,
71217
71316
  onChange: (e) => setDraft({ ...draft, title: e.target.value }),
71218
71317
  onKeyDown: (e) => {
@@ -71224,7 +71323,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
71224
71323
  }
71225
71324
  ),
71226
71325
  /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
71227
- /* @__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") }),
71228
71327
  /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
71229
71328
  ColorSwatches,
71230
71329
  {
@@ -71237,7 +71336,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
71237
71336
  )
71238
71337
  ] }),
71239
71338
  /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "flex flex-col gap-1", children: [
71240
- /* @__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") }),
71241
71340
  /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
71242
71341
  Input_default,
71243
71342
  {
@@ -71246,7 +71345,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
71246
71345
  type: "number",
71247
71346
  min: 1,
71248
71347
  inputMode: "numeric",
71249
- placeholder: text("wipLimitHint"),
71348
+ placeholder: text2("wipLimitHint"),
71250
71349
  value: draft.wip,
71251
71350
  onChange: (e) => setDraft({ ...draft, wip: e.target.value }),
71252
71351
  "aria-invalid": !limitValid(draft.wip) || void 0
@@ -71254,7 +71353,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
71254
71353
  )
71255
71354
  ] }),
71256
71355
  /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "flex flex-col gap-1", children: [
71257
- /* @__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") }),
71258
71357
  /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
71259
71358
  Input_default,
71260
71359
  {
@@ -71263,7 +71362,7 @@ var TaskBoardColumnEditButton = ({ column }) => {
71263
71362
  type: "number",
71264
71363
  min: 1,
71265
71364
  inputMode: "numeric",
71266
- placeholder: text("maxItemsHint"),
71365
+ placeholder: text2("maxItemsHint"),
71267
71366
  value: draft.max,
71268
71367
  onChange: (e) => setDraft({ ...draft, max: e.target.value }),
71269
71368
  "aria-invalid": !limitValid(draft.max) || void 0
@@ -71274,14 +71373,14 @@ var TaskBoardColumnEditButton = ({ column }) => {
71274
71373
  Toggle_default,
71275
71374
  {
71276
71375
  size: "sm",
71277
- label: text("lockColumn"),
71278
- description: text("lockColumnHint"),
71376
+ label: text2("lockColumn"),
71377
+ description: text2("lockColumnHint"),
71279
71378
  checked: draft.locked,
71280
71379
  onChange: (e) => setDraft({ ...draft, locked: e.target.checked })
71281
71380
  }
71282
71381
  ),
71283
71382
  others.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("fieldset", { className: "flex flex-col gap-1.5", children: [
71284
- /* @__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") }),
71285
71384
  others.map((c) => /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
71286
71385
  Checkbox_default,
71287
71386
  {
@@ -71295,11 +71394,11 @@ var TaskBoardColumnEditButton = ({ column }) => {
71295
71394
  },
71296
71395
  c.id
71297
71396
  )),
71298
- /* @__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") })
71299
71398
  ] }),
71300
71399
  /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "flex justify-end gap-2 pt-1", children: [
71301
- /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(Button_default, { type: "button", size: "sm", variant: "soft", color: "slate", onClick: () => setOpen(false), children: text("cancel") }),
71302
- /* @__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") })
71303
71402
  ] })
71304
71403
  ]
71305
71404
  }
@@ -71321,7 +71420,7 @@ var TaskBoardColumn = ({
71321
71420
  index = 0,
71322
71421
  onToggle
71323
71422
  }) => {
71324
- 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();
71325
71424
  const refused = Boolean(dropTarget && !dropTarget.valid && dropTarget.bucket === bucketKey(column.id, null));
71326
71425
  const max = effectiveMaxItems(column, boardMaxItems);
71327
71426
  const full = max !== void 0 && count >= max;
@@ -71338,7 +71437,7 @@ var TaskBoardColumn = ({
71338
71437
  type: "button",
71339
71438
  onClick: onToggle,
71340
71439
  "aria-expanded": !column.collapsed,
71341
- "aria-label": text(column.collapsed ? "expand" : "collapse", {
71440
+ "aria-label": text2(column.collapsed ? "expand" : "collapse", {
71342
71441
  name: column.title
71343
71442
  }),
71344
71443
  className: (0, import_classnames131.default)(
@@ -71362,7 +71461,7 @@ var TaskBoardColumn = ({
71362
71461
  "span",
71363
71462
  {
71364
71463
  "data-column-count": true,
71365
- 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,
71366
71465
  className: (0, import_classnames131.default)(
71367
71466
  "text-xs font-semibold tabular-nums",
71368
71467
  wip === "full" || wip === "over" || full ? tokens.wipFull : surface.muted
@@ -71465,7 +71564,7 @@ var TaskBoardColumn = ({
71465
71564
  column: column.id,
71466
71565
  lane: null,
71467
71566
  cards,
71468
- label: `${column.title}, ${text("cardCount", { count: cards.length })}`
71567
+ label: `${column.title}, ${text2("cardCount", { count: cards.length })}`
71469
71568
  }
71470
71569
  )
71471
71570
  }
@@ -71483,7 +71582,7 @@ var TaskBoardColumn = ({
71483
71582
  ),
71484
71583
  children: [
71485
71584
  /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(Add, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
71486
- text("addCard")
71585
+ text2("addCard")
71487
71586
  ]
71488
71587
  }
71489
71588
  )
@@ -71509,7 +71608,7 @@ var TaskBoardHeader = ({
71509
71608
  people,
71510
71609
  variant
71511
71610
  }) => {
71512
- const { surface, text } = useTaskBoard();
71611
+ const { surface, text: text2 } = useTaskBoard();
71513
71612
  const shown = people?.slice(0, MAX_AVATARS) ?? [];
71514
71613
  const extra = (people?.length ?? 0) - shown.length;
71515
71614
  return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(
@@ -71539,7 +71638,7 @@ var TaskBoardHeader = ({
71539
71638
  {
71540
71639
  "data-taskboard-people": true,
71541
71640
  role: "group",
71542
- "aria-label": text("online", { count: people.length }),
71641
+ "aria-label": text2("online", { count: people.length }),
71543
71642
  className: "flex items-center -space-x-2",
71544
71643
  children: [
71545
71644
  shown.map((p) => /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
@@ -71577,7 +71676,7 @@ var TaskBoardLaneGrid = ({
71577
71676
  onToggleColumn,
71578
71677
  onAddColumn
71579
71678
  }) => {
71580
- const { surface, text, color, size, stickySurface, draggingColumnId, boardMaxItems } = useTaskBoard();
71679
+ const { surface, text: text2, color, size, stickySurface, draggingColumnId, boardMaxItems } = useTaskBoard();
71581
71680
  const fullColumns = new Set(columns.filter((c) => columnAtMax(cards, c, boardMaxItems)).map((c) => c.id));
71582
71681
  const trigger = getSurfaceTriggerTokens(color);
71583
71682
  const template = [
@@ -71592,7 +71691,7 @@ var TaskBoardLaneGrid = ({
71592
71691
  type: "button",
71593
71692
  onClick,
71594
71693
  "aria-expanded": !collapsed,
71595
- "aria-label": text(collapsed ? "expand" : "collapse", { name }),
71694
+ "aria-label": text2(collapsed ? "expand" : "collapse", { name }),
71596
71695
  className: (0, import_classnames133.default)("rounded p-1", surface.muted, trigger.hover, trigger.focusRing),
71597
71696
  children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
71598
71697
  ChevronRight,
@@ -71678,7 +71777,7 @@ var TaskBoardLaneRow = ({
71678
71777
  trailingCell,
71679
71778
  fullColumns
71680
71779
  }) => {
71681
- const { surface, text, color, stickySurface, onAddCard, dropTarget } = useTaskBoard();
71780
+ const { surface, text: text2, color, stickySurface, onAddCard, dropTarget } = useTaskBoard();
71682
71781
  const refusedBucket = dropTarget && !dropTarget.valid ? dropTarget.bucket : null;
71683
71782
  const trigger = getSurfaceTriggerTokens(color);
71684
71783
  const open = !lane.collapsed;
@@ -71729,7 +71828,7 @@ var TaskBoardLaneRow = ({
71729
71828
  {
71730
71829
  type: "button",
71731
71830
  onClick: () => onAddCard({ column: col.id, lane: lane.id }),
71732
- "aria-label": `${text("addCard")} \u2014 ${col.title}, ${lane.title}`,
71831
+ "aria-label": `${text2("addCard")} \u2014 ${col.title}, ${lane.title}`,
71733
71832
  className: (0, import_classnames133.default)(
71734
71833
  "flex items-center justify-center rounded-md py-1 opacity-60 hover:opacity-100 focus-visible:opacity-100",
71735
71834
  surface.muted,
@@ -72084,7 +72183,7 @@ function useTaskBoardDrag(opts) {
72084
72183
  var import_react299 = require("react");
72085
72184
  var isRtl = (el) => el?.closest("[dir]")?.getAttribute("dir") === "rtl";
72086
72185
  function useTaskBoardKeyboard(o) {
72087
- const { rootRef, cards, viewCards, columns, lanes, text, drag } = o;
72186
+ const { rootRef, cards, viewCards, columns, lanes, text: text2, drag } = o;
72088
72187
  const [message, setMessage] = (0, import_react299.useState)("");
72089
72188
  const [activeId, setActiveId] = (0, import_react299.useState)(null);
72090
72189
  const [ownSelection, setOwnSelection] = (0, import_react299.useState)([]);
@@ -72111,9 +72210,9 @@ function useTaskBoardKeyboard(o) {
72111
72210
  const total = (others.get(bucketKey(to.column, to.lane))?.length ?? 0) + 1;
72112
72211
  const values = { column: columnTitle(to.column), index: to.index + 1, total };
72113
72212
  const lane = to.lane ? lanes?.find((l) => l.id === to.lane)?.title : void 0;
72114
- announce(lane ? text("movedLane", { ...values, lane }) : text("moved", values));
72213
+ announce(lane ? text2("movedLane", { ...values, lane }) : text2("moved", values));
72115
72214
  },
72116
- [announce, cards, columns, lanes, columnTitle, text]
72215
+ [announce, cards, columns, lanes, columnTitle, text2]
72117
72216
  );
72118
72217
  const setSelection = (0, import_react299.useCallback)(
72119
72218
  (ids) => {
@@ -72213,20 +72312,20 @@ function useTaskBoardKeyboard(o) {
72213
72312
  e.preventDefault();
72214
72313
  const target = drag.to ?? drag.from;
72215
72314
  refocusRef.current = card.id;
72216
- announce(text("dropped", { title: card.title, column: columnTitle(target.column) }));
72315
+ announce(text2("dropped", { title: card.title, column: columnTitle(target.column) }));
72217
72316
  void o.finish().then((ok) => {
72218
72317
  if (!ok && (target.column !== drag.from.column || target.lane !== drag.from.lane || target.index !== drag.from.index)) {
72219
- announce(text("cancelled"));
72318
+ announce(text2("cancelled"));
72220
72319
  }
72221
72320
  });
72222
72321
  } else if (e.key === "Escape") {
72223
72322
  e.preventDefault();
72224
72323
  refocusRef.current = card.id;
72225
72324
  o.cancel("escape");
72226
- announce(text("cancelled"));
72325
+ announce(text2("cancelled"));
72227
72326
  } else if (e.key === "Tab") {
72228
72327
  o.cancel("blur");
72229
- announce(text("cancelled"));
72328
+ announce(text2("cancelled"));
72230
72329
  } else if (e.key === "Enter") {
72231
72330
  e.preventDefault();
72232
72331
  }
@@ -72236,7 +72335,7 @@ function useTaskBoardKeyboard(o) {
72236
72335
  e.preventDefault();
72237
72336
  if (o.keyboardGrab(card, slot)) {
72238
72337
  refocusRef.current = card.id;
72239
- announce(text("grabbed", { title: card.title }));
72338
+ announce(text2("grabbed", { title: card.title }));
72240
72339
  }
72241
72340
  return;
72242
72341
  }
@@ -72262,7 +72361,7 @@ function useTaskBoardKeyboard(o) {
72262
72361
  }
72263
72362
  }
72264
72363
  }),
72265
- [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]
72266
72365
  );
72267
72366
  return { cardProps, message, selection, announce };
72268
72367
  }
@@ -72773,7 +72872,7 @@ var TaskBoardBody = (props) => {
72773
72872
  surfaceVariant
72774
72873
  } = props;
72775
72874
  const surface = useSurfaceText();
72776
- const text = useTaskBoardText(labels);
72875
+ const text2 = useTaskBoardText(labels);
72777
72876
  const { locale } = useKitEngine();
72778
72877
  const sizeTokens12 = TASKBOARD_SIZES[size] ?? TASKBOARD_SIZES.md;
72779
72878
  const wellSurface = surface.translucent ? GLASS_WELL : SOLID_WELL;
@@ -72806,8 +72905,8 @@ var TaskBoardBody = (props) => {
72806
72905
  if (!holder || holder === selfId) return;
72807
72906
  const peer = collab.userById(holder);
72808
72907
  cancel("held");
72809
- setNotice({ cardId: drag.cardId, text: text("heldShort", { name: peer.name }), color: peer.color ?? peerColor(peer.id) });
72810
- }, [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]);
72811
72910
  (0, import_react305.useEffect)(() => {
72812
72911
  if (!notice) return;
72813
72912
  const t = setTimeout(() => setNotice(null), NOTICE_MS);
@@ -72819,7 +72918,7 @@ var TaskBoardBody = (props) => {
72819
72918
  viewCards: previewCards,
72820
72919
  columns,
72821
72920
  lanes: viewLanes,
72822
- text,
72921
+ text: text2,
72823
72922
  drag,
72824
72923
  keyboardGrab,
72825
72924
  keyboardMove,
@@ -72838,7 +72937,7 @@ var TaskBoardBody = (props) => {
72838
72937
  rootRef,
72839
72938
  columns,
72840
72939
  enabled: columnEditing,
72841
- text,
72940
+ text: text2,
72842
72941
  announce: keyboard.announce,
72843
72942
  onCommit: (next) => onColumnsChange?.(next)
72844
72943
  });
@@ -72859,7 +72958,7 @@ var TaskBoardBody = (props) => {
72859
72958
  );
72860
72959
  const ctx = (0, import_react305.useMemo)(
72861
72960
  () => ({
72862
- text,
72961
+ text: text2,
72863
72962
  surface,
72864
72963
  color,
72865
72964
  size: sizeTokens12,
@@ -72892,7 +72991,7 @@ var TaskBoardBody = (props) => {
72892
72991
  cardProps: (card, slot) => ({ ...isEditable ? cardHandlers(card, slot) : {}, ...keyboardProps(card, slot) }),
72893
72992
  dropTarget: drag?.to && !drag.valid ? { bucket: bucketKey(drag.to.column, drag.to.lane), index: drag.to.index, valid: false } : null
72894
72993
  }),
72895
- [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]
72896
72995
  );
72897
72996
  const buckets = (0, import_react305.useMemo)(() => bucketCards(previewCards, columns, viewLanes), [previewCards, columns, viewLanes]);
72898
72997
  const draggedCard = drag ? cards.find((c) => c.id === drag.cardId) : void 0;
@@ -72913,12 +73012,12 @@ var TaskBoardBody = (props) => {
72913
73012
  );
72914
73013
  } else if (error) {
72915
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: [
72916
- /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("p", { className: (0, import_classnames137.default)("text-sm font-medium", surface.body), children: error === true ? text("error") : error }),
72917
- 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") })
72918
73017
  ] });
72919
73018
  } else {
72920
73019
  content = /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)("div", { className: "flex min-h-0 flex-1 flex-col", children: [
72921
- 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") }),
72922
73021
  laneView ? /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
72923
73022
  TaskBoardLaneGrid,
72924
73023
  {
@@ -72965,7 +73064,7 @@ var TaskBoardBody = (props) => {
72965
73064
  role: "application",
72966
73065
  "aria-roledescription": "task board",
72967
73066
  "aria-busy": loading ? true : void 0,
72968
- "aria-label": text("root"),
73067
+ "aria-label": text2("root"),
72969
73068
  className: "flex h-full min-h-0 flex-col",
72970
73069
  children: [
72971
73070
  /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("div", { "data-taskboard-live": true, "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: keyboard.message }),
@@ -73183,7 +73282,7 @@ function gradientBackdropCss(colors3, s) {
73183
73282
  var import_jsx_runtime330 = require("react/jsx-runtime");
73184
73283
  var GRADIENT_BACKDROP_SCHEMES = ["auto", "light", "dark"];
73185
73284
  var GradientBackdrop = import_react306.default.forwardRef(
73186
- ({ theme = "slate", scheme = "auto", noise = false, className, style, children, ...rest }, ref) => {
73285
+ ({ theme = "slate", scheme = "auto", noise = false, noiseScale, className, style, children, ...rest }, ref) => {
73187
73286
  const themeKey = typeof theme === "string" ? theme : JSON.stringify(theme);
73188
73287
  const resolved = (0, import_react306.useMemo)(() => {
73189
73288
  const t = resolveGradientBackdropTheme(theme);
@@ -73217,7 +73316,11 @@ var GradientBackdrop = import_react306.default.forwardRef(
73217
73316
  "pointer-events-none absolute inset-0 -z-10 rounded-[inherit]",
73218
73317
  getNoiseBlendClasses(scheme)
73219
73318
  ),
73220
- style: { backgroundImage: NOISE_BACKGROUND_IMAGE }
73319
+ style: {
73320
+ backgroundImage: NOISE_BACKGROUND_IMAGE,
73321
+ backgroundSize: getNoiseBackgroundSize(noiseScale),
73322
+ backgroundRepeat: "repeat"
73323
+ }
73221
73324
  }
73222
73325
  ),
73223
73326
  children
@@ -73710,136 +73813,384 @@ var TerminalTabs = (0, import_react309.forwardRef)(
73710
73813
  );
73711
73814
 
73712
73815
  // src/components/PageBodyLayout.tsx
73713
- var import_react310 = require("react");
73714
73816
  var import_classnames141 = __toESM(require("classnames"), 1);
73715
73817
  var import_jsx_runtime334 = require("react/jsx-runtime");
73716
- function Region({ config, side }) {
73717
- const vertical = side === "bottom";
73718
- const [internalCollapsed, setInternalCollapsed] = (0, import_react310.useState)(config.defaultCollapsed ?? false);
73719
- const [internalSize, setInternalSize] = (0, import_react310.useState)(config.defaultSize ?? (vertical ? 200 : 280));
73720
- const collapsed = config.collapsed ?? internalCollapsed;
73721
- const min = Math.max(0, config.minSize ?? (vertical ? 100 : 160));
73722
- const max = Math.max(min, config.maxSize ?? (vertical ? 600 : 640));
73723
- const size = Math.max(min, Math.min(max, config.size ?? internalSize));
73724
- const collapsedSize = Math.max(0, config.collapsedSize ?? (vertical ? 40 : COLLAPSED_RAIL_WIDTH));
73725
- const setCollapsed = (next) => {
73726
- if (config.collapsed === void 0) setInternalCollapsed(next);
73727
- config.onCollapsedChange?.(next);
73728
- };
73729
- const updateSize = (0, import_react310.useCallback)((next) => {
73730
- const value = Math.max(min, Math.min(max, next));
73731
- if (config.size === void 0) setInternalSize(value);
73732
- config.onSizeChange?.(value);
73733
- }, [min, max, config.size, config.onSizeChange]);
73734
- const drag = (0, import_react310.useRef)(null);
73735
- const [dragging, setDragging] = (0, import_react310.useState)(false);
73736
- (0, import_react310.useEffect)(() => {
73737
- if (!dragging) return;
73738
- const previousCursor = document.body.style.cursor;
73739
- const previousSelect = document.body.style.userSelect;
73740
- document.body.style.cursor = vertical ? "row-resize" : "col-resize";
73741
- document.body.style.userSelect = "none";
73742
- const move = (event) => {
73743
- if (!drag.current) return;
73744
- const delta = (vertical ? event.clientY : event.clientX) - drag.current.position;
73745
- updateSize(drag.current.size + delta * (side === "left" ? 1 : -1));
73746
- };
73747
- const stop = () => {
73748
- drag.current = null;
73749
- setDragging(false);
73818
+ var PAGE_BODY_LAYOUT_VARIANTS = ["none", ...SURFACE_VARIANTS];
73819
+ function PageBodyLayout({ header, left, right, bottom, children, className, minCenterWidth = 240, minCenterHeight = 120, gap = 8, variant = "outlined", ...surface }) {
73820
+ const plain = variant === "none" || variant === "plain";
73821
+ const body = /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)(import_jsx_runtime334.Fragment, { children: [
73822
+ header && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "shrink-0", children: header }),
73823
+ /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: (0, import_classnames141.default)("min-h-0 min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), children: /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: "flex h-full min-h-0", style: { minWidth: "fit-content", gap, ...plain ? { paddingTop: header ? gap : 0 } : { padding: gap } }, children: [
73824
+ hasZone(left) && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { "data-page-region": "left", className: "flex min-h-0 shrink-0", children: left }),
73825
+ /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: "flex min-h-0 flex-1 flex-col", style: { gap, minWidth: minCenterWidth }, children: [
73826
+ /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { "data-page-region": "center", className: (0, import_classnames141.default)("min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), style: { minHeight: minCenterHeight }, children }),
73827
+ hasZone(bottom) && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { "data-page-region": "bottom", className: "flex min-w-0 shrink-0 flex-col", children: bottom })
73828
+ ] }),
73829
+ hasZone(right) && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { "data-page-region": "right", className: "flex min-h-0 shrink-0", children: right })
73830
+ ] }) })
73831
+ ] });
73832
+ return plain ? /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { "data-page-layout": "none", className: (0, import_classnames141.default)("flex h-full min-h-0 min-w-0 flex-col", className), children: body }) : /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(Panel_default, { ...surface, variant, padding: "none", scrollable: false, flexBody: true, className: (0, import_classnames141.default)("h-full min-h-0 min-w-0", className), children: body });
73833
+ }
73834
+ function hasZone(node) {
73835
+ return node != null && node !== false;
73836
+ }
73837
+
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
73844
+ var import_react310 = require("react");
73845
+ var import_react_dom19 = require("react-dom");
73846
+ var import_jsx_runtime335 = require("react/jsx-runtime");
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" });
73750
73864
  };
73751
- window.addEventListener("pointermove", move);
73752
- window.addEventListener("pointerup", stop);
73753
- window.addEventListener("pointercancel", stop);
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);
73754
73871
  return () => {
73755
- window.removeEventListener("pointermove", move);
73756
- window.removeEventListener("pointerup", stop);
73757
- window.removeEventListener("pointercancel", stop);
73758
- document.body.style.cursor = previousCursor;
73759
- document.body.style.userSelect = previousSelect;
73872
+ observer?.disconnect();
73873
+ window.removeEventListener("resize", update);
73874
+ window.removeEventListener("scroll", update, true);
73760
73875
  };
73761
- }, [dragging, vertical, side, updateSize]);
73762
- const canResize = !collapsed && (config.resizable ?? side !== "left");
73763
- const dimension = collapsed ? collapsedSize : size;
73764
- return /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)(
73765
- "section",
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",
73766
73906
  {
73767
- "aria-label": config.label,
73768
- "data-page-region": side,
73769
- "data-collapsed": collapsed,
73770
- className: "relative min-h-0 min-w-0 shrink-0 overflow-hidden",
73771
- style: vertical ? { height: dimension } : { width: dimension },
73772
- children: [
73773
- /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: "flex h-full min-h-0 flex-col", children: [
73774
- config.showToggle !== false && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "flex shrink-0 justify-end px-2 py-1", children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
73775
- IconButton_default,
73776
- {
73777
- size: "xs",
73778
- variant: "ghost",
73779
- color: "neutral",
73780
- icon: vertical ? collapsed ? "ArrowChevronUp" : "ArrowChevronDown" : collapsed === (side === "left") ? "ArrowChevronRight" : "ArrowChevronLeft",
73781
- "aria-label": `${collapsed ? "Expand" : "Collapse"} ${config.label}`,
73782
- "aria-expanded": !collapsed,
73783
- onClick: () => setCollapsed(!collapsed)
73784
- }
73785
- ) }),
73786
- /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: (0, import_classnames141.default)("min-h-0 min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), children: typeof config.content === "function" ? config.content({ collapsed, setCollapsed, size }) : /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "h-full", hidden: collapsed, inert: collapsed || void 0, children: config.content }) })
73787
- ] }),
73788
- canResize && // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/no-noninteractive-tabindex -- focusable ARIA separator provides keyboard and pointer resizing
73789
- /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
73790
- "div",
73791
- {
73792
- role: "separator",
73793
- tabIndex: 0,
73794
- "aria-label": `Resize ${config.label}`,
73795
- "aria-orientation": vertical ? "horizontal" : "vertical",
73796
- "aria-valuemin": min,
73797
- "aria-valuemax": max,
73798
- "aria-valuenow": size,
73799
- className: (0, import_classnames141.default)("absolute z-20 touch-none bg-transparent hover:bg-blue-400/30 focus-visible:bg-blue-400/30 focus-visible:outline-none", vertical ? "inset-x-0 top-0 h-2 cursor-row-resize" : side === "right" ? "inset-y-0 left-0 w-2 cursor-col-resize" : "inset-y-0 right-0 w-2 cursor-col-resize"),
73800
- onPointerDown: (event) => {
73801
- if (event.button !== 0) return;
73802
- event.preventDefault();
73803
- drag.current = { position: vertical ? event.clientY : event.clientX, size };
73804
- setDragging(true);
73805
- },
73806
- onKeyDown: (event) => {
73807
- const grow = vertical ? "ArrowUp" : side === "right" ? "ArrowLeft" : "ArrowRight";
73808
- const shrink = vertical ? "ArrowDown" : side === "right" ? "ArrowRight" : "ArrowLeft";
73809
- if (![grow, shrink, "Home", "End"].includes(event.key)) return;
73810
- event.preventDefault();
73811
- updateSize(event.key === "Home" ? min : event.key === "End" ? max : size + (event.key === grow ? 20 : -20));
73812
- },
73813
- children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("span", { "aria-hidden": "true", className: (0, import_classnames141.default)(
73814
- "pointer-events-none absolute rounded-full bg-neutral-300 dark:bg-neutral-600",
73815
- vertical ? "left-1/2 top-0 h-1 w-10 -translate-x-1/2" : "left-0 top-1/2 h-10 w-1 -translate-y-1/2"
73816
- ) })
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);
73817
73941
  }
73818
- )
73819
- ]
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))
73820
73959
  }
73821
73960
  );
73822
73961
  }
73823
- function PageBodyLayout({ header, left, right, bottom, children, className, minCenterWidth = 240, minCenterHeight = 120, variant = "outlined", ...surface }) {
73824
- return /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)(Panel_default, { ...surface, variant, padding: "none", scrollable: false, flexBody: true, className: (0, import_classnames141.default)("h-full min-h-0 min-w-0", className), children: [
73825
- header && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "shrink-0", children: header }),
73826
- /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: (0, import_classnames141.default)("min-h-0 min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), children: /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: "flex h-full min-h-0", style: { minWidth: minCenterWidth }, children: [
73827
- left && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(Region, { side: "left", config: left }),
73828
- /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col", children: [
73829
- /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { "data-page-region": "center", className: (0, import_classnames141.default)("min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), style: { minHeight: minCenterHeight, minWidth: minCenterWidth }, children }),
73830
- bottom && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(Region, { side: "bottom", config: bottom })
73831
- ] }),
73832
- right && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(Region, { side: "right", config: right })
73833
- ] }) })
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 tokens = getSideMenuItemTokens(props.tone ?? "neutral");
73988
+ const checkable = item.type === "checkbox" || item.type === "radio";
73989
+ const activate = (event) => {
73990
+ if (item.disabled) {
73991
+ event.preventDefault();
73992
+ return;
73993
+ }
73994
+ if (nested) {
73995
+ event.preventDefault();
73996
+ if (expanded) back();
73997
+ else open(true);
73998
+ return;
73999
+ }
74000
+ if (checkable) item.onCheckedChange?.(item.type === "radio" ? true : !item.checked);
74001
+ item.command?.(item);
74002
+ props.onSelect?.(item);
74003
+ if (item.closeOnSelect ?? !checkable) state.close(true);
74004
+ };
74005
+ const content = props.renderItem?.(item, { expanded, checked: Boolean(item.checked) }) ?? /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)(import_jsx_runtime336.Fragment, { children: [
74006
+ /* @__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 }),
74007
+ /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)("span", { className: "min-w-0 flex-1", children: [
74008
+ /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("span", { className: "block truncate", children: item.label }),
74009
+ item.description && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("span", { className: "block text-xs font-normal opacity-70", children: item.description })
74010
+ ] }),
74011
+ item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("span", { className: "shrink-0 text-xs", children: item.badge }),
74012
+ item.shortcut != null && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("span", { className: "shrink-0 text-xs opacity-60", children: item.shortcut }),
74013
+ item.trailing,
74014
+ 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")) })
74015
+ ] });
74016
+ const rowProps = {
74017
+ id,
74018
+ role: checkable ? item.type === "radio" ? "menuitemradio" : "menuitemcheckbox" : "menuitem",
74019
+ "aria-label": label,
74020
+ "aria-disabled": item.disabled || void 0,
74021
+ "aria-checked": checkable ? Boolean(item.checked) : void 0,
74022
+ "aria-expanded": nested ? expanded : void 0,
74023
+ "aria-haspopup": nested && tiered ? "menu" : void 0,
74024
+ "aria-controls": nested && expanded ? `${id}-submenu` : void 0,
74025
+ "data-menu-action": "",
74026
+ "data-menu-text": label,
74027
+ tabIndex: -1,
74028
+ className: (0, import_classnames142.default)(
74029
+ "flex w-full items-center gap-2 rounded-lg text-left font-medium outline-none transition-colors",
74030
+ rowSizes[props.size ?? "md"],
74031
+ getSurfaceTriggerTokens(props.tone ?? "neutral").focusRing,
74032
+ 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],
74033
+ expanded && !item.disabled && tokens.bg
74034
+ ),
74035
+ onClick: activate,
74036
+ onKeyDown: (event) => {
74037
+ if (event.key === "ArrowRight" && nested) {
74038
+ event.preventDefault();
74039
+ event.stopPropagation();
74040
+ open(true);
74041
+ }
74042
+ if (event.key === " " && (item.href || item.to)) {
74043
+ event.preventDefault();
74044
+ event.currentTarget.click();
74045
+ }
74046
+ },
74047
+ onMouseEnter: () => {
74048
+ state.cancelLeave();
74049
+ if (tiered && !item.disabled) {
74050
+ if (nested) open(false);
74051
+ else state.setPath(state.path.slice(0, depth));
74052
+ }
74053
+ }
74054
+ };
74055
+ const row = item.to && !nested ? /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(import_react_router_dom3.Link, { ...rowProps, ref: (el) => {
74056
+ anchor.current = el;
74057
+ }, to: item.to, children: content }) : item.href && !nested ? /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("a", { ...rowProps, ref: (el) => {
74058
+ anchor.current = el;
74059
+ }, 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) => {
74060
+ anchor.current = el;
74061
+ }, children: content });
74062
+ const submenu = /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)("div", { id: `${id}-submenu`, children: [
74063
+ item.items && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(MenuList, { items: item.items, state, depth: depth + 1, parentLabel: label, onBack: back, focusOnMount: state.keyboard.current }),
74064
+ item.content
74065
+ ] });
74066
+ return /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)("li", { role: "presentation", children: [
74067
+ row,
74068
+ 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 }))
74069
+ ] });
74070
+ }
74071
+ function MenuSurface({ state, children, root = false }) {
74072
+ const { props } = state;
74073
+ 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)(
74074
+ Panel_default,
74075
+ {
74076
+ variant: props.variant ?? "outlined",
74077
+ tone: props.tone ?? "neutral",
74078
+ corner: props.corner,
74079
+ padding: props.padding ?? "xs",
74080
+ glassOpacity: props.glassOpacity,
74081
+ vibrancy: props.vibrancy,
74082
+ specularMode: props.specularMode,
74083
+ className: (0, import_classnames142.default)(
74084
+ root ? props.className : void 0,
74085
+ (!root || props.popup || props.trigger || props.anchorRef) && "backdrop-blur-xl"
74086
+ ),
74087
+ children: [
74088
+ 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 }),
74089
+ /* @__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 }),
74090
+ 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 })
74091
+ ]
74092
+ }
74093
+ ) });
74094
+ }
74095
+ function Menu(props) {
74096
+ const owner = (0, import_react311.useId)();
74097
+ const triggerRef = (0, import_react311.useRef)(null);
74098
+ const anchor = props.anchorRef ?? triggerRef;
74099
+ const popup = props.popup ?? Boolean(props.trigger || props.anchorRef);
74100
+ const [internalOpen, setInternalOpen] = (0, import_react311.useState)(props.defaultOpen ?? false);
74101
+ const open = props.open ?? internalOpen;
74102
+ const [expanded, setExpanded] = (0, import_react311.useState)(props.defaultExpandedKeys ?? []);
74103
+ const [path, setPath] = (0, import_react311.useState)([]);
74104
+ const keyboard = (0, import_react311.useRef)(false);
74105
+ const leave = (0, import_react311.useRef)(void 0);
74106
+ const cancelLeave = (0, import_react311.useCallback)(() => clearTimeout(leave.current), []);
74107
+ const requestOpen = (0, import_react311.useCallback)((value) => {
74108
+ if (props.open === void 0) setInternalOpen(value);
74109
+ props.onOpenChange?.(value);
74110
+ if (!value) setPath([]);
74111
+ }, [props.open, props.onOpenChange]);
74112
+ const close = (restore = false) => {
74113
+ setPath([]);
74114
+ if (popup) requestOpen(false);
74115
+ if (restore) {
74116
+ if (anchor.current) anchor.current.focus();
74117
+ else {
74118
+ const root = Array.from(document.querySelectorAll("[data-menu-owner]")).find((el) => el.dataset.menuOwner === owner);
74119
+ root?.querySelector("[data-menu-action]:not([aria-disabled='true'])")?.focus();
74120
+ }
74121
+ }
74122
+ };
74123
+ (0, import_react311.useEffect)(() => {
74124
+ if (popup ? !open : path.length === 0) return;
74125
+ const outside = (event) => {
74126
+ const target = event.target;
74127
+ if (anchor.current?.contains(target)) return;
74128
+ const owned = Array.from(document.querySelectorAll("[data-menu-owner]")).some((el) => el.dataset.menuOwner === owner && el.contains(target));
74129
+ if (!owned) requestOpen(false);
74130
+ };
74131
+ document.addEventListener("pointerdown", outside);
74132
+ return () => document.removeEventListener("pointerdown", outside);
74133
+ }, [popup, open, path.length, anchor, owner, requestOpen]);
74134
+ (0, import_react311.useEffect)(() => () => clearTimeout(leave.current), []);
74135
+ const state = {
74136
+ owner,
74137
+ props,
74138
+ expanded: props.expandedKeys ?? expanded,
74139
+ path,
74140
+ setPath,
74141
+ close,
74142
+ keyboard,
74143
+ cancelLeave,
74144
+ scheduleLeave: () => {
74145
+ cancelLeave();
74146
+ if (path.length && !keyboard.current) leave.current = setTimeout(() => setPath([]), 250);
74147
+ },
74148
+ toggle: (id) => {
74149
+ const current = props.expandedKeys ?? expanded;
74150
+ const next = current.includes(id) ? current.filter((key) => key !== id) : [...current, id];
74151
+ if (props.expandedKeys === void 0) setExpanded(next);
74152
+ props.onExpandedKeysChange?.(next);
74153
+ }
74154
+ };
74155
+ 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 }) });
74156
+ let trigger = null;
74157
+ if (props.trigger) {
74158
+ const original = props.trigger.props;
74159
+ const originalRef = Number(import_react311.default.version.split(".")[0]) >= 19 ? original.ref : props.trigger.ref;
74160
+ trigger = (0, import_react311.cloneElement)(props.trigger, {
74161
+ ref: (el) => {
74162
+ triggerRef.current = el;
74163
+ if (typeof originalRef === "function") originalRef(el);
74164
+ else if (originalRef) originalRef.current = el;
74165
+ },
74166
+ "aria-haspopup": "menu",
74167
+ "aria-expanded": open,
74168
+ "aria-controls": open ? `${owner}-menu` : void 0,
74169
+ onClick: (event) => {
74170
+ original.onClick?.(event);
74171
+ if (!event.defaultPrevented) requestOpen(!open);
74172
+ },
74173
+ onKeyDown: (event) => {
74174
+ original.onKeyDown?.(event);
74175
+ if (!event.defaultPrevented && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
74176
+ event.preventDefault();
74177
+ requestOpen(true);
74178
+ }
74179
+ }
74180
+ });
74181
+ }
74182
+ return /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)(import_jsx_runtime336.Fragment, { children: [
74183
+ trigger,
74184
+ 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 })
73834
74185
  ] });
73835
74186
  }
73836
74187
 
73837
74188
  // src/contexts/BottomSheetContext.tsx
73838
- var import_react311 = require("react");
73839
- var import_react_dom19 = require("react-dom");
73840
- var import_classnames142 = __toESM(require("classnames"), 1);
73841
- var import_jsx_runtime335 = require("react/jsx-runtime");
73842
- var BottomSheetContext = (0, import_react311.createContext)(null);
74189
+ var import_react312 = require("react");
74190
+ var import_react_dom20 = require("react-dom");
74191
+ var import_classnames143 = __toESM(require("classnames"), 1);
74192
+ var import_jsx_runtime337 = require("react/jsx-runtime");
74193
+ var BottomSheetContext = (0, import_react312.createContext)(null);
73843
74194
  var TRANSITION_MS2 = 260;
73844
74195
  var renderSlot = (slot, controls) => {
73845
74196
  if (!slot) {
@@ -73850,13 +74201,13 @@ var renderSlot = (slot, controls) => {
73850
74201
  var BottomSheetProvider = ({
73851
74202
  children
73852
74203
  }) => {
73853
- const [sheet, setSheet] = (0, import_react311.useState)(null);
73854
- const [isVisible, setIsVisible] = (0, import_react311.useState)(false);
73855
- const pendingCloseRef = (0, import_react311.useRef)(null);
73856
- const dismissSheet = (0, import_react311.useCallback)(() => {
74204
+ const [sheet, setSheet] = (0, import_react312.useState)(null);
74205
+ const [isVisible, setIsVisible] = (0, import_react312.useState)(false);
74206
+ const pendingCloseRef = (0, import_react312.useRef)(null);
74207
+ const dismissSheet = (0, import_react312.useCallback)(() => {
73857
74208
  setIsVisible(false);
73858
74209
  }, []);
73859
- const presentSheet = (0, import_react311.useCallback)((options) => {
74210
+ const presentSheet = (0, import_react312.useCallback)((options) => {
73860
74211
  if (pendingCloseRef.current) {
73861
74212
  clearTimeout(pendingCloseRef.current);
73862
74213
  pendingCloseRef.current = null;
@@ -73869,7 +74220,7 @@ var BottomSheetProvider = ({
73869
74220
  setTimeout(animateIn, 0);
73870
74221
  }
73871
74222
  }, []);
73872
- (0, import_react311.useEffect)(() => {
74223
+ (0, import_react312.useEffect)(() => {
73873
74224
  if (!isVisible && sheet) {
73874
74225
  pendingCloseRef.current = setTimeout(() => {
73875
74226
  sheet.onClose?.();
@@ -73884,7 +74235,7 @@ var BottomSheetProvider = ({
73884
74235
  }
73885
74236
  return void 0;
73886
74237
  }, [isVisible, sheet]);
73887
- (0, import_react311.useEffect)(
74238
+ (0, import_react312.useEffect)(
73888
74239
  () => () => {
73889
74240
  if (pendingCloseRef.current) {
73890
74241
  clearTimeout(pendingCloseRef.current);
@@ -73892,13 +74243,13 @@ var BottomSheetProvider = ({
73892
74243
  },
73893
74244
  []
73894
74245
  );
73895
- const controls = (0, import_react311.useMemo)(
74246
+ const controls = (0, import_react312.useMemo)(
73896
74247
  () => ({
73897
74248
  dismiss: dismissSheet
73898
74249
  }),
73899
74250
  [dismissSheet]
73900
74251
  );
73901
- const contextValue = (0, import_react311.useMemo)(
74252
+ const contextValue = (0, import_react312.useMemo)(
73902
74253
  () => ({
73903
74254
  presentSheet,
73904
74255
  dismissSheet,
@@ -73907,12 +74258,12 @@ var BottomSheetProvider = ({
73907
74258
  }),
73908
74259
  [presentSheet, dismissSheet, sheet, isVisible]
73909
74260
  );
73910
- const overlayNode = typeof document !== "undefined" && sheet ? (0, import_react_dom19.createPortal)(
73911
- /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
73912
- /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
74261
+ const overlayNode = typeof document !== "undefined" && sheet ? (0, import_react_dom20.createPortal)(
74262
+ /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
74263
+ /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
73913
74264
  "div",
73914
74265
  {
73915
- className: (0, import_classnames142.default)(
74266
+ className: (0, import_classnames143.default)(
73916
74267
  "absolute inset-0 bg-neutral-900/40 transition-opacity duration-300",
73917
74268
  isVisible ? "opacity-100 pointer-events-auto" : "opacity-0"
73918
74269
  ),
@@ -73922,24 +74273,24 @@ var BottomSheetProvider = ({
73922
74273
  }
73923
74274
  }
73924
74275
  ),
73925
- /* @__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)(
74276
+ /* @__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)(
73926
74277
  "section",
73927
74278
  {
73928
74279
  role: "dialog",
73929
74280
  "aria-modal": "true",
73930
- className: (0, import_classnames142.default)(
74281
+ className: (0, import_classnames143.default)(
73931
74282
  "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",
73932
74283
  sheet.className,
73933
74284
  isVisible ? "translate-y-0" : "translate-y-full"
73934
74285
  ),
73935
74286
  style: { minHeight: "25vh", maxHeight: "85vh" },
73936
74287
  children: [
73937
- /* @__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: [
73938
- /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)("div", { className: "space-y-1", children: [
73939
- sheet.title && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
73940
- sheet.description && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
74288
+ /* @__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: [
74289
+ /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)("div", { className: "space-y-1", children: [
74290
+ sheet.title && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
74291
+ sheet.description && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
73941
74292
  ] }),
73942
- (sheet.showCloseButton ?? true) && /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
74293
+ (sheet.showCloseButton ?? true) && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
73943
74294
  IconButton_default,
73944
74295
  {
73945
74296
  icon: "Close",
@@ -73951,21 +74302,21 @@ var BottomSheetProvider = ({
73951
74302
  }
73952
74303
  )
73953
74304
  ] }),
73954
- /* @__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." }) }),
73955
- 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) })
74305
+ /* @__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." }) }),
74306
+ 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) })
73956
74307
  ]
73957
74308
  }
73958
74309
  ) })
73959
74310
  ] }),
73960
74311
  document.body
73961
74312
  ) : null;
73962
- return /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)(BottomSheetContext.Provider, { value: contextValue, children: [
74313
+ return /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(BottomSheetContext.Provider, { value: contextValue, children: [
73963
74314
  children,
73964
74315
  overlayNode
73965
74316
  ] });
73966
74317
  };
73967
74318
  var useBottomSheet = () => {
73968
- const context = (0, import_react311.useContext)(BottomSheetContext);
74319
+ const context = (0, import_react312.useContext)(BottomSheetContext);
73969
74320
  if (!context) {
73970
74321
  throw new Error("useBottomSheet must be used within a BottomSheetProvider");
73971
74322
  }
@@ -74599,8 +74950,8 @@ var SYSTEM_VARIABLES = [
74599
74950
  ];
74600
74951
 
74601
74952
  // src/components/MetricBar.tsx
74602
- var import_classnames143 = __toESM(require("classnames"), 1);
74603
- var import_jsx_runtime336 = require("react/jsx-runtime");
74953
+ var import_classnames144 = __toESM(require("classnames"), 1);
74954
+ var import_jsx_runtime338 = require("react/jsx-runtime");
74604
74955
  var MetricBar = ({
74605
74956
  label,
74606
74957
  value,
@@ -74610,7 +74961,7 @@ var MetricBar = ({
74610
74961
  size = "sm",
74611
74962
  className,
74612
74963
  ...rest
74613
- }) => /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
74964
+ }) => /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
74614
74965
  Progress_default,
74615
74966
  {
74616
74967
  ...rest,
@@ -74620,13 +74971,13 @@ var MetricBar = ({
74620
74971
  formatValue: value !== void 0 ? () => String(value) : void 0,
74621
74972
  size,
74622
74973
  color: tone ?? color ?? "blue",
74623
- className: (0, import_classnames143.default)("w-full", className)
74974
+ className: (0, import_classnames144.default)("w-full", className)
74624
74975
  }
74625
74976
  );
74626
74977
  MetricBar.displayName = "MetricBar";
74627
74978
 
74628
74979
  // src/components/NetworkGraph/NetworkGraph.tsx
74629
- var import_react313 = require("react");
74980
+ var import_react314 = require("react");
74630
74981
 
74631
74982
  // src/components/NetworkGraph/model.ts
74632
74983
  var CELL = 64;
@@ -74770,17 +75121,17 @@ function findNetworkPath(edges, source, target) {
74770
75121
  }
74771
75122
 
74772
75123
  // src/components/NetworkGraph/useNetworkCanvas.ts
74773
- var import_react312 = require("react");
75124
+ var import_react313 = require("react");
74774
75125
  function useNetworkCanvas(options) {
74775
- const canvasRef = (0, import_react312.useRef)(null);
74776
- const view = (0, import_react312.useRef)({ x: 0, y: 0, zoom: 1 });
74777
- const size = (0, import_react312.useRef)({ width: 1, height: 1 });
74778
- const latest = (0, import_react312.useRef)(options);
74779
- const frame = (0, import_react312.useRef)(null);
74780
- const [zoom, setZoom] = (0, import_react312.useState)(1);
74781
- const colors3 = (0, import_react312.useRef)(/* @__PURE__ */ new Map());
74782
- const textColor = (0, import_react312.useRef)("#737373");
74783
- const draw = (0, import_react312.useCallback)(() => {
75126
+ const canvasRef = (0, import_react313.useRef)(null);
75127
+ const view = (0, import_react313.useRef)({ x: 0, y: 0, zoom: 1 });
75128
+ const size = (0, import_react313.useRef)({ width: 1, height: 1 });
75129
+ const latest = (0, import_react313.useRef)(options);
75130
+ const frame = (0, import_react313.useRef)(null);
75131
+ const [zoom, setZoom] = (0, import_react313.useState)(1);
75132
+ const colors3 = (0, import_react313.useRef)(/* @__PURE__ */ new Map());
75133
+ const textColor = (0, import_react313.useRef)("#737373");
75134
+ const draw = (0, import_react313.useCallback)(() => {
74784
75135
  const canvas = canvasRef.current;
74785
75136
  const ctx = canvas?.getContext("2d");
74786
75137
  if (!canvas || !ctx) return;
@@ -74880,14 +75231,14 @@ function useNetworkCanvas(options) {
74880
75231
  }
74881
75232
  ctx.globalAlpha = 1;
74882
75233
  }, []);
74883
- const requestDraw = (0, import_react312.useCallback)(() => {
75234
+ const requestDraw = (0, import_react313.useCallback)(() => {
74884
75235
  if (frame.current !== null) return;
74885
75236
  frame.current = requestAnimationFrame(() => {
74886
75237
  frame.current = null;
74887
75238
  draw();
74888
75239
  });
74889
75240
  }, [draw]);
74890
- const update = (0, import_react312.useCallback)(
75241
+ const update = (0, import_react313.useCallback)(
74891
75242
  (next) => {
74892
75243
  view.current = next;
74893
75244
  setZoom(next.zoom);
@@ -74896,7 +75247,7 @@ function useNetworkCanvas(options) {
74896
75247
  },
74897
75248
  [requestDraw]
74898
75249
  );
74899
- const fit = (0, import_react312.useCallback)(
75250
+ const fit = (0, import_react313.useCallback)(
74900
75251
  () => update(
74901
75252
  fitNetwork(
74902
75253
  latest.current.nodes,
@@ -74906,11 +75257,11 @@ function useNetworkCanvas(options) {
74906
75257
  ),
74907
75258
  [update]
74908
75259
  );
74909
- const zoomBy = (0, import_react312.useCallback)(
75260
+ const zoomBy = (0, import_react313.useCallback)(
74910
75261
  (factor, x = size.current.width / 2, y = size.current.height / 2) => update(zoomAt(view.current, factor, x, y)),
74911
75262
  [update]
74912
75263
  );
74913
- const focusNode = (0, import_react312.useCallback)(
75264
+ const focusNode = (0, import_react313.useCallback)(
74914
75265
  (node) => {
74915
75266
  update({
74916
75267
  ...view.current,
@@ -74920,14 +75271,14 @@ function useNetworkCanvas(options) {
74920
75271
  },
74921
75272
  [update]
74922
75273
  );
74923
- (0, import_react312.useEffect)(() => {
75274
+ (0, import_react313.useEffect)(() => {
74924
75275
  latest.current = options;
74925
75276
  requestDraw();
74926
75277
  }, [options, requestDraw]);
74927
- (0, import_react312.useEffect)(() => {
75278
+ (0, import_react313.useEffect)(() => {
74928
75279
  fit();
74929
75280
  }, [options.model, fit]);
74930
- (0, import_react312.useEffect)(() => {
75281
+ (0, import_react313.useEffect)(() => {
74931
75282
  const canvas = canvasRef.current;
74932
75283
  if (!canvas) return;
74933
75284
  const measure = () => {
@@ -74980,7 +75331,7 @@ function useNetworkCanvas(options) {
74980
75331
  }
74981
75332
 
74982
75333
  // src/components/NetworkGraph/NetworkGraph.tsx
74983
- var import_jsx_runtime337 = require("react/jsx-runtime");
75334
+ var import_jsx_runtime339 = require("react/jsx-runtime");
74984
75335
  var NO_COMMUNITIES = [];
74985
75336
  var NO_HIGHLIGHTS = [];
74986
75337
  function NetworkGraph({
@@ -75011,11 +75362,11 @@ function NetworkGraph({
75011
75362
  ...panelProps
75012
75363
  }) {
75013
75364
  const t = useKitT();
75014
- const helpId = (0, import_react313.useId)();
75015
- const layoutRef = (0, import_react313.useRef)(null);
75016
- const [hasLegendSpace, setHasLegendSpace] = (0, import_react313.useState)(true);
75365
+ const helpId = (0, import_react314.useId)();
75366
+ const layoutRef = (0, import_react314.useRef)(null);
75367
+ const [hasLegendSpace, setHasLegendSpace] = (0, import_react314.useState)(true);
75017
75368
  const legendOnRight = legendPosition === "right" || legendPosition === "auto" && hasLegendSpace;
75018
- (0, import_react313.useEffect)(() => {
75369
+ (0, import_react314.useEffect)(() => {
75019
75370
  const element = layoutRef.current;
75020
75371
  if (!element || legendPosition !== "auto") return;
75021
75372
  const measure = () => setHasLegendSpace(element.getBoundingClientRect().width >= 600);
@@ -75024,38 +75375,38 @@ function NetworkGraph({
75024
75375
  observer.observe(element);
75025
75376
  return () => observer.disconnect();
75026
75377
  }, [legendPosition, loading]);
75027
- const model = (0, import_react313.useMemo)(
75378
+ const model = (0, import_react314.useMemo)(
75028
75379
  () => buildNetwork(nodes, edges, communities),
75029
75380
  [nodes, edges, communities]
75030
75381
  );
75031
- const [internalSelected, setInternalSelected] = (0, import_react313.useState)(
75382
+ const [internalSelected, setInternalSelected] = (0, import_react314.useState)(
75032
75383
  defaultSelectedNodeId
75033
75384
  );
75034
- const [hidden, setHidden] = (0, import_react313.useState)(() => /* @__PURE__ */ new Set());
75035
- const [focused, setFocused] = (0, import_react313.useState)(null);
75036
- const [query, setQuery] = (0, import_react313.useState)("");
75037
- const enabled = (0, import_react313.useMemo)(
75385
+ const [hidden, setHidden] = (0, import_react314.useState)(() => /* @__PURE__ */ new Set());
75386
+ const [focused, setFocused] = (0, import_react314.useState)(null);
75387
+ const [query, setQuery] = (0, import_react314.useState)("");
75388
+ const enabled = (0, import_react314.useMemo)(
75038
75389
  () => new Set(
75039
75390
  visibleCommunityIds ?? model.groups.filter((g) => !hidden.has(g.id)).map((g) => g.id)
75040
75391
  ),
75041
75392
  [visibleCommunityIds, model, hidden]
75042
75393
  );
75043
- const visibleNodes = (0, import_react313.useMemo)(
75394
+ const visibleNodes = (0, import_react314.useMemo)(
75044
75395
  () => model.nodes.filter((n) => !n.community || enabled.has(n.community)),
75045
75396
  [model, enabled]
75046
75397
  );
75047
- const visible = (0, import_react313.useMemo)(
75398
+ const visible = (0, import_react314.useMemo)(
75048
75399
  () => new Set(visibleNodes.map((n) => n.id)),
75049
75400
  [visibleNodes]
75050
75401
  );
75051
75402
  const selection = selectedNodeId === void 0 ? internalSelected : selectedNodeId;
75052
75403
  const selected = selection !== null && visible.has(selection) ? selection : null;
75053
75404
  const activeFocus = focused !== null && visible.has(focused) ? focused : null;
75054
- const highlighted = (0, import_react313.useMemo)(
75405
+ const highlighted = (0, import_react314.useMemo)(
75055
75406
  () => new Set(highlightedEdgeIds),
75056
75407
  [highlightedEdgeIds]
75057
75408
  );
75058
- const counts = (0, import_react313.useMemo)(() => {
75409
+ const counts = (0, import_react314.useMemo)(() => {
75059
75410
  const result = /* @__PURE__ */ new Map();
75060
75411
  for (const n of model.nodes)
75061
75412
  if (n.community)
@@ -75075,7 +75426,7 @@ function NetworkGraph({
75075
75426
  onViewportChange
75076
75427
  });
75077
75428
  const locked = disabled || loading;
75078
- const drag = (0, import_react313.useRef)(null);
75429
+ const drag = (0, import_react314.useRef)(null);
75079
75430
  const select = (id) => {
75080
75431
  if (locked) return;
75081
75432
  if (selectedNodeId === void 0) setInternalSelected(id);
@@ -75091,7 +75442,7 @@ function NetworkGraph({
75091
75442
  );
75092
75443
  onVisibleCommunitiesChange?.(ids);
75093
75444
  };
75094
- (0, import_react313.useEffect)(() => {
75445
+ (0, import_react314.useEffect)(() => {
75095
75446
  const element = canvas.canvasRef.current;
75096
75447
  if (!element || locked) return;
75097
75448
  const wheel = (event) => {
@@ -75140,13 +75491,13 @@ function NetworkGraph({
75140
75491
  }
75141
75492
  };
75142
75493
  const focusedNode = model.byId.get(activeFocus ?? selected ?? "");
75143
- const matchingNodes = (0, import_react313.useMemo)(() => {
75494
+ const matchingNodes = (0, import_react314.useMemo)(() => {
75144
75495
  const search = query.toLocaleLowerCase();
75145
75496
  return visibleNodes.filter((n) => (n.label ?? n.id).toLocaleLowerCase().includes(search)).slice(0, 50).map((n) => ({ value: n.id, label: n.label ?? n.id }));
75146
75497
  }, [visibleNodes, query]);
75147
75498
  const graphHeight = Number.isFinite(height) ? Math.max(160, height) : 480;
75148
75499
  const resolvedLegendTone = legendTone === "auto" ? tone : legendTone;
75149
- const legendContent = /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
75500
+ const legendContent = /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
75150
75501
  "fieldset",
75151
75502
  {
75152
75503
  disabled: locked,
@@ -75155,8 +75506,8 @@ function NetworkGraph({
75155
75506
  maxHeight: legendPanel ? Math.max(96, graphHeight - 64) : graphHeight
75156
75507
  },
75157
75508
  children: [
75158
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("legend", { className: "mb-3 text-xs font-semibold uppercase tracking-widest", children: t("kit.networkGraph.communities") }),
75159
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75509
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("legend", { className: "mb-3 text-xs font-semibold uppercase tracking-widest", children: t("kit.networkGraph.communities") }),
75510
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75160
75511
  Checkbox_default,
75161
75512
  {
75162
75513
  size: "sm",
@@ -75167,8 +75518,8 @@ function NetworkGraph({
75167
75518
  onChange: (event) => filter(event.target.checked ? model.groups.map((g) => g.id) : [])
75168
75519
  }
75169
75520
  ),
75170
- model.groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
75171
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75521
+ model.groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
75522
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75172
75523
  Checkbox_default,
75173
75524
  {
75174
75525
  size: "sm",
@@ -75180,12 +75531,12 @@ function NetworkGraph({
75180
75531
  )
75181
75532
  }
75182
75533
  ),
75183
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("span", { className: "text-xs tabular-nums opacity-60", children: counts.get(group.id) ?? 0 })
75534
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("span", { className: "text-xs tabular-nums opacity-60", children: counts.get(group.id) ?? 0 })
75184
75535
  ] }, group.id))
75185
75536
  ]
75186
75537
  }
75187
75538
  );
75188
- return /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75539
+ return /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75189
75540
  Panel_default,
75190
75541
  {
75191
75542
  ...panelProps,
@@ -75196,7 +75547,7 @@ function NetworkGraph({
75196
75547
  loading,
75197
75548
  clickable: false,
75198
75549
  scrollable: false,
75199
- children: /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
75550
+ children: /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
75200
75551
  "div",
75201
75552
  {
75202
75553
  className: "flex min-w-0 flex-col gap-3",
@@ -75204,7 +75555,7 @@ function NetworkGraph({
75204
75555
  "aria-label": ariaLabel ?? t("kit.networkGraph.name"),
75205
75556
  "aria-disabled": locked || void 0,
75206
75557
  children: [
75207
- 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)(
75558
+ 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)(
75208
75559
  Combobox_default,
75209
75560
  {
75210
75561
  size: "sm",
@@ -75226,7 +75577,7 @@ function NetworkGraph({
75226
75577
  }
75227
75578
  }
75228
75579
  ) }) }),
75229
- /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
75580
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
75230
75581
  "div",
75231
75582
  {
75232
75583
  ref: layoutRef,
@@ -75234,13 +75585,13 @@ function NetworkGraph({
75234
75585
  style: { flexDirection: legendOnRight ? "row" : "column" },
75235
75586
  "data-legend-position": legendOnRight ? "right" : "bottom",
75236
75587
  children: [
75237
- /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
75588
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
75238
75589
  "div",
75239
75590
  {
75240
75591
  className: "relative min-w-0 flex-1",
75241
75592
  style: { height: graphHeight, minHeight: graphHeight },
75242
75593
  children: [
75243
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75594
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75244
75595
  "canvas",
75245
75596
  {
75246
75597
  ref: canvas.canvasRef,
@@ -75309,11 +75660,11 @@ function NetworkGraph({
75309
75660
  }
75310
75661
  }
75311
75662
  ),
75312
- 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: [
75313
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75663
+ 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: [
75664
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75314
75665
  IconButton_default,
75315
75666
  {
75316
- icon: /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
75667
+ icon: /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
75317
75668
  "svg",
75318
75669
  {
75319
75670
  viewBox: "0 0 24 24",
@@ -75324,10 +75675,10 @@ function NetworkGraph({
75324
75675
  strokeLinejoin: "round",
75325
75676
  "aria-hidden": "true",
75326
75677
  children: [
75327
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("path", { d: "M4 9V5a1 1 0 0 1 1-1h4" }),
75328
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("path", { d: "M15 4h4a1 1 0 0 1 1 1v4" }),
75329
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("path", { d: "M20 15v4a1 1 0 0 1-1 1h-4" }),
75330
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("path", { d: "M9 20H5a1 1 0 0 1-1-1v-4" })
75678
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("path", { d: "M4 9V5a1 1 0 0 1 1-1h4" }),
75679
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("path", { d: "M15 4h4a1 1 0 0 1 1 1v4" }),
75680
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("path", { d: "M20 15v4a1 1 0 0 1-1 1h-4" }),
75681
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("path", { d: "M9 20H5a1 1 0 0 1-1-1v-4" })
75331
75682
  ]
75332
75683
  }
75333
75684
  ),
@@ -75340,10 +75691,10 @@ function NetworkGraph({
75340
75691
  onClick: canvas.fit
75341
75692
  }
75342
75693
  ),
75343
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75694
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75344
75695
  IconButton_default,
75345
75696
  {
75346
- icon: /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75697
+ icon: /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75347
75698
  "svg",
75348
75699
  {
75349
75700
  viewBox: "0 0 24 24",
@@ -75352,7 +75703,7 @@ function NetworkGraph({
75352
75703
  strokeWidth: 2,
75353
75704
  strokeLinecap: "round",
75354
75705
  "aria-hidden": "true",
75355
- children: /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("path", { d: "M6 12h12" })
75706
+ children: /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("path", { d: "M6 12h12" })
75356
75707
  }
75357
75708
  ),
75358
75709
  size: "xs",
@@ -75364,7 +75715,7 @@ function NetworkGraph({
75364
75715
  onClick: () => canvas.zoomBy(0.8)
75365
75716
  }
75366
75717
  ),
75367
- /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
75718
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
75368
75719
  "span",
75369
75720
  {
75370
75721
  className: "min-w-[3.5ch] px-1 text-center text-[11px] tabular-nums text-neutral-500 dark:text-neutral-400",
@@ -75375,7 +75726,7 @@ function NetworkGraph({
75375
75726
  ]
75376
75727
  }
75377
75728
  ),
75378
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75729
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75379
75730
  IconButton_default,
75380
75731
  {
75381
75732
  icon: "Add",
@@ -75388,7 +75739,7 @@ function NetworkGraph({
75388
75739
  onClick: () => canvas.zoomBy(1.25)
75389
75740
  }
75390
75741
  ),
75391
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75742
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75392
75743
  IconButton_default,
75393
75744
  {
75394
75745
  icon: "Reset",
@@ -75406,18 +75757,18 @@ function NetworkGraph({
75406
75757
  }
75407
75758
  )
75408
75759
  ] }),
75409
- !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") })
75760
+ !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") })
75410
75761
  ]
75411
75762
  }
75412
75763
  ),
75413
- showCommunities && model.groups.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75764
+ showCommunities && model.groups.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75414
75765
  "div",
75415
75766
  {
75416
75767
  className: "min-w-0 shrink-0",
75417
75768
  style: {
75418
75769
  width: legendOnRight ? legendPanel ? 224 : 192 : "100%"
75419
75770
  },
75420
- children: legendPanel ? /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75771
+ children: legendPanel ? /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75421
75772
  Panel_default,
75422
75773
  {
75423
75774
  variant: legendVariant === "auto" ? variant : legendVariant,
@@ -75436,8 +75787,8 @@ function NetworkGraph({
75436
75787
  ]
75437
75788
  }
75438
75789
  ),
75439
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("p", { id: helpId, className: "text-xs opacity-70", children: t("kit.networkGraph.instructions") }),
75440
- /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
75790
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("p", { id: helpId, className: "text-xs opacity-70", children: t("kit.networkGraph.instructions") }),
75791
+ /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
75441
75792
  "p",
75442
75793
  {
75443
75794
  role: "status",
@@ -75626,11 +75977,13 @@ function NetworkGraph({
75626
75977
  LOADER_VARIANTS,
75627
75978
  LOCK_TTL_MS,
75628
75979
  Loader,
75980
+ MENU_VARIANTS,
75629
75981
  METERGROUP_ORIENTATIONS,
75630
75982
  MODAL_POSITIONS,
75631
75983
  MS_DAY,
75632
75984
  MULTI_TOGGLE_INDICATORS,
75633
75985
  MULTI_TOGGLE_VARIANTS,
75986
+ Menu,
75634
75987
  MeterGroup,
75635
75988
  MetricBar,
75636
75989
  Modal,
@@ -75650,9 +76003,12 @@ function NetworkGraph({
75650
76003
  OTP_VARIANTS,
75651
76004
  OrganizationChart,
75652
76005
  PAGED_PANEL_LOADERS,
76006
+ PAGE_BODY_LAYOUT_VARIANTS,
75653
76007
  PAGE_HEADER_VARIANTS,
75654
76008
  PANEL_HERO_TITLE_ELEMENTS,
75655
76009
  PANEL_HERO_VARIANTS,
76010
+ PANEL_SLIDE_DURATION_MS,
76011
+ PANEL_SLIDE_EASING,
75656
76012
  PANEL_TONE_FOR_FIELD,
75657
76013
  PANE_EMPTY_STATE_SIZE,
75658
76014
  PILL_CORNERS,
@@ -76043,6 +76399,7 @@ function NetworkGraph({
76043
76399
  normalizeString,
76044
76400
  normalizeStringToUpper,
76045
76401
  oklchToHex,
76402
+ panelSlideTransition,
76046
76403
  parseImageSource,
76047
76404
  parseMessage,
76048
76405
  parseSmartVariable,