@trops/dash-core 0.1.437 → 0.1.438

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
@@ -14022,22 +14022,74 @@ var PanelCode = function PanelCode(_ref) {
14022
14022
  });
14023
14023
  };
14024
14024
 
14025
- function _createForOfIteratorHelper$o(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$o(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; } } }; }
14026
- function _unsupportedIterableToArray$o(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$o(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$o(r, a) : void 0; } }
14027
- function _arrayLikeToArray$o(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; }
14028
14025
  /**
14029
- * providerResolution.js
14026
+ * widgetIdentity.js
14027
+ *
14028
+ * Single source of truth for the widget-name + scoped-id-subtitle
14029
+ * pattern used across the renderer:
14030
+ *
14031
+ * PRIMARY Sales Pipeline
14032
+ * SUBTITLE trops.pipeline.SalesPipeline
14033
+ *
14034
+ * Surfaces that previously rolled their own derivation (WidgetsTab,
14035
+ * listenerResolution, providerResolution, WidgetCardHeader,
14036
+ * LayoutBuilderConfigModal) all route through these two helpers so a
14037
+ * given widget instance shows the same name in every panel.
14038
+ */
14039
+
14040
+ /**
14041
+ * Pick the most user-friendly display name for a layout item.
14030
14042
  *
14031
- * Shared helpers for walking a workspace and figuring out which widgets
14032
- * have required providers that are still unresolved after the 3-layer
14033
- * resolution (widget workspace → app-default → null). Used by:
14043
+ * Priority:
14044
+ * 1. per-instance user title (`item.userPrefs.title`)
14045
+ * 2. widget's default per-instance title
14046
+ * (`item.userConfig.title.defaultValue`, or string-form
14047
+ * `item.userConfig.title`)
14048
+ * 3. developer-set friendly `cfg.displayName`
14049
+ * 4. widget config `cfg.name`
14050
+ * 5. bare component name (last segment of the scoped id)
14051
+ * 6. full component string (last resort, never preferred)
14034
14052
  *
14035
- * - DashboardConfigModal to render the Providers tab
14036
- * - DashboardStage toolbar to show the unresolved-count badge
14053
+ * @param {Object} item - layout item (must carry `component` to be useful)
14054
+ * @param {Object} [cfg] - the live registry config returned by ComponentManager
14055
+ * @returns {string} a non-empty display string
14056
+ */
14057
+ function pickWidgetDisplayName(item, cfg) {
14058
+ var _item$userPrefs, _item$userConfig, _item$userConfig2;
14059
+ var prefsTitle = item === null || item === void 0 || (_item$userPrefs = item.userPrefs) === null || _item$userPrefs === void 0 ? void 0 : _item$userPrefs.title;
14060
+ if (typeof prefsTitle === "string" && prefsTitle.trim()) return prefsTitle;
14061
+ var userConfigTitle = (item === null || item === void 0 || (_item$userConfig = item.userConfig) === null || _item$userConfig === void 0 || (_item$userConfig = _item$userConfig.title) === null || _item$userConfig === void 0 ? void 0 : _item$userConfig.defaultValue) || (typeof (item === null || item === void 0 || (_item$userConfig2 = item.userConfig) === null || _item$userConfig2 === void 0 ? void 0 : _item$userConfig2.title) === "string" ? item.userConfig.title : null);
14062
+ if (typeof userConfigTitle === "string" && userConfigTitle.trim()) {
14063
+ return userConfigTitle;
14064
+ }
14065
+ if (cfg !== null && cfg !== void 0 && cfg.displayName) return cfg.displayName;
14066
+ if (cfg !== null && cfg !== void 0 && cfg.name) return cfg.name;
14067
+ if (typeof (item === null || item === void 0 ? void 0 : item.component) === "string") {
14068
+ var parts = item.component.split(".");
14069
+ if (parts.length === 3) return parts[2];
14070
+ return item.component;
14071
+ }
14072
+ return "Widget";
14073
+ }
14074
+
14075
+ /**
14076
+ * Build the full scoped registry id (`scope.package.Component`) for
14077
+ * use as a subtitle. Returns the layout item's canonical id when
14078
+ * present; otherwise null so callers can hide the subtitle.
14037
14079
  *
14038
- * Both places need the same answer, so keep the logic here to avoid drift
14039
- * with the resolution inside `useMcpProvider` / `useWebSocketProvider`.
14080
+ * @param {Object} item
14081
+ * @returns {string|null}
14040
14082
  */
