@upstash/react-redis-browser 0.2.16 → 0.2.17

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
@@ -1223,6 +1223,9 @@
1223
1223
  .ups-db .max-w-32 {
1224
1224
  max-width: 8rem;
1225
1225
  }
1226
+ .ups-db .max-w-\[240px\] {
1227
+ max-width: 240px;
1228
+ }
1226
1229
  .ups-db .max-w-\[370px\] {
1227
1230
  max-width: 370px;
1228
1231
  }
@@ -1469,6 +1472,9 @@
1469
1472
  .ups-db .break-words {
1470
1473
  overflow-wrap: break-word;
1471
1474
  }
1475
+ .ups-db .break-all {
1476
+ word-break: break-all;
1477
+ }
1472
1478
  .ups-db .rounded {
1473
1479
  border-radius: 0.25rem;
1474
1480
  }
package/dist/index.js CHANGED
@@ -2662,7 +2662,7 @@ function formatTime(seconds) {
2662
2662
  if (parts.length === 0) {
2663
2663
  parts.push("0s");
2664
2664
  }
2665
- return parts.slice(0, 1).join(" ");
2665
+ return parts.slice(0, 2).join(" ");
2666
2666
  }
2667
2667
  var isTest = typeof window !== "undefined" && window.__PLAYWRIGHT__ === true;
