@trops/dash-core 0.1.270 → 0.1.272

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
@@ -23933,20 +23933,21 @@ var ExternalWidget = function ExternalWidget(_ref) {
23933
23933
  description = _ref.description,
23934
23934
  icon = _ref.icon;
23935
23935
  _objectWithoutProperties(_ref, _excluded$3);
23936
- return /*#__PURE__*/jsxRuntime.jsx(DashReact.Panel, {
23937
- children: /*#__PURE__*/jsxRuntime.jsxs("div", {
23938
- className: "flex flex-col items-center justify-center gap-2 py-6 text-center opacity-70",
23939
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
23940
- icon: icon || "puzzle-piece",
23941
- className: "h-6 w-6 opacity-50"
23942
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Heading, {
23943
- title: title || "External Widget",
23944
- padding: false
23945
- }), description && /*#__PURE__*/jsxRuntime.jsx("p", {
23946
- className: "text-sm text-gray-400 max-w-xs",
23947
- children: description
23948
- })]
23949
- })
23936
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
23937
+ className: "flex flex-col h-full justify-center items-center w-full gap-2 p-4 text-center",
23938
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
23939
+ icon: icon || "triangle-exclamation",
23940
+ className: "h-5 w-5 text-amber-500"
23941
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
23942
+ className: "text-sm font-semibold text-gray-300",
23943
+ children: "Widget Unavailable"
23944
+ }), title && /*#__PURE__*/jsxRuntime.jsx("div", {
23945
+ className: "text-xs text-gray-500 font-mono",
23946
+ children: title
23947
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
23948
+ className: "text-xs text-gray-600 mt-1",
23949
+ children: description || "Check widget configuration or reinstall from the registry."
23950
+ })]
23950
23951
  });
23951
23952
  };
23952
23953
 
@@ -26625,13 +26626,6 @@ function isWidgetResolvable(componentKey) {
26625
26626
  if (m[componentKey] && typeof m[componentKey].component === "function") {
26626
26627
  return true;
26627
26628
  }
26628
- // Fallback: match by config.name (mirrors getComponent's name fallback)
26629
- for (var _i = 0, _Object$keys = Object.keys(m); _i < _Object$keys.length; _i++) {
26630
- var key = _Object$keys[_i];
26631
- if (m[key].name === componentKey && typeof m[key].component === "function") {
26632
- return true;
26633
- }
26634
- }
26635
26629
  return false;
26636
26630
  }
26637
26631
 
@@ -29504,20 +29498,6 @@ var ComponentManager = {
29504
29498
  var m = this.componentMap();
29505
29499
  // Try exact match first (works for both scoped ids and legacy names)
29506
29500
  var cmp = component in m ? m[component] : null;
29507
-
29508
- // Fallback: scan by config.name for backward compatibility
29509
- // Handles saved layouts that reference old-style names (e.g., "AnalogClockWidget")
29510
- // when the widget is now registered under a scoped id (e.g., "trops.clock.AnalogClockWidget")
29511
- if (cmp === null) {
29512
- for (var _i = 0, _Object$keys = Object.keys(m); _i < _Object$keys.length; _i++) {
29513
- var key = _Object$keys[_i];
29514
- if (m[key].name === component) {
29515
- cmp = m[key];
29516
- cmp["componentName"] = key;
29517
- return cmp;
29518
- }
29519
- }
29520
- }
29521
29501
  if (cmp !== null) {
29522
29502
  cmp["componentName"] = component;
29523
29503
  return cmp;