@upstash/react-redis-browser 0.2.14-rc.8 → 0.2.14-rc.9

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.css CHANGED
@@ -1185,6 +1185,9 @@
1185
1185
  .ups-db .max-w-32 {
1186
1186
  max-width: 8rem;
1187
1187
  }
1188
+ .ups-db .max-w-4xl {
1189
+ max-width: 56rem;
1190
+ }
1188
1191
  .ups-db .max-w-\[370px\] {
1189
1192
  max-width: 370px;
1190
1193
  }
@@ -1639,6 +1642,10 @@
1639
1642
  --tw-bg-opacity: 1;
1640
1643
  background-color: rgb(var(--color-emerald-500) / var(--tw-bg-opacity));
1641
1644
  }
1645
+ .ups-db .bg-emerald-600 {
1646
+ --tw-bg-opacity: 1;
1647
+ background-color: rgb(var(--color-emerald-600) / var(--tw-bg-opacity));
1648
+ }
1642
1649
  .ups-db .bg-emerald-800 {
1643
1650
  --tw-bg-opacity: 1;
1644
1651
  background-color: rgb(var(--color-emerald-800) / var(--tw-bg-opacity));
@@ -1847,6 +1854,9 @@
1847
1854
  padding-top: 5px;
1848
1855
  padding-bottom: 5px;
1849
1856
  }
1857
+ .ups-db .pb-1\.5 {
1858
+ padding-bottom: 0.375rem;
1859
+ }
1850
1860
  .ups-db .pb-5 {
1851
1861
  padding-bottom: 1.25rem;
1852
1862
  }
@@ -2452,6 +2462,10 @@
2452
2462
  --tw-bg-opacity: 1;
2453
2463
  background-color: rgb(var(--color-emerald-600) / var(--tw-bg-opacity));
2454
2464
  }
2465
+ .ups-db .hover\:bg-emerald-700:hover {
2466
+ --tw-bg-opacity: 1;
2467
+ background-color: rgb(var(--color-emerald-700) / var(--tw-bg-opacity));
2468
+ }
2455
2469
  .ups-db .hover\:bg-red-500\/90:hover {
2456
2470
  background-color: rgb(var(--color-red-500) / 0.9);
2457
2471
  }
@@ -2476,10 +2490,6 @@
2476
2490
  --tw-bg-opacity: 1;
2477
2491
  background-color: rgb(var(--color-zinc-50) / var(--tw-bg-opacity));
2478
2492
  }
2479
- .ups-db .hover\:bg-zinc-800:hover {
2480
- --tw-bg-opacity: 1;
2481
- background-color: rgb(var(--color-zinc-800) / var(--tw-bg-opacity));
2482
- }
2483
2493
  .ups-db .hover\:text-red-500:hover {
2484
2494
  --tw-text-opacity: 1;
2485
2495
  color: rgb(var(--color-red-500) / var(--tw-text-opacity));
@@ -2809,6 +2819,10 @@
2809
2819
  --tw-bg-opacity: 1;
2810
2820
  background-color: rgb(var(--color-zinc-200) / var(--tw-bg-opacity));
2811
2821
  }
2822
+ .ups-db .dark\:bg-zinc-300:is(.dark *) {
2823
+ --tw-bg-opacity: 1;
2824
+ background-color: rgb(var(--color-zinc-300) / var(--tw-bg-opacity));
2825
+ }
2812
2826
  .ups-db .dark\:text-red-400:is(.dark *) {
2813
2827
  --tw-text-opacity: 1;
2814
2828
  color: rgb(var(--color-red-400) / var(--tw-text-opacity));
package/dist/index.js CHANGED
@@ -6973,7 +6973,7 @@ var EditorDisplay = ({ dataKey, type }) => {
6973
6973
  const { data } = useFetchSimpleKey(dataKey, type);
6974
6974
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full w-full flex-col gap-2", children: [
6975
6975
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DisplayHeader, { dataKey, type, content: _nullishCoalesce(data, () => ( void 0)) }),
6976
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-full grow flex-col gap-2 rounded-md bg-zinc-100", children: data === void 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Spinner, { isLoadingText: "", isLoading: true }) : data === null ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EditorDisplayForm, { dataKey, type, data }, dataKey) })
6976
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-full grow flex-col gap-2 rounded-md", children: data === void 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Spinner, { isLoadingText: "", isLoading: true }) : data === null ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EditorDisplayForm, { dataKey, type, data }, dataKey) })
6977
6977
  ] });
6978
6978
  };