2668
2668
  var jsonToJsLiteral = (json) => {
@@ -4183,8 +4183,11 @@ function parseFieldBuilder(str, fieldName) {
4183
4183
  const typeMatch = str.match(/s\.number\(\s*["']?(U64|I64|F64)?["']?\s*\)/);
4184
4184
  const numType = _optionalChain([typeMatch, 'optionalAccess', _35 => _35[1]]) || "F64";
4185
4185
  const fromValue = extractFromValue(str);
4186
- if (fromValue === void 0) return numType;
4187
- return { type: numType, from: fromValue };
4186
+ return {
4187
+ type: numType,
4188
+ fast: true,
4189
+ ...fromValue !== void 0 && { from: fromValue }
4190
+ };
4188
4191
  }
4189
4192
  if (str.startsWith("s.boolean()")) {
4190
4193
  const fast = str.includes(".fast()");
@@ -5396,7 +5399,7 @@ function DeleteKeyModal({
5396
5399
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogContent, { children: [
5397
5400
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogHeader, { children: [
5398
5401
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: isPlural ? `Delete ${count2} ${itemsLabel}` : `Delete ${itemLabel}` }),
5399
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogDescription, { className: "mt-5", children: [
5402
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogDescription, { className: "mt-5 break-all", children: [
5400
5403
  "Are you sure you want to delete",
5401
5404
  " ",
5402
5405
  name ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
@@ -5441,6 +5444,7 @@ function DeleteKeyModal({
5441
5444
  setIsPending(true);
5442
5445
  try {
5443
5446
  await onDeleteConfirm(e, { reindex });
5447
+ _optionalChain([setIsOpen, 'optionalCall', _44 => _44(false)]);
5444
5448
  } finally {
5445
5449
  setIsPending(false);
5446
5450
  }
@@ -5542,7 +5546,7 @@ function KeyActions({
5542
5546
  name: dataKey,
5543
5547
  showReindex: isValuesSearchSelected && type !== "search",
5544
5548
  onDeleteConfirm: async (_e, options) => {
5545
- await deleteKey({ keys: [dataKey], reindex: _optionalChain([options, 'optionalAccess', _44 => _44.reindex]) });
5549
+ await deleteKey({ keys: [dataKey], reindex: _optionalChain([options, 'optionalAccess', _45 => _45.reindex]) });
5546
5550
  },
5547
5551
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5548
5552
  DropdownMenuItem,
@@ -5574,7 +5578,7 @@ var DisplayHeader = ({
5574
5578
  };
5575
5579
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rounded-lg", children: [
5576
5580
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-[26px] items-center justify-between gap-4", children: [
5577
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "grow truncate text-sm", children: dataKey.trim() === "" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "ml-1 text-zinc-500", children: "(Empty Key)" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium text-zinc-950", children: dataKey }) }),
5581
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "min-w-0 grow truncate text-sm", children: dataKey.trim() === "" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "ml-1 text-zinc-500", children: "(Empty Key)" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium text-zinc-950", children: dataKey }) }),
5578
5582
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-1", children: [
5579
5583
  type !== "string" && type !== "json" && type !== "search" && !showItemActions && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SimpleTooltip, { content: "Add item", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { onClick: handleAddItem, size: "icon-sm", "aria-label": "Add item", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconPlus, { className: "size-4 text-zinc-500 dark:text-zinc-600" }) }) }),
5580
5584
  showItemActions ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItemActions, { dataKey, type }) : selectedListItem ? void 0 : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, KeyActions, { dataKey, content, type })
@@ -5775,13 +5779,13 @@ var MonacoEditorWithTypes = ({
5775
5779
  const theme = useTheme();
5776
5780
  _react.useEffect.call(void 0, () => {
5777
5781
  if (!monaco) return;
5778
- _optionalChain([extraLibRef, 'access', _45 => _45.current, 'optionalAccess', _46 => _46.dispose, 'call', _47 => _47()]);
5782
+ _optionalChain([extraLibRef, 'access', _46 => _46.current, 'optionalAccess', _47 => _47.dispose, 'call', _48 => _48()]);
5779
5783
  extraLibRef.current = monaco.languages.typescript.typescriptDefaults.addExtraLib(
5780
5784
  typeDefinitions,
5781
5785
  `file:///${filePath.replace(".ts", "-types.d.ts")}`
5782
5786
  );
5783
5787
  requestAnimationFrame(() => {
5784
- const model = _optionalChain([editorRef, 'access', _48 => _48.current, 'optionalAccess', _49 => _49.getModel, 'optionalCall', _50 => _50()]);
5788
+ const model = _optionalChain([editorRef, 'access', _49 => _49.current, 'optionalAccess', _50 => _50.getModel, 'optionalCall', _51 => _51()]);
5785
5789
  if (model) {
5786
5790
  const currentValue = model.getValue();
5787
5791
  model.setValue(currentValue);
@@ -5790,10 +5794,10 @@ var MonacoEditorWithTypes = ({
5790
5794
  }, [monaco, typeDefinitions, filePath]);
5791
5795
  _react.useEffect.call(void 0, () => {
5792
5796
  return () => {
5793
- _optionalChain([extraLibRef, 'access', _51 => _51.current, 'optionalAccess', _52 => _52.dispose, 'call', _53 => _53()]);
5797
+ _optionalChain([extraLibRef, 'access', _52 => _52.current, 'optionalAccess', _53 => _53.dispose, 'call', _54 => _54()]);
5794
5798
  if (monaco) {
5795
5799
  const model = monaco.editor.getModel(monaco.Uri.parse(filePath));
5796
- _optionalChain([model, 'optionalAccess', _54 => _54.dispose, 'call', _55 => _55()]);
5800
+ _optionalChain([model, 'optionalAccess', _55 => _55.dispose, 'call', _56 => _56()]);
5797
5801
  }
5798
5802
  };
5799
5803
  }, [monaco, filePath]);
@@ -5803,7 +5807,7 @@ var MonacoEditorWithTypes = ({
5803
5807
  } else if (newValue.trim() === "") {
5804
5808
  onChange(defaultValue);
5805
5809
  } else {
5806
- _optionalChain([editorRef, 'access', _56 => _56.current, 'optionalAccess', _57 => _57.setValue, 'optionalCall', _58 => _58(valueRef.current)]);
5810
+ _optionalChain([editorRef, 'access', _57 => _57.current, 'optionalAccess', _58 => _58.setValue, 'optionalCall', _59 => _59(valueRef.current)]);
5807
5811
  }
5808
5812
  };
5809
5813
  _react.useEffect.call(void 0, () => {
@@ -6294,7 +6298,7 @@ var SearchDisplay = ({
6294
6298
  indexName: _nullishCoalesce(indexName, () => ( "")),
6295
6299
  editorValue: data.schema ? schemaToEditorValue(data.schema) : SCHEMA_DEFAULT,
6296
6300
  dataType: data.dataType || "string",
6297
- prefixes: _optionalChain([data, 'access', _59 => _59.prefixes, 'optionalAccess', _60 => _60.join, 'call', _61 => _61(", ")]) || "",
6301
+ prefixes: _optionalChain([data, 'access', _60 => _60.prefixes, 'optionalAccess', _61 => _61.join, 'call', _62 => _62(", ")]) || "",
6298
6302
  language: data.language || "english"
6299
6303
  });
6300
6304
  }, [data, reset, indexName]);
@@ -6667,7 +6671,7 @@ var ItemContextMenu = ({
6667
6671
  editItem({
6668
6672
  type,
6669
6673
  dataKey,
6670
- itemKey: _optionalChain([data, 'optionalAccess', _62 => _62.key]),
6674
+ itemKey: _optionalChain([data, 'optionalAccess', _63 => _63.key]),
6671
6675
  // For deletion
6672
6676
  newKey: void 0
6673
6677
  });
@@ -6702,7 +6706,7 @@ var ItemContextMenu = ({
6702
6706
  {
6703
6707
  onClick: () => {
6704
6708
  if (!data) return;
6705
- navigator.clipboard.writeText(_optionalChain([data, 'optionalAccess', _63 => _63.key]));
6709
+ navigator.clipboard.writeText(_optionalChain([data, 'optionalAccess', _64 => _64.key]));
6706
6710
  toast({
6707
6711
  description: "Key copied to clipboard"
6708
6712
  });
@@ -6714,11 +6718,11 @@ var ItemContextMenu = ({
6714
6718
  ]
6715
6719
  }
6716
6720
  ),
6717
- _optionalChain([data, 'optionalAccess', _64 => _64.value]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
6721
+ _optionalChain([data, 'optionalAccess', _65 => _65.value]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
6718
6722
  ContextMenuItem,
6719
6723
  {
6720
6724
  onClick: () => {
6721
- navigator.clipboard.writeText(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _65 => _65.value]), () => ( "")));
6725
+ navigator.clipboard.writeText(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _66 => _66.value]), () => ( "")));
6722
6726
  toast({
6723
6727
  description: "Value copied to clipboard"
6724
6728
  });
@@ -6830,7 +6834,7 @@ var useSetHashTTL = () => {
6830
6834
  var HashFieldTTLBadge = ({ dataKey, field }) => {
6831
6835
  const { data } = useFetchHashFieldExpires({ dataKey, fields: [field] });
6832
6836
  const { mutate: setTTL, isPending } = useSetHashTTL();
6833
- const expireAt = _optionalChain([data, 'optionalAccess', _66 => _66[field]]);
6837
+ const expireAt = _optionalChain([data, 'optionalAccess', _67 => _67[field]]);
6834
6838
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6835
6839
  TTLBadge,
6836
6840
  {
@@ -6927,7 +6931,7 @@ var MonacoEditor = ({
6927
6931
  if (!active || !monaco || !editorRef.current) {
6928
6932
  return;
6929
6933
  }
6930
- _optionalChain([monaco, 'optionalAccess', _67 => _67.editor, 'access', _68 => _68.setModelLanguage, 'call', _69 => _69(editorRef.current.getModel(), language)]);
6934
+ _optionalChain([monaco, 'optionalAccess', _68 => _68.editor, 'access', _69 => _69.setModelLanguage, 'call', _70 => _70(editorRef.current.getModel(), language)]);
6931
6935
  }, [monaco, language, active]);
6932
6936
  const editor = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6933
6937
  _react2.Editor,
@@ -7103,7 +7107,7 @@ var ListEditForm = ({
7103
7107
  dataKey
7104
7108
  });
7105
7109
  const findValue = () => {
7106
- for (const page of _nullishCoalesce(_optionalChain([query, 'access', _70 => _70.data, 'optionalAccess', _71 => _71.pages]), () => ( []))) {
7110
+ for (const page of _nullishCoalesce(_optionalChain([query, 'access', _71 => _71.data, 'optionalAccess', _72 => _72.pages]), () => ( []))) {
7107
7111
  const item = page.keys.find((item2) => item2.key === itemKey);
7108
7112
  if (item && "value" in item) return item.value;
7109
7113
  }
@@ -7257,7 +7261,7 @@ var HashFieldTTLInfo = ({
7257
7261
  fields
7258
7262
  }) => {
7259
7263
  const { data } = useFetchHashFieldExpires({ dataKey, fields });
7260
- const expireAt = _optionalChain([data, 'optionalAccess', _72 => _72[field]]);
7264
+ const expireAt = _optionalChain([data, 'optionalAccess', _73 => _73[field]]);
7261
7265
  const [ttl, setTTL] = _react.useState.call(void 0, () => calculateTTL(expireAt));
7262
7266
  _react.useEffect.call(void 0, () => {
7263
7267
  setTTL(calculateTTL(expireAt));
@@ -7282,7 +7286,7 @@ var headerLabels = {
7282
7286
  var ListDisplay = ({ dataKey, type }) => {
7283
7287
  const { selectedListItem } = useTab();
7284
7288
  const query = useFetchListItems({ dataKey, type });
7285
- const isEmpty = query.isFetched && _optionalChain([query, 'access', _73 => _73.data, 'optionalAccess', _74 => _74.pages, 'access', _75 => _75.every, 'call', _76 => _76((page) => page.keys.length === 0)]);
7289
+ const isEmpty = query.isFetched && _optionalChain([query, 'access', _74 => _74.data, 'optionalAccess', _75 => _75.pages, 'access', _76 => _76.every, 'call', _77 => _77((page) => page.keys.length === 0)]);
7286
7290
  if (isEmpty) {
7287
7291
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, KeyDeleted, {});
7288
7292
  }
@@ -7298,7 +7302,7 @@ var ListItems = ({
7298
7302
  dataKey
7299
7303
  }) => {
7300
7304
  const { setSelectedListItem } = useTab();
7301
- const keys = _react.useMemo.call(void 0, () => _nullishCoalesce(_optionalChain([query, 'access', _77 => _77.data, 'optionalAccess', _78 => _78.pages, 'access', _79 => _79.flatMap, 'call', _80 => _80((page) => page.keys)]), () => ( [])), [query.data]);
7305
+ const keys = _react.useMemo.call(void 0, () => _nullishCoalesce(_optionalChain([query, 'access', _78 => _78.data, 'optionalAccess', _79 => _79.pages, 'access', _80 => _80.flatMap, 'call', _81 => _81((page) => page.keys)]), () => ( [])), [query.data]);
7302
7306
  const fields = _react.useMemo.call(void 0, () => keys.map((key) => key.key), [keys]);
7303
7307
  const { mutate: editItem } = useEditListItem();
7304
7308
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: keys.map(({ key, value }, i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -7471,7 +7475,7 @@ function AddKeyModal() {
7471
7475
  setSelectedKey(key);
7472
7476
  setOpen(false);
7473
7477
  setTimeout(() => {
7474
- _optionalChain([window, 'access', _81 => _81.document, 'access', _82 => _82.querySelector, 'call', _83 => _83(`[data-key="${key}"]`), 'optionalAccess', _84 => _84.scrollIntoView, 'call', _85 => _85({
7478
+ _optionalChain([window, 'access', _82 => _82.document, 'access', _83 => _83.querySelector, 'call', _84 => _84(`[data-key="${key}"]`), 'optionalAccess', _85 => _85.scrollIntoView, 'call', _86 => _86({
7475
7479
  behavior: "smooth",
7476
7480
  block: "start",
7477
7481
  inline: "nearest"
@@ -7527,7 +7531,7 @@ function AddKeyModal() {
7527
7531
  }
7528
7532
  )
7529
7533
  ] }),
7530
- formState.errors.key && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-3 mt-2 text-xs text-red-500", children: _optionalChain([formState, 'access', _86 => _86.errors, 'access', _87 => _87.key, 'optionalAccess', _88 => _88.message]) }),
7534
+ formState.errors.key && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-3 mt-2 text-xs text-red-500", children: _optionalChain([formState, 'access', _87 => _87.errors, 'access', _88 => _88.key, 'optionalAccess', _89 => _89.message]) }),
7531
7535
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mt-2 text-xs text-zinc-500", children: "After creating the key, you can edit the value" }),
7532
7536
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-6 flex justify-end gap-2", children: [
7533
7537
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -8567,7 +8571,7 @@ var QueryWizardPopover = ({ onClose }) => {
8567
8571
  const fetchSampleKeys = _reactquery.useMutation.call(void 0, {
8568
8572
  mutationFn: async (index) => {
8569
8573
  const firstTenKeys = await scanKeys(redis, {
8570
- match: `${_optionalChain([index, 'access', _89 => _89.prefixes, 'optionalAccess', _90 => _90[0]])}*`,
8574
+ match: `${_optionalChain([index, 'access', _90 => _90.prefixes, 'optionalAccess', _91 => _91[0]])}*`,
8571
8575
  type: index.dataType,
8572
8576
  limit: 10
8573
8577
  });
@@ -8597,7 +8601,7 @@ var QueryWizardPopover = ({ onClose }) => {
8597
8601
  if (!input.trim() || !valuesSearch.index) return;
8598
8602
  try {
8599
8603
  let samples = sampleData;
8600
- if (samples.length === 0 && _optionalChain([indexData, 'optionalAccess', _91 => _91.prefixes, 'optionalAccess', _92 => _92[0]])) {
8604
+ if (samples.length === 0 && _optionalChain([indexData, 'optionalAccess', _92 => _92.prefixes, 'optionalAccess', _93 => _93[0]])) {
8601
8605
  samples = await fetchSampleKeys.mutateAsync(indexData);
8602
8606
  }
8603
8607
  const result = await generateQuery.mutateAsync({
@@ -8608,7 +8612,7 @@ var QueryWizardPopover = ({ onClose }) => {
8608
8612
  const queryString = toJsLiteral(result.query);
8609
8613
  setValuesSearchQuery(queryString);
8610
8614
  setQueryBuilderMode("code");
8611
- _optionalChain([onClose, 'optionalCall', _93 => _93()]);
8615
+ _optionalChain([onClose, 'optionalCall', _94 => _94()]);
8612
8616
  } catch (error) {
8613
8617
  console.error("Error generating query:", error);
8614
8618
  }
@@ -8713,7 +8717,7 @@ var CreateIndexModal = ({
8713
8717
  className: "max-w-2xl",
8714
8718
  onEscapeKeyDown: (e) => {
8715
8719
  const active = document.activeElement;
8716
- if (_optionalChain([active, 'optionalAccess', _94 => _94.closest, 'call', _95 => _95(".monaco-editor")]) || _optionalChain([active, 'optionalAccess', _96 => _96.tagName]) === "TEXTAREA") {
8720
+ if (_optionalChain([active, 'optionalAccess', _95 => _95.closest, 'call', _96 => _96(".monaco-editor")]) || _optionalChain([active, 'optionalAccess', _97 => _97.tagName]) === "TEXTAREA") {
8717
8721
  e.preventDefault();
8718
8722
  }
8719
8723
  },
@@ -8748,7 +8752,7 @@ var EditIndexModal = ({
8748
8752
  className: "min-h-[500px] max-w-2xl",
8749
8753
  onEscapeKeyDown: (e) => {
8750
8754
  const active = document.activeElement;
8751
- if (_optionalChain([active, 'optionalAccess', _97 => _97.closest, 'call', _98 => _98(".monaco-editor")]) || _optionalChain([active, 'optionalAccess', _99 => _99.tagName]) === "TEXTAREA") {
8755
+ if (_optionalChain([active, 'optionalAccess', _98 => _98.closest, 'call', _99 => _99(".monaco-editor")]) || _optionalChain([active, 'optionalAccess', _100 => _100.tagName]) === "TEXTAREA") {
8752
8756
  e.preventDefault();
8753
8757
  }
8754
8758
  },
@@ -8862,7 +8866,7 @@ var SearchInput = () => {
8862
8866
  } else if (e.key === "Escape") {
8863
8867
  setState("");
8864
8868
  setFocusedIndex(-1);
8865
- _optionalChain([inputRef, 'access', _100 => _100.current, 'optionalAccess', _101 => _101.blur, 'call', _102 => _102()]);
8869
+ _optionalChain([inputRef, 'access', _101 => _101.current, 'optionalAccess', _102 => _102.blur, 'call', _103 => _103()]);
8866
8870
  } else if (e.key === "ArrowDown" || e.key === "Tab" && !e.shiftKey) {
8867
8871
  e.preventDefault();
8868
8872
  if (focusedIndex < filteredHistory.length - 1) {
@@ -8876,7 +8880,7 @@ var SearchInput = () => {
8876
8880
  setFocusedIndex(focusedIndex - 1);
8877
8881
  } else if (filteredHistory.length > 0 && focusedIndex === 0) {
8878
8882
  setFocusedIndex(-1);
8879
- _optionalChain([inputRef, 'access', _103 => _103.current, 'optionalAccess', _104 => _104.focus, 'call', _105 => _105()]);
8883
+ _optionalChain([inputRef, 'access', _104 => _104.current, 'optionalAccess', _105 => _105.focus, 'call', _106 => _106()]);
8880
8884
  } else if (filteredHistory.length > 0) {
8881
8885
  setFocusedIndex(filteredHistory.length - 1);
8882
8886
  }
@@ -9060,8 +9064,8 @@ var IndexSelector = () => {
9060
9064
  },
9061
9065
  modal: false,
9062
9066
  children: [
9063
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { className: "flex min-w-[140px] items-center justify-between gap-2 rounded-r-lg border border-zinc-300 bg-emerald-50 px-3 py-[5px] text-sm font-medium text-emerald-800 transition-colors hover:bg-emerald-100", children: [
9064
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate", children: index || "Select an index" }),
9067
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { className: "flex min-w-[140px] max-w-[240px] items-center justify-between gap-2 rounded-r-lg border border-zinc-300 bg-emerald-50 px-3 py-[5px] text-sm font-medium text-emerald-800 transition-colors hover:bg-emerald-100", children: [
9068
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 truncate", children: index || "Select an index" }),
9065
9069
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconChevronDown, { className: "size-4 shrink-0 opacity-50" })
9066
9070
  ] }) }),
9067
9071
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverContent, { className: "p-2", align: "center", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
@@ -9081,8 +9085,8 @@ var IndexSelector = () => {
9081
9085
  ] }),
9082
9086
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "max-h-[200px] overflow-y-auto", children: [
9083
9087
  isLoading && !indexes && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconLoader2, { className: "size-4 animate-spin text-zinc-400" }) }),
9084
- !isLoading && _optionalChain([indexes, 'optionalAccess', _106 => _106.length]) === 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "py-4 text-center text-sm text-zinc-500", children: "No indexes found" }),
9085
- _optionalChain([indexes, 'optionalAccess', _107 => _107.map, 'call', _108 => _108((idx) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
9088
+ !isLoading && _optionalChain([indexes, 'optionalAccess', _107 => _107.length]) === 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "py-4 text-center text-sm text-zinc-500", children: "No indexes found" }),
9089
+ _optionalChain([indexes, 'optionalAccess', _108 => _108.map, 'call', _109 => _109((idx) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
9086
9090
  "div",
9087
9091
  {
9088
9092
  className: "flex h-9 items-center rounded-md px-2 transition-colors hover:bg-zinc-100 dark:hover:bg-zinc-200",
@@ -9094,13 +9098,13 @@ var IndexSelector = () => {
9094
9098
  setValuesSearchIndex(idx);
9095
9099
  setOpen(false);
9096
9100
  },
9097
- className: "flex flex-1 items-center gap-2 text-left text-sm",
9101
+ className: "flex min-w-0 flex-1 items-center gap-2 text-left text-sm",
9098
9102
  children: [
9099
9103
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
9100
9104
  "span",
9101
9105
  {
9102
9106
  className: cn(
9103
- "flex size-5 items-center justify-center",
9107
+ "flex size-5 shrink-0 items-center justify-center",
9104
9108
  idx === index ? "text-emerald-600" : "text-transparent"
9105
9109
  ),
9106
9110
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconCircleCheck, { className: "size-5" })
@@ -9250,7 +9254,7 @@ var generateNestedInterface = (obj, indent = " ") => {
9250
9254
  var toAmbientTypes = (types) => types.replaceAll(/export const (\w+) = (\[.*?]) as const;/g, "declare const $1: readonly $2;").replaceAll("export ", "");
9251
9255
  var generateTypeDefinitions = (schema) => {
9252
9256
  let schemaFieldsInterface = "";
9253
- const schemaFields = _optionalChain([schema, 'optionalAccess', _109 => _109.schema]);
9257
+ const schemaFields = _optionalChain([schema, 'optionalAccess', _110 => _110.schema]);
9254
9258
  if (schemaFields && Object.keys(schemaFields).length > 0) {
9255
9259
  const nested = buildNestedSchema(schemaFields);
9256
9260
  const fieldLines = generateNestedInterface(nested);
@@ -9708,7 +9712,7 @@ var SidebarContextMenu = ({ children }) => {
9708
9712
  showReindex: isValuesSearchSelected,
9709
9713
  onDeleteConfirm: async (e, options) => {
9710
9714
  e.stopPropagation();
9711
- await deleteKey({ keys: contextKeys, reindex: _optionalChain([options, 'optionalAccess', _110 => _110.reindex]) });
9715
+ await deleteKey({ keys: contextKeys, reindex: _optionalChain([options, 'optionalAccess', _111 => _111.reindex]) });
9712
9716
  setAlertOpen(false);
9713
9717
  }
9714
9718
  }
@@ -10604,7 +10608,7 @@ var QueryCondition = ({
10604
10608
  setLocalValue(formattedConditionValue);
10605
10609
  }
10606
10610
  const currentFieldInfo = fieldInfos.find((f) => f.name === condition.field);
10607
- const currentFieldType = _nullishCoalesce(_optionalChain([currentFieldInfo, 'optionalAccess', _111 => _111.type]), () => ( "unknown"));
10611
+ const currentFieldType = _nullishCoalesce(_optionalChain([currentFieldInfo, 'optionalAccess', _112 => _112.type]), () => ( "unknown"));
10608
10612
  const isUnknownField = condition.field && !fieldNames.includes(condition.field);
10609
10613
  const getValueTypeError = () => {
10610
10614
  if (isUnknownField || currentFieldType === "unknown" || currentFieldType === "string") {
@@ -10662,8 +10666,8 @@ var QueryCondition = ({
10662
10666
  }
10663
10667
  }, [currentFieldType, condition.value]);
10664
10668
  const handleFieldChange = (value) => {
10665
- const newFieldInfo = _optionalChain([fieldInfos, 'optionalAccess', _112 => _112.find, 'call', _113 => _113((f) => f.name === value)]);
10666
- const newFieldType = _nullishCoalesce(_optionalChain([newFieldInfo, 'optionalAccess', _114 => _114.type]), () => ( "unknown"));
10669
+ const newFieldInfo = _optionalChain([fieldInfos, 'optionalAccess', _113 => _113.find, 'call', _114 => _114((f) => f.name === value)]);
10670
+ const newFieldType = _nullishCoalesce(_optionalChain([newFieldInfo, 'optionalAccess', _115 => _115.type]), () => ( "unknown"));
10667
10671
  const validOperators = getOperatorsForFieldType(newFieldType);
10668
10672
  const isOperatorValid = validOperators.includes(condition.operator);
10669
10673
  let newValue = condition.value;
@@ -10804,10 +10808,10 @@ var QueryCondition = ({
10804
10808
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
10805
10809
  "div",
10806
10810
  {
10807
- ref: _optionalChain([dragHandleProps, 'optionalAccess', _115 => _115.ref]),
10811
+ ref: _optionalChain([dragHandleProps, 'optionalAccess', _116 => _116.ref]),
10808
10812
  className: "flex cursor-grab items-center px-1 text-zinc-400 hover:text-zinc-600",
10809
- ..._optionalChain([dragHandleProps, 'optionalAccess', _116 => _116.attributes]),
10810
- ..._optionalChain([dragHandleProps, 'optionalAccess', _117 => _117.listeners]),
10813
+ ..._optionalChain([dragHandleProps, 'optionalAccess', _117 => _117.attributes]),
10814
+ ..._optionalChain([dragHandleProps, 'optionalAccess', _118 => _118.listeners]),
10811
10815
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconGripVertical, { size: 16 })
10812
10816
  }
10813
10817
  ),
@@ -11315,10 +11319,10 @@ var InnerGroup = ({
11315
11319
  !isRoot && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
11316
11320
  "div",
11317
11321
  {
11318
- ref: _optionalChain([dragHandleProps, 'optionalAccess', _118 => _118.ref]),
11322
+ ref: _optionalChain([dragHandleProps, 'optionalAccess', _119 => _119.ref]),
11319
11323
  className: "flex cursor-grab items-center px-1 text-zinc-400",
11320
- ..._optionalChain([dragHandleProps, 'optionalAccess', _119 => _119.attributes]),
11321
- ..._optionalChain([dragHandleProps, 'optionalAccess', _120 => _120.listeners]),
11324
+ ..._optionalChain([dragHandleProps, 'optionalAccess', _120 => _120.attributes]),
11325
+ ..._optionalChain([dragHandleProps, 'optionalAccess', _121 => _121.listeners]),
11322
11326
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconGripVertical, { size: 16 })
11323
11327
  }
11324
11328
  ),
@@ -11667,7 +11671,7 @@ var UIQueryBuilder = () => {
11667
11671
  const { valuesSearch } = useTab();
11668
11672
  const { data: indexDetails } = useFetchSearchIndex(valuesSearch.index);
11669
11673
  const { queryState, setQueryState } = useQueryStateSync();
11670
- const fieldInfos = _optionalChain([indexDetails, 'optionalAccess', _121 => _121.schema]) ? extractFieldInfo(indexDetails.schema) : [];
11674
+ const fieldInfos = _optionalChain([indexDetails, 'optionalAccess', _122 => _122.schema]) ? extractFieldInfo(indexDetails.schema) : [];
11671
11675
  const hasNormalized = _react.useRef.call(void 0, false);
11672
11676
  _react.useEffect.call(void 0, () => {
11673
11677
  if (hasNormalized.current || fieldInfos.length === 0) return;
@@ -11686,7 +11690,7 @@ var UIQueryBuilder = () => {
11686
11690
  setHasBottomShadow(scrollTop + clientHeight < scrollHeight - 1);
11687
11691
  }, []);
11688
11692
  _react.useEffect.call(void 0, () => {
11689
- viewportRef.current = _optionalChain([scrollAreaRef, 'access', _122 => _122.current, 'optionalAccess', _123 => _123.querySelector, 'call', _124 => _124(
11693
+ viewportRef.current = _optionalChain([scrollAreaRef, 'access', _123 => _123.current, 'optionalAccess', _124 => _124.querySelector, 'call', _125 => _125(
11690
11694
  "[data-radix-scroll-area-viewport]"
11691
11695
  )]);
11692
11696
  recomputeShadows();
@@ -12035,7 +12039,7 @@ var useOverflow = () => {
12035
12039
  }
12036
12040
  if (!node) return;
12037
12041
  observerRef.current = new ResizeObserver((entries) => {
12038
- const el = _optionalChain([entries, 'access', _125 => _125.at, 'call', _126 => _126(0), 'optionalAccess', _127 => _127.target]);
12042
+ const el = _optionalChain([entries, 'access', _126 => _126.at, 'call', _127 => _127(0), 'optionalAccess', _128 => _128.target]);
12039
12043
  if (!el) return;
12040
12044
  setIsOverflow(el.scrollWidth > el.clientWidth);
12041
12045
  });
@@ -12043,7 +12047,7 @@ var useOverflow = () => {
12043
12047
  }, []);
12044
12048
  _react.useEffect.call(void 0, () => {
12045
12049
  return () => {
12046
- _optionalChain([observerRef, 'access', _128 => _128.current, 'optionalAccess', _129 => _129.disconnect, 'call', _130 => _130()]);
12050
+ _optionalChain([observerRef, 'access', _129 => _129.current, 'optionalAccess', _130 => _130.disconnect, 'call', _131 => _131()]);
12047
12051
  };
12048
12052
  }, []);
12049
12053
  return { ref, isOverflow };
@@ -12161,8 +12165,8 @@ var SortableTab = ({ id }) => {
12161
12165
  const [originalWidth, setOriginalWidth] = _react.useState.call(void 0, null);
12162
12166
  const textRef = _react.useRef.call(void 0, null);
12163
12167
  const { tabs } = useDatabrowserStore();
12164
- const tabData = _optionalChain([tabs, 'access', _131 => _131.find, 'call', _132 => _132(([tabId]) => tabId === id), 'optionalAccess', _133 => _133[1]]);
12165
- const isPinned = _optionalChain([tabData, 'optionalAccess', _134 => _134.pinned]);
12168
+ const tabData = _optionalChain([tabs, 'access', _132 => _132.find, 'call', _133 => _133(([tabId]) => tabId === id), 'optionalAccess', _134 => _134[1]]);
12169
+ const isPinned = _optionalChain([tabData, 'optionalAccess', _135 => _135.pinned]);
12166
12170
  const { attributes, listeners: listeners2, setNodeRef, transform, transition, isDragging } = _sortable.useSortable.call(void 0, {
12167
12171
  id,
12168
12172
  disabled: isPinned,
@@ -12378,7 +12382,7 @@ function AddTabButton() {
12378
12382
  const tabsId = addTab();
12379
12383
  selectTab(tabsId);
12380
12384
  setTimeout(() => {
12381
- const tab = _optionalChain([rootRef, 'optionalAccess', _135 => _135.current, 'optionalAccess', _136 => _136.querySelector, 'call', _137 => _137(`#tab-${tabsId}`)]);
12385
+ const tab = _optionalChain([rootRef, 'optionalAccess', _136 => _136.current, 'optionalAccess', _137 => _137.querySelector, 'call', _138 => _138(`#tab-${tabsId}`)]);
12382
12386
  if (!tab) return;
12383
12387
  tab.scrollIntoView({ behavior: "smooth" });
12384
12388
  }, 20);
@@ -12412,7 +12416,7 @@ function TabsListButton({
12412
12416
  onSelectTab(id);
12413
12417
  setOpen(false);
12414
12418
  setTimeout(() => {
12415
- const tab = _optionalChain([rootRef, 'optionalAccess', _138 => _138.current, 'optionalAccess', _139 => _139.querySelector, 'call', _140 => _140(`#tab-${id}`)]);
12419
+ const tab = _optionalChain([rootRef, 'optionalAccess', _139 => _139.current, 'optionalAccess', _140 => _140.querySelector, 'call', _141 => _141(`#tab-${id}`)]);
12416
12420
  if (!tab) return;
12417
12421
  tab.scrollIntoView({ behavior: "smooth" });
12418
12422
  }, 20);
package/dist/index.mjs CHANGED
@@ -2662,7 +2662,7 @@ function formatTime(seconds) {
2662
2662
  if (parts.length === 0) {
2663
2663
  parts.push("0s");
2664
2664
  }
2665
- return parts.slice(0, 1).join(" ");
2665
+ return parts.slice(0, 2).join(" ");
2666
2666
  }
2667
2667
  var isTest = typeof window !== "undefined" && window.__PLAYWRIGHT__ === true;
2668
2668
  var jsonToJsLiteral = (json) => {
@@ -4183,8 +4183,11 @@ function parseFieldBuilder(str, fieldName) {
4183
4183
  const typeMatch = str.match(/s\.number\(\s*["']?(U64|I64|F64)?["']?\s*\)/);
4184
4184
  const numType = typeMatch?.[1] || "F64";
4185
4185
  const fromValue = extractFromValue(str);
4186
- if (fromValue === void 0) return numType;
4187
- return { type: numType, from: fromValue };
4186
+ return {
4187
+ type: numType,
4188
+ fast: true,
4189
+ ...fromValue !== void 0 && { from: fromValue }
4190
+ };
4188
4191
  }
4189
4192
  if (str.startsWith("s.boolean()")) {
4190
4193
  const fast = str.includes(".fast()");
@@ -5396,7 +5399,7 @@ function DeleteKeyModal({
5396
5399
  /* @__PURE__ */ jsxs12(DialogContent, { children: [
5397
5400
  /* @__PURE__ */ jsxs12(DialogHeader, { children: [
5398
5401
  /* @__PURE__ */ jsx26(DialogTitle, { children: isPlural ? `Delete ${count2} ${itemsLabel}` : `Delete ${itemLabel}` }),
5399
- /* @__PURE__ */ jsxs12(DialogDescription, { className: "mt-5", children: [
5402
+ /* @__PURE__ */ jsxs12(DialogDescription, { className: "mt-5 break-all", children: [
5400
5403
  "Are you sure you want to delete",
5401
5404
  " ",
5402
5405
  name ? /* @__PURE__ */ jsxs12(Fragment3, { children: [
@@ -5441,6 +5444,7 @@ function DeleteKeyModal({
5441
5444
  setIsPending(true);
5442
5445
  try {
5443
5446
  await onDeleteConfirm(e, { reindex });
5447
+ setIsOpen?.(false);
5444
5448
  } finally {
5445
5449
  setIsPending(false);
5446
5450
  }
@@ -5574,7 +5578,7 @@ var DisplayHeader = ({
5574
5578
  };
5575
5579
  return /* @__PURE__ */ jsxs15("div", { className: "rounded-lg", children: [
5576
5580
  /* @__PURE__ */ jsxs15("div", { className: "flex h-[26px] items-center justify-between gap-4", children: [
5577
- /* @__PURE__ */ jsx29("h2", { className: "grow truncate text-sm", children: dataKey.trim() === "" ? /* @__PURE__ */ jsx29("span", { className: "ml-1 text-zinc-500", children: "(Empty Key)" }) : /* @__PURE__ */ jsx29("span", { className: "font-medium text-zinc-950", children: dataKey }) }),
5581
+ /* @__PURE__ */ jsx29("h2", { className: "min-w-0 grow truncate text-sm", children: dataKey.trim() === "" ? /* @__PURE__ */ jsx29("span", { className: "ml-1 text-zinc-500", children: "(Empty Key)" }) : /* @__PURE__ */ jsx29("span", { className: "font-medium text-zinc-950", children: dataKey }) }),
5578
5582
  /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1", children: [
5579
5583
  type !== "string" && type !== "json" && type !== "search" && !showItemActions && /* @__PURE__ */ jsx29(SimpleTooltip, { content: "Add item", children: /* @__PURE__ */ jsx29(Button, { onClick: handleAddItem, size: "icon-sm", "aria-label": "Add item", children: /* @__PURE__ */ jsx29(IconPlus, { className: "size-4 text-zinc-500 dark:text-zinc-600" }) }) }),
5580
5584
  showItemActions ? /* @__PURE__ */ jsx29(ItemActions, { dataKey, type }) : selectedListItem ? void 0 : /* @__PURE__ */ jsx29(KeyActions, { dataKey, content, type })
@@ -9060,8 +9064,8 @@ var IndexSelector = () => {
9060
9064
  },
9061
9065
  modal: false,
9062
9066
  children: [
9063
- /* @__PURE__ */ jsx59(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs35("button", { className: "flex min-w-[140px] items-center justify-between gap-2 rounded-r-lg border border-zinc-300 bg-emerald-50 px-3 py-[5px] text-sm font-medium text-emerald-800 transition-colors hover:bg-emerald-100", children: [
9064
- /* @__PURE__ */ jsx59("span", { className: "truncate", children: index || "Select an index" }),
9067
+ /* @__PURE__ */ jsx59(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs35("button", { className: "flex min-w-[140px] max-w-[240px] items-center justify-between gap-2 rounded-r-lg border border-zinc-300 bg-emerald-50 px-3 py-[5px] text-sm font-medium text-emerald-800 transition-colors hover:bg-emerald-100", children: [
9068
+ /* @__PURE__ */ jsx59("span", { className: "min-w-0 truncate", children: index || "Select an index" }),
9065
9069
  /* @__PURE__ */ jsx59(IconChevronDown2, { className: "size-4 shrink-0 opacity-50" })
9066
9070
  ] }) }),
9067
9071
  /* @__PURE__ */ jsx59(PopoverContent, { className: "p-2", align: "center", children: /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-2", children: [
@@ -9094,13 +9098,13 @@ var IndexSelector = () => {
9094
9098
  setValuesSearchIndex(idx);
9095
9099
  setOpen(false);
9096
9100
  },
9097
- className: "flex flex-1 items-center gap-2 text-left text-sm",
9101
+ className: "flex min-w-0 flex-1 items-center gap-2 text-left text-sm",
9098
9102
  children: [
9099
9103
  /* @__PURE__ */ jsx59(
9100
9104
  "span",
9101
9105
  {
9102
9106
  className: cn(
9103
- "flex size-5 items-center justify-center",
9107
+ "flex size-5 shrink-0 items-center justify-center",
9104
9108
  idx === index ? "text-emerald-600" : "text-transparent"
9105
9109
  ),
9106
9110
  children: /* @__PURE__ */ jsx59(IconCircleCheck, { className: "size-5" })
package/package.json CHANGED
@@ -1 +1 @@
1
- { "name": "@upstash/react-redis-browser", "version": "0.2.16", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "MIT", "private": false, "publishConfig": { "access": "public" }, "repository": { "type": "git", "url": "git@github.com:upstash/react-redis-browser.git" }, "bugs": { "url": "https://github.com/upstash/react-redis-browser/issues" }, "homepage": "https://github.com/upstash/react-redis-browser", "files": [ "./dist/**" ], "scripts": { "build": "tsup", "dev": "vite", "lint": "tsc && eslint", "fmt": "prettier --write ./src", "test": "bun test src", "test:e2e": "playwright test", "prepare": "husky" }, "lint-staged": { "**/*.{js,ts,tsx}": [ "prettier --write", "eslint --fix" ] }, "dependencies": { "@dnd-kit/core": "^6.3.1", "@dnd-kit/modifiers": "^9.0.0", "@dnd-kit/sortable": "^10.0.0", "@dnd-kit/utilities": "^3.2.2", "@ianvs/prettier-plugin-sort-imports": "^4.7.1", "@monaco-editor/react": "^4.6.0", "@radix-ui/react-context-menu": "^2.2.16", "@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-dropdown-menu": "^2.1.16", "@radix-ui/react-label": "^2.1.8", "@radix-ui/react-popover": "^1.1.15", "@radix-ui/react-portal": "^1.1.10", "@radix-ui/react-progress": "^1.1.8", "@radix-ui/react-scroll-area": "^1.2.10", "@radix-ui/react-select": "^2.2.6", "@radix-ui/react-separator": "^1.1.8", "@radix-ui/react-slot": "^1.2.4", "@radix-ui/react-switch": "^1.2.6", "@radix-ui/react-toast": "^1.2.15", "@radix-ui/react-tooltip": "^1.2.8", "@tabler/icons-react": "^3.19.0", "@tanstack/react-query": "^5.32.0", "@types/bytes": "^3.1.4", "@upstash/redis": "1.37.0", "bytes": "^3.1.2", "cmdk": "^1.1.1", "react-hook-form": "^7.53.0", "react-resizable-panels": "^2.1.4", "zustand": "5.0.0" }, "devDependencies": { "@playwright/test": "^1.56.1", "@types/bun": "^1.3.7", "@types/node": "^22.8.4", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "@typescript-eslint/eslint-plugin": "8.4.0", "@typescript-eslint/parser": "8.4.0", "@vitejs/plugin-react": "^4.1.0", "autoprefixer": "^10.4.14", "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", "dotenv": "^16.5.0", "eslint": "9.10.0", "eslint-plugin-unicorn": "55.0.0", "husky": "^9.1.7", "lint-staged": "^16.2.7", "postcss": "^8.4.31", "postcss-prefix-selector": "^2.1.0", "prettier": "^3.0.3", "prettier-plugin-tailwindcss": "^0.5.5", "react": "^18.3.1", "react-dom": "^18.3.1", "tailwind-merge": "^2.5.4", "tailwindcss": "^3.4.14", "tailwindcss-animate": "^1.0.7", "tsup": "^8.3.5", "typescript": "^5.0.4", "vite": "^5.4.10", "vite-tsconfig-paths": "^5.0.1" }, "peerDependencies": { "react": "^18.2.0 || ^19", "react-dom": "^18.2.0 || ^19" } }
1
+ { "name": "@upstash/react-redis-browser", "version": "0.2.17", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "MIT", "private": false, "publishConfig": { "access": "public" }, "repository": { "type": "git", "url": "git@github.com:upstash/react-redis-browser.git" }, "bugs": { "url": "https://github.com/upstash/react-redis-browser/issues" }, "homepage": "https://github.com/upstash/react-redis-browser", "files": [ "./dist/**" ], "scripts": { "build": "tsup", "dev": "vite", "lint": "tsc && eslint", "fmt": "prettier --write ./src", "test": "bun test src", "test:e2e": "playwright test", "prepare": "husky" }, "lint-staged": { "**/*.{js,ts,tsx}": [ "prettier --write", "eslint --fix" ] }, "dependencies": { "@dnd-kit/core": "^6.3.1", "@dnd-kit/modifiers": "^9.0.0", "@dnd-kit/sortable": "^10.0.0", "@dnd-kit/utilities": "^3.2.2", "@ianvs/prettier-plugin-sort-imports": "^4.7.1", "@monaco-editor/react": "^4.6.0", "@radix-ui/react-context-menu": "^2.2.16", "@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-dropdown-menu": "^2.1.16", "@radix-ui/react-label": "^2.1.8", "@radix-ui/react-popover": "^1.1.15", "@radix-ui/react-portal": "^1.1.10", "@radix-ui/react-progress": "^1.1.8", "@radix-ui/react-scroll-area": "^1.2.10", "@radix-ui/react-select": "^2.2.6", "@radix-ui/react-separator": "^1.1.8", "@radix-ui/react-slot": "^1.2.4", "@radix-ui/react-switch": "^1.2.6", "@radix-ui/react-toast": "^1.2.15", "@radix-ui/react-tooltip": "^1.2.8", "@tabler/icons-react": "^3.19.0", "@tanstack/react-query": "^5.32.0", "@types/bytes": "^3.1.4", "@upstash/redis": "1.37.0", "bytes": "^3.1.2", "cmdk": "^1.1.1", "react-hook-form": "^7.53.0", "react-resizable-panels": "^2.1.4", "zustand": "5.0.0" }, "devDependencies": { "@playwright/test": "^1.56.1", "@types/bun": "^1.3.7", "@types/node": "^22.8.4", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "@typescript-eslint/eslint-plugin": "8.4.0", "@typescript-eslint/parser": "8.4.0", "@vitejs/plugin-react": "^4.1.0", "autoprefixer": "^10.4.14", "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", "dotenv": "^16.5.0", "eslint": "9.10.0", "eslint-plugin-unicorn": "55.0.0", "husky": "^9.1.7", "lint-staged": "^16.2.7", "postcss": "^8.4.31", "postcss-prefix-selector": "^2.1.0", "prettier": "^3.0.3", "prettier-plugin-tailwindcss": "^0.5.5", "react": "^18.3.1", "react-dom": "^18.3.1", "tailwind-merge": "^2.5.4", "tailwindcss": "^3.4.14", "tailwindcss-animate": "^1.0.7", "tsup": "^8.3.5", "typescript": "^5.0.4", "vite": "^5.4.10", "vite-tsconfig-paths": "^5.0.1" }, "peerDependencies": { "react": "^18.2.0 || ^19", "react-dom": "^18.2.0 || ^19" } }