@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.esm.js CHANGED
@@ -3576,7 +3576,7 @@ var InstallProgressModal = function InstallProgressModal(_ref) {
3576
3576
  var doneCount = widgets.filter(function (w) {
3577
3577
  return w.status === "installed" || w.status === "already-installed" || w.status === "failed";
3578
3578
  }).length;
3579
- function statusIcon(status) {
3579
+ function statusIcon(status, item) {
3580
3580
  switch (status) {
3581
3581
  case "downloading":
3582
3582
  return /*#__PURE__*/jsx("div", {
@@ -3585,7 +3585,7 @@ var InstallProgressModal = function InstallProgressModal(_ref) {
3585
3585
  case "installed":
3586
3586
  case "already-installed":
3587
3587
  return /*#__PURE__*/jsx(FontAwesomeIcon, {
3588
- icon: "circle-check",
3588
+ icon: (item === null || item === void 0 ? void 0 : item.type) === "theme" ? "palette" : "circle-check",
3589
3589
  className: "h-4 w-4 text-green-400 flex-shrink-0"
3590
3590
  });
3591
3591
  case "failed":
@@ -3612,7 +3612,7 @@ var InstallProgressModal = function InstallProgressModal(_ref) {
3612
3612
  className: "px-5 pt-5 pb-3",
3613
3613
  children: /*#__PURE__*/jsx("h3", {
3614
3614
  className: "text-sm font-semibold",
3615
- children: isComplete ? "Installation Complete" : "Installing widget ".concat(doneCount + 1, " of ").concat(widgets.length, "...")
3615
+ children: isComplete ? "Installation Complete" : "Installing ".concat(doneCount + 1, " of ").concat(widgets.length, "...")
3616
3616
  })
3617
3617
  }), /*#__PURE__*/jsx("div", {
3618
3618
  className: "px-5 pb-3 space-y-1.5 max-h-64 overflow-y-auto",
@@ -3620,7 +3620,7 @@ var InstallProgressModal = function InstallProgressModal(_ref) {
3620
3620
  return /*#__PURE__*/jsxs("div", {
3621
3621
  children: [/*#__PURE__*/jsxs("div", {
3622
3622
  className: "flex items-center gap-2.5 p-2 rounded ".concat(currentTheme["bg-primary-medium"] || "bg-white/5"),
3623
- children: [statusIcon(w.status), /*#__PURE__*/jsx("span", {
3623
+ children: [statusIcon(w.status, w), /*#__PURE__*/jsx("span", {
3624
3624
  className: "text-sm flex-1 truncate",
3625
3625
  children: w.displayName
3626
3626
  }), /*#__PURE__*/jsx("span", {
@@ -4001,7 +4001,7 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
4001
4001
  } // eslint-disable-next-line react-hooks/rules-of-hooks
4002
4002
  function _handleInstall() {
4003
4003
  _handleInstall = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
4004
- var deps, _window$mainApi2, _window$mainApi2$onIn, result, _result$workspace2, _t;
4004
+ var deps, items, _window$mainApi2, _window$mainApi2$onIn, result, _result$workspace2, _t;
4005
4005
  return _regeneratorRuntime.wrap(function (_context) {
4006
4006
  while (1) switch (_context.prev = _context.next) {
4007
4007
  case 0:
@@ -4014,16 +4014,25 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
4014
4014
  setIsInstalling(true);
4015
4015
  setInstallResult(null);
4016
4016
 
4017
- // Initialize progress modal from widget deps
4017
+ // Initialize progress modal from widget deps + optional theme
4018
4018
  deps = widgetDeps.length > 0 ? widgetDeps : [];
4019
- if (deps.length > 0) {
4020
- setProgressWidgets(deps.map(function (w) {
4021
- return {
4022
- packageName: w["package"] || w.name,
4023
- displayName: w.displayName || w.name || w["package"],
4024
- status: "pending"
4025
- };
4026
- }));
4019
+ items = deps.map(function (w) {
4020
+ return {
4021
+ packageName: w["package"] || w.name,
4022
+ displayName: w.displayName || w.name || w["package"],
4023
+ status: "pending"
4024
+ };
4025
+ });
4026
+ if (pkg.theme) {
4027
+ items.push({
4028
+ packageName: pkg.theme.registryPackage || pkg.theme.key || "theme",
4029
+ displayName: pkg.theme.name || pkg.theme.key || "Bundled Theme",
4030
+ status: "pending",
4031
+ type: "theme"
4032
+ });
4033
+ }
4034
+ if (items.length > 0) {
4035
+ setProgressWidgets(items);
4027
4036
  setProgressComplete(false);
4028
4037
  setShowProgressModal(true);
4029
4038
 
@@ -4069,7 +4078,7 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
4069
4078
  setProgressComplete(true);
4070
4079
 
4071
4080
  // If no progress modal was shown, apply result directly
4072
- if (deps.length === 0) {
4081
+ if (items.length === 0) {
4073
4082
  setInstallResult({
4074
4083
  status: result !== null && result !== void 0 && result.success ? "success" : "error",
4075
4084
  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."
@@ -4084,7 +4093,7 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
4084
4093
  _context.prev = 5;
4085
4094
  _t = _context["catch"](2);
4086
4095
  setProgressComplete(true);
4087
- if (deps.length === 0) {
4096
+ if (items.length === 0) {
4088
4097
  setInstallResult({
4089
4098
  status: "error",
4090
4099
  message: _t.message || "Failed to install dashboard."