@trops/dash-core 0.1.394 → 0.1.395

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
@@ -3005,7 +3005,7 @@ var Layout = function Layout(_ref) {
3005
3005
  });
3006
3006
  };
3007
3007
 
3008
- var _excluded$6 = ["id", "children", "direction", "className", "scrollable", "width", "height", "space", "grow", "debug", "onClick", "padding", "prefix"];
3008
+ var _excluded$7 = ["id", "children", "direction", "className", "scrollable", "width", "height", "space", "grow", "debug", "onClick", "padding", "prefix"];
3009
3009
  var LayoutContainer = function LayoutContainer(_ref) {
3010
3010
  var id = _ref.id,
3011
3011
  children = _ref.children,
@@ -3031,7 +3031,7 @@ var LayoutContainer = function LayoutContainer(_ref) {
3031
3031
  padding = _ref$padding === void 0 ? "" : _ref$padding,
3032
3032
  _ref$prefix = _ref.prefix,
3033
3033
  prefix = _ref$prefix === void 0 ? "layout-container" : _ref$prefix,
3034
- props = _objectWithoutProperties(_ref, _excluded$6);
3034
+ props = _objectWithoutProperties(_ref, _excluded$7);
3035
3035
  var containerId = "uuid" in props ? props["uuid"] : DashReact.getUUID(id, prefix);
3036
3036
 
3037
3037
  // get the styles
@@ -8984,7 +8984,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
8984
8984
  var hasPropertyDescriptors_1 = hasPropertyDescriptors;
8985
8985
 
8986
8986
  var keys = objectKeys$2;
8987
- var hasSymbols$5 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
8987
+ var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
8988
8988
 
8989
8989
  var toStr$4 = Object.prototype.toString;
8990
8990
  var concat = Array.prototype.concat;
@@ -9017,7 +9017,7 @@ var defineProperty$1 = function (object, name, value, predicate) {
9017
9017
  var defineProperties$1 = function (object, map) {
9018
9018
  var predicates = arguments.length > 2 ? arguments[2] : {};
9019
9019
  var props = keys(map);
9020
- if (hasSymbols$5) {
9020
+ if (hasSymbols$4) {
9021
9021
  props = concat.call(props, Object.getOwnPropertySymbols(map));
9022
9022
  }
9023
9023
  for (var i = 0; i < props.length; i += 1) {
@@ -9083,11 +9083,11 @@ var sign$1 = function sign(number) {
9083
9083
  };
9084
9084
 
9085
9085
  var shams$1;
9086
- var hasRequiredShams;
9086
+ var hasRequiredShams$1;
9087
9087
 
9088
- function requireShams () {
9089
- if (hasRequiredShams) return shams$1;
9090
- hasRequiredShams = 1;
9088
+ function requireShams$1 () {
9089
+ if (hasRequiredShams$1) return shams$1;
9090
+ hasRequiredShams$1 = 1;
9091
9091
 
9092
9092
  /** @type {import('./shams')} */
9093
9093
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
@@ -9136,10 +9136,10 @@ function requireShams () {
9136
9136
  }
9137
9137
 
9138
9138
  var origSymbol = typeof Symbol !== 'undefined' && Symbol;
9139
- var hasSymbolSham = requireShams();
9139
+ var hasSymbolSham = requireShams$1();
9140
9140
 
9141
9141
  /** @type {import('.')} */
9142
- var hasSymbols$4 = function hasNativeSymbols() {
9142
+ var hasSymbols$3 = function hasNativeSymbols() {
9143
9143
  if (typeof origSymbol !== 'function') { return false; }
9144
9144
  if (typeof Symbol !== 'function') { return false; }
9145
9145
  if (typeof origSymbol('foo') !== 'symbol') { return false; }
@@ -9443,7 +9443,7 @@ var ThrowTypeError = $gOPD$1
9443
9443
  }())
9444
9444
  : throwTypeError;
9445
9445
 
9446
- var hasSymbols$3 = hasSymbols$4();
9446
+ var hasSymbols$2 = hasSymbols$3();
9447
9447
 
9448
9448
  var getProto$2 = getProto$3;
9449
9449
  var $ObjectGPO = requireObject_getPrototypeOf();
@@ -9461,7 +9461,7 @@ var INTRINSICS = {
9461
9461
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
9462
9462
  '%Array%': Array,
9463
9463
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
9464
- '%ArrayIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
9464
+ '%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
9465
9465
  '%AsyncFromSyncIteratorPrototype%': undefined$1,
9466
9466
  '%AsyncFunction%': needsEval,
9467
9467
  '%AsyncGenerator%': needsEval,
@@ -9492,10 +9492,10 @@ var INTRINSICS = {
9492
9492
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
9493
9493
  '%isFinite%': isFinite,
9494
9494
  '%isNaN%': isNaN,
9495
- '%IteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
9495
+ '%IteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
9496
9496
  '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
9497
9497
  '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
9498
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
9498
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
9499
9499
  '%Math%': Math,
9500
9500
  '%Number%': Number,
9501
9501
  '%Object%': $Object$2,
@@ -9509,11 +9509,11 @@ var INTRINSICS = {
9509
9509
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
9510
9510
  '%RegExp%': RegExp,
9511
9511
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
9512
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
9512
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
9513
9513
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
9514
9514
  '%String%': String,
9515
- '%StringIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
9516
- '%Symbol%': hasSymbols$3 ? Symbol : undefined$1,
9515
+ '%StringIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
9516
+ '%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
9517
9517
  '%SyntaxError%': $SyntaxError$1,
9518
9518
  '%ThrowTypeError%': ThrowTypeError,
9519
9519
  '%TypedArray%': TypedArray,
@@ -9866,12 +9866,12 @@ var callBound$i = function callBoundIntrinsic(name, allowMissing) {
9866
9866
 
9867
9867
  // modified from https://github.com/es-shims/es6-shim
9868
9868
  var objectKeys$1 = objectKeys$2;
9869
- var hasSymbols$2 = requireShams()();
9869
+ var hasSymbols$1 = requireShams$1()();
9870
9870
  var callBound$h = callBound$i;
9871
9871
  var $Object$1 = esObjectAtoms;
9872
9872
  var $push = callBound$h('Array.prototype.push');
9873
9873
  var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
9874
- var originalGetSymbols = hasSymbols$2 ? $Object$1.getOwnPropertySymbols : null;
9874
+ var originalGetSymbols = hasSymbols$1 ? $Object$1.getOwnPropertySymbols : null;
9875
9875
 
9876
9876
  // eslint-disable-next-line no-unused-vars
9877
9877
  var implementation$8 = function assign(target, source1) {
@@ -9885,7 +9885,7 @@ var implementation$8 = function assign(target, source1) {
9885
9885
 
9886
9886
  // step 3.a.ii:
9887
9887
  var keys = objectKeys$1(from);
9888
- var getSymbols = hasSymbols$2 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
9888
+ var getSymbols = hasSymbols$1 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
9889
9889
  if (getSymbols) {
9890
9890
  var syms = getSymbols(from);
9891
9891
  for (var j = 0; j < syms.length; ++j) {
@@ -10182,14 +10182,23 @@ var regexp_prototype_flags = flagsBound;
10182
10182
 
10183
10183
  var esGetIterator = {exports: {}};
10184
10184
 
10185
- var hasSymbols$1 = requireShams();
10185
+ var shams;
10186
+ var hasRequiredShams;
10186
10187
 
10187
- /** @type {import('.')} */
10188
- var shams = function hasToStringTagShams() {
10189
- return hasSymbols$1() && !!Symbol.toStringTag;
10190
- };
10188
+ function requireShams () {
10189
+ if (hasRequiredShams) return shams;
10190
+ hasRequiredShams = 1;
10191
10191
 
10192
- var hasToStringTag$7 = shams();
10192
+ var hasSymbols = requireShams$1();
10193
+
10194
+ /** @type {import('.')} */
10195
+ shams = function hasToStringTagShams() {
10196
+ return hasSymbols() && !!Symbol.toStringTag;
10197
+ };
10198
+ return shams;
10199
+ }
10200
+
10201
+ var hasToStringTag$7 = requireShams()();
10193
10202
  var callBound$f = callBound$i;
10194
10203
 
10195
10204
  var $toString$7 = callBound$f('Object.prototype.toString');
@@ -11226,7 +11235,7 @@ var tryStringObject = function tryStringObject(value) {
11226
11235
  /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
11227
11236
  var $toString$6 = callBound$c('Object.prototype.toString');
11228
11237
  var strClass = '[object String]';
11229
- var hasToStringTag$6 = shams();
11238
+ var hasToStringTag$6 = requireShams()();
11230
11239
 
11231
11240
  /** @type {import('.')} */
11232
11241
  var isString$2 = function isString(value) {
@@ -11342,7 +11351,7 @@ var isSet$2 = exported$1 || function isSet(x) {
11342
11351
  var isArguments$1 = isArguments$2;
11343
11352
  var getStopIterationIterator = stopIterationIterator;
11344
11353
 
11345
- if (hasSymbols$4() || requireShams()()) {
11354
+ if (hasSymbols$3() || requireShams$1()()) {
11346
11355
  var $iterator = Symbol.iterator;
11347
11356
  // Symbol is available natively or shammed
11348
11357
  // natively:
@@ -11631,7 +11640,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
11631
11640
  /** @type {(value: unknown) => string} */
11632
11641
  var toStr$2 = callBound$9('Object.prototype.toString');
11633
11642
  var dateClass = '[object Date]';
11634
- var hasToStringTag$5 = shams();
11643
+ var hasToStringTag$5 = requireShams()();
11635
11644
 
11636
11645
  /** @type {import('.')} */
11637
11646
  var isDateObject = function isDateObject(value) {
@@ -11642,7 +11651,7 @@ var isDateObject = function isDateObject(value) {
11642
11651
  };
11643
11652
 
11644
11653
  var callBound$8 = callBound$i;
11645
- var hasToStringTag$4 = shams();
11654
+ var hasToStringTag$4 = requireShams()();
11646
11655
  var hasOwn = hasown;
11647
11656
  var gOPD$1 = gopd$1;
11648
11657
 
@@ -11747,7 +11756,7 @@ var tryNumberObject = function tryNumberObject(value) {
11747
11756
  };
11748
11757
  var $toString$3 = callBound$6('Object.prototype.toString');
11749
11758
  var numClass = '[object Number]';
11750
- var hasToStringTag$3 = shams();
11759
+ var hasToStringTag$3 = requireShams()();
11751
11760
 
11752
11761
  /** @type {import('.')} */
11753
11762
  var isNumberObject = function isNumberObject(value) {
@@ -11774,7 +11783,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
11774
11783
  }
11775
11784
  };
11776
11785
  var boolClass = '[object Boolean]';
11777
- var hasToStringTag$2 = shams();
11786
+ var hasToStringTag$2 = requireShams()();
11778
11787
 
11779
11788
  /** @type {import('.')} */
11780
11789
  var isBooleanObject = function isBoolean(value) {
@@ -11816,7 +11825,7 @@ function requireSafeRegexTest () {
11816
11825
 
11817
11826
  var callBound$4 = callBound$i;
11818
11827
  var $toString$1 = callBound$4('Object.prototype.toString');
11819
- var hasSymbols = hasSymbols$4();
11828
+ var hasSymbols = hasSymbols$3();
11820
11829
  var safeRegexTest = requireSafeRegexTest();
11821
11830
 
11822
11831
  if (hasSymbols) {
@@ -12262,7 +12271,7 @@ var gOPD = gopd$1;
12262
12271
  var getProto = getProto$3;
12263
12272
 
12264
12273
  var $toString = callBound$2('Object.prototype.toString');
12265
- var hasToStringTag = shams();
12274
+ var hasToStringTag = requireShams()();
12266
12275
 
12267
12276
  var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
12268
12277
  var typedArrays = availableTypedArrays();
@@ -13012,7 +13021,7 @@ var PanelEditItem = function PanelEditItem(_ref) {
13012
13021
  });
13013
13022
  };
13014
13023
 
13015
- var _excluded$5 = ["rows", "cols"];
13024
+ var _excluded$6 = ["rows", "cols"];
13016
13025
  function _createForOfIteratorHelper$l(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$l(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13017
13026
  function _unsupportedIterableToArray$l(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$l(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$l(r, a) : void 0; } }
13018
13027
  function _arrayLikeToArray$l(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -13185,7 +13194,7 @@ function GridEditor(_ref) {
13185
13194
  function resequenceGridKeys(grid) {
13186
13195
  var rows = grid.rows,
13187
13196
  cols = grid.cols,
13188
- cells = _objectWithoutProperties(grid, _excluded$5);
13197
+ cells = _objectWithoutProperties(grid, _excluded$6);
13189
13198
  var newGrid = {
13190
13199
  rows: rows,
13191
13200
  cols: cols
@@ -23516,7 +23525,7 @@ var WidgetProviderWrapper = function WidgetProviderWrapper(_ref2) {
23516
23525
  return children;
23517
23526
  };
23518
23527
 
23519
- var _excluded$4 = ["uuid", "children", "version", "direction", "scrollable", "className", "width", "height", "space", "grow", "publishEvent", "api", "requiredProviders", "selectedProviders", "onProviderSelect"];
23528
+ var _excluded$5 = ["uuid", "children", "version", "direction", "scrollable", "className", "width", "height", "space", "grow", "publishEvent", "api", "requiredProviders", "selectedProviders", "onProviderSelect"];
23520
23529
  function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
23521
23530
  function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { return !!t; })(); }
23522
23531
  var WidgetErrorBoundary$1 = /*#__PURE__*/function (_Component) {
@@ -23614,7 +23623,7 @@ var Widget = function Widget(_ref) {
23614
23623
  selectedProviders = _ref$selectedProvider === void 0 ? {} : _ref$selectedProvider,
23615
23624
  _ref$onProviderSelect = _ref.onProviderSelect,
23616
23625
  onProviderSelect = _ref$onProviderSelect === void 0 ? null : _ref$onProviderSelect;
23617
- _objectWithoutProperties(_ref, _excluded$4);
23626
+ _objectWithoutProperties(_ref, _excluded$5);
23618
23627
  var uuidString = DashReact.getUUID(uuid);
23619
23628
  return /*#__PURE__*/jsxRuntime.jsx(LayoutContainer, {
23620
23629
  uuid: uuid,
@@ -24497,12 +24506,12 @@ var WidgetFactory = {
24497
24506
  }
24498
24507
  };
24499
24508
 
24500
- var _excluded$3 = ["title", "description", "icon"];
24509
+ var _excluded$4 = ["title", "description", "icon"];
24501
24510
  var ExternalWidget = function ExternalWidget(_ref) {
24502
24511
  var title = _ref.title,
24503
24512
  description = _ref.description,
24504
24513
  icon = _ref.icon;
24505
- _objectWithoutProperties(_ref, _excluded$3);
24514
+ _objectWithoutProperties(_ref, _excluded$4);
24506
24515
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
24507
24516
  className: "flex flex-col h-full justify-center items-center w-full gap-2 p-4 text-center",
24508
24517
  children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
@@ -33272,7 +33281,7 @@ var ThemePane = function ThemePane(_ref) {
33272
33281
  });
33273
33282
  };
33274
33283
 
33275
- var _excluded$2 = ["colorFromTheme", "colorName", "shade", "variant", "colorType", "colorLevelName", "selected", "onClick", "onMouseOver", "width", "height"];
33284
+ var _excluded$3 = ["colorFromTheme", "colorName", "shade", "variant", "colorType", "colorLevelName", "selected", "onClick", "onMouseOver", "width", "height"];
33276
33285
  function ownKeys$u(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
33277
33286
  function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$u(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
33278
33287
  var ColorTile = function ColorTile(_ref) {
@@ -33298,7 +33307,7 @@ var ColorTile = function ColorTile(_ref) {
33298
33307
  width = _ref$width === void 0 ? "w-full" : _ref$width,
33299
33308
  _ref$height = _ref.height,
33300
33309
  height = _ref$height === void 0 ? "h-10" : _ref$height,
33301
- rest = _objectWithoutProperties(_ref, _excluded$2);
33310
+ rest = _objectWithoutProperties(_ref, _excluded$3);
33302
33311
  var c = ColorModel(_objectSpread$u({
33303
33312
  colorFromTheme: colorFromTheme,
33304
33313
  colorName: colorName,
@@ -36286,7 +36295,7 @@ var NonColorPickerPane = function NonColorPickerPane(_ref) {
36286
36295
  });
36287
36296
  };
36288
36297
 
36289
- var _excluded$1 = ["children"];
36298
+ var _excluded$2 = ["children"];
36290
36299
  function ownKeys$q(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
36291
36300
  function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
36292
36301
  var COLOR_PROPERTIES = new Set(["backgroundColor", "textColor", "borderColor", "hoverBackgroundColor", "hoverTextColor", "hoverBorderColor", "focusRingColor", "focusBorderColor", "activeBackgroundColor", "activeTextColor", "placeholderTextColor"]);
@@ -37032,7 +37041,7 @@ var PanelTheme = function PanelTheme(_ref) {
37032
37041
  }
37033
37042
  var _comp$props = comp.props,
37034
37043
  childContent = _comp$props.children,
37035
- restProps = _objectWithoutProperties(_comp$props, _excluded$1);
37044
+ restProps = _objectWithoutProperties(_comp$props, _excluded$2);
37036
37045
  var renderedComponent = childContent !== undefined ? /*#__PURE__*/jsxRuntime.jsx(comp.Component, _objectSpread$q(_objectSpread$q({}, restProps), {}, {
37037
37046
  children: childContent
37038
37047
  })) : /*#__PURE__*/jsxRuntime.jsx(comp.Component, _objectSpread$q({}, restProps));
@@ -42092,8 +42101,116 @@ var ProviderDetail = function ProviderDetail(_ref) {
42092
42101
  });
42093
42102
  };
42094
42103
 
42104
+ var _excluded$1 = ["transport", "command", "args", "envMapping", "url", "headerTemplate", "headers"];
42095
42105
  function ownKeys$k(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
42096
42106
  function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
42107
+ var DirectoryListField = function DirectoryListField(_ref) {
42108
+ var field = _ref.field,
42109
+ value = _ref.value,
42110
+ onChange = _ref.onChange,
42111
+ errorText = _ref.errorText;
42112
+ var initialRows = React.useMemo(function () {
42113
+ var parsed = (value || "").split(",").map(function (p) {
42114
+ return p.trim();
42115
+ });
42116
+ var nonEmpty = parsed.filter(Boolean);
42117
+ return nonEmpty.length === 0 ? [""] : nonEmpty;
42118
+ }, []); // eslint-disable-line react-hooks/exhaustive-deps
42119
+
42120
+ var _useState = React.useState(initialRows),
42121
+ _useState2 = _slicedToArray(_useState, 2),
42122
+ rows = _useState2[0],
42123
+ setRows = _useState2[1];
42124
+ var updateRows = function updateRows(next) {
42125
+ setRows(next);
42126
+ onChange(next.map(function (p) {
42127
+ return p.trim();
42128
+ }).filter(Boolean).join(","));
42129
+ };
42130
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
42131
+ className: "flex flex-col gap-2",
42132
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FormLabel, {
42133
+ label: field.displayName,
42134
+ required: field.required
42135
+ }), field.instructions && /*#__PURE__*/jsxRuntime.jsx("p", {
42136
+ className: "text-xs opacity-50",
42137
+ children: field.instructions
42138
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
42139
+ className: "flex flex-col gap-2",
42140
+ children: [rows.map(function (rowValue, idx) {
42141
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
42142
+ className: "flex gap-2 items-center",
42143
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
42144
+ className: "flex-1",
42145
+ children: /*#__PURE__*/jsxRuntime.jsx(DashReact.InputText, {
42146
+ type: "text",
42147
+ value: rowValue,
42148
+ onChange: function onChange(v) {
42149
+ var next = _toConsumableArray(rows);
42150
+ next[idx] = v;
42151
+ updateRows(next);
42152
+ },
42153
+ placeholder: "/Users/you/some/folder"
42154
+ })
42155
+ }), /*#__PURE__*/jsxRuntime.jsx("button", {
42156
+ type: "button",
42157
+ onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
42158
+ var picked, next;
42159
+ return _regeneratorRuntime.wrap(function (_context) {
42160
+ while (1) switch (_context.prev = _context.next) {
42161
+ case 0:
42162
+ _context.next = 1;
42163
+ return window.mainApi.dialog.chooseFile(false, []);
42164
+ case 1:
42165
+ picked = _context.sent;
42166
+ if (picked) {
42167
+ next = _toConsumableArray(rows);
42168
+ next[idx] = picked;
42169
+ updateRows(next);
42170
+ }
42171
+ case 2:
42172
+ case "end":
42173
+ return _context.stop();
42174
+ }
42175
+ }, _callee);
42176
+ })),
42177
+ className: "px-3 py-1.5 text-sm rounded bg-white/10 hover:bg-white/20 transition-colors whitespace-nowrap",
42178
+ children: "Choose folder\u2026"
42179
+ }), rows.length > 1 && /*#__PURE__*/jsxRuntime.jsx("button", {
42180
+ type: "button",
42181
+ onClick: function onClick() {
42182
+ var next = rows.filter(function (_, i) {
42183
+ return i !== idx;
42184
+ });
42185
+ updateRows(next.length ? next : [""]);
42186
+ },
42187
+ className: "px-2 py-1.5 text-sm rounded bg-white/5 hover:bg-red-500/20 text-red-300 transition-colors",
42188
+ "aria-label": "Remove path",
42189
+ children: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
42190
+ icon: "xmark",
42191
+ className: "text-xs"
42192
+ })
42193
+ })]
42194
+ }, idx);
42195
+ }), /*#__PURE__*/jsxRuntime.jsxs("button", {
42196
+ type: "button",
42197
+ onClick: function onClick() {
42198
+ return setRows([].concat(_toConsumableArray(rows), [""]));
42199
+ },
42200
+ className: "text-sm text-blue-400 hover:text-blue-300 transition-colors flex items-center gap-1 self-start",
42201
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
42202
+ icon: "plus",
42203
+ className: "text-xs"
42204
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
42205
+ children: "Add directory"
42206
+ })]
42207
+ })]
42208
+ }), errorText && /*#__PURE__*/jsxRuntime.jsx("p", {
42209
+ className: "text-sm text-red-400",
42210
+ children: errorText
42211
+ })]
42212
+ });
42213
+ };
42097
42214
  var rowIdCounter = 0;
42098
42215
  var nextRowId = function nextRowId() {
42099
42216
  return "row_".concat(++rowIdCounter);
@@ -42101,13 +42218,28 @@ var nextRowId = function nextRowId() {
42101
42218
 
42102
42219
  /**
42103
42220
  * Build an mcpConfig object from the current form state.
42221
+ *
42222
+ * `baseConfig` is the existing mcpConfig this save is derived from (either a
42223
+ * catalog entry's config or the saved provider's current config). Fields the
42224
+ * form doesn't render (argsMapping, staticEnv, tokenRefresh, etc.) are copied
42225
+ * through so editing a provider never drops them.
42104
42226
  */
42105
- function buildMcpConfig(transport, _ref) {
42106
- var command = _ref.command,
42107
- args = _ref.args,
42108
- envMappingRows = _ref.envMappingRows,
42109
- url = _ref.url,
42110
- headerRows = _ref.headerRows;
42227
+ function buildMcpConfig(transport, _ref3) {
42228
+ var command = _ref3.command,
42229
+ args = _ref3.args,
42230
+ envMappingRows = _ref3.envMappingRows,
42231
+ url = _ref3.url,
42232
+ headerRows = _ref3.headerRows;
42233
+ var baseConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
42234
+ // Everything on baseConfig that the form doesn't own gets preserved.
42235
+ baseConfig.transport;
42236
+ baseConfig.command;
42237
+ baseConfig.args;
42238
+ baseConfig.envMapping;
42239
+ baseConfig.url;
42240
+ baseConfig.headerTemplate;
42241
+ baseConfig.headers;
42242
+ var passThrough = _objectWithoutProperties(baseConfig, _excluded$1);
42111
42243
  if (transport === "stdio") {
42112
42244
  var envMapping = {};
42113
42245
  envMappingRows.forEach(function (row) {
@@ -42117,12 +42249,12 @@ function buildMcpConfig(transport, _ref) {
42117
42249
  envMapping[env] = cred;
42118
42250
  }
42119
42251
  });
42120
- return {
42252
+ return _objectSpread$k(_objectSpread$k({}, passThrough), {}, {
42121
42253
  transport: "stdio",
42122
42254
  command: command.trim(),
42123
42255
  args: args.trim().split(/\s+/).filter(Boolean),
42124
42256
  envMapping: envMapping
42125
- };
42257
+ });
42126
42258
  }
42127
42259
 
42128
42260
  // streamable_http
@@ -42134,10 +42266,10 @@ function buildMcpConfig(transport, _ref) {
42134
42266
  headerTemplate[name] = value;
42135
42267
  }
42136
42268
  });
42137
- var config = {
42269
+ var config = _objectSpread$k(_objectSpread$k({}, passThrough), {}, {
42138
42270
  transport: "streamable_http",
42139
42271
  url: url.trim()
42140
- };
42272
+ });
42141
42273
  if (Object.keys(headerTemplate).length > 0) {
42142
42274
  config.headerTemplate = headerTemplate;
42143
42275
  }
@@ -42162,127 +42294,132 @@ function buildMcpConfig(transport, _ref) {
42162
42294
  * @param {string} initialUrl - Pre-populated URL (edit mode)
42163
42295
  * @param {Array} initialHeaderRows - Pre-populated header rows (edit mode)
42164
42296
  * @param {object} initialCredentials - Pre-populated credential values (edit mode)
42297
+ * @param {object} initialMcpConfig - The full saved/catalog mcpConfig. Fields
42298
+ * the form does NOT own (argsMapping, staticEnv, tokenRefresh, etc.) are
42299
+ * preserved verbatim on save so editing never silently drops them.
42165
42300
  */
42166
- var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42301
+ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
42167
42302
  var _testResult$tools;
42168
- var onSave = _ref2.onSave,
42169
- onBack = _ref2.onBack,
42170
- _ref2$isEditMode = _ref2.isEditMode,
42171
- isEditMode = _ref2$isEditMode === void 0 ? false : _ref2$isEditMode,
42172
- _ref2$initialName = _ref2.initialName,
42173
- initialName = _ref2$initialName === void 0 ? "" : _ref2$initialName,
42174
- _ref2$initialProvider = _ref2.initialProviderType,
42175
- initialProviderType = _ref2$initialProvider === void 0 ? "custom" : _ref2$initialProvider,
42176
- _ref2$initialCredenti = _ref2.initialCredentialSchema,
42177
- initialCredentialSchema = _ref2$initialCredenti === void 0 ? {} : _ref2$initialCredenti,
42178
- _ref2$initialTranspor = _ref2.initialTransport,
42179
- initialTransport = _ref2$initialTranspor === void 0 ? "stdio" : _ref2$initialTranspor,
42180
- _ref2$initialCommand = _ref2.initialCommand,
42181
- initialCommand = _ref2$initialCommand === void 0 ? "" : _ref2$initialCommand,
42182
- _ref2$initialArgs = _ref2.initialArgs,
42183
- initialArgs = _ref2$initialArgs === void 0 ? "" : _ref2$initialArgs,
42184
- _ref2$initialEnvMappi = _ref2.initialEnvMappingRows,
42185
- initialEnvMappingRows = _ref2$initialEnvMappi === void 0 ? [] : _ref2$initialEnvMappi,
42186
- _ref2$initialUrl = _ref2.initialUrl,
42187
- initialUrl = _ref2$initialUrl === void 0 ? "" : _ref2$initialUrl,
42188
- _ref2$initialHeaderRo = _ref2.initialHeaderRows,
42189
- initialHeaderRows = _ref2$initialHeaderRo === void 0 ? [] : _ref2$initialHeaderRo,
42190
- _ref2$initialCredenti2 = _ref2.initialCredentials,
42191
- initialCredentials = _ref2$initialCredenti2 === void 0 ? {} : _ref2$initialCredenti2,
42192
- _ref2$initialAllowedT = _ref2.initialAllowedTools,
42193
- initialAllowedTools = _ref2$initialAllowedT === void 0 ? null : _ref2$initialAllowedT,
42194
- _ref2$initialAuthComm = _ref2.initialAuthCommand,
42195
- initialAuthCommand = _ref2$initialAuthComm === void 0 ? null : _ref2$initialAuthComm;
42303
+ var onSave = _ref4.onSave,
42304
+ onBack = _ref4.onBack,
42305
+ _ref4$isEditMode = _ref4.isEditMode,
42306
+ isEditMode = _ref4$isEditMode === void 0 ? false : _ref4$isEditMode,
42307
+ _ref4$initialName = _ref4.initialName,
42308
+ initialName = _ref4$initialName === void 0 ? "" : _ref4$initialName,
42309
+ _ref4$initialProvider = _ref4.initialProviderType,
42310
+ initialProviderType = _ref4$initialProvider === void 0 ? "custom" : _ref4$initialProvider,
42311
+ _ref4$initialCredenti = _ref4.initialCredentialSchema,
42312
+ initialCredentialSchema = _ref4$initialCredenti === void 0 ? {} : _ref4$initialCredenti,
42313
+ _ref4$initialTranspor = _ref4.initialTransport,
42314
+ initialTransport = _ref4$initialTranspor === void 0 ? "stdio" : _ref4$initialTranspor,
42315
+ _ref4$initialCommand = _ref4.initialCommand,
42316
+ initialCommand = _ref4$initialCommand === void 0 ? "" : _ref4$initialCommand,
42317
+ _ref4$initialArgs = _ref4.initialArgs,
42318
+ initialArgs = _ref4$initialArgs === void 0 ? "" : _ref4$initialArgs,
42319
+ _ref4$initialEnvMappi = _ref4.initialEnvMappingRows,
42320
+ initialEnvMappingRows = _ref4$initialEnvMappi === void 0 ? [] : _ref4$initialEnvMappi,
42321
+ _ref4$initialUrl = _ref4.initialUrl,
42322
+ initialUrl = _ref4$initialUrl === void 0 ? "" : _ref4$initialUrl,
42323
+ _ref4$initialHeaderRo = _ref4.initialHeaderRows,
42324
+ initialHeaderRows = _ref4$initialHeaderRo === void 0 ? [] : _ref4$initialHeaderRo,
42325
+ _ref4$initialCredenti2 = _ref4.initialCredentials,
42326
+ initialCredentials = _ref4$initialCredenti2 === void 0 ? {} : _ref4$initialCredenti2,
42327
+ _ref4$initialAllowedT = _ref4.initialAllowedTools,
42328
+ initialAllowedTools = _ref4$initialAllowedT === void 0 ? null : _ref4$initialAllowedT,
42329
+ _ref4$initialAuthComm = _ref4.initialAuthCommand,
42330
+ initialAuthCommand = _ref4$initialAuthComm === void 0 ? null : _ref4$initialAuthComm,
42331
+ _ref4$initialMcpConfi = _ref4.initialMcpConfig,
42332
+ initialMcpConfig = _ref4$initialMcpConfi === void 0 ? null : _ref4$initialMcpConfi;
42196
42333
  var appContext = React.useContext(AppContext);
42197
42334
  var dashApi = appContext === null || appContext === void 0 ? void 0 : appContext.dashApi;
42198
42335
 
42199
42336
  // Transport selection
42200
- var _useState = React.useState(initialTransport),
42201
- _useState2 = _slicedToArray(_useState, 2),
42202
- transport = _useState2[0],
42203
- setTransport = _useState2[1];
42337
+ var _useState3 = React.useState(initialTransport),
42338
+ _useState4 = _slicedToArray(_useState3, 2),
42339
+ transport = _useState4[0],
42340
+ setTransport = _useState4[1];
42204
42341
 
42205
42342
  // Common
42206
- var _useState3 = React.useState(initialName),
42207
- _useState4 = _slicedToArray(_useState3, 2),
42208
- providerName = _useState4[0],
42209
- setProviderName = _useState4[1];
42210
- var _useState5 = React.useState(initialCredentials),
42343
+ var _useState5 = React.useState(initialName),
42211
42344
  _useState6 = _slicedToArray(_useState5, 2),
42212
- credentialData = _useState6[0],
42213
- setCredentialData = _useState6[1];
42214
- var _useState7 = React.useState({}),
42345
+ providerName = _useState6[0],
42346
+ setProviderName = _useState6[1];
42347
+ var _useState7 = React.useState(initialCredentials),
42215
42348
  _useState8 = _slicedToArray(_useState7, 2),
42216
- formErrors = _useState8[0],
42217
- setFormErrors = _useState8[1];
42218
- var _useState9 = React.useState(false),
42349
+ credentialData = _useState8[0],
42350
+ setCredentialData = _useState8[1];
42351
+ var _useState9 = React.useState({}),
42219
42352
  _useState0 = _slicedToArray(_useState9, 2),
42220
- isTesting = _useState0[0],
42221
- setIsTesting = _useState0[1];
42222
- var _useState1 = React.useState(null),
42353
+ formErrors = _useState0[0],
42354
+ setFormErrors = _useState0[1];
42355
+ var _useState1 = React.useState(false),
42223
42356
  _useState10 = _slicedToArray(_useState1, 2),
42224
- testResult = _useState10[0],
42225
- setTestResult = _useState10[1];
42357
+ isTesting = _useState10[0],
42358
+ setIsTesting = _useState10[1];
42359
+ var _useState11 = React.useState(null),
42360
+ _useState12 = _slicedToArray(_useState11, 2),
42361
+ testResult = _useState12[0],
42362
+ setTestResult = _useState12[1];
42226
42363
 
42227
42364
  // stdio fields
42228
- var _useState11 = React.useState(initialCommand),
42229
- _useState12 = _slicedToArray(_useState11, 2),
42230
- command = _useState12[0],
42231
- setCommand = _useState12[1];
42232
- var _useState13 = React.useState(initialArgs),
42365
+ var _useState13 = React.useState(initialCommand),
42233
42366
  _useState14 = _slicedToArray(_useState13, 2),
42234
- args = _useState14[0],
42235
- setArgs = _useState14[1];
42236
- var _useState15 = React.useState(initialEnvMappingRows),
42367
+ command = _useState14[0],
42368
+ setCommand = _useState14[1];
42369
+ var _useState15 = React.useState(initialArgs),
42237
42370
  _useState16 = _slicedToArray(_useState15, 2),
42238
- envMappingRows = _useState16[0],
42239
- setEnvMappingRows = _useState16[1];
42371
+ args = _useState16[0],
42372
+ setArgs = _useState16[1];
42373
+ var _useState17 = React.useState(initialEnvMappingRows),
42374
+ _useState18 = _slicedToArray(_useState17, 2),
42375
+ envMappingRows = _useState18[0],
42376
+ setEnvMappingRows = _useState18[1];
42240
42377
 
42241
42378
  // HTTP fields
42242
- var _useState17 = React.useState(initialUrl),
42243
- _useState18 = _slicedToArray(_useState17, 2),
42244
- url = _useState18[0],
42245
- setUrl = _useState18[1];
42246
- var _useState19 = React.useState(initialHeaderRows),
42379
+ var _useState19 = React.useState(initialUrl),
42247
42380
  _useState20 = _slicedToArray(_useState19, 2),
42248
- headerRows = _useState20[0],
42249
- setHeaderRows = _useState20[1];
42381
+ url = _useState20[0],
42382
+ setUrl = _useState20[1];
42383
+ var _useState21 = React.useState(initialHeaderRows),
42384
+ _useState22 = _slicedToArray(_useState21, 2),
42385
+ headerRows = _useState22[0],
42386
+ setHeaderRows = _useState22[1];
42250
42387
 
42251
42388
  // Tool selection state
42252
- var _useState21 = React.useState(initialAllowedTools),
42253
- _useState22 = _slicedToArray(_useState21, 2),
42254
- selectedTools = _useState22[0],
42255
- setSelectedTools = _useState22[1];
42389
+ var _useState23 = React.useState(initialAllowedTools),
42390
+ _useState24 = _slicedToArray(_useState23, 2),
42391
+ selectedTools = _useState24[0],
42392
+ setSelectedTools = _useState24[1];
42256
42393
 
42257
42394
  // Wizard step state
42258
- var _useState23 = React.useState(0),
42259
- _useState24 = _slicedToArray(_useState23, 2),
42260
- wizardStep = _useState24[0],
42261
- setWizardStep = _useState24[1];
42395
+ var _useState25 = React.useState(0),
42396
+ _useState26 = _slicedToArray(_useState25, 2),
42397
+ wizardStep = _useState26[0],
42398
+ setWizardStep = _useState26[1];
42262
42399
 
42263
42400
  // Auth state
42264
- var _useState25 = React.useState(false),
42265
- _useState26 = _slicedToArray(_useState25, 2),
42266
- isAuthorizing = _useState26[0],
42267
- setIsAuthorizing = _useState26[1];
42268
- var _useState27 = React.useState(null),
42401
+ var _useState27 = React.useState(false),
42269
42402
  _useState28 = _slicedToArray(_useState27, 2),
42270
- authResult = _useState28[0],
42271
- setAuthResult = _useState28[1];
42403
+ isAuthorizing = _useState28[0],
42404
+ setIsAuthorizing = _useState28[1];
42405
+ var _useState29 = React.useState(null),
42406
+ _useState30 = _slicedToArray(_useState29, 2),
42407
+ authResult = _useState30[0],
42408
+ setAuthResult = _useState30[1];
42272
42409
 
42273
42410
  // JSON editor state
42274
- var _useState29 = React.useState("form"),
42275
- _useState30 = _slicedToArray(_useState29, 2),
42276
- viewMode = _useState30[0],
42277
- setViewMode = _useState30[1]; // "form" | "json"
42278
- var _useState31 = React.useState(""),
42411
+ var _useState31 = React.useState("form"),
42279
42412
  _useState32 = _slicedToArray(_useState31, 2),
42280
- jsonText = _useState32[0],
42281
- setJsonText = _useState32[1];
42282
- var _useState33 = React.useState(null),
42413
+ viewMode = _useState32[0],
42414
+ setViewMode = _useState32[1]; // "form" | "json"
42415
+ var _useState33 = React.useState(""),
42283
42416
  _useState34 = _slicedToArray(_useState33, 2),
42284
- jsonError = _useState34[0],
42285
- setJsonError = _useState34[1];
42417
+ jsonText = _useState34[0],
42418
+ setJsonText = _useState34[1];
42419
+ var _useState35 = React.useState(null),
42420
+ _useState36 = _slicedToArray(_useState35, 2),
42421
+ jsonError = _useState36[0],
42422
+ setJsonError = _useState36[1];
42286
42423
 
42287
42424
  // Clear credential data when transport changes (derived fields change entirely)
42288
42425
  // Only in create mode — in edit mode the initial transport is set correctly
@@ -42315,7 +42452,9 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42315
42452
  setWizardStep(newStep);
42316
42453
  };
42317
42454
 
42318
- // Build mcpConfig from current state
42455
+ // Build mcpConfig from current state. Pass the initial mcpConfig so fields
42456
+ // the form doesn't manage (argsMapping, staticEnv, tokenRefresh, etc.) are
42457
+ // preserved on save instead of being silently dropped.
42319
42458
  var mcpConfig = React.useMemo(function () {
42320
42459
  return buildMcpConfig(transport, {
42321
42460
  command: command,
@@ -42323,8 +42462,8 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42323
42462
  envMappingRows: envMappingRows,
42324
42463
  url: url,
42325
42464
  headerRows: headerRows
42326
- });
42327
- }, [transport, command, args, envMappingRows, url, headerRows]);
42465
+ }, initialMcpConfig || {});
42466
+ }, [transport, command, args, envMappingRows, url, headerRows, initialMcpConfig]);
42328
42467
 
42329
42468
  // Invalidate test result when config changes after a test
42330
42469
  var mcpConfigRef = React.useRef(mcpConfig);
@@ -42453,9 +42592,23 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42453
42592
  }
42454
42593
  }
42455
42594
  formFields.forEach(function (field) {
42456
- var _credentialData$field;
42457
- if (field.required && !((_credentialData$field = credentialData[field.key]) !== null && _credentialData$field !== void 0 && _credentialData$field.trim())) {
42595
+ var raw = credentialData[field.key];
42596
+ if (field.required && !(raw !== null && raw !== void 0 && raw.trim())) {
42458
42597
  errors[field.key] = "".concat(field.displayName, " is required");
42598
+ return;
42599
+ }
42600
+ // directory-list: every non-empty entry must be an absolute path.
42601
+ // `~` is not expanded by child_process.spawn, so the MCP filesystem
42602
+ // server would never match a real path against a tilde prefix.
42603
+ if (field.type === "directory-list" && raw !== null && raw !== void 0 && raw.trim()) {
42604
+ var bad = raw.split(",").map(function (p) {
42605
+ return p.trim();
42606
+ }).filter(Boolean).find(function (p) {
42607
+ return !p.startsWith("/");
42608
+ });
42609
+ if (bad) {
42610
+ errors[field.key] = "\"".concat(bad, "\" must be an absolute path (no `~`, use /Users/you/...)");
42611
+ }
42459
42612
  }
42460
42613
  });
42461
42614
  setFormErrors(errors);
@@ -42553,7 +42706,7 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42553
42706
  envMappingRows: result.envMappingRows,
42554
42707
  url: result.url,
42555
42708
  headerRows: result.headerRows
42556
- });
42709
+ }, initialMcpConfig || {});
42557
42710
  onSave(name, initialProviderType, result.credentialData, config, selectedTools);
42558
42711
  return;
42559
42712
  }
@@ -42908,6 +43061,23 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42908
43061
  children: "Values for the fields referenced in your configuration above"
42909
43062
  })]
42910
43063
  }), formFields.map(function (field) {
43064
+ // directory-list: repeating rows with an absolute-path
43065
+ // input + directory picker. Local state inside the
43066
+ // component so adding an empty row doesn't get
43067
+ // immediately stripped by the filter on write.
43068
+ if (field.type === "directory-list") {
43069
+ return /*#__PURE__*/jsxRuntime.jsx(DirectoryListField, {
43070
+ field: field,
43071
+ value: credentialData[field.key] || "",
43072
+ onChange: function onChange(v) {
43073
+ return handleCredentialChange(field.key, v);
43074
+ },
43075
+ errorText: formErrors[field.key]
43076
+ }, field.key);
43077
+ }
43078
+
43079
+ // Default: single text/password input with optional
43080
+ // "Browse" button for file-type credentials.
42911
43081
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
42912
43082
  className: "flex flex-col gap-2",
42913
43083
  children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FormLabel, {
@@ -42926,21 +43096,21 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42926
43096
  placeholder: field.type === "file" ? "Select a file..." : "Enter ".concat(field.displayName.toLowerCase())
42927
43097
  })
42928
43098
  }), field.type === "file" && /*#__PURE__*/jsxRuntime.jsx("button", {
42929
- onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
43099
+ onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
42930
43100
  var filepath;
42931
- return _regeneratorRuntime.wrap(function (_context) {
42932
- while (1) switch (_context.prev = _context.next) {
43101
+ return _regeneratorRuntime.wrap(function (_context2) {
43102
+ while (1) switch (_context2.prev = _context2.next) {
42933
43103
  case 0:
42934
- _context.next = 1;
43104
+ _context2.next = 1;
42935
43105
  return window.mainApi.dialog.chooseFile(true, ["json"]);
42936
43106
  case 1:
42937
- filepath = _context.sent;
43107
+ filepath = _context2.sent;
42938
43108
  if (filepath) handleCredentialChange(field.key, filepath);
42939
43109
  case 2:
42940
43110
  case "end":
42941
- return _context.stop();
43111
+ return _context2.stop();
42942
43112
  }
42943
- }, _callee);
43113
+ }, _callee2);
42944
43114
  })),
42945
43115
  className: "px-3 py-1.5 text-sm rounded bg-white/10 hover:bg-white/20 transition-colors",
42946
43116
  children: "Browse"
@@ -44504,6 +44674,23 @@ var ProvidersSection = function ProvidersSection(_ref) {
44504
44674
  setIsEditingMcp(false);
44505
44675
  resetForm();
44506
44676
  refreshProviders && refreshProviders();
44677
+
44678
+ // Bounce the running MCP subprocess so the edit takes effect without
44679
+ // requiring the user to fully quit and relaunch the app. stopServer
44680
+ // is a no-op if nothing was running; we always start after stopping
44681
+ // so a disconnected provider still picks up the new config on next
44682
+ // tool call. Errors are logged but don't block the save UX.
44683
+ var bounceName = originalName || providerName;
44684
+ if (bounceName) {
44685
+ dashApi.mcpStopServer(bounceName, function () {}, function (e, err) {
44686
+ return (void 0);
44687
+ });
44688
+ }
44689
+ dashApi.mcpStartServer(providerName, mcpConfig, mcpCredentials, function (event, result) {
44690
+ if (result !== null && result !== void 0 && result.error) ;
44691
+ }, function (e, err) {
44692
+ return (void 0);
44693
+ });
44507
44694
  }, function (e, err) {
44508
44695
  return (void 0);
44509
44696
  });
@@ -44749,6 +44936,7 @@ var ProvidersSection = function ProvidersSection(_ref) {
44749
44936
  initialCredentials: selectedProvider.credentials || {},
44750
44937
  initialAllowedTools: selectedProvider.allowedTools || null,
44751
44938
  initialAuthCommand: (editCatalogEntry === null || editCatalogEntry === void 0 ? void 0 : editCatalogEntry.authCommand) || null,
44939
+ initialMcpConfig: mc,
44752
44940
  onSave: handleMcpEditSave,
44753
44941
  onBack: function onBack() {
44754
44942
  return setIsEditingMcp(false);