@trops/dash-core 0.1.460 → 0.1.462

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
@@ -6870,6 +6870,11 @@ var useRegistrySearch = function useRegistrySearch() {
6870
6870
  search: search,
6871
6871
  installPackage: installPackage,
6872
6872
  retry: retry,
6873
+ // refetch is an alias of retry, exposed under the name the
6874
+ // Wizard's sign-in flow uses to re-fetch the registry once
6875
+ // the user signs in (so private results show up without a
6876
+ // manual reload).
6877
+ refetch: retry,
6873
6878
  showAllPackages: showAllPackages,
6874
6879
  setShowAllPackages: setShowAllPackages,
6875
6880
  appCapabilities: appCapabilities
@@ -6978,7 +6983,27 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
6978
6983
  isLoading = _useRegistrySearch.isLoading,
6979
6984
  error = _useRegistrySearch.error,
6980
6985
  searchQuery = _useRegistrySearch.searchQuery,
6981
- setSearchQuery = _useRegistrySearch.setSearchQuery;
6986
+ setSearchQuery = _useRegistrySearch.setSearchQuery,
6987
+ refetch = _useRegistrySearch.refetch;
6988
+
6989
+ // --- Registry auth (device-code OAuth) ---
6990
+ // Surfaces a sign-in CTA when the user isn't authenticated so they
6991
+ // see private dashboards/widgets they have access to. After
6992
+ // successful auth, `refetch` re-runs the registry search so the
6993
+ // results refresh automatically — no manual reload needed.
6994
+ var _useRegistryAuth = useRegistryAuth(),
6995
+ isAuthenticated = _useRegistryAuth.isAuthenticated,
6996
+ isAuthenticating = _useRegistryAuth.isAuthenticating,
6997
+ authError = _useRegistryAuth.authError,
6998
+ checkAuth = _useRegistryAuth.checkAuth,
6999
+ initiateAuth = _useRegistryAuth.initiateAuth,
7000
+ cancelAuth = _useRegistryAuth.cancelAuth;
7001
+ useEffect(function () {
7002
+ checkAuth();
7003
+ }, [checkAuth]);
7004
+ var handleSignIn = useCallback(function () {
7005
+ initiateAuth(refetch);
7006
+ }, [initiateAuth, refetch]);
6982
7007
 
6983
7008
  // Sync search query from wizard state on mount
6984
7009
  useEffect(function () {
@@ -7103,226 +7128,263 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
7103
7128
  };
7104
7129
  var sectionLabelClass = "text-xs font-semibold text-gray-400 uppercase tracking-wide px-3 mb-1";
7105
7130
  return /*#__PURE__*/jsxs("div", {
7106
- className: "flex flex-row gap-4",
7107
- children: [/*#__PURE__*/jsxs("aside", {
7108
- className: "flex-shrink-0 w-56 flex flex-col gap-4 overflow-y-auto",
7109
- children: [/*#__PURE__*/jsxs("div", {
7110
- className: "flex flex-col",
7111
- children: [/*#__PURE__*/jsx("span", {
7112
- className: sectionLabelClass,
7113
- children: "TYPE"
7114
- }), TYPE_OPTIONS.map(function (opt) {
7115
- var active = typeFilter === opt.key;
7116
- var showBadge = opt.key === "widgets" && state.selectedWidgets.length > 0;
7117
- return /*#__PURE__*/jsxs("button", {
7118
- type: "button",
7119
- onClick: function onClick() {
7120
- return setTypeFilter(opt.key);
7121
- },
7122
- className: rowClass(active),
7123
- children: [/*#__PURE__*/jsx("span", {
7124
- children: opt.label
7125
- }), showBadge && /*#__PURE__*/jsx(Tag3, {
7126
- text: "".concat(state.selectedWidgets.length, " selected")
7127
- })]
7128
- }, opt.key);
7129
- })]
7131
+ className: "flex flex-col gap-4",
7132
+ children: [!isAuthenticated && /*#__PURE__*/jsxs("div", {
7133
+ className: "flex items-center gap-3 px-4 py-2 rounded-lg bg-gray-800 text-gray-300",
7134
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7135
+ icon: "circle-info",
7136
+ className: "text-blue-400 text-sm flex-shrink-0"
7130
7137
  }), /*#__PURE__*/jsxs("div", {
7131
- className: "flex flex-col",
7138
+ className: "flex-1 min-w-0 flex flex-col",
7132
7139
  children: [/*#__PURE__*/jsx("span", {
7133
- className: sectionLabelClass,
7134
- children: "CATEGORIES"
7135
- }), DASHBOARD_TAGS$1.map(function (tag) {
7136
- var active = filters.categories.includes(tag);
7137
- return /*#__PURE__*/jsx("button", {
7138
- type: "button",
7139
- onClick: function onClick() {
7140
- return handleToggleCategory(tag);
7141
- },
7142
- className: "".concat(rowClass(active), " capitalize"),
7143
- children: /*#__PURE__*/jsx("span", {
7144
- children: tag
7145
- })
7146
- }, tag);
7140
+ className: "text-sm text-gray-200",
7141
+ children: "Sign in to registry"
7142
+ }), /*#__PURE__*/jsx("span", {
7143
+ className: "text-xs text-gray-400",
7144
+ children: "See dashboards and widgets you have access to"
7147
7145
  })]
7148
- }), /*#__PURE__*/jsxs("div", {
7149
- className: "flex flex-col",
7146
+ }), !isAuthenticating ? /*#__PURE__*/jsx("button", {
7147
+ type: "button",
7148
+ onClick: handleSignIn,
7149
+ className: "flex-shrink-0 text-xs py-1.5 px-3 rounded bg-blue-600 text-white hover:bg-blue-500 transition-colors",
7150
+ children: "Sign in"
7151
+ }) : /*#__PURE__*/jsxs("div", {
7152
+ className: "flex items-center gap-2 flex-shrink-0",
7150
7153
  children: [/*#__PURE__*/jsx("span", {
7151
- className: sectionLabelClass,
7152
- children: "PROVIDERS"
7153
- }), KNOWN_PROVIDERS.map(function (prov) {
7154
- var active = filters.providers.includes(prov.key);
7155
- return /*#__PURE__*/jsx("button", {
7156
- type: "button",
7157
- onClick: function onClick() {
7158
- return handleToggleProvider(prov.key);
7159
- },
7160
- className: rowClass(active),
7161
- children: /*#__PURE__*/jsx("span", {
7162
- children: prov.name
7163
- })
7164
- }, prov.key);
7154
+ className: "text-xs text-gray-400",
7155
+ children: "Waiting for browser\u2026"
7156
+ }), /*#__PURE__*/jsx("button", {
7157
+ type: "button",
7158
+ onClick: cancelAuth,
7159
+ className: "text-xs text-gray-400 hover:text-gray-200 underline",
7160
+ children: "Cancel"
7165
7161
  })]
7162
+ }), authError && /*#__PURE__*/jsx("span", {
7163
+ className: "flex-shrink-0 text-xs text-red-400",
7164
+ children: authError
7166
7165
  })]
7167
7166
  }), /*#__PURE__*/jsxs("div", {
7168
- className: "flex-1 min-w-0 flex flex-col gap-4",
7169
- children: [/*#__PURE__*/jsxs("div", {
7170
- className: "flex items-center gap-3",
7171
- children: [/*#__PURE__*/jsx("div", {
7172
- className: "flex-1",
7173
- children: /*#__PURE__*/jsx(InputText, {
7174
- value: searchQuery,
7175
- onChange: handleSearchChange,
7176
- placeholder: "Search registry..."
7177
- })
7178
- }), hasSelection && /*#__PURE__*/jsx(Button, {
7179
- onClick: handleClearSelection,
7180
- title: "Clear Selection",
7181
- textSize: "text-xs",
7182
- padding: "py-1 px-3",
7183
- backgroundColor: "bg-gray-700",
7184
- textColor: "text-gray-400",
7185
- hoverTextColor: "hover:text-white",
7186
- hoverBackgroundColor: "hover:bg-gray-600",
7187
- icon: "xmark"
7188
- })]
7189
- }), !isLoading && !error && /*#__PURE__*/jsx("div", {
7190
- className: "text-xs text-gray-500 px-1",
7191
- children: showDashboards ? "".concat(visibleDashboards.length, " dashboard").concat(visibleDashboards.length === 1 ? "" : "s") : "".concat(visibleWidgets.length, " widget").concat(visibleWidgets.length === 1 ? "" : "s")
7192
- }), /*#__PURE__*/jsx("div", {
7193
- className: "flex flex-col gap-6",
7194
- children: isLoading ? /*#__PURE__*/jsxs("div", {
7195
- className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-400",
7196
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7197
- icon: "spinner",
7198
- spin: true,
7199
- fixedWidth: true
7200
- }), /*#__PURE__*/jsx("span", {
7201
- children: "Searching registry..."
7167
+ className: "flex flex-row gap-4",
7168
+ children: [/*#__PURE__*/jsxs("aside", {
7169
+ className: "flex-shrink-0 w-56 flex flex-col gap-4 sticky top-0 self-start",
7170
+ children: [/*#__PURE__*/jsxs("div", {
7171
+ className: "flex flex-col",
7172
+ children: [/*#__PURE__*/jsx("span", {
7173
+ className: sectionLabelClass,
7174
+ children: "TYPE"
7175
+ }), TYPE_OPTIONS.map(function (opt) {
7176
+ var active = typeFilter === opt.key;
7177
+ var showBadge = opt.key === "widgets" && state.selectedWidgets.length > 0;
7178
+ return /*#__PURE__*/jsxs("button", {
7179
+ type: "button",
7180
+ onClick: function onClick() {
7181
+ return setTypeFilter(opt.key);
7182
+ },
7183
+ className: rowClass(active),
7184
+ children: [/*#__PURE__*/jsx("span", {
7185
+ children: opt.label
7186
+ }), showBadge && /*#__PURE__*/jsx(Tag3, {
7187
+ text: "".concat(state.selectedWidgets.length, " selected")
7188
+ })]
7189
+ }, opt.key);
7202
7190
  })]
7203
- }) : error ? /*#__PURE__*/jsxs("div", {
7204
- className: "flex items-center gap-2 text-red-400 py-4",
7205
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7206
- icon: "circle-exclamation",
7207
- fixedWidth: true
7208
- }), /*#__PURE__*/jsx("span", {
7209
- children: error
7191
+ }), /*#__PURE__*/jsxs("div", {
7192
+ className: "flex flex-col",
7193
+ children: [/*#__PURE__*/jsx("span", {
7194
+ className: sectionLabelClass,
7195
+ children: "CATEGORIES"
7196
+ }), DASHBOARD_TAGS$1.map(function (tag) {
7197
+ var active = filters.categories.includes(tag);
7198
+ return /*#__PURE__*/jsx("button", {
7199
+ type: "button",
7200
+ onClick: function onClick() {
7201
+ return handleToggleCategory(tag);
7202
+ },
7203
+ className: "".concat(rowClass(active), " capitalize"),
7204
+ children: /*#__PURE__*/jsx("span", {
7205
+ children: tag
7206
+ })
7207
+ }, tag);
7210
7208
  })]
7211
- }) : !hasResults ? /*#__PURE__*/jsxs("div", {
7212
- className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-500",
7213
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7214
- icon: "magnifying-glass",
7215
- fixedWidth: true
7216
- }), /*#__PURE__*/jsx("p", {
7217
- children: "No results match your search."
7218
- }), hasActiveFilters && /*#__PURE__*/jsx("p", {
7219
- className: "text-xs text-gray-600",
7220
- children: "Try removing some filters to see more results."
7209
+ }), /*#__PURE__*/jsxs("div", {
7210
+ className: "flex flex-col",
7211
+ children: [/*#__PURE__*/jsx("span", {
7212
+ className: sectionLabelClass,
7213
+ children: "PROVIDERS"
7214
+ }), KNOWN_PROVIDERS.map(function (prov) {
7215
+ var active = filters.providers.includes(prov.key);
7216
+ return /*#__PURE__*/jsx("button", {
7217
+ type: "button",
7218
+ onClick: function onClick() {
7219
+ return handleToggleProvider(prov.key);
7220
+ },
7221
+ className: rowClass(active),
7222
+ children: /*#__PURE__*/jsx("span", {
7223
+ children: prov.name
7224
+ })
7225
+ }, prov.key);
7221
7226
  })]
7222
- }) : /*#__PURE__*/jsxs(Fragment, {
7223
- children: [showDashboards && visibleDashboards.length > 0 && /*#__PURE__*/jsx("div", {
7224
- className: "flex flex-col gap-3",
7225
- children: /*#__PURE__*/jsx("div", {
7226
- className: "grid grid-cols-3 gap-3",
7227
- children: visibleDashboards.map(function (dash) {
7228
- var isSelected = state.selectedDashboard && state.selectedDashboard.name === dash.name;
7229
- var widgetCount = (dash.widgets || []).length;
7230
- var providerTags = (dash.providers || []).map(function (p) {
7231
- return p.name || p.type;
7232
- }).filter(Boolean);
7233
- return /*#__PURE__*/jsxs(Card2, {
7234
- hover: true,
7235
- selected: isSelected,
7236
- padding: "p-5",
7237
- rounded: "rounded-lg",
7238
- className: "hover:shadow-lg",
7239
- onClick: function onClick() {
7240
- return handleSelectDashboard(dash);
7241
- },
7242
- children: [/*#__PURE__*/jsxs("div", {
7243
- className: "flex flex-col items-center text-center gap-2",
7227
+ })]
7228
+ }), /*#__PURE__*/jsxs("div", {
7229
+ className: "flex-1 min-w-0 flex flex-col gap-4",
7230
+ children: [/*#__PURE__*/jsxs("div", {
7231
+ className: "flex items-center gap-3",
7232
+ children: [/*#__PURE__*/jsx("div", {
7233
+ className: "flex-1",
7234
+ children: /*#__PURE__*/jsx(InputText, {
7235
+ value: searchQuery,
7236
+ onChange: handleSearchChange,
7237
+ placeholder: "Search registry..."
7238
+ })
7239
+ }), hasSelection && /*#__PURE__*/jsx(Button, {
7240
+ onClick: handleClearSelection,
7241
+ title: "Clear Selection",
7242
+ textSize: "text-xs",
7243
+ padding: "py-1 px-3",
7244
+ backgroundColor: "bg-gray-700",
7245
+ textColor: "text-gray-400",
7246
+ hoverTextColor: "hover:text-white",
7247
+ hoverBackgroundColor: "hover:bg-gray-600",
7248
+ icon: "xmark"
7249
+ })]
7250
+ }), !isLoading && !error && /*#__PURE__*/jsx("div", {
7251
+ className: "text-xs text-gray-500 px-1",
7252
+ children: showDashboards ? "".concat(visibleDashboards.length, " dashboard").concat(visibleDashboards.length === 1 ? "" : "s") : "".concat(visibleWidgets.length, " widget").concat(visibleWidgets.length === 1 ? "" : "s")
7253
+ }), /*#__PURE__*/jsx("div", {
7254
+ className: "flex flex-col gap-6",
7255
+ children: isLoading ? /*#__PURE__*/jsxs("div", {
7256
+ className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-400",
7257
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7258
+ icon: "spinner",
7259
+ spin: true,
7260
+ fixedWidth: true
7261
+ }), /*#__PURE__*/jsx("span", {
7262
+ children: "Searching registry..."
7263
+ })]
7264
+ }) : error ? /*#__PURE__*/jsxs("div", {
7265
+ className: "flex items-center gap-2 text-red-400 py-4",
7266
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7267
+ icon: "circle-exclamation",
7268
+ fixedWidth: true
7269
+ }), /*#__PURE__*/jsx("span", {
7270
+ children: error
7271
+ })]
7272
+ }) : !hasResults ? /*#__PURE__*/jsxs("div", {
7273
+ className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-500",
7274
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
7275
+ icon: "magnifying-glass",
7276
+ fixedWidth: true
7277
+ }), /*#__PURE__*/jsx("p", {
7278
+ children: "No results match your search."
7279
+ }), hasActiveFilters && /*#__PURE__*/jsx("p", {
7280
+ className: "text-xs text-gray-600",
7281
+ children: "Try removing some filters to see more results."
7282
+ })]
7283
+ }) : /*#__PURE__*/jsxs(Fragment, {
7284
+ children: [showDashboards && visibleDashboards.length > 0 && /*#__PURE__*/jsx("div", {
7285
+ className: "flex flex-col gap-3",
7286
+ children: /*#__PURE__*/jsx("div", {
7287
+ className: "grid grid-cols-3 gap-3",
7288
+ children: visibleDashboards.map(function (dash) {
7289
+ var isSelected = state.selectedDashboard && state.selectedDashboard.name === dash.name;
7290
+ var widgetCount = (dash.widgets || []).length;
7291
+ var providerTags = (dash.providers || []).map(function (p) {
7292
+ return p.name || p.type;
7293
+ }).filter(Boolean);
7294
+ return /*#__PURE__*/jsxs(Card2, {
7295
+ hover: true,
7296
+ selected: isSelected,
7297
+ padding: "p-5",
7298
+ rounded: "rounded-lg",
7299
+ className: "hover:shadow-lg",
7300
+ onClick: function onClick() {
7301
+ return handleSelectDashboard(dash);
7302
+ },
7244
7303
  children: [/*#__PURE__*/jsxs("div", {
7245
- className: "relative",
7246
- children: [/*#__PURE__*/jsx("span", {
7247
- className: "text-2xl",
7248
- children: /*#__PURE__*/jsx(FontAwesomeIcon, {
7249
- icon: resolveIcon(dash.icon || "grid-2"),
7250
- fixedWidth: true,
7251
- className: "text-gray-400"
7304
+ className: "flex flex-col items-center text-center gap-2",
7305
+ children: [/*#__PURE__*/jsxs("div", {
7306
+ className: "relative",
7307
+ children: [/*#__PURE__*/jsx("span", {
7308
+ className: "text-2xl",
7309
+ children: /*#__PURE__*/jsx(FontAwesomeIcon, {
7310
+ icon: resolveIcon(dash.icon || "grid-2"),
7311
+ fixedWidth: true,
7312
+ className: "text-gray-400"
7313
+ })
7314
+ }), isSelected && /*#__PURE__*/jsx(FontAwesomeIcon, {
7315
+ icon: "circle-check",
7316
+ className: "absolute -top-1 -right-3 text-blue-400 text-xs"
7317
+ })]
7318
+ }), /*#__PURE__*/jsx("span", {
7319
+ className: "text-sm font-semibold text-gray-200",
7320
+ children: dash.displayName || dash.name
7321
+ })]
7322
+ }), dash.description && /*#__PURE__*/jsx("p", {
7323
+ className: "text-xs text-gray-400 mt-2 line-clamp-2 text-center",
7324
+ children: dash.description
7325
+ }), /*#__PURE__*/jsxs("div", {
7326
+ className: "flex items-center justify-between mt-3 pt-2 border-t border-gray-700/50",
7327
+ children: [/*#__PURE__*/jsxs("span", {
7328
+ className: "text-xs text-gray-500",
7329
+ children: [widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
7330
+ }), providerTags.length > 0 && /*#__PURE__*/jsx("div", {
7331
+ className: "flex flex-wrap gap-1 justify-end",
7332
+ children: providerTags.slice(0, 3).map(function (tag) {
7333
+ return /*#__PURE__*/jsx("span", {
7334
+ className: "text-xs px-1.5 py-0.5 rounded bg-gray-800 text-gray-400",
7335
+ children: tag
7336
+ }, tag);
7252
7337
  })
7253
- }), isSelected && /*#__PURE__*/jsx(FontAwesomeIcon, {
7254
- icon: "circle-check",
7255
- className: "absolute -top-1 -right-3 text-blue-400 text-xs"
7256
7338
  })]
7257
- }), /*#__PURE__*/jsx("span", {
7258
- className: "text-sm font-semibold text-gray-200",
7259
- children: dash.displayName || dash.name
7260
- })]
7261
- }), dash.description && /*#__PURE__*/jsx("p", {
7262
- className: "text-xs text-gray-400 mt-2 line-clamp-2 text-center",
7263
- children: dash.description
7264
- }), /*#__PURE__*/jsxs("div", {
7265
- className: "flex items-center justify-between mt-3 pt-2 border-t border-gray-700/50",
7266
- children: [/*#__PURE__*/jsxs("span", {
7267
- className: "text-xs text-gray-500",
7268
- children: [widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
7269
- }), providerTags.length > 0 && /*#__PURE__*/jsx("div", {
7270
- className: "flex flex-wrap gap-1 justify-end",
7271
- children: providerTags.slice(0, 3).map(function (tag) {
7272
- return /*#__PURE__*/jsx("span", {
7273
- className: "text-xs px-1.5 py-0.5 rounded bg-gray-800 text-gray-400",
7274
- children: tag
7275
- }, tag);
7276
- })
7277
7339
  })]
7278
- })]
7279
- }, dash.name);
7340
+ }, dash.name);
7341
+ })
7280
7342
  })
7281
- })
7282
- }), showWidgets && visibleWidgets.length > 0 && /*#__PURE__*/jsx("div", {
7283
- className: "flex flex-col gap-3",
7284
- children: /*#__PURE__*/jsx("div", {
7285
- className: "grid grid-cols-3 gap-3",
7286
- children: visibleWidgets.map(function (widget) {
7287
- var checked = isWidgetSelected(widget);
7288
- return /*#__PURE__*/jsxs(Card2, {
7289
- hover: true,
7290
- selected: checked,
7291
- padding: "p-4",
7292
- rounded: "rounded-lg",
7293
- className: "hover:shadow-lg flex flex-col",
7294
- onClick: function onClick() {
7295
- return handleToggleWidget(widget);
7296
- },
7297
- children: [/*#__PURE__*/jsxs("div", {
7298
- className: "flex items-start justify-between gap-2",
7343
+ }), showWidgets && visibleWidgets.length > 0 && /*#__PURE__*/jsx("div", {
7344
+ className: "flex flex-col gap-3",
7345
+ children: /*#__PURE__*/jsx("div", {
7346
+ className: "grid grid-cols-3 gap-3",
7347
+ children: visibleWidgets.map(function (widget) {
7348
+ var checked = isWidgetSelected(widget);
7349
+ return /*#__PURE__*/jsxs(Card2, {
7350
+ hover: true,
7351
+ selected: checked,
7352
+ padding: "p-4",
7353
+ rounded: "rounded-lg",
7354
+ className: "hover:shadow-lg flex flex-col",
7355
+ onClick: function onClick() {
7356
+ return handleToggleWidget(widget);
7357
+ },
7299
7358
  children: [/*#__PURE__*/jsxs("div", {
7300
- className: "flex items-center gap-1.5",
7301
- children: [widget.icon && /*#__PURE__*/jsx(FontAwesomeIcon, {
7302
- icon: resolveIcon(widget.icon),
7359
+ className: "flex items-start justify-between gap-2",
7360
+ children: [/*#__PURE__*/jsxs("div", {
7361
+ className: "flex items-center gap-1.5",
7362
+ children: [widget.icon && /*#__PURE__*/jsx(FontAwesomeIcon, {
7363
+ icon: resolveIcon(widget.icon),
7364
+ fixedWidth: true,
7365
+ className: "text-gray-400 text-sm"
7366
+ }), /*#__PURE__*/jsx("span", {
7367
+ className: "text-sm font-medium text-gray-200 truncate",
7368
+ children: widget.name
7369
+ })]
7370
+ }), /*#__PURE__*/jsx(FontAwesomeIcon, {
7371
+ icon: checked ? "square-check" : "square",
7303
7372
  fixedWidth: true,
7304
- className: "text-gray-400 text-sm"
7305
- }), /*#__PURE__*/jsx("span", {
7306
- className: "text-sm font-medium text-gray-200 truncate",
7307
- children: widget.name
7373
+ className: checked ? "text-blue-400 flex-shrink-0" : "text-gray-500 flex-shrink-0"
7308
7374
  })]
7309
- }), /*#__PURE__*/jsx(FontAwesomeIcon, {
7310
- icon: checked ? "square-check" : "square",
7311
- fixedWidth: true,
7312
- className: checked ? "text-blue-400 flex-shrink-0" : "text-gray-500 flex-shrink-0"
7375
+ }), widget.description && /*#__PURE__*/jsx("p", {
7376
+ className: "text-xs text-gray-400 line-clamp-2 mt-1.5 flex-1",
7377
+ children: widget.description
7378
+ }), widget.packageDisplayName && /*#__PURE__*/jsx("span", {
7379
+ className: "text-xs text-gray-500 mt-2 pt-1.5 border-t border-gray-700/50 truncate",
7380
+ children: widget.packageDisplayName
7313
7381
  })]
7314
- }), widget.description && /*#__PURE__*/jsx("p", {
7315
- className: "text-xs text-gray-400 line-clamp-2 mt-1.5 flex-1",
7316
- children: widget.description
7317
- }), widget.packageDisplayName && /*#__PURE__*/jsx("span", {
7318
- className: "text-xs text-gray-500 mt-2 pt-1.5 border-t border-gray-700/50 truncate",
7319
- children: widget.packageDisplayName
7320
- })]
7321
- }, widget.key);
7382
+ }, widget.key);
7383
+ })
7322
7384
  })
7323
- })
7324
- })]
7325
- })
7385
+ })]
7386
+ })
7387
+ })]
7326
7388
  })]
7327
7389
  })]
7328
7390
  });
@@ -7928,6 +7990,54 @@ var WizardCustomizeStep = function WizardCustomizeStep(_ref) {
7928
7990
  children: [/*#__PURE__*/jsx("h3", {
7929
7991
  className: "text-lg font-semibold text-gray-200",
7930
7992
  children: "Customize your dashboard"
7993
+ }), /*#__PURE__*/jsxs("div", {
7994
+ className: "rounded-lg border border-gray-700/50 bg-gray-800/50 p-4 flex flex-col gap-2",
7995
+ children: [/*#__PURE__*/jsx("span", {
7996
+ className: "text-sm font-semibold text-gray-300",
7997
+ children: "Summary"
7998
+ }), state.customization.name.trim() && /*#__PURE__*/jsxs("div", {
7999
+ className: "flex items-center gap-2 text-sm text-gray-300",
8000
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
8001
+ icon: "clone",
8002
+ className: "text-blue-400"
8003
+ }), /*#__PURE__*/jsx("span", {
8004
+ children: state.customization.name.trim()
8005
+ })]
8006
+ }), selectedFolder && /*#__PURE__*/jsxs("div", {
8007
+ className: "flex items-center gap-2 text-sm text-gray-300",
8008
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
8009
+ icon: selectedFolder.icon || selectedFolder.folder || "folder",
8010
+ className: "text-blue-400"
8011
+ }), /*#__PURE__*/jsx("span", {
8012
+ children: selectedFolder.name
8013
+ })]
8014
+ }), selectedTheme && /*#__PURE__*/jsxs("div", {
8015
+ className: "flex items-center gap-2 text-sm text-gray-300",
8016
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
8017
+ icon: "palette",
8018
+ className: "text-blue-400"
8019
+ }), /*#__PURE__*/jsx("span", {
8020
+ children: selectedTheme.name || state.customization.theme
8021
+ }), state.customization.theme === appThemeKey && /*#__PURE__*/jsx("span", {
8022
+ className: "text-xs text-gray-500",
8023
+ children: "(default)"
8024
+ }), /*#__PURE__*/jsxs("div", {
8025
+ className: "flex flex-row space-x-1 ml-2",
8026
+ children: [selectedTheme.primary && /*#__PURE__*/jsx("div", {
8027
+ className: "w-3 h-3 rounded bg-".concat(selectedTheme.primary, "-500")
8028
+ }), selectedTheme.secondary && /*#__PURE__*/jsx("div", {
8029
+ className: "w-3 h-3 rounded bg-".concat(selectedTheme.secondary, "-500")
8030
+ })]
8031
+ })]
8032
+ }), /*#__PURE__*/jsxs("div", {
8033
+ className: "flex items-center gap-2 text-sm text-gray-300",
8034
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
8035
+ icon: isPrebuilt ? "box" : "grid-2",
8036
+ className: "text-blue-400"
8037
+ }), /*#__PURE__*/jsx("span", {
8038
+ children: isPrebuilt ? ((_state$selectedDashbo = state.selectedDashboard) === null || _state$selectedDashbo === void 0 ? void 0 : _state$selectedDashbo.displayName) || ((_state$selectedDashbo2 = state.selectedDashboard) === null || _state$selectedDashbo2 === void 0 ? void 0 : _state$selectedDashbo2.name) || "Pre-built dashboard" : "".concat(state.selectedWidgets.length, " widget").concat(state.selectedWidgets.length !== 1 ? "s" : "")
8039
+ })]
8040
+ })]
7931
8041
  }), /*#__PURE__*/jsx("div", {
7932
8042
  className: "flex items-center gap-2 mb-2",
7933
8043
  children: SUB_STEPS.map(function (s, i) {
@@ -8178,51 +8288,6 @@ var WizardCustomizeStep = function WizardCustomizeStep(_ref) {
8178
8288
  })]
8179
8289
  })]
8180
8290
  })]