6979
6979
  var EditorDisplayForm = ({
@@ -7020,7 +7020,7 @@ var DataDisplay = () => {
7020
7020
  const { selectedKey } = useTab();
7021
7021
  const { query } = useKeys();
7022
7022
  const type = useKeyType(selectedKey);
7023
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full rounded-xl bg-zinc-100 p-5", children: !selectedKey ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}) : !type ? query.isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-zinc-500", children: "Loading..." }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}) : !DATA_TYPES.includes(type) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-zinc-500", children: [
7023
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full rounded-xl bg-zinc-100 p-5 dark:bg-zinc-200", children: !selectedKey ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}) : !type ? query.isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-zinc-500", children: "Loading..." }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}) : !DATA_TYPES.includes(type) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-zinc-500", children: [
7024
7024
  "Unrecognized key type: ",
7025
7025
  type
7026
7026
  ] }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: SIMPLE_DATA_TYPES.includes(type) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EditorDisplay, { dataKey: selectedKey, type }) : type === "search" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SearchDisplay, { indexName: selectedKey }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ListDisplay, { dataKey: selectedKey, type }) }) });
@@ -7191,7 +7191,7 @@ var EditIndexModal = ({
7191
7191
  ] }) });
7192
7192
  };
7193
7193
 
7194
- // src/components/databrowser/components/sidebar/search-input.tsx
7194
+ // src/components/databrowser/components/header/search-input.tsx
7195
7195
 
7196
7196
 
7197
7197
 
@@ -7316,7 +7316,7 @@ var SearchInput = () => {
7316
7316
  ] });
7317
7317
  };
7318
7318
 
7319
- // src/components/databrowser/components/sidebar/type-selector.tsx
7319
+ // src/components/databrowser/components/header/type-selector.tsx
7320
7320
 
7321
7321
  var ALL_TYPES_KEY = "all";
7322
7322
  function DataTypeSelector({ allowSearch }) {
@@ -7391,8 +7391,14 @@ var IndexSelector = () => {
7391
7391
  valuesSearch: { index },
7392
7392
  setValuesSearchIndex
7393
7393
  } = useTab();
7394
- const { data: indexes } = useFetchSearchIndexes();
7394
+ const { data: indexes, isLoading } = useFetchSearchIndexes();
7395
7395
  const [open, setOpen] = _react.useState.call(void 0, false);
7396
+ _react.useEffect.call(void 0, () => {
7397
+ if (!indexes || isLoading) return;
7398
+ if (index && !indexes.includes(index)) {
7399
+ setValuesSearchIndex("");
7400
+ }
7401
+ }, [indexes, index, isLoading, setValuesSearchIndex]);
7396
7402
  const [search, setSearch] = _react.useState.call(void 0, "");
7397
7403
  const [editingIndex, setEditingIndex] = _react.useState.call(void 0, null);
7398
7404
  const filteredIndexes = _optionalChain([indexes, 'optionalAccess', _84 => _84.filter, 'call', _85 => _85((idx) => idx.toLowerCase().includes(search.toLowerCase()))]);
@@ -7562,6 +7568,9 @@ var HeaderError = () => {
7562
7568
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-red-600 dark:text-red-400", children: formatUpstashErrorMessage(query.error) });
7563
7569
  };
7564
7570
 
7571
+ // src/components/databrowser/components/query-builder.tsx
7572
+
7573
+
7565
7574
  // src/components/databrowser/components/search/query-editor.tsx
7566
7575
 
7567
7576
 
@@ -8194,17 +8203,32 @@ var QueryBuilder = () => {
8194
8203
  const { valuesSearch, setValuesSearchQuery } = useTab();
8195
8204
  const { data: indexDetails } = useFetchSearchIndex(valuesSearch.index);
8196
8205
  const editorValue = PREFIX + (valuesSearch.query || "{}");
8197
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full rounded-lg border border-zinc-300 bg-white px-[6px]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8198
- QueryEditor,
8199
- {
8200
- value: editorValue,
8201
- onChange: (value) => {
8202
- const queryPart = value.slice(PREFIX.length);
8203
- setValuesSearchQuery(queryPart);
8204
- },
8205
- schema: indexDetails
8206
- }
8207
- ) });
8206
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full flex-col rounded-lg border border-zinc-300 bg-white px-[6px]", children: [
8207
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8208
+ QueryEditor,
8209
+ {
8210
+ value: editorValue,
8211
+ onChange: (value) => {
8212
+ const queryPart = value.slice(PREFIX.length);
8213
+ setValuesSearchQuery(queryPart);
8214
+ },
8215
+ schema: indexDetails
8216
+ }
8217
+ ) }),
8218
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-end px-2 pb-1.5", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
8219
+ "a",
8220
+ {
8221
+ href: "https://upstash-search.mintlify.app/redis/search/query-operators/boolean-operators/overview",
8222
+ target: "_blank",
8223
+ rel: "noopener noreferrer",
8224
+ className: "flex items-center gap-1 text-xs text-zinc-400 transition-colors hover:text-zinc-600",
8225
+ children: [
8226
+ "Docs",
8227
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconExternalLink, { size: 12 })
8228
+ ]
8229
+ }
8230
+ ) })
8231
+ ] });
8208
8232
  };
