@cjlapao/ui-kit 0.2.31 → 0.2.32

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
@@ -88,6 +88,7 @@ __export(src_exports, {
88
88
  Chart: () => Chart,
89
89
  Chat: () => Chat_default,
90
90
  Checkbox: () => Checkbox_default,
91
+ CodeBlock: () => CodeBlock,
91
92
  CollapseChevron: () => CollapseChevron,
92
93
  CollapseToggleButton: () => CollapseToggleButton,
93
94
  CollapsibleHelpText: () => CollapsibleHelpText_default,
@@ -303,6 +304,7 @@ __export(src_exports, {
303
304
  SURFACE_GLASS_RIM: () => SURFACE_GLASS_RIM,
304
305
  SURFACE_GUTTER_AXES: () => SURFACE_GUTTER_AXES,
305
306
  SURFACE_PADDINGS: () => SURFACE_PADDINGS,
307
+ SURFACE_TONES: () => SURFACE_TONES,
306
308
  SURFACE_TO_BUTTON_VARIANT: () => SURFACE_TO_BUTTON_VARIANT,
307
309
  SURFACE_TRANSPARENCIES: () => SURFACE_TRANSPARENCIES,
308
310
  SURFACE_VARIANTS: () => SURFACE_VARIANTS,
@@ -559,6 +561,7 @@ __export(src_exports, {
559
561
  getStatusSpinnerToneTokens: () => getStatusSpinnerToneTokens,
560
562
  getStatusTokens: () => getStatusTokens,
561
563
  getStepperTonePalette: () => getStepperTonePalette,
564
+ getSurfaceAccentColor: () => getSurfaceAccentColor,
562
565
  getSurfaceCornerClass: () => getSurfaceCornerClass,
563
566
  getSurfaceCornerRem: () => getSurfaceCornerRem,
564
567
  getSurfaceGutterClass: () => getSurfaceGutterClass,
@@ -5591,6 +5594,7 @@ var getSurfaceGlassFillClass = (color2, opacity) => {
5591
5594
  if (opacity === "clear") return 5;
5592
5595
  return 15;
5593
5596
  })();
5597
+ if (color2 === "none") return `bg-white/${litOpacity} dark:bg-neutral-900/${drkOpacity}`;
5594
5598
  const safeBase = GLASS_COLOR_SAFELIST.has(color2) ? color2 : "neutral";
5595
5599
  return `bg-${safeBase}-100/${litOpacity} dark:bg-${safeBase}-500/${drkOpacity}`;
5596
5600
  };
@@ -5757,6 +5761,8 @@ var TRUE_COLORS = [
5757
5761
  "neutral",
5758
5762
  "stone"
5759
5763
  ];
5764
+ var SURFACE_TONES = ["none", ...TRUE_COLORS];
5765
+ var getSurfaceAccentColor = (tone) => tone === "none" ? "neutral" : tone;
5760
5766
  var TRUE_COLOR_DOT_CLASSES = {
5761
5767
  red: "bg-red-500 dark:bg-red-400",
5762
5768
  orange: "bg-orange-500 dark:bg-orange-400",
@@ -6022,6 +6028,7 @@ var FIELD_STATUS_CLASSES = {
6022
6028
  success: "border-emerald-500 dark:border-emerald-400 focus-within:border-emerald-500 dark:focus-within:border-emerald-400 focus-within:ring-2 focus-within:ring-inset focus-within:ring-emerald-500/60 dark:focus-within:ring-emerald-400/60"
6023
6029
  };
6024
6030
  var SURFACE_VARIANTS = [
6031
+ "none",
6025
6032
  "elevated",
6026
6033
  "outlined",
6027
6034
  "subtle",
@@ -6032,6 +6039,7 @@ var SURFACE_VARIANTS = [
6032
6039
  "liquid-glass"
6033
6040
  ];
6034
6041
  var SURFACE_TO_BUTTON_VARIANT = {
6042
+ none: "ghost",
6035
6043
  elevated: "solid",
6036
6044
  outlined: "outline",
6037
6045
  subtle: "ghost",
@@ -6074,7 +6082,7 @@ var surfaceTriggerTokens = Object.fromEntries(
6074
6082
  }
6075
6083
  ])
6076
6084
  );
6077
- var getSurfaceTriggerTokens = (color2) => surfaceTriggerTokens[color2] ?? surfaceTriggerTokens.blue;
6085
+ var getSurfaceTriggerTokens = (color2) => surfaceTriggerTokens[getSurfaceAccentColor(color2)] ?? surfaceTriggerTokens.neutral;
6078
6086
  var collapsibleHelpToneTokens = Object.fromEntries(
6079
6087
  TRUE_COLORS.map((color2) => [
6080
6088
  color2,
@@ -6137,8 +6145,9 @@ var SURFACE_VARIANT_FOR_FIELD = {
6137
6145
  glass: "glass"
6138
6146
  };
6139
6147
  var isGlassSurface = (variant) => variant === "glass" || variant === "liquid-glass";
6140
- var PANEL_TONE_FOR_FIELD = "neutral";
6148
+ var PANEL_TONE_FOR_FIELD = "none";
6141
6149
  var INPUT_VARIANT_FOR_SURFACE = {
6150
+ none: "flat",
6142
6151
  elevated: "flat",
6143
6152
  outlined: "flat",
6144
6153
  subtle: "ghost",
@@ -6149,7 +6158,7 @@ var INPUT_VARIANT_FOR_SURFACE = {
6149
6158
  "liquid-glass": "glass",
6150
6159
  plain: "flat"
6151
6160
  };
6152
- var DEFAULT_SURFACE_TONE = "blue";
6161
+ var DEFAULT_SURFACE_TONE = "none";
6153
6162
  var CASCADE_EXPAND = {
6154
6163
  /** Per-item cascade step, expanding. */
6155
6164
  stepMs: 20,
@@ -6897,6 +6906,7 @@ var getMultiToggleColorTokens = (color2) => currentTheme.multiToggle[color2] ??
6897
6906
  var getMultiToggleVariantTokens = (color2) => currentTheme.multiToggleVariant[color2] ?? currentTheme.multiToggleVariant.blue;
6898
6907
  var getTabsColorTokens = (color2) => currentTheme.tabs[color2] ?? currentTheme.tabs.blue;
6899
6908
  var SURFACE_VARIANT_BASE = {
6909
+ none: "",
6900
6910
  elevated: "bg-white shadow-xl ring-1 ring-black/5 dark:bg-neutral-900 dark:ring-white/10",
6901
6911
  // A real 1px border, not a ring. `ring-1` with no ring colour resolves to
6902
6912
  // currentColor, which painted a near-black rule in light mode.
@@ -6915,10 +6925,12 @@ var TRANSLUCENT_SURFACE_VARIANTS = [
6915
6925
  "default"
6916
6926
  ];
6917
6927
  var getRawSurfaceVariantClasses = (variant, tone, overrides = {}) => {
6918
- const palette = currentTheme.panel[tone] ?? currentTheme.panel.neutral;
6928
+ const palette = getPanelToneStyles(tone);
6919
6929
  const { bgClass, borderClass, liquidExtras } = overrides;
6920
6930
  const base = SURFACE_VARIANT_BASE[variant] ?? SURFACE_VARIANT_BASE.elevated;
6921
6931
  switch (variant) {
6932
+ case "none":
6933
+ return tone === "none" ? "" : bgClass ?? palette.subtleBg;
6922
6934
  case "outlined":
6923
6935
  return [base, borderClass ?? palette.outlineBorder].join(" ");
6924
6936
  case "subtle":
@@ -6951,7 +6963,15 @@ var getRawSurfaceVariantClasses = (variant, tone, overrides = {}) => {
6951
6963
  return [bgClass ?? "", base].join(" ");
6952
6964
  }
6953
6965
  };
6954
- var getPanelToneStyles = (tone) => currentTheme.panel[tone] ?? currentTheme.panel.neutral;
6966
+ var getPanelToneStyles = (tone = DEFAULT_SURFACE_TONE) => tone === "none" ? {
6967
+ ...currentTheme.panel.neutral,
6968
+ subtleBg: "bg-white dark:bg-neutral-900",
6969
+ tonalBg: "bg-white dark:bg-neutral-900",
6970
+ glassBg: "bg-white/40 dark:bg-neutral-900/20",
6971
+ liquidBg: "bg-white/45 dark:bg-neutral-900/15",
6972
+ decorationShape: "",
6973
+ decorationGradient: ""
6974
+ } : currentTheme.panel[tone] ?? currentTheme.panel.neutral;
6955
6975
  var getSurfaceVariantClasses = (variant, tone, overrides = {}) => getSurfaceTransparencyClasses(getRawSurfaceVariantClasses(variant, tone, overrides), variant, overrides.transparency);
6956
6976
  var getStepperTonePalette = (tone) => currentTheme.stepper[tone] ?? currentTheme.stepper.blue;
6957
6977
  var getBadgeColorClasses = (color2) => currentTheme.badge[color2] ?? currentTheme.badge.blue;
@@ -9225,6 +9245,13 @@ var DE_KIT_CATALOG = {
9225
9245
  // ../common/i18n/builtIn/en.ts
9226
9246
  var EN_KIT_CATALOG = {
9227
9247
  kit: {
9248
+ codeBlock: {
9249
+ code: "Code",
9250
+ edit: "Edit code",
9251
+ copy: "Copy code",
9252
+ copied: "Copied",
9253
+ copyFailed: "Could not copy code. Select and copy it manually."
9254
+ },
9228
9255
  knowledge: {
9229
9256
  "library": "Memory library",
9230
9257
  "map": "Knowledge map",
@@ -12060,6 +12087,7 @@ function hasInteractiveDescendant(root) {
12060
12087
  // src/components/Panel.tsx
12061
12088
  var import_jsx_runtime159 = require("react/jsx-runtime");
12062
12089
  var variantBaseStyles = {
12090
+ none: "",
12063
12091
  elevated: "bg-white shadow-xl ring-1 ring-black/5 dark:bg-neutral-900 dark:ring-white/10",
12064
12092
  // A real 1px border, not a ring. `ring-1` with no ring colour resolves to
12065
12093
  // currentColor, which painted a near-black rule in light mode.
@@ -12077,6 +12105,8 @@ var getPanelEdgeChrome = (variant, tone, glassOpacity = "frosted", vibrancy = "m
12077
12105
  const palette = getPanelToneStyles(tone);
12078
12106
  const chrome = (() => {
12079
12107
  switch (variant) {
12108
+ case "none":
12109
+ return { fill: tone === "none" ? "" : palette.subtleBg, border: "", backdrop: "" };
12080
12110
  case "outlined":
12081
12111
  return {
12082
12112
  fill: "bg-white/90 dark:bg-neutral-900/80",
@@ -12358,6 +12388,8 @@ var Panel = import_react158.default.forwardRef(function Panel2({
12358
12388
  const glassFillClass = getSurfaceGlassFillClass(resolvedTone, glassOpacity);
12359
12389
  const variantClasses = getSurfaceTransparencyClasses((0, import_classnames7.default)((() => {
12360
12390
  switch (variant) {
12391
+ case "none":
12392
+ return resolvedTone === "none" ? "" : palette.subtleBg;
12361
12393
  case "outlined":
12362
12394
  return (0, import_classnames7.default)(
12363
12395
  variantBaseStyles.outlined,
@@ -12898,8 +12930,8 @@ var ActionPanel = import_react159.default.forwardRef(
12898
12930
  }, ref) {
12899
12931
  const renderIcon2 = useIconRenderer();
12900
12932
  const generatedTitleId = (0, import_react159.useId)();
12901
- const resolvedTone = tone ?? color2 ?? "neutral";
12902
- const resolvedAccent = accentColor ?? resolvedTone;
12933
+ const resolvedTone = tone ?? color2 ?? "none";
12934
+ const resolvedAccent = accentColor ?? getSurfaceAccentColor(resolvedTone);
12903
12935
  const palette = getPanelToneStyles(resolvedAccent);
12904
12936
  const surfaceText = getSurfaceTextTokens(variant);
12905
12937
  const sizeTokens12 = SIZE_TOKENS[size] ?? SIZE_TOKENS.sm;
@@ -14149,7 +14181,8 @@ var EmptyState = import_react165.default.forwardRef(
14149
14181
  ...rest
14150
14182
  }, ref) => {
14151
14183
  const titleId = (0, import_react165.useId)();
14152
- const effectiveTone = tone ?? color2 ?? "neutral";
14184
+ const surfaceTone = tone ?? color2 ?? "none";
14185
+ const effectiveTone = getSurfaceAccentColor(surfaceTone);
14153
14186
  const iconTone = iconColor ?? effectiveTone;
14154
14187
  const effectiveSize = size ?? textSize ?? "md";
14155
14188
  const sizeToken = SIZE_STYLES3[effectiveSize] ?? SIZE_STYLES3.md;
@@ -14213,7 +14246,7 @@ var EmptyState = import_react165.default.forwardRef(
14213
14246
  {
14214
14247
  ref,
14215
14248
  variant: effectiveVariant,
14216
- tone: effectiveTone,
14249
+ tone: surfaceTone,
14217
14250
  corner,
14218
14251
  padding,
14219
14252
  fullWidth,
@@ -15359,7 +15392,7 @@ var PanelHero = ({
15359
15392
  children,
15360
15393
  ...rest
15361
15394
  }) => {
15362
- const accent = tone ?? color2 ?? "blue";
15395
+ const accent = getSurfaceAccentColor(tone ?? color2 ?? "none");
15363
15396
  const effectiveCorner = corner ?? (rounded ? DEFAULT_SURFACE_CORNER : "none");
15364
15397
  const showShapes = decoration === "shapes" || decoration === "both";
15365
15398
  const showGradient = decoration === "gradient" || decoration === "both";
@@ -15382,7 +15415,7 @@ var PanelHero = ({
15382
15415
  {
15383
15416
  className: (0, import_classnames22.default)("w-full", className),
15384
15417
  variant,
15385
- tone: accent,
15418
+ tone: tone ?? "none",
15386
15419
  corner: effectiveCorner,
15387
15420
  padding,
15388
15421
  decoration,
@@ -15431,7 +15464,7 @@ var PanelHero = ({
15431
15464
  backgroundImage: `linear-gradient(to bottom right, ${stopFrom}, ${stopTo})`
15432
15465
  },
15433
15466
  "data-variant": "gradient",
15434
- "data-tone": accent,
15467
+ "data-tone": tone ?? "none",
15435
15468
  ...rest,
15436
15469
  children: [
15437
15470
  showShapes && /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_jsx_runtime174.Fragment, { children: [
@@ -19159,7 +19192,7 @@ Combobox.displayName = "Combobox";
19159
19192
  var Combobox_default = Combobox;
19160
19193
 
19161
19194
  // src/components/Picker.tsx
19162
- var import_react185 = require("react");
19195
+ var import_react185 = __toESM(require("react"), 1);
19163
19196
  var import_react_dom5 = require("react-dom");
19164
19197
  var import_classnames38 = __toESM(require("classnames"), 1);
19165
19198
  var import_jsx_runtime191 = require("react/jsx-runtime");
@@ -19234,6 +19267,7 @@ var Picker = ({
19234
19267
  selectedIds: selectedIdsProp,
19235
19268
  onMultiChange,
19236
19269
  maxPillsShown = 3,
19270
+ groupSelectable = false,
19237
19271
  size = "md",
19238
19272
  fullWidth = true,
19239
19273
  fullHeight = false
@@ -19283,10 +19317,21 @@ var Picker = ({
19283
19317
  );
19284
19318
  const filtered = (0, import_react185.useMemo)(() => {
19285
19319
  const q = query.trim().toLowerCase();
19286
- if (!q) return baseItems;
19287
- return baseItems.filter(
19320
+ const matched = !q ? baseItems : baseItems.filter(
19288
19321
  (item) => (item.textValue ?? item.title ?? item.id).toLowerCase().includes(q) || (item.subtitle ?? "").toLowerCase().includes(q) || (item.description ?? "").toLowerCase().includes(q) || (item.tags ?? []).some((t2) => t2.label.toLowerCase().includes(q))
19289
19322
  );
19323
+ if (!matched.some((item) => item.group)) return matched;
19324
+ const order = [];
19325
+ const buckets = /* @__PURE__ */ new Map();
19326
+ for (const item of matched) {
19327
+ const key = item.group ?? "";
19328
+ if (!buckets.has(key)) {
19329
+ buckets.set(key, []);
19330
+ order.push(key);
19331
+ }
19332
+ buckets.get(key).push(item);
19333
+ }
19334
+ return order.flatMap((key) => buckets.get(key));
19290
19335
  }, [baseItems, query]);
19291
19336
  const updatePosition = (0, import_react185.useCallback)(() => {
19292
19337
  if (!open || !triggerRef.current || !dropdownRef.current) return;
@@ -19418,6 +19463,13 @@ var Picker = ({
19418
19463
  setQuery("");
19419
19464
  }
19420
19465
  };
19466
+ const handleToggleGroup = (group) => {
19467
+ const ids = filtered.filter((i) => i.group === group).map((i) => i.id);
19468
+ const allOn = ids.every((id) => effectiveSelectedIds.includes(id));
19469
+ onMultiChange?.(
19470
+ allOn ? effectiveSelectedIds.filter((id) => !ids.includes(id)) : [...effectiveSelectedIds, ...ids.filter((id) => !effectiveSelectedIds.includes(id))]
19471
+ );
19472
+ };
19421
19473
  const handleClearMulti = () => {
19422
19474
  onMultiChange?.([]);
19423
19475
  };
@@ -19595,12 +19647,77 @@ var Picker = ({
19595
19647
  "aria-multiselectable": multi || void 0,
19596
19648
  children: filtered.map((item, index) => {
19597
19649
  const isSelected = effectiveSelectedIds.includes(item.id);
19598
- return (
19599
- // Keyboard lives on the combobox input (arrow keys +
19600
- // Enter move/confirm the aria-activedescendant), so the
19601
- // option row needs no listener of its own; a native
19602
- // <option> cannot carry the rich content rendered here.
19603
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events -- APG combobox-with-list
19650
+ const showHeader = !!item.group && item.group !== filtered[index - 1]?.group;
19651
+ let header = null;
19652
+ if (showHeader) {
19653
+ const g = item.group;
19654
+ const members = filtered.filter((i) => i.group === g);
19655
+ const on = members.filter(
19656
+ (i) => effectiveSelectedIds.includes(i.id)
19657
+ ).length;
19658
+ const state = on === 0 ? "none" : on === members.length ? "all" : "some";
19659
+ const selectable = multi && groupSelectable;
19660
+ const label = /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(import_jsx_runtime191.Fragment, { children: [
19661
+ selectable && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
19662
+ "span",
19663
+ {
19664
+ className: (0, import_classnames38.default)(
19665
+ "flex h-4 w-4 shrink-0 items-center justify-center rounded border transition-colors",
19666
+ state === "none" ? "border-neutral-300 dark:border-neutral-600" : (0, import_classnames38.default)(
19667
+ colorTokens.optionSelectedBg,
19668
+ "border-current",
19669
+ colorTokens.optionSelectedIcon
19670
+ )
19671
+ ),
19672
+ children: state !== "none" && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
19673
+ "svg",
19674
+ {
19675
+ className: "h-3.5 w-3.5",
19676
+ viewBox: "0 0 24 24",
19677
+ fill: "none",
19678
+ stroke: "currentColor",
19679
+ strokeWidth: 2.5,
19680
+ children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
19681
+ "path",
19682
+ {
19683
+ strokeLinecap: "round",
19684
+ strokeLinejoin: "round",
19685
+ d: state === "all" ? "m5 13 4 4L19 7" : "M6 12h12"
19686
+ }
19687
+ )
19688
+ }
19689
+ )
19690
+ }
19691
+ ),
19692
+ /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("span", { className: "flex-1 truncate text-left", children: g }),
19693
+ selectable && /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)("span", { className: "shrink-0 tabular-nums", children: [
19694
+ on,
19695
+ "/",
19696
+ members.length
19697
+ ] })
19698
+ ] });
19699
+ const headerClass = (0, import_classnames38.default)(
19700
+ "flex w-full items-center gap-3 px-4 py-1.5 text-[11px] font-semibold uppercase tracking-wide",
19701
+ popupText.muted
19702
+ );
19703
+ header = /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("li", { role: "presentation", className: "m-0 list-none p-0", children: selectable ? /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
19704
+ "button",
19705
+ {
19706
+ type: "button",
19707
+ role: "checkbox",
19708
+ "aria-checked": state === "all" ? true : state === "some" ? "mixed" : false,
19709
+ onMouseDown: (e) => e.preventDefault(),
19710
+ onClick: () => handleToggleGroup(g),
19711
+ className: (0, import_classnames38.default)(
19712
+ headerClass,
19713
+ "cursor-pointer border-0 bg-transparent hover:bg-neutral-50 dark:hover:bg-neutral-800/60"
19714
+ ),
19715
+ children: label
19716
+ }
19717
+ ) : /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("div", { className: headerClass, children: label }) });
19718
+ }
19719
+ return /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(import_react185.default.Fragment, { children: [
19720
+ header,
19604
19721
  /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(
19605
19722
  "li",
19606
19723
  {
@@ -19733,10 +19850,9 @@ var Picker = ({
19733
19850
  ti
19734
19851
  )) })
19735
19852
  ]
19736
- },
19737
- item.id
19853
+ }
19738
19854
  )
19739
- );
19855
+ ] }, item.id);
19740
19856
  })
19741
19857
  }
19742
19858
  )
@@ -21976,7 +22092,7 @@ function StackCarousel({
21976
22092
  getItemLabel,
21977
22093
  emptyState = "No items to display.",
21978
22094
  variant = "elevated",
21979
- tone = "blue",
22095
+ tone: surfaceTone = "none",
21980
22096
  corner = "auto",
21981
22097
  padding = "sm",
21982
22098
  transparency,
@@ -22221,7 +22337,7 @@ function StackCarousel({
22221
22337
  Panel_default,
22222
22338
  {
22223
22339
  variant,
22224
- tone,
22340
+ tone: surfaceTone,
22225
22341
  corner,
22226
22342
  padding,
22227
22343
  transparency,
@@ -23005,7 +23121,7 @@ var TraceGraph = (0, import_react191.forwardRef)(function TraceGraph2({
23005
23121
  flareSize,
23006
23122
  pulseScale,
23007
23123
  junctionGlowIntensity = 1,
23008
- tone = "blue",
23124
+ tone = "none",
23009
23125
  variant = "outlined",
23010
23126
  corner = "auto",
23011
23127
  padding = "none",
@@ -23314,7 +23430,7 @@ var TraceGraph = (0, import_react191.forwardRef)(function TraceGraph2({
23314
23430
  style: { position: "fixed", zIndex: 100, width: 300, maxWidth: "calc(100vw - 16px)", visibility: "hidden" },
23315
23431
  role: showPopover ? "dialog" : "tooltip",
23316
23432
  "aria-label": overlayNode.label ?? overlayNode.id,
23317
- children: /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(Panel_default, { variant: "elevated", tone: tone === "none" ? "neutral" : tone, corner, padding: "xs", scrollable: false, children: [
23433
+ children: /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(Panel_default, { variant: "elevated", tone, corner, padding: "xs", scrollable: false, children: [
23318
23434
  showPopover && /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("button", { type: "button", className: `${buttonClass} float-right ml-2`, "aria-label": copy("close"), onClick: () => {
23319
23435
  setDetailsOpen(false);
23320
23436
  hostRef.current?.focus();
@@ -23330,7 +23446,7 @@ var TraceGraph = (0, import_react191.forwardRef)(function TraceGraph2({
23330
23446
  {
23331
23447
  ...panelProps,
23332
23448
  variant,
23333
- tone: tone === "none" ? "neutral" : tone,
23449
+ tone,
23334
23450
  backgroundColor: tone === "none" ? "neutral" : panelProps.backgroundColor,
23335
23451
  style: tone === "none" && variant === "simple" ? { borderWidth: 0, boxShadow: "none", ...panelProps.style } : panelProps.style,
23336
23452
  corner,
@@ -24798,7 +24914,7 @@ var FormSection = ({
24798
24914
  className,
24799
24915
  padding = "md",
24800
24916
  variant = "elevated",
24801
- tone = "neutral",
24917
+ tone = "none",
24802
24918
  corner = "rounded-md",
24803
24919
  vibrancy,
24804
24920
  glassOpacity,
@@ -25438,6 +25554,8 @@ var Toolbar = ({
25438
25554
  const palette = getPanelToneStyles(tone);
25439
25555
  const variantClasses = getSurfaceTransparencyClasses((() => {
25440
25556
  switch (variant) {
25557
+ case "none":
25558
+ return tone === "none" ? "" : palette.subtleBg;
25441
25559
  case "outlined":
25442
25560
  return (0, import_classnames53.default)(variantBaseStyles.outlined, palette.outlineBorder);
25443
25561
  case "subtle":
@@ -25503,7 +25621,7 @@ var PageHeader = ({
25503
25621
  children,
25504
25622
  variant = "default",
25505
25623
  accentColor = "blue",
25506
- tone = "neutral",
25624
+ tone = "none",
25507
25625
  glassOpacity,
25508
25626
  transparency,
25509
25627
  vibrancy,
@@ -26521,7 +26639,7 @@ var Chat2 = ({
26521
26639
  renderMessage,
26522
26640
  onEvent,
26523
26641
  variant = "outlined",
26524
- tone = "neutral",
26642
+ tone: surfaceTone = "none",
26525
26643
  padding = "none",
26526
26644
  className = "",
26527
26645
  style,
@@ -26930,7 +27048,7 @@ var Chat2 = ({
26930
27048
  {
26931
27049
  ...rest,
26932
27050
  variant,
26933
- tone,
27051
+ tone: surfaceTone,
26934
27052
  padding,
26935
27053
  className: (0, import_classnames57.default)("relative overflow-hidden", className),
26936
27054
  style: { ...style, height },
@@ -27283,12 +27401,13 @@ var ActivityFeed = ({
27283
27401
  loadMoreLabel = "Load more",
27284
27402
  totalCount,
27285
27403
  variant = "outlined",
27286
- tone = "neutral",
27404
+ tone: surfaceTone = "none",
27287
27405
  padding = "md",
27288
27406
  corner,
27289
27407
  className = "",
27290
27408
  ...rest
27291
27409
  }) => {
27410
+ const tone = getSurfaceAccentColor(surfaceTone);
27292
27411
  const [active, setActive] = (0, import_react202.useState)(defaultFilter);
27293
27412
  const options = (0, import_react202.useMemo)(
27294
27413
  () => [{ label: "All", value: "all" }, ...filters],
@@ -27307,7 +27426,7 @@ var ActivityFeed = ({
27307
27426
  {
27308
27427
  ...rest,
27309
27428
  variant,
27310
- tone,
27429
+ tone: surfaceTone,
27311
27430
  padding,
27312
27431
  corner,
27313
27432
  className: (0, import_classnames58.default)("w-full", className),
@@ -38393,7 +38512,7 @@ var BreakdownCard = ({
38393
38512
  loading = false,
38394
38513
  ctaVariant,
38395
38514
  variant = "outlined",
38396
- tone = "neutral",
38515
+ tone: surfaceTone = "none",
38397
38516
  padding = "md",
38398
38517
  corner,
38399
38518
  className = "",
@@ -38405,7 +38524,7 @@ var BreakdownCard = ({
38405
38524
  {
38406
38525
  ...rest,
38407
38526
  variant,
38408
- tone,
38527
+ tone: surfaceTone,
38409
38528
  padding,
38410
38529
  corner,
38411
38530
  className: (0, import_classnames59.default)("w-full", className),
@@ -38963,7 +39082,7 @@ var InfoRow = (props) => {
38963
39082
  value,
38964
39083
  hideIfEmpty = true,
38965
39084
  variant = "elevated",
38966
- tone = "blue",
39085
+ tone = "none",
38967
39086
  corner = DEFAULT_SURFACE_CORNER,
38968
39087
  loading = false,
38969
39088
  error,
@@ -39004,7 +39123,7 @@ var InfoRow = (props) => {
39004
39123
  {
39005
39124
  ...props,
39006
39125
  normalised,
39007
- rowTone: tone,
39126
+ rowTone: getSurfaceAccentColor(tone),
39008
39127
  rootProps: rest,
39009
39128
  className
39010
39129
  }
@@ -39015,7 +39134,7 @@ var InfoRow = (props) => {
39015
39134
  {
39016
39135
  ...rest,
39017
39136
  variant,
39018
- color: tone,
39137
+ tone,
39019
39138
  corner,
39020
39139
  padding: "none",
39021
39140
  scrollable: false,
@@ -39028,7 +39147,7 @@ var InfoRow = (props) => {
39028
39147
  {
39029
39148
  ...props,
39030
39149
  normalised,
39031
- rowTone: tone,
39150
+ rowTone: getSurfaceAccentColor(tone),
39032
39151
  className: void 0
39033
39152
  }
39034
39153
  )
@@ -39337,7 +39456,7 @@ var PagedPanel = ({
39337
39456
  error,
39338
39457
  emptyState,
39339
39458
  emptyMessage,
39340
- tone = "blue",
39459
+ tone: surfaceTone = "none",
39341
39460
  size = "md",
39342
39461
  page,
39343
39462
  onPageChange,
@@ -39349,6 +39468,7 @@ var PagedPanel = ({
39349
39468
  loadingState,
39350
39469
  ...rest
39351
39470
  }) => {
39471
+ const tone = getSurfaceAccentColor(surfaceTone);
39352
39472
  const t = useKitT();
39353
39473
  const pager = usePager({ count: pages.length, page, onPageChange });
39354
39474
  const { page: current, total } = pager;
@@ -39382,7 +39502,7 @@ var PagedPanel = ({
39382
39502
  Panel_default,
39383
39503
  {
39384
39504
  ...rest,
39385
- tone,
39505
+ tone: surfaceTone,
39386
39506
  padding: "none",
39387
39507
  bodyClassName: total === 0 && !loading ? "h-full" : "",
39388
39508
  className: (0, import_classnames63.default)("relative overflow-hidden", rest.className),
@@ -39885,7 +40005,7 @@ var DetailItemCard = ({
39885
40005
  expanded,
39886
40006
  onToggle,
39887
40007
  variant = "plain",
39888
- tone = "blue",
40008
+ tone: surfaceTone = "none",
39889
40009
  corner = DEFAULT_SURFACE_CORNER,
39890
40010
  padding = "sm",
39891
40011
  glassOpacity,
@@ -39895,6 +40015,7 @@ var DetailItemCard = ({
39895
40015
  className,
39896
40016
  ...rest
39897
40017
  }) => {
40018
+ const tone = getSurfaceAccentColor(surfaceTone);
39898
40019
  const [internalExpanded, setInternalExpanded] = (0, import_react232.useState)(defaultExpanded);
39899
40020
  const isControlled = typeof expanded === "boolean";
39900
40021
  const isExpanded = isControlled ? expanded : internalExpanded;
@@ -39919,7 +40040,7 @@ var DetailItemCard = ({
39919
40040
  Panel_default,
39920
40041
  {
39921
40042
  variant,
39922
- tone,
40043
+ tone: surfaceTone,
39923
40044
  corner,
39924
40045
  padding,
39925
40046
  glassOpacity,
@@ -40240,7 +40361,7 @@ function ScrollBody({
40240
40361
  }
40241
40362
  function InfiniteScrollPanel({
40242
40363
  variant = "plain",
40243
- tone = "blue",
40364
+ tone: surfaceTone = "none",
40244
40365
  corner = DEFAULT_SURFACE_CORNER,
40245
40366
  padding = "none",
40246
40367
  glassOpacity,
@@ -40250,6 +40371,7 @@ function InfiniteScrollPanel({
40250
40371
  className,
40251
40372
  ...rest
40252
40373
  }) {
40374
+ const tone = getSurfaceAccentColor(surfaceTone);
40253
40375
  const body = /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(ScrollBody, { tone, padding, ...rest });
40254
40376
  if (variant === "plain") {
40255
40377
  return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)("div", { className: (0, import_classnames67.default)("h-full min-h-0", className), children: body });
@@ -40258,7 +40380,7 @@ function InfiniteScrollPanel({
40258
40380
  Panel_default,
40259
40381
  {
40260
40382
  variant,
40261
- tone,
40383
+ tone: surfaceTone,
40262
40384
  corner,
40263
40385
  glassOpacity,
40264
40386
  transparency,
@@ -40395,7 +40517,7 @@ var CollapsibleHelpText = ({
40395
40517
  icon = "Help",
40396
40518
  children,
40397
40519
  className,
40398
- tone = "blue",
40520
+ tone = "none",
40399
40521
  variant = "card",
40400
40522
  corner = DEFAULT_SURFACE_CORNER,
40401
40523
  padding = "sm",
@@ -40413,7 +40535,7 @@ var CollapsibleHelpText = ({
40413
40535
  const sanitized = text2?.trim() ?? "";
40414
40536
  const needsTruncation = sanitized.length > maxLength;
40415
40537
  const displayText = expanded || !needsTruncation ? sanitized : truncate(sanitized, maxLength);
40416
- const toneTokens3 = getCollapsibleHelpToneTokens(tone);
40538
+ const toneTokens3 = getCollapsibleHelpToneTokens(getSurfaceAccentColor(tone));
40417
40539
  const bare = variant === "plain";
40418
40540
  const body = /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
40419
40541
  HelpBody,
@@ -40568,6 +40690,7 @@ var HelpButton = ({
40568
40690
  content,
40569
40691
  title,
40570
40692
  placement = "auto",
40693
+ tone = "none",
40571
40694
  color: color2 = "sky",
40572
40695
  variant = "elevated",
40573
40696
  corner = DEFAULT_SURFACE_CORNER,
@@ -40668,7 +40791,7 @@ var HelpButton = ({
40668
40791
  Panel_default,
40669
40792
  {
40670
40793
  variant,
40671
- tone: color2,
40794
+ tone,
40672
40795
  corner,
40673
40796
  padding: "none",
40674
40797
  scrollable: false,
@@ -42249,7 +42372,7 @@ var Popover = ({
42249
42372
  children,
42250
42373
  placement = "auto",
42251
42374
  variant = "elevated",
42252
- tone = "neutral",
42375
+ tone = "none",
42253
42376
  corner = DEFAULT_SURFACE_CORNER,
42254
42377
  padding = "sm",
42255
42378
  maxWidth = 320,
@@ -43680,7 +43803,7 @@ var AccordionBody = ({
43680
43803
  const renderIcon2 = useIconRenderer();
43681
43804
  const surface = useSurfaceText();
43682
43805
  const trigger = getSurfaceTriggerTokens(tone);
43683
- const chip = getPillColorClasses(tone, "soft");
43806
+ const chip = getPillColorClasses(getSurfaceAccentColor(tone), "soft");
43684
43807
  const inset = getSurfacePaddingClass(padding);
43685
43808
  const tokens = SIZE_TOKENS4[size] ?? SIZE_TOKENS4.md;
43686
43809
  const headerRefs = (0, import_react249.useRef)(/* @__PURE__ */ new Map());
@@ -43692,7 +43815,7 @@ var AccordionBody = ({
43692
43815
  dashed: false,
43693
43816
  icon: "ViewRows",
43694
43817
  title: t("kit.accordion.noItemsTitle"),
43695
- tone,
43818
+ tone: getSurfaceAccentColor(tone),
43696
43819
  size
43697
43820
  }
43698
43821
  ) });
@@ -43824,7 +43947,7 @@ var AccordionBody = ({
43824
43947
  item.badge ? /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
43825
43948
  Pill_default,
43826
43949
  {
43827
- tone,
43950
+ tone: getSurfaceAccentColor(tone),
43828
43951
  variant: "soft",
43829
43952
  size: tokens.pill,
43830
43953
  className: "flex-none",
@@ -43911,7 +44034,7 @@ var AccordionBody = ({
43911
44034
  title: t("kit.accordion.loadingTitle"),
43912
44035
  className: "rounded-none",
43913
44036
  size: "md",
43914
- color: tone
44037
+ color: getSurfaceAccentColor(tone)
43915
44038
  }
43916
44039
  ) : null
43917
44040
  ]
@@ -44727,7 +44850,7 @@ var Modal = ({
44727
44850
  container,
44728
44851
  corner = DEFAULT_SURFACE_CORNER,
44729
44852
  variant = "elevated",
44730
- tone = "neutral",
44853
+ tone = "none",
44731
44854
  glassOpacity,
44732
44855
  transparency,
44733
44856
  vibrancy,
@@ -46149,8 +46272,8 @@ var SideMenuCtaCard = ({
46149
46272
  Panel_default,
46150
46273
  {
46151
46274
  className: cta.onDismiss ? "relative" : void 0,
46152
- variant: glass ? "glass" : "outlined",
46153
- tone,
46275
+ variant: cta.variant ?? (glass ? "glass" : "outlined"),
46276
+ tone: cta.surfaceTone ?? "none",
46154
46277
  padding: "sm",
46155
46278
  mediaPlacement: "top",
46156
46279
  media: cta.media,
@@ -46837,7 +46960,7 @@ var SideMenu = ({
46837
46960
  SideMenuDetailPanel,
46838
46961
  {
46839
46962
  items: footerDetails,
46840
- tone: footerDetailsTone ?? color2,
46963
+ tone: footerDetailsTone ?? "none",
46841
46964
  menuTone: color2,
46842
46965
  glass: surface.idleCopy === "glass",
46843
46966
  idleCopy: surface.idleCopy
@@ -47413,7 +47536,7 @@ var SidePanel = ({
47413
47536
  transparency,
47414
47537
  vibrancy,
47415
47538
  specularMode,
47416
- surfaceTone = "neutral",
47539
+ surfaceTone = "none",
47417
47540
  size = "md",
47418
47541
  side = "right",
47419
47542
  overlay = false,
@@ -47441,7 +47564,7 @@ var SidePanel = ({
47441
47564
  );
47442
47565
  const surface = getSidebarSurfaceTokens(
47443
47566
  legacyVariant ? variant : "sidebar",
47444
- surfaceTone
47567
+ getSurfaceAccentColor(surfaceTone)
47445
47568
  );
47446
47569
  const surfaceText = getSidePanelTextTokens(variant);
47447
47570
  const insetValue = inset ?? surface.offset !== "";
@@ -48188,6 +48311,7 @@ var ROW_ICON_VARIANT = "ghost";
48188
48311
  var EDITOR_BUTTON_FOR_SURFACE = {
48189
48312
  // `plain` means "the background is unknown". Glass is the treatment built
48190
48313
  // for exactly that: a frosted backdrop reads on a white page and on a photo.
48314
+ none: "ghost",
48191
48315
  plain: "glass",
48192
48316
  elevated: "outline",
48193
48317
  outlined: "outline",
@@ -48592,7 +48716,7 @@ var SmartGridLayout = ({
48592
48716
  tone,
48593
48717
  editThemeColor,
48594
48718
  variant = "plain",
48595
- surfaceTone = "neutral",
48719
+ surfaceTone = "none",
48596
48720
  size = "md",
48597
48721
  controlVariant,
48598
48722
  readOnly = false,
@@ -51575,6 +51699,7 @@ var import_jsx_runtime273 = require("react/jsx-runtime");
51575
51699
  var import_react263 = require("react");
51576
51700
  var SPLIT_VIEW_LOADERS = ["skeleton", "spinner", "progress"];
51577
51701
  var SEARCH_VARIANT_FOR_SURFACE = {
51702
+ none: "flat",
51578
51703
  elevated: "elevated",
51579
51704
  outlined: "flat",
51580
51705
  subtle: "ghost",
@@ -51663,7 +51788,7 @@ var SplitView = ({
51663
51788
  tone,
51664
51789
  color: color2,
51665
51790
  variant = "elevated",
51666
- surfaceTone = "neutral",
51791
+ surfaceTone = "none",
51667
51792
  searchVariant,
51668
51793
  size = "md",
51669
51794
  showHighlightIndicator = true,
@@ -54092,7 +54217,7 @@ var StatCard = ({
54092
54217
  iconTone,
54093
54218
  trend: trendProp,
54094
54219
  size = "md",
54095
- tone,
54220
+ tone: surfaceTone = "none",
54096
54221
  gradient = false,
54097
54222
  progress: progressProp = false,
54098
54223
  progressType = "spinner",
@@ -54133,6 +54258,7 @@ var StatCard = ({
54133
54258
  children,
54134
54259
  ...rest
54135
54260
  }) => {
54261
+ const tone = getSurfaceAccentColor(surfaceTone);
54136
54262
  const pager = usePager({
54137
54263
  count: pages?.length ?? 0,
54138
54264
  page,
@@ -54201,7 +54327,7 @@ var StatCard = ({
54201
54327
  Panel_default,
54202
54328
  {
54203
54329
  variant,
54204
- tone,
54330
+ tone: surfaceTone,
54205
54331
  corner,
54206
54332
  padding,
54207
54333
  decoration: resolvedDecoration,
@@ -56276,7 +56402,7 @@ var Stepper = ({
56276
56402
  completedStepIds,
56277
56403
  orientation = "horizontal",
56278
56404
  variant = "elevated",
56279
- tone = "neutral",
56405
+ tone: surfaceTone = "none",
56280
56406
  size = "md",
56281
56407
  nodeCorner = "full",
56282
56408
  padding = "md",
@@ -56306,6 +56432,7 @@ var Stepper = ({
56306
56432
  className,
56307
56433
  ...panelRest
56308
56434
  }) => {
56435
+ const tone = getSurfaceAccentColor(surfaceTone);
56309
56436
  const state = useStepper(steps, {
56310
56437
  currentIndex,
56311
56438
  currentStepId,
@@ -56321,7 +56448,7 @@ var Stepper = ({
56321
56448
  {
56322
56449
  className: (0, import_classnames94.default)("w-full", className),
56323
56450
  variant,
56324
- tone,
56451
+ tone: surfaceTone,
56325
56452
  padding,
56326
56453
  corner,
56327
56454
  loaderType: loaderType === "skeleton" ? "spinner" : loaderType,
@@ -57701,7 +57828,7 @@ function TableComponent({
57701
57828
  density = "default",
57702
57829
  bordered = false,
57703
57830
  corner,
57704
- tone = "neutral",
57831
+ tone: surfaceTone = "none",
57705
57832
  panelVariant = "auto",
57706
57833
  panelTone = "auto",
57707
57834
  panelCorner = "auto",
@@ -57766,6 +57893,7 @@ function TableComponent({
57766
57893
  storage,
57767
57894
  color: color2
57768
57895
  }) {
57896
+ const tone = getSurfaceAccentColor(surfaceTone);
57769
57897
  const t = useKitT();
57770
57898
  const uid = (0, import_react276.useId)();
57771
57899
  const getDefaultColumnVisibility = (column) => {
@@ -57795,7 +57923,7 @@ function TableComponent({
57795
57923
  };
57796
57924
  const controlColor = color2 ?? (tone === "neutral" ? "blue" : tone);
57797
57925
  const resolvedPanelVariant = panelVariant === "auto" ? isGlassSurface(variant) ? "default" : variant : panelVariant;
57798
- const resolvedPanelTone = panelTone === "auto" ? tone : panelTone;
57926
+ const resolvedPanelTone = panelTone === "auto" ? surfaceTone : panelTone;
57799
57927
  const resolvedPanelCorner = panelCorner === "auto" ? corner : panelCorner;
57800
57928
  const focusRingClass = `focus-visible:ring-${controlColor}-500 dark:focus-visible:ring-${controlColor}-400`;
57801
57929
  const densityTokens = getTableDensityTokens(density);
@@ -58409,7 +58537,7 @@ function TableComponent({
58409
58537
  Panel_default,
58410
58538
  {
58411
58539
  variant,
58412
- tone,
58540
+ tone: surfaceTone,
58413
58541
  padding: "none",
58414
58542
  corner,
58415
58543
  scrollable: false,
@@ -59424,7 +59552,7 @@ var AccessMatrix = ({
59424
59552
  permissions,
59425
59553
  limit = 5,
59426
59554
  variant = "outlined",
59427
- tone = "neutral",
59555
+ tone: surfaceTone = "none",
59428
59556
  density,
59429
59557
  bordered = false,
59430
59558
  corner,
@@ -59440,6 +59568,7 @@ var AccessMatrix = ({
59440
59568
  loaderProgress,
59441
59569
  emptyState
59442
59570
  }) => {
59571
+ const tone = getSurfaceAccentColor(surfaceTone);
59443
59572
  const [expanded, setExpanded] = (0, import_react277.useState)(false);
59444
59573
  const [collapsedGroups, setCollapsedGroups] = (0, import_react277.useState)(
59445
59574
  /* @__PURE__ */ new Set()
@@ -59569,7 +59698,7 @@ var AccessMatrix = ({
59569
59698
  columns,
59570
59699
  data: rows,
59571
59700
  variant,
59572
- tone,
59701
+ tone: surfaceTone,
59573
59702
  density,
59574
59703
  bordered,
59575
59704
  corner,
@@ -59806,7 +59935,7 @@ var KeyValueArrayField = ({
59806
59935
  disabled = false,
59807
59936
  flagDuplicateKeys = true,
59808
59937
  variant = "outlined",
59809
- tone = "blue",
59938
+ tone: surfaceTone = "none",
59810
59939
  corner = DEFAULT_SURFACE_CORNER,
59811
59940
  padding = "sm",
59812
59941
  glassOpacity,
@@ -59817,6 +59946,7 @@ var KeyValueArrayField = ({
59817
59946
  size = "sm",
59818
59947
  className
59819
59948
  }) => {
59949
+ const tone = getSurfaceAccentColor(surfaceTone);
59820
59950
  const baseId = (0, import_react278.useId)();
59821
59951
  const labelId = `${baseId}-label`;
59822
59952
  const errorId = `${baseId}-error`;
@@ -59913,7 +60043,7 @@ var KeyValueArrayField = ({
59913
60043
  Panel_default,
59914
60044
  {
59915
60045
  variant,
59916
- tone,
60046
+ tone: surfaceTone,
59917
60047
  corner,
59918
60048
  padding,
59919
60049
  glassOpacity,
@@ -60018,7 +60148,7 @@ var DynamicFormField = ({
60018
60148
  isVisible = true,
60019
60149
  size = "md",
60020
60150
  variant = "elevated",
60021
- tone = "blue",
60151
+ tone: surfaceTone = "none",
60022
60152
  corner = DEFAULT_SURFACE_CORNER,
60023
60153
  padding = "md",
60024
60154
  inputVariant = "auto",
@@ -60033,6 +60163,7 @@ var DynamicFormField = ({
60033
60163
  vibrancy,
60034
60164
  specularMode
60035
60165
  }) => {
60166
+ const tone = getSurfaceAccentColor(surfaceTone);
60036
60167
  const t = useKitT();
60037
60168
  const generatedId = (0, import_react279.useId)();
60038
60169
  const resolvedInputVariant = inputVariant === "auto" ? INPUT_VARIANT_FOR_SURFACE[variant] : inputVariant;
@@ -60184,7 +60315,7 @@ var DynamicFormField = ({
60184
60315
  {
60185
60316
  className: (0, import_classnames99.default)("w-full", className),
60186
60317
  variant,
60187
- tone,
60318
+ tone: surfaceTone,
60188
60319
  corner,
60189
60320
  padding,
60190
60321
  glassOpacity,
@@ -60237,6 +60368,7 @@ var NotificationModal = ({
60237
60368
  onSecondaryAction,
60238
60369
  icon,
60239
60370
  tone,
60371
+ surfaceTone = "none",
60240
60372
  size = "sm",
60241
60373
  ...rest
60242
60374
  }) => {
@@ -60258,7 +60390,7 @@ var NotificationModal = ({
60258
60390
  onClose,
60259
60391
  title,
60260
60392
  size,
60261
- tone: resolvedTone,
60393
+ tone: surfaceTone,
60262
60394
  icon: icon ?? config.icon,
60263
60395
  actions: /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)(Modal_default.Actions, { children: [
60264
60396
  secondaryActionLabel && /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
@@ -61039,7 +61171,7 @@ var TimelinePanel = ({
61039
61171
  headerAction,
61040
61172
  items,
61041
61173
  variant = "simple",
61042
- tone = "neutral",
61174
+ tone: surfaceTone = "none",
61043
61175
  padding = "sm",
61044
61176
  corner = "none",
61045
61177
  lineColor,
@@ -61058,6 +61190,7 @@ var TimelinePanel = ({
61058
61190
  glassOpacity,
61059
61191
  specularMode
61060
61192
  }) => {
61193
+ const tone = getSurfaceAccentColor(surfaceTone);
61061
61194
  const isDark = useIsDark();
61062
61195
  const palette = getPanelToneStyles(tone);
61063
61196
  const itemEls = (0, import_react280.useRef)([]);
@@ -61161,7 +61294,7 @@ var TimelinePanel = ({
61161
61294
  Panel_default,
61162
61295
  {
61163
61296
  variant,
61164
- tone,
61297
+ tone: surfaceTone,
61165
61298
  padding,
61166
61299
  corner,
61167
61300
  className,
@@ -61622,6 +61755,7 @@ var connectorVisual = (connector) => {
61622
61755
  };
61623
61756
  var GLASS_RIM2 = "stroke-white/50 dark:stroke-white/10";
61624
61757
  var NODE_SURFACES = {
61758
+ none: () => ({ fill: "fill-transparent", stroke: "stroke-none", effect: "" }),
61625
61759
  elevated: () => ({
61626
61760
  fill: "fill-white dark:fill-neutral-900",
61627
61761
  stroke: "stroke-black/5 dark:stroke-white/10",
@@ -65195,7 +65329,7 @@ var ConnectionFlow = import_react285.default.forwardRef(function ConnectionFlow2
65195
65329
  editMode = false,
65196
65330
  onNodeCreate,
65197
65331
  variant = "outlined",
65198
- tone = "neutral",
65332
+ tone: surfaceTone = "none",
65199
65333
  size = "md",
65200
65334
  corner = DEFAULT_SURFACE_CORNER,
65201
65335
  edgeStyle = "orthogonal",
@@ -65240,6 +65374,7 @@ var ConnectionFlow = import_react285.default.forwardRef(function ConnectionFlow2
65240
65374
  onZoomChange,
65241
65375
  renderNode
65242
65376
  }, ref) {
65377
+ const tone = getSurfaceAccentColor(surfaceTone);
65243
65378
  const editorRef = (0, import_react285.useRef)(null);
65244
65379
  const [editBounds, setEditBounds] = (0, import_react285.useState)(null);
65245
65380
  const onEditBounds = (0, import_react285.useCallback)((next) => setEditBounds(
@@ -65786,7 +65921,7 @@ var ConnectionFlow = import_react285.default.forwardRef(function ConnectionFlow2
65786
65921
  {
65787
65922
  className: (0, import_classnames107.default)("flex min-h-0 w-full min-w-0 flex-col", className),
65788
65923
  variant,
65789
- tone,
65924
+ tone: surfaceTone,
65790
65925
  corner,
65791
65926
  padding: "none",
65792
65927
  flexBody: true,
@@ -68785,7 +68920,7 @@ var resolveLabels = (labelOverrides) => labelOverrides ? {
68785
68920
  } : DEFAULT_LABELS;
68786
68921
  var buildCardProps = ({
68787
68922
  variant = "outlined",
68788
- cardTone = "neutral",
68923
+ cardTone = "none",
68789
68924
  corner = DEFAULT_SURFACE_CORNER,
68790
68925
  glassOpacity = "light",
68791
68926
  vibrancy,
@@ -69635,7 +69770,7 @@ var WorkflowTracker = ({
69635
69770
  customStatuses,
69636
69771
  mutedColor = "neutral",
69637
69772
  variant = "outlined",
69638
- cardTone = "neutral",
69773
+ cardTone = "none",
69639
69774
  translucentSurfaces,
69640
69775
  glassOpacity = "light",
69641
69776
  vibrancy,
@@ -72092,6 +72227,7 @@ function nearestPreset(zoom, presets) {
72092
72227
  }
72093
72228
  var GanttToolbar = ({
72094
72229
  variant = "elevated",
72230
+ tone = "none",
72095
72231
  zoom,
72096
72232
  presets,
72097
72233
  onZoomTo,
@@ -72106,8 +72242,8 @@ var GanttToolbar = ({
72106
72242
  };
72107
72243
  const active = (0, import_react300.useMemo)(() => nearestPreset(zoom, presets), [zoom, presets]);
72108
72244
  const chrome = (0, import_react300.useMemo)(
72109
- () => getSurfaceVariantClasses(variant, "neutral"),
72110
- [variant]
72245
+ () => getSurfaceVariantClasses(variant, tone),
72246
+ [variant, tone]
72111
72247
  );
72112
72248
  return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
72113
72249
  "div",
@@ -72531,6 +72667,7 @@ var Gantt = ({
72531
72667
  height = 520,
72532
72668
  color: color2 = "blue",
72533
72669
  variant = "elevated",
72670
+ tone = "none",
72534
72671
  corner = "rounded-sm",
72535
72672
  padding = "none",
72536
72673
  vibrancy,
@@ -73041,6 +73178,7 @@ var Gantt = ({
73041
73178
  {
73042
73179
  ref: rootRef,
73043
73180
  variant,
73181
+ tone,
73044
73182
  padding,
73045
73183
  corner,
73046
73184
  vibrancy,
@@ -73068,7 +73206,7 @@ var Gantt = ({
73068
73206
  {
73069
73207
  className: (0, import_classnames128.default)(
73070
73208
  "flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",
73071
- getSurfaceVariantClasses(variant, "neutral")
73209
+ getSurfaceVariantClasses(variant, tone)
73072
73210
  ),
73073
73211
  children: icon
73074
73212
  }
@@ -73081,6 +73219,7 @@ var Gantt = ({
73081
73219
  /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("div", { className: "ml-auto shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
73082
73220
  GanttToolbar,
73083
73221
  {
73222
+ tone,
73084
73223
  variant,
73085
73224
  zoom,
73086
73225
  presets: GANTT_ZOOM_PRESETS,
@@ -76791,7 +76930,7 @@ var Terminal = (0, import_react318.forwardRef)(
76791
76930
  style,
76792
76931
  padding = "sm",
76793
76932
  variant = "outlined",
76794
- tone = "neutral",
76933
+ tone = "none",
76795
76934
  ...surface
76796
76935
  }, ref) {
76797
76936
  return /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
@@ -76854,7 +76993,7 @@ var TerminalTabs = (0, import_react319.forwardRef)(
76854
76993
  height = 360,
76855
76994
  style,
76856
76995
  variant = "outlined",
76857
- tone = "neutral",
76996
+ tone: surfaceTone = "none",
76858
76997
  padding = "sm",
76859
76998
  readOnly,
76860
76999
  scheme,
@@ -76866,6 +77005,7 @@ var TerminalTabs = (0, import_react319.forwardRef)(
76866
77005
  emptyState = "No terminal sessions",
76867
77006
  ...surface
76868
77007
  }, ref) {
77008
+ const tone = getSurfaceAccentColor(surfaceTone);
76869
77009
  const prefix = (0, import_react319.useId)();
76870
77010
  const [selected, setSelected] = (0, import_react319.useState)(defaultValue ?? sessions[0]?.id);
76871
77011
  const requested = value ?? selected;
@@ -76886,7 +77026,7 @@ var TerminalTabs = (0, import_react319.forwardRef)(
76886
77026
  ...surface,
76887
77027
  "data-color-scheme": scheme ?? "auto",
76888
77028
  className: (0, import_classnames142.default)(surface.className, scheme === "dark" && "dark"),
76889
- ...{ variant, tone, padding },
77029
+ ...{ variant, tone: surfaceTone, padding },
76890
77030
  flexBody: true,
76891
77031
  scrollable: false,
76892
77032
  style: {
@@ -77173,7 +77313,7 @@ function MenuRow({ item, state, depth }) {
77173
77313
  item.label && /* @__PURE__ */ (0, import_jsx_runtime346.jsx)("div", { className: "px-3 pb-1 pt-3 text-xs font-semibold text-neutral-500 dark:text-neutral-400", children: item.label }),
77174
77314
  item.items && /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(MenuList, { items: item.disabled ? item.items.map((child) => ({ ...child, disabled: true })) : item.items, state, depth, parentLabel: label, grouped: true })
77175
77315
  ] });
77176
- const itemTone2 = item.tone ?? props.itemTone ?? props.tone ?? "neutral";
77316
+ const itemTone2 = getSurfaceAccentColor(item.tone ?? props.itemTone ?? props.tone ?? "none");
77177
77317
  const itemPadding = item.padding ?? props.itemPadding;
77178
77318
  const tokens = getSideMenuItemTokens(itemTone2);
77179
77319
  const checkable = item.type === "checkbox" || item.type === "radio";
@@ -77266,7 +77406,7 @@ function MenuSurface({ state, children, root = false }) {
77266
77406
  Panel_default,
77267
77407
  {
77268
77408
  variant: props.variant ?? "outlined",
77269
- tone: props.tone ?? "neutral",
77409
+ tone: props.tone ?? "none",
77270
77410
  corner: props.corner,
77271
77411
  padding: "none",
77272
77412
  glassOpacity: props.glassOpacity,
@@ -77477,7 +77617,7 @@ function FileUpload({ embedded = false, compact: compact2 = false, value, defaul
77477
77617
  const files = value ?? internal;
77478
77618
  const locked = disabled || loading;
77479
77619
  const labels = { ...defaultLabels, ...overrides };
77480
- const tokens = getSideMenuItemTokens(surface.tone ?? "blue");
77620
+ const tokens = getSideMenuItemTokens(getSurfaceAccentColor(surface.tone ?? "none"));
77481
77621
  const change = (next) => {
77482
77622
  if (value === void 0) setInternal(next);
77483
77623
  onChange?.(next);
@@ -77532,7 +77672,7 @@ function FileUpload({ embedded = false, compact: compact2 = false, value, defaul
77532
77672
  choose(Array.from(event.target.files ?? []));
77533
77673
  event.target.value = "";
77534
77674
  } }),
77535
- /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(Button_default, { size, className: compact2 ? "shrink-0" : void 0, variant: "soft", color: surface.tone ?? "blue", disabled: locked, loading, onClick: () => input.current?.click(), children: labels.browse })
77675
+ /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(Button_default, { size, className: compact2 ? "shrink-0" : void 0, variant: "soft", color: getSurfaceAccentColor(surface.tone ?? "none"), disabled: locked, loading, onClick: () => input.current?.click(), children: labels.browse })
77536
77676
  ]
77537
77677
  }
77538
77678
  ),
@@ -77552,7 +77692,7 @@ function FileUpload({ embedded = false, compact: compact2 = false, value, defaul
77552
77692
  ] }, `${file.name}-${file.lastModified}-${index}`)) }) : !compact2 && /* @__PURE__ */ (0, import_jsx_runtime348.jsx)("p", { className: (0, import_classnames145.default)("mt-3 text-neutral-500", density.detail), role: "status", children: labels.empty }),
77553
77693
  (error || rejections.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime348.jsx)("div", { role: "alert", className: "mt-3 text-xs text-rose-700 dark:text-rose-300", children: error || /* @__PURE__ */ (0, import_jsx_runtime348.jsx)("ul", { children: rejections.map((rejection, i) => /* @__PURE__ */ (0, import_jsx_runtime348.jsx)("li", { children: rejectionMessage?.(rejection) ?? rejection.message }, i)) }) })
77554
77694
  ] });
77555
- return embedded ? /* @__PURE__ */ (0, import_jsx_runtime348.jsx)("div", { className, children: content }) : /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(Panel_default, { ...surface, variant: surface.variant ?? "outlined", tone: surface.tone ?? "neutral", padding: surface.padding ?? "sm", className, children: content });
77695
+ return embedded ? /* @__PURE__ */ (0, import_jsx_runtime348.jsx)("div", { className, children: content }) : /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(Panel_default, { ...surface, variant: surface.variant ?? "outlined", tone: surface.tone ?? "none", padding: surface.padding ?? "sm", className, children: content });
77556
77696
  }
77557
77697
 
77558
77698
  // src/components/IdentityPicker/IdentityPicker.tsx
@@ -77758,7 +77898,7 @@ function IdentityPicker({
77758
77898
  const selected = value === void 0 ? internal : value;
77759
77899
  const labels = { ...defaults, ...overrides };
77760
77900
  const locked = disabled || loading;
77761
- const tone = surface.tone ?? "blue";
77901
+ const tone = getSurfaceAccentColor(surface.tone ?? "none");
77762
77902
  const tokens = getSideMenuItemTokens(tone);
77763
77903
  const automatic = initials(name);
77764
77904
  const change = (next) => {
@@ -77934,12 +78074,13 @@ function ActivePopover({ trigger, content, options }) {
77934
78074
  onOpenChange?.(value);
77935
78075
  }, children: content });
77936
78076
  }
77937
- function DotStepper({ steps, currentIndex, currentStepId, maxVisible = 5, size = "sm", corner = "full", tone = "blue", variant = "tonal", padding = "none", doneColor = "emerald", nextColor = "neutral", errorColor: errorColor2 = "rose", animated = true, disabled = false, onStepSelect, renderActiveContent, popoverProps, className, style, "aria-label": label = "Workflow progress", ...surface }) {
78077
+ function DotStepper({ steps, currentIndex, currentStepId, maxVisible = 5, size = "sm", corner = "full", tone: surfaceTone = "none", variant = "tonal", padding = "none", doneColor = "emerald", nextColor = "neutral", errorColor: errorColor2 = "rose", animated = true, disabled = false, onStepSelect, renderActiveContent, popoverProps, className, style, "aria-label": label = "Workflow progress", ...surface }) {
78078
+ const tone = getSurfaceAccentColor(surfaceTone);
77938
78079
  const plan = planDotSteps(steps, currentIndex, currentStepId, maxVisible);
77939
78080
  const density = sizes[size];
77940
78081
  const fill = (status) => status === "completed" ? getTrueColorDotClass(doneColor) : status === "error" ? getTrueColorDotClass(errorColor2) : status === "active" ? getTrueColorDotClass(tone) : (0, import_classnames147.default)(getTrueColorDotClass(nextColor), "opacity-20 dark:opacity-25");
77941
78082
  const overflow = (side, count) => count > 0 && /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(TooltipWrapper_default, { text: `${count} more steps ${side}`, children: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)("span", { tabIndex: disabled ? -1 : 0, role: "img", "aria-label": `${count} more steps ${side}`, className: (0, import_classnames147.default)("relative inline-flex shrink-0 items-center justify-center rounded-full focus-visible:outline-2 focus-visible:outline-offset-2", density.target), children: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)("span", { "aria-hidden": "true", className: (0, import_classnames147.default)("relative inline-flex items-center", density.stack), children: [0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime350.jsx)("span", { className: (0, import_classnames147.default)("absolute rounded-full", density.dot, fill(overflowStatus(side === "before" ? plan.statuses.slice(0, plan.start) : plan.statuses.slice(plan.end)))), style: { left: index === 0 ? 0 : "35%", transform: "scale(.72)", filter: index === (side === "before" ? 0 : 1) ? "opacity(.55)" : void 0, zIndex: side === "before" ? index : 1 - index } }, index)) }) }) }, side);
77942
- return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(Panel_default, { ...surface, role: "group", "aria-label": label, "aria-disabled": disabled || void 0, variant, tone, corner: corner === "full" ? "none" : corner, padding: "none", className: (0, import_classnames147.default)("align-middle", disabled && "opacity-50", className), style: { width: "max-content", overflow: "visible", ...corner === "full" ? { borderRadius: 9999 } : {}, ...style }, children: /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)("div", { className: (0, import_classnames147.default)("flex w-max items-center", density.gap, getCompactSurfacePaddingClass(padding)), children: [
78083
+ return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(Panel_default, { ...surface, role: "group", "aria-label": label, "aria-disabled": disabled || void 0, variant, tone: surfaceTone, corner: corner === "full" ? "none" : corner, padding: "none", className: (0, import_classnames147.default)("align-middle", disabled && "opacity-50", className), style: { width: "max-content", overflow: "visible", ...corner === "full" ? { borderRadius: 9999 } : {}, ...style }, children: /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)("div", { className: (0, import_classnames147.default)("flex w-max items-center", density.gap, getCompactSurfacePaddingClass(padding)), children: [
77943
78084
  overflow("before", plan.before),
77944
78085
  plan.indices.map((index) => {
77945
78086
  const step = steps[index];
@@ -78068,7 +78209,7 @@ function MemoryCard({
78068
78209
  ] })
78069
78210
  ] })
78070
78211
  ] });
78071
- return /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)(Panel_default, { tone: "neutral", variant: "outlined", padding: "none", disabled, ...surface, className: `kit-knowledge kit-memory-card ${className}`, "data-layout": layout, "data-selected": selected, "data-highlighted": highlighted, children: [
78212
+ return /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)(Panel_default, { tone: "none", variant: "outlined", padding: "none", disabled, ...surface, className: `kit-knowledge kit-memory-card ${className}`, "data-layout": layout, "data-selected": selected, "data-highlighted": highlighted, children: [
78072
78213
  onSelect ? /* @__PURE__ */ (0, import_jsx_runtime352.jsx)("button", { className: "kit-memory-select", type: "button", disabled, "aria-pressed": selected, onClick: () => onSelect(memory), children: body }) : /* @__PURE__ */ (0, import_jsx_runtime352.jsx)("div", { className: "kit-memory-select", children: body }),
78073
78214
  /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(MemoryActionButtons, { memory, disabled, onEdit, onPinChange, onArchive, copy })
78074
78215
  ] });
@@ -78205,7 +78346,7 @@ function MemoryLibrary({
78205
78346
  function changeFilter(key, value) {
78206
78347
  setFilters({ ...filters, [key]: value || void 0 });
78207
78348
  }
78208
- return /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)(Panel_default, { tone: "neutral", variant: "outlined", padding: "none", loading, disabled, ...surface, className: `kit-knowledge kit-memory-library ${className}`, "aria-busy": loading, children: [
78349
+ return /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)(Panel_default, { tone: "none", variant: "outlined", padding: "none", loading, disabled, ...surface, className: `kit-knowledge kit-memory-library ${className}`, "aria-busy": loading, children: [
78209
78350
  /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("div", { className: "kit-knowledge-toolbar", children: [
78210
78351
  /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("label", { className: "kit-knowledge-search", children: [
78211
78352
  /* @__PURE__ */ (0, import_jsx_runtime353.jsx)("span", { children: copy("search") }),
@@ -78270,7 +78411,7 @@ function MemoryDetail({
78270
78411
  ...surface
78271
78412
  }) {
78272
78413
  const copy = useKnowledgeCopy(labels);
78273
- return /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(Panel_default, { tone: "neutral", variant: "outlined", padding: "none", disabled, ...surface, className: `kit-knowledge kit-memory-detail ${className}`, children: !memory ? /* @__PURE__ */ (0, import_jsx_runtime354.jsx)("p", { className: "kit-knowledge-empty", children: copy("selectMemory") }) : /* @__PURE__ */ (0, import_jsx_runtime354.jsxs)("div", { className: "kit-memory-detail-body", children: [
78414
+ return /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(Panel_default, { tone: "none", variant: "outlined", padding: "none", disabled, ...surface, className: `kit-knowledge kit-memory-detail ${className}`, children: !memory ? /* @__PURE__ */ (0, import_jsx_runtime354.jsx)("p", { className: "kit-knowledge-empty", children: copy("selectMemory") }) : /* @__PURE__ */ (0, import_jsx_runtime354.jsxs)("div", { className: "kit-memory-detail-body", children: [
78274
78415
  /* @__PURE__ */ (0, import_jsx_runtime354.jsxs)("div", { className: "kit-memory-meta", children: [
78275
78416
  /* @__PURE__ */ (0, import_jsx_runtime354.jsx)("span", { children: copy(`kinds.${memory.kind}`) }),
78276
78417
  /* @__PURE__ */ (0, import_jsx_runtime354.jsx)("span", { children: copy(`statuses.${memory.status ?? "active"}`) }),
@@ -78520,7 +78661,7 @@ function KnowledgeMap({
78520
78661
  const matches = (0, import_react328.useMemo)(() => scene.points.filter((point) => (!selectedTopic || point.memory.topic === selectedTopic) && `${point.memory.title} ${point.memory.topic ?? ""}`.toLocaleLowerCase().includes(query.toLocaleLowerCase())), [scene, query, selectedTopic]);
78521
78662
  const lastPage = Math.max(0, Math.ceil(matches.length / PAGE_SIZE) - 1), currentPage = Math.min(page, lastPage);
78522
78663
  const selectableRelationships = geometry.edges.filter((edge) => edge.source.memoryId === selection || edge.target.memoryId === selection);
78523
- return /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(Panel_default, { tone: "neutral", variant: "outlined", padding: "none", loading, disabled, ...surface, className: `kit-knowledge kit-knowledge-map ${className}`, "aria-busy": loading, children: [
78664
+ return /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(Panel_default, { tone: "none", variant: "outlined", padding: "none", loading, disabled, ...surface, className: `kit-knowledge kit-knowledge-map ${className}`, "aria-busy": loading, children: [
78524
78665
  /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "kit-knowledge-toolbar", children: [
78525
78666
  /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("strong", { children: copy("map") }),
78526
78667
  /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "kit-knowledge-view", children: [
@@ -78690,7 +78831,7 @@ function KnowledgeExplorer({
78690
78831
  ] });
78691
78832
  return trace && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(TraceGraph, { ...trace, disabled: disabled || trace.disabled, nodes: traceNodes, selectedNodeId: traceId, onNodeSelect: (node) => selectTrace(node?.id ?? null) });
78692
78833
  };
78693
- return /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(Panel_default, { tone: "neutral", variant: "simple", padding: "none", loading, disabled, ...surface, className: `kit-knowledge kit-knowledge-explorer ${className}`, children: [
78834
+ return /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(Panel_default, { tone: "none", variant: "simple", padding: "none", loading, disabled, ...surface, className: `kit-knowledge kit-knowledge-explorer ${className}`, children: [
78694
78835
  /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("div", { className: "kit-knowledge-mobile-nav", role: "group", "aria-label": copy("library"), children: enabled.map((region) => /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("button", { type: "button", "aria-pressed": view === region, onClick: () => setMobileView(region), children: copy(region === "detail" ? "details" : region) }, region)) }),
78695
78836
  /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("div", { className: "kit-knowledge-regions", children: enabled.map((region) => /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("section", { className: `kit-knowledge-region kit-knowledge-region-${region}`, "data-mobile-active": view === region, "aria-label": copy(region === "detail" ? "details" : region), children: content(region) }, region)) })
78696
78837
  ] });
@@ -78752,12 +78893,125 @@ function ContentActions({
78752
78893
  }
78753
78894
  var ContentActions_default = ContentActions;
78754
78895
 
78896
+ // src/components/CodeBlock.tsx
78897
+ var import_react330 = __toESM(require("react"), 1);
78898
+ var import_refractor = require("refractor");
78899
+ var import_tsx = __toESM(require("refractor/tsx"), 1);
78900
+ var import_jsx_runtime358 = require("react/jsx-runtime");
78901
+ import_refractor.refractor.register(import_tsx.default);
78902
+ function tokenRuns(nodes, inherited = "") {
78903
+ return nodes.flatMap((node) => {
78904
+ if (node.type === "text") return [{ text: node.value, className: inherited }];
78905
+ if (node.type !== "element") return [];
78906
+ const classes = node.properties.className;
78907
+ const className = [inherited, Array.isArray(classes) ? classes.join(" ") : String(classes ?? "")].filter(Boolean).join(" ");
78908
+ return tokenRuns(node.children, className);
78909
+ });
78910
+ }
78911
+ function renderLines(runs, numbered, value) {
78912
+ const lines = [[]];
78913
+ let key = 0;
78914
+ for (const run of runs) {
78915
+ run.text.split("\n").forEach((text2, index) => {
78916
+ if (index) lines.push([]);
78917
+ if (text2) lines[lines.length - 1].push(/* @__PURE__ */ (0, import_jsx_runtime358.jsx)("span", { className: run.className || void 0, children: text2 }, key++));
78918
+ });
78919
+ }
78920
+ const digits = String(value.split("\n").length).length;
78921
+ return lines.map((line3, index) => /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)(import_react330.default.Fragment, { children: [
78922
+ index > 0 ? "\n" : null,
78923
+ /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)("span", { className: "ui-code-block-line", children: [
78924
+ numbered && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("span", { className: "ui-code-block-line-number", "aria-hidden": "true", "data-line": index + 1, style: { width: `${digits}ch` } }),
78925
+ /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("span", { className: "ui-code-block-line-text", children: line3 })
78926
+ ] })
78927
+ ] }, index));
78928
+ }
78929
+ function CodeBlock({
78930
+ value,
78931
+ onChange,
78932
+ readOnly = true,
78933
+ language,
78934
+ filename,
78935
+ showTitle = true,
78936
+ showCopy = true,
78937
+ showLineNumbers = false,
78938
+ wrapLines = false,
78939
+ maxHeight,
78940
+ tone = "none",
78941
+ color: color2 = "blue",
78942
+ variant = "subtle",
78943
+ corner = "rounded-md",
78944
+ editorLabel,
78945
+ className,
78946
+ ...rest
78947
+ }) {
78948
+ const t = useKitT();
78949
+ const [copyState, setCopyState] = (0, import_react330.useState)("idle");
78950
+ const timer = (0, import_react330.useRef)(void 0);
78951
+ const generation = (0, import_react330.useRef)(0);
78952
+ (0, import_react330.useEffect)(() => {
78953
+ generation.current++;
78954
+ setCopyState("idle");
78955
+ clearTimeout(timer.current);
78956
+ return () => {
78957
+ generation.current++;
78958
+ clearTimeout(timer.current);
78959
+ };
78960
+ }, [value]);
78961
+ const highlighted = (0, import_react330.useMemo)(() => {
78962
+ if (!readOnly || !language) return [{ text: value, className: "" }];
78963
+ try {
78964
+ return tokenRuns(import_refractor.refractor.highlight(value, language.toLowerCase()).children);
78965
+ } catch {
78966
+ return [{ text: value, className: "" }];
78967
+ }
78968
+ }, [value, language, readOnly]);
78969
+ const copy = async () => {
78970
+ const current = ++generation.current;
78971
+ clearTimeout(timer.current);
78972
+ try {
78973
+ await navigator.clipboard.writeText(value);
78974
+ if (current !== generation.current) return;
78975
+ setCopyState("success");
78976
+ } catch {
78977
+ if (current !== generation.current) return;
78978
+ setCopyState("error");
78979
+ }
78980
+ timer.current = setTimeout(() => setCopyState("idle"), 2e3);
78981
+ };
78982
+ const copyLabel = t(copyState === "success" ? "kit.codeBlock.copied" : "kit.codeBlock.copy");
78983
+ return /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("div", { ...rest, className: ["ui-code-block relative w-full min-w-0", className].filter(Boolean).join(" "), children: /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)(Panel_default, { className: "ui-code-block-surface", tone, variant, corner, padding: "none", bodyClassName: "min-w-0 overflow-hidden", children: [
78984
+ (showTitle || showCopy) && /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)("div", { "data-slot": "code-block-header", className: `relative flex min-w-0 items-center gap-3 px-4 py-2 ${showTitle ? "justify-between border-b border-current/10" : "justify-end"}`, children: [
78985
+ showTitle && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("span", { className: "truncate font-mono text-xs", children: filename || language || t("kit.codeBlock.code") }),
78986
+ showCopy && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(IconButton_default, { icon: copyState === "success" ? "Check" : "CopyClipboard", color: color2, variant: "ghost", size: "xs", srLabel: copyLabel, tooltip: copyLabel, onClick: copy })
78987
+ ] }),
78988
+ /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(
78989
+ ScrollArea_default,
78990
+ {
78991
+ variant: "hover",
78992
+ className: "ui-code-block-scroll",
78993
+ "data-wrap": wrapLines || void 0,
78994
+ style: { maxHeight },
78995
+ tabIndex: readOnly ? 0 : -1,
78996
+ role: "region",
78997
+ "aria-label": filename || t("kit.codeBlock.code"),
78998
+ children: readOnly ? /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("pre", { className: "ui-code-block-source", style: { whiteSpace: wrapLines ? "pre-wrap" : "pre", overflowWrap: wrapLines ? "anywhere" : void 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("code", { className: language ? `language-${language}` : void 0, children: renderLines(highlighted, showLineNumbers, value) }) }) : /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)("div", { className: "ui-code-block-editor-layout", "data-wrap": wrapLines || void 0, children: [
78999
+ /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("pre", { "aria-hidden": "true", className: "ui-code-block-editor-mirror", style: { whiteSpace: wrapLines ? "pre-wrap" : "pre", overflowWrap: wrapLines ? "anywhere" : void 0 }, children: value + "\n" }),
79000
+ /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("textarea", { className: "ui-code-block-editor", "aria-label": editorLabel || t("kit.codeBlock.edit"), value, onChange: (event) => onChange?.(event.target.value), spellCheck: false, autoCapitalize: "off", autoCorrect: "off", wrap: wrapLines ? "soft" : "off" })
79001
+ ] })
79002
+ }
79003
+ ),
79004
+ /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("span", { className: "sr-only", role: "status", children: copyState === "success" ? t("kit.codeBlock.copied") : copyState === "error" ? t("kit.codeBlock.copyFailed") : "" }),
79005
+ copyState === "error" && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("p", { className: "px-4 pb-2 text-xs", children: t("kit.codeBlock.copyFailed") })
79006
+ ] }) });
79007
+ }
79008
+
78755
79009
  // src/contexts/BottomSheetContext.tsx
78756
- var import_react330 = require("react");
79010
+ var import_react331 = require("react");
78757
79011
  var import_react_dom21 = require("react-dom");
78758
79012
  var import_classnames149 = __toESM(require("classnames"), 1);
78759
- var import_jsx_runtime358 = require("react/jsx-runtime");
78760
- var BottomSheetContext = (0, import_react330.createContext)(null);
79013
+ var import_jsx_runtime359 = require("react/jsx-runtime");
79014
+ var BottomSheetContext = (0, import_react331.createContext)(null);
78761
79015
  var TRANSITION_MS2 = 260;
78762
79016
  var renderSlot = (slot, controls) => {
78763
79017
  if (!slot) {
@@ -78768,13 +79022,13 @@ var renderSlot = (slot, controls) => {
78768
79022
  var BottomSheetProvider = ({
78769
79023
  children
78770
79024
  }) => {
78771
- const [sheet, setSheet] = (0, import_react330.useState)(null);
78772
- const [isVisible, setIsVisible] = (0, import_react330.useState)(false);
78773
- const pendingCloseRef = (0, import_react330.useRef)(null);
78774
- const dismissSheet = (0, import_react330.useCallback)(() => {
79025
+ const [sheet, setSheet] = (0, import_react331.useState)(null);
79026
+ const [isVisible, setIsVisible] = (0, import_react331.useState)(false);
79027
+ const pendingCloseRef = (0, import_react331.useRef)(null);
79028
+ const dismissSheet = (0, import_react331.useCallback)(() => {
78775
79029
  setIsVisible(false);
78776
79030
  }, []);
78777
- const presentSheet = (0, import_react330.useCallback)((options) => {
79031
+ const presentSheet = (0, import_react331.useCallback)((options) => {
78778
79032
  if (pendingCloseRef.current) {
78779
79033
  clearTimeout(pendingCloseRef.current);
78780
79034
  pendingCloseRef.current = null;
@@ -78787,7 +79041,7 @@ var BottomSheetProvider = ({
78787
79041
  setTimeout(animateIn, 0);
78788
79042
  }
78789
79043
  }, []);
78790
- (0, import_react330.useEffect)(() => {
79044
+ (0, import_react331.useEffect)(() => {
78791
79045
  if (!isVisible && sheet) {
78792
79046
  pendingCloseRef.current = setTimeout(() => {
78793
79047
  sheet.onClose?.();
@@ -78802,7 +79056,7 @@ var BottomSheetProvider = ({
78802
79056
  }
78803
79057
  return void 0;
78804
79058
  }, [isVisible, sheet]);
78805
- (0, import_react330.useEffect)(
79059
+ (0, import_react331.useEffect)(
78806
79060
  () => () => {
78807
79061
  if (pendingCloseRef.current) {
78808
79062
  clearTimeout(pendingCloseRef.current);
@@ -78810,13 +79064,13 @@ var BottomSheetProvider = ({
78810
79064
  },
78811
79065
  []
78812
79066
  );
78813
- const controls = (0, import_react330.useMemo)(
79067
+ const controls = (0, import_react331.useMemo)(
78814
79068
  () => ({
78815
79069
  dismiss: dismissSheet
78816
79070
  }),
78817
79071
  [dismissSheet]
78818
79072
  );
78819
- const contextValue = (0, import_react330.useMemo)(
79073
+ const contextValue = (0, import_react331.useMemo)(
78820
79074
  () => ({
78821
79075
  presentSheet,
78822
79076
  dismissSheet,
@@ -78826,8 +79080,8 @@ var BottomSheetProvider = ({
78826
79080
  [presentSheet, dismissSheet, sheet, isVisible]
78827
79081
  );
78828
79082
  const overlayNode = typeof document !== "undefined" && sheet ? (0, import_react_dom21.createPortal)(
78829
- /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
78830
- /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(
79083
+ /* @__PURE__ */ (0, import_jsx_runtime359.jsxs)("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
79084
+ /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
78831
79085
  "div",
78832
79086
  {
78833
79087
  className: (0, import_classnames149.default)(
@@ -78840,7 +79094,7 @@ var BottomSheetProvider = ({
78840
79094
  }
78841
79095
  }
78842
79096
  ),
78843
- /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("div", { className: "relative w-full max-w-4xl px-4 pb-4 sm:px-8", children: /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)(
79097
+ /* @__PURE__ */ (0, import_jsx_runtime359.jsx)("div", { className: "relative w-full max-w-4xl px-4 pb-4 sm:px-8", children: /* @__PURE__ */ (0, import_jsx_runtime359.jsxs)(
78844
79098
  "section",
78845
79099
  {
78846
79100
  role: "dialog",
@@ -78852,12 +79106,12 @@ var BottomSheetProvider = ({
78852
79106
  ),
78853
79107
  style: { minHeight: "25vh", maxHeight: "85vh" },
78854
79108
  children: [
78855
- /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)("header", { className: "flex items-start justify-between gap-3 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
78856
- /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)("div", { className: "space-y-1", children: [
78857
- sheet.title && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
78858
- sheet.description && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
79109
+ /* @__PURE__ */ (0, import_jsx_runtime359.jsxs)("header", { className: "flex items-start justify-between gap-3 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
79110
+ /* @__PURE__ */ (0, import_jsx_runtime359.jsxs)("div", { className: "space-y-1", children: [
79111
+ sheet.title && /* @__PURE__ */ (0, import_jsx_runtime359.jsx)("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
79112
+ sheet.description && /* @__PURE__ */ (0, import_jsx_runtime359.jsx)("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
78859
79113
  ] }),
78860
- (sheet.showCloseButton ?? true) && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(
79114
+ (sheet.showCloseButton ?? true) && /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
78861
79115
  IconButton_default,
78862
79116
  {
78863
79117
  icon: "Close",
@@ -78869,21 +79123,21 @@ var BottomSheetProvider = ({
78869
79123
  }
78870
79124
  )
78871
79125
  ] }),
78872
- /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: renderSlot(sheet.content, controls) ?? /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("p", { className: "text-sm text-slate-500", children: "No content provided." }) }),
78873
- sheet.actions && /* @__PURE__ */ (0, import_jsx_runtime358.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) })
79126
+ /* @__PURE__ */ (0, import_jsx_runtime359.jsx)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: renderSlot(sheet.content, controls) ?? /* @__PURE__ */ (0, import_jsx_runtime359.jsx)("p", { className: "text-sm text-slate-500", children: "No content provided." }) }),
79127
+ sheet.actions && /* @__PURE__ */ (0, import_jsx_runtime359.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) })
78874
79128
  ]
78875
79129
  }
78876
79130
  ) })
78877
79131
  ] }),
78878
79132
  document.body
78879
79133
  ) : null;
78880
- return /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)(BottomSheetContext.Provider, { value: contextValue, children: [
79134
+ return /* @__PURE__ */ (0, import_jsx_runtime359.jsxs)(BottomSheetContext.Provider, { value: contextValue, children: [
78881
79135
  children,
78882
79136
  overlayNode
78883
79137
  ] });
78884
79138
  };
78885
79139
  var useBottomSheet = () => {
78886
- const context = (0, import_react330.useContext)(BottomSheetContext);
79140
+ const context = (0, import_react331.useContext)(BottomSheetContext);
78887
79141
  if (!context) {
78888
79142
  throw new Error("useBottomSheet must be used within a BottomSheetProvider");
78889
79143
  }
@@ -79518,7 +79772,7 @@ var SYSTEM_VARIABLES = [
79518
79772
 
79519
79773
  // src/components/MetricBar.tsx
79520
79774
  var import_classnames150 = __toESM(require("classnames"), 1);
79521
- var import_jsx_runtime359 = require("react/jsx-runtime");
79775
+ var import_jsx_runtime360 = require("react/jsx-runtime");
79522
79776
  var MetricBar = ({
79523
79777
  label,
79524
79778
  value,
@@ -79528,7 +79782,7 @@ var MetricBar = ({
79528
79782
  size = "sm",
79529
79783
  className,
79530
79784
  ...rest
79531
- }) => /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
79785
+ }) => /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
79532
79786
  Progress_default,
79533
79787
  {
79534
79788
  ...rest,
@@ -79544,7 +79798,7 @@ var MetricBar = ({
79544
79798
  MetricBar.displayName = "MetricBar";
79545
79799
 
79546
79800
  // src/components/NetworkGraph/NetworkGraph.tsx
79547
- var import_react332 = require("react");
79801
+ var import_react333 = require("react");
79548
79802
 
79549
79803
  // src/components/NetworkGraph/model.ts
79550
79804
  var CELL = 64;
@@ -79688,17 +79942,17 @@ function findNetworkPath(edges, source, target) {
79688
79942
  }
79689
79943
 
79690
79944
  // src/components/NetworkGraph/useNetworkCanvas.ts
79691
- var import_react331 = require("react");
79945
+ var import_react332 = require("react");
79692
79946
  function useNetworkCanvas(options) {
79693
- const canvasRef = (0, import_react331.useRef)(null);
79694
- const view = (0, import_react331.useRef)({ x: 0, y: 0, zoom: 1 });
79695
- const size = (0, import_react331.useRef)({ width: 1, height: 1 });
79696
- const latest = (0, import_react331.useRef)(options);
79697
- const frame = (0, import_react331.useRef)(null);
79698
- const [zoom, setZoom] = (0, import_react331.useState)(1);
79699
- const colors3 = (0, import_react331.useRef)(/* @__PURE__ */ new Map());
79700
- const textColor = (0, import_react331.useRef)("#737373");
79701
- const draw = (0, import_react331.useCallback)(() => {
79947
+ const canvasRef = (0, import_react332.useRef)(null);
79948
+ const view = (0, import_react332.useRef)({ x: 0, y: 0, zoom: 1 });
79949
+ const size = (0, import_react332.useRef)({ width: 1, height: 1 });
79950
+ const latest = (0, import_react332.useRef)(options);
79951
+ const frame = (0, import_react332.useRef)(null);
79952
+ const [zoom, setZoom] = (0, import_react332.useState)(1);
79953
+ const colors3 = (0, import_react332.useRef)(/* @__PURE__ */ new Map());
79954
+ const textColor = (0, import_react332.useRef)("#737373");
79955
+ const draw = (0, import_react332.useCallback)(() => {
79702
79956
  const canvas = canvasRef.current;
79703
79957
  const ctx = canvas?.getContext("2d");
79704
79958
  if (!canvas || !ctx) return;
@@ -79798,14 +80052,14 @@ function useNetworkCanvas(options) {
79798
80052
  }
79799
80053
  ctx.globalAlpha = 1;
79800
80054
  }, []);
79801
- const requestDraw = (0, import_react331.useCallback)(() => {
80055
+ const requestDraw = (0, import_react332.useCallback)(() => {
79802
80056
  if (frame.current !== null) return;
79803
80057
  frame.current = requestAnimationFrame(() => {
79804
80058
  frame.current = null;
79805
80059
  draw();
79806
80060
  });
79807
80061
  }, [draw]);
79808
- const update = (0, import_react331.useCallback)(
80062
+ const update = (0, import_react332.useCallback)(
79809
80063
  (next) => {
79810
80064
  view.current = next;
79811
80065
  setZoom(next.zoom);
@@ -79814,7 +80068,7 @@ function useNetworkCanvas(options) {
79814
80068
  },
79815
80069
  [requestDraw]
79816
80070
  );
79817
- const fit = (0, import_react331.useCallback)(
80071
+ const fit = (0, import_react332.useCallback)(
79818
80072
  () => update(
79819
80073
  fitNetwork(
79820
80074
  latest.current.nodes,
@@ -79824,11 +80078,11 @@ function useNetworkCanvas(options) {
79824
80078
  ),
79825
80079
  [update]
79826
80080
  );
79827
- const zoomBy = (0, import_react331.useCallback)(
80081
+ const zoomBy = (0, import_react332.useCallback)(
79828
80082
  (factor, x = size.current.width / 2, y = size.current.height / 2) => update(zoomAt(view.current, factor, x, y)),
79829
80083
  [update]
79830
80084
  );
79831
- const focusNode = (0, import_react331.useCallback)(
80085
+ const focusNode = (0, import_react332.useCallback)(
79832
80086
  (node) => {
79833
80087
  update({
79834
80088
  ...view.current,
@@ -79838,14 +80092,14 @@ function useNetworkCanvas(options) {
79838
80092
  },
79839
80093
  [update]
79840
80094
  );
79841
- (0, import_react331.useEffect)(() => {
80095
+ (0, import_react332.useEffect)(() => {
79842
80096
  latest.current = options;
79843
80097
  requestDraw();
79844
80098
  }, [options, requestDraw]);
79845
- (0, import_react331.useEffect)(() => {
80099
+ (0, import_react332.useEffect)(() => {
79846
80100
  fit();
79847
80101
  }, [options.model, fit]);
79848
- (0, import_react331.useEffect)(() => {
80102
+ (0, import_react332.useEffect)(() => {
79849
80103
  const canvas = canvasRef.current;
79850
80104
  if (!canvas) return;
79851
80105
  const measure = () => {
@@ -79898,7 +80152,7 @@ function useNetworkCanvas(options) {
79898
80152
  }
79899
80153
 
79900
80154
  // src/components/NetworkGraph/NetworkGraph.tsx
79901
- var import_jsx_runtime360 = require("react/jsx-runtime");
80155
+ var import_jsx_runtime361 = require("react/jsx-runtime");
79902
80156
  var NO_COMMUNITIES = [];
79903
80157
  var NO_HIGHLIGHTS = [];
79904
80158
  function NetworkGraph({
@@ -79922,18 +80176,19 @@ function NetworkGraph({
79922
80176
  ariaLabel,
79923
80177
  emptyMessage,
79924
80178
  onViewportChange,
79925
- tone = "blue",
80179
+ tone: surfaceTone = "none",
79926
80180
  variant = "elevated",
79927
80181
  disabled = false,
79928
80182
  loading = false,
79929
80183
  ...panelProps
79930
80184
  }) {
80185
+ const tone = getSurfaceAccentColor(surfaceTone);
79931
80186
  const t = useKitT();
79932
- const helpId = (0, import_react332.useId)();
79933
- const layoutRef = (0, import_react332.useRef)(null);
79934
- const [hasLegendSpace, setHasLegendSpace] = (0, import_react332.useState)(true);
80187
+ const helpId = (0, import_react333.useId)();
80188
+ const layoutRef = (0, import_react333.useRef)(null);
80189
+ const [hasLegendSpace, setHasLegendSpace] = (0, import_react333.useState)(true);
79935
80190
  const legendOnRight = legendPosition === "right" || legendPosition === "auto" && hasLegendSpace;
79936
- (0, import_react332.useEffect)(() => {
80191
+ (0, import_react333.useEffect)(() => {
79937
80192
  const element = layoutRef.current;
79938
80193
  if (!element || legendPosition !== "auto") return;
79939
80194
  const measure = () => setHasLegendSpace(element.getBoundingClientRect().width >= 600);
@@ -79942,38 +80197,38 @@ function NetworkGraph({
79942
80197
  observer.observe(element);
79943
80198
  return () => observer.disconnect();
79944
80199
  }, [legendPosition, loading]);
79945
- const model = (0, import_react332.useMemo)(
80200
+ const model = (0, import_react333.useMemo)(
79946
80201
  () => buildNetwork(nodes, edges, communities),
79947
80202
  [nodes, edges, communities]
79948
80203
  );
79949
- const [internalSelected, setInternalSelected] = (0, import_react332.useState)(
80204
+ const [internalSelected, setInternalSelected] = (0, import_react333.useState)(
79950
80205
  defaultSelectedNodeId
79951
80206
  );
79952
- const [hidden, setHidden] = (0, import_react332.useState)(() => /* @__PURE__ */ new Set());
79953
- const [focused, setFocused] = (0, import_react332.useState)(null);
79954
- const [query, setQuery] = (0, import_react332.useState)("");
79955
- const enabled = (0, import_react332.useMemo)(
80207
+ const [hidden, setHidden] = (0, import_react333.useState)(() => /* @__PURE__ */ new Set());
80208
+ const [focused, setFocused] = (0, import_react333.useState)(null);
80209
+ const [query, setQuery] = (0, import_react333.useState)("");
80210
+ const enabled = (0, import_react333.useMemo)(
79956
80211
  () => new Set(
79957
80212
  visibleCommunityIds ?? model.groups.filter((g) => !hidden.has(g.id)).map((g) => g.id)
79958
80213
  ),
79959
80214
  [visibleCommunityIds, model, hidden]
79960
80215
  );
79961
- const visibleNodes = (0, import_react332.useMemo)(
80216
+ const visibleNodes = (0, import_react333.useMemo)(
79962
80217
  () => model.nodes.filter((n) => !n.community || enabled.has(n.community)),
79963
80218
  [model, enabled]
79964
80219
  );
79965
- const visible = (0, import_react332.useMemo)(
80220
+ const visible = (0, import_react333.useMemo)(
79966
80221
  () => new Set(visibleNodes.map((n) => n.id)),
79967
80222
  [visibleNodes]
79968
80223
  );
79969
80224
  const selection = selectedNodeId === void 0 ? internalSelected : selectedNodeId;
79970
80225
  const selected = selection !== null && visible.has(selection) ? selection : null;
79971
80226
  const activeFocus = focused !== null && visible.has(focused) ? focused : null;
79972
- const highlighted = (0, import_react332.useMemo)(
80227
+ const highlighted = (0, import_react333.useMemo)(
79973
80228
  () => new Set(highlightedEdgeIds),
79974
80229
  [highlightedEdgeIds]
79975
80230
  );
79976
- const counts = (0, import_react332.useMemo)(() => {
80231
+ const counts = (0, import_react333.useMemo)(() => {
79977
80232
  const result = /* @__PURE__ */ new Map();
79978
80233
  for (const n of model.nodes)
79979
80234
  if (n.community)
@@ -79993,7 +80248,7 @@ function NetworkGraph({
79993
80248
  onViewportChange
79994
80249
  });
79995
80250
  const locked = disabled || loading;
79996
- const drag = (0, import_react332.useRef)(null);
80251
+ const drag = (0, import_react333.useRef)(null);
79997
80252
  const select = (id) => {
79998
80253
  if (locked) return;
79999
80254
  if (selectedNodeId === void 0) setInternalSelected(id);
@@ -80009,7 +80264,7 @@ function NetworkGraph({
80009
80264
  );
80010
80265
  onVisibleCommunitiesChange?.(ids);
80011
80266
  };
80012
- (0, import_react332.useEffect)(() => {
80267
+ (0, import_react333.useEffect)(() => {
80013
80268
  const element = canvas.canvasRef.current;
80014
80269
  if (!element || locked) return;
80015
80270
  const wheel = (event) => {
@@ -80058,13 +80313,13 @@ function NetworkGraph({
80058
80313
  }
80059
80314
  };
80060
80315
  const focusedNode = model.byId.get(activeFocus ?? selected ?? "");
80061
- const matchingNodes = (0, import_react332.useMemo)(() => {
80316
+ const matchingNodes = (0, import_react333.useMemo)(() => {
80062
80317
  const search = query.toLocaleLowerCase();
80063
80318
  return visibleNodes.filter((n) => (n.label ?? n.id).toLocaleLowerCase().includes(search)).slice(0, 50).map((n) => ({ value: n.id, label: n.label ?? n.id }));
80064
80319
  }, [visibleNodes, query]);
80065
80320
  const graphHeight = Number.isFinite(height) ? Math.max(160, height) : 480;
80066
- const resolvedLegendTone = legendTone === "auto" ? tone : legendTone;
80067
- const legendContent = /* @__PURE__ */ (0, import_jsx_runtime360.jsxs)(
80321
+ const resolvedLegendTone = legendTone === "auto" ? surfaceTone : legendTone;
80322
+ const legendContent = /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
80068
80323
  "fieldset",
80069
80324
  {
80070
80325
  disabled: locked,
@@ -80073,24 +80328,24 @@ function NetworkGraph({
80073
80328
  maxHeight: legendPanel ? Math.max(96, graphHeight - 64) : graphHeight
80074
80329
  },
80075
80330
  children: [
80076
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("legend", { className: "mb-3 text-xs font-semibold uppercase tracking-widest", children: t("kit.networkGraph.communities") }),
80077
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
80331
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("legend", { className: "mb-3 text-xs font-semibold uppercase tracking-widest", children: t("kit.networkGraph.communities") }),
80332
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
80078
80333
  Checkbox_default,
80079
80334
  {
80080
80335
  size: "sm",
80081
- tone: resolvedLegendTone,
80336
+ tone: getSurfaceAccentColor(resolvedLegendTone),
80082
80337
  label: t("kit.networkGraph.selectAll"),
80083
80338
  checked: model.groups.every((g) => enabled.has(g.id)),
80084
80339
  indeterminate: model.groups.some((g) => enabled.has(g.id)) && !model.groups.every((g) => enabled.has(g.id)),
80085
80340
  onChange: (event) => filter(event.target.checked ? model.groups.map((g) => g.id) : [])
80086
80341
  }
80087
80342
  ),
80088
- model.groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime360.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
80089
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
80343
+ model.groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
80344
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
80090
80345
  Checkbox_default,
80091
80346
  {
80092
80347
  size: "sm",
80093
- tone: group.tone ?? resolvedLegendTone,
80348
+ tone: group.tone ?? getSurfaceAccentColor(resolvedLegendTone),
80094
80349
  label: group.label,
80095
80350
  checked: enabled.has(group.id),
80096
80351
  onChange: (event) => filter(
@@ -80098,23 +80353,23 @@ function NetworkGraph({
80098
80353
  )
80099
80354
  }
80100
80355
  ),
80101
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("span", { className: "text-xs tabular-nums opacity-60", children: counts.get(group.id) ?? 0 })
80356
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("span", { className: "text-xs tabular-nums opacity-60", children: counts.get(group.id) ?? 0 })
80102
80357
  ] }, group.id))
80103
80358
  ]
80104
80359
  }
80105
80360
  );
80106
- return /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
80361
+ return /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
80107
80362
  Panel_default,
80108
80363
  {
80109
80364
  ...panelProps,
80110
- tone,
80365
+ tone: surfaceTone,
80111
80366
  variant,
80112
80367
  padding: "sm",
80113
80368
  disabled,
80114
80369
  loading,
80115
80370
  clickable: false,
80116
80371
  scrollable: false,
80117
- children: /* @__PURE__ */ (0, import_jsx_runtime360.jsxs)(
80372
+ children: /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
80118
80373
  "div",
80119
80374
  {
80120
80375
  className: "flex min-w-0 flex-col gap-3",
@@ -80122,7 +80377,7 @@ function NetworkGraph({
80122
80377
  "aria-label": ariaLabel ?? t("kit.networkGraph.name"),
80123
80378
  "aria-disabled": locked || void 0,
80124
80379
  children: [
80125
- showControls && /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("div", { className: "min-w-40 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
80380
+ showControls && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("div", { className: "min-w-40 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
80126
80381
  Combobox_default,
80127
80382
  {
80128
80383
  size: "sm",
@@ -80144,7 +80399,7 @@ function NetworkGraph({
80144
80399
  }
80145
80400
  }
80146
80401
  ) }) }),
80147
- /* @__PURE__ */ (0, import_jsx_runtime360.jsxs)(
80402
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
80148
80403
  "div",
80149
80404
  {
80150
80405
  ref: layoutRef,
@@ -80152,13 +80407,13 @@ function NetworkGraph({
80152
80407
  style: { flexDirection: legendOnRight ? "row" : "column" },
80153
80408
  "data-legend-position": legendOnRight ? "right" : "bottom",
80154
80409
  children: [
80155
- /* @__PURE__ */ (0, import_jsx_runtime360.jsxs)(
80410
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
80156
80411
  "div",
80157
80412
  {
80158
80413
  className: "relative min-w-0 flex-1",
80159
80414
  style: { height: graphHeight, minHeight: graphHeight },
80160
80415
  children: [
80161
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
80416
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
80162
80417
  "canvas",
80163
80418
  {
80164
80419
  ref: canvas.canvasRef,
@@ -80227,11 +80482,11 @@ function NetworkGraph({
80227
80482
  }
80228
80483
  }
80229
80484
  ),
80230
- showControls && /* @__PURE__ */ (0, import_jsx_runtime360.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: [
80231
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
80485
+ showControls && /* @__PURE__ */ (0, import_jsx_runtime361.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: [
80486
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
80232
80487
  IconButton_default,
80233
80488
  {
80234
- icon: /* @__PURE__ */ (0, import_jsx_runtime360.jsxs)(
80489
+ icon: /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
80235
80490
  "svg",
80236
80491
  {
80237
80492
  viewBox: "0 0 24 24",
@@ -80242,10 +80497,10 @@ function NetworkGraph({
80242
80497
  strokeLinejoin: "round",
80243
80498
  "aria-hidden": "true",
80244
80499
  children: [
80245
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("path", { d: "M4 9V5a1 1 0 0 1 1-1h4" }),
80246
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("path", { d: "M15 4h4a1 1 0 0 1 1 1v4" }),
80247
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("path", { d: "M20 15v4a1 1 0 0 1-1 1h-4" }),
80248
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("path", { d: "M9 20H5a1 1 0 0 1-1-1v-4" })
80500
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("path", { d: "M4 9V5a1 1 0 0 1 1-1h4" }),
80501
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("path", { d: "M15 4h4a1 1 0 0 1 1 1v4" }),
80502
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("path", { d: "M20 15v4a1 1 0 0 1-1 1h-4" }),
80503
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("path", { d: "M9 20H5a1 1 0 0 1-1-1v-4" })
80249
80504
  ]
80250
80505
  }
80251
80506
  ),
@@ -80258,10 +80513,10 @@ function NetworkGraph({
80258
80513
  onClick: canvas.fit
80259
80514
  }
80260
80515
  ),
80261
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
80516
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
80262
80517
  IconButton_default,
80263
80518
  {
80264
- icon: /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
80519
+ icon: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
80265
80520
  "svg",
80266
80521
  {
80267
80522
  viewBox: "0 0 24 24",
@@ -80270,7 +80525,7 @@ function NetworkGraph({
80270
80525
  strokeWidth: 2,
80271
80526
  strokeLinecap: "round",
80272
80527
  "aria-hidden": "true",
80273
- children: /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("path", { d: "M6 12h12" })
80528
+ children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("path", { d: "M6 12h12" })
80274
80529
  }
80275
80530
  ),
80276
80531
  size: "xs",
@@ -80282,7 +80537,7 @@ function NetworkGraph({
80282
80537
  onClick: () => canvas.zoomBy(0.8)
80283
80538
  }
80284
80539
  ),
80285
- /* @__PURE__ */ (0, import_jsx_runtime360.jsxs)(
80540
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
80286
80541
  "span",
80287
80542
  {
80288
80543
  className: "min-w-[3.5ch] px-1 text-center text-[11px] tabular-nums text-neutral-500 dark:text-neutral-400",
@@ -80293,7 +80548,7 @@ function NetworkGraph({
80293
80548
  ]
80294
80549
  }
80295
80550
  ),
80296
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
80551
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
80297
80552
  IconButton_default,
80298
80553
  {
80299
80554
  icon: "Add",
@@ -80306,7 +80561,7 @@ function NetworkGraph({
80306
80561
  onClick: () => canvas.zoomBy(1.25)
80307
80562
  }
80308
80563
  ),
80309
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
80564
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
80310
80565
  IconButton_default,
80311
80566
  {
80312
80567
  icon: "Reset",
@@ -80324,18 +80579,18 @@ function NetworkGraph({
80324
80579
  }
80325
80580
  )
80326
80581
  ] }),
80327
- !visibleNodes.length && /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center text-sm", children: emptyMessage ?? t("kit.networkGraph.empty") })
80582
+ !visibleNodes.length && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center text-sm", children: emptyMessage ?? t("kit.networkGraph.empty") })
80328
80583
  ]
80329
80584
  }
80330
80585
  ),
80331
- showCommunities && model.groups.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
80586
+ showCommunities && model.groups.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
80332
80587
  "div",
80333
80588
  {
80334
80589
  className: "min-w-0 shrink-0",
80335
80590
  style: {
80336
80591
  width: legendOnRight ? legendPanel ? 224 : 192 : "100%"
80337
80592
  },
80338
- children: legendPanel ? /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
80593
+ children: legendPanel ? /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
80339
80594
  Panel_default,
80340
80595
  {
80341
80596
  variant: legendVariant === "auto" ? variant : legendVariant,
@@ -80354,8 +80609,8 @@ function NetworkGraph({
80354
80609
  ]
80355
80610
  }
80356
80611
  ),
80357
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("p", { id: helpId, className: "text-xs opacity-70", children: t("kit.networkGraph.instructions") }),
80358
- /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
80612
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("p", { id: helpId, className: "text-xs opacity-70", children: t("kit.networkGraph.instructions") }),
80613
+ /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
80359
80614
  "p",
80360
80615
  {
80361
80616
  role: "status",
@@ -80437,6 +80692,7 @@ function NetworkGraph({
80437
80692
  Chart,
80438
80693
  Chat,
80439
80694
  Checkbox,
80695
+ CodeBlock,
80440
80696
  CollapseChevron,
80441
80697
  CollapseToggleButton,
80442
80698
  CollapsibleHelpText,
@@ -80652,6 +80908,7 @@ function NetworkGraph({
80652
80908
  SURFACE_GLASS_RIM,
80653
80909
  SURFACE_GUTTER_AXES,
80654
80910
  SURFACE_PADDINGS,
80911
+ SURFACE_TONES,
80655
80912
  SURFACE_TO_BUTTON_VARIANT,
80656
80913
  SURFACE_TRANSPARENCIES,
80657
80914
  SURFACE_VARIANTS,
@@ -80908,6 +81165,7 @@ function NetworkGraph({
80908
81165
  getStatusSpinnerToneTokens,
80909
81166
  getStatusTokens,
80910
81167
  getStepperTonePalette,
81168
+ getSurfaceAccentColor,
80911
81169
  getSurfaceCornerClass,
80912
81170
  getSurfaceCornerRem,
80913
81171
  getSurfaceGutterClass,