14083
+ function pickWidgetRef(item) {
14084
+ var c = item === null || item === void 0 ? void 0 : item.component;
14085
+ if (typeof c !== "string") return null;
14086
+ var parts = c.split(".");
14087
+ return parts.length === 3 ? c : null;
14088
+ }
14089
+
14090
+ function _createForOfIteratorHelper$o(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$o(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; } } }; }
14091
+ function _unsupportedIterableToArray$o(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$o(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$o(r, a) : void 0; } }
14092
+ function _arrayLikeToArray$o(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; }
14041
14093
 
14042
14094
  /**
14043
14095
  * Resolve which provider name a given widget instance would bind to for
@@ -14292,6 +14344,12 @@ function getAllProviderBindings(_ref3) {
14292
14344
  bindings.push({
14293
14345
  widgetId: widgetId,
14294
14346
  component: item.component,
14347
+ // Friendly display name + canonical scoped id, derived once
14348
+ // here so every provider-tab consumer (Bulk pane, Per-widget
14349
+ // rows, override badges) shows the same label/subtitle as
14350
+ // the Listeners tab and the Widgets tab.
14351
+ label: pickWidgetDisplayName(item, null),
14352
+ widgetRef: pickWidgetRef(item),
14295
14353
  providerType: req.type,
14296
14354
  providerClass: req.providerClass || null,
14297
14355
  required: req.required !== false,
@@ -14370,18 +14428,12 @@ function canonicalItemKey(item) {
14370
14428
  return null;
14371
14429
  }
14372
14430
 
14373
- /**
14374
- * Best-effort human label for a layout item: explicit title, then
14375
- * widget config display name, then component name + short id.
14376
- */
14431
+ // Label/widgetRef derivation lives in `widgetIdentity.js` so every
14432
+ // surface (Listeners tab, Providers tab, Widgets tab, widget card
14433
+ // header, layout footer) shows the same widget name + scope.package
14434
+ // .Component subtitle. Local thin wrapper just attaches the cfg.
14377
14435
  function labelFor(item, getWidgetConfig) {
14378
- var _item$userPrefs, _item$userConfig;
14379
- var cfg = (getWidgetConfig === null || getWidgetConfig === void 0 ? void 0 : getWidgetConfig(item.component)) || null;
14380
- var explicit = (item === null || item === void 0 || (_item$userPrefs = item.userPrefs) === null || _item$userPrefs === void 0 ? void 0 : _item$userPrefs.title) || (item === null || item === void 0 || (_item$userConfig = item.userConfig) === null || _item$userConfig === void 0 ? void 0 : _item$userConfig.title);
14381
- if (explicit) return explicit;
14382
- if (cfg !== null && cfg !== void 0 && cfg.displayName) return cfg.displayName;
14383
- var id = itemIdOf(item);
14384
- return "".concat(item.component || "widget").concat(id ? "[".concat(String(id).slice(0, 6), "]") : "");
14436
+ return pickWidgetDisplayName(item, getWidgetConfig === null || getWidgetConfig === void 0 ? void 0 : getWidgetConfig(item.component));
14385
14437
  }
14386
14438
 
14387
14439
  /**
@@ -14425,6 +14477,7 @@ function getEmitters(workspace, getWidgetConfig) {
14425
14477
  itemId: itemIdOf(item),
14426
14478
  component: item.component,
14427
14479
  label: labelFor(item, getWidgetConfig),
14480
+ widgetRef: pickWidgetRef(item),
14428
14481
  events: events
14429
14482
  });
14430
14483
  });
@@ -14435,7 +14488,7 @@ function getEmitters(workspace, getWidgetConfig) {
14435
14488
  * Every widget instance in the workspace that accepts at least one
14436
14489
  * handler. Used to populate the receiver dropdown. Deduplicated by
14437
14490
  * `${component}|${itemId}` (see getEmitters).
14438
- * @returns {Array<{ itemId, component, label, eventHandlers: string[], listeners: object, key: string }>}
14491
+ * @returns {Array<{ itemId, component, label, widgetRef, eventHandlers: string[], listeners: object, key: string }>}
14439
14492
  */
