@inf-monkeys-tech/monkeys-design 1.0.49 → 1.0.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  var debounce = require('lodash/debounce.js');
4
4
  var runtime = require('@inf-monkeys-tech/monkeys/runtime');
5
- var React2 = require('react');
5
+ var React4 = require('react');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var DropdownMenu2 = require('@radix-ui/react-dropdown-menu');
8
8
  var tailwindMerge = require('tailwind-merge');
@@ -44,7 +44,7 @@ function _interopNamespace(e) {
44
44
  }
45
45
 
46
46
  var debounce__default = /*#__PURE__*/_interopDefault(debounce);
47
- var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
47
+ var React4__namespace = /*#__PURE__*/_interopNamespace(React4);
48
48
  var DropdownMenu2__namespace = /*#__PURE__*/_interopNamespace(DropdownMenu2);
49
49
  var ContextMenu__namespace = /*#__PURE__*/_interopNamespace(ContextMenu);
50
50
  var Dialog__namespace = /*#__PURE__*/_interopNamespace(Dialog);
@@ -3798,17 +3798,17 @@ var MONKEYS_PROVIDER_CONTEXTS_KEY = /* @__PURE__ */ Symbol.for(
3798
3798
  );
3799
3799
  function createMonkeysProviderContexts() {
3800
3800
  return Object.freeze({
3801
- locale: React2.createContext({
3801
+ locale: React4.createContext({
3802
3802
  ...defaultMonkeysLocale,
3803
3803
  provided: false
3804
3804
  }),
3805
- theme: React2.createContext({
3805
+ theme: React4.createContext({
3806
3806
  provided: false
3807
3807
  }),
3808
- direction: React2.createContext({
3808
+ direction: React4.createContext({
3809
3809
  provided: false
3810
3810
  }),
3811
- environment: React2.createContext({
3811
+ environment: React4.createContext({
3812
3812
  provided: false,
3813
3813
  environment: EMPTY_ENVIRONMENT,
3814
3814
  portal: EMPTY_PORTAL
@@ -3844,49 +3844,49 @@ function mergeAppearance(inherited, explicit) {
3844
3844
  };
3845
3845
  }
3846
3846
  function useMonkeysLocale() {
3847
- return React2.useContext(MonkeysLocaleContext);
3847
+ return React4.useContext(MonkeysLocaleContext);
3848
3848
  }
3849
3849
  function useMonkeysLocaleMessages() {
3850
- return React2.useContext(MonkeysLocaleContext).messages;
3850
+ return React4.useContext(MonkeysLocaleContext).messages;
3851
3851
  }
3852
3852
  function useMonkeysResolvedTheme() {
3853
- return React2.useContext(MonkeysThemeContext).resolvedTheme;
3853
+ return React4.useContext(MonkeysThemeContext).resolvedTheme;
3854
3854
  }
3855
3855
  function useMonkeysBaseAppearance(explicit) {
3856
- const inherited = React2.useContext(MonkeysThemeContext).baseAppearance;
3857
- return React2.useMemo(
3856
+ const inherited = React4.useContext(MonkeysThemeContext).baseAppearance;
3857
+ return React4.useMemo(
3858
3858
  () => mergeAppearance(inherited, explicit),
3859
3859
  [explicit, inherited]
3860
3860
  );
3861
3861
  }
3862
3862
  function useMonkeysDataExplorerAppearance(explicit) {
3863
- const inherited = React2.useContext(MonkeysThemeContext).dataExplorerAppearance;
3864
- return React2.useMemo(
3863
+ const inherited = React4.useContext(MonkeysThemeContext).dataExplorerAppearance;
3864
+ return React4.useMemo(
3865
3865
  () => mergeAppearance(inherited, explicit),
3866
3866
  [explicit, inherited]
3867
3867
  );
3868
3868
  }
3869
3869
  function useMonkeysStatusStates() {
3870
- return React2.useContext(MonkeysThemeContext).statusStates ?? {};
3870
+ return React4.useContext(MonkeysThemeContext).statusStates ?? {};
3871
3871
  }
3872
3872
  function useMonkeysListFooter() {
3873
- return React2.useContext(MonkeysThemeContext).listFooter ?? {};
3873
+ return React4.useContext(MonkeysThemeContext).listFooter ?? {};
3874
3874
  }
3875
3875
  function useMonkeysDirection() {
3876
- return React2.useContext(MonkeysDirectionContext).direction;
3876
+ return React4.useContext(MonkeysDirectionContext).direction;
3877
3877
  }
3878
3878
  function useMonkeysEnvironment() {
3879
- return React2.useContext(MonkeysEnvironmentContext).environment;
3879
+ return React4.useContext(MonkeysEnvironmentContext).environment;
3880
3880
  }
3881
3881
  function useMonkeysPortalOptions() {
3882
- return React2.useContext(MonkeysEnvironmentContext).portal;
3882
+ return React4.useContext(MonkeysEnvironmentContext).portal;
3883
3883
  }
3884
3884
  function useMonkeysComponentAttributes() {
3885
- const locale = React2.useContext(MonkeysLocaleContext);
3886
- const theme = React2.useContext(MonkeysThemeContext);
3887
- const direction = React2.useContext(MonkeysDirectionContext);
3885
+ const locale = React4.useContext(MonkeysLocaleContext);
3886
+ const theme = React4.useContext(MonkeysThemeContext);
3887
+ const direction = React4.useContext(MonkeysDirectionContext);
3888
3888
  const providerActive = locale.provided || theme.provided || direction.provided;
3889
- return React2.useMemo(
3889
+ return React4.useMemo(
3890
3890
  () => providerActive ? {
3891
3891
  dir: direction.direction,
3892
3892
  "data-monkeys-direction": direction.direction,
@@ -3961,22 +3961,22 @@ function MonkeysProvider({
3961
3961
  statusStates,
3962
3962
  listFooter
3963
3963
  }) {
3964
- const parentLocale = React2.useContext(MonkeysLocaleContext);
3965
- const parentTheme = React2.useContext(MonkeysThemeContext);
3966
- const parentDirection = React2.useContext(MonkeysDirectionContext);
3967
- const parentEnvironment = React2.useContext(MonkeysEnvironmentContext);
3964
+ const parentLocale = React4.useContext(MonkeysLocaleContext);
3965
+ const parentTheme = React4.useContext(MonkeysThemeContext);
3966
+ const parentDirection = React4.useContext(MonkeysDirectionContext);
3967
+ const parentEnvironment = React4.useContext(MonkeysEnvironmentContext);
3968
3968
  validateDirection(direction);
3969
3969
  validateEnvironment(environment);
3970
3970
  validatePortal(portal);
3971
- const resolvedLocale = React2.useMemo(
3971
+ const resolvedLocale = React4.useMemo(
3972
3972
  () => resolveMonkeysLocale(locale, messages, parentLocale),
3973
3973
  [locale, messages, parentLocale]
3974
3974
  );
3975
- const localeValue = React2.useMemo(
3975
+ const localeValue = React4.useMemo(
3976
3976
  () => ({ ...resolvedLocale, provided: true }),
3977
3977
  [resolvedLocale]
3978
3978
  );
3979
- const resolvedTheme = React2.useMemo(
3979
+ const resolvedTheme = React4.useMemo(
3980
3980
  () => resolveProviderTheme(
3981
3981
  theme,
3982
3982
  colorMode,
@@ -3985,7 +3985,7 @@ function MonkeysProvider({
3985
3985
  ),
3986
3986
  [colorMode, density, parentTheme.resolvedTheme, theme]
3987
3987
  );
3988
- const themeValue = React2.useMemo(
3988
+ const themeValue = React4.useMemo(
3989
3989
  () => ({
3990
3990
  provided: true,
3991
3991
  resolvedTheme,
@@ -4044,14 +4044,14 @@ function MonkeysProvider({
4044
4044
  themeId
4045
4045
  ]
4046
4046
  );
4047
- const directionValue = React2.useMemo(
4047
+ const directionValue = React4.useMemo(
4048
4048
  () => ({
4049
4049
  provided: true,
4050
4050
  direction: direction ?? parentDirection.direction ?? "ltr"
4051
4051
  }),
4052
4052
  [direction, parentDirection.direction]
4053
4053
  );
4054
- const environmentValue = React2.useMemo(
4054
+ const environmentValue = React4.useMemo(
4055
4055
  () => ({
4056
4056
  provided: true,
4057
4057
  environment: {
@@ -5768,7 +5768,7 @@ function getDomIdFragments(items) {
5768
5768
  return fragment;
5769
5769
  });
5770
5770
  }
5771
- var BaseAccordion = React2.forwardRef(
5771
+ var BaseAccordion = React4.forwardRef(
5772
5772
  function BaseAccordion2({
5773
5773
  items = [],
5774
5774
  value,
@@ -5795,19 +5795,19 @@ var BaseAccordion = React2.forwardRef(
5795
5795
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
5796
5796
  const componentAttributes = useMonkeysComponentAttributes();
5797
5797
  const theme = resolveBaseAppearance(resolvedAppearance);
5798
- const generatedId = React2.useId();
5798
+ const generatedId = React4.useId();
5799
5799
  const rootId = id ?? generatedId;
5800
- const [uncontrolledValue, setUncontrolledValue] = React2.useState(defaultValue);
5801
- const [focusedValue, setFocusedValue] = React2.useState();
5802
- const triggerRefs = React2.useRef(/* @__PURE__ */ new Map());
5803
- const ownsTriggerFocusRef = React2.useRef(false);
5800
+ const [uncontrolledValue, setUncontrolledValue] = React4.useState(defaultValue);
5801
+ const [focusedValue, setFocusedValue] = React4.useState();
5802
+ const triggerRefs = React4.useRef(/* @__PURE__ */ new Map());
5803
+ const ownsTriggerFocusRef = React4.useRef(false);
5804
5804
  const isControlled = value !== void 0;
5805
5805
  const openValue = isControlled ? value : uncontrolledValue;
5806
5806
  const idFragments = getDomIdFragments(items);
5807
5807
  const enabledItems = items.filter((item) => !item.disabled);
5808
5808
  const openItem = items.find((item) => item.value === openValue);
5809
5809
  const layerDirection = typeof accordionProps.dir === "string" ? accordionProps.dir : componentAttributes.dir;
5810
- React2.useEffect(() => {
5810
+ React4.useEffect(() => {
5811
5811
  if (!ownsTriggerFocusRef.current || focusedValue === void 0) return;
5812
5812
  const focusedItem = items.find((item) => item.value === focusedValue);
5813
5813
  if (focusedItem && !focusedItem.disabled) return;
@@ -5902,7 +5902,7 @@ var BaseAccordion = React2.forwardRef(
5902
5902
  const panelId = `${rootId}-${itemId}-panel`;
5903
5903
  const open = item.value === openValue;
5904
5904
  const state = open ? "open" : "closed";
5905
- return /* @__PURE__ */ React2.createElement(
5905
+ return /* @__PURE__ */ React4.createElement(
5906
5906
  "div",
5907
5907
  {
5908
5908
  ...componentAttributes,
@@ -6007,7 +6007,7 @@ function getInitials(name) {
6007
6007
  if (!words.length) return void 0;
6008
6008
  return words.slice(0, 2).map((word) => word[0]?.toUpperCase()).join("");
6009
6009
  }
6010
- var BaseAvatar = React2.forwardRef(
6010
+ var BaseAvatar = React4.forwardRef(
6011
6011
  function BaseAvatar2({
6012
6012
  src,
6013
6013
  alt,
@@ -6030,14 +6030,14 @@ var BaseAvatar = React2.forwardRef(
6030
6030
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
6031
6031
  const componentAttributes = useMonkeysComponentAttributes();
6032
6032
  const theme = resolveBaseAppearance(resolvedAppearance);
6033
- const [failedSrc, setFailedSrc] = React2.useState();
6033
+ const [failedSrc, setFailedSrc] = React4.useState();
6034
6034
  const imageFailed = Boolean(src && failedSrc === src);
6035
6035
  const showImage = Boolean(src) && !imageFailed;
6036
6036
  const generatedInitials = getInitials(name);
6037
6037
  const fallbackKind = hasRenderableNode(children) ? "children" : hasRenderableNode(initials) ? "initials" : hasRenderableNode(generatedInitials) ? "name" : hasRenderableNode(icon) ? "icon" : "default";
6038
6038
  const fallback = hasRenderableNode(children) ? children : hasRenderableNode(initials) ? initials : hasRenderableNode(generatedInitials) ? generatedInitials : hasRenderableNode(icon) ? icon : "?";
6039
6039
  const statusKind = isStatusPreset(status) ? status : hasRenderableNode(status) ? "custom" : void 0;
6040
- React2.useEffect(() => {
6040
+ React4.useEffect(() => {
6041
6041
  setFailedSrc(void 0);
6042
6042
  }, [src]);
6043
6043
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -6124,7 +6124,7 @@ function resolveAspectRatio(value) {
6124
6124
  }
6125
6125
  return String(value);
6126
6126
  }
6127
- var BaseAspectRatio = React2.forwardRef(function BaseAspectRatio2({
6127
+ var BaseAspectRatio = React4.forwardRef(function BaseAspectRatio2({
6128
6128
  children,
6129
6129
  ratio = 16 / 9,
6130
6130
  appearance,
@@ -6155,7 +6155,7 @@ var BaseAspectRatio = React2.forwardRef(function BaseAspectRatio2({
6155
6155
  }
6156
6156
  );
6157
6157
  });
6158
- var BaseBadge = React2.forwardRef(
6158
+ var BaseBadge = React4.forwardRef(
6159
6159
  function BaseBadge2({
6160
6160
  children,
6161
6161
  label,
@@ -6368,7 +6368,7 @@ function LoadingIcon() {
6368
6368
  }
6369
6369
  );
6370
6370
  }
6371
- var BaseButton = React2.forwardRef(
6371
+ var BaseButton = React4.forwardRef(
6372
6372
  function BaseButton2({
6373
6373
  children,
6374
6374
  label,
@@ -6562,17 +6562,17 @@ function resolveBaseFieldValidationResult(result) {
6562
6562
  "BaseField validate must return a non-empty error string or null."
6563
6563
  );
6564
6564
  }
6565
- var BaseFieldContext = React2.createContext(
6565
+ var BaseFieldContext = React4.createContext(
6566
6566
  null
6567
6567
  );
6568
6568
  function useBaseFieldControl() {
6569
- const context = React2.useContext(BaseFieldContext);
6570
- const controlKeyRef = React2.useRef(null);
6569
+ const context = React4.useContext(BaseFieldContext);
6570
+ const controlKeyRef = React4.useRef(null);
6571
6571
  if (controlKeyRef.current === null) {
6572
6572
  controlKeyRef.current = /* @__PURE__ */ Symbol("BaseFieldControl");
6573
6573
  }
6574
6574
  const registerControl = context?.registerControl;
6575
- React2.useEffect(() => {
6575
+ React4.useEffect(() => {
6576
6576
  if (!registerControl || controlKeyRef.current === null) return void 0;
6577
6577
  return registerControl(controlKeyRef.current);
6578
6578
  }, [registerControl]);
@@ -6580,11 +6580,11 @@ function useBaseFieldControl() {
6580
6580
  const notifyChange = context?.notifyChange;
6581
6581
  return {
6582
6582
  invalid: context?.invalid ?? false,
6583
- notifyBlur: React2.useCallback(
6583
+ notifyBlur: React4.useCallback(
6584
6584
  (value) => notifyBlur?.(value),
6585
6585
  [notifyBlur]
6586
6586
  ),
6587
- notifyChange: React2.useCallback(
6587
+ notifyChange: React4.useCallback(
6588
6588
  (value) => notifyChange?.(value),
6589
6589
  [notifyChange]
6590
6590
  )
@@ -6610,7 +6610,7 @@ function setRefs(element, ...refs) {
6610
6610
  ref.current = element;
6611
6611
  }
6612
6612
  }
6613
- var BaseCheckbox = React2.forwardRef(
6613
+ var BaseCheckbox = React4.forwardRef(
6614
6614
  function BaseCheckbox2({
6615
6615
  label,
6616
6616
  description,
@@ -6650,17 +6650,17 @@ var BaseCheckbox = React2.forwardRef(
6650
6650
  const resolvedInvalid = invalid || fieldControl.invalid;
6651
6651
  const hasLabel = hasRenderableNode(label);
6652
6652
  const hasDescription = hasNonEmptyRenderableNode(description);
6653
- const inputRef = React2.useRef(null);
6654
- const indeterminateRef = React2.useRef(indeterminate);
6653
+ const inputRef = React4.useRef(null);
6654
+ const indeterminateRef = React4.useRef(indeterminate);
6655
6655
  indeterminateRef.current = indeterminate;
6656
- const [uncontrolledChecked, setUncontrolledChecked] = React2.useState(
6656
+ const [uncontrolledChecked, setUncontrolledChecked] = React4.useState(
6657
6657
  defaultChecked ?? false
6658
6658
  );
6659
6659
  const isControlled = checked !== void 0;
6660
6660
  const resolvedChecked = Boolean(isControlled ? checked : uncontrolledChecked);
6661
6661
  const active = indeterminate || resolvedChecked;
6662
6662
  const state = indeterminate ? "mixed" : resolvedChecked ? "checked" : "unchecked";
6663
- const setInputRef = React2.useCallback(
6663
+ const setInputRef = React4.useCallback(
6664
6664
  (element) => {
6665
6665
  inputRef.current = element;
6666
6666
  if (element) element.indeterminate = indeterminateRef.current;
@@ -6668,7 +6668,7 @@ var BaseCheckbox = React2.forwardRef(
6668
6668
  },
6669
6669
  [forwardedRef]
6670
6670
  );
6671
- React2.useEffect(() => {
6671
+ React4.useEffect(() => {
6672
6672
  if (inputRef.current) {
6673
6673
  inputRef.current.indeterminate = indeterminate;
6674
6674
  }
@@ -6799,7 +6799,7 @@ var BaseCheckbox = React2.forwardRef(
6799
6799
  );
6800
6800
  }
6801
6801
  );
6802
- var BaseCode = React2.forwardRef(function BaseCode2({
6802
+ var BaseCode = React4.forwardRef(function BaseCode2({
6803
6803
  children,
6804
6804
  display = "inline",
6805
6805
  appearance,
@@ -6863,7 +6863,7 @@ var BaseCode = React2.forwardRef(function BaseCode2({
6863
6863
  }
6864
6864
  );
6865
6865
  });
6866
- var BaseContainer = React2.forwardRef(
6866
+ var BaseContainer = React4.forwardRef(
6867
6867
  function BaseContainer2({
6868
6868
  children,
6869
6869
  maxWidth = "80rem",
@@ -6950,8 +6950,8 @@ function resolveBasePortalContainer({
6950
6950
  function BasePortal(props) {
6951
6951
  const environment = useMonkeysEnvironment();
6952
6952
  const portalOptions = useMonkeysPortalOptions();
6953
- const [mounted, setMounted] = React2.useState(false);
6954
- React2.useEffect(() => {
6953
+ const [mounted, setMounted] = React4.useState(false);
6954
+ React4.useEffect(() => {
6955
6955
  setMounted(true);
6956
6956
  }, []);
6957
6957
  if (props.disabled !== void 0 && typeof props.disabled !== "boolean") {
@@ -7021,8 +7021,8 @@ function getDefaultDocument() {
7021
7021
  function useBaseOverlayPortal(options = {}) {
7022
7022
  const environment = useMonkeysEnvironment();
7023
7023
  const portalOptions = useMonkeysPortalOptions();
7024
- const [mounted, setMounted] = React2.useState(false);
7025
- React2.useEffect(() => {
7024
+ const [mounted, setMounted] = React4.useState(false);
7025
+ React4.useEffect(() => {
7026
7026
  setMounted(true);
7027
7027
  }, []);
7028
7028
  return resolveBaseOverlayPortalState({
@@ -7175,7 +7175,7 @@ function BaseContextMenu({
7175
7175
  }
7176
7176
  );
7177
7177
  }
7178
- var BaseContextMenuTrigger = React2.forwardRef(function BaseContextMenuTrigger2({
7178
+ var BaseContextMenuTrigger = React4.forwardRef(function BaseContextMenuTrigger2({
7179
7179
  children,
7180
7180
  disabled = false,
7181
7181
  asChild = false,
@@ -7210,7 +7210,7 @@ var BaseContextMenuTrigger = React2.forwardRef(function BaseContextMenuTrigger2(
7210
7210
  }
7211
7211
  );
7212
7212
  });
7213
- var BaseContextMenuContent = React2.forwardRef(function BaseContextMenuContent2({
7213
+ var BaseContextMenuContent = React4.forwardRef(function BaseContextMenuContent2({
7214
7214
  children,
7215
7215
  appearance,
7216
7216
  className,
@@ -7240,7 +7240,7 @@ var BaseContextMenuContent = React2.forwardRef(function BaseContextMenuContent2(
7240
7240
  );
7241
7241
  return portal.shouldPortal ? /* @__PURE__ */ jsxRuntime.jsx(ContextMenu__namespace.Portal, { ...portal.radixPortalProps, children: content }) : content;
7242
7242
  });
7243
- var BaseContextMenuLabel = React2.forwardRef(function BaseContextMenuLabel2({ children, appearance, className, style, ...labelProps }, ref) {
7243
+ var BaseContextMenuLabel = React4.forwardRef(function BaseContextMenuLabel2({ children, appearance, className, style, ...labelProps }, ref) {
7244
7244
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
7245
7245
  const componentAttributes = useMonkeysComponentAttributes();
7246
7246
  const theme = resolveBaseAppearance(resolvedAppearance);
@@ -7258,7 +7258,7 @@ var BaseContextMenuLabel = React2.forwardRef(function BaseContextMenuLabel2({ ch
7258
7258
  }
7259
7259
  );
7260
7260
  });
7261
- var BaseContextMenuSeparator = React2.forwardRef(function BaseContextMenuSeparator2({ appearance, className, style, ...separatorProps }, ref) {
7261
+ var BaseContextMenuSeparator = React4.forwardRef(function BaseContextMenuSeparator2({ appearance, className, style, ...separatorProps }, ref) {
7262
7262
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
7263
7263
  const componentAttributes = useMonkeysComponentAttributes();
7264
7264
  const theme = resolveBaseAppearance(resolvedAppearance);
@@ -7275,7 +7275,7 @@ var BaseContextMenuSeparator = React2.forwardRef(function BaseContextMenuSeparat
7275
7275
  }
7276
7276
  );
7277
7277
  });
7278
- var BaseContextMenuItem = React2.forwardRef(function BaseContextMenuItem2({
7278
+ var BaseContextMenuItem = React4.forwardRef(function BaseContextMenuItem2({
7279
7279
  children,
7280
7280
  label,
7281
7281
  icon,
@@ -7341,7 +7341,7 @@ var BaseContextMenuItem = React2.forwardRef(function BaseContextMenuItem2({
7341
7341
  }
7342
7342
  );
7343
7343
  });
7344
- var BaseContextMenuCheckboxItem = React2.forwardRef(function BaseContextMenuCheckboxItem2({
7344
+ var BaseContextMenuCheckboxItem = React4.forwardRef(function BaseContextMenuCheckboxItem2({
7345
7345
  children,
7346
7346
  label,
7347
7347
  icon,
@@ -7436,7 +7436,7 @@ function BaseContextMenuRadioGroup({
7436
7436
  }) {
7437
7437
  return /* @__PURE__ */ jsxRuntime.jsx(ContextMenu__namespace.RadioGroup, { value, onValueChange, children });
7438
7438
  }
7439
- var BaseContextMenuRadioItem = React2.forwardRef(function BaseContextMenuRadioItem2({
7439
+ var BaseContextMenuRadioItem = React4.forwardRef(function BaseContextMenuRadioItem2({
7440
7440
  children,
7441
7441
  label,
7442
7442
  icon,
@@ -7534,7 +7534,7 @@ function BaseContextMenuSub({
7534
7534
  }
7535
7535
  );
7536
7536
  }
7537
- var BaseContextMenuSubTrigger = React2.forwardRef(function BaseContextMenuSubTrigger2({
7537
+ var BaseContextMenuSubTrigger = React4.forwardRef(function BaseContextMenuSubTrigger2({
7538
7538
  children,
7539
7539
  label,
7540
7540
  icon,
@@ -7617,7 +7617,7 @@ var BaseContextMenuSubTrigger = React2.forwardRef(function BaseContextMenuSubTri
7617
7617
  }
7618
7618
  );
7619
7619
  });
7620
- var BaseContextMenuSubContent = React2.forwardRef(function BaseContextMenuSubContent2({
7620
+ var BaseContextMenuSubContent = React4.forwardRef(function BaseContextMenuSubContent2({
7621
7621
  children,
7622
7622
  appearance,
7623
7623
  className,
@@ -7773,7 +7773,7 @@ function renderTrigger({
7773
7773
  }
7774
7774
  );
7775
7775
  }
7776
- var BaseDialog = React2.forwardRef(
7776
+ var BaseDialog = React4.forwardRef(
7777
7777
  function BaseDialog2({
7778
7778
  open,
7779
7779
  defaultOpen = false,
@@ -7831,9 +7831,9 @@ var BaseDialog = React2.forwardRef(
7831
7831
  const resolvedCloseLabel = closeLabel === void 0 ? messages.close : closeLabel;
7832
7832
  const theme = resolveBaseAppearance(resolvedAppearance);
7833
7833
  const overlayPortal = useBaseOverlayPortal({ disabled: !portal });
7834
- const [uncontrolledOpen, setUncontrolledOpen] = React2.useState(defaultOpen);
7835
- const panelRef = React2.useRef(null);
7836
- const returnFocusRef = React2.useRef(null);
7834
+ const [uncontrolledOpen, setUncontrolledOpen] = React4.useState(defaultOpen);
7835
+ const panelRef = React4.useRef(null);
7836
+ const returnFocusRef = React4.useRef(null);
7837
7837
  const isControlled = open !== void 0;
7838
7838
  const isOpen = isControlled ? open : uncontrolledOpen;
7839
7839
  const portalState = portal && overlayPortal.shouldPortal ? "portaled" : "inline";
@@ -7851,7 +7851,7 @@ var BaseDialog = React2.forwardRef(
7851
7851
  }
7852
7852
  onOpenChange?.(nextOpen);
7853
7853
  };
7854
- React2.useEffect(() => {
7854
+ React4.useEffect(() => {
7855
7855
  if (!isOpen || !keepMounted) return void 0;
7856
7856
  const panel = panelRef.current;
7857
7857
  const ownerDocument = panel?.ownerDocument;
@@ -8128,7 +8128,7 @@ var BaseDialog = React2.forwardRef(
8128
8128
  );
8129
8129
  }
8130
8130
  );
8131
- var BaseDivider = React2.forwardRef(
8131
+ var BaseDivider = React4.forwardRef(
8132
8132
  function BaseDivider2({
8133
8133
  orientation = "horizontal",
8134
8134
  label,
@@ -8323,7 +8323,7 @@ function renderTrigger2({
8323
8323
  }
8324
8324
  );
8325
8325
  }
8326
- var BaseDropdownMenu = React2.forwardRef(function BaseDropdownMenu2({
8326
+ var BaseDropdownMenu = React4.forwardRef(function BaseDropdownMenu2({
8327
8327
  items = [],
8328
8328
  label,
8329
8329
  trigger,
@@ -8360,7 +8360,7 @@ var BaseDropdownMenu = React2.forwardRef(function BaseDropdownMenu2({
8360
8360
  const messages = useMonkeysLocaleMessages().dropdownMenu;
8361
8361
  const theme = resolveBaseAppearance(resolvedAppearance);
8362
8362
  const overlayPortal = useBaseOverlayPortal({ disabled: !portal });
8363
- const [uncontrolledOpen, setUncontrolledOpen] = React2.useState(defaultOpen);
8363
+ const [uncontrolledOpen, setUncontrolledOpen] = React4.useState(defaultOpen);
8364
8364
  const isControlled = open !== void 0;
8365
8365
  const isOpen = isControlled ? open : uncontrolledOpen;
8366
8366
  const resolvedTriggerLabel = triggerLabel === void 0 ? messages.actions : triggerLabel;
@@ -8609,7 +8609,7 @@ function DefaultEmptyIcon() {
8609
8609
  }
8610
8610
  );
8611
8611
  }
8612
- var BaseEmptyState = React2.forwardRef(
8612
+ var BaseEmptyState = React4.forwardRef(
8613
8613
  function BaseEmptyState2({
8614
8614
  icon = /* @__PURE__ */ jsxRuntime.jsx(DefaultEmptyIcon, {}),
8615
8615
  title,
@@ -8708,7 +8708,7 @@ function resolveOptionalId(value, fallback, name) {
8708
8708
  }
8709
8709
  return value;
8710
8710
  }
8711
- var BaseField = React2.forwardRef(
8711
+ var BaseField = React4.forwardRef(
8712
8712
  function BaseField2({
8713
8713
  label,
8714
8714
  description,
@@ -8745,33 +8745,33 @@ var BaseField = React2.forwardRef(
8745
8745
  'BaseField validationMode must be "onBlur" or "onChange".'
8746
8746
  );
8747
8747
  }
8748
- const generatedId = React2.useId();
8748
+ const generatedId = React4.useId();
8749
8749
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
8750
8750
  const componentAttributes = useMonkeysComponentAttributes();
8751
8751
  const theme = resolveBaseAppearance(resolvedAppearance);
8752
8752
  const hasDescription = hasRenderableNode(description);
8753
- const [internalError, setInternalError] = React2.useState(null);
8754
- const registeredControlsRef = React2.useRef(/* @__PURE__ */ new Set());
8755
- const validateRef = React2.useRef(validate);
8756
- const validationModeRef = React2.useRef(validationMode);
8757
- const disabledRef = React2.useRef(disabled);
8753
+ const [internalError, setInternalError] = React4.useState(null);
8754
+ const registeredControlsRef = React4.useRef(/* @__PURE__ */ new Set());
8755
+ const validateRef = React4.useRef(validate);
8756
+ const validationModeRef = React4.useRef(validationMode);
8757
+ const disabledRef = React4.useRef(disabled);
8758
8758
  validateRef.current = validate;
8759
8759
  validationModeRef.current = validationMode;
8760
8760
  disabledRef.current = disabled;
8761
8761
  const hasValidator = validate !== void 0;
8762
- React2.useEffect(() => {
8762
+ React4.useEffect(() => {
8763
8763
  if (!hasValidator || disabled) {
8764
8764
  setInternalError(null);
8765
8765
  }
8766
8766
  }, [disabled, hasValidator]);
8767
- React2.useEffect(() => {
8767
+ React4.useEffect(() => {
8768
8768
  if (hasValidator && registeredControlsRef.current.size !== 1) {
8769
8769
  throw new TypeError(
8770
8770
  "BaseField with validate must contain exactly one compatible Base control."
8771
8771
  );
8772
8772
  }
8773
8773
  }, [hasValidator]);
8774
- const registerControl = React2.useCallback((controlKey) => {
8774
+ const registerControl = React4.useCallback((controlKey) => {
8775
8775
  const registeredControls = registeredControlsRef.current;
8776
8776
  if (validateRef.current !== void 0 && !registeredControls.has(controlKey) && registeredControls.size > 0) {
8777
8777
  throw new TypeError(
@@ -8783,7 +8783,7 @@ var BaseField = React2.forwardRef(
8783
8783
  registeredControls.delete(controlKey);
8784
8784
  };
8785
8785
  }, []);
8786
- const runValidation = React2.useCallback(
8786
+ const runValidation = React4.useCallback(
8787
8787
  (mode, value) => {
8788
8788
  const currentValidate = validateRef.current;
8789
8789
  if (disabledRef.current || currentValidate === void 0 || validationModeRef.current !== mode) {
@@ -8798,11 +8798,11 @@ var BaseField = React2.forwardRef(
8798
8798
  },
8799
8799
  []
8800
8800
  );
8801
- const notifyBlur = React2.useCallback(
8801
+ const notifyBlur = React4.useCallback(
8802
8802
  (value) => runValidation("onBlur", value),
8803
8803
  [runValidation]
8804
8804
  );
8805
- const notifyChange = React2.useCallback(
8805
+ const notifyChange = React4.useCallback(
8806
8806
  (value) => runValidation("onChange", value),
8807
8807
  [runValidation]
8808
8808
  );
@@ -8832,7 +8832,7 @@ var BaseField = React2.forwardRef(
8832
8832
  disabled: disabled || void 0
8833
8833
  };
8834
8834
  const renderedChildren = typeof children === "function" ? children(controlProps) : children;
8835
- const fieldContextValue = React2.useMemo(
8835
+ const fieldContextValue = React4.useMemo(
8836
8836
  () => ({
8837
8837
  invalid: hasError,
8838
8838
  registerControl,
@@ -8952,7 +8952,7 @@ function resolveOptionalId2(value, fallback, name) {
8952
8952
  }
8953
8953
  return value;
8954
8954
  }
8955
- var BaseFieldset = React2.forwardRef(
8955
+ var BaseFieldset = React4.forwardRef(
8956
8956
  function BaseFieldset2({
8957
8957
  children,
8958
8958
  legend,
@@ -8969,7 +8969,7 @@ var BaseFieldset = React2.forwardRef(
8969
8969
  "aria-errormessage": ariaErrorMessage,
8970
8970
  ...fieldsetProps
8971
8971
  }, ref) {
8972
- const generatedId = React2.useId();
8972
+ const generatedId = React4.useId();
8973
8973
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
8974
8974
  const componentAttributes = useMonkeysComponentAttributes();
8975
8975
  const theme = resolveBaseAppearance(resolvedAppearance);
@@ -9053,7 +9053,7 @@ var BaseFieldset = React2.forwardRef(
9053
9053
  function isHeadingLevel(value) {
9054
9054
  return typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= 6;
9055
9055
  }
9056
- var BaseHeading = React2.forwardRef(
9056
+ var BaseHeading = React4.forwardRef(
9057
9057
  function BaseHeading2({
9058
9058
  level = 2,
9059
9059
  children,
@@ -9071,7 +9071,7 @@ var BaseHeading = React2.forwardRef(
9071
9071
  if (!isHeadingLevel(level)) {
9072
9072
  throw new RangeError("BaseHeading level must be an integer from 1 to 6.");
9073
9073
  }
9074
- return React2.createElement(
9074
+ return React4.createElement(
9075
9075
  `h${level}`,
9076
9076
  {
9077
9077
  ...componentAttributes,
@@ -9098,7 +9098,7 @@ var BaseHeading = React2.forwardRef(
9098
9098
  );
9099
9099
  }
9100
9100
  );
9101
- var BaseGrid = React2.forwardRef(
9101
+ var BaseGrid = React4.forwardRef(
9102
9102
  function BaseGrid2({
9103
9103
  children,
9104
9104
  columns = 1,
@@ -9145,7 +9145,7 @@ var controlSizeClassNames = {
9145
9145
  md: "h-9 px-3 text-sm",
9146
9146
  lg: "h-10 px-3.5 text-base"
9147
9147
  };
9148
- var BaseInput = React2.forwardRef(
9148
+ var BaseInput = React4.forwardRef(
9149
9149
  function BaseInput2({
9150
9150
  icon,
9151
9151
  trailing,
@@ -9254,7 +9254,7 @@ var BaseInput = React2.forwardRef(
9254
9254
  );
9255
9255
  }
9256
9256
  );
9257
- var BaseInputGroup = React2.forwardRef(function BaseInputGroup2({
9257
+ var BaseInputGroup = React4.forwardRef(function BaseInputGroup2({
9258
9258
  children,
9259
9259
  startElement,
9260
9260
  endElement,
@@ -9371,7 +9371,7 @@ var BaseInputGroup = React2.forwardRef(function BaseInputGroup2({
9371
9371
  }
9372
9372
  );
9373
9373
  });
9374
- var BaseInline = React2.forwardRef(
9374
+ var BaseInline = React4.forwardRef(
9375
9375
  function BaseInline2({
9376
9376
  children,
9377
9377
  gap,
@@ -9416,7 +9416,7 @@ var BaseInline = React2.forwardRef(
9416
9416
  );
9417
9417
  }
9418
9418
  );
9419
- var BaseKbd = React2.forwardRef(function BaseKbd2({
9419
+ var BaseKbd = React4.forwardRef(function BaseKbd2({
9420
9420
  children,
9421
9421
  appearance,
9422
9422
  className,
@@ -9534,7 +9534,7 @@ function setPointerCaptureIfAvailable(target, pointerId) {
9534
9534
  throw error;
9535
9535
  }
9536
9536
  }
9537
- var BaseLayout = React2.forwardRef(
9537
+ var BaseLayout = React4.forwardRef(
9538
9538
  function BaseLayout2({
9539
9539
  header,
9540
9540
  sidebar,
@@ -9664,7 +9664,7 @@ var BaseLayout = React2.forwardRef(
9664
9664
  );
9665
9665
  }
9666
9666
  );
9667
- var BaseLayoutPane = React2.forwardRef(
9667
+ var BaseLayoutPane = React4.forwardRef(
9668
9668
  function BaseLayoutPane2({
9669
9669
  as = "div",
9670
9670
  scrollable = false,
@@ -9712,7 +9712,7 @@ var BaseLayoutPane = React2.forwardRef(
9712
9712
  );
9713
9713
  }
9714
9714
  );
9715
- var BaseLayoutResizeHandle = React2.forwardRef(function BaseLayoutResizeHandle2({
9715
+ var BaseLayoutResizeHandle = React4.forwardRef(function BaseLayoutResizeHandle2({
9716
9716
  orientation = "horizontal",
9717
9717
  resizable = false,
9718
9718
  disabled = false,
@@ -9794,7 +9794,7 @@ var BaseLayoutResizeHandle = React2.forwardRef(function BaseLayoutResizeHandle2(
9794
9794
  }
9795
9795
  );
9796
9796
  });
9797
- var BaseLayoutSplit = React2.forwardRef(
9797
+ var BaseLayoutSplit = React4.forwardRef(
9798
9798
  function BaseLayoutSplit2({
9799
9799
  orientation = "horizontal",
9800
9800
  primary,
@@ -9830,9 +9830,9 @@ var BaseLayoutSplit = React2.forwardRef(
9830
9830
  bounds.min,
9831
9831
  bounds.max
9832
9832
  );
9833
- const [uncontrolledSize, setUncontrolledSize] = React2.useState(initialSize);
9834
- const rootRef = React2.useRef(null);
9835
- const cleanupRef = React2.useRef(null);
9833
+ const [uncontrolledSize, setUncontrolledSize] = React4.useState(initialSize);
9834
+ const rootRef = React4.useRef(null);
9835
+ const cleanupRef = React4.useRef(null);
9836
9836
  const controlled = size !== void 0;
9837
9837
  const interactive = resizable && !disabled;
9838
9838
  const renderedSize = resolveSplitSize(
@@ -9843,14 +9843,14 @@ var BaseLayoutSplit = React2.forwardRef(
9843
9843
  bounds.max
9844
9844
  );
9845
9845
  const resolvedDirection = splitProps.dir ?? componentAttributes.dir;
9846
- const setRootRef = React2.useCallback(
9846
+ const setRootRef = React4.useCallback(
9847
9847
  (node) => {
9848
9848
  rootRef.current = node;
9849
9849
  assignRef(ref, node);
9850
9850
  },
9851
9851
  [ref]
9852
9852
  );
9853
- const commitSize = React2.useCallback(
9853
+ const commitSize = React4.useCallback(
9854
9854
  (nextSize) => {
9855
9855
  const clampedSize = clamp(nextSize, bounds.min, bounds.max);
9856
9856
  if (!controlled) {
@@ -9860,7 +9860,7 @@ var BaseLayoutSplit = React2.forwardRef(
9860
9860
  },
9861
9861
  [bounds.max, bounds.min, controlled, onSizeChange]
9862
9862
  );
9863
- const updateFromPointer = React2.useCallback(
9863
+ const updateFromPointer = React4.useCallback(
9864
9864
  (event) => {
9865
9865
  const root = rootRef.current;
9866
9866
  if (!root) return;
@@ -9872,12 +9872,12 @@ var BaseLayoutSplit = React2.forwardRef(
9872
9872
  },
9873
9873
  [commitSize, orientation]
9874
9874
  );
9875
- const stopResize = React2.useCallback(() => {
9875
+ const stopResize = React4.useCallback(() => {
9876
9876
  const cleanup = cleanupRef.current;
9877
9877
  cleanupRef.current = null;
9878
9878
  cleanup?.();
9879
9879
  }, []);
9880
- React2.useEffect(() => {
9880
+ React4.useEffect(() => {
9881
9881
  if (!interactive) stopResize();
9882
9882
  return stopResize;
9883
9883
  }, [interactive, stopResize]);
@@ -10027,7 +10027,7 @@ var variantClassNames = {
10027
10027
  block: "h-24 w-full",
10028
10028
  circle: "aspect-square h-10 rounded-full"
10029
10029
  };
10030
- var BaseSkeleton = React2.forwardRef(
10030
+ var BaseSkeleton = React4.forwardRef(
10031
10031
  function BaseSkeleton2({
10032
10032
  variant = "line",
10033
10033
  animated = true,
@@ -10107,7 +10107,7 @@ function DefaultLoadingIcon({ className }) {
10107
10107
  }
10108
10108
  );
10109
10109
  }
10110
- var BaseLoadingState = React2.forwardRef(function BaseLoadingState2({
10110
+ var BaseLoadingState = React4.forwardRef(function BaseLoadingState2({
10111
10111
  icon,
10112
10112
  title,
10113
10113
  description,
@@ -10200,7 +10200,7 @@ var BaseLoadingState = React2.forwardRef(function BaseLoadingState2({
10200
10200
  }
10201
10201
  );
10202
10202
  });
10203
- var BaseLink = React2.forwardRef(
10203
+ var BaseLink = React4.forwardRef(
10204
10204
  function BaseLink2({
10205
10205
  children,
10206
10206
  size = "md",
@@ -10240,7 +10240,7 @@ var BaseLink = React2.forwardRef(
10240
10240
  );
10241
10241
  }
10242
10242
  );
10243
- var BaseList = React2.forwardRef(function BaseList2({
10243
+ var BaseList = React4.forwardRef(function BaseList2({
10244
10244
  ordered = false,
10245
10245
  marker = "auto",
10246
10246
  spacing = "default",
@@ -10277,7 +10277,7 @@ var BaseList = React2.forwardRef(function BaseList2({
10277
10277
  };
10278
10278
  return ordered ? /* @__PURE__ */ jsxRuntime.jsx("ol", { ...sharedProps, ref }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { ...sharedProps, ref });
10279
10279
  });
10280
- var BaseListItem = React2.forwardRef(
10280
+ var BaseListItem = React4.forwardRef(
10281
10281
  function BaseListItem2({
10282
10282
  children,
10283
10283
  appearance,
@@ -10412,7 +10412,7 @@ function getOptionText(option) {
10412
10412
  function toDomId2(value) {
10413
10413
  return value.replace(/[^a-zA-Z0-9_-]/g, "-");
10414
10414
  }
10415
- var BaseMultiSelect = React2.forwardRef(
10415
+ var BaseMultiSelect = React4.forwardRef(
10416
10416
  function BaseMultiSelect2({
10417
10417
  options,
10418
10418
  value,
@@ -10454,46 +10454,46 @@ var BaseMultiSelect = React2.forwardRef(
10454
10454
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
10455
10455
  const componentAttributes = useMonkeysComponentAttributes();
10456
10456
  const theme = resolveBaseAppearance(resolvedAppearance);
10457
- const generatedId = React2.useId();
10457
+ const generatedId = React4.useId();
10458
10458
  const multiSelectId = id ?? generatedId;
10459
10459
  const controlId = `${multiSelectId}-control`;
10460
10460
  const listboxId = `${multiSelectId}-listbox`;
10461
- const rootRef = React2.useRef(null);
10462
- const controlRef = React2.useRef(null);
10463
- const composingRef = React2.useRef(false);
10464
- const typeaheadBufferRef = React2.useRef("");
10465
- const typeaheadTimerRef = React2.useRef(null);
10461
+ const rootRef = React4.useRef(null);
10462
+ const controlRef = React4.useRef(null);
10463
+ const composingRef = React4.useRef(false);
10464
+ const typeaheadBufferRef = React4.useRef("");
10465
+ const typeaheadTimerRef = React4.useRef(null);
10466
10466
  const optionList = options ?? [];
10467
10467
  const optionIds = optionList.map(
10468
10468
  (option, index) => `${multiSelectId}-option-${index}-${toDomId2(option.value)}`
10469
10469
  );
10470
10470
  const forceOpen = openForPreview;
10471
- const [uncontrolledOpen, setUncontrolledOpen] = React2.useState(false);
10471
+ const [uncontrolledOpen, setUncontrolledOpen] = React4.useState(false);
10472
10472
  const open = forceOpen || uncontrolledOpen;
10473
- const initialDefaultValueRef = React2.useRef(normalizeValues(defaultValue));
10474
- const [uncontrolledValue, setUncontrolledValue] = React2.useState(() => [
10473
+ const initialDefaultValueRef = React4.useRef(normalizeValues(defaultValue));
10474
+ const [uncontrolledValue, setUncontrolledValue] = React4.useState(() => [
10475
10475
  ...initialDefaultValueRef.current
10476
10476
  ]);
10477
- const [activeIndex, setActiveIndex] = React2.useState(
10477
+ const [activeIndex, setActiveIndex] = React4.useState(
10478
10478
  () => getBoundaryEnabledIndex(optionList, "first")
10479
10479
  );
10480
10480
  const isControlled = value !== void 0;
10481
- const selectedValues = React2.useMemo(
10481
+ const selectedValues = React4.useMemo(
10482
10482
  () => normalizeValues(isControlled ? value : uncontrolledValue),
10483
10483
  [isControlled, uncontrolledValue, value]
10484
10484
  );
10485
- const selectedValueSet = React2.useMemo(
10485
+ const selectedValueSet = React4.useMemo(
10486
10486
  () => new Set(selectedValues),
10487
10487
  [selectedValues]
10488
10488
  );
10489
- const optionByValue = React2.useMemo(() => {
10489
+ const optionByValue = React4.useMemo(() => {
10490
10490
  const map = /* @__PURE__ */ new Map();
10491
10491
  optionList.forEach((option) => {
10492
10492
  if (!map.has(option.value)) map.set(option.value, option);
10493
10493
  });
10494
10494
  return map;
10495
10495
  }, [optionList]);
10496
- const selectedOptions = React2.useMemo(
10496
+ const selectedOptions = React4.useMemo(
10497
10497
  () => selectedValues.map((selectedValue) => optionByValue.get(selectedValue)).filter(
10498
10498
  (option) => option !== void 0
10499
10499
  ),
@@ -10623,7 +10623,7 @@ var BaseMultiSelect = React2.forwardRef(
10623
10623
  handleTypeahead(event, event.key);
10624
10624
  }
10625
10625
  };
10626
- React2.useEffect(() => {
10626
+ React4.useEffect(() => {
10627
10627
  if (!open || forceOpen) return void 0;
10628
10628
  const ownerDocument = rootRef.current?.ownerDocument;
10629
10629
  if (!ownerDocument) return void 0;
@@ -10635,7 +10635,7 @@ var BaseMultiSelect = React2.forwardRef(
10635
10635
  ownerDocument.addEventListener("pointerdown", handlePointerDown);
10636
10636
  return () => ownerDocument.removeEventListener("pointerdown", handlePointerDown);
10637
10637
  }, [forceOpen, open]);
10638
- React2.useEffect(() => {
10638
+ React4.useEffect(() => {
10639
10639
  if (isControlled) return void 0;
10640
10640
  const form = rootRef.current?.closest("form");
10641
10641
  if (!form) return void 0;
@@ -10647,7 +10647,7 @@ var BaseMultiSelect = React2.forwardRef(
10647
10647
  form.addEventListener("reset", handleReset);
10648
10648
  return () => form.removeEventListener("reset", handleReset);
10649
10649
  }, [forceOpen, isControlled, optionList]);
10650
- React2.useEffect(
10650
+ React4.useEffect(
10651
10651
  () => () => {
10652
10652
  if (typeaheadTimerRef.current) {
10653
10653
  typeaheadTimerRef.current.ownerWindow.clearTimeout(
@@ -10848,7 +10848,7 @@ var BaseMultiSelect = React2.forwardRef(
10848
10848
  )
10849
10849
  }
10850
10850
  ),
10851
- name ? selectedValues.map((selectedValue) => /* @__PURE__ */ React2.createElement(
10851
+ name ? selectedValues.map((selectedValue) => /* @__PURE__ */ React4.createElement(
10852
10852
  "input",
10853
10853
  {
10854
10854
  ...componentAttributes,
@@ -10882,7 +10882,7 @@ var BaseMultiSelect = React2.forwardRef(
10882
10882
  const selected = selectedValueSet.has(option.value);
10883
10883
  const active = index === resolvedActiveIndex;
10884
10884
  const optionState = option.disabled ? "disabled" : active ? "active" : selected ? "selected" : "idle";
10885
- return /* @__PURE__ */ React2.createElement(
10885
+ return /* @__PURE__ */ React4.createElement(
10886
10886
  "button",
10887
10887
  {
10888
10888
  ...componentAttributes,
@@ -11027,7 +11027,7 @@ function validateLabel(name, value) {
11027
11027
  function isInRange(value, min5, max5) {
11028
11028
  return value !== null && (min5 === void 0 || value >= min5) && (max5 === void 0 || value <= max5);
11029
11029
  }
11030
- var BaseNumberInput = React2.forwardRef(function BaseNumberInput2({
11030
+ var BaseNumberInput = React4.forwardRef(function BaseNumberInput2({
11031
11031
  value,
11032
11032
  defaultValue = "",
11033
11033
  min: min5,
@@ -11080,7 +11080,7 @@ var BaseNumberInput = React2.forwardRef(function BaseNumberInput2({
11080
11080
  const resolvedDecrementLabel = decrementLabel ?? messages.numberInput.decrement;
11081
11081
  validateLabel("incrementLabel", resolvedIncrementLabel);
11082
11082
  validateLabel("decrementLabel", resolvedDecrementLabel);
11083
- const [uncontrolledValue, setUncontrolledValue] = React2.useState(defaultValue);
11083
+ const [uncontrolledValue, setUncontrolledValue] = React4.useState(defaultValue);
11084
11084
  const isControlled = value !== void 0;
11085
11085
  const rawValue = isControlled ? value : uncontrolledValue;
11086
11086
  const parsedValue = parseBaseNumberInputValue(rawValue);
@@ -11404,7 +11404,7 @@ function validateLabel2(name, value) {
11404
11404
  throw new TypeError(`BasePasswordInput ${name} must be a non-empty string.`);
11405
11405
  }
11406
11406
  }
11407
- var BasePasswordInput = React2.forwardRef(function BasePasswordInput2({
11407
+ var BasePasswordInput = React4.forwardRef(function BasePasswordInput2({
11408
11408
  visible,
11409
11409
  defaultVisible = false,
11410
11410
  onVisibleChange,
@@ -11438,8 +11438,8 @@ var BasePasswordInput = React2.forwardRef(function BasePasswordInput2({
11438
11438
  const resolvedHideLabel = hidePasswordLabel ?? messages.passwordInput.hidePassword;
11439
11439
  validateLabel2("showPasswordLabel", resolvedShowLabel);
11440
11440
  validateLabel2("hidePasswordLabel", resolvedHideLabel);
11441
- const inputRef = React2.useRef(null);
11442
- const [uncontrolledVisible, setUncontrolledVisible] = React2.useState(defaultVisible);
11441
+ const inputRef = React4.useRef(null);
11442
+ const [uncontrolledVisible, setUncontrolledVisible] = React4.useState(defaultVisible);
11443
11443
  const isControlled = visible !== void 0;
11444
11444
  const resolvedVisible = isControlled ? visible : uncontrolledVisible;
11445
11445
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
@@ -11608,7 +11608,7 @@ function getPageItems(currentPage, pageCount, boundaryCount, siblingCount) {
11608
11608
  });
11609
11609
  return items;
11610
11610
  }
11611
- var BasePagination = React2.forwardRef(
11611
+ var BasePagination = React4.forwardRef(
11612
11612
  function BasePagination2({
11613
11613
  page,
11614
11614
  defaultPage,
@@ -11639,7 +11639,7 @@ var BasePagination = React2.forwardRef(
11639
11639
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
11640
11640
  const componentAttributes = useMonkeysComponentAttributes();
11641
11641
  const theme = resolveBaseAppearance(resolvedAppearance);
11642
- const [uncontrolledPage, setUncontrolledPage] = React2.useState(
11642
+ const [uncontrolledPage, setUncontrolledPage] = React4.useState(
11643
11643
  () => defaultPage ?? 1
11644
11644
  );
11645
11645
  if (page !== void 0) assertPositiveInteger(page, "page");
@@ -11871,7 +11871,7 @@ function BaseListFooter({ total = 0, loadedStart, loadedEnd, selectedCount, page
11871
11871
  function clamp2(value, min5, max5) {
11872
11872
  return Math.min(Math.max(value, min5), max5);
11873
11873
  }
11874
- var BaseProgress = React2.forwardRef(
11874
+ var BaseProgress = React4.forwardRef(
11875
11875
  function BaseProgress2({
11876
11876
  value = 0,
11877
11877
  max: max5 = 100,
@@ -11886,7 +11886,7 @@ var BaseProgress = React2.forwardRef(
11886
11886
  "aria-labelledby": nativeAriaLabelledBy,
11887
11887
  ...progressProps
11888
11888
  }, ref) {
11889
- const generatedLabelId = `${React2.useId()}-label`;
11889
+ const generatedLabelId = `${React4.useId()}-label`;
11890
11890
  if (typeof max5 !== "number" || !Number.isFinite(max5) || max5 <= 0) {
11891
11891
  throw new TypeError("BaseProgress max must be a positive finite number.");
11892
11892
  }
@@ -12000,7 +12000,7 @@ var indicatorSizeClassNames2 = {
12000
12000
  md: "h-2 w-2",
12001
12001
  lg: "h-2.5 w-2.5"
12002
12002
  };
12003
- var BaseRadioGroup = React2.forwardRef(function BaseRadioGroup2({
12003
+ var BaseRadioGroup = React4.forwardRef(function BaseRadioGroup2({
12004
12004
  options = [],
12005
12005
  value,
12006
12006
  defaultValue,
@@ -12072,10 +12072,10 @@ var BaseRadioGroup = React2.forwardRef(function BaseRadioGroup2({
12072
12072
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
12073
12073
  const componentAttributes = useMonkeysComponentAttributes();
12074
12074
  const theme = resolveBaseAppearance(resolvedAppearance);
12075
- const generatedId = React2.useId();
12075
+ const generatedId = React4.useId();
12076
12076
  const rootId = id ?? generatedId;
12077
12077
  const resolvedName = name ?? rootId;
12078
- const [uncontrolledValue, setUncontrolledValue] = React2.useState(defaultValue);
12078
+ const [uncontrolledValue, setUncontrolledValue] = React4.useState(defaultValue);
12079
12079
  const isControlled = value !== void 0;
12080
12080
  const selectedValue = isControlled ? value : uncontrolledValue;
12081
12081
  const handleSelect = (event, optionDisabled) => {
@@ -12251,7 +12251,7 @@ function resolveOverflow(axis) {
12251
12251
  }
12252
12252
  throw new TypeError('BaseScrollArea axis must be "x", "y", or "both".');
12253
12253
  }
12254
- var BaseScrollArea = React2.forwardRef(
12254
+ var BaseScrollArea = React4.forwardRef(
12255
12255
  function BaseScrollArea2({
12256
12256
  children,
12257
12257
  axis = "y",
@@ -12395,7 +12395,7 @@ function getOptionText2(option) {
12395
12395
  function toDomId4(value) {
12396
12396
  return value.replace(/[^a-zA-Z0-9_-]/g, "-");
12397
12397
  }
12398
- var BaseSelect = React2.forwardRef(
12398
+ var BaseSelect = React4.forwardRef(
12399
12399
  function BaseSelect2({
12400
12400
  options,
12401
12401
  placeholder,
@@ -12439,29 +12439,29 @@ var BaseSelect = React2.forwardRef(
12439
12439
  const theme = resolveBaseAppearance(resolvedAppearance);
12440
12440
  const fieldControl = useBaseFieldControl();
12441
12441
  const resolvedInvalid = invalid || fieldControl.invalid;
12442
- const generatedId = React2.useId();
12442
+ const generatedId = React4.useId();
12443
12443
  const selectId = id ?? generatedId;
12444
12444
  const triggerId = `${selectId}-button`;
12445
12445
  const listboxId = `${selectId}-listbox`;
12446
- const rootRef = React2.useRef(null);
12447
- const triggerRef = React2.useRef(null);
12448
- const selectRef = React2.useRef(null);
12449
- const optionRefs = React2.useRef([]);
12450
- const composingRef = React2.useRef(false);
12451
- const typeaheadBufferRef = React2.useRef("");
12452
- const typeaheadTimerRef = React2.useRef(null);
12446
+ const rootRef = React4.useRef(null);
12447
+ const triggerRef = React4.useRef(null);
12448
+ const selectRef = React4.useRef(null);
12449
+ const optionRefs = React4.useRef([]);
12450
+ const composingRef = React4.useRef(false);
12451
+ const typeaheadBufferRef = React4.useRef("");
12452
+ const typeaheadTimerRef = React4.useRef(null);
12453
12453
  const optionList = options ?? [];
12454
12454
  const isCustomSelect = optionList.length > 0;
12455
12455
  const forceOpen = openForPreview;
12456
- const [uncontrolledOpen, setUncontrolledOpen] = React2.useState(false);
12456
+ const [uncontrolledOpen, setUncontrolledOpen] = React4.useState(false);
12457
12457
  const open = forceOpen || uncontrolledOpen;
12458
- const [uncontrolledValue, setUncontrolledValue] = React2.useState(
12458
+ const [uncontrolledValue, setUncontrolledValue] = React4.useState(
12459
12459
  () => normalizeValue(defaultValue)
12460
12460
  );
12461
12461
  const isControlled = value !== void 0;
12462
12462
  const selectedValue = isControlled ? normalizeValue(value) : uncontrolledValue;
12463
12463
  const selectedOption = findOption(optionList, selectedValue);
12464
- const [activeIndex, setActiveIndex] = React2.useState(
12464
+ const [activeIndex, setActiveIndex] = React4.useState(
12465
12465
  () => getInitialActiveIndex(optionList, selectedValue)
12466
12466
  );
12467
12467
  const resolvedActiveIndex = activeIndex >= 0 && !optionList[activeIndex]?.disabled ? activeIndex : getInitialActiveIndex(optionList, selectedValue);
@@ -12633,7 +12633,7 @@ var BaseSelect = React2.forwardRef(
12633
12633
  event.preventDefault();
12634
12634
  triggerRef.current?.focus();
12635
12635
  };
12636
- React2.useEffect(() => {
12636
+ React4.useEffect(() => {
12637
12637
  if (!isCustomSelect || !open || forceOpen) return void 0;
12638
12638
  const ownerDocument = rootRef.current?.ownerDocument;
12639
12639
  if (!ownerDocument) return void 0;
@@ -12647,13 +12647,13 @@ var BaseSelect = React2.forwardRef(
12647
12647
  ownerDocument.removeEventListener("pointerdown", handlePointerDown);
12648
12648
  };
12649
12649
  }, [forceOpen, isCustomSelect, open, optionList, selectedValue]);
12650
- React2.useEffect(() => {
12650
+ React4.useEffect(() => {
12651
12651
  if (!isCustomSelect || !open || resolvedActiveIndex < 0) return;
12652
12652
  optionRefs.current[resolvedActiveIndex]?.scrollIntoView?.({
12653
12653
  block: "nearest"
12654
12654
  });
12655
12655
  }, [isCustomSelect, open, resolvedActiveIndex]);
12656
- React2.useEffect(() => {
12656
+ React4.useEffect(() => {
12657
12657
  if (!isCustomSelect || isControlled) return void 0;
12658
12658
  const selectElement = selectRef.current;
12659
12659
  const form = selectElement?.form;
@@ -12670,7 +12670,7 @@ var BaseSelect = React2.forwardRef(
12670
12670
  form.addEventListener("reset", handleReset);
12671
12671
  return () => form.removeEventListener("reset", handleReset);
12672
12672
  }, [defaultValue, forceOpen, isControlled, isCustomSelect, optionList]);
12673
- React2.useEffect(
12673
+ React4.useEffect(
12674
12674
  () => () => {
12675
12675
  if (typeaheadTimerRef.current) {
12676
12676
  typeaheadTimerRef.current.ownerWindow.clearTimeout(
@@ -12896,7 +12896,7 @@ var BaseSelect = React2.forwardRef(
12896
12896
  const selected = option.value === selectedValue;
12897
12897
  const active = index === resolvedActiveIndex;
12898
12898
  const optionState = option.disabled ? "disabled" : active ? "active" : selected ? "selected" : "idle";
12899
- return /* @__PURE__ */ React2.createElement(
12899
+ return /* @__PURE__ */ React4.createElement(
12900
12900
  "button",
12901
12901
  {
12902
12902
  ...componentAttributes,
@@ -13021,7 +13021,7 @@ function BaseSegmentedControl({
13021
13021
  ...controlProps
13022
13022
  }) {
13023
13023
  const theme = resolveBaseAppearance(appearance);
13024
- const [uncontrolledValue, setUncontrolledValue] = React2.useState(
13024
+ const [uncontrolledValue, setUncontrolledValue] = React4.useState(
13025
13025
  () => getInitialSegmentValue(options, defaultValue)
13026
13026
  );
13027
13027
  const isControlled = value !== void 0;
@@ -13095,7 +13095,7 @@ function BaseSegmentedControl({
13095
13095
  }
13096
13096
  );
13097
13097
  }
13098
- var BaseSpinner = React2.forwardRef(
13098
+ var BaseSpinner = React4.forwardRef(
13099
13099
  function BaseSpinner2({
13100
13100
  decorative = false,
13101
13101
  label,
@@ -13151,7 +13151,7 @@ var BaseSpinner = React2.forwardRef(
13151
13151
  );
13152
13152
  }
13153
13153
  );
13154
- var BaseStack = React2.forwardRef(
13154
+ var BaseStack = React4.forwardRef(
13155
13155
  function BaseStack2({
13156
13156
  children,
13157
13157
  gap,
@@ -13331,7 +13331,7 @@ function getIndicatorClassName(status, slots) {
13331
13331
  status === "error" && slots.stepsIndicatorError
13332
13332
  );
13333
13333
  }
13334
- var BaseSteps = React2.forwardRef(
13334
+ var BaseSteps = React4.forwardRef(
13335
13335
  function BaseSteps2({
13336
13336
  items,
13337
13337
  orientation = "horizontal",
@@ -13345,7 +13345,7 @@ var BaseSteps = React2.forwardRef(
13345
13345
  "aria-labelledby": ariaLabelledBy,
13346
13346
  ...stepsProps
13347
13347
  }, ref) {
13348
- const generatedId = React2.useId();
13348
+ const generatedId = React4.useId();
13349
13349
  const messages = useMonkeysLocaleMessages().steps;
13350
13350
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
13351
13351
  const componentAttributes = useMonkeysComponentAttributes();
@@ -13556,7 +13556,7 @@ var densitySize = {
13556
13556
  default: "md",
13557
13557
  comfortable: "lg"
13558
13558
  };
13559
- var BaseSwitch = React2.forwardRef(
13559
+ var BaseSwitch = React4.forwardRef(
13560
13560
  function BaseSwitch2({
13561
13561
  label,
13562
13562
  description,
@@ -13584,7 +13584,7 @@ var BaseSwitch = React2.forwardRef(
13584
13584
  const theme = resolveBaseAppearance(resolvedAppearance);
13585
13585
  const hasLabel = hasRenderableNode(label);
13586
13586
  const hasDescription = hasNonEmptyRenderableNode(description);
13587
- const [uncontrolledChecked, setUncontrolledChecked] = React2.useState(
13587
+ const [uncontrolledChecked, setUncontrolledChecked] = React4.useState(
13588
13588
  defaultChecked ?? false
13589
13589
  );
13590
13590
  const isControlled = checked !== void 0;
@@ -13743,7 +13743,7 @@ function SystemStateIcon({ kind }) {
13743
13743
  }
13744
13744
  );
13745
13745
  }
13746
- var BaseSystemState = React2.forwardRef(
13746
+ var BaseSystemState = React4.forwardRef(
13747
13747
  function BaseSystemState2({
13748
13748
  kind = "fallback",
13749
13749
  icon,
@@ -14002,9 +14002,9 @@ function setPointerCaptureIfAvailable2(target, pointerId) {
14002
14002
  throw error;
14003
14003
  }
14004
14004
  }
14005
- var BaseTableContext = React2.createContext(null);
14005
+ var BaseTableContext = React4.createContext(null);
14006
14006
  function useBaseTableContext(appearance) {
14007
- const context = React2.useContext(BaseTableContext);
14007
+ const context = React4.useContext(BaseTableContext);
14008
14008
  const providerAppearance = useMonkeysBaseAppearance(appearance);
14009
14009
  if (context) {
14010
14010
  const resolvedAppearance = appearance === void 0 ? context.appearance : providerAppearance;
@@ -14025,8 +14025,8 @@ function useBaseTableContext(appearance) {
14025
14025
  }
14026
14026
  function hasSplitScrollTable(children) {
14027
14027
  let found = false;
14028
- React2.Children.forEach(children, (child) => {
14029
- if (found || !React2.isValidElement(child)) return;
14028
+ React4.Children.forEach(children, (child) => {
14029
+ if (found || !React4.isValidElement(child)) return;
14030
14030
  const childProps = child.props;
14031
14031
  if (childProps.layout === "split-scroll") {
14032
14032
  found = true;
@@ -14189,7 +14189,7 @@ function DragHandleIcon() {
14189
14189
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-0.5 w-0.5 rounded-full bg-current" })
14190
14190
  ] });
14191
14191
  }
14192
- var BaseTableContainer = React2.forwardRef(function BaseTableContainer2({
14192
+ var BaseTableContainer = React4.forwardRef(function BaseTableContainer2({
14193
14193
  appearance,
14194
14194
  attachedFooter = false,
14195
14195
  children,
@@ -14233,7 +14233,7 @@ var BaseTableContainer = React2.forwardRef(function BaseTableContainer2({
14233
14233
  }
14234
14234
  );
14235
14235
  });
14236
- var BaseTable = React2.forwardRef(
14236
+ var BaseTable = React4.forwardRef(
14237
14237
  function BaseTable2({
14238
14238
  appearance,
14239
14239
  className,
@@ -14263,9 +14263,9 @@ var BaseTable = React2.forwardRef(
14263
14263
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
14264
14264
  const componentAttributes = useMonkeysComponentAttributes();
14265
14265
  const theme = resolveBaseAppearance(resolvedAppearance);
14266
- const [draggingColumnId, setDraggingColumnId] = React2.useState();
14267
- const splitHeaderRef = React2.useRef(null);
14268
- const splitFooterRef = React2.useRef(null);
14266
+ const [draggingColumnId, setDraggingColumnId] = React4.useState();
14267
+ const splitHeaderRef = React4.useRef(null);
14268
+ const splitFooterRef = React4.useRef(null);
14269
14269
  const isSplitScroll = layout === "split-scroll";
14270
14270
  const columnTemplate = isSplitScroll ? buildSplitColumnTemplate(columns, columnSizes) : void 0;
14271
14271
  const contextValue = {
@@ -14313,7 +14313,7 @@ var BaseTable = React2.forwardRef(
14313
14313
  ) });
14314
14314
  }
14315
14315
  );
14316
- var BaseTableHeader = React2.forwardRef(function BaseTableHeader2({ appearance, className, classNames, style, ...headerProps }, ref) {
14316
+ var BaseTableHeader = React4.forwardRef(function BaseTableHeader2({ appearance, className, classNames, style, ...headerProps }, ref) {
14317
14317
  const { layout, splitHeaderRef, theme } = useBaseTableContext(appearance);
14318
14318
  const isSplitScroll = layout === "split-scroll";
14319
14319
  const setHeaderRef = (node) => {
@@ -14340,7 +14340,7 @@ var BaseTableHeader = React2.forwardRef(function BaseTableHeader2({ appearance,
14340
14340
  }
14341
14341
  );
14342
14342
  });
14343
- var BaseTableBody = React2.forwardRef(function BaseTableBody2({ appearance, className, classNames, onScroll, style, ...bodyProps }, ref) {
14343
+ var BaseTableBody = React4.forwardRef(function BaseTableBody2({ appearance, className, classNames, onScroll, style, ...bodyProps }, ref) {
14344
14344
  const {
14345
14345
  bodyClassName,
14346
14346
  bodyMaxHeight,
@@ -14383,7 +14383,7 @@ var BaseTableBody = React2.forwardRef(function BaseTableBody2({ appearance, clas
14383
14383
  }
14384
14384
  );
14385
14385
  });
14386
- var BaseTableFooter = React2.forwardRef(function BaseTableFooter2({ appearance, className, classNames, style, ...footerProps }, ref) {
14386
+ var BaseTableFooter = React4.forwardRef(function BaseTableFooter2({ appearance, className, classNames, style, ...footerProps }, ref) {
14387
14387
  const { layout, splitFooterRef, theme } = useBaseTableContext(appearance);
14388
14388
  const isSplitScroll = layout === "split-scroll";
14389
14389
  const setFooterRef = (node) => {
@@ -14410,7 +14410,7 @@ var BaseTableFooter = React2.forwardRef(function BaseTableFooter2({ appearance,
14410
14410
  }
14411
14411
  );
14412
14412
  });
14413
- var BaseTableRow = React2.forwardRef(
14413
+ var BaseTableRow = React4.forwardRef(
14414
14414
  function BaseTableRow2({
14415
14415
  interactive,
14416
14416
  selected,
@@ -14452,7 +14452,7 @@ var BaseTableRow = React2.forwardRef(
14452
14452
  );
14453
14453
  }
14454
14454
  );
14455
- var BaseTableHead = React2.forwardRef(function BaseTableHead2({
14455
+ var BaseTableHead = React4.forwardRef(function BaseTableHead2({
14456
14456
  columnId,
14457
14457
  align,
14458
14458
  verticalAlign,
@@ -14517,10 +14517,10 @@ var BaseTableHead = React2.forwardRef(function BaseTableHead2({
14517
14517
  const isSplitScroll = tableContext.layout === "split-scroll";
14518
14518
  const resolvedAlign = align ?? (isSplitScroll ? "center" : "left");
14519
14519
  const resolvedVerticalAlign = verticalAlign ?? "middle";
14520
- const headRef = React2.useRef(null);
14521
- const resizeCleanupRef = React2.useRef(() => {
14520
+ const headRef = React4.useRef(null);
14521
+ const resizeCleanupRef = React4.useRef(() => {
14522
14522
  });
14523
- const [measuredWidth, setMeasuredWidth] = React2.useState();
14523
+ const [measuredWidth, setMeasuredWidth] = React4.useState();
14524
14524
  const setHeadRef = (node) => {
14525
14525
  headRef.current = node;
14526
14526
  assignRef2(forwardedRef, node);
@@ -14759,7 +14759,7 @@ var BaseTableHead = React2.forwardRef(function BaseTableHead2({
14759
14759
  }
14760
14760
  );
14761
14761
  };
14762
- React2.useEffect(() => {
14762
+ React4.useEffect(() => {
14763
14763
  if (typeof controlledWidth === "number") {
14764
14764
  setMeasuredWidth(void 0);
14765
14765
  return;
@@ -14772,7 +14772,7 @@ var BaseTableHead = React2.forwardRef(function BaseTableHead2({
14772
14772
  );
14773
14773
  }
14774
14774
  }, [controlledWidth, minWidth, maxWidth, canResize]);
14775
- React2.useEffect(() => {
14775
+ React4.useEffect(() => {
14776
14776
  if (!canResize) resizeCleanupRef.current();
14777
14777
  return () => resizeCleanupRef.current();
14778
14778
  }, [canResize, columnId, tableContext.onColumnSizeChange]);
@@ -14831,7 +14831,7 @@ var BaseTableHead = React2.forwardRef(function BaseTableHead2({
14831
14831
  }
14832
14832
  );
14833
14833
  });
14834
- var BaseTableCell = React2.forwardRef(
14834
+ var BaseTableCell = React4.forwardRef(
14835
14835
  function BaseTableCell2({
14836
14836
  align = "left",
14837
14837
  appearance,
@@ -14866,7 +14866,7 @@ var BaseTableCell = React2.forwardRef(
14866
14866
  );
14867
14867
  }
14868
14868
  );
14869
- var BaseTableCaption = React2.forwardRef(function BaseTableCaption2({ appearance, className, classNames, style, ...captionProps }, ref) {
14869
+ var BaseTableCaption = React4.forwardRef(function BaseTableCaption2({ appearance, className, classNames, style, ...captionProps }, ref) {
14870
14870
  const { theme } = useBaseTableContext(appearance);
14871
14871
  return /* @__PURE__ */ jsxRuntime.jsx(
14872
14872
  "caption",
@@ -14882,7 +14882,7 @@ var BaseTableCaption = React2.forwardRef(function BaseTableCaption2({ appearance
14882
14882
  }
14883
14883
  );
14884
14884
  });
14885
- var BaseTableEmpty = React2.forwardRef(
14885
+ var BaseTableEmpty = React4.forwardRef(
14886
14886
  function BaseTableEmpty2({
14887
14887
  colSpan,
14888
14888
  icon,
@@ -15034,7 +15034,7 @@ function BaseTableLoading({
15034
15034
  rowIndex
15035
15035
  )) });
15036
15036
  }
15037
- var BaseTableFooterBar = React2.forwardRef(function BaseTableFooterBar2({
15037
+ var BaseTableFooterBar = React4.forwardRef(function BaseTableFooterBar2({
15038
15038
  appearance,
15039
15039
  leading,
15040
15040
  actions,
@@ -15159,7 +15159,7 @@ function getHorizontalStep(event, key) {
15159
15159
  if (key === "ArrowRight") return rtl ? -1 : 1;
15160
15160
  return rtl ? 1 : -1;
15161
15161
  }
15162
- var BaseTabs = React2.forwardRef(
15162
+ var BaseTabs = React4.forwardRef(
15163
15163
  function BaseTabs2({
15164
15164
  items = [],
15165
15165
  value,
@@ -15186,16 +15186,16 @@ var BaseTabs = React2.forwardRef(
15186
15186
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
15187
15187
  const componentAttributes = useMonkeysComponentAttributes();
15188
15188
  const theme = resolveBaseAppearance(resolvedAppearance);
15189
- const generatedId = React2.useId();
15189
+ const generatedId = React4.useId();
15190
15190
  const rootId = id ?? generatedId;
15191
15191
  const initialCandidate = value !== void 0 ? value : defaultValue;
15192
- const [uncontrolledValue, setUncontrolledValue] = React2.useState(
15192
+ const [uncontrolledValue, setUncontrolledValue] = React4.useState(
15193
15193
  () => getResolvedValue(items, defaultValue)
15194
15194
  );
15195
- const [focusedValue, setFocusedValue] = React2.useState(
15195
+ const [focusedValue, setFocusedValue] = React4.useState(
15196
15196
  () => getResolvedValue(items, initialCandidate)
15197
15197
  );
15198
- const triggerRefs = React2.useRef([]);
15198
+ const triggerRefs = React4.useRef([]);
15199
15199
  const isControlled = value !== void 0;
15200
15200
  const selectedValue = getResolvedValue(
15201
15201
  items,
@@ -15301,7 +15301,7 @@ var BaseTabs = React2.forwardRef(
15301
15301
  const itemId = idFragments[index];
15302
15302
  const selected = index === selectedIndex;
15303
15303
  const state = item.disabled ? "disabled" : selected ? "active" : "inactive";
15304
- return /* @__PURE__ */ React2.createElement(
15304
+ return /* @__PURE__ */ React4.createElement(
15305
15305
  "button",
15306
15306
  {
15307
15307
  ...componentAttributes,
@@ -15371,7 +15371,7 @@ var controlSizeClassNames2 = {
15371
15371
  md: "min-h-24 px-3 py-2 text-sm leading-6",
15372
15372
  lg: "min-h-28 px-3.5 py-2.5 text-base leading-7"
15373
15373
  };
15374
- var BaseTextarea = React2.forwardRef(
15374
+ var BaseTextarea = React4.forwardRef(
15375
15375
  function BaseTextarea2({
15376
15376
  invalid = false,
15377
15377
  disabled = false,
@@ -15449,7 +15449,7 @@ var BaseTextarea = React2.forwardRef(
15449
15449
  );
15450
15450
  }
15451
15451
  );
15452
- var BaseText = React2.forwardRef(function BaseText2({
15452
+ var BaseText = React4.forwardRef(function BaseText2({
15453
15453
  as = "p",
15454
15454
  children,
15455
15455
  size = "md",
@@ -15463,7 +15463,7 @@ var BaseText = React2.forwardRef(function BaseText2({
15463
15463
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
15464
15464
  const componentAttributes = useMonkeysComponentAttributes();
15465
15465
  const theme = resolveBaseAppearance(resolvedAppearance);
15466
- return React2.createElement(
15466
+ return React4.createElement(
15467
15467
  as,
15468
15468
  {
15469
15469
  ...componentAttributes,
@@ -15501,12 +15501,12 @@ function validatePlacement2(value) {
15501
15501
  }
15502
15502
  }
15503
15503
  function normalizeTrigger(children, disabled) {
15504
- if (React2.isValidElement(children) && children.type !== React2.Fragment) {
15504
+ if (React4.isValidElement(children) && children.type !== React4.Fragment) {
15505
15505
  return children;
15506
15506
  }
15507
15507
  return /* @__PURE__ */ jsxRuntime.jsx("span", { tabIndex: !disabled && hasRenderableNode(children) ? 0 : void 0, children });
15508
15508
  }
15509
- var BaseTooltip = React2.forwardRef(
15509
+ var BaseTooltip = React4.forwardRef(
15510
15510
  function BaseTooltip2({
15511
15511
  content,
15512
15512
  children,
@@ -15531,7 +15531,7 @@ var BaseTooltip = React2.forwardRef(
15531
15531
  const componentAttributes = useMonkeysComponentAttributes();
15532
15532
  const theme = resolveBaseAppearance(resolvedAppearance);
15533
15533
  const overlayPortal = useBaseOverlayPortal({ disabled: !portal });
15534
- const [uncontrolledOpen, setUncontrolledOpen] = React2.useState(defaultOpen);
15534
+ const [uncontrolledOpen, setUncontrolledOpen] = React4.useState(defaultOpen);
15535
15535
  const isControlled = open !== void 0;
15536
15536
  const canShow = !disabled && hasRenderableNode(content);
15537
15537
  const requestedOpen = isControlled ? open : uncontrolledOpen;
@@ -15672,7 +15672,7 @@ function BaseToolbar({
15672
15672
  }
15673
15673
  );
15674
15674
  }
15675
- var BaseVisuallyHidden = React2.forwardRef(function BaseVisuallyHidden2({
15675
+ var BaseVisuallyHidden = React4.forwardRef(function BaseVisuallyHidden2({
15676
15676
  children,
15677
15677
  focusable = false,
15678
15678
  appearance,
@@ -15731,7 +15731,7 @@ var footerTokenStyles = {
15731
15731
  background: "var(--monkeys-component-app-shell-sidebar-footer-background, hsl(var(--muted) / 0.22))",
15732
15732
  borderColor: "var(--monkeys-component-app-shell-sidebar-footer-border-color, hsl(var(--border)))"
15733
15733
  };
15734
- var AppShellSidebar = React2.forwardRef(
15734
+ var AppShellSidebar = React4.forwardRef(
15735
15735
  function AppShellSidebar2({
15736
15736
  navigation,
15737
15737
  header,
@@ -16349,15 +16349,15 @@ function SidebarNavList({
16349
16349
  onNavigate,
16350
16350
  defaultExpandedGroups
16351
16351
  }) {
16352
- const [expanded, setExpanded] = React2.useState(() => {
16352
+ const [expanded, setExpanded] = React4.useState(() => {
16353
16353
  const map = {};
16354
16354
  (defaultExpandedGroups ?? items.map((i) => i.id)).forEach((id) => {
16355
16355
  map[id] = true;
16356
16356
  });
16357
16357
  return map;
16358
16358
  });
16359
- const [localActiveItemId, setLocalActiveItemId] = React2.useState(activeItemId);
16360
- React2.useEffect(() => {
16359
+ const [localActiveItemId, setLocalActiveItemId] = React4.useState(activeItemId);
16360
+ React4.useEffect(() => {
16361
16361
  if (activeItemId !== void 0) {
16362
16362
  setLocalActiveItemId(activeItemId);
16363
16363
  }
@@ -16675,8 +16675,8 @@ function SidebarNavigationList({
16675
16675
  onNavigate,
16676
16676
  revealRequest
16677
16677
  }) {
16678
- const navRef = React2.useRef(null);
16679
- const [expandedByRoot, setExpandedByRoot] = React2.useState(
16678
+ const navRef = React4.useRef(null);
16679
+ const [expandedByRoot, setExpandedByRoot] = React4.useState(
16680
16680
  {}
16681
16681
  );
16682
16682
  const canReveal = revealRequest ? items.some(
@@ -16689,7 +16689,7 @@ function SidebarNavigationList({
16689
16689
  [id]: !current[id]
16690
16690
  }));
16691
16691
  };
16692
- React2.useEffect(() => {
16692
+ React4.useEffect(() => {
16693
16693
  if (!revealRequest || !canReveal) return;
16694
16694
  setExpandedByRoot((current) => ({
16695
16695
  ...current,
@@ -16968,10 +16968,10 @@ function HeadbarNavMenuItem({
16968
16968
  onNavigate,
16969
16969
  useTokenRadius
16970
16970
  }) {
16971
- const [open, setOpen] = React2.useState(false);
16971
+ const [open, setOpen] = React4.useState(false);
16972
16972
  const isOpen = !item.disabled && open;
16973
- const closeTimerRef = React2.useRef(null);
16974
- const wasOpenOnPointerDownRef = React2.useRef(false);
16973
+ const closeTimerRef = React4.useRef(null);
16974
+ const wasOpenOnPointerDownRef = React4.useRef(false);
16975
16975
  const clearCloseTimer = () => {
16976
16976
  if (!closeTimerRef.current) return;
16977
16977
  clearTimeout(closeTimerRef.current);
@@ -16996,7 +16996,7 @@ function HeadbarNavMenuItem({
16996
16996
  onNavigate?.(firstEnabledChild.id);
16997
16997
  return true;
16998
16998
  };
16999
- React2.useEffect(() => clearCloseTimer, []);
16999
+ React4.useEffect(() => clearCloseTimer, []);
17000
17000
  return /* @__PURE__ */ jsxRuntime.jsxs(
17001
17001
  DropdownMenu2__namespace.Root,
17002
17002
  {
@@ -17162,7 +17162,7 @@ function NavigationHeadbarMenu({
17162
17162
  }
17163
17163
  );
17164
17164
  if (!hasSecondaryAction) {
17165
- return /* @__PURE__ */ jsxRuntime.jsx(React2.Fragment, { children: primaryAction }, item.id);
17165
+ return /* @__PURE__ */ jsxRuntime.jsx(React4.Fragment, { children: primaryAction }, item.id);
17166
17166
  }
17167
17167
  return /* @__PURE__ */ jsxRuntime.jsxs(
17168
17168
  "div",
@@ -17330,21 +17330,21 @@ function NavigationLayout({
17330
17330
  switchToHeadbarLabel = "Switch to headbar",
17331
17331
  switchToSidebarLabel = "Switch to sidebar"
17332
17332
  }) {
17333
- const [uncontrolledMode, setUncontrolledMode] = React2.useState(defaultMode);
17334
- const [uncontrolledSidebarCollapsed, setUncontrolledSidebarCollapsed] = React2.useState(defaultSidebarCollapsed);
17335
- const [revealRequest, setRevealRequest] = React2.useState(null);
17333
+ const [uncontrolledMode, setUncontrolledMode] = React4.useState(defaultMode);
17334
+ const [uncontrolledSidebarCollapsed, setUncontrolledSidebarCollapsed] = React4.useState(defaultSidebarCollapsed);
17335
+ const [revealRequest, setRevealRequest] = React4.useState(null);
17336
17336
  const isModeControlled = mode !== void 0;
17337
17337
  const isSidebarCollapsedControlled = controlledSidebarCollapsed !== void 0;
17338
17338
  const navigationMode = isModeControlled ? mode : uncontrolledMode;
17339
17339
  const sidebarCollapsed = isSidebarCollapsedControlled ? controlledSidebarCollapsed : uncontrolledSidebarCollapsed;
17340
17340
  const isHeadbarMode = navigationMode === "headbar";
17341
17341
  const sidebarWidth = sidebarCollapsed ? collapsedSidebarWidth : expandedSidebarWidth;
17342
- React2.useEffect(() => {
17342
+ React4.useEffect(() => {
17343
17343
  if (!isModeControlled) {
17344
17344
  setUncontrolledMode(defaultMode);
17345
17345
  }
17346
17346
  }, [defaultMode, isModeControlled]);
17347
- React2.useEffect(() => {
17347
+ React4.useEffect(() => {
17348
17348
  if (!isSidebarCollapsedControlled) {
17349
17349
  setUncontrolledSidebarCollapsed(defaultSidebarCollapsed);
17350
17350
  }
@@ -17502,7 +17502,7 @@ function NavigationLayout({
17502
17502
  }
17503
17503
  );
17504
17504
  }
17505
- var AccordionItem = React2__namespace.forwardRef(({ className, style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17505
+ var AccordionItem = React4__namespace.forwardRef(({ className, style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17506
17506
  AccordionPrimitive__namespace.Item,
17507
17507
  {
17508
17508
  ref,
@@ -17515,7 +17515,7 @@ var AccordionItem = React2__namespace.forwardRef(({ className, style, ...props }
17515
17515
  }
17516
17516
  ));
17517
17517
  AccordionItem.displayName = "AccordionItem";
17518
- var AccordionTrigger = React2__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
17518
+ var AccordionTrigger = React4__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
17519
17519
  AccordionPrimitive__namespace.Trigger,
17520
17520
  {
17521
17521
  ref,
@@ -17537,7 +17537,7 @@ var AccordionTrigger = React2__namespace.forwardRef(({ className, children, ...p
17537
17537
  }
17538
17538
  ) }));
17539
17539
  AccordionTrigger.displayName = "AccordionTrigger";
17540
- var AccordionContent = React2__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17540
+ var AccordionContent = React4__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17541
17541
  AccordionPrimitive__namespace.Content,
17542
17542
  {
17543
17543
  ref,
@@ -17547,7 +17547,7 @@ var AccordionContent = React2__namespace.forwardRef(({ className, children, ...p
17547
17547
  }
17548
17548
  ));
17549
17549
  AccordionContent.displayName = "AccordionContent";
17550
- var Checkbox = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17550
+ var Checkbox = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17551
17551
  CheckboxPrimitive__namespace.Root,
17552
17552
  {
17553
17553
  ref,
@@ -17582,7 +17582,7 @@ var buttonVariants = classVarianceAuthority.cva(
17582
17582
  defaultVariants: { variant: "default", size: "default" }
17583
17583
  }
17584
17584
  );
17585
- var Button = React2__namespace.forwardRef(
17585
+ var Button = React4__namespace.forwardRef(
17586
17586
  ({ className, variant, size, asChild = false, ...props }, ref) => {
17587
17587
  const Component = asChild ? reactSlot.Slot : "button";
17588
17588
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -17596,7 +17596,7 @@ var Button = React2__namespace.forwardRef(
17596
17596
  }
17597
17597
  );
17598
17598
  Button.displayName = "Button";
17599
- var PopoverContent = React2__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
17599
+ var PopoverContent = React4__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
17600
17600
  PopoverPrimitive__namespace.Content,
17601
17601
  {
17602
17602
  ref,
@@ -17610,7 +17610,7 @@ var PopoverContent = React2__namespace.forwardRef(({ className, align = "center"
17610
17610
  }
17611
17611
  ) }));
17612
17612
  PopoverContent.displayName = "PopoverContent";
17613
- var ScrollArea = React2__namespace.forwardRef(
17613
+ var ScrollArea = React4__namespace.forwardRef(
17614
17614
  ({
17615
17615
  className,
17616
17616
  children,
@@ -17654,7 +17654,7 @@ var ScrollArea = React2__namespace.forwardRef(
17654
17654
  )
17655
17655
  );
17656
17656
  ScrollArea.displayName = "ScrollArea";
17657
- var ScrollBar = React2__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17657
+ var ScrollBar = React4__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17658
17658
  ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
17659
17659
  {
17660
17660
  ref,
@@ -17670,7 +17670,7 @@ var ScrollBar = React2__namespace.forwardRef(({ className, orientation = "vertic
17670
17670
  }
17671
17671
  ));
17672
17672
  ScrollBar.displayName = "ScrollBar";
17673
- var Switch = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17673
+ var Switch = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17674
17674
  SwitchPrimitive__namespace.Root,
17675
17675
  {
17676
17676
  ref,
@@ -17683,9 +17683,9 @@ var Switch = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @
17683
17683
  }
17684
17684
  ));
17685
17685
  Switch.displayName = "Switch";
17686
- var Tabs = React2__namespace.forwardRef(({ variant = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Root, { ref, "data-variant": variant, ...props }));
17686
+ var Tabs = React4__namespace.forwardRef(({ variant = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Root, { ref, "data-variant": variant, ...props }));
17687
17687
  Tabs.displayName = "Tabs";
17688
- var TabsList = React2__namespace.forwardRef(({ className, gap, style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17688
+ var TabsList = React4__namespace.forwardRef(({ className, gap, style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17689
17689
  TabsPrimitive__namespace.List,
17690
17690
  {
17691
17691
  ref,
@@ -17698,7 +17698,7 @@ var TabsList = React2__namespace.forwardRef(({ className, gap, style, ...props }
17698
17698
  }
17699
17699
  ));
17700
17700
  TabsList.displayName = "TabsList";
17701
- var TabsTrigger = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17701
+ var TabsTrigger = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17702
17702
  TabsPrimitive__namespace.Trigger,
17703
17703
  {
17704
17704
  ref,
@@ -17710,7 +17710,7 @@ var TabsTrigger = React2__namespace.forwardRef(({ className, ...props }, ref) =>
17710
17710
  }
17711
17711
  ));
17712
17712
  TabsTrigger.displayName = "TabsTrigger";
17713
- var TabsContent = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17713
+ var TabsContent = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17714
17714
  TabsPrimitive__namespace.Content,
17715
17715
  {
17716
17716
  ref,
@@ -17722,7 +17722,7 @@ var TabsContent = React2__namespace.forwardRef(({ className, ...props }, ref) =>
17722
17722
  }
17723
17723
  ));
17724
17724
  TabsContent.displayName = "TabsContent";
17725
- var TooltipContent = React2__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(Tooltip2__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
17725
+ var TooltipContent = React4__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(Tooltip2__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
17726
17726
  Tooltip2__namespace.Content,
17727
17727
  {
17728
17728
  ref,
@@ -17735,65 +17735,213 @@ var TooltipContent = React2__namespace.forwardRef(({ className, sideOffset = 4,
17735
17735
  }
17736
17736
  ) }));
17737
17737
  TooltipContent.displayName = "TooltipContent";
17738
+ var Input = React4__namespace.forwardRef(({ className, appearance = "standard", type, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17739
+ "input",
17740
+ {
17741
+ ref,
17742
+ type,
17743
+ className: cn(
17744
+ "flex w-full border border-input bg-control-surface px-3 text-foreground ring-offset-control-surface transition-[border-color,background-color,color,box-shadow] file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
17745
+ appearance === "compact" ? "h-9 rounded-md py-1 text-sm shadow-sm" : "h-10 rounded-md py-2 text-sm shadow-sm",
17746
+ appearance === "shadow" && "rounded-lg shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",
17747
+ className
17748
+ ),
17749
+ ...props
17750
+ }
17751
+ ));
17752
+ Input.displayName = "Input";
17753
+ var Textarea = React4__namespace.forwardRef(({ className, appearance = "standard", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17754
+ "textarea",
17755
+ {
17756
+ ref,
17757
+ className: cn(
17758
+ "flex w-full border border-input bg-control-surface px-3 py-2 text-foreground ring-offset-control-surface placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
17759
+ appearance === "compact" ? "min-h-[60px] rounded-md text-sm shadow-sm" : "min-h-[80px] rounded-md text-sm",
17760
+ appearance === "shadow" && "shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",
17761
+ className
17762
+ ),
17763
+ ...props
17764
+ }
17765
+ ));
17766
+ Textarea.displayName = "Textarea";
17767
+ function InputGroup({ className, ...props }) {
17768
+ return /* @__PURE__ */ jsxRuntime.jsx(
17769
+ "div",
17770
+ {
17771
+ "data-slot": "input-group",
17772
+ role: "group",
17773
+ className: cn(
17774
+ "group/input-group shadow-xs relative flex w-full items-center rounded-md border border-input outline-none transition-[color,box-shadow] dark:bg-input/30",
17775
+ "h-9 has-[>textarea]:h-auto",
17776
+ // Variants based on alignment.
17777
+ "has-[>[data-align=inline-start]]:[&>input]:pl-2",
17778
+ "has-[>[data-align=inline-end]]:[&>input]:pr-2",
17779
+ "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
17780
+ "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
17781
+ // Focus state.
17782
+ "has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-ring",
17783
+ // Error state.
17784
+ "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
17785
+ className
17786
+ ),
17787
+ ...props
17788
+ }
17789
+ );
17790
+ }
17791
+ var inputGroupAddonVariants = classVarianceAuthority.cva(
17792
+ "text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
17793
+ {
17794
+ variants: {
17795
+ align: {
17796
+ "inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
17797
+ "inline-end": "order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]",
17798
+ "block-start": "[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5",
17799
+ "block-end": "[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5"
17800
+ }
17801
+ },
17802
+ defaultVariants: {
17803
+ align: "inline-start"
17804
+ }
17805
+ }
17806
+ );
17807
+ function InputGroupAddon({
17808
+ className,
17809
+ align = "inline-start",
17810
+ ...props
17811
+ }) {
17812
+ return /* @__PURE__ */ jsxRuntime.jsx(
17813
+ "div",
17814
+ {
17815
+ role: "group",
17816
+ "data-slot": "input-group-addon",
17817
+ "data-align": align,
17818
+ className: cn(inputGroupAddonVariants({ align }), className),
17819
+ onClick: (e) => {
17820
+ if (e.target.closest("button")) {
17821
+ return;
17822
+ }
17823
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
17824
+ },
17825
+ ...props
17826
+ }
17827
+ );
17828
+ }
17829
+ var inputGroupButtonVariants = classVarianceAuthority.cva("flex items-center gap-2 text-sm shadow-none", {
17830
+ variants: {
17831
+ size: {
17832
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
17833
+ sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
17834
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
17835
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
17836
+ }
17837
+ },
17838
+ defaultVariants: {
17839
+ size: "xs"
17840
+ }
17841
+ });
17842
+ function InputGroupButton({
17843
+ className,
17844
+ type = "button",
17845
+ variant = "ghost",
17846
+ size = "xs",
17847
+ ...props
17848
+ }) {
17849
+ return /* @__PURE__ */ jsxRuntime.jsx(
17850
+ Button,
17851
+ {
17852
+ type,
17853
+ "data-size": size,
17854
+ variant,
17855
+ className: cn(inputGroupButtonVariants({ size }), className),
17856
+ ...props
17857
+ }
17858
+ );
17859
+ }
17860
+ var InputGroupInput = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17861
+ Input,
17862
+ {
17863
+ ref,
17864
+ "data-slot": "input-group-control",
17865
+ className: cn(
17866
+ "flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
17867
+ className
17868
+ ),
17869
+ ...props
17870
+ }
17871
+ ));
17872
+ InputGroupInput.displayName = "InputGroupInput";
17873
+ var InputGroupTextarea = React4__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
17874
+ Textarea,
17875
+ {
17876
+ ref,
17877
+ "data-slot": "input-group-control",
17878
+ className: cn(
17879
+ "flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
17880
+ className
17881
+ ),
17882
+ ...props
17883
+ }
17884
+ ));
17885
+ InputGroupTextarea.displayName = "InputGroupTextarea";
17738
17886
  var menuItemClassName = "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0";
17739
17887
  var menuContentClassName = "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-menu-surface p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
17740
17888
  var DropdownMenu4 = DropdownMenu2__namespace.Root;
17741
17889
  var DropdownMenuTrigger = DropdownMenu2__namespace.Trigger;
17742
- var DropdownMenuSubTrigger = React2__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu2__namespace.SubTrigger, { ref, className: cn(menuItemClassName, "data-[state=open]:bg-accent", inset && "pl-8", className), ...props, children: [
17890
+ var DropdownMenuSubTrigger = React4__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu2__namespace.SubTrigger, { ref, className: cn(menuItemClassName, "data-[state=open]:bg-accent", inset && "pl-8", className), ...props, children: [
17743
17891
  children,
17744
17892
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { "aria-hidden": "true", className: "ml-auto" })
17745
17893
  ] }));
17746
17894
  DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
17747
- var DropdownMenuSubContent = React2__namespace.forwardRef(
17895
+ var DropdownMenuSubContent = React4__namespace.forwardRef(
17748
17896
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu2__namespace.SubContent, { ref, className: cn(menuContentClassName, className), ...props })
17749
17897
  );
17750
17898
  DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
17751
- var DropdownMenuContent = React2__namespace.forwardRef(
17899
+ var DropdownMenuContent = React4__namespace.forwardRef(
17752
17900
  ({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu2__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu2__namespace.Content, { ref, sideOffset, className: cn(menuContentClassName, className), ...props }) })
17753
17901
  );
17754
17902
  DropdownMenuContent.displayName = "DropdownMenuContent";
17755
- var DropdownMenuItem = React2__namespace.forwardRef(
17903
+ var DropdownMenuItem = React4__namespace.forwardRef(
17756
17904
  ({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu2__namespace.Item, { ref, className: cn(menuItemClassName, inset && "pl-8", className), ...props })
17757
17905
  );
17758
17906
  DropdownMenuItem.displayName = "DropdownMenuItem";
17759
- var DropdownMenuCheckboxItem = React2__namespace.forwardRef(
17907
+ var DropdownMenuCheckboxItem = React4__namespace.forwardRef(
17760
17908
  ({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu2__namespace.CheckboxItem, { ref, className: cn(menuItemClassName, "pl-8", className), checked, ...props, children: [
17761
17909
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu2__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { "aria-hidden": "true", className: "h-4 w-4" }) }) }),
17762
17910
  children
17763
17911
  ] })
17764
17912
  );
17765
17913
  DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
17766
- var DropdownMenuRadioItem = React2__namespace.forwardRef(
17914
+ var DropdownMenuRadioItem = React4__namespace.forwardRef(
17767
17915
  ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu2__namespace.RadioItem, { ref, className: cn(menuItemClassName, "pl-8", className), ...props, children: [
17768
17916
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu2__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { "aria-hidden": "true", className: "h-2 w-2 fill-current" }) }) }),
17769
17917
  children
17770
17918
  ] })
17771
17919
  );
17772
17920
  DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
17773
- var DropdownMenuLabel = React2__namespace.forwardRef(
17921
+ var DropdownMenuLabel = React4__namespace.forwardRef(
17774
17922
  ({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu2__namespace.Label, { ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })
17775
17923
  );
17776
17924
  DropdownMenuLabel.displayName = "DropdownMenuLabel";
17777
- var DropdownMenuSeparator = React2__namespace.forwardRef(
17925
+ var DropdownMenuSeparator = React4__namespace.forwardRef(
17778
17926
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu2__namespace.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })
17779
17927
  );
17780
17928
  DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
17781
- var SelectTrigger = React2__namespace.forwardRef(
17782
- ({ className, children, iconClassName, size = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Trigger, { ref, className: cn("flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-control-surface px-3 py-2 text-left text-sm shadow-sm ring-offset-control-surface data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:min-w-0 [&>span]:flex-1 [&>span]:text-left", size === "sm" && "h-8 px-2 py-1 text-xs", className), ...props, children: [
17929
+ var SelectTrigger = React4__namespace.forwardRef(
17930
+ ({ className, children, iconClassName, size = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Trigger, { ref, className: cn("flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-control-surface px-3 py-2 text-left text-sm text-foreground shadow-sm ring-offset-control-surface data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:min-w-0 [&>span]:flex-1 [&>span]:text-left", size === "sm" && "h-8 px-2 py-1 text-xs", className), ...props, children: [
17783
17931
  children,
17784
17932
  /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { "aria-hidden": "true", className: cn("h-4 w-4 opacity-50", iconClassName) }) })
17785
17933
  ] })
17786
17934
  );
17787
17935
  SelectTrigger.displayName = "SelectTrigger";
17788
- var SelectScrollUpButton = React2__namespace.forwardRef(
17936
+ var SelectScrollUpButton = React4__namespace.forwardRef(
17789
17937
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ScrollUpButton, { ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { "aria-hidden": "true", className: "h-4 w-4" }) })
17790
17938
  );
17791
17939
  SelectScrollUpButton.displayName = "SelectScrollUpButton";
17792
- var SelectScrollDownButton = React2__namespace.forwardRef(
17940
+ var SelectScrollDownButton = React4__namespace.forwardRef(
17793
17941
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ScrollDownButton, { ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { "aria-hidden": "true", className: "h-4 w-4" }) })
17794
17942
  );
17795
17943
  SelectScrollDownButton.displayName = "SelectScrollDownButton";
17796
- var SelectContent = React2__namespace.forwardRef(
17944
+ var SelectContent = React4__namespace.forwardRef(
17797
17945
  ({ className, children, position = "popper", viewportClassName, disableTriggerViewportSizing = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Content, { ref, position, className: cn(menuContentClassName, "relative max-h-[var(--radix-select-content-available-height)] overflow-y-auto overflow-x-hidden", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), ...props, children: [
17798
17946
  /* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
17799
17947
  /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { className: cn("p-1", position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)]", position === "popper" && !disableTriggerViewportSizing && "h-[var(--radix-select-trigger-height)]", viewportClassName), children }),
@@ -17801,11 +17949,11 @@ var SelectContent = React2__namespace.forwardRef(
17801
17949
  ] }) })
17802
17950
  );
17803
17951
  SelectContent.displayName = "SelectContent";
17804
- var SelectLabel = React2__namespace.forwardRef(
17952
+ var SelectLabel = React4__namespace.forwardRef(
17805
17953
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Label, { ref, className: cn("px-2 py-1.5 text-sm font-semibold", className), ...props })
17806
17954
  );
17807
17955
  SelectLabel.displayName = "SelectLabel";
17808
- var SelectItem = React2__namespace.forwardRef(
17956
+ var SelectItem = React4__namespace.forwardRef(
17809
17957
  ({ className, children, indicatorClassName, itemText, hideIndicator = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SelectPrimitive__namespace.Item, { ref, className: cn(menuItemClassName, "w-full", hideIndicator ? "px-2" : "pl-8 pr-2", className), ...props, children: [
17810
17958
  !hideIndicator ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("absolute left-2 flex h-3.5 w-3.5 items-center justify-center", indicatorClassName), children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { "aria-hidden": "true", className: "h-4 w-4" }) }) }) : null,
17811
17959
  itemText ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -17815,12 +17963,12 @@ var SelectItem = React2__namespace.forwardRef(
17815
17963
  ] })
17816
17964
  );
17817
17965
  SelectItem.displayName = "SelectItem";
17818
- var SelectSeparator = React2__namespace.forwardRef(
17966
+ var SelectSeparator = React4__namespace.forwardRef(
17819
17967
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })
17820
17968
  );
17821
17969
  SelectSeparator.displayName = "SelectSeparator";
17822
17970
  function ItemAvatar({ item }) {
17823
- const [failed, setFailed] = React2.useState(false);
17971
+ const [failed, setFailed] = React4.useState(false);
17824
17972
  if (item.iconUrl && !failed) {
17825
17973
  return /* @__PURE__ */ jsxRuntime.jsx("img", { src: item.iconUrl, alt: "", className: "size-full object-cover", onError: () => setFailed(true) });
17826
17974
  }
@@ -17828,7 +17976,7 @@ function ItemAvatar({ item }) {
17828
17976
  return initial ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold", children: initial }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bot, { className: "size-4" });
17829
17977
  }
17830
17978
  function SessionAvatar({ item }) {
17831
- const [failed, setFailed] = React2.useState(false);
17979
+ const [failed, setFailed] = React4.useState(false);
17832
17980
  if (item.thumbnailUrl && !failed) {
17833
17981
  return /* @__PURE__ */ jsxRuntime.jsx(
17834
17982
  "img",
@@ -17866,7 +18014,7 @@ function CollectionState({
17866
18014
  if (status === "error") {
17867
18015
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 px-3 py-8 text-center", children: [
17868
18016
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", role: "alert", children: error }),
17869
- /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary", onClick: onRetry, children: [
18017
+ /* @__PURE__ */ jsxRuntime.jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "gap-1.5 px-0 text-sm text-primary hover:text-primary", onClick: onRetry, children: [
17870
18018
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "size-3.5", "aria-hidden": "true" }),
17871
18019
  messages.retry
17872
18020
  ] })
@@ -17898,7 +18046,7 @@ function SessionActions({
17898
18046
  const messages = useMonkeysLocaleMessages().agentWorkbench.navigation;
17899
18047
  if (!capabilities.renameSessions && !capabilities.deleteSessions) return null;
17900
18048
  return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu4, { children: [
17901
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "flex size-8 items-center justify-center rounded-md hover:bg-muted", "aria-label": messages.actions, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Ellipsis, { className: "size-4", "aria-hidden": "true" }) }) }),
18049
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "size-8", "aria-label": messages.actions, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Ellipsis, { className: "size-4", "aria-hidden": "true" }) }) }),
17902
18050
  /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "end", children: [
17903
18051
  capabilities.renameSessions ? /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onSelect: () => onIntent?.({ type: "rename-session", sessionId: item.id, title: item.title }), children: [
17904
18052
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "mr-2 size-4", "aria-hidden": "true" }),
@@ -17922,22 +18070,22 @@ function AgentWorkbenchSidebar({
17922
18070
  const { locale } = useMonkeysLocale();
17923
18071
  const messages = useMonkeysLocaleMessages().agentWorkbench.navigation;
17924
18072
  const sessionsOnly = navigationMode === "sessions-only";
17925
- const searchRef = React2.useRef(null);
17926
- const renameInputRef = React2.useRef(null);
17927
- const [editingSessionId, setEditingSessionId] = React2.useState();
17928
- const [editingTitle, setEditingTitle] = React2.useState("");
18073
+ const searchRef = React4.useRef(null);
18074
+ const renameInputRef = React4.useRef(null);
18075
+ const [editingSessionId, setEditingSessionId] = React4.useState();
18076
+ const [editingTitle, setEditingTitle] = React4.useState("");
17929
18077
  const query = viewModel.searchQuery.trim().toLocaleLowerCase();
17930
- const agents = React2.useMemo(
18078
+ const agents = React4.useMemo(
17931
18079
  () => viewModel.agents.items.filter((item) => !query || `${item.name} ${item.description ?? ""}`.toLocaleLowerCase().includes(query)),
17932
18080
  [query, viewModel.agents.items]
17933
18081
  );
17934
- const sessions = React2.useMemo(
18082
+ const sessions = React4.useMemo(
17935
18083
  () => viewModel.sessions.items.filter((item) => !query || item.title.toLocaleLowerCase().includes(query)),
17936
18084
  [query, viewModel.sessions.items]
17937
18085
  );
17938
- const chatbotSessions = React2.useMemo(() => sessions.filter((item) => item.mode !== "work"), [sessions]);
17939
- const agentSessions = React2.useMemo(() => sessions.filter((item) => item.mode === "work"), [sessions]);
17940
- React2.useEffect(() => {
18086
+ const chatbotSessions = React4.useMemo(() => sessions.filter((item) => item.mode !== "work"), [sessions]);
18087
+ const agentSessions = React4.useMemo(() => sessions.filter((item) => item.mode === "work"), [sessions]);
18088
+ React4.useEffect(() => {
17941
18089
  const handleShortcut = (event) => {
17942
18090
  if (!(event.ctrlKey || event.metaKey) || event.key.toLocaleLowerCase() !== "k") return;
17943
18091
  event.preventDefault();
@@ -17947,7 +18095,7 @@ function AgentWorkbenchSidebar({
17947
18095
  window.addEventListener("keydown", handleShortcut);
17948
18096
  return () => window.removeEventListener("keydown", handleShortcut);
17949
18097
  }, []);
17950
- React2.useEffect(() => {
18098
+ React4.useEffect(() => {
17951
18099
  if (!editingSessionId) return;
17952
18100
  renameInputRef.current?.focus();
17953
18101
  renameInputRef.current?.select();
@@ -17974,12 +18122,13 @@ function AgentWorkbenchSidebar({
17974
18122
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx(SessionAvatar, { item }) }),
17975
18123
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1", children: [
17976
18124
  /* @__PURE__ */ jsxRuntime.jsx(
17977
- "input",
18125
+ Input,
17978
18126
  {
17979
18127
  ref: renameInputRef,
17980
18128
  value: editingTitle,
17981
18129
  "aria-label": messages.rename,
17982
- className: "h-6 w-full rounded border border-primary bg-background px-1.5 text-sm font-medium outline-none",
18130
+ appearance: "compact",
18131
+ className: "h-6 w-full border-primary px-1.5 text-sm font-medium",
17983
18132
  onChange: (event) => setEditingTitle(event.target.value),
17984
18133
  onClick: (event) => event.stopPropagation(),
17985
18134
  onBlur: () => saveRenameSession(item),
@@ -18009,7 +18158,7 @@ function AgentWorkbenchSidebar({
18009
18158
  percent,
18010
18159
  "%"
18011
18160
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(StatusIndicator, { status: item.status }),
18012
- viewModel.capabilities.pinSessions ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-label": item.pinned ? messages.unpin : messages.pin, className: cn2("flex size-8 items-center justify-center rounded-md text-muted-foreground opacity-0 hover:bg-muted group-hover:opacity-100", item.pinned && "text-primary opacity-100"), onClick: (event) => {
18161
+ viewModel.capabilities.pinSessions ? /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "ghost", size: "icon", "aria-label": item.pinned ? messages.unpin : messages.pin, className: cn2("size-8 text-muted-foreground opacity-0 group-hover:opacity-100", item.pinned && "text-primary opacity-100"), onClick: (event) => {
18013
18162
  event.stopPropagation();
18014
18163
  onIntent?.({ type: "toggle-session-pin", sessionId: item.id, pinned: !item.pinned });
18015
18164
  }, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pin, { className: cn2("size-4", item.pinned && "fill-current") }) }) : null,
@@ -18027,17 +18176,17 @@ function AgentWorkbenchSidebar({
18027
18176
  className: "flex h-full min-h-0 flex-col bg-background text-foreground",
18028
18177
  children: [
18029
18178
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "shrink-0 space-y-3 p-4 pb-2", children: [
18030
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn2("flex h-10 items-center gap-2 rounded-lg border border-border bg-card px-3 focus-within:ring-2 focus-within:ring-ring", classNames?.search), children: [
18031
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }),
18179
+ /* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { className: cn2("h-10 rounded-lg bg-card", classNames?.search), children: [
18180
+ /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "size-4", "aria-hidden": "true" }) }),
18032
18181
  /* @__PURE__ */ jsxRuntime.jsx(
18033
- "input",
18182
+ InputGroupInput,
18034
18183
  {
18035
18184
  ref: searchRef,
18036
18185
  type: "search",
18037
18186
  value: viewModel.searchQuery,
18038
18187
  "aria-label": sessionsOnly ? messages.searchSessions : messages.search,
18039
18188
  placeholder: sessionsOnly ? messages.searchSessions : messages.search,
18040
- className: "min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:hidden",
18189
+ className: "min-w-0 [&::-webkit-search-cancel-button]:hidden",
18041
18190
  onChange: (event) => onIntent?.({ type: "change-search", query: event.target.value }),
18042
18191
  onKeyDown: (event) => {
18043
18192
  if (event.key !== "Escape") return;
@@ -18046,7 +18195,7 @@ function AgentWorkbenchSidebar({
18046
18195
  }
18047
18196
  }
18048
18197
  ),
18049
- viewModel.searchQuery ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "flex size-6 items-center justify-center rounded-md hover:bg-muted", "aria-label": messages.clearSearch, onClick: () => onIntent?.({ type: "change-search", query: "" }), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-3.5", "aria-hidden": "true" }) }) : /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "rounded border border-border px-1.5 py-0.5 text-[10px] text-muted-foreground", children: "Ctrl K" })
18198
+ viewModel.searchQuery ? /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx(InputGroupButton, { size: "icon-xs", "aria-label": messages.clearSearch, onClick: () => onIntent?.({ type: "change-search", query: "" }), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-3.5", "aria-hidden": "true" }) }) }) : /* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "border border-border px-1.5 py-0.5 text-[10px]", children: "Ctrl K" }) })
18050
18199
  ] }),
18051
18200
  !sessionsOnly || headerActions ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
18052
18201
  !sessionsOnly ? /* @__PURE__ */ jsxRuntime.jsxs(TabsList, { className: cn2("grid min-w-0 flex-1 grid-cols-2 text-foreground", classNames?.tabs), "aria-label": messages.tabsLabel, children: [
@@ -18057,7 +18206,7 @@ function AgentWorkbenchSidebar({
18057
18206
  ] }) : null
18058
18207
  ] }),
18059
18208
  !sessionsOnly ? /* @__PURE__ */ jsxRuntime.jsxs(TabsContent, { value: "agents", className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto px-4 pb-4", classNames?.body), children: [
18060
- viewModel.capabilities.createAgent ? /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "mb-3 flex h-9 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "create-agent" }), children: [
18209
+ viewModel.capabilities.createAgent ? /* @__PURE__ */ jsxRuntime.jsxs(Button, { type: "button", variant: "ghost", className: "mb-3 h-9 w-full justify-start gap-2 px-3 text-sm", onClick: () => onIntent?.({ type: "create-agent" }), children: [
18061
18210
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-4", "aria-hidden": "true" }),
18062
18211
  messages.newAgent
18063
18212
  ] }) : null,
@@ -18078,11 +18227,13 @@ function AgentWorkbenchSidebar({
18078
18227
  ] }),
18079
18228
  item.builtIn ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-muted px-1.5 py-1 text-[10px] text-foreground", children: messages.builtIn }) : null,
18080
18229
  viewModel.capabilities.pinAgents ? /* @__PURE__ */ jsxRuntime.jsx(
18081
- "button",
18230
+ Button,
18082
18231
  {
18083
18232
  type: "button",
18233
+ variant: "ghost",
18234
+ size: "icon",
18084
18235
  "aria-label": item.pinned ? messages.unpin : messages.pin,
18085
- className: cn2("flex size-8 items-center justify-center rounded-md text-muted-foreground opacity-0 hover:bg-muted group-hover:opacity-100", item.pinned && "text-primary opacity-100"),
18236
+ className: cn2("size-8 text-muted-foreground opacity-0 group-hover:opacity-100", item.pinned && "text-primary opacity-100"),
18086
18237
  onClick: (event) => {
18087
18238
  event.stopPropagation();
18088
18239
  onIntent?.({ type: "toggle-agent-pin", itemId: item.id, pinned: !item.pinned });
@@ -18103,11 +18254,11 @@ function AgentWorkbenchSidebar({
18103
18254
  )) })
18104
18255
  ] }) : null,
18105
18256
  /* @__PURE__ */ jsxRuntime.jsxs(TabsContent, { value: "sessions", className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto px-4 pb-4", classNames?.body), children: [
18106
- viewModel.capabilities.createSession ? /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "flex h-9 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "create-session" }), children: [
18257
+ viewModel.capabilities.createSession ? /* @__PURE__ */ jsxRuntime.jsxs(Button, { type: "button", variant: "ghost", className: "h-9 w-full justify-start gap-2 px-3 text-sm", onClick: () => onIntent?.({ type: "create-session" }), children: [
18107
18258
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SquarePen, { className: "size-4", "aria-hidden": "true" }),
18108
18259
  messages.newSession
18109
18260
  ] }) : null,
18110
- !sessionsOnly && viewModel.capabilities.manageCapabilities ? /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "mb-3 flex h-9 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "open-capabilities" }), children: [
18261
+ !sessionsOnly && viewModel.capabilities.manageCapabilities ? /* @__PURE__ */ jsxRuntime.jsxs(Button, { type: "button", variant: "ghost", className: "mb-3 h-9 w-full justify-start gap-2 px-3 text-sm", onClick: () => onIntent?.({ type: "open-capabilities" }), children: [
18111
18262
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Blocks, { className: "size-4", "aria-hidden": "true" }),
18112
18263
  messages.capabilities
18113
18264
  ] }) : null,
@@ -18124,7 +18275,7 @@ function AgentWorkbenchSidebar({
18124
18275
  renderSessionItems(items)
18125
18276
  ] }, id)) }) : !sessionsOnly ? renderSessionItems(sessions) : null
18126
18277
  ] }),
18127
- !sessionsOnly && viewModel.capabilities.manageAgentSettings ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn2("shrink-0 border-t border-border p-4", classNames?.footer), children: /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "flex h-10 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "open-agent-settings" }), children: [
18278
+ !sessionsOnly && viewModel.capabilities.manageAgentSettings ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn2("shrink-0 border-t border-border p-4", classNames?.footer), children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { type: "button", variant: "ghost", className: "h-10 w-full justify-start gap-2 px-3 text-sm", onClick: () => onIntent?.({ type: "open-agent-settings" }), children: [
18128
18279
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "size-4", "aria-hidden": "true" }),
18129
18280
  messages.settings
18130
18281
  ] }) }) : null
@@ -18261,7 +18412,7 @@ function AgentWorkbenchTool({
18261
18412
  onExpandedChange
18262
18413
  }) {
18263
18414
  const messages = useMonkeysLocaleMessages().agentWorkbench.tool;
18264
- const [uncontrolledExpanded, setUncontrolledExpanded] = React2.useState(defaultExpanded);
18415
+ const [uncontrolledExpanded, setUncontrolledExpanded] = React4.useState(defaultExpanded);
18265
18416
  const isControlled = expanded !== void 0;
18266
18417
  const isExpanded = expanded ?? uncontrolledExpanded;
18267
18418
  const status = event.payload.status;
@@ -18535,10 +18686,11 @@ function AgentWorkbenchActivity({
18535
18686
  event.payload.requestedAction !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsx(JsonValue2, { value: event.payload.requestedAction }) }) : null,
18536
18687
  requested ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
18537
18688
  /* @__PURE__ */ jsxRuntime.jsx(
18538
- "button",
18689
+ Button,
18539
18690
  {
18540
18691
  type: "button",
18541
- className: "rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground outline-none hover:bg-primary/90 focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
18692
+ size: "sm",
18693
+ className: "h-auto px-3 py-1.5 text-sm",
18542
18694
  disabled: !onApprovalDecision,
18543
18695
  onClick: () => onApprovalDecision?.({
18544
18696
  approvalId: event.payload.approvalId,
@@ -18548,10 +18700,12 @@ function AgentWorkbenchActivity({
18548
18700
  }
18549
18701
  ),
18550
18702
  /* @__PURE__ */ jsxRuntime.jsx(
18551
- "button",
18703
+ Button,
18552
18704
  {
18553
18705
  type: "button",
18554
- className: "rounded-md border border-border bg-background px-3 py-1.5 text-sm font-medium text-foreground outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
18706
+ variant: "outline",
18707
+ size: "sm",
18708
+ className: "h-auto px-3 py-1.5 text-sm",
18555
18709
  disabled: !onApprovalDecision,
18556
18710
  onClick: () => onApprovalDecision?.({
18557
18711
  approvalId: event.payload.approvalId,
@@ -18583,10 +18737,12 @@ function AgentWorkbenchActivity({
18583
18737
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: messages.artifact[event.payload.status] })
18584
18738
  ] }),
18585
18739
  event.payload.url ? /* @__PURE__ */ jsxRuntime.jsx(
18586
- "button",
18740
+ Button,
18587
18741
  {
18588
18742
  type: "button",
18589
- className: "rounded-md p-2 text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
18743
+ variant: "ghost",
18744
+ size: "icon",
18745
+ className: "text-muted-foreground hover:text-foreground",
18590
18746
  "aria-label": messages.artifact.open({
18591
18747
  name: event.payload.name
18592
18748
  }),
@@ -18854,20 +19010,23 @@ function SummaryPanel({
18854
19010
  error ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 rounded-md border border-destructive/30 bg-destructive/5 p-2.5 text-sm text-destructive-text", role: "alert", children: error.payload.message }) : null,
18855
19011
  retryable || canResume ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
18856
19012
  retryable ? /* @__PURE__ */ jsxRuntime.jsx(
18857
- "button",
19013
+ Button,
18858
19014
  {
18859
19015
  type: "button",
18860
- className: "rounded-md border border-border bg-background px-2.5 py-1.5 text-xs font-medium outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
19016
+ variant: "outline",
19017
+ size: "sm",
19018
+ className: "h-auto px-2.5 py-1.5 text-xs",
18861
19019
  disabled: !onIntent,
18862
19020
  onClick: () => onIntent?.({ type: "retry", eventId: error.eventId }),
18863
19021
  children: messages.actions.retry
18864
19022
  }
18865
19023
  ) : null,
18866
19024
  canResume ? /* @__PURE__ */ jsxRuntime.jsx(
18867
- "button",
19025
+ Button,
18868
19026
  {
18869
19027
  type: "button",
18870
- className: "rounded-md bg-primary px-2.5 py-1.5 text-xs font-medium text-primary-foreground outline-none hover:bg-primary/90 focus-visible:ring-2 focus-visible:ring-ring",
19028
+ size: "sm",
19029
+ className: "h-auto px-2.5 py-1.5 text-xs",
18871
19030
  disabled: !onIntent,
18872
19031
  onClick: () => onIntent?.({ type: "resume", sessionId: model.sessionId }),
18873
19032
  children: messages.actions.resume
@@ -18877,10 +19036,12 @@ function SummaryPanel({
18877
19036
  ] }),
18878
19037
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-wrap gap-2 rounded-lg border border-border bg-card p-3 text-card-foreground", children: [
18879
19038
  canContinueInNewTask ? /* @__PURE__ */ jsxRuntime.jsxs(
18880
- "button",
19039
+ Button,
18881
19040
  {
18882
19041
  type: "button",
18883
- className: "inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-2.5 py-1.5 text-xs font-medium outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
19042
+ variant: "outline",
19043
+ size: "sm",
19044
+ className: "h-auto gap-1.5 px-2.5 py-1.5 text-xs",
18884
19045
  disabled: !onIntent,
18885
19046
  onClick: () => onIntent?.({ type: "continue-in-new-task", sessionId: model.sessionId }),
18886
19047
  children: [
@@ -18890,10 +19051,12 @@ function SummaryPanel({
18890
19051
  }
18891
19052
  ) : null,
18892
19053
  canEditAndRerun ? /* @__PURE__ */ jsxRuntime.jsxs(
18893
- "button",
19054
+ Button,
18894
19055
  {
18895
19056
  type: "button",
18896
- className: "inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-2.5 py-1.5 text-xs font-medium outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
19057
+ variant: "outline",
19058
+ size: "sm",
19059
+ className: "h-auto gap-1.5 px-2.5 py-1.5 text-xs",
18897
19060
  disabled: !onIntent,
18898
19061
  onClick: () => onIntent?.({ type: "edit-and-rerun", sessionId: model.sessionId }),
18899
19062
  children: [
@@ -18903,10 +19066,12 @@ function SummaryPanel({
18903
19066
  }
18904
19067
  ) : null,
18905
19068
  /* @__PURE__ */ jsxRuntime.jsxs(
18906
- "button",
19069
+ Button,
18907
19070
  {
18908
19071
  type: "button",
18909
- className: "inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-2.5 py-1.5 text-xs font-medium outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
19072
+ variant: "outline",
19073
+ size: "sm",
19074
+ className: "h-auto gap-1.5 px-2.5 py-1.5 text-xs",
18910
19075
  disabled: !onIntent,
18911
19076
  onClick: () => onIntent?.({ type: "export", sessionId: model.sessionId }),
18912
19077
  children: [
@@ -18920,10 +19085,12 @@ function SummaryPanel({
18920
19085
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
18921
19086
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold", children: messages.summary }),
18922
19087
  summary?.payload.text ? /* @__PURE__ */ jsxRuntime.jsx(
18923
- "button",
19088
+ Button,
18924
19089
  {
18925
19090
  type: "button",
18926
- className: "rounded-md p-1.5 text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
19091
+ variant: "ghost",
19092
+ size: "icon",
19093
+ className: "size-8 text-muted-foreground hover:text-foreground",
18927
19094
  "aria-label": messages.actions.copySummary,
18928
19095
  disabled: !onIntent,
18929
19096
  onClick: () => onIntent?.({
@@ -18938,10 +19105,12 @@ function SummaryPanel({
18938
19105
  summary?.payload.status === "failed" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 space-y-2", children: [
18939
19106
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive-text", role: "alert", children: messages.summaryFailed }),
18940
19107
  /* @__PURE__ */ jsxRuntime.jsxs(
18941
- "button",
19108
+ Button,
18942
19109
  {
18943
19110
  type: "button",
18944
- className: "inline-flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs font-medium outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
19111
+ variant: "outline",
19112
+ size: "sm",
19113
+ className: "h-auto gap-1.5 px-2.5 py-1.5 text-xs",
18945
19114
  disabled: !onIntent,
18946
19115
  onClick: () => onIntent?.({ type: "retry-summary", eventId: summary.eventId }),
18947
19116
  children: [
@@ -19078,16 +19247,6 @@ function AgentWorkbenchTaskDetails({
19078
19247
  { id: "summary", label: messages.tabs.summary, count: model.summary ? 1 : 0 },
19079
19248
  ...workspaceAvailable ? [{ id: "workspace", label: messages.tabs.workspace, count: workspaceCount }] : []
19080
19249
  ];
19081
- const tabId = (tab) => `agent-workbench-details-${viewModel.sessionId}-${tab}`.replace(
19082
- /[^a-zA-Z0-9_-]/g,
19083
- "-"
19084
- );
19085
- const onTabKeyDown = (event, index) => {
19086
- if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return;
19087
- event.preventDefault();
19088
- const nextIndex = event.key === "Home" ? 0 : event.key === "End" ? tabs.length - 1 : (index + (event.key === "ArrowRight" ? 1 : -1) + tabs.length) % tabs.length;
19089
- onActiveTabChange?.(tabs[nextIndex].id);
19090
- };
19091
19250
  return /* @__PURE__ */ jsxRuntime.jsxs(
19092
19251
  "aside",
19093
19252
  {
@@ -19104,54 +19263,71 @@ function AgentWorkbenchTaskDetails({
19104
19263
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: messages.description })
19105
19264
  ] }),
19106
19265
  onIntent ? /* @__PURE__ */ jsxRuntime.jsx(
19107
- "button",
19266
+ Button,
19108
19267
  {
19109
19268
  type: "button",
19110
- className: "rounded-md p-2 text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
19269
+ variant: "ghost",
19270
+ size: "icon",
19271
+ className: "text-muted-foreground hover:text-foreground",
19111
19272
  "aria-label": messages.actions.close,
19112
19273
  onClick: () => onIntent({ type: "close" }),
19113
19274
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4", "aria-hidden": "true" })
19114
19275
  }
19115
19276
  ) : null
19116
19277
  ] }),
19117
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn2("flex shrink-0 gap-1 border-b border-border px-3 py-2", classNames?.tabs), role: "tablist", "aria-label": messages.tabs.label, children: tabs.map((tab, index) => /* @__PURE__ */ jsxRuntime.jsxs(
19118
- "button",
19278
+ /* @__PURE__ */ jsxRuntime.jsxs(
19279
+ Tabs,
19119
19280
  {
19120
- id: tabId(tab.id),
19121
- type: "button",
19122
- role: "tab",
19123
- "aria-selected": resolvedTab === tab.id,
19124
- "aria-controls": `${tabId(tab.id)}-panel`,
19125
- tabIndex: resolvedTab === tab.id ? 0 : -1,
19126
- className: cn2(
19127
- "inline-flex min-w-0 flex-1 items-center justify-center gap-1 rounded-md px-2 py-1.5 text-xs font-medium outline-none focus-visible:ring-2 focus-visible:ring-ring",
19128
- resolvedTab === tab.id ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-muted hover:text-foreground"
19129
- ),
19130
- onClick: () => onActiveTabChange?.(tab.id),
19131
- onKeyDown: (event) => onTabKeyDown(event, index),
19281
+ value: resolvedTab,
19282
+ className: "flex min-h-0 flex-1 flex-col",
19283
+ onValueChange: (tab) => onActiveTabChange?.(tab),
19132
19284
  children: [
19133
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: tab.label }),
19134
- /* @__PURE__ */ jsxRuntime.jsx(Count, { value: tab.count })
19285
+ /* @__PURE__ */ jsxRuntime.jsx(
19286
+ TabsList,
19287
+ {
19288
+ "aria-label": messages.tabs.label,
19289
+ className: cn2(
19290
+ "flex h-auto shrink-0 gap-1 rounded-none border-b border-border bg-transparent px-3 py-2",
19291
+ classNames?.tabs
19292
+ ),
19293
+ children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsxs(
19294
+ TabsTrigger,
19295
+ {
19296
+ value: tab.id,
19297
+ className: "min-w-0 flex-1 gap-1 px-2 py-1.5 text-xs shadow-none data-[state=active]:bg-primary/10 data-[state=active]:text-primary data-[state=active]:shadow-none",
19298
+ children: [
19299
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: tab.label }),
19300
+ /* @__PURE__ */ jsxRuntime.jsx(Count, { value: tab.count })
19301
+ ]
19302
+ },
19303
+ tab.id
19304
+ ))
19305
+ }
19306
+ ),
19307
+ /* @__PURE__ */ jsxRuntime.jsx(
19308
+ TabsContent,
19309
+ {
19310
+ value: "summary",
19311
+ className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto p-3", classNames?.body),
19312
+ children: /* @__PURE__ */ jsxRuntime.jsx(SummaryPanel, { model, onIntent })
19313
+ }
19314
+ ),
19315
+ workspaceAvailable ? /* @__PURE__ */ jsxRuntime.jsx(
19316
+ TabsContent,
19317
+ {
19318
+ value: "workspace",
19319
+ className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto p-3", classNames?.body),
19320
+ children: /* @__PURE__ */ jsxRuntime.jsx(
19321
+ WorkspacePanel,
19322
+ {
19323
+ model,
19324
+ sectionClassName: classNames?.section,
19325
+ codeClassName: classNames?.code
19326
+ }
19327
+ )
19328
+ }
19329
+ ) : null
19135
19330
  ]
19136
- },
19137
- tab.id
19138
- )) }),
19139
- /* @__PURE__ */ jsxRuntime.jsx(
19140
- "div",
19141
- {
19142
- id: `${tabId(resolvedTab)}-panel`,
19143
- role: "tabpanel",
19144
- "aria-labelledby": tabId(resolvedTab),
19145
- tabIndex: 0,
19146
- className: cn2("min-h-0 flex-1 overflow-y-auto p-3 outline-none", classNames?.body),
19147
- children: resolvedTab === "summary" ? /* @__PURE__ */ jsxRuntime.jsx(SummaryPanel, { model, onIntent }) : /* @__PURE__ */ jsxRuntime.jsx(
19148
- WorkspacePanel,
19149
- {
19150
- model,
19151
- sectionClassName: classNames?.section,
19152
- codeClassName: classNames?.code
19153
- }
19154
- )
19155
19331
  }
19156
19332
  )
19157
19333
  ]
@@ -19329,9 +19505,9 @@ function LoginPage({
19329
19505
  externalPanel,
19330
19506
  callout
19331
19507
  }) {
19332
- const availableMethods = React2.useMemo(() => methods.filter((method) => !method.hidden), [methods]);
19508
+ const availableMethods = React4.useMemo(() => methods.filter((method) => !method.hidden), [methods]);
19333
19509
  const fallbackMethodId = defaultMethodId ?? availableMethods[0]?.id;
19334
- const [internalMethodId, setInternalMethodId] = React2.useState(fallbackMethodId);
19510
+ const [internalMethodId, setInternalMethodId] = React4.useState(fallbackMethodId);
19335
19511
  const currentMethodId = activeMethodId ?? internalMethodId;
19336
19512
  const activeMethod = availableMethods.find((method) => method.id === currentMethodId) ?? availableMethods[0];
19337
19513
  const hasTabs = availableMethods.length > 1;
@@ -19343,7 +19519,7 @@ function LoginPage({
19343
19519
  const { lightUrl: logoLightUrl, darkUrl: logoDarkUrl } = resolveLogoUrls(logo);
19344
19520
  const hasLogo = Boolean(logoLightUrl || logoDarkUrl);
19345
19521
  const usesSeparateModeLogos = Boolean(logoLightUrl && logoDarkUrl && logoLightUrl !== logoDarkUrl);
19346
- React2.useEffect(() => {
19522
+ React4.useEffect(() => {
19347
19523
  if (!availableMethods.length) {
19348
19524
  setInternalMethodId(void 0);
19349
19525
  return;
@@ -19375,7 +19551,7 @@ function LoginPage({
19375
19551
  ]
19376
19552
  }
19377
19553
  );
19378
- return /* @__PURE__ */ jsxRuntime.jsx(React2__namespace.default.Fragment, { children: method.render ? method.render(button) : button }, method.id);
19554
+ return /* @__PURE__ */ jsxRuntime.jsx(React4__namespace.default.Fragment, { children: method.render ? method.render(button) : button }, method.id);
19379
19555
  };
19380
19556
  return /* @__PURE__ */ jsxRuntime.jsxs(
19381
19557
  "main",
@@ -19660,7 +19836,7 @@ function readStoredLayout(storageKey, options) {
19660
19836
  return fallback;
19661
19837
  }
19662
19838
  }
19663
- var WorkbenchResizableSidebar = React2.forwardRef(
19839
+ var WorkbenchResizableSidebar = React4.forwardRef(
19664
19840
  function WorkbenchResizableSidebar2({
19665
19841
  title,
19666
19842
  items,
@@ -19689,7 +19865,7 @@ var WorkbenchResizableSidebar = React2.forwardRef(
19689
19865
  classNames,
19690
19866
  style
19691
19867
  }, ref) {
19692
- const initialLayoutRef = React2.useRef(null);
19868
+ const initialLayoutRef = React4.useRef(null);
19693
19869
  if (!initialLayoutRef.current) {
19694
19870
  initialLayoutRef.current = readStoredLayout(storageKey, {
19695
19871
  defaultCollapsed,
@@ -19698,10 +19874,10 @@ var WorkbenchResizableSidebar = React2.forwardRef(
19698
19874
  maxWidth
19699
19875
  });
19700
19876
  }
19701
- const sidebarRef = React2.useRef(null);
19702
- const [internalCollapsed, setInternalCollapsed] = React2.useState(initialLayoutRef.current.collapsed);
19703
- const [internalWidth, setInternalWidth] = React2.useState(initialLayoutRef.current.width);
19704
- const [isResizing, setIsResizing] = React2.useState(false);
19877
+ const sidebarRef = React4.useRef(null);
19878
+ const [internalCollapsed, setInternalCollapsed] = React4.useState(initialLayoutRef.current.collapsed);
19879
+ const [internalWidth, setInternalWidth] = React4.useState(initialLayoutRef.current.width);
19880
+ const [isResizing, setIsResizing] = React4.useState(false);
19705
19881
  const resolvedCollapsed = collapsed ?? internalCollapsed;
19706
19882
  const resolvedWidth = width ?? internalWidth;
19707
19883
  const isCollapsedControlled = collapsed !== void 0;
@@ -19749,14 +19925,14 @@ var WorkbenchResizableSidebar = React2.forwardRef(
19749
19925
  updateWidth(resolvedWidth + 24);
19750
19926
  }
19751
19927
  };
19752
- React2.useEffect(() => {
19928
+ React4.useEffect(() => {
19753
19929
  if (typeof window === "undefined" || !storageKey) return;
19754
19930
  window.localStorage.setItem(storageKey, JSON.stringify({
19755
19931
  collapsed: resolvedCollapsed,
19756
19932
  width: clampWidth2(resolvedWidth, minWidth, maxWidth)
19757
19933
  }));
19758
19934
  }, [maxWidth, minWidth, resolvedCollapsed, resolvedWidth, storageKey]);
19759
- React2.useEffect(() => {
19935
+ React4.useEffect(() => {
19760
19936
  if (!isResizing) return void 0;
19761
19937
  const handlePointerMove = (event) => {
19762
19938
  const sidebarNode = sidebarRef.current;
@@ -19909,7 +20085,7 @@ function shouldRenderBodyWrapper(props) {
19909
20085
  props.header || props.footer || props.bodyAs || props.bodyClassName || props.bodyProps || props.classNames?.body
19910
20086
  );
19911
20087
  }
19912
- var WorkbenchContentPane = React2.forwardRef(
20088
+ var WorkbenchContentPane = React4.forwardRef(
19913
20089
  function WorkbenchContentPane2({
19914
20090
  as: Component = "section",
19915
20091
  bodyAs: BodyComponent = "div",
@@ -20325,9 +20501,9 @@ function WorkbenchGallerySettingsButton({
20325
20501
  ...panelProps
20326
20502
  }) {
20327
20503
  const resolvedLabels = { ...defaultLabels, ...labels };
20328
- const rootRef = React2.useRef(null);
20329
- const [uncontrolledOpen, setUncontrolledOpen] = React2.useState(defaultOpen);
20330
- const [popoverStyle, setPopoverStyle] = React2.useState({});
20504
+ const rootRef = React4.useRef(null);
20505
+ const [uncontrolledOpen, setUncontrolledOpen] = React4.useState(defaultOpen);
20506
+ const [popoverStyle, setPopoverStyle] = React4.useState({});
20331
20507
  const isControlled = open !== void 0;
20332
20508
  const isOpen = isControlled ? Boolean(open) : uncontrolledOpen;
20333
20509
  const setOpen = (nextOpen) => {
@@ -20336,7 +20512,7 @@ function WorkbenchGallerySettingsButton({
20336
20512
  }
20337
20513
  onOpenChange?.(nextOpen);
20338
20514
  };
20339
- React2.useLayoutEffect(() => {
20515
+ React4.useLayoutEffect(() => {
20340
20516
  if (!isOpen) return void 0;
20341
20517
  const updatePopoverPosition = () => {
20342
20518
  const triggerRect = rootRef.current?.getBoundingClientRect();
@@ -20482,11 +20658,11 @@ function WorkbenchContentToolbarViewModeControl({
20482
20658
  onValueChange,
20483
20659
  classNames
20484
20660
  }) {
20485
- const rootRef = React2.useRef(null);
20486
- const [open, setOpen] = React2.useState(false);
20661
+ const rootRef = React4.useRef(null);
20662
+ const [open, setOpen] = React4.useState(false);
20487
20663
  const activeOption = options.find((option) => option.value === value) || options.find((option) => !option.disabled) || options[0];
20488
20664
  const activeIcon = activeOption ? getViewModeOptionIcon(activeOption) : null;
20489
- React2.useEffect(() => {
20665
+ React4.useEffect(() => {
20490
20666
  if (!open) return void 0;
20491
20667
  const handlePointerDown = (event) => {
20492
20668
  if (!rootRef.current?.contains(event.target)) {
@@ -20563,7 +20739,7 @@ function WorkbenchContentToolbarViewModeControl({
20563
20739
  ) : null
20564
20740
  ] });
20565
20741
  }
20566
- var WorkbenchContentToolbar = React2.forwardRef(
20742
+ var WorkbenchContentToolbar = React4.forwardRef(
20567
20743
  function WorkbenchContentToolbar2({
20568
20744
  as: Component = "div",
20569
20745
  children,
@@ -20656,7 +20832,7 @@ function hasRenderableChildren(children) {
20656
20832
  if (children === null || children === void 0 || typeof children === "boolean") return false;
20657
20833
  if (typeof children === "string") return children.trim().length > 0;
20658
20834
  if (Array.isArray(children)) return children.some(hasRenderableChildren);
20659
- const childList = React2.Children.toArray(children);
20835
+ const childList = React4.Children.toArray(children);
20660
20836
  if (!childList.length) return false;
20661
20837
  return childList.some((child) => typeof child === "string" ? child.trim().length > 0 : true);
20662
20838
  }
@@ -20695,7 +20871,7 @@ function getMediaDisplayData(value) {
20695
20871
  const isImageUrl = /\.(avif|gif|jpe?g|png|svg|webp)(\?.*)?$/i.test(value);
20696
20872
  return isDataImage || isImageUrl ? { src: value } : null;
20697
20873
  }
20698
- if (typeof value !== "object" || React2.isValidElement(value)) return null;
20874
+ if (typeof value !== "object" || React4.isValidElement(value)) return null;
20699
20875
  const media = value;
20700
20876
  const src = media.src || media.url || media.thumbnail || media.preview || media.image;
20701
20877
  return src ? {
@@ -20719,7 +20895,7 @@ function renderMaybeFieldIcon(icon, className) {
20719
20895
  return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("inline-flex h-3.5 min-w-3.5 shrink-0 items-center justify-center rounded-sm text-[10px] font-semibold text-primary", className), children: icon });
20720
20896
  }
20721
20897
  if (typeof icon === "boolean") return null;
20722
- if (React2.isValidElement(icon)) return icon;
20898
+ if (React4.isValidElement(icon)) return icon;
20723
20899
  const IconComponent = icon;
20724
20900
  return /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: cn("h-3.5 w-3.5 shrink-0 text-primary", className) });
20725
20901
  }
@@ -20747,7 +20923,7 @@ function WorkbenchDetailSidebarMediaValue({
20747
20923
  }
20748
20924
  function getDefaultDetailDisplayValue(value, emptyValue, field, classNames) {
20749
20925
  if (isEmptyDetailValue(value)) return emptyValue;
20750
- if (React2.isValidElement(value)) return value;
20926
+ if (React4.isValidElement(value)) return value;
20751
20927
  if (shouldRenderAsMedia(field, value)) {
20752
20928
  const media = getMediaDisplayData(value);
20753
20929
  if (media) return /* @__PURE__ */ jsxRuntime.jsx(WorkbenchDetailSidebarMediaValue, { media, classNames });
@@ -20842,7 +21018,7 @@ function WorkbenchDetailSidebarAutoContent({
20842
21018
  ] }, sectionKey);
20843
21019
  }) });
20844
21020
  }
20845
- var WorkbenchDetailSidebar = React2.forwardRef(
21021
+ var WorkbenchDetailSidebar = React4.forwardRef(
20846
21022
  function WorkbenchDetailSidebar2({
20847
21023
  as: Component = "aside",
20848
21024
  bodyAs: BodyComponent = "div",
@@ -20933,11 +21109,11 @@ var WorkbenchDetailSidebar = React2.forwardRef(
20933
21109
  );
20934
21110
  function isWorkbenchIconComponent(icon) {
20935
21111
  if (typeof icon === "function") return true;
20936
- return typeof icon === "object" && icon !== null && !React2.isValidElement(icon) && "$$typeof" in icon;
21112
+ return typeof icon === "object" && icon !== null && !React4.isValidElement(icon) && "$$typeof" in icon;
20937
21113
  }
20938
21114
  function renderWorkbenchIcon(icon, className) {
20939
21115
  if (!icon) return null;
20940
- if (React2.isValidElement(icon)) return icon;
21116
+ if (React4.isValidElement(icon)) return icon;
20941
21117
  if (isWorkbenchIconComponent(icon)) {
20942
21118
  const Icon2 = icon;
20943
21119
  return /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className });
@@ -21069,22 +21245,22 @@ function WorkbenchTableView({
21069
21245
  hiddenRowsMessage
21070
21246
  }) {
21071
21247
  const columnKeySignature = columns.map((column) => column.key).join("");
21072
- const defaultColumnOrder = React2.useMemo(() => columnKeySignature ? columnKeySignature.split("") : [], [columnKeySignature]);
21073
- const [internalColumnOrder, setInternalColumnOrder] = React2.useState(defaultColumnOrder);
21074
- const [internalColumnSizes, setInternalColumnSizes] = React2.useState({});
21075
- React2.useEffect(() => {
21248
+ const defaultColumnOrder = React4.useMemo(() => columnKeySignature ? columnKeySignature.split("") : [], [columnKeySignature]);
21249
+ const [internalColumnOrder, setInternalColumnOrder] = React4.useState(defaultColumnOrder);
21250
+ const [internalColumnSizes, setInternalColumnSizes] = React4.useState({});
21251
+ React4.useEffect(() => {
21076
21252
  setInternalColumnOrder((current) => normalizeColumnOrder(defaultColumnOrder, current));
21077
21253
  }, [defaultColumnOrder]);
21078
21254
  const resolvedColumnOrder = columnOrder ? normalizeColumnOrder(defaultColumnOrder, columnOrder) : internalColumnOrder;
21079
21255
  const resolvedColumnSizes = columnSizes ?? internalColumnSizes;
21080
- const handleColumnOrderChange = React2.useCallback((nextOrder, detail) => {
21256
+ const handleColumnOrderChange = React4.useCallback((nextOrder, detail) => {
21081
21257
  const normalizedOrder = normalizeColumnOrder(defaultColumnOrder, nextOrder);
21082
21258
  if (!columnOrder) {
21083
21259
  setInternalColumnOrder(normalizedOrder);
21084
21260
  }
21085
21261
  onColumnOrderChange?.(normalizedOrder, detail);
21086
21262
  }, [columnOrder, defaultColumnOrder, onColumnOrderChange]);
21087
- const handleColumnSizeChange = React2.useCallback((columnId, width, detail) => {
21263
+ const handleColumnSizeChange = React4.useCallback((columnId, width, detail) => {
21088
21264
  if (!columnSizes) {
21089
21265
  setInternalColumnSizes((current) => ({
21090
21266
  ...current,
@@ -21481,29 +21657,29 @@ function InteractiveTable({
21481
21657
  }) {
21482
21658
  const internalLabels = useMonkeysLocaleMessages().workbench.interactiveTable;
21483
21659
  const columnKeySignature = columns.map((column) => column.key).join("");
21484
- const defaultOrder = React2.useMemo(
21660
+ const defaultOrder = React4.useMemo(
21485
21661
  () => columnKeySignature ? columnKeySignature.split("") : [],
21486
21662
  [columnKeySignature]
21487
21663
  );
21488
- const defaultSizes = React2.useMemo(
21664
+ const defaultSizes = React4.useMemo(
21489
21665
  () => buildDefaultColumnSizes(columns, defaultColumnSizes),
21490
21666
  [columns, defaultColumnSizes]
21491
21667
  );
21492
- const [internalColumnOrder, setInternalColumnOrder] = React2.useState(defaultOrder);
21493
- const [internalColumnSizes, setInternalColumnSizes] = React2.useState(() => loadStoredColumnSizes(columnStorageKey, defaultSizes));
21494
- const [internalFrozenColumnCount, setInternalFrozenColumnCount] = React2.useState(() => loadStoredFrozenColumnCount(columnStorageKey, frozenColumnCount, columns.length));
21495
- const [internalFrozenEndColumnCount, setInternalFrozenEndColumnCount] = React2.useState(() => loadStoredFrozenEndColumnCount(columnStorageKey, frozenEndColumnCount, columns.length));
21496
- React2.useEffect(() => {
21668
+ const [internalColumnOrder, setInternalColumnOrder] = React4.useState(defaultOrder);
21669
+ const [internalColumnSizes, setInternalColumnSizes] = React4.useState(() => loadStoredColumnSizes(columnStorageKey, defaultSizes));
21670
+ const [internalFrozenColumnCount, setInternalFrozenColumnCount] = React4.useState(() => loadStoredFrozenColumnCount(columnStorageKey, frozenColumnCount, columns.length));
21671
+ const [internalFrozenEndColumnCount, setInternalFrozenEndColumnCount] = React4.useState(() => loadStoredFrozenEndColumnCount(columnStorageKey, frozenEndColumnCount, columns.length));
21672
+ React4.useEffect(() => {
21497
21673
  setInternalColumnOrder((current) => normalizeColumnOrder2(defaultOrder, current));
21498
21674
  }, [defaultOrder]);
21499
- React2.useEffect(() => {
21675
+ React4.useEffect(() => {
21500
21676
  if (columnSizes) return;
21501
21677
  setInternalColumnSizes(loadStoredColumnSizes(columnStorageKey, defaultSizes));
21502
21678
  }, [columnSizes, columnStorageKey, defaultSizes]);
21503
- React2.useEffect(() => {
21679
+ React4.useEffect(() => {
21504
21680
  setInternalFrozenColumnCount(loadStoredFrozenColumnCount(columnStorageKey, frozenColumnCount, columns.length));
21505
21681
  }, [columnStorageKey, columns.length, frozenColumnCount]);
21506
- React2.useEffect(() => {
21682
+ React4.useEffect(() => {
21507
21683
  setInternalFrozenEndColumnCount(loadStoredFrozenEndColumnCount(columnStorageKey, frozenEndColumnCount, columns.length));
21508
21684
  }, [columnStorageKey, columns.length, frozenEndColumnCount]);
21509
21685
  const resolvedColumnOrder = columnOrder ? normalizeColumnOrder2(defaultOrder, columnOrder) : internalColumnOrder;
@@ -21526,14 +21702,14 @@ function InteractiveTable({
21526
21702
  resetColumnWidth: columnMenuLabels?.resetColumnWidth ?? internalLabels.resetColumnWidth,
21527
21703
  frozenColumnTitle: columnMenuLabels?.frozenColumnTitle ?? internalLabels.frozenColumnTitle
21528
21704
  };
21529
- const handleColumnOrderChange = React2.useCallback((nextOrder, detail) => {
21705
+ const handleColumnOrderChange = React4.useCallback((nextOrder, detail) => {
21530
21706
  const normalizedOrder = normalizeColumnOrder2(defaultOrder, nextOrder);
21531
21707
  if (!columnOrder) {
21532
21708
  setInternalColumnOrder(normalizedOrder);
21533
21709
  }
21534
21710
  onColumnOrderChange?.(normalizedOrder, detail);
21535
21711
  }, [columnOrder, defaultOrder, onColumnOrderChange]);
21536
- const handleColumnSizeChange = React2.useCallback((columnId, width, detail) => {
21712
+ const handleColumnSizeChange = React4.useCallback((columnId, width, detail) => {
21537
21713
  const column = columns.find((item) => item.key === columnId);
21538
21714
  const minWidth = column?.minWidth;
21539
21715
  const maxWidth = column?.maxWidth;
@@ -21551,7 +21727,7 @@ function InteractiveTable({
21551
21727
  persistColumnSizes(columnStorageKey, nextSizes);
21552
21728
  onColumnSizeChange?.(columnId, nextWidth, detail);
21553
21729
  }, [columnSizes, columnStorageKey, columns, onColumnSizeChange, resolvedColumnSizes]);
21554
- const handleResetColumnSize = React2.useCallback((column) => {
21730
+ const handleResetColumnSize = React4.useCallback((column) => {
21555
21731
  const nextWidth = defaultSizes[column.key] ?? getColumnDefaultSize(column);
21556
21732
  const previousWidth = getColumnNumericWidth(column, resolvedColumnSizes);
21557
21733
  const nextSizes = {
@@ -21570,13 +21746,13 @@ function InteractiveTable({
21570
21746
  });
21571
21747
  onResetColumnSizes?.(nextSizes);
21572
21748
  }, [columnSizes, columnStorageKey, defaultSizes, onColumnSizeChange, onResetColumnSizes, resolvedColumnSizes]);
21573
- const setFrozenColumnCount = React2.useCallback((nextCount) => {
21749
+ const setFrozenColumnCount = React4.useCallback((nextCount) => {
21574
21750
  const normalizedCount = clampFrozenColumnCount(nextCount, Math.max(0, orderedColumns.length - resolvedFrozenEndColumnCount));
21575
21751
  setInternalFrozenColumnCount(normalizedCount);
21576
21752
  persistFrozenColumnCount(columnStorageKey, normalizedCount);
21577
21753
  onFrozenColumnCountChange?.(normalizedCount);
21578
21754
  }, [columnStorageKey, onFrozenColumnCountChange, orderedColumns.length, resolvedFrozenEndColumnCount]);
21579
- const setFrozenEndColumnCount = React2.useCallback((nextCount) => {
21755
+ const setFrozenEndColumnCount = React4.useCallback((nextCount) => {
21580
21756
  const normalizedCount = clampFrozenColumnCount(nextCount, Math.max(0, orderedColumns.length - resolvedFrozenColumnCount));
21581
21757
  setInternalFrozenEndColumnCount(normalizedCount);
21582
21758
  persistFrozenEndColumnCount(columnStorageKey, normalizedCount);
@@ -21829,11 +22005,11 @@ function InteractiveTableEditableTextCell({
21829
22005
  onCommit
21830
22006
  }) {
21831
22007
  const initialValue = String(value || "");
21832
- const [draft, setDraft] = React2.useState(initialValue);
21833
- React2.useEffect(() => {
22008
+ const [draft, setDraft] = React4.useState(initialValue);
22009
+ React4.useEffect(() => {
21834
22010
  setDraft(initialValue);
21835
22011
  }, [initialValue]);
21836
- const commit = React2.useCallback(async () => {
22012
+ const commit = React4.useCallback(async () => {
21837
22013
  const nextValue = String(draft || "").trim();
21838
22014
  const previousValue = String(initialValue || "").trim();
21839
22015
  if (nextValue === previousValue) return;
@@ -22252,7 +22428,7 @@ var DEFAULT_MASONRY_GAP_PX = 12;
22252
22428
  var DEFAULT_MASONRY_ROW_HEIGHT_PX = 8;
22253
22429
  var DEFAULT_MASONRY_COLUMN_WIDTH_PX = 280;
22254
22430
  var DEFAULT_MASONRY_ITEM_HEIGHT_PX = 240;
22255
- var useIsomorphicLayoutEffect = typeof window === "undefined" ? React2.useEffect : React2.useLayoutEffect;
22431
+ var useIsomorphicLayoutEffect = typeof window === "undefined" ? React4.useEffect : React4.useLayoutEffect;
22256
22432
  function clamp3(value, min5, max5) {
22257
22433
  return Math.min(Math.max(value, min5), max5);
22258
22434
  }
@@ -22365,17 +22541,17 @@ function WorkbenchMasonryLayout({
22365
22541
  getItemProps,
22366
22542
  className
22367
22543
  }) {
22368
- const containerRef = React2.useRef(null);
22369
- const itemNodesRef = React2.useRef(/* @__PURE__ */ new Map());
22370
- const itemObserverRef = React2.useRef(null);
22371
- const [containerWidth, setContainerWidth] = React2.useState(0);
22372
- const [measuredHeights, setMeasuredHeights] = React2.useState({});
22373
- const itemKeys = React2.useMemo(
22544
+ const containerRef = React4.useRef(null);
22545
+ const itemNodesRef = React4.useRef(/* @__PURE__ */ new Map());
22546
+ const itemObserverRef = React4.useRef(null);
22547
+ const [containerWidth, setContainerWidth] = React4.useState(0);
22548
+ const [measuredHeights, setMeasuredHeights] = React4.useState({});
22549
+ const itemKeys = React4.useMemo(
22374
22550
  () => items.map((item, index) => String(getItemKey(item, index))),
22375
22551
  [getItemKey, items]
22376
22552
  );
22377
22553
  const itemKeysSignature = itemKeys.join("|");
22378
- React2.useEffect(() => {
22554
+ React4.useEffect(() => {
22379
22555
  const node = containerRef.current;
22380
22556
  if (!node) return void 0;
22381
22557
  const updateWidth = () => {
@@ -22391,7 +22567,7 @@ function WorkbenchMasonryLayout({
22391
22567
  window.addEventListener("resize", updateWidth);
22392
22568
  return () => window.removeEventListener("resize", updateWidth);
22393
22569
  }, []);
22394
- React2.useEffect(() => {
22570
+ React4.useEffect(() => {
22395
22571
  setMeasuredHeights((prev) => {
22396
22572
  const currentItemKeys = new Set(itemKeys);
22397
22573
  const next = Object.fromEntries(
@@ -22414,7 +22590,7 @@ function WorkbenchMasonryLayout({
22414
22590
  gap
22415
22591
  });
22416
22592
  const resolvedColumnWidth = containerWidth > 0 ? (containerWidth - gap * Math.max(columnCount - 1, 0)) / columnCount : resolvedTargetColumnWidth;
22417
- const layoutItems = React2.useMemo(() => items.map((item, index) => {
22593
+ const layoutItems = React4.useMemo(() => items.map((item, index) => {
22418
22594
  const key = itemKeys[index];
22419
22595
  const size = typeof getItemSize === "function" ? getItemSize(item, {
22420
22596
  columnCount,
@@ -22467,7 +22643,7 @@ function WorkbenchMasonryLayout({
22467
22643
  return areMeasurementMapsEqual(prev, merged) ? prev : merged;
22468
22644
  });
22469
22645
  }, [columnCount, isDensePlacement, itemKeysSignature, resolvedColumnWidth]);
22470
- React2.useEffect(() => {
22646
+ React4.useEffect(() => {
22471
22647
  if (typeof ResizeObserver !== "function") return void 0;
22472
22648
  const observer = new ResizeObserver((entries) => {
22473
22649
  setMeasuredHeights((prev) => {
@@ -22713,7 +22889,7 @@ function WorkbenchCollectionSkeleton({
22713
22889
  const count = resolveSkeletonCount({ columnCount, config, phase });
22714
22890
  const aspectRatios = resolveAspectRatios(mode, config?.aspectRatios);
22715
22891
  const animated = config?.animated ?? true;
22716
- const items = React2.useMemo(
22892
+ const items = React4.useMemo(
22717
22893
  () => Array.from({ length: count }, (_, index) => ({
22718
22894
  aspectRatio: aspectRatios[index % aspectRatios.length],
22719
22895
  key: `${phase}-${index}`
@@ -22953,21 +23129,21 @@ function WorkbenchCollection({
22953
23129
  const componentAttributes = useMonkeysComponentAttributes();
22954
23130
  const localeMessages = useMonkeysLocaleMessages().workbench.collection;
22955
23131
  const statusStates = useMonkeysStatusStates();
22956
- const componentId = React2.useId().replace(/:/g, "");
22957
- const rootRef = React2.useRef(null);
22958
- const itemsRef = React2.useRef(null);
22959
- const loadMoreRef = React2.useRef(null);
22960
- const lastSelectedIndexRef = React2.useRef(null);
22961
- const loadMoreLockedRef = React2.useRef(false);
22962
- const layoutReadyRef = React2.useRef(false);
22963
- const [containerWidth, setContainerWidth] = React2.useState(0);
22964
- const [itemsNode, setItemsNode] = React2.useState(null);
22965
- const [internalSelectedKeys, setInternalSelectedKeys] = React2.useState(
23132
+ const componentId = React4.useId().replace(/:/g, "");
23133
+ const rootRef = React4.useRef(null);
23134
+ const itemsRef = React4.useRef(null);
23135
+ const loadMoreRef = React4.useRef(null);
23136
+ const lastSelectedIndexRef = React4.useRef(null);
23137
+ const loadMoreLockedRef = React4.useRef(false);
23138
+ const layoutReadyRef = React4.useRef(false);
23139
+ const [containerWidth, setContainerWidth] = React4.useState(0);
23140
+ const [itemsNode, setItemsNode] = React4.useState(null);
23141
+ const [internalSelectedKeys, setInternalSelectedKeys] = React4.useState(
22966
23142
  () => new Set(config.selection?.defaultSelectedKeys ?? [])
22967
23143
  );
22968
- const callbacksRef = React2.useRef(callbacks);
23144
+ const callbacksRef = React4.useRef(callbacks);
22969
23145
  callbacksRef.current = callbacks;
22970
- const registerItemsNode = React2.useCallback((node) => {
23146
+ const registerItemsNode = React4.useCallback((node) => {
22971
23147
  itemsRef.current = node;
22972
23148
  setItemsNode(node);
22973
23149
  }, []);
@@ -22978,11 +23154,11 @@ function WorkbenchCollection({
22978
23154
  const gap = normalizeGap(config.layout.gap);
22979
23155
  const rowHeight = normalizeRowHeight(config.layout.rowHeight);
22980
23156
  const getItemKey = config.getItemKey ?? getDefaultItemKey;
22981
- const normalizedItems = React2.useMemo(() => items.map((item, index) => {
23157
+ const normalizedItems = React4.useMemo(() => items.map((item, index) => {
22982
23158
  const key = getItemKey(item, index);
22983
23159
  return { item, index, key, stringKey: String(key) };
22984
23160
  }), [getItemKey, items]);
22985
- const keys = React2.useMemo(
23161
+ const keys = React4.useMemo(
22986
23162
  () => normalizedItems.map(({ key }) => key),
22987
23163
  [normalizedItems]
22988
23164
  );
@@ -22993,14 +23169,14 @@ function WorkbenchCollection({
22993
23169
  const hasMore = state?.hasMore === true;
22994
23170
  const loadingVariant = resolveWorkbenchCollectionLoadingVariant(config.loading?.variant);
22995
23171
  const layoutItemCount = loading && normalizedItems.length === 0 && loadingVariant === "skeleton" ? resolveWorkbenchCollectionSkeletonCapacity(config.loading?.skeleton) : normalizedItems.length;
22996
- React2.useEffect(() => warnOnDuplicateKeys(keys), [keys, keysSignature]);
23172
+ React4.useEffect(() => warnOnDuplicateKeys(keys), [keys, keysSignature]);
22997
23173
  const selectionMode = config.selection?.mode ?? "none";
22998
23174
  const controlledSelection = config.selection?.selectedKeys !== void 0;
22999
- const selectedKeys = React2.useMemo(
23175
+ const selectedKeys = React4.useMemo(
23000
23176
  () => selectionMode === "none" ? /* @__PURE__ */ new Set() : controlledSelection ? new Set(config.selection?.selectedKeys ?? []) : internalSelectedKeys,
23001
23177
  [config.selection?.selectedKeys, controlledSelection, internalSelectedKeys, selectionMode]
23002
23178
  );
23003
- React2.useEffect(() => {
23179
+ React4.useEffect(() => {
23004
23180
  if (controlledSelection) return;
23005
23181
  const availableKeys = new Set(keys);
23006
23182
  setInternalSelectedKeys((previous) => {
@@ -23008,7 +23184,7 @@ function WorkbenchCollection({
23008
23184
  return setsEqual(previous, next) ? previous : next;
23009
23185
  });
23010
23186
  }, [controlledSelection, keys, keysSignature]);
23011
- React2.useEffect(() => {
23187
+ React4.useEffect(() => {
23012
23188
  const node = itemsNode;
23013
23189
  if (!node) return void 0;
23014
23190
  const updateWidth = () => {
@@ -23043,7 +23219,7 @@ function WorkbenchCollection({
23043
23219
  itemsRef.current
23044
23220
  );
23045
23221
  const placementStrategy = config.layout.placementStrategy ?? (mode === "dense" ? "dense" : mode === "masonry" ? "shortest" : "shelf");
23046
- const labels = React2.useMemo(() => ({
23222
+ const labels = React4.useMemo(() => ({
23047
23223
  collection: config.labels?.collection ?? localeMessages.label,
23048
23224
  loading: config.labels?.loading ?? localeMessages.loading,
23049
23225
  empty: config.labels?.empty ?? localeMessages.empty,
@@ -23055,7 +23231,7 @@ function WorkbenchCollection({
23055
23231
  offline: config.labels?.offline ?? localeMessages.offline,
23056
23232
  requestAccess: config.labels?.requestAccess ?? localeMessages.requestAccess
23057
23233
  }), [config.labels, localeMessages]);
23058
- const virtualizationError = React2.useMemo(() => {
23234
+ const virtualizationError = React4.useMemo(() => {
23059
23235
  const virtualization = config.virtualization;
23060
23236
  if (virtualization?.enabled !== true || virtualization.fallback !== "error") return null;
23061
23237
  if (!virtualization.adapter) {
@@ -23066,7 +23242,7 @@ function WorkbenchCollection({
23066
23242
  }
23067
23243
  return null;
23068
23244
  }, [config.virtualization, mode]);
23069
- const layoutSnapshot = React2.useMemo(() => ({
23245
+ const layoutSnapshot = React4.useMemo(() => ({
23070
23246
  mode,
23071
23247
  columnCount,
23072
23248
  columnWidth,
@@ -23074,23 +23250,23 @@ function WorkbenchCollection({
23074
23250
  gap,
23075
23251
  itemCount: normalizedItems.length
23076
23252
  }), [columnCount, columnWidth, containerWidth, gap, mode, normalizedItems.length]);
23077
- React2.useEffect(() => {
23253
+ React4.useEffect(() => {
23078
23254
  callbacksRef.current?.onLayoutChange?.(layoutSnapshot);
23079
23255
  if (containerWidth > 0 && !layoutReadyRef.current) {
23080
23256
  layoutReadyRef.current = true;
23081
23257
  callbacksRef.current?.onLayoutReady?.(layoutSnapshot);
23082
23258
  }
23083
23259
  }, [layoutSnapshot, containerWidth]);
23084
- React2.useEffect(() => {
23260
+ React4.useEffect(() => {
23085
23261
  layoutReadyRef.current = false;
23086
23262
  }, [mode]);
23087
- const resolveScrollOwner = React2.useCallback(() => {
23263
+ const resolveScrollOwner = React4.useCallback(() => {
23088
23264
  const requestedOwner = config.layout.scrollOwner;
23089
23265
  if (requestedOwner && requestedOwner !== "self" && requestedOwner !== "parent") return requestedOwner;
23090
23266
  if (requestedOwner === "parent") return getParentScrollOwner(rootRef.current);
23091
23267
  return rootRef.current;
23092
23268
  }, [config.layout.scrollOwner]);
23093
- React2.useEffect(() => {
23269
+ React4.useEffect(() => {
23094
23270
  const restorationKey = config.scrollRestorationKey?.trim();
23095
23271
  if (!restorationKey || typeof window === "undefined") return void 0;
23096
23272
  const owner = resolveScrollOwner();
@@ -23115,10 +23291,10 @@ function WorkbenchCollection({
23115
23291
  }, [config.scrollRestorationKey, resolveScrollOwner]);
23116
23292
  const canLoadMore = typeof callbacks?.onLoadMore === "function";
23117
23293
  const effectiveError = state?.error ?? virtualizationError;
23118
- React2.useEffect(() => {
23294
+ React4.useEffect(() => {
23119
23295
  if (!loadingMore || !hasMore) loadMoreLockedRef.current = false;
23120
23296
  }, [hasMore, loadingMore, normalizedItems.length, keysSignature]);
23121
- const requestLoadMore = React2.useCallback(() => {
23297
+ const requestLoadMore = React4.useCallback(() => {
23122
23298
  if (!canLoadMore || !hasMore || loadingMore || loadMoreLockedRef.current) return;
23123
23299
  loadMoreLockedRef.current = true;
23124
23300
  try {
@@ -23133,7 +23309,7 @@ function WorkbenchCollection({
23133
23309
  throw error;
23134
23310
  }
23135
23311
  }, [canLoadMore, hasMore, loadingMore]);
23136
- React2.useEffect(() => {
23312
+ React4.useEffect(() => {
23137
23313
  const sentinel = loadMoreRef.current;
23138
23314
  if (!sentinel || !canLoadMore || !hasMore || loadingMore) return void 0;
23139
23315
  if (typeof IntersectionObserver !== "function") return void 0;
@@ -23149,7 +23325,7 @@ function WorkbenchCollection({
23149
23325
  observer.observe(sentinel);
23150
23326
  return () => observer.disconnect();
23151
23327
  }, [canLoadMore, config.loading?.rootMargin, config.loading?.threshold, hasMore, keysSignature, loadingMore, normalizedItems.length, requestLoadMore, resolveScrollOwner]);
23152
- React2.useEffect(() => {
23328
+ React4.useEffect(() => {
23153
23329
  if (!config.loading?.autoFill || !canLoadMore || !hasMore || loadingMore) return;
23154
23330
  const sentinel = loadMoreRef.current;
23155
23331
  if (!sentinel) return;
@@ -23167,7 +23343,7 @@ function WorkbenchCollection({
23167
23343
  requestLoadMore,
23168
23344
  resolveScrollOwner
23169
23345
  ]);
23170
- const groups = React2.useMemo(() => {
23346
+ const groups = React4.useMemo(() => {
23171
23347
  if (!config.grouping) {
23172
23348
  return [{ key: "__all__", stringKey: "__all__", items: normalizedItems }];
23173
23349
  }
@@ -23189,7 +23365,7 @@ function WorkbenchCollection({
23189
23365
  });
23190
23366
  return Array.from(grouped.values());
23191
23367
  }, [config.grouping, normalizedItems]);
23192
- const setSelection = React2.useCallback((entry, behavior = config.selection?.behavior ?? (selectionMode === "multiple" ? "toggle" : "replace")) => {
23368
+ const setSelection = React4.useCallback((entry, behavior = config.selection?.behavior ?? (selectionMode === "multiple" ? "toggle" : "replace")) => {
23193
23369
  if (selectionMode === "none" || config.selection?.isItemDisabled?.(entry.item, entry.index)) return;
23194
23370
  const current = new Set(selectedKeys);
23195
23371
  const next = /* @__PURE__ */ new Set();
@@ -23213,7 +23389,7 @@ function WorkbenchCollection({
23213
23389
  if (!controlledSelection) setInternalSelectedKeys(next);
23214
23390
  callbacks?.onSelectionChange?.(next, { item: entry.item, key: entry.key, behavior });
23215
23391
  }, [callbacks, config.selection, controlledSelection, normalizedItems, selectedKeys, selectionMode]);
23216
- const createItemContext = React2.useCallback((entry, layout) => {
23392
+ const createItemContext = React4.useCallback((entry, layout) => {
23217
23393
  const disabled = config.selection?.isItemDisabled?.(entry.item, entry.index) ?? false;
23218
23394
  const context = {
23219
23395
  item: entry.item,
@@ -23235,7 +23411,7 @@ function WorkbenchCollection({
23235
23411
  };
23236
23412
  return context;
23237
23413
  }, [callbacks, config.getItemStatus, config.selection, selectedKeys, selectionMode, setSelection, slots?.item]);
23238
- const getItemInteractionProps = React2.useCallback((entry, context) => {
23414
+ const getItemInteractionProps = React4.useCallback((entry, context) => {
23239
23415
  const handleKeyboard = (event) => {
23240
23416
  if (event.target !== event.currentTarget || event.key !== "Enter" && event.key !== " ") return;
23241
23417
  event.preventDefault();
@@ -23283,7 +23459,7 @@ function WorkbenchCollection({
23283
23459
  onDrop: (event) => callbacks?.onItemDrop?.(entry.item, context, event)
23284
23460
  };
23285
23461
  }, [callbacks, classNames?.item, componentId, config.appearance, config.item?.title?.visibility, selectionMode]);
23286
- const renderItemContent2 = React2.useCallback((entry, context) => {
23462
+ const renderItemContent2 = React4.useCallback((entry, context) => {
23287
23463
  const content = renderItem(entry.item, context);
23288
23464
  const titleConfig = config.item?.title;
23289
23465
  const visibility = titleConfig?.visibility ?? "always";
@@ -23363,13 +23539,13 @@ function WorkbenchCollection({
23363
23539
  }
23364
23540
  );
23365
23541
  }, [classNames?.itemActions, classNames?.itemContent, classNames?.itemTitle, config.item, renderItem]);
23366
- const renderEntry = React2.useCallback((entry, layout, includeShell = true) => {
23542
+ const renderEntry = React4.useCallback((entry, layout, includeShell = true) => {
23367
23543
  const context = createItemContext(entry, layout);
23368
23544
  const content = renderItemContent2(entry, context);
23369
23545
  if (!includeShell) return content;
23370
23546
  return /* @__PURE__ */ jsxRuntime.jsx("div", { ...getItemInteractionProps(entry, context), children: content });
23371
23547
  }, [createItemContext, getItemInteractionProps, renderItemContent2]);
23372
- const baseLayoutContext = React2.useMemo(() => ({
23548
+ const baseLayoutContext = React4.useMemo(() => ({
23373
23549
  mode,
23374
23550
  columnCount,
23375
23551
  columnWidth,
@@ -23395,7 +23571,7 @@ function WorkbenchCollection({
23395
23571
  scrollOwner: resolveScrollOwner(),
23396
23572
  renderItem: (item, localIndex, layout) => {
23397
23573
  const entry = group.items[localIndex];
23398
- return entry ? /* @__PURE__ */ jsxRuntime.jsx(React2.Fragment, { children: renderEntry(entry, layout) }, entry.stringKey) : null;
23574
+ return entry ? /* @__PURE__ */ jsxRuntime.jsx(React4.Fragment, { children: renderEntry(entry, layout) }, entry.stringKey) : null;
23399
23575
  }
23400
23576
  });
23401
23577
  }
@@ -23446,7 +23622,7 @@ function WorkbenchCollection({
23446
23622
  "aria-multiselectable": selectionMode === "multiple" || void 0,
23447
23623
  className: cn("grid min-w-0 grid-flow-col items-start overflow-x-auto", classNames?.layout),
23448
23624
  style: { gap, gridAutoColumns: typeof cardWidth === "number" ? `${cardWidth}px` : cardWidth },
23449
- children: group.items.map((entry) => /* @__PURE__ */ jsxRuntime.jsx(React2.Fragment, { children: renderEntry(entry, baseLayoutContext) }, entry.stringKey))
23625
+ children: group.items.map((entry) => /* @__PURE__ */ jsxRuntime.jsx(React4.Fragment, { children: renderEntry(entry, baseLayoutContext) }, entry.stringKey))
23450
23626
  }
23451
23627
  );
23452
23628
  }
@@ -24103,17 +24279,17 @@ function WorkbenchLaneView({
24103
24279
  classNames,
24104
24280
  style
24105
24281
  }) {
24106
- const [activeRowId, setActiveRowId] = React2.useState(null);
24282
+ const [activeRowId, setActiveRowId] = React4.useState(null);
24107
24283
  const sensors = core.useSensors(core.useSensor(core.PointerSensor, { activationConstraint: { distance: activationDistance } }));
24108
- const columnMap = React2.useMemo(() => new Map(columns.map((column) => [column.id, column])), [columns]);
24109
- const rowEntries = React2.useMemo(() => rows.map((row, rowIndex) => ({
24284
+ const columnMap = React4.useMemo(() => new Map(columns.map((column) => [column.id, column])), [columns]);
24285
+ const rowEntries = React4.useMemo(() => rows.map((row, rowIndex) => ({
24110
24286
  row,
24111
24287
  rowIndex,
24112
24288
  rowId: getRowId(row, rowIndex),
24113
24289
  columnId: getColumnId(row, rowIndex)
24114
24290
  })), [getColumnId, getRowId, rows]);
24115
24291
  const activeEntry = activeRowId ? rowEntries.find((entry) => entry.rowId === activeRowId) : void 0;
24116
- const rowsByColumn = React2.useMemo(() => {
24292
+ const rowsByColumn = React4.useMemo(() => {
24117
24293
  const next = /* @__PURE__ */ new Map();
24118
24294
  columns.forEach((column) => next.set(column.id, []));
24119
24295
  rowEntries.forEach(({ row, rowIndex, rowId, columnId }) => {
@@ -24122,10 +24298,10 @@ function WorkbenchLaneView({
24122
24298
  return next;
24123
24299
  }, [columns, rowEntries]);
24124
24300
  const activeColumn = activeEntry ? columnMap.get(activeEntry.columnId) : void 0;
24125
- const handleDragStart = React2.useCallback((event) => {
24301
+ const handleDragStart = React4.useCallback((event) => {
24126
24302
  setActiveRowId(String(event.active.id));
24127
24303
  }, []);
24128
- const handleDragEnd = React2.useCallback((event) => {
24304
+ const handleDragEnd = React4.useCallback((event) => {
24129
24305
  setActiveRowId(null);
24130
24306
  const rowId = String(event.active.id);
24131
24307
  const nextColumnId = String(event.over?.id ?? "");
@@ -24133,7 +24309,7 @@ function WorkbenchLaneView({
24133
24309
  if (!activeRow || !columnMap.has(nextColumnId) || activeRow.columnId === nextColumnId) return;
24134
24310
  onMoveRow?.(rowId, nextColumnId, activeRow.row);
24135
24311
  }, [columnMap, onMoveRow, rowEntries]);
24136
- const handleDragCancel = React2.useCallback(() => {
24312
+ const handleDragCancel = React4.useCallback(() => {
24137
24313
  setActiveRowId(null);
24138
24314
  }, []);
24139
24315
  return /* @__PURE__ */ jsxRuntime.jsxs(core.DndContext, { sensors, onDragStart: handleDragStart, onDragEnd: handleDragEnd, onDragCancel: handleDragCancel, children: [
@@ -25513,7 +25689,7 @@ function cn3(...classNames) {
25513
25689
  return classNames.filter(Boolean).join(" ");
25514
25690
  }
25515
25691
  function isToastInput(input) {
25516
- if (!input || typeof input !== "object" || React2.isValidElement(input)) {
25692
+ if (!input || typeof input !== "object" || React4.isValidElement(input)) {
25517
25693
  return false;
25518
25694
  }
25519
25695
  return "title" in input || "description" in input || "variant" in input;
@@ -25648,10 +25824,10 @@ function MonkeysToastProvider({ children, toasterProps }) {
25648
25824
  ] });
25649
25825
  }
25650
25826
  function useToastOnValue(value, options = {}) {
25651
- const previousSignatureRef = React2.useRef(null);
25827
+ const previousSignatureRef = React4.useRef(null);
25652
25828
  const localeMessages = useMonkeysLocaleMessages().toast;
25653
25829
  const translate = options.translate;
25654
- React2.useEffect(() => {
25830
+ React4.useEffect(() => {
25655
25831
  if (!value) {
25656
25832
  previousSignatureRef.current = null;
25657
25833
  return;
@@ -25704,10 +25880,10 @@ function useToastOnValue(value, options = {}) {
25704
25880
  ]);
25705
25881
  }
25706
25882
  function useToastFeed(items, options = {}) {
25707
- const previousVisibleSignaturesRef = React2.useRef(/* @__PURE__ */ new Set());
25883
+ const previousVisibleSignaturesRef = React4.useRef(/* @__PURE__ */ new Set());
25708
25884
  const localeMessages = useMonkeysLocaleMessages().toast;
25709
25885
  const translate = options.translate;
25710
- const emitItem = React2.useCallback(
25886
+ const emitItem = React4.useCallback(
25711
25887
  (item, index, visibleSignatures) => {
25712
25888
  const variant = item.variant ?? "info";
25713
25889
  const title = translateMessage(
@@ -25740,7 +25916,7 @@ function useToastFeed(items, options = {}) {
25740
25916
  },
25741
25917
  [localeMessages, options.messages, translate]
25742
25918
  );
25743
- React2.useEffect(() => {
25919
+ React4.useEffect(() => {
25744
25920
  const visibleSignatures = /* @__PURE__ */ new Set();
25745
25921
  items.forEach((item, index) => {
25746
25922
  if (item) {
@@ -25926,55 +26102,55 @@ function RenderNodeHost({
25926
26102
  ...props
25927
26103
  }) {
25928
26104
  const Component = as;
25929
- const hostRef = React2.useRef(null);
25930
- const [viewportWidth, setViewportWidth] = React2.useState(() => typeof window === "undefined" ? void 0 : window.innerWidth);
25931
- const [mountedNodeId, setMountedNodeId] = React2.useState(() => shouldMountNode(node, active, visible) ? node.nodeId : void 0);
26105
+ const hostRef = React4.useRef(null);
26106
+ const [viewportWidth, setViewportWidth] = React4.useState(() => typeof window === "undefined" ? void 0 : window.innerWidth);
26107
+ const [mountedNodeId, setMountedNodeId] = React4.useState(() => shouldMountNode(node, active, visible) ? node.nodeId : void 0);
25932
26108
  const policyMounted = shouldMountNode(node, active, visible);
25933
- React2.useEffect(() => {
26109
+ React4.useEffect(() => {
25934
26110
  if (node.responsive.length === 0 || typeof window === "undefined") return void 0;
25935
26111
  const handleResize = () => setViewportWidth(window.innerWidth);
25936
26112
  handleResize();
25937
26113
  window.addEventListener("resize", handleResize, { passive: true });
25938
26114
  return () => window.removeEventListener("resize", handleResize);
25939
26115
  }, [node.responsive.length]);
25940
- const resolvedLayout = React2.useMemo(() => resolveRenderNodeLayout(node, viewportWidth), [node, viewportWidth]);
25941
- React2.useEffect(() => {
26116
+ const resolvedLayout = React4.useMemo(() => resolveRenderNodeLayout(node, viewportWidth), [node, viewportWidth]);
26117
+ React4.useEffect(() => {
25942
26118
  if (!active || !visible || !node.lifecycle.deepLink || !["page", "record"].includes(node.kind)) return;
25943
26119
  const element = hostRef.current;
25944
26120
  if (!element || element.style.display === "contents") return;
25945
26121
  element.focus({ preventScroll: true });
25946
26122
  }, [active, node.kind, node.lifecycle.deepLink, node.nodeId, visible]);
25947
- React2.useEffect(() => {
26123
+ React4.useEffect(() => {
25948
26124
  if (policyMounted) setMountedNodeId(node.nodeId);
25949
26125
  else if (!node.lifecycle.retainOnDeactivate) setMountedNodeId(void 0);
25950
26126
  }, [node.lifecycle.retainOnDeactivate, node.nodeId, policyMounted]);
25951
- const policyState = React2.useMemo(() => resolveRenderNodePolicyState(node, {
26127
+ const policyState = React4.useMemo(() => resolveRenderNodePolicyState(node, {
25952
26128
  active,
25953
26129
  visible,
25954
26130
  manualQueryEnabled,
25955
26131
  previouslyMounted: mountedNodeId === node.nodeId
25956
26132
  }), [active, manualQueryEnabled, mountedNodeId, node, visible]);
25957
- const activate = React2.useCallback(() => {
26133
+ const activate = React4.useCallback(() => {
25958
26134
  onActivate?.(node.activation, node);
25959
26135
  }, [node, onActivate]);
25960
- const setManualQueryEnabled = React2.useCallback((enabled) => {
26136
+ const setManualQueryEnabled = React4.useCallback((enabled) => {
25961
26137
  onManualQueryEnabledChange?.(enabled, node);
25962
26138
  }, [node, onManualQueryEnabledChange]);
25963
- const runtimeState = React2.useMemo(() => ({
26139
+ const runtimeState = React4.useMemo(() => ({
25964
26140
  ...policyState,
25965
26141
  activate,
25966
26142
  setManualQueryEnabled
25967
26143
  }), [activate, policyState, setManualQueryEnabled]);
25968
- React2.useEffect(() => {
26144
+ React4.useEffect(() => {
25969
26145
  onRuntimeStateChange?.(policyState, node);
25970
26146
  }, [node, onRuntimeStateChange, policyState]);
25971
- const setHostRef = React2.useCallback((value) => {
26147
+ const setHostRef = React4.useCallback((value) => {
25972
26148
  hostRef.current = value;
25973
26149
  assignRef4(elementRef, value);
25974
26150
  }, [elementRef]);
25975
26151
  const scrollAdapter = scrollRestoration === false ? void 0 : scrollRestoration;
25976
26152
  const restoresHostScroll = scrollAdapter !== void 0 && node.scroll.owner !== "provider" && !node.scroll.virtualizationBoundary && node.scroll.axis !== "none" && node.scroll.restoreKey !== void 0;
25977
- const readPosition = React2.useCallback(() => {
26153
+ const readPosition = React4.useCallback(() => {
25978
26154
  const element = hostRef.current;
25979
26155
  if (!element) return { x: 0, y: 0 };
25980
26156
  return {
@@ -25982,7 +26158,7 @@ function RenderNodeHost({
25982
26158
  y: node.scroll.axis === "x" ? 0 : element.scrollTop
25983
26159
  };
25984
26160
  }, [node.scroll.axis]);
25985
- React2.useEffect(() => {
26161
+ React4.useEffect(() => {
25986
26162
  if (!policyState.mounted || !restoresHostScroll || !scrollAdapter) return void 0;
25987
26163
  const key = node.scroll.restoreKey;
25988
26164
  const element = hostRef.current;
@@ -26122,10 +26298,10 @@ function OverlayNodeHost({
26122
26298
  onRuntimeStateChange,
26123
26299
  onOpenChange
26124
26300
  }) {
26125
- const historyEntryOwnedRef = React2.useRef(false);
26126
- const initializedUrlRef = React2.useRef(false);
26301
+ const historyEntryOwnedRef = React4.useRef(false);
26302
+ const initializedUrlRef = React4.useRef(false);
26127
26303
  const zIndex = getOverlayZIndex(node.zIndexLane);
26128
- const syncUrl = React2.useCallback((nextOpen) => {
26304
+ const syncUrl = React4.useCallback((nextOpen) => {
26129
26305
  if (!node.renderNode.lifecycle.deepLink || historyAdapter === false) return;
26130
26306
  const currentUrl = historyAdapter.getCurrentUrl();
26131
26307
  if (isOverlayUrlActive(node, currentUrl) === nextOpen) return;
@@ -26148,11 +26324,11 @@ function OverlayNodeHost({
26148
26324
  historyEntryOwnedRef.current = false;
26149
26325
  }
26150
26326
  }, [historyAdapter, node]);
26151
- const requestOpenChange = React2.useCallback((nextOpen) => {
26327
+ const requestOpenChange = React4.useCallback((nextOpen) => {
26152
26328
  syncUrl(nextOpen);
26153
26329
  onOpenChange(nextOpen);
26154
26330
  }, [onOpenChange, syncUrl]);
26155
- React2.useEffect(() => {
26331
+ React4.useEffect(() => {
26156
26332
  if (!node.renderNode.lifecycle.deepLink || historyAdapter === false) return void 0;
26157
26333
  const urlOpen = isOverlayUrlActive(node, historyAdapter.getCurrentUrl());
26158
26334
  if (!initializedUrlRef.current) {
@@ -26168,12 +26344,12 @@ function OverlayNodeHost({
26168
26344
  if (nextOpen !== open) onOpenChange(nextOpen);
26169
26345
  });
26170
26346
  }, [historyAdapter, node, onOpenChange, open, syncUrl]);
26171
- React2.useEffect(() => {
26347
+ React4.useEffect(() => {
26172
26348
  if (!open || !node.renderNode.lifecycle.focusReturn || typeof document === "undefined") return void 0;
26173
26349
  const target = focusReturnRef?.current ?? (document.activeElement instanceof HTMLElement ? document.activeElement : null);
26174
26350
  return () => scheduleFocus(focusReturnRef?.current ?? target);
26175
26351
  }, [focusReturnRef, node.renderNode.lifecycle.focusReturn, open]);
26176
- const renderNodeAttributes = React2.useMemo(
26352
+ const renderNodeAttributes = React4.useMemo(
26177
26353
  () => getRenderNodeDataAttributes(node.renderNode),
26178
26354
  [node.renderNode]
26179
26355
  );
@@ -26782,7 +26958,7 @@ function LoadingIcon3() {
26782
26958
  }
26783
26959
  );
26784
26960
  }
26785
- var DataExplorerButton = React2.forwardRef(function DataExplorerButton2({
26961
+ var DataExplorerButton = React4.forwardRef(function DataExplorerButton2({
26786
26962
  children,
26787
26963
  label,
26788
26964
  icon,
@@ -27808,7 +27984,7 @@ function DataExplorerDisplayActionMenu({
27808
27984
  className,
27809
27985
  classNames
27810
27986
  }) {
27811
- const [open, setOpen] = React2.useState(false);
27987
+ const [open, setOpen] = React4.useState(false);
27812
27988
  const theme = resolveDataExplorerAppearance(appearance);
27813
27989
  const context = {
27814
27990
  itemId,
@@ -28469,13 +28645,13 @@ function DataExplorerViewCollection({
28469
28645
  );
28470
28646
  const measuredGridGap = resolveNonNegativeNumber(measuredGridOptions?.gap, 8);
28471
28647
  const measuredGridMinColumnWidth = measuredGridOptions?.minColumnWidth ?? "220px";
28472
- const measuredElementsRef = React2.useRef(/* @__PURE__ */ new Map());
28473
- const measuredCallbacksRef = React2.useRef(/* @__PURE__ */ new Map());
28474
- const measuredSpansRef = React2.useRef(/* @__PURE__ */ new Map());
28475
- const resizeObserverRef = React2.useRef(null);
28476
- const [, setMeasuredLayoutVersion] = React2.useState(0);
28648
+ const measuredElementsRef = React4.useRef(/* @__PURE__ */ new Map());
28649
+ const measuredCallbacksRef = React4.useRef(/* @__PURE__ */ new Map());
28650
+ const measuredSpansRef = React4.useRef(/* @__PURE__ */ new Map());
28651
+ const resizeObserverRef = React4.useRef(null);
28652
+ const [, setMeasuredLayoutVersion] = React4.useState(0);
28477
28653
  const resolveItemStyle = typeof itemStyle === "function" ? (props) => itemStyle(props) : () => itemStyle;
28478
- React2.useEffect(() => {
28654
+ React4.useEffect(() => {
28479
28655
  if (!measuredGridEnabled || typeof ResizeObserver === "undefined") {
28480
28656
  return void 0;
28481
28657
  }
@@ -28511,7 +28687,7 @@ function DataExplorerViewCollection({
28511
28687
  }
28512
28688
  };
28513
28689
  }, [measuredGridEnabled, measuredGridGap, measuredGridRowHeight]);
28514
- React2.useEffect(() => {
28690
+ React4.useEffect(() => {
28515
28691
  if (!measuredGridEnabled) {
28516
28692
  measuredElementsRef.current.clear();
28517
28693
  measuredCallbacksRef.current.clear();
@@ -28538,7 +28714,7 @@ function DataExplorerViewCollection({
28538
28714
  setMeasuredLayoutVersion((version2) => version2 + 1);
28539
28715
  }
28540
28716
  }, [measuredGridEnabled, resolvedItems, resolveItemId]);
28541
- const getMeasuredRef = React2.useCallback((itemId) => {
28717
+ const getMeasuredRef = React4.useCallback((itemId) => {
28542
28718
  const cached = measuredCallbacksRef.current.get(itemId);
28543
28719
  if (cached) return cached;
28544
28720
  const callback = (node) => {
@@ -28649,7 +28825,7 @@ function DataExplorerViewCollection({
28649
28825
  } : resolvedStyle;
28650
28826
  if (!wrapItems) {
28651
28827
  if (!measuredGridEnabled) {
28652
- return /* @__PURE__ */ jsxRuntime.jsx(React2.Fragment, { children: renderedItem }, itemId);
28828
+ return /* @__PURE__ */ jsxRuntime.jsx(React4.Fragment, { children: renderedItem }, itemId);
28653
28829
  }
28654
28830
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: itemClassName, style: measuredStyle, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: getMeasuredRef(itemId), children: renderedItem }) }, itemId);
28655
28831
  }
@@ -28901,21 +29077,21 @@ function DataExplorerImagePreview({
28901
29077
  appearance ?? { background: "dark-stage" }
28902
29078
  );
28903
29079
  const imageSrc = typeof src === "string" ? src.trim() : "";
28904
- const stageRef = React2.useRef(null);
28905
- const stageSizeRef = React2.useRef(null);
28906
- const viewRef = React2.useRef({ scale: 1, translateX: stagePadding, translateY: stagePadding });
28907
- const draggingRef = React2.useRef(void 0);
28908
- const [naturalSize, setNaturalSize] = React2.useState(null);
28909
- const [dragging, setDragging] = React2.useState(false);
28910
- const [{ scale: scale3, translateX, translateY }, setView] = React2.useState(() => ({
29080
+ const stageRef = React4.useRef(null);
29081
+ const stageSizeRef = React4.useRef(null);
29082
+ const viewRef = React4.useRef({ scale: 1, translateX: stagePadding, translateY: stagePadding });
29083
+ const draggingRef = React4.useRef(void 0);
29084
+ const [naturalSize, setNaturalSize] = React4.useState(null);
29085
+ const [dragging, setDragging] = React4.useState(false);
29086
+ const [{ scale: scale3, translateX, translateY }, setView] = React4.useState(() => ({
28911
29087
  scale: 1,
28912
29088
  translateX: stagePadding,
28913
29089
  translateY: stagePadding
28914
29090
  }));
28915
- React2.useEffect(() => {
29091
+ React4.useEffect(() => {
28916
29092
  viewRef.current = { scale: scale3, translateX, translateY };
28917
29093
  }, [scale3, translateX, translateY]);
28918
- React2.useEffect(() => {
29094
+ React4.useEffect(() => {
28919
29095
  setNaturalSize(null);
28920
29096
  setView({ scale: 1, translateX: stagePadding, translateY: stagePadding });
28921
29097
  }, [imageSrc, stagePadding]);
@@ -28923,7 +29099,7 @@ function DataExplorerImagePreview({
28923
29099
  const normalizedMaxScale = Number.isFinite(maxScale) ? Math.max(normalizedMinScale, maxScale) : MAX_SAFE_SCALE;
28924
29100
  const normalizedZoomStep = Number.isFinite(zoomStep) && zoomStep > 1 ? zoomStep : DEFAULT_ZOOM_STEP;
28925
29101
  const normalizedStagePadding = Number.isFinite(stagePadding) && stagePadding >= 0 ? stagePadding : DEFAULT_STAGE_PADDING;
28926
- const resetView = React2.useCallback(
29102
+ const resetView = React4.useCallback(
28927
29103
  (nextNaturalSize) => {
28928
29104
  const stage = stageRef.current;
28929
29105
  const size = nextNaturalSize ?? naturalSize;
@@ -28958,7 +29134,7 @@ function DataExplorerImagePreview({
28958
29134
  },
28959
29135
  [naturalSize, normalizedMaxScale, normalizedMinScale, normalizedStagePadding]
28960
29136
  );
28961
- const compensateStageResize = React2.useCallback((width, height) => {
29137
+ const compensateStageResize = React4.useCallback((width, height) => {
28962
29138
  if (!Number.isFinite(width) || !Number.isFinite(height)) return;
28963
29139
  if (width <= 0 || height <= 0) return;
28964
29140
  const previous = stageSizeRef.current;
@@ -28973,7 +29149,7 @@ function DataExplorerImagePreview({
28973
29149
  translateY: current.translateY + deltaY
28974
29150
  }));
28975
29151
  }, [imageSrc]);
28976
- React2.useLayoutEffect(() => {
29152
+ React4.useLayoutEffect(() => {
28977
29153
  const stage = stageRef.current;
28978
29154
  if (!stage) return;
28979
29155
  compensateStageResize(stage.clientWidth, stage.clientHeight);
@@ -28992,7 +29168,7 @@ function DataExplorerImagePreview({
28992
29168
  window.addEventListener("resize", handleResize);
28993
29169
  return () => window.removeEventListener("resize", handleResize);
28994
29170
  }, [compensateStageResize]);
28995
- const zoomAtPoint = React2.useCallback(
29171
+ const zoomAtPoint = React4.useCallback(
28996
29172
  (factor, stageX, stageY) => {
28997
29173
  if (!Number.isFinite(factor) || factor === 1) return;
28998
29174
  if (!Number.isFinite(stageX) || !Number.isFinite(stageY)) return;
@@ -29015,7 +29191,7 @@ function DataExplorerImagePreview({
29015
29191
  },
29016
29192
  [normalizedMaxScale, normalizedMinScale]
29017
29193
  );
29018
- React2.useEffect(() => {
29194
+ React4.useEffect(() => {
29019
29195
  const stage = stageRef.current;
29020
29196
  if (!stage || !imageSrc || !naturalSize) return;
29021
29197
  const handleWheel = (event) => {
@@ -29030,7 +29206,7 @@ function DataExplorerImagePreview({
29030
29206
  stage.addEventListener("wheel", handleWheel, { passive: false });
29031
29207
  return () => stage.removeEventListener("wheel", handleWheel);
29032
29208
  }, [imageSrc, naturalSize, normalizedZoomStep, zoomAtPoint]);
29033
- const handlePointerDown = React2.useCallback(
29209
+ const handlePointerDown = React4.useCallback(
29034
29210
  (event) => {
29035
29211
  if (event.button !== 0) return;
29036
29212
  if (!imageSrc || !naturalSize) return;
@@ -29050,7 +29226,7 @@ function DataExplorerImagePreview({
29050
29226
  },
29051
29227
  [imageSrc, naturalSize]
29052
29228
  );
29053
- const handlePointerMove = React2.useCallback((event) => {
29229
+ const handlePointerMove = React4.useCallback((event) => {
29054
29230
  const drag = draggingRef.current;
29055
29231
  if (!drag || drag.pointerId !== event.pointerId) return;
29056
29232
  event.preventDefault();
@@ -29060,7 +29236,7 @@ function DataExplorerImagePreview({
29060
29236
  translateY: drag.startTranslateY + event.clientY - drag.startClientY
29061
29237
  });
29062
29238
  }, []);
29063
- const endDrag = React2.useCallback((event) => {
29239
+ const endDrag = React4.useCallback((event) => {
29064
29240
  const drag = draggingRef.current;
29065
29241
  if (!drag || drag.pointerId !== event.pointerId) return;
29066
29242
  draggingRef.current = void 0;
@@ -29070,7 +29246,7 @@ function DataExplorerImagePreview({
29070
29246
  stage.releasePointerCapture(event.pointerId);
29071
29247
  }
29072
29248
  }, []);
29073
- const handleDoubleClick = React2.useCallback(
29249
+ const handleDoubleClick = React4.useCallback(
29074
29250
  (event) => {
29075
29251
  if (!imageSrc || !naturalSize) return;
29076
29252
  if (isNoDragTarget(event.target)) return;
@@ -29078,7 +29254,7 @@ function DataExplorerImagePreview({
29078
29254
  },
29079
29255
  [imageSrc, naturalSize, resetView]
29080
29256
  );
29081
- const handleZoomButtonClick = React2.useCallback(
29257
+ const handleZoomButtonClick = React4.useCallback(
29082
29258
  (factor) => {
29083
29259
  const stage = stageRef.current;
29084
29260
  if (!stage || !naturalSize) return;
@@ -29954,7 +30130,7 @@ function DataExplorerViewTree({
29954
30130
  const loadingContent = loadingNode ?? labels?.loading ?? internalLabels.loading;
29955
30131
  const emptyContent = empty ?? labels?.empty ?? internalLabels.empty;
29956
30132
  const hasExplicitGroups = Array.isArray(groups);
29957
- const resolvedGroups = React2.useMemo(
30133
+ const resolvedGroups = React4.useMemo(
29958
30134
  () => {
29959
30135
  if (hasExplicitGroups) {
29960
30136
  return groups;
@@ -29970,19 +30146,19 @@ function DataExplorerViewTree({
29970
30146
  },
29971
30147
  [groups, hasExplicitGroups, nodes]
29972
30148
  );
29973
- const flattenedNodeMap = React2.useMemo(
30149
+ const flattenedNodeMap = React4.useMemo(
29974
30150
  () => buildFlattenedNodeMap(resolvedGroups),
29975
30151
  [resolvedGroups]
29976
30152
  );
29977
- const [internalExpandedNodeIds, setInternalExpandedNodeIds] = React2.useState(
30153
+ const [internalExpandedNodeIds, setInternalExpandedNodeIds] = React4.useState(
29978
30154
  () => buildDefaultNodeExpandedSet(resolvedGroups, defaultExpandedNodeIds)
29979
30155
  );
29980
- const [internalExpandedGroupIds, setInternalExpandedGroupIds] = React2.useState(
30156
+ const [internalExpandedGroupIds, setInternalExpandedGroupIds] = React4.useState(
29981
30157
  () => buildDefaultGroupExpandedSet(resolvedGroups, defaultExpandedGroupIds)
29982
30158
  );
29983
- const [draggingNodeId, setDraggingNodeId] = React2.useState();
29984
- const [dragOverNodeId, setDragOverNodeId] = React2.useState();
29985
- React2.useEffect(() => {
30159
+ const [draggingNodeId, setDraggingNodeId] = React4.useState();
30160
+ const [dragOverNodeId, setDragOverNodeId] = React4.useState();
30161
+ React4.useEffect(() => {
29986
30162
  setInternalExpandedNodeIds(
29987
30163
  buildDefaultNodeExpandedSet(resolvedGroups, defaultExpandedNodeIds)
29988
30164
  );
@@ -30811,19 +30987,19 @@ function applyClass(resolved) {
30811
30987
  }
30812
30988
  }
30813
30989
  function useDarkMode() {
30814
- const [mode, setModeState] = React2.useState(getStoredMode);
30815
- const [resolvedMode, setResolvedMode] = React2.useState(() => resolve(mode));
30816
- const setMode = React2.useCallback((next) => {
30990
+ const [mode, setModeState] = React4.useState(getStoredMode);
30991
+ const [resolvedMode, setResolvedMode] = React4.useState(() => resolve(mode));
30992
+ const setMode = React4.useCallback((next) => {
30817
30993
  localStorage.setItem(STORAGE_KEY, next);
30818
30994
  setModeState(next);
30819
30995
  const r = resolve(next);
30820
30996
  setResolvedMode(r);
30821
30997
  applyClass(r);
30822
30998
  }, []);
30823
- React2.useEffect(() => {
30999
+ React4.useEffect(() => {
30824
31000
  applyClass(resolvedMode);
30825
31001
  }, []);
30826
- React2.useEffect(() => {
31002
+ React4.useEffect(() => {
30827
31003
  if (mode !== "auto") return;
30828
31004
  const mql = window.matchMedia("(prefers-color-scheme: dark)");
30829
31005
  const handler = (e) => {