8209
8233
 
8210
8234
  // src/components/databrowser/components/search-empty-state.tsx
@@ -8459,63 +8483,61 @@ var ImportSampleDatasetModal = ({
8459
8483
 
8460
8484
  var SearchEmptyState = () => {
8461
8485
  const [importModalOpen, setImportModalOpen] = _react.useState.call(void 0, false);
8462
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-1 justify-center", children: [
8463
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-8 rounded-xl border border-zinc-200 bg-gradient-to-b from-zinc-50 to-white p-8", children: [
8464
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1", children: [
8465
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-2 text-lg font-semibold text-zinc-900", children: "Redis Search" }),
8466
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-6 max-w-md text-sm leading-relaxed text-zinc-600", children: "Redis Search allows you to create indexes on your existing keys and perform fast, full-text searches across your data." }),
8467
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
8468
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-xs font-medium uppercase tracking-wider text-zinc-400", children: "How it works" }),
8469
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2.5", children: [
8470
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start gap-3", children: [
8471
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-emerald-100 text-emerald-600", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconDatabase, { size: 16 }) }),
8472
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
8473
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "text-sm font-medium text-zinc-900", children: "Store your data" }),
8474
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-zinc-500", children: "Add documents as JSON, Hash, or String keys (string content must be valid JSON)." })
8475
- ] })
8476
- ] }),
8477
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start gap-3", children: [
8478
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-emerald-100 text-emerald-600", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconCode, { size: 16 }) }),
8479
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
8480
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "text-sm font-medium text-zinc-900", children: "Create an index" }),
8481
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-zinc-500", children: "Define a search index specifying which fields to search on." })
8482
- ] })
8483
- ] }),
8484
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start gap-3", children: [
8485
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-emerald-100 text-emerald-600", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconSearch, { size: 16 }) }),
8486
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
8487
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "text-sm font-medium text-zinc-900", children: "Search your data" }),
8488
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-zinc-500", children: "Query with filters, full-text search, and sorted results." })
8489
- ] })
8486
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mx-auto flex h-full max-w-4xl gap-8 rounded-xl border border-zinc-200 bg-gradient-to-b from-zinc-50 to-white p-8", children: [
8487
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ImportSampleDatasetModal, { open: importModalOpen, onOpenChange: setImportModalOpen }),
8488
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1", children: [
8489
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-2 text-lg font-semibold text-zinc-900", children: "Redis Search" }),
8490
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-6 max-w-md text-sm leading-relaxed text-zinc-600", children: "Redis Search allows you to create indexes on your existing keys and perform fast, full-text searches across your data." }),
8491
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
8492
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-xs font-medium uppercase tracking-wider text-zinc-400", children: "How it works" }),
8493
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2.5", children: [
8494
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start gap-3", children: [
8495
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-emerald-100 text-emerald-600", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconDatabase, { size: 16 }) }),
8496
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
8497
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "text-sm font-medium text-zinc-900", children: "Store your data" }),
8498
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-zinc-500", children: "Add documents as JSON, Hash, or String keys (string content must be valid JSON)." })
8499
+ ] })
8500
+ ] }),
8501
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start gap-3", children: [
8502
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-emerald-100 text-emerald-600", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconCode, { size: 16 }) }),
8503
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
8504
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "text-sm font-medium text-zinc-900", children: "Create an index" }),
8505
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-zinc-500", children: "Define a search index specifying which fields to search on." })
8506
+ ] })
8507
+ ] }),
8508
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start gap-3", children: [
8509
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-emerald-100 text-emerald-600", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconSearch, { size: 16 }) }),
8510
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
8511
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "text-sm font-medium text-zinc-900", children: "Search your data" }),
8512
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-zinc-500", children: "Query with filters, full-text search, and sorted results." })
8490
8513
  ] })
8491
8514
  ] })
8492
- ] }),
8493
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8494
- "a",
8495
- {
8496
- href: "https://upstash-search.mintlify.app/redis/search/introduction",
8497
- target: "_blank",
8498
- rel: "noopener noreferrer",
8499
- className: "mt-5 inline-block text-sm text-emerald-600 underline-offset-2 hover:underline",
8500
- children: "Learn more \u2192"
8501
- }
8502
- )
8515
+ ] })
8503
8516
  ] }),
