@trops/dash-core 0.1.371 → 0.1.372

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
@@ -4749,47 +4749,87 @@ var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
4749
4749
  _useState0 = _slicedToArray(_useState9, 2),
4750
4750
  selectedPackageName = _useState0[0],
4751
4751
  setSelectedPackageName = _useState0[1];
4752
- var search = React.useCallback(/*#__PURE__*/function () {
4753
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(query) {
4754
- var _window$mainApi;
4755
- var result, _t;
4752
+
4753
+ // Auth state when the empty state shows up to a non-signed-in user,
4754
+ // they may not realize private packages they own are filtered out.
4755
+ var _useState1 = React.useState(null),
4756
+ _useState10 = _slicedToArray(_useState1, 2),
4757
+ registryAuthed = _useState10[0],
4758
+ setRegistryAuthed = _useState10[1];
4759
+ var _useState11 = React.useState(false),
4760
+ _useState12 = _slicedToArray(_useState11, 2),
4761
+ showAuthFromEmpty = _useState12[0],
4762
+ setShowAuthFromEmpty = _useState12[1];
4763
+ React.useEffect(function () {
4764
+ var cancelled = false;
4765
+ _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
4766
+ var _window$mainApi, status;
4756
4767
  return _regeneratorRuntime.wrap(function (_context) {
4757
4768
  while (1) switch (_context.prev = _context.next) {
4758
4769
  case 0:
4759
- if ((_window$mainApi = window.mainApi) !== null && _window$mainApi !== void 0 && (_window$mainApi = _window$mainApi.registry) !== null && _window$mainApi !== void 0 && _window$mainApi.searchDashboards) {
4760
- _context.next = 1;
4770
+ _context.prev = 0;
4771
+ _context.next = 1;
4772
+ return (_window$mainApi = window.mainApi) === null || _window$mainApi === void 0 || (_window$mainApi = _window$mainApi.registryAuth) === null || _window$mainApi === void 0 ? void 0 : _window$mainApi.getStatus();
4773
+ case 1:
4774
+ status = _context.sent;
4775
+ if (!cancelled) setRegistryAuthed(!!(status !== null && status !== void 0 && status.authenticated));
4776
+ _context.next = 3;
4777
+ break;
4778
+ case 2:
4779
+ _context.prev = 2;
4780
+ _context["catch"](0);
4781
+ if (!cancelled) setRegistryAuthed(false);
4782
+ case 3:
4783
+ case "end":
4784
+ return _context.stop();
4785
+ }
4786
+ }, _callee, null, [[0, 2]]);
4787
+ }))();
4788
+ return function () {
4789
+ cancelled = true;
4790
+ };
4791
+ }, [showAuthFromEmpty]);
4792
+ var search = React.useCallback(/*#__PURE__*/function () {
4793
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(query) {
4794
+ var _window$mainApi2;
4795
+ var result, _t2;
4796
+ return _regeneratorRuntime.wrap(function (_context2) {
4797
+ while (1) switch (_context2.prev = _context2.next) {
4798
+ case 0:
4799
+ if ((_window$mainApi2 = window.mainApi) !== null && _window$mainApi2 !== void 0 && (_window$mainApi2 = _window$mainApi2.registry) !== null && _window$mainApi2 !== void 0 && _window$mainApi2.searchDashboards) {
4800
+ _context2.next = 1;
4761
4801
  break;
4762
4802
  }
4763
4803
  setPackages([]);
4764
- return _context.abrupt("return");
4804
+ return _context2.abrupt("return");
4765
4805
  case 1:
4766
4806
  setIsLoading(true);
4767
4807
  setError(null);
4768
- _context.prev = 2;
4769
- _context.next = 3;
4808
+ _context2.prev = 2;
4809
+ _context2.next = 3;
4770
4810
  return window.mainApi.registry.searchDashboards(query || "", {});
4771
4811
  case 3:
4772
- result = _context.sent;
4812
+ result = _context2.sent;
4773
4813
  setPackages((result === null || result === void 0 ? void 0 : result.packages) || []);
4774
- _context.next = 5;
4814
+ _context2.next = 5;
4775
4815
  break;
4776
4816
  case 4:
4777
- _context.prev = 4;
4778
- _t = _context["catch"](2);
4779
- setError(_t.message || "Failed to search dashboard registry");
4817
+ _context2.prev = 4;
4818
+ _t2 = _context2["catch"](2);
4819
+ setError(_t2.message || "Failed to search dashboard registry");
4780
4820
  setPackages([]);
4781
4821
  case 5:
4782
- _context.prev = 5;
4822
+ _context2.prev = 5;
4783
4823
  setIsLoading(false);
4784
- return _context.finish(5);
4824
+ return _context2.finish(5);
4785
4825
  case 6:
4786
4826
  case "end":
4787
- return _context.stop();
4827
+ return _context2.stop();
4788
4828
  }
4789
- }, _callee, null, [[2, 4, 5, 6]]);
4829
+ }, _callee2, null, [[2, 4, 5, 6]]);
4790
4830
  }));
