@trops/dash-core 0.1.260 → 0.1.261

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
@@ -3594,7 +3594,7 @@ var InstallProgressModal = function InstallProgressModal(_ref) {
3594
3594
  var doneCount = widgets.filter(function (w) {
3595
3595
  return w.status === "installed" || w.status === "already-installed" || w.status === "failed";
3596
3596
  }).length;
3597
- function statusIcon(status) {
3597
+ function statusIcon(status, item) {
3598
3598
  switch (status) {
3599
3599
  case "downloading":
3600
3600
  return /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -3603,7 +3603,7 @@ var InstallProgressModal = function InstallProgressModal(_ref) {
3603
3603
  case "installed":
3604
3604
  case "already-installed":
3605
3605
  return /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
3606
- icon: "circle-check",
3606
+ icon: (item === null || item === void 0 ? void 0 : item.type) === "theme" ? "palette" : "circle-check",
3607
3607
  className: "h-4 w-4 text-green-400 flex-shrink-0"
3608
3608
  });
3609
3609
  case "failed":
@@ -3630,7 +3630,7 @@ var InstallProgressModal = function InstallProgressModal(_ref) {
3630
3630
  className: "px-5 pt-5 pb-3",
3631
3631
  children: /*#__PURE__*/jsxRuntime.jsx("h3", {
3632
3632
  className: "text-sm font-semibold",
3633
- children: isComplete ? "Installation Complete" : "Installing widget ".concat(doneCount + 1, " of ").concat(widgets.length, "...")
3633
+ children: isComplete ? "Installation Complete" : "Installing ".concat(doneCount + 1, " of ").concat(widgets.length, "...")
3634
3634
  })
3635
3635
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
3636
3636
  className: "px-5 pb-3 space-y-1.5 max-h-64 overflow-y-auto",
@@ -3638,7 +3638,7 @@ var InstallProgressModal = function InstallProgressModal(_ref) {
3638
3638
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
3639
3639
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
3640
3640
  className: "flex items-center gap-2.5 p-2 rounded ".concat(currentTheme["bg-primary-medium"] || "bg-white/5"),
3641
- children: [statusIcon(w.status), /*#__PURE__*/jsxRuntime.jsx("span", {
3641
+ children: [statusIcon(w.status, w), /*#__PURE__*/jsxRuntime.jsx("span", {
3642
3642
  className: "text-sm flex-1 truncate",
3643
3643
  children: w.displayName
3644
3644
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
@@ -4019,7 +4019,7 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
4019
4019
  } // eslint-disable-next-line react-hooks/rules-of-hooks
4020
4020
  function _handleInstall() {
4021
4021
  _handleInstall = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
4022
- var deps, _window$mainApi2, _window$mainApi2$onIn, result, _result$workspace2, _t;
4022
+ var deps, items, _window$mainApi2, _window$mainApi2$onIn, result, _result$workspace2, _t;
4023
4023
  return _regeneratorRuntime.wrap(function (_context) {
4024
4024
  while (1) switch (_context.prev = _context.next) {
4025
4025
  case 0:
@@ -4032,16 +4032,25 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
4032
4032
  setIsInstalling(true);
4033
4033
  setInstallResult(null);
4034
4034
 
4035
- // Initialize progress modal from widget deps
4035
+ // Initialize progress modal from widget deps + optional theme
4036
4036
  deps = widgetDeps.length > 0 ? widgetDeps : [];
4037
- if (deps.length > 0) {
4038
- setProgressWidgets(deps.map(function (w) {
4039
- return {
4040
- packageName: w["package"] || w.name,
4041
- displayName: w.displayName || w.name || w["package"],
4042
- status: "pending"
4043
- };
4044
- }));
4037
+ items = deps.map(function (w) {
4038
+ return {
4039
+ packageName: w["package"] || w.name,
4040
+ displayName: w.displayName || w.name || w["package"],
4041
+ status: "pending"
4042
+ };
4043
+ });
4044
+ if (pkg.theme) {
4045
+ items.push({
4046
+ packageName: pkg.theme.registryPackage || pkg.theme.key || "theme",
4047
+ displayName: pkg.theme.name || pkg.theme.key || "Bundled Theme",
4048
+ status: "pending",
4049
+ type: "theme"
4050
+ });
4051
+ }
4052
+ if (items.length > 0) {
4053
+ setProgressWidgets(items);
4045
4054
  setProgressComplete(false);
4046
4055
  setShowProgressModal(true);
4047
4056
 
@@ -4087,7 +4096,7 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
4087
4096
  setProgressComplete(true);
4088
4097
 
4089
4098
  // If no progress modal was shown, apply result directly
4090
- if (deps.length === 0) {
4099
+ if (items.length === 0) {
4091
4100
  setInstallResult({
4092
4101
  status: result !== null && result !== void 0 && result.success ? "success" : "error",
4093
4102
  message: result !== null && result !== void 0 && result.success ? "Dashboard \"".concat(((_result$workspace2 = result.workspace) === null || _result$workspace2 === void 0 ? void 0 : _result$workspace2.name) || pkg.name, "\" installed successfully.") : (result === null || result === void 0 ? void 0 : result.error) || "Installation failed."
@@ -4102,7 +4111,7 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
4102
4111
  _context.prev = 5;
4103
4112
  _t = _context["catch"](2);
4104
4113
  setProgressComplete(true);
4105
- if (deps.length === 0) {
4114
+ if (items.length === 0) {
4106
4115
  setInstallResult({
4107
4116
  status: "error",
4108
4117
  message: _t.message || "Failed to install dashboard."