@trops/dash-core 0.1.373 → 0.1.374

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
@@ -4720,6 +4720,31 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
4720
4720
  });
4721
4721
  };
4722
4722
 
4723
+ function RegistrySignInBanner(_ref) {
4724
+ var visible = _ref.visible,
4725
+ onSignIn = _ref.onSignIn,
4726
+ _ref$noun = _ref.noun,
4727
+ noun = _ref$noun === void 0 ? "package" : _ref$noun;
4728
+ if (!visible) return null;
4729
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
4730
+ className: "flex-shrink-0 mx-4 mb-2 px-3 py-2 rounded-lg bg-amber-900/15 border border-amber-700/30 flex items-center gap-3",
4731
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
4732
+ className: "flex-1 min-w-0",
4733
+ children: /*#__PURE__*/jsxRuntime.jsxs(DashReact.Paragraph, {
4734
+ className: "text-xs text-amber-200 leading-snug",
4735
+ children: ["Sign in to the registry to also see your private ", noun, "s and ones granted to you."]
4736
+ })
4737
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
4738
+ title: "Sign in",
4739
+ bgColor: "bg-indigo-600",
4740
+ hoverBackgroundColor: "hover:bg-indigo-500",
4741
+ textSize: "text-xs",
4742
+ padding: "py-1 px-3",
4743
+ onClick: onSignIn
4744
+ })]
4745
+ });
4746
+ }
4747
+
4723
4748
  var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
4724
4749
  var onBack = _ref.onBack,
4725
4750
  appId = _ref.appId,
@@ -4911,27 +4936,12 @@ var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
4911
4936
  })]
4912
4937
  });
4913
4938
  } else if (packages.length === 0) {
4914
- listBody = /*#__PURE__*/jsxRuntime.jsxs("div", {
4915
- className: "px-4 py-8 text-center space-y-3",
4916
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
4939
+ listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
4940
+ className: "px-4 py-8 text-center",
4941
+ children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
4917
4942
  className: "text-sm opacity-50",
4918
4943
  children: searchQuery ? "No dashboards match your search." : "No dashboard packages available."
4919
- }), registryAuthed === false && /*#__PURE__*/jsxRuntime.jsxs("div", {
4920
- className: "inline-flex flex-col items-center gap-2 px-4 py-3 rounded-lg bg-amber-900/15 border border-amber-700/30",
4921
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
4922
- className: "text-xs text-amber-200",
4923
- children: "Sign in to the registry to see your private dashboards."
4924
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
4925
- title: "Sign in to Registry",
4926
- bgColor: "bg-indigo-600",
4927
- hoverBackgroundColor: "hover:bg-indigo-500",
4928
- textSize: "text-sm",
4929
- padding: "py-1 px-3",
4930
- onClick: function onClick() {
4931
- return setShowAuthFromEmpty(true);
4932
- }
4933
- })]
4934
- })]
4944
+ })
4935
4945
  });
4936
4946
  } else {
4937
4947
  listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -4975,6 +4985,12 @@ var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
4975
4985
  placeholder: "Search dashboards...",
4976
4986
  inputClassName: "py-1.5 text-xs"
4977
4987
  })
4988
+ }), /*#__PURE__*/jsxRuntime.jsx(RegistrySignInBanner, {
4989
+ visible: registryAuthed === false,
4990
+ onSignIn: function onSignIn() {
4991
+ return setShowAuthFromEmpty(true);
4992
+ },
4993
+ noun: "dashboard"
4978
4994
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
4979
4995
  className: "flex-1 min-h-0 overflow-y-auto px-2",
4980
4996
  children: listBody
@@ -38484,27 +38500,12 @@ var DiscoverThemesDetail = function DiscoverThemesDetail(_ref) {
38484
38500
  })]
38485
38501
  });