4791
4831
  return function (_x) {
4792
- return _ref2.apply(this, arguments);
4832
+ return _ref3.apply(this, arguments);
4793
4833
  };
4794
4834
  }(), []);
4795
4835
 
@@ -4868,12 +4908,27 @@ var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
4868
4908
  })]
4869
4909
  });
4870
4910
  } else if (packages.length === 0) {
4871
- listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
4872
- className: "px-4 py-8 text-center",
4873
- children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
4911
+ listBody = /*#__PURE__*/jsxRuntime.jsxs("div", {
4912
+ className: "px-4 py-8 text-center space-y-3",
4913
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
4874
4914
  className: "text-sm opacity-50",
4875
4915
  children: searchQuery ? "No dashboards match your search." : "No dashboard packages available."
4876
- })
4916
+ }), registryAuthed === false && /*#__PURE__*/jsxRuntime.jsxs("div", {
4917
+ className: "inline-flex flex-col items-center gap-2 px-4 py-3 rounded-lg bg-amber-900/15 border border-amber-700/30",
4918
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
4919
+ className: "text-xs text-amber-200",
4920
+ children: "Sign in to the registry to see your private dashboards."
4921
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
4922
+ title: "Sign in to Registry",
4923
+ bgColor: "bg-indigo-600",
4924
+ hoverBackgroundColor: "hover:bg-indigo-500",
4925
+ textSize: "text-sm",
4926
+ padding: "py-1 px-3",
4927
+ onClick: function onClick() {
4928
+ return setShowAuthFromEmpty(true);
4929
+ }
4930
+ })]
4931
+ })]
4877
4932
  });
4878
4933
  } else {
4879
4934
  listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -4923,6 +4978,18 @@ var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
4923
4978
  }), !isLoading && !error && packages.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
4924
4979
  className: "flex-shrink-0 px-4 py-2 text-[10px] opacity-40 border-t border-white/10",
4925
4980
  children: [packages.length, " dashboard", packages.length !== 1 ? "s" : ""]
4981
+ }), /*#__PURE__*/jsxRuntime.jsx(RegistryAuthModal, {
4982
+ isOpen: showAuthFromEmpty,
4983
+ setIsOpen: setShowAuthFromEmpty,
4984
+ onAuthenticated: function onAuthenticated() {
4985
+ setShowAuthFromEmpty(false);
4986
+ setRegistryAuthed(true);
4987
+ search(searchQuery);
4988
+ },
4989
+ onCancel: function onCancel() {
4990
+ return setShowAuthFromEmpty(false);
4991
+ },
4992
+ message: "Sign in to see your private dashboards and install ones you've published."
4926
4993
  })]
4927
4994
  });
4928
4995
  };
