@upstash/react-redis-browser 0.1.2-canary → 0.1.2-canary-2
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/README.md +6 -23
- package/dist/index.css +0 -16
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,38 +37,21 @@ Here's a basic example of how to use the component:
|
|
|
37
37
|
|
|
38
38
|
```tsx
|
|
39
39
|
import { RedisBrowser } from "@upstash/react-redis-browser"
|
|
40
|
-
|
|
41
40
|
import "@upstash/react-redis-browser/dist/index.css"
|
|
42
41
|
|
|
43
42
|
export default function RedisBrowserDemo() {
|
|
44
|
-
const redisUrl = process.env.NEXT_PUBLIC_UPSTASH_REDIS_REST_URL
|
|
45
|
-
const redisToken = process.env.NEXT_PUBLIC_UPSTASH_REDIS_REST_TOKEN
|
|
46
|
-
|
|
47
43
|
return (
|
|
48
44
|
<main style={mainStyle}>
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
<RedisBrowser
|
|
46
|
+
url={UPSTASH_REDIS_REST_URL}
|
|
47
|
+
token={UPSTASH_REDIS_REST_TOKEN} />
|
|
52
48
|
</main>
|
|
53
49
|
)
|
|
54
50
|
}
|
|
55
51
|
|
|
56
52
|
const mainStyle = {
|
|
57
|
-
height: "100vh",
|
|
58
53
|
width: "100vw",
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
flexDirection: "column",
|
|
63
|
-
background: "rgb(250,250,250)",
|
|
54
|
+
maxWidth: "900px",
|
|
55
|
+
height: "500px",
|
|
56
|
+
margin: "0 auto",
|
|
64
57
|
}
|
|
65
|
-
|
|
66
|
-
const divStyle = {
|
|
67
|
-
height: "100%",
|
|
68
|
-
width: "100%",
|
|
69
|
-
maxHeight: "45rem",
|
|
70
|
-
maxWidth: "64rem",
|
|
71
|
-
borderRadius: "0.5rem",
|
|
72
|
-
overflow: "hidden",
|
|
73
|
-
}
|
|
74
|
-
```
|
package/dist/index.css
CHANGED
|
@@ -449,10 +449,6 @@
|
|
|
449
449
|
margin-left: -0.25rem;
|
|
450
450
|
margin-right: -0.25rem;
|
|
451
451
|
}
|
|
452
|
-
.ups-db .mx-auto {
|
|
453
|
-
margin-left: auto;
|
|
454
|
-
margin-right: auto;
|
|
455
|
-
}
|
|
456
452
|
.ups-db .my-1 {
|
|
457
453
|
margin-top: 0.25rem;
|
|
458
454
|
margin-bottom: 0.25rem;
|
|
@@ -543,9 +539,6 @@
|
|
|
543
539
|
.ups-db .h-\[100px\] {
|
|
544
540
|
height: 100px;
|
|
545
541
|
}
|
|
546
|
-
.ups-db .h-\[600px\] {
|
|
547
|
-
height: 600px;
|
|
548
|
-
}
|
|
549
542
|
.ups-db .h-\[var\(--radix-select-trigger-height\)\] {
|
|
550
543
|
height: var(--radix-select-trigger-height);
|
|
551
544
|
}
|
|
@@ -555,9 +548,6 @@
|
|
|
555
548
|
.ups-db .h-px {
|
|
556
549
|
height: 1px;
|
|
557
550
|
}
|
|
558
|
-
.ups-db .max-h-full {
|
|
559
|
-
max-height: 100%;
|
|
560
|
-
}
|
|
561
551
|
.ups-db .max-h-screen {
|
|
562
552
|
max-height: 100vh;
|
|
563
553
|
}
|
|
@@ -633,9 +623,6 @@
|
|
|
633
623
|
.ups-db .max-w-lg {
|
|
634
624
|
max-width: 32rem;
|
|
635
625
|
}
|
|
636
|
-
.ups-db .max-w-screen-lg {
|
|
637
|
-
max-width: 1024px;
|
|
638
|
-
}
|
|
639
626
|
.ups-db .flex-1 {
|
|
640
627
|
flex: 1 1 0%;
|
|
641
628
|
}
|
|
@@ -977,9 +964,6 @@
|
|
|
977
964
|
.ups-db .p-1 {
|
|
978
965
|
padding: 0.25rem;
|
|
979
966
|
}
|
|
980
|
-
.ups-db .p-10 {
|
|
981
|
-
padding: 2.5rem;
|
|
982
|
-
}
|
|
983
967
|
.ups-db .p-2 {
|
|
984
968
|
padding: 0.5rem;
|
|
985
969
|
}
|
package/dist/index.js
CHANGED
|
@@ -5445,7 +5445,7 @@ function Sidebar() {
|
|
|
5445
5445
|
var RedisBrowser = ({ token, url }) => {
|
|
5446
5446
|
const credentials = _react.useMemo.call(void 0, () => ({ token, url }), [token, url]);
|
|
5447
5447
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactquery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reacttooltip.TooltipProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DatabrowserProvider, { redisCredentials: credentials, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, KeysProvider, { children: [
|
|
5448
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "ups-db
|
|
5448
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "ups-db", style: { height: "100%" }, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
5449
5449
|
_reactresizablepanels.PanelGroup,
|
|
5450
5450
|
{
|
|
5451
5451
|
autoSaveId: "persistence",
|
|
@@ -5453,7 +5453,7 @@ var RedisBrowser = ({ token, url }) => {
|
|
|
5453
5453
|
className: "h-full w-full gap-0.5 text-sm antialiased",
|
|
5454
5454
|
children: [
|
|
5455
5455
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactresizablepanels.Panel, { defaultSize: 30, minSize: 30, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Sidebar, {}) }),
|
|
5456
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactresizablepanels.PanelResizeHandle, { className: "h-
|
|
5456
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactresizablepanels.PanelResizeHandle, { className: "h-fullm flex w-1.5 items-center justify-center rounded-full hover:bg-zinc-300/20", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5457
5457
|
_iconsreact.IconDotsVertical,
|
|
5458
5458
|
{
|
|
5459
5459
|
size: 16,
|
package/dist/index.mjs
CHANGED
|
@@ -5445,7 +5445,7 @@ import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
|
5445
5445
|
var RedisBrowser = ({ token, url }) => {
|
|
5446
5446
|
const credentials = useMemo6(() => ({ token, url }), [token, url]);
|
|
5447
5447
|
return /* @__PURE__ */ jsx42(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx42(TooltipProvider, { children: /* @__PURE__ */ jsx42(DatabrowserProvider, { redisCredentials: credentials, children: /* @__PURE__ */ jsxs31(KeysProvider, { children: [
|
|
5448
|
-
/* @__PURE__ */ jsx42("div", { className: "ups-db
|
|
5448
|
+
/* @__PURE__ */ jsx42("div", { className: "ups-db", style: { height: "100%" }, children: /* @__PURE__ */ jsxs31(
|
|
5449
5449
|
PanelGroup,
|
|
5450
5450
|
{
|
|
5451
5451
|
autoSaveId: "persistence",
|
|
@@ -5453,7 +5453,7 @@ var RedisBrowser = ({ token, url }) => {
|
|
|
5453
5453
|
className: "h-full w-full gap-0.5 text-sm antialiased",
|
|
5454
5454
|
children: [
|
|
5455
5455
|
/* @__PURE__ */ jsx42(Panel, { defaultSize: 30, minSize: 30, children: /* @__PURE__ */ jsx42(Sidebar, {}) }),
|
|
5456
|
-
/* @__PURE__ */ jsx42(PanelResizeHandle, { className: "h-
|
|
5456
|
+
/* @__PURE__ */ jsx42(PanelResizeHandle, { className: "h-fullm flex w-1.5 items-center justify-center rounded-full hover:bg-zinc-300/20", children: /* @__PURE__ */ jsx42(
|
|
5457
5457
|
IconDotsVertical2,
|
|
5458
5458
|
{
|
|
5459
5459
|
size: 16,
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "@upstash/react-redis-browser", "version": "v0.1.2-canary", "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-2", "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" } }
|