@trops/dash-core 0.1.416 → 0.1.417

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
@@ -8985,7 +8985,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
8985
8985
  var hasPropertyDescriptors_1 = hasPropertyDescriptors;
8986
8986
 
8987
8987
  var keys = objectKeys$2;
8988
- var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
8988
+ var hasSymbols$5 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
8989
8989
 
8990
8990
  var toStr$4 = Object.prototype.toString;
8991
8991
  var concat = Array.prototype.concat;
@@ -9018,7 +9018,7 @@ var defineProperty$1 = function (object, name, value, predicate) {
9018
9018
  var defineProperties$1 = function (object, map) {
9019
9019
  var predicates = arguments.length > 2 ? arguments[2] : {};
9020
9020
  var props = keys(map);
9021
- if (hasSymbols$4) {
9021
+ if (hasSymbols$5) {
9022
9022
  props = concat.call(props, Object.getOwnPropertySymbols(map));
9023
9023
  }
9024
9024
  for (var i = 0; i < props.length; i += 1) {
@@ -9084,11 +9084,11 @@ var sign$1 = function sign(number) {
9084
9084
  };
9085
9085
 
9086
9086
  var shams$1;
9087
- var hasRequiredShams$1;
9087
+ var hasRequiredShams;
9088
9088
 
9089
- function requireShams$1 () {
9090
- if (hasRequiredShams$1) return shams$1;
9091
- hasRequiredShams$1 = 1;
9089
+ function requireShams () {
9090
+ if (hasRequiredShams) return shams$1;
9091
+ hasRequiredShams = 1;
9092
9092
 
9093
9093
  /** @type {import('./shams')} */
9094
9094
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
@@ -9137,10 +9137,10 @@ function requireShams$1 () {
9137
9137
  }
9138
9138
 
9139
9139
  var origSymbol = typeof Symbol !== 'undefined' && Symbol;
9140
- var hasSymbolSham = requireShams$1();
9140
+ var hasSymbolSham = requireShams();
9141
9141
 
9142
9142
  /** @type {import('.')} */
9143
- var hasSymbols$3 = function hasNativeSymbols() {
9143
+ var hasSymbols$4 = function hasNativeSymbols() {
9144
9144
  if (typeof origSymbol !== 'function') { return false; }
9145
9145
  if (typeof Symbol !== 'function') { return false; }
9146
9146
  if (typeof origSymbol('foo') !== 'symbol') { return false; }
@@ -9444,7 +9444,7 @@ var ThrowTypeError = $gOPD$1
9444
9444
  }())
9445
9445
  : throwTypeError;
9446
9446
 
9447
- var hasSymbols$2 = hasSymbols$3();
9447
+ var hasSymbols$3 = hasSymbols$4();
9448
9448
 
9449
9449
  var getProto$2 = getProto$3;
9450
9450
  var $ObjectGPO = requireObject_getPrototypeOf();
@@ -9462,7 +9462,7 @@ var INTRINSICS = {
9462
9462
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
9463
9463
  '%Array%': Array,
9464
9464
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
9465
- '%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
9465
+ '%ArrayIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
9466
9466
  '%AsyncFromSyncIteratorPrototype%': undefined$1,
9467
9467
  '%AsyncFunction%': needsEval,
9468
9468
  '%AsyncGenerator%': needsEval,
@@ -9493,10 +9493,10 @@ var INTRINSICS = {
9493
9493
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
9494
9494
  '%isFinite%': isFinite,
9495
9495
  '%isNaN%': isNaN,
9496
- '%IteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
9496
+ '%IteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
9497
9497
  '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
9498
9498
  '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
9499
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
9499
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
9500
9500
  '%Math%': Math,
9501
9501
  '%Number%': Number,
9502
9502
  '%Object%': $Object$2,
@@ -9510,11 +9510,11 @@ var INTRINSICS = {
9510
9510
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
9511
9511
  '%RegExp%': RegExp,
9512
9512
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
9513
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
9513
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
9514
9514
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
9515
9515
  '%String%': String,
9516
- '%StringIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
9517
- '%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
9516
+ '%StringIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
9517
+ '%Symbol%': hasSymbols$3 ? Symbol : undefined$1,
9518
9518
  '%SyntaxError%': $SyntaxError$1,
9519
9519
  '%ThrowTypeError%': ThrowTypeError,
9520
9520
  '%TypedArray%': TypedArray,
@@ -9867,12 +9867,12 @@ var callBound$i = function callBoundIntrinsic(name, allowMissing) {
9867
9867
 
9868
9868
  // modified from https://github.com/es-shims/es6-shim
9869
9869
  var objectKeys$1 = objectKeys$2;
9870
- var hasSymbols$1 = requireShams$1()();
9870
+ var hasSymbols$2 = requireShams()();
9871
9871
  var callBound$h = callBound$i;
9872
9872
  var $Object$1 = esObjectAtoms;
9873
9873
  var $push = callBound$h('Array.prototype.push');
9874
9874
  var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
9875
- var originalGetSymbols = hasSymbols$1 ? $Object$1.getOwnPropertySymbols : null;
9875
+ var originalGetSymbols = hasSymbols$2 ? $Object$1.getOwnPropertySymbols : null;
9876
9876
 
9877
9877
  // eslint-disable-next-line no-unused-vars
9878
9878
  var implementation$8 = function assign(target, source1) {
@@ -9886,7 +9886,7 @@ var implementation$8 = function assign(target, source1) {
9886
9886
 
9887
9887
  // step 3.a.ii:
9888
9888
  var keys = objectKeys$1(from);
9889
- var getSymbols = hasSymbols$1 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
9889
+ var getSymbols = hasSymbols$2 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
9890
9890
  if (getSymbols) {
9891
9891
  var syms = getSymbols(from);
9892
9892
  for (var j = 0; j < syms.length; ++j) {
@@ -10183,23 +10183,14 @@ var regexp_prototype_flags = flagsBound;
10183
10183
 
10184
10184
  var esGetIterator = {exports: {}};
10185
10185
 
10186
- var shams;
10187
- var hasRequiredShams;
10188
-
10189
- function requireShams () {
10190
- if (hasRequiredShams) return shams;
10191
- hasRequiredShams = 1;
10186
+ var hasSymbols$1 = requireShams();
10192
10187
 
10193
- var hasSymbols = requireShams$1();
10194
-
10195
- /** @type {import('.')} */
10196
- shams = function hasToStringTagShams() {
10197
- return hasSymbols() && !!Symbol.toStringTag;
10198
- };
10199
- return shams;
10200
- }
10188
+ /** @type {import('.')} */
10189
+ var shams = function hasToStringTagShams() {
10190
+ return hasSymbols$1() && !!Symbol.toStringTag;
10191
+ };
10201
10192
 
10202
- var hasToStringTag$7 = requireShams()();
10193
+ var hasToStringTag$7 = shams();
10203
10194
  var callBound$f = callBound$i;
10204
10195
 
10205
10196
  var $toString$7 = callBound$f('Object.prototype.toString');
@@ -11236,7 +11227,7 @@ var tryStringObject = function tryStringObject(value) {
11236
11227
  /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
11237
11228
  var $toString$6 = callBound$c('Object.prototype.toString');
11238
11229
  var strClass = '[object String]';
11239
- var hasToStringTag$6 = requireShams()();
11230
+ var hasToStringTag$6 = shams();
11240
11231
 
11241
11232
  /** @type {import('.')} */
11242
11233
  var isString$2 = function isString(value) {
@@ -11352,7 +11343,7 @@ var isSet$2 = exported$1 || function isSet(x) {
11352
11343
  var isArguments$1 = isArguments$2;
11353
11344
  var getStopIterationIterator = stopIterationIterator;
11354
11345
 
11355
- if (hasSymbols$3() || requireShams$1()()) {
11346
+ if (hasSymbols$4() || requireShams()()) {
11356
11347
  var $iterator = Symbol.iterator;
11357
11348
  // Symbol is available natively or shammed
11358
11349
  // natively:
@@ -11641,7 +11632,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
11641
11632
  /** @type {(value: unknown) => string} */
11642
11633
  var toStr$2 = callBound$9('Object.prototype.toString');
11643
11634
  var dateClass = '[object Date]';
11644
- var hasToStringTag$5 = requireShams()();
11635
+ var hasToStringTag$5 = shams();
11645
11636
 
11646
11637
  /** @type {import('.')} */
11647
11638
  var isDateObject = function isDateObject(value) {
@@ -11652,7 +11643,7 @@ var isDateObject = function isDateObject(value) {
11652
11643
  };
11653
11644
 
11654
11645
  var callBound$8 = callBound$i;
11655
- var hasToStringTag$4 = requireShams()();
11646
+ var hasToStringTag$4 = shams();
11656
11647
  var hasOwn = hasown;
11657
11648
  var gOPD$1 = gopd$1;
11658
11649
 
@@ -11757,7 +11748,7 @@ var tryNumberObject = function tryNumberObject(value) {
11757
11748
  };
11758
11749
  var $toString$3 = callBound$6('Object.prototype.toString');
11759
11750
  var numClass = '[object Number]';
11760
- var hasToStringTag$3 = requireShams()();
11751
+ var hasToStringTag$3 = shams();
11761
11752
 
11762
11753
  /** @type {import('.')} */
11763
11754
  var isNumberObject = function isNumberObject(value) {
@@ -11784,7 +11775,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
11784
11775
  }
11785
11776
  };
11786
11777
  var boolClass = '[object Boolean]';
11787
- var hasToStringTag$2 = requireShams()();
11778
+ var hasToStringTag$2 = shams();
11788
11779
 
11789
11780
  /** @type {import('.')} */
11790
11781
  var isBooleanObject = function isBoolean(value) {
@@ -11826,7 +11817,7 @@ function requireSafeRegexTest () {
11826
11817
 
11827
11818
  var callBound$4 = callBound$i;
11828
11819
  var $toString$1 = callBound$4('Object.prototype.toString');
11829
- var hasSymbols = hasSymbols$3();
11820
+ var hasSymbols = hasSymbols$4();
11830
11821
  var safeRegexTest = requireSafeRegexTest();
11831
11822
 
11832
11823
  if (hasSymbols) {
@@ -12272,7 +12263,7 @@ var gOPD = gopd$1;
12272
12263
  var getProto = getProto$3;
12273
12264
 
12274
12265
  var $toString = callBound$2('Object.prototype.toString');
12275
- var hasToStringTag = requireShams()();
12266
+ var hasToStringTag = shams();
12276
12267
 
12277
12268
  var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
12278
12269
  var typedArrays = availableTypedArrays();
@@ -40121,12 +40112,17 @@ function seedSelections(plan, dashboardVisibility) {
40121
40112
  if (!w.scope || !w.packageName) continue;
40122
40113
  var _key = "".concat(w.scope, "/").concat(w.packageName);
40123
40114
  var _reg = w.registry;
40124
- var _owned = (_reg === null || _reg === void 0 ? void 0 : _reg.ownedByMe) || !(_reg !== null && _reg !== void 0 && _reg.exists);
40115
+ // Widgets under a local-only scope (@ai-built/*) are always owned
40116
+ // by the publisher for the purposes of this flow — the backend
40117
+ // republishes them under the caller's scope. Force include=true.
40118
+ var _owned = w.requiresRepublish ? true : (_reg === null || _reg === void 0 ? void 0 : _reg.ownedByMe) || !(_reg !== null && _reg !== void 0 && _reg.exists);
40125
40119
  selections[_key] = {
40126
40120
  kind: "widget",
40127
40121
  owned: _owned,
40128
- // Default: include owned rows, skip third-party
40129
- include: !!_owned,
40122
+ // Default: include owned rows, skip third-party. Always include
40123
+ // when the widget requires republishing (can't ship a dashboard
40124
+ // pointing at a scope the installer can't resolve).
40125
+ include: w.requiresRepublish ? true : !!_owned,
40130
40126
  // Bump default: none if not yet in registry (publish local version as-is),
40131
40127
  // patch if already in registry at same version
40132
40128
  bump: !(_reg !== null && _reg !== void 0 && _reg.exists) || _reg.latestVersion !== w.localVersion ? "none" : "patch",
@@ -40273,6 +40269,16 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
40273
40269
  visibility = _useState36[0],
40274
40270
  setVisibility = _useState36[1];
40275
40271
 
40272
+ // Dashboard version bump — chosen on the Details step. Defaults to
40273
+ // "patch" so repeat-publishes auto-increment the registry's
40274
+ // latestVersion. Without this, every republish used the same
40275
+ // version string, the registry never saw a new version, and update
40276
+ // notifications never fired on installers.
40277
+ var _useState37 = React.useState("patch"),
40278
+ _useState38 = _slicedToArray(_useState37, 2),
40279
+ dashboardBump = _useState38[0],
40280
+ setDashboardBump = _useState38[1];
40281
+
40276
40282
  // Fetch publish preview (widget names) on open
40277
40283
  React.useEffect(function () {
40278
40284
  if (!isOpen || !appId || !workspaceId) return;
@@ -40621,14 +40627,16 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
40621
40627
  _context2.next = 23;
40622
40628
  break;
40623
40629
  }
40624
- _options = {
40630
+ _options = _objectSpread$q({
40625
40631
  authorName: authorName.trim(),
40626
40632
  description: description.trim() || undefined,
40627
40633
  tags: selectedTags,
40628
40634
  icon: icon || undefined,
40629
40635
  visibility: visibility,
40630
40636
  componentConfigs: collectComponentConfigs()
40631
- };
40637
+ }, dashboardBump && dashboardBump !== "none" ? {
40638
+ bump: dashboardBump
40639
+ } : {});
40632
40640
  _context2.next = 21;
40633
40641
  return window.mainApi.dashboardConfig.prepareDashboardForPublish(appId, workspaceId, _options);
40634
40642
  case 21:
@@ -40941,6 +40949,23 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
40941
40949
  onChange: setDescription,
40942
40950
  placeholder: "A brief description of this dashboard...",
40943
40951
  rows: 3
40952
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
40953
+ children: [/*#__PURE__*/jsxRuntime.jsx("label", {
40954
+ className: "block text-sm font-medium opacity-70 mb-2",
40955
+ children: "Version Bump"
40956
+ }), /*#__PURE__*/jsxRuntime.jsx("select", {
40957
+ value: dashboardBump,
40958
+ onChange: function onChange(e) {
40959
+ return setDashboardBump(e.target.value);
40960
+ },
40961
+ className: "w-full px-3 py-2 bg-white/5 border border-white/10 rounded-lg text-sm",
40962
+ children: BUMP_OPTIONS$1.map(function (opt) {
40963
+ return /*#__PURE__*/jsxRuntime.jsx("option", {
40964
+ value: opt.value,
40965
+ children: opt.label
40966
+ }, opt.value);
40967
+ })
40968
+ })]
40944
40969
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
40945
40970
  children: [/*#__PURE__*/jsxRuntime.jsx("label", {
40946
40971
  className: "block text-sm font-medium opacity-70 mb-2",
@@ -41374,7 +41399,13 @@ function DependencyTable(_ref4) {
41374
41399
  className: "flex items-start gap-3",
41375
41400
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
41376
41401
  className: "pt-0.5",
41377
- children: sel.owned ? /*#__PURE__*/jsxRuntime.jsx("input", {
41402
+ children: data !== null && data !== void 0 && data.requiresRepublish && sel.owned ? /*#__PURE__*/jsxRuntime.jsx("input", {
41403
+ type: "checkbox",
41404
+ checked: true,
41405
+ disabled: true,
41406
+ className: "h-4 w-4 accent-indigo-500 cursor-not-allowed opacity-80",
41407
+ title: "Required \u2014 this widget only exists under a local scope and must be republished under your registry scope for installers to resolve it."
41408
+ }) : sel.owned ? /*#__PURE__*/jsxRuntime.jsx("input", {
41378
41409
  type: "checkbox",
41379
41410
  checked: sel.include,
41380
41411
  onChange: function onChange(e) {