@upstash/react-redis-browser 0.1.2-canary-3 → 0.1.2-canary-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4552,8 +4552,6 @@ var DisplayHeader = ({
4552
4552
  type,
4553
4553
  content
4554
4554
  }) => {
4555
- const size = _optionalChain([content, 'optionalAccess', _21 => _21.length]);
4556
- const length = _optionalChain([content, 'optionalAccess', _22 => _22.length]);
4557
4555
  const { setSelectedListItem } = useDatabrowserStore();
4558
4556
  const handleAddItem = () => {
4559
4557
  setSelectedListItem({ key: type === "stream" ? "*" : "", value: "", isNew: true });
@@ -4570,7 +4568,6 @@ var DisplayHeader = ({
4570
4568
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TypeTag, { variant: type, type: "badge" }),
4571
4569
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SizeBadge, { dataKey }),
4572
4570
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, LengthBadge, { dataKey, type, content }),
4573
- length && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { label: "Length:", children: size }),
4574
4571
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TTLBadge, { dataKey })
4575
4572
  ] })
4576
4573
  ] });
@@ -4685,7 +4682,7 @@ var CustomEditor = ({
4685
4682
  if (!monaco || !editorRef.current) {
4686
4683
  return;
4687
4684
  }
4688
- _optionalChain([monaco, 'optionalAccess', _23 => _23.editor, 'access', _24 => _24.setModelLanguage, 'call', _25 => _25(editorRef.current.getModel(), language)]);
4685
+ _optionalChain([monaco, 'optionalAccess', _21 => _21.editor, 'access', _22 => _22.setModelLanguage, 'call', _23 => _23(editorRef.current.getModel(), language)]);
4689
4686
  }, [monaco, language]);
4690
4687
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
4691
4688
  "div",