14440
14493
  function getReceivers(workspace, getWidgetConfig) {
14441
14494
  var byKey = new Map();
@@ -14450,6 +14503,7 @@ function getReceivers(workspace, getWidgetConfig) {
14450
14503
  itemId: itemIdOf(item),
14451
14504
  component: item.component,
14452
14505
  label: labelFor(item, getWidgetConfig),
14506
+ widgetRef: pickWidgetRef(item),
14453
14507
  eventHandlers: handlers,
14454
14508
  listeners: item.listeners || {}
14455
14509
  });
@@ -15105,11 +15159,19 @@ var PanelEditItemHandlers = function PanelEditItemHandlers(_ref) {
15105
15159
  children: [connectedCount, " event", connectedCount !== 1 ? "s" : "", " connected"]
15106
15160
  })]
15107
15161
  }), sourceWidgets.map(function (layout) {
15162
+ var label = pickWidgetDisplayName(layout, null);
15163
+ var ref = pickWidgetRef(layout) || layout.component;
15108
15164
  return /*#__PURE__*/jsxs("div", {
15109
15165
  className: "flex flex-col space-y-2",
15110
- children: [/*#__PURE__*/jsxs("span", {
15111
- className: "text-xs font-semibold opacity-40 uppercase tracking-wider",
15112
- children: [layout["component"], " [", layout["id"], "]"]
15166
+ children: [/*#__PURE__*/jsxs("div", {
15167
+ className: "flex flex-col gap-0.5 mb-1",
15168
+ children: [/*#__PURE__*/jsx("span", {
15169
+ className: "text-sm font-semibold opacity-90",
15170
+ children: label
15171
+ }), /*#__PURE__*/jsxs("span", {
15172
+ className: "text-[10px] opacity-50 font-mono truncate",
15173
+ children: [ref, "[", layout["id"], "]"]
15174
+ })]
15113
15175
  }), layout.events.filter(function (value, index, array) {
15114
15176
  return array.indexOf(value) === index;
15115
15177
  }).map(function (event) {
@@ -15404,16 +15466,20 @@ var LayoutBuilderConfigModal = function LayoutBuilderConfigModal(_ref) {
15404
15466
  var parts = scopedId.split(".");
15405
15467
  return parts.length === 3 ? scopedId : "";
15406
15468
  }();
15407
- var componentName = itemSelected ? itemSelected["component"] : "";
15469
+ // Friendly name on the top line, full scoped id on the subtitle.
15470
+ // Same priority chain the Listeners/Widgets tabs and WidgetCardHeader
15471
+ // use, via the shared `pickWidgetDisplayName` helper.
15472
+ var widgetCfg = itemSelected ? ComponentManager.config(itemSelected.component, itemSelected) : null;
15473
+ var friendlyName = itemSelected ? pickWidgetDisplayName(itemSelected, widgetCfg) : "";
15408
15474
  var footerLeftContent = footerPackageLabel ? /*#__PURE__*/jsxs("span", {
15409
15475
  className: "flex flex-col leading-tight",
15410
15476
  children: [/*#__PURE__*/jsx("span", {
15411
- children: componentName
15477
+ children: friendlyName
15412
15478
  }), /*#__PURE__*/jsx("span", {
15413
- className: "text-[10px] opacity-50",
15479
+ className: "text-[10px] opacity-50 font-mono",
15414
15480
  children: footerPackageLabel
15415
15481
  })]
15416
- }) : componentName;
15482
+ }) : friendlyName;
15417
15483
  return itemSelected !== null && /*#__PURE__*/jsxs(SettingsModal, {
15418
15484
  isOpen: open,
15419
15485
  setIsOpen: setIsOpen,
@@ -19705,29 +19771,11 @@ var WidgetCardHeader = function WidgetCardHeader(_ref) {
19705
19771
  // Detect missing widgets (component key exists but not in ComponentManager)
19706
19772
  var isWidgetMissing = (widgetItem === null || widgetItem === void 0 ? void 0 : widgetItem.component) && !widgetConfig;
19707
19773
 
19708
- // Display name priority: per-instance user title widget's default
19709
- // title developer's friendly displayName widget config name
19710
- // bare component name (last segment) full scoped id (last resort).
19711
- // Mirrors WidgetsTab so the same widget shows the same name in both
19712
- // surfaces.
19713
- var widgetName = function (_widgetItem$userPrefs, _widgetConfig$userCon) {
19714
- var prefsTitle = widgetItem === null || widgetItem === void 0 || (_widgetItem$userPrefs = widgetItem.userPrefs) === null || _widgetItem$userPrefs === void 0 ? void 0 : _widgetItem$userPrefs.title;
19715
- if (typeof prefsTitle === "string" && prefsTitle.trim()) return prefsTitle;
19716
- var configDefault = widgetConfig === null || widgetConfig === void 0 || (_widgetConfig$userCon = widgetConfig.userConfig) === null || _widgetConfig$userCon === void 0 || (_widgetConfig$userCon = _widgetConfig$userCon.title) === null || _widgetConfig$userCon === void 0 ? void 0 : _widgetConfig$userCon.defaultValue;
19717
- if (typeof configDefault === "string" && configDefault.trim()) {
19718
- return configDefault;
19719
- }
19720
- if (widgetConfig !== null && widgetConfig !== void 0 && widgetConfig.displayName) return widgetConfig.displayName;
19721
- if (widgetConfig !== null && widgetConfig !== void 0 && widgetConfig.name) return widgetConfig.name;
19722
- if (widgetItem !== null && widgetItem !== void 0 && widgetItem.name) return widgetItem.name;
19723
- var comp = widgetItem === null || widgetItem === void 0 ? void 0 : widgetItem.component;
19724
- if (typeof comp === "string") {
19725
- var parts = comp.split(".");
19726
- if (parts.length === 3) return parts[2];
19727
- return comp;
19728
- }
19729
- return "Widget";
19730
- }();
19774
+ // Display name + scope.package.Component subtitle. Single source of
19775
+ // truth: `pickWidgetDisplayName` so the same widget shows the same
19776
+ // name in WidgetsTab, Listeners tab, Providers tab, and the layout
19777
+ // footer.
19778
+ var widgetName = pickWidgetDisplayName(widgetItem, widgetConfig);
19731
19779
 
19732
19780
  // Show the full scoped registry id (`scope.package.Component`) as
19733
19781
  // the subtitle. The friendly title on line 1 may be a custom user
@@ -53875,7 +53923,7 @@ var DraggableWidgetItem = function DraggableWidgetItem(_ref) {
53875
53923
  className: "h-3 w-3 opacity-40 flex-shrink-0"
53876
53924
  }), /*#__PURE__*/jsx("span", {
53877
53925
  className: "truncate font-medium opacity-90",
53878
- children: widget.name || widgetKey
53926
+ children: widget.displayName || widget.name || bareComponentName(widgetKey) || widgetKey
53879
53927
  })]
53880
53928
  }), (providerTypes.length > 0 || hasEventInfo) && /*#__PURE__*/jsxs("div", {
53881
53929
  className: "flex flex-wrap items-center gap-1 pl-5",
@@ -53888,9 +53936,10 @@ var DraggableWidgetItem = function DraggableWidgetItem(_ref) {
53888
53936
  className: "text-[10px] px-1.5 py-0.5 rounded bg-emerald-500/20 text-emerald-300",
53889
53937
  children: [eventCount > 0 && "".concat(eventCount, " event").concat(eventCount > 1 ? "s" : ""), eventCount > 0 && handlerCount > 0 && ", ", handlerCount > 0 && "".concat(handlerCount, " handler").concat(handlerCount > 1 ? "s" : "")]
53890
53938
  })]
53891
- }), widget["package"] && /*#__PURE__*/jsx("span", {
53892
- className: "text-[10px] pl-5 opacity-40 truncate",
53893
- children: widget["package"]
53939
+ }), widgetKey && /*#__PURE__*/jsx("span", {
53940
+ className: "text-[10px] pl-5 opacity-40 font-mono truncate",
53941
+ title: widgetKey,
53942
+ children: widgetKey
53894
53943
  })]
53895
53944
  });
53896
53945
  };
@@ -54228,39 +54277,37 @@ var SidebarDiscoverContent = function SidebarDiscoverContent(_ref2) {
54228
54277
  children: /*#__PURE__*/jsx("div", {
54229
54278
  className: "flex flex-col gap-1 px-3 py-1",
54230
54279
  children: registry.packages.map(function (pkg) {
54231
- var _pkg$widgets4, _pkg$widgets5;
54280
+ var _pkg$widgets4;
54232
54281
  var isInstalled = isPackageInstalled(pkg);
54282
+ var packageRef = pkg.scope && pkg.name ? "@".concat(String(pkg.scope).replace(/^@/, ""), "/").concat(pkg.name) : pkg.name;
54283
+ var widgetCount = ((_pkg$widgets4 = pkg.widgets) === null || _pkg$widgets4 === void 0 ? void 0 : _pkg$widgets4.length) || 0;
54233
54284
  return /*#__PURE__*/jsxs("button", {
54234
54285
  type: "button",
54235
54286
  onClick: function onClick() {
54236
54287
  return setSelectedPackageName(pkg.name);
54237
54288
  },
54238
- className: "flex items-center gap-2 px-3 py-2 rounded-md text-left\n bg-white/5 hover:bg-white/10 transition-colors w-full".concat(isInstalled ? " opacity-50" : ""),
54289
+ className: "flex items-start gap-2 px-3 py-2 rounded-md text-left\n bg-white/5 hover:bg-white/10 transition-colors w-full".concat(isInstalled ? " opacity-60" : ""),
54239
54290
  children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
54240
54291
  icon: "cube",
54241
- className: "h-3 w-3 opacity-40 flex-shrink-0"
54292
+ className: "h-3 w-3 opacity-40 flex-shrink-0 mt-0.5"
54242
54293
  }), /*#__PURE__*/jsxs("div", {
54243
54294
  className: "min-w-0 flex-1",
54244
- children: [/*#__PURE__*/jsx("div", {
54245
- className: "text-sm font-medium opacity-90 truncate",
54246
- children: pkg.displayName || pkg.name
54247
- }), /*#__PURE__*/jsxs("div", {
54248
- className: "flex items-center gap-1 text-[10px] opacity-50",
54249
- children: [pkg.author && /*#__PURE__*/jsx("span", {
54250
- className: "truncate",
54251
- children: pkg.author
54252
- }), pkg.author && ((_pkg$widgets4 = pkg.widgets) === null || _pkg$widgets4 === void 0 ? void 0 : _pkg$widgets4.length) > 0 && /*#__PURE__*/jsx("span", {
54253
- children: "\xB7"
54254
- }), ((_pkg$widgets5 = pkg.widgets) === null || _pkg$widgets5 === void 0 ? void 0 : _pkg$widgets5.length) > 0 && /*#__PURE__*/jsxs("span", {
54255
- children: [pkg.widgets.length, " widget", pkg.widgets.length !== 1 ? "s" : ""]
54256
- }), isInstalled && /*#__PURE__*/jsxs(Fragment, {
54257
- children: [/*#__PURE__*/jsx("span", {
54258
- children: "\xB7"
54259
- }), /*#__PURE__*/jsx("span", {
54260
- className: "text-emerald-400",
54261
- children: "Installed"
54262
- })]
54295
+ children: [/*#__PURE__*/jsxs("div", {
54296
+ className: "flex items-center gap-2",
54297
+ children: [/*#__PURE__*/jsx("span", {
54298
+ className: "text-sm font-medium opacity-90 truncate flex-1 min-w-0",
54299
+ children: pkg.displayName || pkg.name
54300
+ }), isInstalled && /*#__PURE__*/jsx("span", {
54301
+ className: "text-[10px] text-emerald-400 flex-shrink-0",
54302
+ children: "Installed"
54263
54303
  })]
54304
+ }), packageRef && /*#__PURE__*/jsx("div", {
54305
+ className: "text-[10px] opacity-50 font-mono truncate mt-0.5",
54306
+ title: packageRef,
54307
+ children: packageRef
54308
+ }), /*#__PURE__*/jsxs("div", {
54309
+ className: "text-[10px] opacity-40 truncate mt-0.5",
54310
+ children: [pkg.author ? "".concat(pkg.author, " \xB7 ") : "", widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
54264
54311
  })]
54265
54312
  })]
54266
54313
  }, pkg.name);
@@ -55217,56 +55264,6 @@ function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r
55217
55264
  function _arrayLikeToArray$5(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; }
55218
55265
  var ALL_WIDGETS_ID = "__ALL__";
55219
55266
 
55220
- /**
55221
- * Pick the most user-friendly display name for a widget instance.
55222
- * Priority: per-instance user title → widget's default title → widget
55223
- * developer's friendly displayName → widget config name → the bare
55224
- * component name (last segment of the scoped id) → the full scoped
55225
- * id (last resort, never preferred — but always present).
55226
- *
55227
- * This is what shows on the primary line of the WidgetsTab list and
55228
- * detail header. The full scoped registry id (`scope.package.X`) is
55229
- * surfaced separately via `pickWidgetRef` below, so the user sees
55230
- * BOTH a friendly name and an unambiguous reference.
55231
- */
55232
- function pickDisplayName(item, cfg) {
55233
- var _item$userPrefs, _item$userConfig;
55234
- var prefsTitle = item === null || item === void 0 || (_item$userPrefs = item.userPrefs) === null || _item$userPrefs === void 0 ? void 0 : _item$userPrefs.title;
55235
- if (typeof prefsTitle === "string" && prefsTitle.trim()) return prefsTitle;
55236
- var configDefault = item === null || item === void 0 || (_item$userConfig = item.userConfig) === null || _item$userConfig === void 0 || (_item$userConfig = _item$userConfig.title) === null || _item$userConfig === void 0 ? void 0 : _item$userConfig.defaultValue;
55237
- if (typeof configDefault === "string" && configDefault.trim()) {
55238
- return configDefault;
55239
- }
55240
- if (cfg !== null && cfg !== void 0 && cfg.displayName) return cfg.displayName;
55241
- if (cfg !== null && cfg !== void 0 && cfg.name) return cfg.name;
55242
- var bare = bareComponentName(item === null || item === void 0 ? void 0 : item.component);
55243
- if (bare) return bare;
55244
- return (item === null || item === void 0 ? void 0 : item.component) || "Widget";
55245
- }
55246
-
55247
- /**
55248
- * Format the full scoped registry id (`scope.package.Component`) for
55249
- * the subtitle. The friendly display name on line 1 may be a custom
55250
- * per-instance title that doesn't reveal which widget is actually
55251
- * mounted — the subtitle pins down the underlying widget identity so
55252
- * the user can always see "this 'Q4 Pipeline' is actually a
55253
- * `trops.pipeline.SalesPipeline`".
55254
- *
55255
- * Falls back to the cfg fields when the layout item is non-canonical
55256
- * (legacy bare names that LayoutModel couldn't migrate). Returns
55257
- * null when even those are missing — caller hides the subtitle.
55258
- */
55259
- function pickWidgetRef(item, cfg) {
55260
- if (parseScopedComponentId(item === null || item === void 0 ? void 0 : item.component)) return item.component;
55261
- var scope = (cfg === null || cfg === void 0 ? void 0 : cfg.scope) || (item === null || item === void 0 ? void 0 : item.scope);
55262
- var pkg = (cfg === null || cfg === void 0 ? void 0 : cfg.packageName) || (item === null || item === void 0 ? void 0 : item.packageName);
55263
- var comp = bareComponentName(item === null || item === void 0 ? void 0 : item.component) || (cfg === null || cfg === void 0 ? void 0 : cfg.name);
55264
- if (!scope || !pkg || !comp) return (item === null || item === void 0 ? void 0 : item.component) || null;
55265
- var bareScope = String(scope).replace(/^@/, "");
55266
- var barePkg = String(pkg).replace(new RegExp("^@?".concat(bareScope, "/")), "");
55267
- return "".concat(bareScope, ".").concat(barePkg, ".").concat(comp);
55268
- }
55269
-
55270
55267
  /**
55271
55268
  * WidgetsTab
55272
55269
  *
@@ -55311,8 +55308,8 @@ var WidgetsTab = function WidgetsTab(_ref) {
55311
55308
  result.push({
55312
55309
  id: id,
55313
55310
  component: item.component,
55314
- displayName: pickDisplayName(item, cfg),
55315
- widgetRef: pickWidgetRef(item, cfg),
55311
+ displayName: pickWidgetDisplayName(item, cfg),
55312
+ widgetRef: pickWidgetRef(item),
55316
55313
  section: section,
55317
55314
  userConfig: cfg.userConfig || {},
55318
55315
  userPrefs: item.userPrefs || {},
@@ -56370,13 +56367,17 @@ function ProvidersTab(_ref4) {
56370
56367
  className: "text-sm truncate flex items-center gap-1.5 ".concat(needsAttention ? "font-semibold text-red-100" : "font-medium"),
56371
56368
  children: [/*#__PURE__*/jsx("span", {
56372
56369
  className: "truncate",
56373
- children: row.component || "widget"
56370
+ children: row.label || row.component || "widget"
56374
56371
  }), isRequired && /*#__PURE__*/jsx("span", {
56375
56372
  className: needsAttention ? "text-red-300" : "text-indigo-300",
56376
56373
  title: "Required provider",
56377
56374
  "aria-label": "required",
56378
56375
  children: "*"
56379
56376
  })]
56377
+ }), (row.widgetRef || row.component) && /*#__PURE__*/jsx("div", {
56378
+ className: "text-[10px] opacity-50 font-mono truncate mt-0.5",
56379
+ title: row.widgetRef || row.component,
56380
+ children: row.widgetRef || row.component
56380
56381
  }), /*#__PURE__*/jsxs("div", {
56381
56382
  className: "flex items-center gap-1.5 mt-1 text-[10px]",
56382
56383
  children: [/*#__PURE__*/jsx("span", {
@@ -56576,16 +56577,20 @@ function ListenersTab(_ref9) {
56576
56577
  className: "overflow-y-auto flex-1",
56577
56578
  children: receivers.map(function (r) {
56578
56579
  var isActive = r.key === selectedReceiverKey;
56579
- return /*#__PURE__*/jsx("button", {
56580
+ return /*#__PURE__*/jsxs("button", {
56580
56581
  type: "button",
56581
56582
  onClick: function onClick() {
56582
56583
  return setSelectedReceiverKey(r.key);
56583
56584
  },
56584
56585
  className: "w-full text-left px-3 py-2 border-l-2 ".concat(isActive ? "bg-indigo-900/30 border-indigo-400" : "border-transparent hover:bg-white/5"),
56585
- children: /*#__PURE__*/jsx("span", {
56586
+ children: [/*#__PURE__*/jsx("div", {
56586
56587
  className: "text-sm font-medium truncate",
56587
56588
  children: r.label
56588
- })
56589
+ }), r.widgetRef && /*#__PURE__*/jsx("div", {
56590
+ className: "text-[10px] opacity-50 font-mono truncate mt-0.5",
56591
+ title: r.widgetRef,
56592
+ children: r.widgetRef
56593
+ })]
56589
56594
  }, r.key);
56590
56595
  })
56591
56596
  })]
@@ -56776,9 +56781,15 @@ function EventsColumn(_ref10) {
56776
56781
  }) : emittersForList.map(function (e) {
56777
56782
  return /*#__PURE__*/jsxs("div", {
56778
56783
  className: "space-y-1",
56779
- children: [/*#__PURE__*/jsx("div", {
56780
- className: "text-xs font-semibold opacity-50 uppercase tracking-wider",
56781
- children: e.label
56784
+ children: [/*#__PURE__*/jsxs("div", {
56785
+ className: "flex flex-col gap-0.5 mb-1",
56786
+ children: [/*#__PURE__*/jsx("div", {
56787
+ className: "text-sm font-semibold",
56788
+ children: e.label
56789
+ }), (e.widgetRef || e.component) && /*#__PURE__*/jsx("div", {
56790
+ className: "text-[10px] opacity-50 font-mono truncate",
56791
+ children: (e.widgetRef || e.component) + (e.itemId != null ? "[".concat(e.itemId, "]") : "")
56792
+ })]
56782
56793
  }), e.events.map(function (eventName) {
56783
56794
  var key = "".concat(e.component, "|").concat(e.itemId, "|").concat(eventName);
56784
56795
  var selected = wiredKeys.has(key);