@upstash/react-redis-browser 0.2.9 → 0.2.11-canary
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 +0 -3
- package/dist/index.js +29 -43
- package/dist/index.mjs +43 -57
- package/package.json +1 -1
package/dist/index.css
CHANGED
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ var useTheme = () => {
|
|
|
24
24
|
|
|
25
25
|
// src/lib/clients.ts
|
|
26
26
|
var _reactquery = require('@tanstack/react-query');
|
|
27
|
-
var
|
|
27
|
+
var _redis = require('@upstash/redis');
|
|
28
28
|
|
|
29
29
|
// src/components/ui/use-toast.ts
|
|
30
30
|
|
|
@@ -162,7 +162,7 @@ var redisClient = ({
|
|
|
162
162
|
if (!token) {
|
|
163
163
|
throw new Error("Redis TOKEN is missing!");
|
|
164
164
|
}
|
|
165
|
-
const redis = new (0,
|
|
165
|
+
const redis = new (0, _redis.Redis)({
|
|
166
166
|
url,
|
|
167
167
|
token,
|
|
168
168
|
enableAutoPipelining: pipelining,
|
|
@@ -260,33 +260,20 @@ var DatabrowserProvider = ({
|
|
|
260
260
|
removeItem: () => {
|
|
261
261
|
}
|
|
262
262
|
},
|
|
263
|
-
version:
|
|
264
|
-
// @ts-expect-error Reset the store for < v1
|
|
263
|
+
version: 4,
|
|
265
264
|
migrate: (originalState, version) => {
|
|
266
265
|
const state = originalState;
|
|
267
|
-
if (version
|
|
268
|
-
|
|
266
|
+
if (version <= 1) {
|
|
267
|
+
state.tabs = state.tabs.map(([id, data]) => [id, { ...data, id }]);
|
|
269
268
|
}
|
|
270
|
-
if (version
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
...state,
|
|
279
|
-
tabs: state.tabs.map(([id, data]) => {
|
|
280
|
-
const oldData = data;
|
|
281
|
-
return [
|
|
282
|
-
id,
|
|
283
|
-
{
|
|
284
|
-
...data,
|
|
285
|
-
selectedKeys: oldData.selectedKey ? [oldData.selectedKey] : []
|
|
286
|
-
}
|
|
287
|
-
];
|
|
288
|
-
})
|
|
289
|
-
};
|
|
269
|
+
if (version <= 2) {
|
|
270
|
+
state.tabs = state.tabs.map(([id, data]) => {
|
|
271
|
+
const oldData = data;
|
|
272
|
+
return [
|
|
273
|
+
id,
|
|
274
|
+
{ ...data, selectedKeys: oldData.selectedKey ? [oldData.selectedKey] : [] }
|
|
275
|
+
];
|
|
276
|
+
});
|
|
290
277
|
}
|
|
291
278
|
return state;
|
|
292
279
|
}
|
|
@@ -3071,7 +3058,7 @@ var _reactportal = require('@radix-ui/react-portal');
|
|
|
3071
3058
|
|
|
3072
3059
|
// src/components/ui/toast.tsx
|
|
3073
3060
|
|
|
3074
|
-
var
|
|
3061
|
+
var _iconsreact = require('@tabler/icons-react');
|
|
3075
3062
|
var _reacttoast = require('@radix-ui/react-toast'); var ToastPrimitives = _interopRequireWildcard(_reacttoast);
|
|
3076
3063
|
|
|
3077
3064
|
// node_modules/class-variance-authority/node_modules/clsx/dist/clsx.mjs
|
|
@@ -3193,7 +3180,7 @@ var ToastClose = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
3193
3180
|
),
|
|
3194
3181
|
"toast-close": "",
|
|
3195
3182
|
...props,
|
|
3196
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3183
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconX, { className: "size-4" })
|
|
3197
3184
|
}
|
|
3198
3185
|
));
|
|
3199
3186
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
@@ -3352,7 +3339,7 @@ var useKeyType = (key) => {
|
|
|
3352
3339
|
|
|
3353
3340
|
// src/components/databrowser/components/display/display-list.tsx
|
|
3354
3341
|
|
|
3355
|
-
|
|
3342
|
+
|
|
3356
3343
|
|
|
3357
3344
|
// src/components/ui/button.tsx
|
|
3358
3345
|
|
|
@@ -4283,7 +4270,7 @@ var ContextMenuSubTrigger = React7.forwardRef(({ className, inset, children, ...
|
|
|
4283
4270
|
...props,
|
|
4284
4271
|
children: [
|
|
4285
4272
|
children,
|
|
4286
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4273
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconChevronRight, { className: "ml-auto h-4 w-4" })
|
|
4287
4274
|
]
|
|
4288
4275
|
}
|
|
4289
4276
|
));
|
|
@@ -4336,7 +4323,7 @@ var ContextMenuCheckboxItem = React7.forwardRef(({ className, children, checked,
|
|
|
4336
4323
|
checked,
|
|
4337
4324
|
...props,
|
|
4338
4325
|
children: [
|
|
4339
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4326
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconCheck, { className: "h-4 w-4" }) }) }),
|
|
4340
4327
|
children
|
|
4341
4328
|
]
|
|
4342
4329
|
}
|
|
@@ -4352,7 +4339,7 @@ var ContextMenuRadioItem = React7.forwardRef(({ className, children, ...props },
|
|
|
4352
4339
|
),
|
|
4353
4340
|
...props,
|
|
4354
4341
|
children: [
|
|
4355
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4342
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconCircleFilled, { className: "h-4 w-4" }) }) }),
|
|
4356
4343
|
children
|
|
4357
4344
|
]
|
|
4358
4345
|
}
|
|
@@ -4747,7 +4734,7 @@ var SimpleTooltip = ({
|
|
|
4747
4734
|
}) => {
|
|
4748
4735
|
if (!content) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children });
|
|
4749
4736
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Tooltip, { delayDuration: 400, children: [
|
|
4750
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipTrigger, { asChild: true, children
|
|
4737
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipTrigger, { asChild: true, children }),
|
|
4751
4738
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipContent, { side: "top", children: content })
|
|
4752
4739
|
] });
|
|
4753
4740
|
};
|
|
@@ -4830,7 +4817,7 @@ var DropdownMenuSubTrigger = React11.forwardRef(({ className, inset, children, .
|
|
|
4830
4817
|
...props,
|
|
4831
4818
|
children: [
|
|
4832
4819
|
children,
|
|
4833
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4820
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconChevronRight, { className: "ml-auto" })
|
|
4834
4821
|
]
|
|
4835
4822
|
}
|
|
4836
4823
|
));
|
|
@@ -4885,7 +4872,7 @@ var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, checke
|
|
|
4885
4872
|
checked,
|
|
4886
4873
|
...props,
|
|
4887
4874
|
children: [
|
|
4888
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4875
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconCheck, { className: "h-4 w-4" }) }) }),
|
|
4889
4876
|
children
|
|
4890
4877
|
]
|
|
4891
4878
|
}
|
|
@@ -4901,7 +4888,7 @@ var DropdownMenuRadioItem = React11.forwardRef(({ className, children, ...props
|
|
|
4901
4888
|
),
|
|
4902
4889
|
...props,
|
|
4903
4890
|
children: [
|
|
4904
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4891
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconCircleFilled, { className: "h-2 w-2" }) }) }),
|
|
4905
4892
|
children
|
|
4906
4893
|
]
|
|
4907
4894
|
}
|
|
@@ -5627,7 +5614,6 @@ var DataDisplay = () => {
|
|
|
5627
5614
|
var _reactdialog = require('@radix-ui/react-dialog'); var DialogPrimitive = _interopRequireWildcard(_reactdialog);
|
|
5628
5615
|
|
|
5629
5616
|
|
|
5630
|
-
|
|
5631
5617
|
// src/components/ui/dialog.tsx
|
|
5632
5618
|
|
|
5633
5619
|
|
|
@@ -5731,6 +5717,7 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
|
5731
5717
|
|
|
5732
5718
|
// src/components/databrowser/components/add-key-modal.tsx
|
|
5733
5719
|
|
|
5720
|
+
|
|
5734
5721
|
function AddKeyModal() {
|
|
5735
5722
|
const { setSelectedKey } = useTab();
|
|
5736
5723
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
@@ -5762,7 +5749,7 @@ function AddKeyModal() {
|
|
|
5762
5749
|
setOpen(open2);
|
|
5763
5750
|
},
|
|
5764
5751
|
children: [
|
|
5765
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5752
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SimpleTooltip, { content: "Add key", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTrigger, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { variant: "primary", size: "icon-sm", "data-testid": "add-key-button", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconPlus, { className: "size-4" }) }) }) }),
|
|
5766
5753
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogContent, { className: "max-w-[400px]", children: [
|
|
5767
5754
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: "Create new key" }) }),
|
|
5768
5755
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "sr-only", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactdialog.DialogDescription, { children: "Create new key" }) }),
|
|
@@ -5928,7 +5915,7 @@ var KeysList = () => {
|
|
|
5928
5915
|
const lastClickedIndexRef = _react.useRef.call(void 0, null);
|
|
5929
5916
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SidebarContextMenu, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
5930
5917
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-px" }),
|
|
5931
|
-
keys.map((data, i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
5918
|
+
keys.map((data, i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
|
|
5932
5919
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5933
5920
|
KeyItem,
|
|
5934
5921
|
{
|
|
@@ -5936,11 +5923,10 @@ var KeysList = () => {
|
|
|
5936
5923
|
data,
|
|
5937
5924
|
allKeys: keys,
|
|
5938
5925
|
lastClickedIndexRef
|
|
5939
|
-
}
|
|
5940
|
-
data[0]
|
|
5926
|
+
}
|
|
5941
5927
|
),
|
|
5942
5928
|
i !== keys.length - 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "-z-10 mx-2 h-px bg-zinc-100 dark:bg-zinc-200" })
|
|
5943
|
-
] }))
|
|
5929
|
+
] }, data[0]))
|
|
5944
5930
|
] }) });
|
|
5945
5931
|
};
|
|
5946
5932
|
var keyStyles = {
|
|
@@ -6287,7 +6273,7 @@ var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
6287
6273
|
));
|
|
6288
6274
|
Command.displayName = _cmdk.Command.displayName;
|
|
6289
6275
|
var CommandInput = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
6290
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6276
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconSearch, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
6291
6277
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6292
6278
|
_cmdk.Command.Input,
|
|
6293
6279
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import { createContext as createContext2, useContext as useContext2, useMemo } f
|
|
|
24
24
|
|
|
25
25
|
// src/lib/clients.ts
|
|
26
26
|
import { MutationCache, QueryCache, QueryClient } from "@tanstack/react-query";
|
|
27
|
-
import { Redis } from "@upstash/redis
|
|
27
|
+
import { Redis } from "@upstash/redis";
|
|
28
28
|
|
|
29
29
|
// src/components/ui/use-toast.ts
|
|
30
30
|
import * as React from "react";
|
|
@@ -260,33 +260,20 @@ var DatabrowserProvider = ({
|
|
|
260
260
|
removeItem: () => {
|
|
261
261
|
}
|
|
262
262
|
},
|
|
263
|
-
version:
|
|
264
|
-
// @ts-expect-error Reset the store for < v1
|
|
263
|
+
version: 4,
|
|
265
264
|
migrate: (originalState, version) => {
|
|
266
265
|
const state = originalState;
|
|
267
|
-
if (version
|
|
268
|
-
|
|
266
|
+
if (version <= 1) {
|
|
267
|
+
state.tabs = state.tabs.map(([id, data]) => [id, { ...data, id }]);
|
|
269
268
|
}
|
|
270
|
-
if (version
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
...state,
|
|
279
|
-
tabs: state.tabs.map(([id, data]) => {
|
|
280
|
-
const oldData = data;
|
|
281
|
-
return [
|
|
282
|
-
id,
|
|
283
|
-
{
|
|
284
|
-
...data,
|
|
285
|
-
selectedKeys: oldData.selectedKey ? [oldData.selectedKey] : []
|
|
286
|
-
}
|
|
287
|
-
];
|
|
288
|
-
})
|
|
289
|
-
};
|
|
269
|
+
if (version <= 2) {
|
|
270
|
+
state.tabs = state.tabs.map(([id, data]) => {
|
|
271
|
+
const oldData = data;
|
|
272
|
+
return [
|
|
273
|
+
id,
|
|
274
|
+
{ ...data, selectedKeys: oldData.selectedKey ? [oldData.selectedKey] : [] }
|
|
275
|
+
];
|
|
276
|
+
});
|
|
290
277
|
}
|
|
291
278
|
return state;
|
|
292
279
|
}
|
|
@@ -3071,7 +3058,7 @@ import { Portal } from "@radix-ui/react-portal";
|
|
|
3071
3058
|
|
|
3072
3059
|
// src/components/ui/toast.tsx
|
|
3073
3060
|
import * as React2 from "react";
|
|
3074
|
-
import {
|
|
3061
|
+
import { IconX } from "@tabler/icons-react";
|
|
3075
3062
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
3076
3063
|
|
|
3077
3064
|
// node_modules/class-variance-authority/node_modules/clsx/dist/clsx.mjs
|
|
@@ -3193,7 +3180,7 @@ var ToastClose = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
3193
3180
|
),
|
|
3194
3181
|
"toast-close": "",
|
|
3195
3182
|
...props,
|
|
3196
|
-
children: /* @__PURE__ */ jsx5(
|
|
3183
|
+
children: /* @__PURE__ */ jsx5(IconX, { className: "size-4" })
|
|
3197
3184
|
}
|
|
3198
3185
|
));
|
|
3199
3186
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
@@ -4267,7 +4254,7 @@ import { ContextMenuSeparator as ContextMenuSeparator2 } from "@radix-ui/react-c
|
|
|
4267
4254
|
// src/components/ui/context-menu.tsx
|
|
4268
4255
|
import * as React7 from "react";
|
|
4269
4256
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
4270
|
-
import {
|
|
4257
|
+
import { IconCheck, IconChevronRight, IconCircleFilled } from "@tabler/icons-react";
|
|
4271
4258
|
import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
4272
4259
|
var ContextMenu = ContextMenuPrimitive.Root;
|
|
4273
4260
|
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
@@ -4283,7 +4270,7 @@ var ContextMenuSubTrigger = React7.forwardRef(({ className, inset, children, ...
|
|
|
4283
4270
|
...props,
|
|
4284
4271
|
children: [
|
|
4285
4272
|
children,
|
|
4286
|
-
/* @__PURE__ */ jsx18(
|
|
4273
|
+
/* @__PURE__ */ jsx18(IconChevronRight, { className: "ml-auto h-4 w-4" })
|
|
4287
4274
|
]
|
|
4288
4275
|
}
|
|
4289
4276
|
));
|
|
@@ -4336,7 +4323,7 @@ var ContextMenuCheckboxItem = React7.forwardRef(({ className, children, checked,
|
|
|
4336
4323
|
checked,
|
|
4337
4324
|
...props,
|
|
4338
4325
|
children: [
|
|
4339
|
-
/* @__PURE__ */ jsx18("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx18(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx18(
|
|
4326
|
+
/* @__PURE__ */ jsx18("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx18(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx18(IconCheck, { className: "h-4 w-4" }) }) }),
|
|
4340
4327
|
children
|
|
4341
4328
|
]
|
|
4342
4329
|
}
|
|
@@ -4352,7 +4339,7 @@ var ContextMenuRadioItem = React7.forwardRef(({ className, children, ...props },
|
|
|
4352
4339
|
),
|
|
4353
4340
|
...props,
|
|
4354
4341
|
children: [
|
|
4355
|
-
/* @__PURE__ */ jsx18("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx18(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx18(
|
|
4342
|
+
/* @__PURE__ */ jsx18("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx18(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx18(IconCircleFilled, { className: "h-4 w-4" }) }) }),
|
|
4356
4343
|
children
|
|
4357
4344
|
]
|
|
4358
4345
|
}
|
|
@@ -4747,7 +4734,7 @@ var SimpleTooltip = ({
|
|
|
4747
4734
|
}) => {
|
|
4748
4735
|
if (!content) return /* @__PURE__ */ jsx24(Fragment3, { children });
|
|
4749
4736
|
return /* @__PURE__ */ jsxs14(Tooltip, { delayDuration: 400, children: [
|
|
4750
|
-
/* @__PURE__ */ jsx24(TooltipTrigger, { asChild: true, children
|
|
4737
|
+
/* @__PURE__ */ jsx24(TooltipTrigger, { asChild: true, children }),
|
|
4751
4738
|
/* @__PURE__ */ jsx24(TooltipContent, { side: "top", children: content })
|
|
4752
4739
|
] });
|
|
4753
4740
|
};
|
|
@@ -4814,7 +4801,7 @@ import { IconDotsVertical } from "@tabler/icons-react";
|
|
|
4814
4801
|
// src/components/ui/dropdown-menu.tsx
|
|
4815
4802
|
import * as React11 from "react";
|
|
4816
4803
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4817
|
-
import {
|
|
4804
|
+
import { IconCheck as IconCheck2, IconChevronRight as IconChevronRight2, IconCircleFilled as IconCircleFilled2 } from "@tabler/icons-react";
|
|
4818
4805
|
import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4819
4806
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
4820
4807
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
@@ -4830,7 +4817,7 @@ var DropdownMenuSubTrigger = React11.forwardRef(({ className, inset, children, .
|
|
|
4830
4817
|
...props,
|
|
4831
4818
|
children: [
|
|
4832
4819
|
children,
|
|
4833
|
-
/* @__PURE__ */ jsx26(
|
|
4820
|
+
/* @__PURE__ */ jsx26(IconChevronRight2, { className: "ml-auto" })
|
|
4834
4821
|
]
|
|
4835
4822
|
}
|
|
4836
4823
|
));
|
|
@@ -4885,7 +4872,7 @@ var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, checke
|
|
|
4885
4872
|
checked,
|
|
4886
4873
|
...props,
|
|
4887
4874
|
children: [
|
|
4888
|
-
/* @__PURE__ */ jsx26("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx26(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx26(
|
|
4875
|
+
/* @__PURE__ */ jsx26("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx26(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx26(IconCheck2, { className: "h-4 w-4" }) }) }),
|
|
4889
4876
|
children
|
|
4890
4877
|
]
|
|
4891
4878
|
}
|
|
@@ -4901,7 +4888,7 @@ var DropdownMenuRadioItem = React11.forwardRef(({ className, children, ...props
|
|
|
4901
4888
|
),
|
|
4902
4889
|
...props,
|
|
4903
4890
|
children: [
|
|
4904
|
-
/* @__PURE__ */ jsx26("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx26(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx26(
|
|
4891
|
+
/* @__PURE__ */ jsx26("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx26(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx26(IconCircleFilled2, { className: "h-2 w-2" }) }) }),
|
|
4905
4892
|
children
|
|
4906
4893
|
]
|
|
4907
4894
|
}
|
|
@@ -5108,7 +5095,7 @@ import { Editor, useMonaco } from "@monaco-editor/react";
|
|
|
5108
5095
|
|
|
5109
5096
|
// src/components/databrowser/copy-button.tsx
|
|
5110
5097
|
import { useState as useState6 } from "react";
|
|
5111
|
-
import { IconCheck, IconCopy as IconCopy2 } from "@tabler/icons-react";
|
|
5098
|
+
import { IconCheck as IconCheck3, IconCopy as IconCopy2 } from "@tabler/icons-react";
|
|
5112
5099
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
5113
5100
|
function CopyButton({ value, ...props }) {
|
|
5114
5101
|
const [copied, setCopied] = useState6(false);
|
|
@@ -5129,7 +5116,7 @@ function CopyButton({ value, ...props }) {
|
|
|
5129
5116
|
variant: "secondary",
|
|
5130
5117
|
size: "icon-sm",
|
|
5131
5118
|
...props,
|
|
5132
|
-
children: copied ? /* @__PURE__ */ jsx31(
|
|
5119
|
+
children: copied ? /* @__PURE__ */ jsx31(IconCheck3, { className: "size-4 text-green-500" }) : /* @__PURE__ */ jsx31(IconCopy2, { className: "size-4 text-zinc-500" })
|
|
5133
5120
|
}
|
|
5134
5121
|
);
|
|
5135
5122
|
}
|
|
@@ -5625,7 +5612,6 @@ var DataDisplay = () => {
|
|
|
5625
5612
|
// src/components/databrowser/components/add-key-modal.tsx
|
|
5626
5613
|
import { useState as useState9 } from "react";
|
|
5627
5614
|
import { DialogDescription as DialogDescription2 } from "@radix-ui/react-dialog";
|
|
5628
|
-
import { PlusIcon } from "@radix-ui/react-icons";
|
|
5629
5615
|
import { Controller as Controller3, useForm as useForm4 } from "react-hook-form";
|
|
5630
5616
|
|
|
5631
5617
|
// src/components/ui/dialog.tsx
|
|
@@ -5730,6 +5716,7 @@ var DialogDescription = React12.forwardRef(({ className, ...props }, ref) => /*
|
|
|
5730
5716
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
5731
5717
|
|
|
5732
5718
|
// src/components/databrowser/components/add-key-modal.tsx
|
|
5719
|
+
import { IconPlus as IconPlus2 } from "@tabler/icons-react";
|
|
5733
5720
|
import { jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5734
5721
|
function AddKeyModal() {
|
|
5735
5722
|
const { setSelectedKey } = useTab();
|
|
@@ -5762,7 +5749,7 @@ function AddKeyModal() {
|
|
|
5762
5749
|
setOpen(open2);
|
|
5763
5750
|
},
|
|
5764
5751
|
children: [
|
|
5765
|
-
/* @__PURE__ */ jsx40(
|
|
5752
|
+
/* @__PURE__ */ jsx40(SimpleTooltip, { content: "Add key", children: /* @__PURE__ */ jsx40(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx40(Button, { variant: "primary", size: "icon-sm", "data-testid": "add-key-button", children: /* @__PURE__ */ jsx40(IconPlus2, { className: "size-4" }) }) }) }),
|
|
5766
5753
|
/* @__PURE__ */ jsxs24(DialogContent, { className: "max-w-[400px]", children: [
|
|
5767
5754
|
/* @__PURE__ */ jsx40(DialogHeader, { children: /* @__PURE__ */ jsx40(DialogTitle, { children: "Create new key" }) }),
|
|
5768
5755
|
/* @__PURE__ */ jsx40("div", { className: "sr-only", children: /* @__PURE__ */ jsx40(DialogDescription2, { children: "Create new key" }) }),
|
|
@@ -5824,7 +5811,7 @@ var Empty = () => {
|
|
|
5824
5811
|
};
|
|
5825
5812
|
|
|
5826
5813
|
// src/components/databrowser/components/sidebar/keys-list.tsx
|
|
5827
|
-
import { useRef as useRef3 } from "react";
|
|
5814
|
+
import { Fragment as Fragment9, useRef as useRef3 } from "react";
|
|
5828
5815
|
|
|
5829
5816
|
// src/components/databrowser/components/sidebar-context-menu.tsx
|
|
5830
5817
|
import { useState as useState10 } from "react";
|
|
@@ -5922,11 +5909,11 @@ var SidebarContextMenu = ({ children }) => {
|
|
|
5922
5909
|
};
|
|
5923
5910
|
|
|
5924
5911
|
// src/components/databrowser/components/sidebar/keys-list.tsx
|
|
5925
|
-
import { Fragment as
|
|
5912
|
+
import { Fragment as Fragment10, jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5926
5913
|
var KeysList = () => {
|
|
5927
5914
|
const { keys } = useKeys();
|
|
5928
5915
|
const lastClickedIndexRef = useRef3(null);
|
|
5929
|
-
return /* @__PURE__ */ jsx43(SidebarContextMenu, { children: /* @__PURE__ */ jsxs27(
|
|
5916
|
+
return /* @__PURE__ */ jsx43(SidebarContextMenu, { children: /* @__PURE__ */ jsxs27(Fragment10, { children: [
|
|
5930
5917
|
/* @__PURE__ */ jsx43("div", { className: "h-px" }),
|
|
5931
5918
|
keys.map((data, i) => /* @__PURE__ */ jsxs27(Fragment9, { children: [
|
|
5932
5919
|
/* @__PURE__ */ jsx43(
|
|
@@ -5936,11 +5923,10 @@ var KeysList = () => {
|
|
|
5936
5923
|
data,
|
|
5937
5924
|
allKeys: keys,
|
|
5938
5925
|
lastClickedIndexRef
|
|
5939
|
-
}
|
|
5940
|
-
data[0]
|
|
5926
|
+
}
|
|
5941
5927
|
),
|
|
5942
5928
|
i !== keys.length - 1 && /* @__PURE__ */ jsx43("div", { className: "-z-10 mx-2 h-px bg-zinc-100 dark:bg-zinc-200" })
|
|
5943
|
-
] }))
|
|
5929
|
+
] }, data[0]))
|
|
5944
5930
|
] }) });
|
|
5945
5931
|
};
|
|
5946
5932
|
var keyStyles = {
|
|
@@ -6029,7 +6015,7 @@ var ReloadButton = ({
|
|
|
6029
6015
|
|
|
6030
6016
|
// src/components/databrowser/components/sidebar/search-input.tsx
|
|
6031
6017
|
import { useEffect as useEffect11, useRef as useRef4, useState as useState12 } from "react";
|
|
6032
|
-
import { IconX } from "@tabler/icons-react";
|
|
6018
|
+
import { IconX as IconX2 } from "@tabler/icons-react";
|
|
6033
6019
|
import { jsx as jsx45, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6034
6020
|
var dedupeSearchHistory = (history) => {
|
|
6035
6021
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -6143,7 +6129,7 @@ var SearchInput = () => {
|
|
|
6143
6129
|
setState("");
|
|
6144
6130
|
},
|
|
6145
6131
|
children: [
|
|
6146
|
-
/* @__PURE__ */ jsx45(
|
|
6132
|
+
/* @__PURE__ */ jsx45(IconX2, { size: 16 }),
|
|
6147
6133
|
/* @__PURE__ */ jsx45("span", { className: "sr-only", children: "Clear" })
|
|
6148
6134
|
]
|
|
6149
6135
|
}
|
|
@@ -6267,12 +6253,12 @@ import {
|
|
|
6267
6253
|
import { restrictToHorizontalAxis } from "@dnd-kit/modifiers";
|
|
6268
6254
|
import { horizontalListSortingStrategy, SortableContext, useSortable } from "@dnd-kit/sortable";
|
|
6269
6255
|
import { CSS } from "@dnd-kit/utilities";
|
|
6270
|
-
import { IconChevronDown as IconChevronDown2, IconMaximize, IconPlus as
|
|
6256
|
+
import { IconChevronDown as IconChevronDown2, IconMaximize, IconPlus as IconPlus3 } from "@tabler/icons-react";
|
|
6271
6257
|
|
|
6272
6258
|
// src/components/ui/command.tsx
|
|
6273
6259
|
import * as React13 from "react";
|
|
6274
6260
|
import { Command as CommandPrimitive } from "cmdk";
|
|
6275
|
-
import {
|
|
6261
|
+
import { IconSearch } from "@tabler/icons-react";
|
|
6276
6262
|
import { jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6277
6263
|
var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
6278
6264
|
CommandPrimitive,
|
|
@@ -6287,7 +6273,7 @@ var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
6287
6273
|
));
|
|
6288
6274
|
Command.displayName = CommandPrimitive.displayName;
|
|
6289
6275
|
var CommandInput = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs33("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
6290
|
-
/* @__PURE__ */ jsx50(
|
|
6276
|
+
/* @__PURE__ */ jsx50(IconSearch, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
6291
6277
|
/* @__PURE__ */ jsx50(
|
|
6292
6278
|
CommandPrimitive.Input,
|
|
6293
6279
|
{
|
|
@@ -6355,9 +6341,9 @@ import {
|
|
|
6355
6341
|
IconArrowsMinimize,
|
|
6356
6342
|
IconCopyPlus,
|
|
6357
6343
|
IconPin,
|
|
6358
|
-
IconSearch,
|
|
6344
|
+
IconSearch as IconSearch2,
|
|
6359
6345
|
IconSquareX,
|
|
6360
|
-
IconX as
|
|
6346
|
+
IconX as IconX3
|
|
6361
6347
|
} from "@tabler/icons-react";
|
|
6362
6348
|
|
|
6363
6349
|
// src/components/databrowser/components/tab-type-icon.tsx
|
|
@@ -6412,7 +6398,7 @@ var Tab = ({ id, isList }) => {
|
|
|
6412
6398
|
const hasPinnedTabs = tabs.some(([, data]) => data.pinned);
|
|
6413
6399
|
const { ref, isOverflow } = useOverflow();
|
|
6414
6400
|
const label = search.key || selectedKey;
|
|
6415
|
-
const iconNode = search.key ? /* @__PURE__ */ jsx52(
|
|
6401
|
+
const iconNode = search.key ? /* @__PURE__ */ jsx52(IconSearch2, { size: 15 }) : selectedKey ? /* @__PURE__ */ jsx52(TabTypeIcon, { selectedKey }) : void 0;
|
|
6416
6402
|
const tabNode = /* @__PURE__ */ jsxs34(
|
|
6417
6403
|
"div",
|
|
6418
6404
|
{
|
|
@@ -6443,7 +6429,7 @@ var Tab = ({ id, isList }) => {
|
|
|
6443
6429
|
removeTab(id);
|
|
6444
6430
|
},
|
|
6445
6431
|
className: "p-1 text-zinc-300 transition-colors hover:text-zinc-500 dark:text-zinc-400",
|
|
6446
|
-
children: /* @__PURE__ */ jsx52(
|
|
6432
|
+
children: /* @__PURE__ */ jsx52(IconX3, { size: 16 })
|
|
6447
6433
|
}
|
|
6448
6434
|
)
|
|
6449
6435
|
]
|
|
@@ -6468,7 +6454,7 @@ var Tab = ({ id, isList }) => {
|
|
|
6468
6454
|
] }),
|
|
6469
6455
|
/* @__PURE__ */ jsx52(ContextMenuSeparator, {}),
|
|
6470
6456
|
/* @__PURE__ */ jsxs34(ContextMenuItem, { onSelect: () => forceRemoveTab(id), className: "gap-2", children: [
|
|
6471
|
-
/* @__PURE__ */ jsx52(
|
|
6457
|
+
/* @__PURE__ */ jsx52(IconX3, { size: 16 }),
|
|
6472
6458
|
"Close Tab"
|
|
6473
6459
|
] }),
|
|
6474
6460
|
/* @__PURE__ */ jsxs34(ContextMenuItem, { onSelect: () => closeOtherTabs(id), className: "gap-2", children: [
|
|
@@ -6733,7 +6719,7 @@ function AddTabButton() {
|
|
|
6733
6719
|
size: "icon-sm",
|
|
6734
6720
|
onClick: handleAddTab,
|
|
6735
6721
|
className: "flex-shrink-0 dark:bg-zinc-200",
|
|
6736
|
-
children: /* @__PURE__ */ jsx53(
|
|
6722
|
+
children: /* @__PURE__ */ jsx53(IconPlus3, { className: "text-zinc-500 dark:text-zinc-600", size: 16 })
|
|
6737
6723
|
}
|
|
6738
6724
|
);
|
|
6739
6725
|
}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "@upstash/react-redis-browser", "version": "v0.2.
|
|
1
|
+
{ "name": "@upstash/react-redis-browser", "version": "v0.2.11-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 ./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-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.7", "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" } }
|