@upstash/react-redis-browser 0.2.7-canary-4 → 0.2.8

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
@@ -2300,10 +2300,6 @@
2300
2300
  .ups-db .data-\[state\=open\]\:slide-in-from-top-full[data-state=open] {
2301
2301
  --tw-enter-translate-y: -100%;
2302
2302
  }
2303
- .ups-db .dark\:\!bg-\[\#192321\]:is(.dark *) {
2304
- --tw-bg-opacity: 1 !important;
2305
- background-color: rgb(25 35 33 / var(--tw-bg-opacity)) !important;
2306
- }
2307
2303
  @media (min-width: 640px) {
2308
2304
  .ups-db .sm\:\!mt-0 {
2309
2305
  margin-top: 0px !important;
package/dist/index.js CHANGED
@@ -5179,7 +5179,7 @@ var CustomEditor = ({
5179
5179
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
5180
5180
  "div",
5181
5181
  {
5182
- className: cn("group/editor relative", height === void 0 && "h-full p-2"),
5182
+ className: cn("group/editor relative", height === void 0 && "h-full"),
5183
5183
  style: { height },
5184
5184
  children: [
5185
5185
  isTest ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { "aria-label": "editor", value, onChange: (e) => onChange(e.target.value) }) : editor,
@@ -5306,24 +5306,15 @@ var ListEditForm = ({
5306
5306
  });
5307
5307
  setSelectedListItem(void 0);
5308
5308
  });
5309
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reacthookform.FormProvider, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit, className: "flex flex-col gap-2", children: [
5309
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reacthookform.FormProvider, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit, className: "flex h-full flex-col gap-2", children: [
5310
5310
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex grow flex-col gap-2", children: [
5311
- type !== "list" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5312
- FormItem,
5313
- {
5314
- readOnly: type === "stream",
5315
- name: "key",
5316
- height: type === "set" ? 250 : 100,
5317
- label: keyLabel,
5318
- data: itemKey
5319
- }
5320
- ),
5321
- type === "zset" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NumberFormItem, { name: "value", label: valueLabel }) : type !== "set" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5311
+ type === "zset" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NumberFormItem, { name: "value", label: valueLabel }),
5312
+ type !== "list" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormItem, { readOnly: type === "stream", name: "key", label: keyLabel, data: itemKey }),
5313
+ type !== "set" && type !== "zset" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5322
5314
  FormItem,
5323
5315
  {
5324
5316
  readOnly: type === "stream",
5325
5317
  name: "value",
5326
- height: type === "list" ? 250 : 100,
5327
5318
  label: valueLabel,
5328
5319
  data: _nullishCoalesce(itemValue, () => ( ""))
5329
5320
  }
@@ -5405,14 +5396,23 @@ var FormItem = ({
5405
5396
  readOnly,
5406
5397
  data
5407
5398
  });
5408
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-1", children: [
5399
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("flex flex-col gap-1", !height && "h-full"), children: [
5409
5400
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-1 text-xs", children: [
5410
5401
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium text-zinc-700", children: label }),
5411
5402
  " ",
5412
5403
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-zinc-300", children: "/" }),
5413
5404
  selector
5414
5405
  ] }),
5415
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-hidden rounded-md border border-zinc-300 bg-white p-2 shadow-sm", children: editor })
5406
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5407
+ "div",
5408
+ {
5409
+ className: cn(
5410
+ "overflow-hidden rounded-md border border-zinc-300 bg-white p-2 shadow-sm",
5411
+ !height && "h-full"
5412
+ ),
5413
+ children: editor
5414
+ }
5415
+ )
5416
5416
  ] });
5417
5417
  };
5418
5418
 
@@ -5566,7 +5566,7 @@ var EditorDisplayForm = ({
5566
5566
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
5567
5567
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex grow flex-col gap-1", children: [
5568
5568
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex shrink-0 items-center gap-2", children: type === "json" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}) : selector }),
5569
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "grow rounded-md border border-zinc-300 bg-white p-1 dark:!bg-[#192321]", children: editor })
5569
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "grow rounded-md border border-zinc-300 bg-white p-2", children: editor })
5570
5570
  ] }),
5571
5571
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex shrink-0 items-center gap-2", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "ml-auto flex gap-2", children: [
5572
5572
  form.formState.isDirty && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { onClick: handleCancel, children: "Cancel" }),