38486
38502
  } else if (packages.length === 0) {
38487
- listBody = /*#__PURE__*/jsxRuntime.jsxs("div", {
38488
- className: "px-4 py-8 text-center space-y-3",
38489
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
38503
+ listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
38504
+ className: "px-4 py-8 text-center",
38505
+ children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
38490
38506
  className: "text-sm opacity-50",
38491
38507
  children: searchQuery ? "No themes match your search." : "No theme packages available."
38492
- }), registryAuthed === false && /*#__PURE__*/jsxRuntime.jsxs("div", {
38493
- className: "inline-flex flex-col items-center gap-2 px-4 py-3 rounded-lg bg-amber-900/15 border border-amber-700/30",
38494
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
38495
- className: "text-xs text-amber-200",
38496
- children: "Sign in to the registry to see your private themes."
38497
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
38498
- title: "Sign in to Registry",
38499
- bgColor: "bg-indigo-600",
38500
- hoverBackgroundColor: "hover:bg-indigo-500",
38501
- textSize: "text-sm",
38502
- padding: "py-1 px-3",
38503
- onClick: function onClick() {
38504
- return setShowAuthFromEmpty(true);
38505
- }
38506
- })]
38507
- })]
38508
+ })
38508
38509
  });
38509
38510
  } else {
38510
38511
  listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -38550,6 +38551,12 @@ var DiscoverThemesDetail = function DiscoverThemesDetail(_ref) {
38550
38551
  placeholder: "Search themes...",
38551
38552
  inputClassName: "py-1.5 text-xs"
38552
38553
  })
38554
+ }), /*#__PURE__*/jsxRuntime.jsx(RegistrySignInBanner, {
38555
+ visible: registryAuthed === false,
38556
+ onSignIn: function onSignIn() {
38557
+ return setShowAuthFromEmpty(true);
38558
+ },
38559
+ noun: "theme"
38553
38560
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
38554
38561
  className: "flex-1 min-h-0 overflow-y-auto px-2",
38555
38562
  children: listBody
@@ -47461,27 +47468,12 @@ var DiscoverWidgetsDetail = function DiscoverWidgetsDetail(_ref) {
47461
47468
  })]
47462
47469
  });
47463
47470
  } else if (packages.length === 0) {
47464
- listBody = /*#__PURE__*/jsxRuntime.jsxs("div", {
47465
- className: "px-4 py-8 text-center space-y-3",
47466
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
47471
+ listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
47472
+ className: "px-4 py-8 text-center",
47473
+ children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
47467
47474
  className: "text-sm opacity-50",
47468
47475
  children: searchQuery ? "No packages match your search." : "No packages available."
47469
- }), registryAuthed === false && /*#__PURE__*/jsxRuntime.jsxs("div", {
47470
- className: "inline-flex flex-col items-center gap-2 px-4 py-3 rounded-lg bg-amber-900/15 border border-amber-700/30",
47471
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
47472
- className: "text-xs text-amber-200",
47473
- children: "Sign in to the registry to see your private packages."
47474
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
47475
- title: "Sign in to Registry",
47476
- bgColor: "bg-indigo-600",
47477
- hoverBackgroundColor: "hover:bg-indigo-500",
47478
- textSize: "text-sm",
47479
- padding: "py-1 px-3",
47480
- onClick: function onClick() {
47481
- return setShowAuthFromEmpty(true);
47482
- }
47483
- })]
47484
- })]
47476
+ })
47485
47477
  });
47486
47478
  } else {
47487
47479
  listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -47548,6 +47540,12 @@ var DiscoverWidgetsDetail = function DiscoverWidgetsDetail(_ref) {
47548
47540
  className: "rounded"
47549
47541
  }), "Show all packages"]
47550
47542
  })]
47543
+ }), /*#__PURE__*/jsxRuntime.jsx(RegistrySignInBanner, {
47544
+ visible: registryAuthed === false,
47545
+ onSignIn: function onSignIn() {
47546
+ return setShowAuthFromEmpty(true);
47547
+ },
47548
+ noun: "widget"
47551
47549
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
47552
47550
  className: "flex-1 min-h-0 overflow-y-auto px-2",
47553
47551
  children: listBody