@@ -38251,47 +38318,86 @@ var DiscoverThemesDetail = function DiscoverThemesDetail(_ref) {
38251
38318
  _useState0 = _slicedToArray(_useState9, 2),
38252
38319
  selectedPackageName = _useState0[0],
38253
38320
  setSelectedPackageName = _useState0[1];
38254
- var search = React.useCallback(/*#__PURE__*/function () {
38255
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(query) {
38256
- var _window$mainApi;
38257
- var result, _t;
38321
+
38322
+ // Auth state for the empty-state hint.
38323
+ var _useState1 = React.useState(null),
38324
+ _useState10 = _slicedToArray(_useState1, 2),
38325
+ registryAuthed = _useState10[0],
38326
+ setRegistryAuthed = _useState10[1];
38327
+ var _useState11 = React.useState(false),
38328
+ _useState12 = _slicedToArray(_useState11, 2),
38329
+ showAuthFromEmpty = _useState12[0],
38330
+ setShowAuthFromEmpty = _useState12[1];
38331
+ React.useEffect(function () {
38332
+ var cancelled = false;
38333
+ _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
38334
+ var _window$mainApi, status;
38258
38335
  return _regeneratorRuntime.wrap(function (_context) {
38259
38336
  while (1) switch (_context.prev = _context.next) {
38260
38337
  case 0:
38261
- if ((_window$mainApi = window.mainApi) !== null && _window$mainApi !== void 0 && (_window$mainApi = _window$mainApi.registry) !== null && _window$mainApi !== void 0 && _window$mainApi.searchThemes) {
38262
- _context.next = 1;
38338
+ _context.prev = 0;
38339
+ _context.next = 1;
38340
+ return (_window$mainApi = window.mainApi) === null || _window$mainApi === void 0 || (_window$mainApi = _window$mainApi.registryAuth) === null || _window$mainApi === void 0 ? void 0 : _window$mainApi.getStatus();
38341
+ case 1:
38342
+ status = _context.sent;
38343
+ if (!cancelled) setRegistryAuthed(!!(status !== null && status !== void 0 && status.authenticated));
38344
+ _context.next = 3;
38345
+ break;
38346
+ case 2:
38347
+ _context.prev = 2;
38348
+ _context["catch"](0);
38349
+ if (!cancelled) setRegistryAuthed(false);
38350
+ case 3:
38351
+ case "end":
38352
+ return _context.stop();
38353
+ }
38354
+ }, _callee, null, [[0, 2]]);
38355
+ }))();
38356
+ return function () {
38357
+ cancelled = true;
38358
+ };
38359
+ }, [showAuthFromEmpty]);
38360
+ var search = React.useCallback(/*#__PURE__*/function () {
38361
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(query) {
38362
+ var _window$mainApi2;
38363
+ var result, _t2;
38364
+ return _regeneratorRuntime.wrap(function (_context2) {
38365
+ while (1) switch (_context2.prev = _context2.next) {
38366
+ case 0:
38367
+ if ((_window$mainApi2 = window.mainApi) !== null && _window$mainApi2 !== void 0 && (_window$mainApi2 = _window$mainApi2.registry) !== null && _window$mainApi2 !== void 0 && _window$mainApi2.searchThemes) {
38368
+ _context2.next = 1;
38263
38369
  break;
38264
38370
  }
38265
38371
  setPackages([]);
38266
- return _context.abrupt("return");
38372
+ return _context2.abrupt("return");
38267
38373
  case 1:
38268
38374
  setIsLoading(true);
38269
38375
  setError(null);
38270
- _context.prev = 2;
38271
- _context.next = 3;
38376
+ _context2.prev = 2;
38377
+ _context2.next = 3;
38272
38378
  return window.mainApi.registry.searchThemes(query || "", {});
38273
38379
  case 3:
38274
- result = _context.sent;
38380
+ result = _context2.sent;
38275
38381
  setPackages((result === null || result === void 0 ? void 0 : result.packages) || []);
38276
- _context.next = 5;
38382
+ _context2.next = 5;
38277
38383
  break;
38278
38384
  case 4:
38279
- _context.prev = 4;
38280
- _t = _context["catch"](2);
38281
- setError(_t.message || "Failed to search theme registry");
38385
+ _context2.prev = 4;
38386
+ _t2 = _context2["catch"](2);
38387
+ setError(_t2.message || "Failed to search theme registry");
38282
38388
  setPackages([]);
38283
38389
  case 5:
38284
- _context.prev = 5;
38390
+ _context2.prev = 5;
38285
38391
  setIsLoading(false);
38286
- return _context.finish(5);
38392
+ return _context2.finish(5);
38287
38393
  case 6:
38288
38394
  case "end":
38289
- return _context.stop();
38395
+ return _context2.stop();
38290
38396
  }
38291
- }, _callee, null, [[2, 4, 5, 6]]);
38397
+ }, _callee2, null, [[2, 4, 5, 6]]);
38292
38398
  }));