package/dist/index.mjs CHANGED
@@ -5179,7 +5179,7 @@ var CustomEditor = ({
5179
5179
  return /* @__PURE__ */ jsxs19(
5180
5180
  "div",
5181
5181
  {
5182
- className: cn("group/editor relative", height === void 0 && "h-full p-2"),
5182
+ className: cn("group/editor relative", height === void 0 && "h-full"),
5183
5183
  style: { height },
5184
5184
  children: [
5185
5185
  isTest ? /* @__PURE__ */ jsx32("input", { "aria-label": "editor", value, onChange: (e) => onChange(e.target.value) }) : editor,
@@ -5306,24 +5306,15 @@ var ListEditForm = ({
5306
5306
  });
5307
5307
  setSelectedListItem(void 0);
5308
5308
  });
5309
- return /* @__PURE__ */ jsx34(FormProvider, { ...form, children: /* @__PURE__ */ jsxs20("form", { onSubmit, className: "flex flex-col gap-2", children: [
5309
+ return /* @__PURE__ */ jsx34(FormProvider, { ...form, children: /* @__PURE__ */ jsxs20("form", { onSubmit, className: "flex h-full flex-col gap-2", children: [
5310
5310
  /* @__PURE__ */ jsxs20("div", { className: "flex grow flex-col gap-2", children: [
5311
- type !== "list" && /* @__PURE__ */ jsx34(
5312
- FormItem,
5313
- {
5314
- readOnly: type === "stream",
5315
- name: "key",
5316
- height: type === "set" ? 250 : 100,
5317
- label: keyLabel,
5318
- data: itemKey
5319
- }
5320
- ),
5321
- type === "zset" ? /* @__PURE__ */ jsx34(NumberFormItem, { name: "value", label: valueLabel }) : type !== "set" && /* @__PURE__ */ jsx34(
5311
+ type === "zset" && /* @__PURE__ */ jsx34(NumberFormItem, { name: "value", label: valueLabel }),
5312
+ type !== "list" && /* @__PURE__ */ jsx34(FormItem, { readOnly: type === "stream", name: "key", label: keyLabel, data: itemKey }),
5313
+ type !== "set" && type !== "zset" && /* @__PURE__ */ jsx34(
5322
5314
  FormItem,
5323
5315
  {
5324
5316
  readOnly: type === "stream",
5325
5317
  name: "value",
5326
- height: type === "list" ? 250 : 100,
5327
5318
  label: valueLabel,
5328
5319
  data: itemValue ?? ""
5329
5320
  }
@@ -5405,14 +5396,23 @@ var FormItem = ({
5405
5396
  readOnly,
5406
5397
  data
5407
5398
  });
5408
- return /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-1", children: [
5399
+ return /* @__PURE__ */ jsxs20("div", { className: cn("flex flex-col gap-1", !height && "h-full"), children: [
5409
5400
  /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-1 text-xs", children: [
5410
5401
  /* @__PURE__ */ jsx34("span", { className: "font-medium text-zinc-700", children: label }),
5411
5402
  " ",
5412
5403
  /* @__PURE__ */ jsx34("span", { className: "text-zinc-300", children: "/" }),
5413
5404
  selector
5414
5405
  ] }),
5415
- /* @__PURE__ */ jsx34("div", { className: "overflow-hidden rounded-md border border-zinc-300 bg-white p-2 shadow-sm", children: editor })
5406
+ /* @__PURE__ */ jsx34(
5407
+ "div",
5408
+ {
5409
+ className: cn(
5410
+ "overflow-hidden rounded-md border border-zinc-300 bg-white p-2 shadow-sm",
5411
+ !height && "h-full"
5412
+ ),
5413
+ children: editor
5414
+ }
5415
+ )
5416
5416
  ] });
5417
5417
  };
5418
5418
 
@@ -5566,7 +5566,7 @@ var EditorDisplayForm = ({
5566
5566
  return /* @__PURE__ */ jsxs22(Fragment6, { children: [
5567
5567
  /* @__PURE__ */ jsxs22("div", { className: "flex grow flex-col gap-1", children: [
5568
5568
  /* @__PURE__ */ jsx37("div", { className: "flex shrink-0 items-center gap-2", children: type === "json" ? /* @__PURE__ */ jsx37("div", {}) : selector }),
5569
- /* @__PURE__ */ jsx37("div", { className: "grow rounded-md border border-zinc-300 bg-white p-1 dark:!bg-[#192321]", children: editor })
5569
+ /* @__PURE__ */ jsx37("div", { className: "grow rounded-md border border-zinc-300 bg-white p-2", children: editor })
5570
5570
  ] }),
5571
5571
  /* @__PURE__ */ jsx37("div", { className: "flex shrink-0 items-center gap-2", children: /* @__PURE__ */ jsxs22("div", { className: "ml-auto flex gap-2", children: [
5572
5572
  form.formState.isDirty && /* @__PURE__ */ jsx37(Button, { onClick: handleCancel, children: "Cancel" }),
package/package.json CHANGED
@@ -1 +1 @@
1
- { "name": "@upstash/react-redis-browser", "version": "v0.2.7-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 ./src" }, "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.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.1.14", "@radix-ui/react-dropdown-menu": "^2.1.15", "@radix-ui/react-icons": "1.3.0", "@radix-ui/react-label": "^2.1.7", "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-portal": "^1.1.2", "@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.35.3", "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/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", "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": "v0.2.8", "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 ./src" }, "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.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.1.14", "@radix-ui/react-dropdown-menu": "^2.1.15", "@radix-ui/react-icons": "1.3.0", "@radix-ui/react-label": "^2.1.7", "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-portal": "^1.1.2", "@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.35.3", "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/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", "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" } }