@@ -4935,7 +4932,7 @@ var ListItems = ({
4935
4932
  dataKey
4936
4933
  }) => {
4937
4934
  const { setSelectedListItem } = useDatabrowserStore();
4938
- const keys = _react.useMemo.call(void 0, () => _nullishCoalesce(_optionalChain([query, 'access', _26 => _26.data, 'optionalAccess', _27 => _27.pages, 'access', _28 => _28.flatMap, 'call', _29 => _29((page) => page.keys)]), () => ( [])), [query.data]);
4935
+ const keys = _react.useMemo.call(void 0, () => _nullishCoalesce(_optionalChain([query, 'access', _24 => _24.data, 'optionalAccess', _25 => _25.pages, 'access', _26 => _26.flatMap, 'call', _27 => _27((page) => page.keys)]), () => ( [])), [query.data]);
4939
4936
  const { mutate: editItem } = useEditListItem();
4940
4937
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: keys.map(({ key, value }, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4941
4938
  ItemContextMenu,
@@ -5185,7 +5182,7 @@ function AddKeyModal() {
5185
5182
  setSelectedKey(key);
5186
5183
  setOpen(false);
5187
5184
  setTimeout(() => {
5188
- _optionalChain([window, 'access', _30 => _30.document, 'access', _31 => _31.querySelector, 'call', _32 => _32(`[data-key="${key}"]`), 'optionalAccess', _33 => _33.scrollIntoView, 'call', _34 => _34({
5185
+ _optionalChain([window, 'access', _28 => _28.document, 'access', _29 => _29.querySelector, 'call', _30 => _30(`[data-key="${key}"]`), 'optionalAccess', _31 => _31.scrollIntoView, 'call', _32 => _32({
5189
5186
  behavior: "smooth",
5190
5187
  block: "start",
5191
5188
  inline: "nearest"
@@ -5235,7 +5232,7 @@ function AddKeyModal() {
5235
5232
  }
5236
5233
  )
5237
5234
  ] }),
5238
- formState.errors.key && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-3 mt-2 text-xs text-red-500", children: _optionalChain([formState, 'access', _35 => _35.errors, 'access', _36 => _36.key, 'optionalAccess', _37 => _37.message]) }),
5235
+ formState.errors.key && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-3 mt-2 text-xs text-red-500", children: _optionalChain([formState, 'access', _33 => _33.errors, 'access', _34 => _34.key, 'optionalAccess', _35 => _35.message]) }),
5239
5236
  /* @__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" }),
5240
5237
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-6 flex justify-end gap-2", children: [
5241
5238
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -5316,7 +5313,7 @@ var SidebarContextMenu = ({
5316
5313
 
5317
5314
  var KeysList = () => {
5318
5315
  const { keys } = useKeys();
5319
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "pr-3", children: keys.map((data, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, KeyItem, { nextKey: _nullishCoalesce(_optionalChain([keys, 'access', _38 => _38.at, 'call', _39 => _39(i + 1), 'optionalAccess', _40 => _40[0]]), () => ( "")), data }, data[0])) });
5316
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "pr-3", children: keys.map((data, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, KeyItem, { nextKey: _nullishCoalesce(_optionalChain([keys, 'access', _36 => _36.at, 'call', _37 => _37(i + 1), 'optionalAccess', _38 => _38[0]]), () => ( "")), data }, data[0])) });
5320
5317
  };
5321
5318
  var keyStyles = {
5322
5319
  string: "border-sky-400 !bg-sky-50 text-sky-900",
package/dist/index.mjs CHANGED
@@ -4552,8 +4552,6 @@ var DisplayHeader = ({
4552
4552
  type,
4553
4553
  content
4554
4554
  }) => {
4555
- const size = content?.length;
4556
- const length = content?.length;
4557
4555
  const { setSelectedListItem } = useDatabrowserStore();
4558
4556
  const handleAddItem = () => {
4559
4557
  setSelectedListItem({ key: type === "stream" ? "*" : "", value: "", isNew: true });
@@ -4570,7 +4568,6 @@ var DisplayHeader = ({
4570
4568
  /* @__PURE__ */ jsx23(TypeTag, { variant: type, type: "badge" }),
4571
4569
  /* @__PURE__ */ jsx23(SizeBadge, { dataKey }),
4572
4570
  /* @__PURE__ */ jsx23(LengthBadge, { dataKey, type, content }),
4573
- length && /* @__PURE__ */ jsx23(Badge, { label: "Length:", children: size }),
4574
4571
  /* @__PURE__ */ jsx23(TTLBadge, { dataKey })
4575
4572
  ] })
4576
4573
  ] });
package/package.json CHANGED
@@ -1 +1 @@
1
- { "name": "@upstash/react-redis-browser", "version": "v0.1.2-canary-3", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "MIT", "private": false, "publishConfig": { "access": "public" }, "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 ." }, "lint-staged": { "**/*.{js,ts,tsx}": [ "prettier --write", "eslint --fix" ] }, "dependencies": { "@ianvs/prettier-plugin-sort-imports": "^4.4.0", "@monaco-editor/react": "^4.6.0", "@radix-ui/react-alert-dialog": "^1.0.5", "@radix-ui/react-context-menu": "^2.2.2", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.1.2", "@radix-ui/react-icons": "1.3.0", "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-scroll-area": "^1.0.3", "@radix-ui/react-select": "^2.0.0", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-toast": "^1.1.5", "@radix-ui/react-tooltip": "^1.0.7", "@tabler/icons-react": "^3.19.0", "@tanstack/react-query": "^5.32.0", "@types/bytes": "^3.1.4", "@upstash/redis": "^1.31.6", "bytes": "^3.1.2", "react-hook-form": "^7.53.0", "react-resizable-panels": "^2.1.4", "zustand": "5.0.0" }, "devDependencies": { "postcss-prefix-selector": "^2.1.0", "@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", "eslint": "9.10.0", "eslint-plugin-unicorn": "55.0.0", "postcss": "^8.4.31", "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": "v0.1.2-canary-4", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "MIT", "private": false, "publishConfig": { "access": "public" }, "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 ." }, "lint-staged": { "**/*.{js,ts,tsx}": [ "prettier --write", "eslint --fix" ] }, "dependencies": { "@ianvs/prettier-plugin-sort-imports": "^4.4.0", "@monaco-editor/react": "^4.6.0", "@radix-ui/react-alert-dialog": "^1.0.5", "@radix-ui/react-context-menu": "^2.2.2", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.1.2", "@radix-ui/react-icons": "1.3.0", "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-scroll-area": "^1.0.3", "@radix-ui/react-select": "^2.0.0", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-toast": "^1.1.5", "@radix-ui/react-tooltip": "^1.0.7", "@tabler/icons-react": "^3.19.0", "@tanstack/react-query": "^5.32.0", "@types/bytes": "^3.1.4", "@upstash/redis": "^1.31.6", "bytes": "^3.1.2", "react-hook-form": "^7.53.0", "react-resizable-panels": "^2.1.4", "zustand": "5.0.0" }, "devDependencies": { "postcss-prefix-selector": "^2.1.0", "@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", "eslint": "9.10.0", "eslint-plugin-unicorn": "55.0.0", "postcss": "^8.4.31", "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" } }