@trops/dash-core 0.1.393 → 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.esm.js CHANGED
@@ -2987,7 +2987,7 @@ var Layout = function Layout(_ref) {
2987
2987
  });
2988
2988
  };
2989
2989
 
2990
- var _excluded$6 = ["id", "children", "direction", "className", "scrollable", "width", "height", "space", "grow", "debug", "onClick", "padding", "prefix"];
2990
+ var _excluded$7 = ["id", "children", "direction", "className", "scrollable", "width", "height", "space", "grow", "debug", "onClick", "padding", "prefix"];
2991
2991
  var LayoutContainer = function LayoutContainer(_ref) {
2992
2992
  var id = _ref.id,
2993
2993
  children = _ref.children,
@@ -3013,7 +3013,7 @@ var LayoutContainer = function LayoutContainer(_ref) {
3013
3013
  padding = _ref$padding === void 0 ? "" : _ref$padding,
3014
3014
  _ref$prefix = _ref.prefix,
3015
3015
  prefix = _ref$prefix === void 0 ? "layout-container" : _ref$prefix,
3016
- props = _objectWithoutProperties(_ref, _excluded$6);
3016
+ props = _objectWithoutProperties(_ref, _excluded$7);
3017
3017
  var containerId = "uuid" in props ? props["uuid"] : getUUID(id, prefix);
3018
3018
 
3019
3019
  // get the styles
@@ -8966,7 +8966,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
8966
8966
  var hasPropertyDescriptors_1 = hasPropertyDescriptors;
8967
8967
 
8968
8968
  var keys = objectKeys$2;
8969
- var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
8969
+ var hasSymbols$5 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
8970
8970
 
8971
8971
  var toStr$4 = Object.prototype.toString;
8972
8972
  var concat = Array.prototype.concat;
@@ -8999,7 +8999,7 @@ var defineProperty$1 = function (object, name, value, predicate) {
8999
8999
  var defineProperties$1 = function (object, map) {
9000
9000
  var predicates = arguments.length > 2 ? arguments[2] : {};
9001
9001
  var props = keys(map);
9002
- if (hasSymbols$4) {
9002
+ if (hasSymbols$5) {
9003
9003
  props = concat.call(props, Object.getOwnPropertySymbols(map));
9004
9004
  }
9005
9005
  for (var i = 0; i < props.length; i += 1) {
@@ -9065,11 +9065,11 @@ var sign$1 = function sign(number) {
9065
9065
  };
9066
9066
 
9067
9067
  var shams$1;
9068
- var hasRequiredShams$1;
9068
+ var hasRequiredShams;
9069
9069
 
9070
- function requireShams$1 () {
9071
- if (hasRequiredShams$1) return shams$1;
9072
- hasRequiredShams$1 = 1;
9070
+ function requireShams () {
9071
+ if (hasRequiredShams) return shams$1;
9072
+ hasRequiredShams = 1;
9073
9073
 
9074
9074
  /** @type {import('./shams')} */
9075
9075
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
@@ -9118,10 +9118,10 @@ function requireShams$1 () {
9118
9118
  }
9119
9119
 
9120
9120
  var origSymbol = typeof Symbol !== 'undefined' && Symbol;
9121
- var hasSymbolSham = requireShams$1();
9121
+ var hasSymbolSham = requireShams();
9122
9122
 
9123
9123
  /** @type {import('.')} */
9124
- var hasSymbols$3 = function hasNativeSymbols() {
9124
+ var hasSymbols$4 = function hasNativeSymbols() {
9125
9125
  if (typeof origSymbol !== 'function') { return false; }
9126
9126
  if (typeof Symbol !== 'function') { return false; }
9127
9127
  if (typeof origSymbol('foo') !== 'symbol') { return false; }
@@ -9425,7 +9425,7 @@ var ThrowTypeError = $gOPD$1
9425
9425
  }())
9426
9426
  : throwTypeError;
9427
9427
 
9428
- var hasSymbols$2 = hasSymbols$3();
9428
+ var hasSymbols$3 = hasSymbols$4();
9429
9429
 
9430
9430
  var getProto$2 = getProto$3;
9431
9431
  var $ObjectGPO = requireObject_getPrototypeOf();
@@ -9443,7 +9443,7 @@ var INTRINSICS = {
9443
9443
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
9444
9444
  '%Array%': Array,
9445
9445
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
9446
- '%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
9446
+ '%ArrayIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
9447
9447
  '%AsyncFromSyncIteratorPrototype%': undefined$1,
9448
9448
  '%AsyncFunction%': needsEval,
9449
9449
  '%AsyncGenerator%': needsEval,
@@ -9474,10 +9474,10 @@ var INTRINSICS = {
9474
9474
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
9475
9475
  '%isFinite%': isFinite,
9476
9476
  '%isNaN%': isNaN,
9477
- '%IteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
9477
+ '%IteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
9478
9478
  '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
9479
9479
  '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
9480
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
9480
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
9481
9481
  '%Math%': Math,
9482
9482
  '%Number%': Number,
9483
9483
  '%Object%': $Object$2,
@@ -9491,11 +9491,11 @@ var INTRINSICS = {
9491
9491
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
9492
9492
  '%RegExp%': RegExp,
9493
9493
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
9494
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
9494
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
9495
9495
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
9496
9496
  '%String%': String,
9497
- '%StringIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
9498
- '%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
9497
+ '%StringIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
9498
+ '%Symbol%': hasSymbols$3 ? Symbol : undefined$1,
9499
9499
  '%SyntaxError%': $SyntaxError$1,
9500
9500
  '%ThrowTypeError%': ThrowTypeError,
9501
9501
  '%TypedArray%': TypedArray,
@@ -9848,12 +9848,12 @@ var callBound$i = function callBoundIntrinsic(name, allowMissing) {
9848
9848
 
9849
9849
  // modified from https://github.com/es-shims/es6-shim
9850
9850
  var objectKeys$1 = objectKeys$2;
9851
- var hasSymbols$1 = requireShams$1()();
9851
+ var hasSymbols$2 = requireShams()();
9852
9852
  var callBound$h = callBound$i;
9853
9853
  var $Object$1 = esObjectAtoms;
9854
9854
  var $push = callBound$h('Array.prototype.push');
9855
9855
  var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
9856
- var originalGetSymbols = hasSymbols$1 ? $Object$1.getOwnPropertySymbols : null;
9856
+ var originalGetSymbols = hasSymbols$2 ? $Object$1.getOwnPropertySymbols : null;
9857
9857
 
9858
9858
  // eslint-disable-next-line no-unused-vars
9859
9859
  var implementation$8 = function assign(target, source1) {
@@ -9867,7 +9867,7 @@ var implementation$8 = function assign(target, source1) {
9867
9867
 
9868
9868
  // step 3.a.ii:
9869
9869
  var keys = objectKeys$1(from);
9870
- var getSymbols = hasSymbols$1 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
9870
+ var getSymbols = hasSymbols$2 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
9871
9871
  if (getSymbols) {
9872
9872
  var syms = getSymbols(from);
9873
9873
  for (var j = 0; j < syms.length; ++j) {
@@ -10164,23 +10164,14 @@ var regexp_prototype_flags = flagsBound;
10164
10164
 
10165
10165
  var esGetIterator = {exports: {}};
10166
10166
 
10167
- var shams;
10168
- var hasRequiredShams;
10169
-
10170
- function requireShams () {
10171
- if (hasRequiredShams) return shams;
10172
- hasRequiredShams = 1;
10173
-
10174
- var hasSymbols = requireShams$1();
10167
+ var hasSymbols$1 = requireShams();
10175
10168
 
10176
- /** @type {import('.')} */
10177
- shams = function hasToStringTagShams() {
10178
- return hasSymbols() && !!Symbol.toStringTag;
10179
- };
10180
- return shams;
10181
- }
10169
+ /** @type {import('.')} */
10170
+ var shams = function hasToStringTagShams() {
10171
+ return hasSymbols$1() && !!Symbol.toStringTag;
10172
+ };
10182
10173
 
10183
- var hasToStringTag$7 = requireShams()();
10174
+ var hasToStringTag$7 = shams();
10184
10175
  var callBound$f = callBound$i;
10185
10176
 
10186
10177
  var $toString$7 = callBound$f('Object.prototype.toString');
@@ -11217,7 +11208,7 @@ var tryStringObject = function tryStringObject(value) {
11217
11208
  /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
11218
11209
  var $toString$6 = callBound$c('Object.prototype.toString');
11219
11210
  var strClass = '[object String]';
11220
- var hasToStringTag$6 = requireShams()();
11211
+ var hasToStringTag$6 = shams();
11221
11212
 
11222
11213
  /** @type {import('.')} */
11223
11214
  var isString$2 = function isString(value) {
@@ -11333,7 +11324,7 @@ var isSet$2 = exported$1 || function isSet(x) {
11333
11324
  var isArguments$1 = isArguments$2;
11334
11325
  var getStopIterationIterator = stopIterationIterator;
11335
11326
 
11336
- if (hasSymbols$3() || requireShams$1()()) {
11327
+ if (hasSymbols$4() || requireShams()()) {
11337
11328
  var $iterator = Symbol.iterator;
11338
11329
  // Symbol is available natively or shammed
11339
11330
  // natively:
@@ -11622,7 +11613,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
11622
11613
  /** @type {(value: unknown) => string} */
11623
11614
  var toStr$2 = callBound$9('Object.prototype.toString');
11624
11615
  var dateClass = '[object Date]';
11625
- var hasToStringTag$5 = requireShams()();
11616
+ var hasToStringTag$5 = shams();
11626
11617
 
11627
11618
  /** @type {import('.')} */
11628
11619
  var isDateObject = function isDateObject(value) {
@@ -11633,7 +11624,7 @@ var isDateObject = function isDateObject(value) {
11633
11624
  };
11634
11625
 
11635
11626
  var callBound$8 = callBound$i;
11636
- var hasToStringTag$4 = requireShams()();
11627
+ var hasToStringTag$4 = shams();
11637
11628
  var hasOwn = hasown;
11638
11629
  var gOPD$1 = gopd$1;
11639
11630
 
@@ -11738,7 +11729,7 @@ var tryNumberObject = function tryNumberObject(value) {
11738
11729
  };
11739
11730
  var $toString$3 = callBound$6('Object.prototype.toString');
11740
11731
  var numClass = '[object Number]';
11741
- var hasToStringTag$3 = requireShams()();
11732
+ var hasToStringTag$3 = shams();
11742
11733
 
11743
11734
  /** @type {import('.')} */
11744
11735
  var isNumberObject = function isNumberObject(value) {
@@ -11765,7 +11756,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
11765
11756
  }
11766
11757
  };
11767
11758
  var boolClass = '[object Boolean]';
11768
- var hasToStringTag$2 = requireShams()();
11759
+ var hasToStringTag$2 = shams();
11769
11760
 
11770
11761
  /** @type {import('.')} */
11771
11762
  var isBooleanObject = function isBoolean(value) {
@@ -11807,7 +11798,7 @@ function requireSafeRegexTest () {
11807
11798
 
11808
11799
  var callBound$4 = callBound$i;
11809
11800
  var $toString$1 = callBound$4('Object.prototype.toString');
11810
- var hasSymbols = hasSymbols$3();
11801
+ var hasSymbols = hasSymbols$4();
11811
11802
  var safeRegexTest = requireSafeRegexTest();
11812
11803
 
11813
11804
  if (hasSymbols) {
@@ -12253,7 +12244,7 @@ var gOPD = gopd$1;
12253
12244
  var getProto = getProto$3;
12254
12245
 
12255
12246
  var $toString = callBound$2('Object.prototype.toString');
12256
- var hasToStringTag = requireShams()();
12247
+ var hasToStringTag = shams();
12257
12248
 
12258
12249
  var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
12259
12250
  var typedArrays = availableTypedArrays();
@@ -13003,7 +12994,7 @@ var PanelEditItem = function PanelEditItem(_ref) {
13003
12994
  });
13004
12995
  };
13005
12996
 
13006
- var _excluded$5 = ["rows", "cols"];
12997
+ var _excluded$6 = ["rows", "cols"];
13007
12998
  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; } } }; }
13008
12999
  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; } }
13009
13000
  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; }
@@ -13176,7 +13167,7 @@ function GridEditor(_ref) {
13176
13167
  function resequenceGridKeys(grid) {
13177
13168
  var rows = grid.rows,
13178
13169
  cols = grid.cols,
13179
- cells = _objectWithoutProperties(grid, _excluded$5);
13170
+ cells = _objectWithoutProperties(grid, _excluded$6);
13180
13171
  var newGrid = {
13181
13172
  rows: rows,
13182
13173
  cols: cols
@@ -23507,7 +23498,7 @@ var WidgetProviderWrapper = function WidgetProviderWrapper(_ref2) {
23507
23498
  return children;
23508
23499
  };
23509
23500
 
23510
- var _excluded$4 = ["uuid", "children", "version", "direction", "scrollable", "className", "width", "height", "space", "grow", "publishEvent", "api", "requiredProviders", "selectedProviders", "onProviderSelect"];
23501
+ var _excluded$5 = ["uuid", "children", "version", "direction", "scrollable", "className", "width", "height", "space", "grow", "publishEvent", "api", "requiredProviders", "selectedProviders", "onProviderSelect"];
23511
23502
  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)); }
23512
23503
  function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { return !!t; })(); }
23513
23504
  var WidgetErrorBoundary$1 = /*#__PURE__*/function (_Component) {
@@ -23605,7 +23596,7 @@ var Widget = function Widget(_ref) {
23605
23596
  selectedProviders = _ref$selectedProvider === void 0 ? {} : _ref$selectedProvider,
23606
23597
  _ref$onProviderSelect = _ref.onProviderSelect,
23607
23598
  onProviderSelect = _ref$onProviderSelect === void 0 ? null : _ref$onProviderSelect;
23608
- _objectWithoutProperties(_ref, _excluded$4);
23599
+ _objectWithoutProperties(_ref, _excluded$5);
23609
23600
  var uuidString = getUUID(uuid);
23610
23601
  return /*#__PURE__*/jsx(LayoutContainer, {
23611
23602
  uuid: uuid,
@@ -24488,12 +24479,12 @@ var WidgetFactory = {
24488
24479
  }
24489
24480
  };
24490
24481
 
24491
- var _excluded$3 = ["title", "description", "icon"];
24482
+ var _excluded$4 = ["title", "description", "icon"];
24492
24483
  var ExternalWidget = function ExternalWidget(_ref) {
24493
24484
  var title = _ref.title,
24494
24485
  description = _ref.description,
24495
24486
  icon = _ref.icon;
24496
- _objectWithoutProperties(_ref, _excluded$3);
24487
+ _objectWithoutProperties(_ref, _excluded$4);
24497
24488
  return /*#__PURE__*/jsxs("div", {
24498
24489
  className: "flex flex-col h-full justify-center items-center w-full gap-2 p-4 text-center",
24499
24490
  children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
@@ -33263,7 +33254,7 @@ var ThemePane = function ThemePane(_ref) {
33263
33254
  });
33264
33255
  };
33265
33256
 
33266
- var _excluded$2 = ["colorFromTheme", "colorName", "shade", "variant", "colorType", "colorLevelName", "selected", "onClick", "onMouseOver", "width", "height"];
33257
+ var _excluded$3 = ["colorFromTheme", "colorName", "shade", "variant", "colorType", "colorLevelName", "selected", "onClick", "onMouseOver", "width", "height"];
33267
33258
  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; }
33268
33259
  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; }
33269
33260
  var ColorTile = function ColorTile(_ref) {
@@ -33289,7 +33280,7 @@ var ColorTile = function ColorTile(_ref) {
33289
33280
  width = _ref$width === void 0 ? "w-full" : _ref$width,
33290
33281
  _ref$height = _ref.height,
33291
33282
  height = _ref$height === void 0 ? "h-10" : _ref$height,
33292
- rest = _objectWithoutProperties(_ref, _excluded$2);
33283
+ rest = _objectWithoutProperties(_ref, _excluded$3);
33293
33284
  var c = ColorModel(_objectSpread$u({
33294
33285
  colorFromTheme: colorFromTheme,
33295
33286
  colorName: colorName,
@@ -36277,7 +36268,7 @@ var NonColorPickerPane = function NonColorPickerPane(_ref) {
36277
36268
  });
36278
36269
  };
36279
36270
 
36280
- var _excluded$1 = ["children"];
36271
+ var _excluded$2 = ["children"];
36281
36272
  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; }
36282
36273
  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; }
36283
36274
  var COLOR_PROPERTIES = new Set(["backgroundColor", "textColor", "borderColor", "hoverBackgroundColor", "hoverTextColor", "hoverBorderColor", "focusRingColor", "focusBorderColor", "activeBackgroundColor", "activeTextColor", "placeholderTextColor"]);
@@ -37023,7 +37014,7 @@ var PanelTheme = function PanelTheme(_ref) {
37023
37014
  }
37024
37015
  var _comp$props = comp.props,
37025
37016
  childContent = _comp$props.children,
37026
- restProps = _objectWithoutProperties(_comp$props, _excluded$1);
37017
+ restProps = _objectWithoutProperties(_comp$props, _excluded$2);
37027
37018
  var renderedComponent = childContent !== undefined ? /*#__PURE__*/jsx(comp.Component, _objectSpread$q(_objectSpread$q({}, restProps), {}, {
37028
37019
  children: childContent
37029
37020
  })) : /*#__PURE__*/jsx(comp.Component, _objectSpread$q({}, restProps));
@@ -42083,8 +42074,116 @@ var ProviderDetail = function ProviderDetail(_ref) {
42083
42074
  });
42084
42075
  };
42085
42076
 
42077
+ var _excluded$1 = ["transport", "command", "args", "envMapping", "url", "headerTemplate", "headers"];
42086
42078
  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; }
42087
42079
  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; }
42080
+ var DirectoryListField = function DirectoryListField(_ref) {
42081
+ var field = _ref.field,
42082
+ value = _ref.value,
42083
+ onChange = _ref.onChange,
42084
+ errorText = _ref.errorText;
42085
+ var initialRows = useMemo(function () {
42086
+ var parsed = (value || "").split(",").map(function (p) {
42087
+ return p.trim();
42088
+ });
42089
+ var nonEmpty = parsed.filter(Boolean);
42090
+ return nonEmpty.length === 0 ? [""] : nonEmpty;
42091
+ }, []); // eslint-disable-line react-hooks/exhaustive-deps
42092
+
42093
+ var _useState = useState(initialRows),
42094
+ _useState2 = _slicedToArray(_useState, 2),
42095
+ rows = _useState2[0],
42096
+ setRows = _useState2[1];
42097
+ var updateRows = function updateRows(next) {
42098
+ setRows(next);
42099
+ onChange(next.map(function (p) {
42100
+ return p.trim();
42101
+ }).filter(Boolean).join(","));
42102
+ };
42103
+ return /*#__PURE__*/jsxs("div", {
42104
+ className: "flex flex-col gap-2",
42105
+ children: [/*#__PURE__*/jsx(FormLabel, {
42106
+ label: field.displayName,
42107
+ required: field.required
42108
+ }), field.instructions && /*#__PURE__*/jsx("p", {
42109
+ className: "text-xs opacity-50",
42110
+ children: field.instructions
42111
+ }), /*#__PURE__*/jsxs("div", {
42112
+ className: "flex flex-col gap-2",
42113
+ children: [rows.map(function (rowValue, idx) {
42114
+ return /*#__PURE__*/jsxs("div", {
42115
+ className: "flex gap-2 items-center",
42116
+ children: [/*#__PURE__*/jsx("div", {
42117
+ className: "flex-1",
42118
+ children: /*#__PURE__*/jsx(InputText, {
42119
+ type: "text",
42120
+ value: rowValue,
42121
+ onChange: function onChange(v) {
42122
+ var next = _toConsumableArray(rows);
42123
+ next[idx] = v;
42124
+ updateRows(next);
42125
+ },
42126
+ placeholder: "/Users/you/some/folder"
42127
+ })
42128
+ }), /*#__PURE__*/jsx("button", {
42129
+ type: "button",
42130
+ onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
42131
+ var picked, next;
42132
+ return _regeneratorRuntime.wrap(function (_context) {
42133
+ while (1) switch (_context.prev = _context.next) {
42134
+ case 0:
42135
+ _context.next = 1;
42136
+ return window.mainApi.dialog.chooseFile(false, []);
42137
+ case 1:
42138
+ picked = _context.sent;
42139
+ if (picked) {
42140
+ next = _toConsumableArray(rows);
42141
+ next[idx] = picked;
42142
+ updateRows(next);
42143
+ }
42144
+ case 2:
42145
+ case "end":
42146
+ return _context.stop();
42147
+ }
42148
+ }, _callee);
42149
+ })),
42150
+ className: "px-3 py-1.5 text-sm rounded bg-white/10 hover:bg-white/20 transition-colors whitespace-nowrap",
42151
+ children: "Choose folder\u2026"
42152
+ }), rows.length > 1 && /*#__PURE__*/jsx("button", {
42153
+ type: "button",
42154
+ onClick: function onClick() {
42155
+ var next = rows.filter(function (_, i) {
42156
+ return i !== idx;
42157
+ });
42158
+ updateRows(next.length ? next : [""]);
42159
+ },
42160
+ className: "px-2 py-1.5 text-sm rounded bg-white/5 hover:bg-red-500/20 text-red-300 transition-colors",
42161
+ "aria-label": "Remove path",
42162
+ children: /*#__PURE__*/jsx(FontAwesomeIcon, {
42163
+ icon: "xmark",
42164
+ className: "text-xs"
42165
+ })
42166
+ })]
42167
+ }, idx);
42168
+ }), /*#__PURE__*/jsxs("button", {
42169
+ type: "button",
42170
+ onClick: function onClick() {
42171
+ return setRows([].concat(_toConsumableArray(rows), [""]));
42172
+ },
42173
+ className: "text-sm text-blue-400 hover:text-blue-300 transition-colors flex items-center gap-1 self-start",
42174
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
42175
+ icon: "plus",
42176
+ className: "text-xs"
42177
+ }), /*#__PURE__*/jsx("span", {
42178
+ children: "Add directory"
42179
+ })]
42180
+ })]
42181
+ }), errorText && /*#__PURE__*/jsx("p", {
42182
+ className: "text-sm text-red-400",
42183
+ children: errorText
42184
+ })]
42185
+ });
42186
+ };
42088
42187
  var rowIdCounter = 0;
42089
42188
  var nextRowId = function nextRowId() {
42090
42189
  return "row_".concat(++rowIdCounter);
@@ -42092,13 +42191,28 @@ var nextRowId = function nextRowId() {
42092
42191
 
42093
42192
  /**
42094
42193
  * Build an mcpConfig object from the current form state.
42194
+ *
42195
+ * `baseConfig` is the existing mcpConfig this save is derived from (either a
42196
+ * catalog entry's config or the saved provider's current config). Fields the
42197
+ * form doesn't render (argsMapping, staticEnv, tokenRefresh, etc.) are copied
42198
+ * through so editing a provider never drops them.
42095
42199
  */
42096
- function buildMcpConfig(transport, _ref) {
42097
- var command = _ref.command,
42098
- args = _ref.args,
42099
- envMappingRows = _ref.envMappingRows,
42100
- url = _ref.url,
42101
- headerRows = _ref.headerRows;
42200
+ function buildMcpConfig(transport, _ref3) {
42201
+ var command = _ref3.command,
42202
+ args = _ref3.args,
42203
+ envMappingRows = _ref3.envMappingRows,
42204
+ url = _ref3.url,
42205
+ headerRows = _ref3.headerRows;
42206
+ var baseConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
42207
+ // Everything on baseConfig that the form doesn't own gets preserved.
42208
+ baseConfig.transport;
42209
+ baseConfig.command;
42210
+ baseConfig.args;
42211
+ baseConfig.envMapping;
42212
+ baseConfig.url;
42213
+ baseConfig.headerTemplate;
42214
+ baseConfig.headers;
42215
+ var passThrough = _objectWithoutProperties(baseConfig, _excluded$1);
42102
42216
  if (transport === "stdio") {
42103
42217
  var envMapping = {};
42104
42218
  envMappingRows.forEach(function (row) {
@@ -42108,12 +42222,12 @@ function buildMcpConfig(transport, _ref) {
42108
42222
  envMapping[env] = cred;
42109
42223
  }
42110
42224
  });
42111
- return {
42225
+ return _objectSpread$k(_objectSpread$k({}, passThrough), {}, {
42112
42226
  transport: "stdio",
42113
42227
  command: command.trim(),
42114
42228
  args: args.trim().split(/\s+/).filter(Boolean),
42115
42229
  envMapping: envMapping
42116
- };
42230
+ });
42117
42231
  }
42118
42232
 
42119
42233
  // streamable_http
@@ -42125,10 +42239,10 @@ function buildMcpConfig(transport, _ref) {
42125
42239
  headerTemplate[name] = value;
42126
42240
  }
42127
42241
  });
42128
- var config = {
42242
+ var config = _objectSpread$k(_objectSpread$k({}, passThrough), {}, {
42129
42243
  transport: "streamable_http",
42130
42244
  url: url.trim()
42131
- };
42245
+ });
42132
42246
  if (Object.keys(headerTemplate).length > 0) {
42133
42247
  config.headerTemplate = headerTemplate;
42134
42248
  }
@@ -42153,127 +42267,132 @@ function buildMcpConfig(transport, _ref) {
42153
42267
  * @param {string} initialUrl - Pre-populated URL (edit mode)
42154
42268
  * @param {Array} initialHeaderRows - Pre-populated header rows (edit mode)
42155
42269
  * @param {object} initialCredentials - Pre-populated credential values (edit mode)
42270
+ * @param {object} initialMcpConfig - The full saved/catalog mcpConfig. Fields
42271
+ * the form does NOT own (argsMapping, staticEnv, tokenRefresh, etc.) are
42272
+ * preserved verbatim on save so editing never silently drops them.
42156
42273
  */
42157
- var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42274
+ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
42158
42275
  var _testResult$tools;
42159
- var onSave = _ref2.onSave,
42160
- onBack = _ref2.onBack,
42161
- _ref2$isEditMode = _ref2.isEditMode,
42162
- isEditMode = _ref2$isEditMode === void 0 ? false : _ref2$isEditMode,
42163
- _ref2$initialName = _ref2.initialName,
42164
- initialName = _ref2$initialName === void 0 ? "" : _ref2$initialName,
42165
- _ref2$initialProvider = _ref2.initialProviderType,
42166
- initialProviderType = _ref2$initialProvider === void 0 ? "custom" : _ref2$initialProvider,
42167
- _ref2$initialCredenti = _ref2.initialCredentialSchema,
42168
- initialCredentialSchema = _ref2$initialCredenti === void 0 ? {} : _ref2$initialCredenti,
42169
- _ref2$initialTranspor = _ref2.initialTransport,
42170
- initialTransport = _ref2$initialTranspor === void 0 ? "stdio" : _ref2$initialTranspor,
42171
- _ref2$initialCommand = _ref2.initialCommand,
42172
- initialCommand = _ref2$initialCommand === void 0 ? "" : _ref2$initialCommand,
42173
- _ref2$initialArgs = _ref2.initialArgs,
42174
- initialArgs = _ref2$initialArgs === void 0 ? "" : _ref2$initialArgs,
42175
- _ref2$initialEnvMappi = _ref2.initialEnvMappingRows,
42176
- initialEnvMappingRows = _ref2$initialEnvMappi === void 0 ? [] : _ref2$initialEnvMappi,
42177
- _ref2$initialUrl = _ref2.initialUrl,
42178
- initialUrl = _ref2$initialUrl === void 0 ? "" : _ref2$initialUrl,
42179
- _ref2$initialHeaderRo = _ref2.initialHeaderRows,
42180
- initialHeaderRows = _ref2$initialHeaderRo === void 0 ? [] : _ref2$initialHeaderRo,
42181
- _ref2$initialCredenti2 = _ref2.initialCredentials,
42182
- initialCredentials = _ref2$initialCredenti2 === void 0 ? {} : _ref2$initialCredenti2,
42183
- _ref2$initialAllowedT = _ref2.initialAllowedTools,
42184
- initialAllowedTools = _ref2$initialAllowedT === void 0 ? null : _ref2$initialAllowedT,
42185
- _ref2$initialAuthComm = _ref2.initialAuthCommand,
42186
- initialAuthCommand = _ref2$initialAuthComm === void 0 ? null : _ref2$initialAuthComm;
42276
+ var onSave = _ref4.onSave,
42277
+ onBack = _ref4.onBack,
42278
+ _ref4$isEditMode = _ref4.isEditMode,
42279
+ isEditMode = _ref4$isEditMode === void 0 ? false : _ref4$isEditMode,
42280
+ _ref4$initialName = _ref4.initialName,
42281
+ initialName = _ref4$initialName === void 0 ? "" : _ref4$initialName,
42282
+ _ref4$initialProvider = _ref4.initialProviderType,
42283
+ initialProviderType = _ref4$initialProvider === void 0 ? "custom" : _ref4$initialProvider,
42284
+ _ref4$initialCredenti = _ref4.initialCredentialSchema,
42285
+ initialCredentialSchema = _ref4$initialCredenti === void 0 ? {} : _ref4$initialCredenti,
42286
+ _ref4$initialTranspor = _ref4.initialTransport,
42287
+ initialTransport = _ref4$initialTranspor === void 0 ? "stdio" : _ref4$initialTranspor,
42288
+ _ref4$initialCommand = _ref4.initialCommand,
42289
+ initialCommand = _ref4$initialCommand === void 0 ? "" : _ref4$initialCommand,
42290
+ _ref4$initialArgs = _ref4.initialArgs,
42291
+ initialArgs = _ref4$initialArgs === void 0 ? "" : _ref4$initialArgs,
42292
+ _ref4$initialEnvMappi = _ref4.initialEnvMappingRows,
42293
+ initialEnvMappingRows = _ref4$initialEnvMappi === void 0 ? [] : _ref4$initialEnvMappi,
42294
+ _ref4$initialUrl = _ref4.initialUrl,
42295
+ initialUrl = _ref4$initialUrl === void 0 ? "" : _ref4$initialUrl,
42296
+ _ref4$initialHeaderRo = _ref4.initialHeaderRows,
42297
+ initialHeaderRows = _ref4$initialHeaderRo === void 0 ? [] : _ref4$initialHeaderRo,
42298
+ _ref4$initialCredenti2 = _ref4.initialCredentials,
42299
+ initialCredentials = _ref4$initialCredenti2 === void 0 ? {} : _ref4$initialCredenti2,
42300
+ _ref4$initialAllowedT = _ref4.initialAllowedTools,
42301
+ initialAllowedTools = _ref4$initialAllowedT === void 0 ? null : _ref4$initialAllowedT,
42302
+ _ref4$initialAuthComm = _ref4.initialAuthCommand,
42303
+ initialAuthCommand = _ref4$initialAuthComm === void 0 ? null : _ref4$initialAuthComm,
42304
+ _ref4$initialMcpConfi = _ref4.initialMcpConfig,
42305
+ initialMcpConfig = _ref4$initialMcpConfi === void 0 ? null : _ref4$initialMcpConfi;
42187
42306
  var appContext = useContext(AppContext);
42188
42307
  var dashApi = appContext === null || appContext === void 0 ? void 0 : appContext.dashApi;
42189
42308
 
42190
42309
  // Transport selection
42191
- var _useState = useState(initialTransport),
42192
- _useState2 = _slicedToArray(_useState, 2),
42193
- transport = _useState2[0],
42194
- setTransport = _useState2[1];
42310
+ var _useState3 = useState(initialTransport),
42311
+ _useState4 = _slicedToArray(_useState3, 2),
42312
+ transport = _useState4[0],
42313
+ setTransport = _useState4[1];
42195
42314
 
42196
42315
  // Common
42197
- var _useState3 = useState(initialName),
42198
- _useState4 = _slicedToArray(_useState3, 2),
42199
- providerName = _useState4[0],
42200
- setProviderName = _useState4[1];
42201
- var _useState5 = useState(initialCredentials),
42316
+ var _useState5 = useState(initialName),
42202
42317
  _useState6 = _slicedToArray(_useState5, 2),
42203
- credentialData = _useState6[0],
42204
- setCredentialData = _useState6[1];
42205
- var _useState7 = useState({}),
42318
+ providerName = _useState6[0],
42319
+ setProviderName = _useState6[1];
42320
+ var _useState7 = useState(initialCredentials),
42206
42321
  _useState8 = _slicedToArray(_useState7, 2),
42207
- formErrors = _useState8[0],
42208
- setFormErrors = _useState8[1];
42209
- var _useState9 = useState(false),
42322
+ credentialData = _useState8[0],
42323
+ setCredentialData = _useState8[1];
42324
+ var _useState9 = useState({}),
42210
42325
  _useState0 = _slicedToArray(_useState9, 2),
42211
- isTesting = _useState0[0],
42212
- setIsTesting = _useState0[1];
42213
- var _useState1 = useState(null),
42326
+ formErrors = _useState0[0],
42327
+ setFormErrors = _useState0[1];
42328
+ var _useState1 = useState(false),
42214
42329
  _useState10 = _slicedToArray(_useState1, 2),
42215
- testResult = _useState10[0],
42216
- setTestResult = _useState10[1];
42330
+ isTesting = _useState10[0],
42331
+ setIsTesting = _useState10[1];
42332
+ var _useState11 = useState(null),
42333
+ _useState12 = _slicedToArray(_useState11, 2),
42334
+ testResult = _useState12[0],
42335
+ setTestResult = _useState12[1];
42217
42336
 
42218
42337
  // stdio fields
42219
- var _useState11 = useState(initialCommand),
42220
- _useState12 = _slicedToArray(_useState11, 2),
42221
- command = _useState12[0],
42222
- setCommand = _useState12[1];
42223
- var _useState13 = useState(initialArgs),
42338
+ var _useState13 = useState(initialCommand),
42224
42339
  _useState14 = _slicedToArray(_useState13, 2),
42225
- args = _useState14[0],
42226
- setArgs = _useState14[1];
42227
- var _useState15 = useState(initialEnvMappingRows),
42340
+ command = _useState14[0],
42341
+ setCommand = _useState14[1];
42342
+ var _useState15 = useState(initialArgs),
42228
42343
  _useState16 = _slicedToArray(_useState15, 2),
42229
- envMappingRows = _useState16[0],
42230
- setEnvMappingRows = _useState16[1];
42344
+ args = _useState16[0],
42345
+ setArgs = _useState16[1];
42346
+ var _useState17 = useState(initialEnvMappingRows),
42347
+ _useState18 = _slicedToArray(_useState17, 2),
42348
+ envMappingRows = _useState18[0],
42349
+ setEnvMappingRows = _useState18[1];
42231
42350
 
42232
42351
  // HTTP fields
42233
- var _useState17 = useState(initialUrl),
42234
- _useState18 = _slicedToArray(_useState17, 2),
42235
- url = _useState18[0],
42236
- setUrl = _useState18[1];
42237
- var _useState19 = useState(initialHeaderRows),
42352
+ var _useState19 = useState(initialUrl),
42238
42353
  _useState20 = _slicedToArray(_useState19, 2),
42239
- headerRows = _useState20[0],
42240
- setHeaderRows = _useState20[1];
42354
+ url = _useState20[0],
42355
+ setUrl = _useState20[1];
42356
+ var _useState21 = useState(initialHeaderRows),
42357
+ _useState22 = _slicedToArray(_useState21, 2),
42358
+ headerRows = _useState22[0],
42359
+ setHeaderRows = _useState22[1];
42241
42360
 
42242
42361
  // Tool selection state
42243
- var _useState21 = useState(initialAllowedTools),
42244
- _useState22 = _slicedToArray(_useState21, 2),
42245
- selectedTools = _useState22[0],
42246
- setSelectedTools = _useState22[1];
42362
+ var _useState23 = useState(initialAllowedTools),
42363
+ _useState24 = _slicedToArray(_useState23, 2),
42364
+ selectedTools = _useState24[0],
42365
+ setSelectedTools = _useState24[1];
42247
42366
 
42248
42367
  // Wizard step state
42249
- var _useState23 = useState(0),
42250
- _useState24 = _slicedToArray(_useState23, 2),
42251
- wizardStep = _useState24[0],
42252
- setWizardStep = _useState24[1];
42368
+ var _useState25 = useState(0),
42369
+ _useState26 = _slicedToArray(_useState25, 2),
42370
+ wizardStep = _useState26[0],
42371
+ setWizardStep = _useState26[1];
42253
42372
 
42254
42373
  // Auth state
42255
- var _useState25 = useState(false),
42256
- _useState26 = _slicedToArray(_useState25, 2),
42257
- isAuthorizing = _useState26[0],
42258
- setIsAuthorizing = _useState26[1];
42259
- var _useState27 = useState(null),
42374
+ var _useState27 = useState(false),
42260
42375
  _useState28 = _slicedToArray(_useState27, 2),
42261
- authResult = _useState28[0],
42262
- setAuthResult = _useState28[1];
42376
+ isAuthorizing = _useState28[0],
42377
+ setIsAuthorizing = _useState28[1];
42378
+ var _useState29 = useState(null),
42379
+ _useState30 = _slicedToArray(_useState29, 2),
42380
+ authResult = _useState30[0],
42381
+ setAuthResult = _useState30[1];
42263
42382
 
42264
42383
  // JSON editor state
42265
- var _useState29 = useState("form"),
42266
- _useState30 = _slicedToArray(_useState29, 2),
42267
- viewMode = _useState30[0],
42268
- setViewMode = _useState30[1]; // "form" | "json"
42269
- var _useState31 = useState(""),
42384
+ var _useState31 = useState("form"),
42270
42385
  _useState32 = _slicedToArray(_useState31, 2),
42271
- jsonText = _useState32[0],
42272
- setJsonText = _useState32[1];
42273
- var _useState33 = useState(null),
42386
+ viewMode = _useState32[0],
42387
+ setViewMode = _useState32[1]; // "form" | "json"
42388
+ var _useState33 = useState(""),
42274
42389
  _useState34 = _slicedToArray(_useState33, 2),
42275
- jsonError = _useState34[0],
42276
- setJsonError = _useState34[1];
42390
+ jsonText = _useState34[0],
42391
+ setJsonText = _useState34[1];
42392
+ var _useState35 = useState(null),
42393
+ _useState36 = _slicedToArray(_useState35, 2),
42394
+ jsonError = _useState36[0],
42395
+ setJsonError = _useState36[1];
42277
42396
 
42278
42397
  // Clear credential data when transport changes (derived fields change entirely)
42279
42398
  // Only in create mode — in edit mode the initial transport is set correctly
@@ -42306,7 +42425,9 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42306
42425
  setWizardStep(newStep);
42307
42426
  };
42308
42427
 
42309
- // Build mcpConfig from current state
42428
+ // Build mcpConfig from current state. Pass the initial mcpConfig so fields
42429
+ // the form doesn't manage (argsMapping, staticEnv, tokenRefresh, etc.) are
42430
+ // preserved on save instead of being silently dropped.
42310
42431
  var mcpConfig = useMemo(function () {
42311
42432
  return buildMcpConfig(transport, {
42312
42433
  command: command,
@@ -42314,8 +42435,8 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42314
42435
  envMappingRows: envMappingRows,
42315
42436
  url: url,
42316
42437
  headerRows: headerRows
42317
- });
42318
- }, [transport, command, args, envMappingRows, url, headerRows]);
42438
+ }, initialMcpConfig || {});
42439
+ }, [transport, command, args, envMappingRows, url, headerRows, initialMcpConfig]);
42319
42440
 
42320
42441
  // Invalidate test result when config changes after a test
42321
42442
  var mcpConfigRef = useRef(mcpConfig);
@@ -42444,9 +42565,23 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42444
42565
  }
42445
42566
  }
42446
42567
  formFields.forEach(function (field) {
42447
- var _credentialData$field;
42448
- if (field.required && !((_credentialData$field = credentialData[field.key]) !== null && _credentialData$field !== void 0 && _credentialData$field.trim())) {
42568
+ var raw = credentialData[field.key];
42569
+ if (field.required && !(raw !== null && raw !== void 0 && raw.trim())) {
42449
42570
  errors[field.key] = "".concat(field.displayName, " is required");
42571
+ return;
42572
+ }
42573
+ // directory-list: every non-empty entry must be an absolute path.
42574
+ // `~` is not expanded by child_process.spawn, so the MCP filesystem
42575
+ // server would never match a real path against a tilde prefix.
42576
+ if (field.type === "directory-list" && raw !== null && raw !== void 0 && raw.trim()) {
42577
+ var bad = raw.split(",").map(function (p) {
42578
+ return p.trim();
42579
+ }).filter(Boolean).find(function (p) {
42580
+ return !p.startsWith("/");
42581
+ });
42582
+ if (bad) {
42583
+ errors[field.key] = "\"".concat(bad, "\" must be an absolute path (no `~`, use /Users/you/...)");
42584
+ }
42450
42585
  }
42451
42586
  });
42452
42587
  setFormErrors(errors);
@@ -42544,7 +42679,7 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42544
42679
  envMappingRows: result.envMappingRows,
42545
42680
  url: result.url,
42546
42681
  headerRows: result.headerRows
42547
- });
42682
+ }, initialMcpConfig || {});
42548
42683
  onSave(name, initialProviderType, result.credentialData, config, selectedTools);