38293
38399
  return function (_x) {
38294
- return _ref2.apply(this, arguments);
38400
+ return _ref3.apply(this, arguments);
38295
38401
  };
38296
38402
  }(), []);
38297
38403
 
@@ -38370,12 +38476,27 @@ var DiscoverThemesDetail = function DiscoverThemesDetail(_ref) {
38370
38476
  })]
38371
38477
  });
38372
38478
  } else if (packages.length === 0) {
38373
- listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
38374
- className: "px-4 py-8 text-center",
38375
- children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
38479
+ listBody = /*#__PURE__*/jsxRuntime.jsxs("div", {
38480
+ className: "px-4 py-8 text-center space-y-3",
38481
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
38376
38482
  className: "text-sm opacity-50",
38377
38483
  children: searchQuery ? "No themes match your search." : "No theme packages available."
38378
- })
38484
+ }), registryAuthed === false && /*#__PURE__*/jsxRuntime.jsxs("div", {
38485
+ className: "inline-flex flex-col items-center gap-2 px-4 py-3 rounded-lg bg-amber-900/15 border border-amber-700/30",
38486
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
38487
+ className: "text-xs text-amber-200",
38488
+ children: "Sign in to the registry to see your private themes."
38489
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
38490
+ title: "Sign in to Registry",
38491
+ bgColor: "bg-indigo-600",
38492
+ hoverBackgroundColor: "hover:bg-indigo-500",
38493
+ textSize: "text-sm",
38494
+ padding: "py-1 px-3",
38495
+ onClick: function onClick() {
38496
+ return setShowAuthFromEmpty(true);
38497
+ }
38498
+ })]
38499
+ })]
38379
38500
  });
38380
38501
  } else {
38381
38502
  listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -38427,6 +38548,18 @@ var DiscoverThemesDetail = function DiscoverThemesDetail(_ref) {
38427
38548
  }), !isLoading && !error && packages.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
38428
38549
  className: "flex-shrink-0 px-4 py-2 text-[10px] opacity-40 border-t border-white/10",
38429
38550
  children: [packages.length, " theme", packages.length !== 1 ? "s" : ""]
38551
+ }), /*#__PURE__*/jsxRuntime.jsx(RegistryAuthModal, {
38552
+ isOpen: showAuthFromEmpty,
38553
+ setIsOpen: setShowAuthFromEmpty,
38554
+ onAuthenticated: function onAuthenticated() {
38555
+ setShowAuthFromEmpty(false);
38556
+ setRegistryAuthed(true);
38557
+ search(searchQuery);
38558
+ },
38559
+ onCancel: function onCancel() {
38560
+ return setShowAuthFromEmpty(false);
38561
+ },
38562
+ message: "Sign in to see your private themes and install ones you've published."
38430
38563
  })]
38431
38564
  });
38432
38565
  };