8181
- }), /*#__PURE__*/jsxs("div", {
8182
- className: "rounded-lg border border-gray-700/50 bg-gray-800/50 p-4 flex flex-col gap-2",
8183
- children: [/*#__PURE__*/jsx("span", {
8184
- className: "text-sm font-semibold text-gray-300",
8185
- children: "Summary"
8186
- }), state.customization.name.trim() && /*#__PURE__*/jsxs("div", {
8187
- className: "flex items-center gap-2 text-sm text-gray-300",
8188
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
8189
- icon: "clone",
8190
- className: "text-blue-400"
8191
- }), /*#__PURE__*/jsx("span", {
8192
- children: state.customization.name.trim()
8193
- })]
8194
- }), selectedFolder && /*#__PURE__*/jsxs("div", {
8195
- className: "flex items-center gap-2 text-sm text-gray-300",
8196
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
8197
- icon: selectedFolder.icon || selectedFolder.folder || "folder",
8198
- className: "text-blue-400"
8199
- }), /*#__PURE__*/jsx("span", {
8200
- children: selectedFolder.name
8201
- })]
8202
- }), selectedTheme && /*#__PURE__*/jsxs("div", {
8203
- className: "flex items-center gap-2 text-sm text-gray-300",
8204
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
8205
- icon: "palette",
8206
- className: "text-blue-400"
8207
- }), /*#__PURE__*/jsx("span", {
8208
- children: selectedTheme.name || state.customization.theme
8209
- }), /*#__PURE__*/jsxs("div", {
8210
- className: "flex flex-row space-x-1 ml-2",
8211
- children: [selectedTheme.primary && /*#__PURE__*/jsx("div", {
8212
- className: "w-3 h-3 rounded bg-".concat(selectedTheme.primary, "-500")
8213
- }), selectedTheme.secondary && /*#__PURE__*/jsx("div", {
8214
- className: "w-3 h-3 rounded bg-".concat(selectedTheme.secondary, "-500")
8215
- })]
8216
- })]
8217
- }), /*#__PURE__*/jsxs("div", {
8218
- className: "flex items-center gap-2 text-sm text-gray-300",
8219
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
8220
- icon: isPrebuilt ? "box" : "grid-2",
8221
- className: "text-blue-400"
8222
- }), /*#__PURE__*/jsx("span", {
8223
- children: isPrebuilt ? ((_state$selectedDashbo = state.selectedDashboard) === null || _state$selectedDashbo === void 0 ? void 0 : _state$selectedDashbo.displayName) || ((_state$selectedDashbo2 = state.selectedDashboard) === null || _state$selectedDashbo2 === void 0 ? void 0 : _state$selectedDashbo2.name) || "Pre-built dashboard" : "".concat(state.selectedWidgets.length, " widget").concat(state.selectedWidgets.length !== 1 ? "s" : "")
8224
- })]
8225
- })]
8226
8291
  }), authNeeded && /*#__PURE__*/jsxs("div", {
8227
8292
  className: "flex flex-col gap-3",
8228
8293
  children: [/*#__PURE__*/jsx("div", {
@@ -8421,7 +8486,12 @@ function getCanProceed(state) {
8421
8486
  case 0:
8422
8487
  return state.selectedDashboard !== null || state.selectedWidgets.length > 0;
8423
8488
  case 1:
8424
- return state.customization.name.trim().length > 0;
8489
+ // Create can fire only when the user has both a name and a theme.
8490
+ // The wizard auto-defaults theme to the user's active app theme,
8491
+ // so this gate is mostly belt-and-suspenders — but it locks the
8492
+ // contract so a future refactor that drops the auto-default
8493
+ // can't quietly let the Create button enable on name alone.
8494
+ return state.customization.name.trim().length > 0 && !!state.customization.theme;
8425
8495
  default:
8426
8496
  return false;
8427
8497
  }