42549
42684
  return;
42550
42685
  }
@@ -42899,6 +43034,23 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42899
43034
  children: "Values for the fields referenced in your configuration above"
42900
43035
  })]
42901
43036
  }), formFields.map(function (field) {
43037
+ // directory-list: repeating rows with an absolute-path
43038
+ // input + directory picker. Local state inside the
43039
+ // component so adding an empty row doesn't get
43040
+ // immediately stripped by the filter on write.
43041
+ if (field.type === "directory-list") {
43042
+ return /*#__PURE__*/jsx(DirectoryListField, {
43043
+ field: field,
43044
+ value: credentialData[field.key] || "",
43045
+ onChange: function onChange(v) {
43046
+ return handleCredentialChange(field.key, v);
43047
+ },
43048
+ errorText: formErrors[field.key]
43049
+ }, field.key);
43050
+ }
43051
+
43052
+ // Default: single text/password input with optional
43053
+ // "Browse" button for file-type credentials.
42902
43054
  return /*#__PURE__*/jsxs("div", {
42903
43055
  className: "flex flex-col gap-2",
42904
43056
  children: [/*#__PURE__*/jsx(FormLabel, {
@@ -42917,21 +43069,21 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
42917
43069
  placeholder: field.type === "file" ? "Select a file..." : "Enter ".concat(field.displayName.toLowerCase())
42918
43070
  })
42919
43071
  }), field.type === "file" && /*#__PURE__*/jsx("button", {
42920
- onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
43072
+ onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
42921
43073
  var filepath;
42922
- return _regeneratorRuntime.wrap(function (_context) {
42923
- while (1) switch (_context.prev = _context.next) {
43074
+ return _regeneratorRuntime.wrap(function (_context2) {
43075
+ while (1) switch (_context2.prev = _context2.next) {
42924
43076
  case 0:
42925
- _context.next = 1;
43077
+ _context2.next = 1;
42926
43078
  return window.mainApi.dialog.chooseFile(true, ["json"]);
42927
43079
  case 1:
42928
- filepath = _context.sent;
43080
+ filepath = _context2.sent;
42929
43081
  if (filepath) handleCredentialChange(field.key, filepath);
42930
43082
  case 2:
42931
43083
  case "end":
42932
- return _context.stop();
43084
+ return _context2.stop();
42933
43085
  }
42934
- }, _callee);
43086
+ }, _callee2);
42935
43087
  })),
42936
43088
  className: "px-3 py-1.5 text-sm rounded bg-white/10 hover:bg-white/20 transition-colors",
42937
43089
  children: "Browse"
@@ -44495,6 +44647,23 @@ var ProvidersSection = function ProvidersSection(_ref) {
44495
44647
  setIsEditingMcp(false);
44496
44648
  resetForm();
44497
44649
  refreshProviders && refreshProviders();
44650
+
44651
+ // Bounce the running MCP subprocess so the edit takes effect without
44652
+ // requiring the user to fully quit and relaunch the app. stopServer
44653
+ // is a no-op if nothing was running; we always start after stopping
44654
+ // so a disconnected provider still picks up the new config on next
44655
+ // tool call. Errors are logged but don't block the save UX.
44656
+ var bounceName = originalName || providerName;
44657
+ if (bounceName) {
44658
+ dashApi.mcpStopServer(bounceName, function () {}, function (e, err) {
44659
+ return (void 0);
44660
+ });
44661
+ }
44662
+ dashApi.mcpStartServer(providerName, mcpConfig, mcpCredentials, function (event, result) {
44663
+ if (result !== null && result !== void 0 && result.error) ;
44664
+ }, function (e, err) {
44665
+ return (void 0);
44666
+ });
44498
44667
  }, function (e, err) {
44499
44668
  return (void 0);
44500
44669
  });
@@ -44740,6 +44909,7 @@ var ProvidersSection = function ProvidersSection(_ref) {
44740
44909
  initialCredentials: selectedProvider.credentials || {},
44741
44910
  initialAllowedTools: selectedProvider.allowedTools || null,
44742
44911
  initialAuthCommand: (editCatalogEntry === null || editCatalogEntry === void 0 ? void 0 : editCatalogEntry.authCommand) || null,
44912
+ initialMcpConfig: mc,
44743
44913
  onSave: handleMcpEditSave,
44744
44914
  onBack: function onBack() {
44745
44915
  return setIsEditingMcp(false);