@@ -46936,37 +47069,78 @@ var DiscoverWidgetsDetail = function DiscoverWidgetsDetail(_ref) {
46936
47069
  toolConflictWarning = _useState4[0],
46937
47070
  setToolConflictWarning = _useState4[1];
46938
47071
 
46939
- // Install progress modal state
46940
- var _useState5 = React.useState(false),
47072
+ // Auth state used to nudge unauthenticated users toward signing in
47073
+ // when the empty state appears (so they realize private packages are
47074
+ // hidden behind auth).
47075
+ var _useState5 = React.useState(null),
46941
47076
  _useState6 = _slicedToArray(_useState5, 2),
46942
- showProgressModal = _useState6[0],
46943
- setShowProgressModal = _useState6[1];
46944
- var _useState7 = React.useState([]),
47077
+ registryAuthed = _useState6[0],
47078
+ setRegistryAuthed = _useState6[1];
47079
+ var _useState7 = React.useState(false),
46945
47080
  _useState8 = _slicedToArray(_useState7, 2),
46946
- progressWidgets = _useState8[0],
46947
- setProgressWidgets = _useState8[1];
47081
+ showAuthFromEmpty = _useState8[0],
47082
+ setShowAuthFromEmpty = _useState8[1];
47083
+ React.useEffect(function () {
47084
+ var cancelled = false;
47085
+ _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
47086
+ var _window$mainApi, status;
47087
+ return _regeneratorRuntime.wrap(function (_context) {
47088
+ while (1) switch (_context.prev = _context.next) {
47089
+ case 0:
47090
+ _context.prev = 0;
47091
+ _context.next = 1;
47092
+ return (_window$mainApi = window.mainApi) === null || _window$mainApi === void 0 || (_window$mainApi = _window$mainApi.registryAuth) === null || _window$mainApi === void 0 ? void 0 : _window$mainApi.getStatus();
47093
+ case 1:
47094
+ status = _context.sent;
47095
+ if (!cancelled) setRegistryAuthed(!!(status !== null && status !== void 0 && status.authenticated));
47096
+ _context.next = 3;
47097
+ break;
47098
+ case 2:
47099
+ _context.prev = 2;
47100
+ _context["catch"](0);
47101
+ if (!cancelled) setRegistryAuthed(false);
47102
+ case 3:
47103
+ case "end":
47104
+ return _context.stop();
47105
+ }
47106
+ }, _callee, null, [[0, 2]]);
47107
+ }))();
47108
+ return function () {
47109
+ cancelled = true;
47110
+ };
47111
+ }, [needsAuth, showAuthFromEmpty]);
47112
+
47113
+ // Install progress modal state
46948
47114
  var _useState9 = React.useState(false),
46949
47115
  _useState0 = _slicedToArray(_useState9, 2),
46950
- progressComplete = _useState0[0],
46951
- setProgressComplete = _useState0[1];
47116
+ showProgressModal = _useState0[0],
47117
+ setShowProgressModal = _useState0[1];
47118
+ var _useState1 = React.useState([]),
47119
+ _useState10 = _slicedToArray(_useState1, 2),
47120
+ progressWidgets = _useState10[0],
47121
+ setProgressWidgets = _useState10[1];
47122
+ var _useState11 = React.useState(false),
47123
+ _useState12 = _slicedToArray(_useState11, 2),
47124
+ progressComplete = _useState12[0],
47125
+ setProgressComplete = _useState12[1];
46952
47126
  var installActiveRef = React.useRef(false);
46953
47127
  var pendingInstallRef = React.useRef(null);
46954
47128
 
46955
47129
  // Track installed package names (same pattern as WidgetSidebar)
46956
- var _useState1 = React.useState(new Set()),
46957
- _useState10 = _slicedToArray(_useState1, 2),
46958
- installedPackageNames = _useState10[0],
46959
- setInstalledPackageNames = _useState10[1];
46960
- var loadInstalledPackages = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
47130
+ var _useState13 = React.useState(new Set()),
47131
+ _useState14 = _slicedToArray(_useState13, 2),
47132
+ installedPackageNames = _useState14[0],
47133
+ setInstalledPackageNames = _useState14[1];
47134
+ var loadInstalledPackages = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
46961
47135
  var widgets, names, _iterator, _step, w, folderName, _folderName;
46962
- return _regeneratorRuntime.wrap(function (_context) {
46963
- while (1) switch (_context.prev = _context.next) {
47136
+ return _regeneratorRuntime.wrap(function (_context2) {
47137
+ while (1) switch (_context2.prev = _context2.next) {
46964
47138
  case 0:
46965
- _context.prev = 0;
46966
- _context.next = 1;
47139
+ _context2.prev = 0;
47140
+ _context2.next = 1;
46967
47141
  return window.mainApi.widgets.list();
46968
47142
  case 1:
46969
- widgets = _context.sent;
47143
+ widgets = _context2.sent;
46970
47144
  names = new Set();
46971
47145
  _iterator = _createForOfIteratorHelper$7(widgets);
46972
47146
  try {
@@ -46991,16 +47165,16 @@ var DiscoverWidgetsDetail = function DiscoverWidgetsDetail(_ref) {
46991
47165
  _iterator.f();
46992
47166
  }
46993
47167
  setInstalledPackageNames(names);
46994
- _context.next = 3;
47168
+ _context2.next = 3;
46995
47169
  break;
46996
47170
  case 2:
46997
- _context.prev = 2;
46998
- _context["catch"](0);
47171
+ _context2.prev = 2;
47172
+ _context2["catch"](0);
46999
47173
  case 3:
47000
47174
  case "end":
47001
- return _context.stop();
47175
+ return _context2.stop();
47002
47176
  }
47003
- }, _callee, null, [[0, 2]]);
47177
+ }, _callee2, null, [[0, 2]]);
47004
47178
  })), []);