8504
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-72 flex-col items-center justify-center rounded-lg border border-dashed border-zinc-300 bg-white p-6", children: [
8505
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-zinc-100 text-zinc-500", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconDownload, { size: 24 }) }),
8506
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-1 text-sm font-medium text-zinc-900", children: "Get started quickly" }),
8507
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-4 text-center text-xs text-zinc-500", children: "Import a sample dataset to try out Redis Search" }),
8508
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8509
- "button",
8510
- {
8511
- onClick: () => setImportModalOpen(true),
8512
- className: "rounded-lg bg-zinc-900 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-zinc-800",
8513
- children: "Import a sample dataset"
8514
- }
8515
- )
8516
- ] })
8517
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8518
+ "a",
8519
+ {
8520
+ href: "https://upstash-search.mintlify.app/redis/search/introduction",
8521
+ target: "_blank",
8522
+ rel: "noopener noreferrer",
8523
+ className: "mt-5 inline-block text-sm text-emerald-600 underline-offset-2 hover:underline",
8524
+ children: "Learn more \u2192"
8525
+ }
8526
+ )
8517
8527
  ] }),
8518
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ImportSampleDatasetModal, { open: importModalOpen, onOpenChange: setImportModalOpen })
8528
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-72 flex-col items-center justify-center rounded-lg border bg-gradient-to-b from-zinc-50 to-white p-6 shadow-sm", children: [
8529
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-emerald-100 text-emerald-600", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconSparkles, { size: 24 }) }),
8530
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-1 text-sm font-medium text-zinc-900", children: "Try it out" }),
8531
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-4 text-center text-xs text-zinc-500", children: "Load a sample dataset to explore Redis Search" }),
8532
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8533
+ "button",
8534
+ {
8535
+ onClick: () => setImportModalOpen(true),
8536
+ className: "rounded-lg bg-emerald-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-emerald-700",
8537
+ children: "Load sample data"
8538
+ }
8539
+ )
8540
+ ] })
8519
8541
  ] });
8520
8542
  };
8521
8543
 
@@ -8648,7 +8670,7 @@ var KeysList = () => {
8648
8670
  lastClickedIndexRef
8649
8671
  }
8650
8672
  ),
8651
- i !== keys.length - 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "-z-10 mx-[13px] h-px bg-zinc-200 dark:bg-zinc-200" })
8673
+ i !== keys.length - 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "-z-10 mx-[13px] h-px bg-zinc-200 dark:bg-zinc-300" })
8652
8674
  ] }, data[0]))
8653
8675
  ] }) });
8654
8676
  };
@@ -8730,7 +8752,7 @@ function Sidebar() {
8730
8752
  {
8731
8753
  query,
8732
8754
  disableRoundedInherit: true,
8733
- className: "min-h-0 rounded-xl bg-zinc-100 px-2 py-5 pr-4",
8755
+ className: "min-h-0 rounded-xl bg-zinc-100 px-2 py-5 pr-4 dark:bg-zinc-200",
8734
8756
  scrollBarClassName: "py-5",
8735
8757
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, KeysList, {})
8736
8758
  }
@@ -10102,7 +10124,8 @@ var InnerGroup = ({
10102
10124
  "button",
10103
10125
  {
10104
10126
  type: "button",
10105
- className: "flex h-[26px] w-[26px] items-center justify-center rounded-md border border-zinc-300 text-zinc-500 transition-colors hover:text-zinc-700",
10127
+ disabled: fieldInfos.length === 0,
10128
+ className: "flex h-[26px] w-[26px] items-center justify-center rounded-md border border-zinc-300 text-zinc-500 transition-colors hover:text-zinc-700 disabled:cursor-not-allowed disabled:opacity-50",
10106
10129
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconPlus, { size: 16 })
10107
10130
  }
10108
10131
  ) }),
@@ -10554,12 +10577,7 @@ var QueryBuilderContent = () => {
10554
10577
  ] });
10555
10578
  };
10556
10579
  var SearchContent = () => {
10557
- const { valuesSearch, setValuesSearchIndex } = useTab();
10558
10580
  const { data: indexes, isLoading } = useFetchSearchIndexes();
10559
- _react.useEffect.call(void 0, () => {
10560
- if (!indexes || isLoading) return;
10561
- if (valuesSearch.index && !indexes.includes(valuesSearch.index)) setValuesSearchIndex("");
10562
- }, [indexes, valuesSearch.index, isLoading, setValuesSearchIndex]);
10563
10581
  if (isLoading) {
10564
10582
  return null;
10565
10583
  }