47005
47179
  React.useEffect(function () {
47006
47180
  loadInstalledPackages();
@@ -47087,9 +47261,9 @@ var DiscoverWidgetsDetail = function DiscoverWidgetsDetail(_ref) {
47087
47261
  var p = _step3.value;
47088
47262
  if (!((_p$requiredTools = p.requiredTools) !== null && _p$requiredTools !== void 0 && _p$requiredTools.length) || p.providerClass !== "mcp") return 1; // continue
47089
47263
  // Find matching user provider
47090
- var matchingProviders = Object.entries(providers).filter(function (_ref3) {
47091
- var _ref4 = _slicedToArray(_ref3, 2),
47092
- prov = _ref4[1];
47264
+ var matchingProviders = Object.entries(providers).filter(function (_ref4) {
47265
+ var _ref5 = _slicedToArray(_ref4, 2),
47266
+ prov = _ref5[1];
47093
47267
  return prov.type === p.type && prov.providerClass === "mcp" && prov.allowedTools;
47094
47268
  });
47095
47269
  var _iterator4 = _createForOfIteratorHelper$7(matchingProviders),
@@ -47230,6 +47404,20 @@ var DiscoverWidgetsDetail = function DiscoverWidgetsDetail(_ref) {
47230
47404
  },
47231
47405
  onCancel: clearNeedsAuth,
47232
47406
  message: "Sign in to install this widget from the Dash Registry."
47407
+ }), /*#__PURE__*/jsxRuntime.jsx(RegistryAuthModal, {
47408
+ isOpen: showAuthFromEmpty,
47409
+ setIsOpen: setShowAuthFromEmpty,
47410
+ onAuthenticated: function onAuthenticated() {
47411
+ setShowAuthFromEmpty(false);
47412
+ setRegistryAuthed(true);
47413
+ // Trigger a refresh of the list now that the user can see
47414
+ // their private packages.
47415
+ retry();
47416
+ },
47417
+ onCancel: function onCancel() {
47418
+ return setShowAuthFromEmpty(false);
47419
+ },
47420
+ message: "Sign in to see your private packages and install widgets you've published."
47233
47421
  })]
47234
47422
  });
47235
47423
  }
@@ -47265,12 +47453,27 @@ var DiscoverWidgetsDetail = function DiscoverWidgetsDetail(_ref) {
47265
47453
  })]
47266
47454
  });
47267
47455
  } else if (packages.length === 0) {
47268
- listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
47269
- className: "px-4 py-8 text-center",
47270
- children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
47456
+ listBody = /*#__PURE__*/jsxRuntime.jsxs("div", {
47457
+ className: "px-4 py-8 text-center space-y-3",
47458
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
47271
47459
  className: "text-sm opacity-50",
47272
47460
  children: searchQuery ? "No packages match your search." : "No packages available."
47273
- })
47461
+ }), registryAuthed === false && /*#__PURE__*/jsxRuntime.jsxs("div", {
47462
+ className: "inline-flex flex-col items-center gap-2 px-4 py-3 rounded-lg bg-amber-900/15 border border-amber-700/30",
47463
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
47464
+ className: "text-xs text-amber-200",
47465
+ children: "Sign in to the registry to see your private packages."
47466
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
47467
+ title: "Sign in to Registry",
47468
+ bgColor: "bg-indigo-600",
47469
+ hoverBackgroundColor: "hover:bg-indigo-500",
47470
+ textSize: "text-sm",
47471
+ padding: "py-1 px-3",
47472
+ onClick: function onClick() {
47473
+ return setShowAuthFromEmpty(true);
47474
+ }
47475
+ })]
47476
+ })]
47274
47477
  });
47275
47478
  } else {
47276
47479
  listBody = /*#__PURE__*/jsxRuntime.jsx("div", {