@upstash/react-redis-browser 0.2.10 → 0.2.11-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/dist/index.css +0 -3
- package/dist/index.d.mts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +32 -29
- package/dist/index.mjs +46 -43
- package/package.json +1 -1
package/dist/index.css
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,13 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
type DarkModeOption = "dark" | "light";
|
|
4
4
|
|
|
5
5
|
type RedisCredentials = {
|
|
6
|
+
/**
|
|
7
|
+
* The URL of the redis database.
|
|
8
|
+
*/
|
|
6
9
|
url?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The token of the redis database.
|
|
12
|
+
*/
|
|
7
13
|
token?: string;
|
|
8
14
|
};
|
|
9
15
|
|
|
@@ -14,7 +20,19 @@ type RedisBrowserStorage = {
|
|
|
14
20
|
set: (value: string) => void;
|
|
15
21
|
get: () => string | null;
|
|
16
22
|
};
|
|
17
|
-
declare const RedisBrowser: ({
|
|
23
|
+
declare const RedisBrowser: ({ url, token, hideTabs, storage, disableTelemetry, onFullScreenClick, theme, }: RedisCredentials & {
|
|
24
|
+
/**
|
|
25
|
+
* Whether to disable telemetry.
|
|
26
|
+
*
|
|
27
|
+
* The redis client sends telemetry data to help us improve your experience.
|
|
28
|
+
* We collect the following:
|
|
29
|
+
* - SDK version
|
|
30
|
+
* - Platform (Deno, Cloudflare, Vercel)
|
|
31
|
+
* - Runtime version (node@18.x)
|
|
32
|
+
*
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
disableTelemetry?: boolean;
|
|
18
36
|
hideTabs?: boolean;
|
|
19
37
|
/**
|
|
20
38
|
* If defined, the databrowser will have a full screen button in the tab bar.
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,13 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
type DarkModeOption = "dark" | "light";
|
|
4
4
|
|
|
5
5
|
type RedisCredentials = {
|
|
6
|
+
/**
|
|
7
|
+
* The URL of the redis database.
|
|
8
|
+
*/
|
|
6
9
|
url?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The token of the redis database.
|
|
12
|
+
*/
|
|
7
13
|
token?: string;
|
|
8
14
|
};
|
|
9
15
|
|
|
@@ -14,7 +20,19 @@ type RedisBrowserStorage = {
|
|
|
14
20
|
set: (value: string) => void;
|
|
15
21
|
get: () => string | null;
|
|
16
22
|
};
|
|
17
|
-
declare const RedisBrowser: ({
|
|
23
|
+
declare const RedisBrowser: ({ url, token, hideTabs, storage, disableTelemetry, onFullScreenClick, theme, }: RedisCredentials & {
|
|
24
|
+
/**
|
|
25
|
+
* Whether to disable telemetry.
|
|
26
|
+
*
|
|
27
|
+
* The redis client sends telemetry data to help us improve your experience.
|
|
28
|
+
* We collect the following:
|
|
29
|
+
* - SDK version
|
|
30
|
+
* - Platform (Deno, Cloudflare, Vercel)
|
|
31
|
+
* - Runtime version (node@18.x)
|
|
32
|
+
*
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
disableTelemetry?: boolean;
|
|
18
36
|
hideTabs?: boolean;
|
|
19
37
|
/**
|
|
20
38
|
* If defined, the databrowser will have a full screen button in the tab bar.
|
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
|
|
|
@@ -151,7 +151,8 @@ function useToast() {
|
|
|
151
151
|
// src/lib/clients.ts
|
|
152
152
|
var redisClient = ({
|
|
153
153
|
credentials,
|
|
154
|
-
pipelining
|
|
154
|
+
pipelining,
|
|
155
|
+
telemetry
|
|
155
156
|
}) => {
|
|
156
157
|
const safeProcess = typeof process === "undefined" ? { env: {} } : process;
|
|
157
158
|
const token = _optionalChain([credentials, 'optionalAccess', _2 => _2.token]) || safeProcess.env.NEXT_PUBLIC_UPSTASH_REDIS_REST_TOKEN;
|
|
@@ -162,12 +163,13 @@ var redisClient = ({
|
|
|
162
163
|
if (!token) {
|
|
163
164
|
throw new Error("Redis TOKEN is missing!");
|
|
164
165
|
}
|
|
165
|
-
const redis = new (0,
|
|
166
|
+
const redis = new (0, _redis.Redis)({
|
|
166
167
|
url,
|
|
167
168
|
token,
|
|
168
169
|
enableAutoPipelining: pipelining,
|
|
169
170
|
automaticDeserialization: false,
|
|
170
|
-
keepAlive: false
|
|
171
|
+
keepAlive: false,
|
|
172
|
+
enableTelemetry: telemetry
|
|
171
173
|
});
|
|
172
174
|
return redis;
|
|
173
175
|
};
|
|
@@ -203,15 +205,16 @@ var queryClient = new (0, _reactquery.QueryClient)({
|
|
|
203
205
|
var RedisContext = _react.createContext.call(void 0, void 0);
|
|
204
206
|
var RedisProvider = ({
|
|
205
207
|
children,
|
|
206
|
-
redisCredentials
|
|
208
|
+
redisCredentials,
|
|
209
|
+
telemetry
|
|
207
210
|
}) => {
|
|
208
211
|
const redisInstance = _react.useMemo.call(void 0,
|
|
209
|
-
() => redisClient({ credentials: redisCredentials, pipelining: true }),
|
|
210
|
-
[redisCredentials]
|
|
212
|
+
() => redisClient({ credentials: redisCredentials, pipelining: true, telemetry }),
|
|
213
|
+
[redisCredentials, telemetry]
|
|
211
214
|
);
|
|
212
215
|
const redisInstanceNoPipeline = _react.useMemo.call(void 0,
|
|
213
|
-
() => redisClient({ credentials: redisCredentials, pipelining: false }),
|
|
214
|
-
[redisCredentials]
|
|
216
|
+
() => redisClient({ credentials: redisCredentials, pipelining: false, telemetry }),
|
|
217
|
+
[redisCredentials, telemetry]
|
|
215
218
|
);
|
|
216
219
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
217
220
|
RedisContext.Provider,
|
|
@@ -3058,7 +3061,7 @@ var _reactportal = require('@radix-ui/react-portal');
|
|
|
3058
3061
|
|
|
3059
3062
|
// src/components/ui/toast.tsx
|
|
3060
3063
|
|
|
3061
|
-
var
|
|
3064
|
+
var _iconsreact = require('@tabler/icons-react');
|
|
3062
3065
|
var _reacttoast = require('@radix-ui/react-toast'); var ToastPrimitives = _interopRequireWildcard(_reacttoast);
|
|
3063
3066
|
|
|
3064
3067
|
// node_modules/class-variance-authority/node_modules/clsx/dist/clsx.mjs
|
|
@@ -3180,7 +3183,7 @@ var ToastClose = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
3180
3183
|
),
|
|
3181
3184
|
"toast-close": "",
|
|
3182
3185
|
...props,
|
|
3183
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3186
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconX, { className: "size-4" })
|
|
3184
3187
|
}
|
|
3185
3188
|
));
|
|
3186
3189
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
@@ -3339,7 +3342,7 @@ var useKeyType = (key) => {
|
|
|
3339
3342
|
|
|
3340
3343
|
// src/components/databrowser/components/display/display-list.tsx
|
|
3341
3344
|
|
|
3342
|
-
|
|
3345
|
+
|
|
3343
3346
|
|
|
3344
3347
|
// src/components/ui/button.tsx
|
|
3345
3348
|
|
|
@@ -3811,7 +3814,7 @@ var useFetchKeySize = (dataKey) => {
|
|
|
3811
3814
|
return _reactquery.useQuery.call(void 0, {
|
|
3812
3815
|
queryKey: [FETCH_KEY_SIZE_QUERY_KEY, dataKey],
|
|
3813
3816
|
queryFn: async () => {
|
|
3814
|
-
return await redis.
|
|
3817
|
+
return await redis.exec(["MEMORY", "USAGE", dataKey]);
|
|
3815
3818
|
}
|
|
3816
3819
|
});
|
|
3817
3820
|
};
|
|
@@ -4270,7 +4273,7 @@ var ContextMenuSubTrigger = React7.forwardRef(({ className, inset, children, ...
|
|
|
4270
4273
|
...props,
|
|
4271
4274
|
children: [
|
|
4272
4275
|
children,
|
|
4273
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4276
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconChevronRight, { className: "ml-auto h-4 w-4" })
|
|
4274
4277
|
]
|
|
4275
4278
|
}
|
|
4276
4279
|
));
|
|
@@ -4323,7 +4326,7 @@ var ContextMenuCheckboxItem = React7.forwardRef(({ className, children, checked,
|
|
|
4323
4326
|
checked,
|
|
4324
4327
|
...props,
|
|
4325
4328
|
children: [
|
|
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,
|
|
4329
|
+
/* @__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" }) }) }),
|
|
4327
4330
|
children
|
|
4328
4331
|
]
|
|
4329
4332
|
}
|
|
@@ -4339,7 +4342,7 @@ var ContextMenuRadioItem = React7.forwardRef(({ className, children, ...props },
|
|
|
4339
4342
|
),
|
|
4340
4343
|
...props,
|
|
4341
4344
|
children: [
|
|
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,
|
|
4345
|
+
/* @__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" }) }) }),
|
|
4343
4346
|
children
|
|
4344
4347
|
]
|
|
4345
4348
|
}
|
|
@@ -4734,7 +4737,7 @@ var SimpleTooltip = ({
|
|
|
4734
4737
|
}) => {
|
|
4735
4738
|
if (!content) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children });
|
|
4736
4739
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Tooltip, { delayDuration: 400, children: [
|
|
4737
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipTrigger, { asChild: true, children
|
|
4740
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipTrigger, { asChild: true, children }),
|
|
4738
4741
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipContent, { side: "top", children: content })
|
|
4739
4742
|
] });
|
|
4740
4743
|
};
|
|
@@ -4817,7 +4820,7 @@ var DropdownMenuSubTrigger = React11.forwardRef(({ className, inset, children, .
|
|
|
4817
4820
|
...props,
|
|
4818
4821
|
children: [
|
|
4819
4822
|
children,
|
|
4820
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4823
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconChevronRight, { className: "ml-auto" })
|
|
4821
4824
|
]
|
|
4822
4825
|
}
|
|
4823
4826
|
));
|
|
@@ -4872,7 +4875,7 @@ var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, checke
|
|
|
4872
4875
|
checked,
|
|
4873
4876
|
...props,
|
|
4874
4877
|
children: [
|
|
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,
|
|
4878
|
+
/* @__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" }) }) }),
|
|
4876
4879
|
children
|
|
4877
4880
|
]
|
|
4878
4881
|
}
|
|
@@ -4888,7 +4891,7 @@ var DropdownMenuRadioItem = React11.forwardRef(({ className, children, ...props
|
|
|
4888
4891
|
),
|
|
4889
4892
|
...props,
|
|
4890
4893
|
children: [
|
|
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,
|
|
4894
|
+
/* @__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" }) }) }),
|
|
4892
4895
|
children
|
|
4893
4896
|
]
|
|
4894
4897
|
}
|
|
@@ -5614,7 +5617,6 @@ var DataDisplay = () => {
|
|
|
5614
5617
|
var _reactdialog = require('@radix-ui/react-dialog'); var DialogPrimitive = _interopRequireWildcard(_reactdialog);
|
|
5615
5618
|
|
|
5616
5619
|
|
|
5617
|
-
|
|
5618
5620
|
// src/components/ui/dialog.tsx
|
|
5619
5621
|
|
|
5620
5622
|
|
|
@@ -5718,6 +5720,7 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
|
5718
5720
|
|
|
5719
5721
|
// src/components/databrowser/components/add-key-modal.tsx
|
|
5720
5722
|
|
|
5723
|
+
|
|
5721
5724
|
function AddKeyModal() {
|
|
5722
5725
|
const { setSelectedKey } = useTab();
|
|
5723
5726
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
@@ -5749,7 +5752,7 @@ function AddKeyModal() {
|
|
|
5749
5752
|
setOpen(open2);
|
|
5750
5753
|
},
|
|
5751
5754
|
children: [
|
|
5752
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5755
|
+
/* @__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" }) }) }) }),
|
|
5753
5756
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogContent, { className: "max-w-[400px]", children: [
|
|
5754
5757
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: "Create new key" }) }),
|
|
5755
5758
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "sr-only", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactdialog.DialogDescription, { children: "Create new key" }) }),
|
|
@@ -5915,7 +5918,7 @@ var KeysList = () => {
|
|
|
5915
5918
|
const lastClickedIndexRef = _react.useRef.call(void 0, null);
|
|
5916
5919
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SidebarContextMenu, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
5917
5920
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-px" }),
|
|
5918
|
-
keys.map((data, i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
5921
|
+
keys.map((data, i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
|
|
5919
5922
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5920
5923
|
KeyItem,
|
|
5921
5924
|
{
|
|
@@ -5923,11 +5926,10 @@ var KeysList = () => {
|
|
|
5923
5926
|
data,
|
|
5924
5927
|
allKeys: keys,
|
|
5925
5928
|
lastClickedIndexRef
|
|
5926
|
-
}
|
|
5927
|
-
data[0]
|
|
5929
|
+
}
|
|
5928
5930
|
),
|
|
5929
5931
|
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" })
|
|
5930
|
-
] }))
|
|
5932
|
+
] }, data[0]))
|
|
5931
5933
|
] }) });
|
|
5932
5934
|
};
|
|
5933
5935
|
var keyStyles = {
|
|
@@ -6274,7 +6276,7 @@ var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
6274
6276
|
));
|
|
6275
6277
|
Command.displayName = _cmdk.Command.displayName;
|
|
6276
6278
|
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: [
|
|
6277
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6279
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsreact.IconSearch, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
6278
6280
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6279
6281
|
_cmdk.Command.Input,
|
|
6280
6282
|
{
|
|
@@ -6783,10 +6785,11 @@ function TabsListButton({
|
|
|
6783
6785
|
// src/components/databrowser/index.tsx
|
|
6784
6786
|
|
|
6785
6787
|
var RedisBrowser = ({
|
|
6786
|
-
token,
|
|
6787
6788
|
url,
|
|
6789
|
+
token,
|
|
6788
6790
|
hideTabs,
|
|
6789
6791
|
storage,
|
|
6792
|
+
disableTelemetry,
|
|
6790
6793
|
onFullScreenClick,
|
|
6791
6794
|
theme = "light"
|
|
6792
6795
|
}) => {
|
|
@@ -6795,7 +6798,7 @@ var RedisBrowser = ({
|
|
|
6795
6798
|
_react.useEffect.call(void 0, () => {
|
|
6796
6799
|
queryClient.resetQueries();
|
|
6797
6800
|
}, [credentials.url]);
|
|
6798
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactquery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RedisProvider, { redisCredentials: credentials, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DarkModeProvider, { theme, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DatabrowserProvider, { storage, rootRef, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reacttooltip.TooltipProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6801
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactquery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RedisProvider, { redisCredentials: credentials, telemetry: !disableTelemetry, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DarkModeProvider, { theme, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DatabrowserProvider, { storage, rootRef, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reacttooltip.TooltipProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6799
6802
|
RedisBrowserRoot,
|
|
6800
6803
|
{
|
|
6801
6804
|
hideTabs,
|
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";
|
|
@@ -151,7 +151,8 @@ function useToast() {
|
|
|
151
151
|
// src/lib/clients.ts
|
|
152
152
|
var redisClient = ({
|
|
153
153
|
credentials,
|
|
154
|
-
pipelining
|
|
154
|
+
pipelining,
|
|
155
|
+
telemetry
|
|
155
156
|
}) => {
|
|
156
157
|
const safeProcess = typeof process === "undefined" ? { env: {} } : process;
|
|
157
158
|
const token = credentials?.token || safeProcess.env.NEXT_PUBLIC_UPSTASH_REDIS_REST_TOKEN;
|
|
@@ -167,7 +168,8 @@ var redisClient = ({
|
|
|
167
168
|
token,
|
|
168
169
|
enableAutoPipelining: pipelining,
|
|
169
170
|
automaticDeserialization: false,
|
|
170
|
-
keepAlive: false
|
|
171
|
+
keepAlive: false,
|
|
172
|
+
enableTelemetry: telemetry
|
|
171
173
|
});
|
|
172
174
|
return redis;
|
|
173
175
|
};
|
|
@@ -203,15 +205,16 @@ import { jsx as jsx2 } from "react/jsx-runtime";
|
|
|
203
205
|
var RedisContext = createContext2(void 0);
|
|
204
206
|
var RedisProvider = ({
|
|
205
207
|
children,
|
|
206
|
-
redisCredentials
|
|
208
|
+
redisCredentials,
|
|
209
|
+
telemetry
|
|
207
210
|
}) => {
|
|
208
211
|
const redisInstance = useMemo(
|
|
209
|
-
() => redisClient({ credentials: redisCredentials, pipelining: true }),
|
|
210
|
-
[redisCredentials]
|
|
212
|
+
() => redisClient({ credentials: redisCredentials, pipelining: true, telemetry }),
|
|
213
|
+
[redisCredentials, telemetry]
|
|
211
214
|
);
|
|
212
215
|
const redisInstanceNoPipeline = useMemo(
|
|
213
|
-
() => redisClient({ credentials: redisCredentials, pipelining: false }),
|
|
214
|
-
[redisCredentials]
|
|
216
|
+
() => redisClient({ credentials: redisCredentials, pipelining: false, telemetry }),
|
|
217
|
+
[redisCredentials, telemetry]
|
|
215
218
|
);
|
|
216
219
|
return /* @__PURE__ */ jsx2(
|
|
217
220
|
RedisContext.Provider,
|
|
@@ -3058,7 +3061,7 @@ import { Portal } from "@radix-ui/react-portal";
|
|
|
3058
3061
|
|
|
3059
3062
|
// src/components/ui/toast.tsx
|
|
3060
3063
|
import * as React2 from "react";
|
|
3061
|
-
import {
|
|
3064
|
+
import { IconX } from "@tabler/icons-react";
|
|
3062
3065
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
3063
3066
|
|
|
3064
3067
|
// node_modules/class-variance-authority/node_modules/clsx/dist/clsx.mjs
|
|
@@ -3180,7 +3183,7 @@ var ToastClose = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
3180
3183
|
),
|
|
3181
3184
|
"toast-close": "",
|
|
3182
3185
|
...props,
|
|
3183
|
-
children: /* @__PURE__ */ jsx5(
|
|
3186
|
+
children: /* @__PURE__ */ jsx5(IconX, { className: "size-4" })
|
|
3184
3187
|
}
|
|
3185
3188
|
));
|
|
3186
3189
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
@@ -3811,7 +3814,7 @@ var useFetchKeySize = (dataKey) => {
|
|
|
3811
3814
|
return useQuery5({
|
|
3812
3815
|
queryKey: [FETCH_KEY_SIZE_QUERY_KEY, dataKey],
|
|
3813
3816
|
queryFn: async () => {
|
|
3814
|
-
return await redis.
|
|
3817
|
+
return await redis.exec(["MEMORY", "USAGE", dataKey]);
|
|
3815
3818
|
}
|
|
3816
3819
|
});
|
|
3817
3820
|
};
|
|
@@ -4254,7 +4257,7 @@ import { ContextMenuSeparator as ContextMenuSeparator2 } from "@radix-ui/react-c
|
|
|
4254
4257
|
// src/components/ui/context-menu.tsx
|
|
4255
4258
|
import * as React7 from "react";
|
|
4256
4259
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
4257
|
-
import {
|
|
4260
|
+
import { IconCheck, IconChevronRight, IconCircleFilled } from "@tabler/icons-react";
|
|
4258
4261
|
import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
4259
4262
|
var ContextMenu = ContextMenuPrimitive.Root;
|
|
4260
4263
|
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
@@ -4270,7 +4273,7 @@ var ContextMenuSubTrigger = React7.forwardRef(({ className, inset, children, ...
|
|
|
4270
4273
|
...props,
|
|
4271
4274
|
children: [
|
|
4272
4275
|
children,
|
|
4273
|
-
/* @__PURE__ */ jsx18(
|
|
4276
|
+
/* @__PURE__ */ jsx18(IconChevronRight, { className: "ml-auto h-4 w-4" })
|
|
4274
4277
|
]
|
|
4275
4278
|
}
|
|
4276
4279
|
));
|
|
@@ -4323,7 +4326,7 @@ var ContextMenuCheckboxItem = React7.forwardRef(({ className, children, checked,
|
|
|
4323
4326
|
checked,
|
|
4324
4327
|
...props,
|
|
4325
4328
|
children: [
|
|
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(
|
|
4329
|
+
/* @__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" }) }) }),
|
|
4327
4330
|
children
|
|
4328
4331
|
]
|
|
4329
4332
|
}
|
|
@@ -4339,7 +4342,7 @@ var ContextMenuRadioItem = React7.forwardRef(({ className, children, ...props },
|
|
|
4339
4342
|
),
|
|
4340
4343
|
...props,
|
|
4341
4344
|
children: [
|
|
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(
|
|
4345
|
+
/* @__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" }) }) }),
|
|
4343
4346
|
children
|
|
4344
4347
|
]
|
|
4345
4348
|
}
|
|
@@ -4734,7 +4737,7 @@ var SimpleTooltip = ({
|
|
|
4734
4737
|
}) => {
|
|
4735
4738
|
if (!content) return /* @__PURE__ */ jsx24(Fragment3, { children });
|
|
4736
4739
|
return /* @__PURE__ */ jsxs14(Tooltip, { delayDuration: 400, children: [
|
|
4737
|
-
/* @__PURE__ */ jsx24(TooltipTrigger, { asChild: true, children
|
|
4740
|
+
/* @__PURE__ */ jsx24(TooltipTrigger, { asChild: true, children }),
|
|
4738
4741
|
/* @__PURE__ */ jsx24(TooltipContent, { side: "top", children: content })
|
|
4739
4742
|
] });
|
|
4740
4743
|
};
|
|
@@ -4801,7 +4804,7 @@ import { IconDotsVertical } from "@tabler/icons-react";
|
|
|
4801
4804
|
// src/components/ui/dropdown-menu.tsx
|
|
4802
4805
|
import * as React11 from "react";
|
|
4803
4806
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4804
|
-
import {
|
|
4807
|
+
import { IconCheck as IconCheck2, IconChevronRight as IconChevronRight2, IconCircleFilled as IconCircleFilled2 } from "@tabler/icons-react";
|
|
4805
4808
|
import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4806
4809
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
4807
4810
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
@@ -4817,7 +4820,7 @@ var DropdownMenuSubTrigger = React11.forwardRef(({ className, inset, children, .
|
|
|
4817
4820
|
...props,
|
|
4818
4821
|
children: [
|
|
4819
4822
|
children,
|
|
4820
|
-
/* @__PURE__ */ jsx26(
|
|
4823
|
+
/* @__PURE__ */ jsx26(IconChevronRight2, { className: "ml-auto" })
|
|
4821
4824
|
]
|
|
4822
4825
|
}
|
|
4823
4826
|
));
|
|
@@ -4872,7 +4875,7 @@ var DropdownMenuCheckboxItem = React11.forwardRef(({ className, children, checke
|
|
|
4872
4875
|
checked,
|
|
4873
4876
|
...props,
|
|
4874
4877
|
children: [
|
|
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(
|
|
4878
|
+
/* @__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" }) }) }),
|
|
4876
4879
|
children
|
|
4877
4880
|
]
|
|
4878
4881
|
}
|
|
@@ -4888,7 +4891,7 @@ var DropdownMenuRadioItem = React11.forwardRef(({ className, children, ...props
|
|
|
4888
4891
|
),
|
|
4889
4892
|
...props,
|
|
4890
4893
|
children: [
|
|
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(
|
|
4894
|
+
/* @__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" }) }) }),
|
|
4892
4895
|
children
|
|
4893
4896
|
]
|
|
4894
4897
|
}
|
|
@@ -5095,7 +5098,7 @@ import { Editor, useMonaco } from "@monaco-editor/react";
|
|
|
5095
5098
|
|
|
5096
5099
|
// src/components/databrowser/copy-button.tsx
|
|
5097
5100
|
import { useState as useState6 } from "react";
|
|
5098
|
-
import { IconCheck, IconCopy as IconCopy2 } from "@tabler/icons-react";
|
|
5101
|
+
import { IconCheck as IconCheck3, IconCopy as IconCopy2 } from "@tabler/icons-react";
|
|
5099
5102
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
5100
5103
|
function CopyButton({ value, ...props }) {
|
|
5101
5104
|
const [copied, setCopied] = useState6(false);
|
|
@@ -5116,7 +5119,7 @@ function CopyButton({ value, ...props }) {
|
|
|
5116
5119
|
variant: "secondary",
|
|
5117
5120
|
size: "icon-sm",
|
|
5118
5121
|
...props,
|
|
5119
|
-
children: copied ? /* @__PURE__ */ jsx31(
|
|
5122
|
+
children: copied ? /* @__PURE__ */ jsx31(IconCheck3, { className: "size-4 text-green-500" }) : /* @__PURE__ */ jsx31(IconCopy2, { className: "size-4 text-zinc-500" })
|
|
5120
5123
|
}
|
|
5121
5124
|
);
|
|
5122
5125
|
}
|
|
@@ -5612,7 +5615,6 @@ var DataDisplay = () => {
|
|
|
5612
5615
|
// src/components/databrowser/components/add-key-modal.tsx
|
|
5613
5616
|
import { useState as useState9 } from "react";
|
|
5614
5617
|
import { DialogDescription as DialogDescription2 } from "@radix-ui/react-dialog";
|
|
5615
|
-
import { PlusIcon } from "@radix-ui/react-icons";
|
|
5616
5618
|
import { Controller as Controller3, useForm as useForm4 } from "react-hook-form";
|
|
5617
5619
|
|
|
5618
5620
|
// src/components/ui/dialog.tsx
|
|
@@ -5717,6 +5719,7 @@ var DialogDescription = React12.forwardRef(({ className, ...props }, ref) => /*
|
|
|
5717
5719
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
5718
5720
|
|
|
5719
5721
|
// src/components/databrowser/components/add-key-modal.tsx
|
|
5722
|
+
import { IconPlus as IconPlus2 } from "@tabler/icons-react";
|
|
5720
5723
|
import { jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5721
5724
|
function AddKeyModal() {
|
|
5722
5725
|
const { setSelectedKey } = useTab();
|
|
@@ -5749,7 +5752,7 @@ function AddKeyModal() {
|
|
|
5749
5752
|
setOpen(open2);
|
|
5750
5753
|
},
|
|
5751
5754
|
children: [
|
|
5752
|
-
/* @__PURE__ */ jsx40(
|
|
5755
|
+
/* @__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" }) }) }) }),
|
|
5753
5756
|
/* @__PURE__ */ jsxs24(DialogContent, { className: "max-w-[400px]", children: [
|
|
5754
5757
|
/* @__PURE__ */ jsx40(DialogHeader, { children: /* @__PURE__ */ jsx40(DialogTitle, { children: "Create new key" }) }),
|
|
5755
5758
|
/* @__PURE__ */ jsx40("div", { className: "sr-only", children: /* @__PURE__ */ jsx40(DialogDescription2, { children: "Create new key" }) }),
|
|
@@ -5811,7 +5814,7 @@ var Empty = () => {
|
|
|
5811
5814
|
};
|
|
5812
5815
|
|
|
5813
5816
|
// src/components/databrowser/components/sidebar/keys-list.tsx
|
|
5814
|
-
import { useRef as useRef3 } from "react";
|
|
5817
|
+
import { Fragment as Fragment9, useRef as useRef3 } from "react";
|
|
5815
5818
|
|
|
5816
5819
|
// src/components/databrowser/components/sidebar-context-menu.tsx
|
|
5817
5820
|
import { useState as useState10 } from "react";
|
|
@@ -5909,11 +5912,11 @@ var SidebarContextMenu = ({ children }) => {
|
|
|
5909
5912
|
};
|
|
5910
5913
|
|
|
5911
5914
|
// src/components/databrowser/components/sidebar/keys-list.tsx
|
|
5912
|
-
import { Fragment as
|
|
5915
|
+
import { Fragment as Fragment10, jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5913
5916
|
var KeysList = () => {
|
|
5914
5917
|
const { keys } = useKeys();
|
|
5915
5918
|
const lastClickedIndexRef = useRef3(null);
|
|
5916
|
-
return /* @__PURE__ */ jsx43(SidebarContextMenu, { children: /* @__PURE__ */ jsxs27(
|
|
5919
|
+
return /* @__PURE__ */ jsx43(SidebarContextMenu, { children: /* @__PURE__ */ jsxs27(Fragment10, { children: [
|
|
5917
5920
|
/* @__PURE__ */ jsx43("div", { className: "h-px" }),
|
|
5918
5921
|
keys.map((data, i) => /* @__PURE__ */ jsxs27(Fragment9, { children: [
|
|
5919
5922
|
/* @__PURE__ */ jsx43(
|
|
@@ -5923,11 +5926,10 @@ var KeysList = () => {
|
|
|
5923
5926
|
data,
|
|
5924
5927
|
allKeys: keys,
|
|
5925
5928
|
lastClickedIndexRef
|
|
5926
|
-
}
|
|
5927
|
-
data[0]
|
|
5929
|
+
}
|
|
5928
5930
|
),
|
|
5929
5931
|
i !== keys.length - 1 && /* @__PURE__ */ jsx43("div", { className: "-z-10 mx-2 h-px bg-zinc-100 dark:bg-zinc-200" })
|
|
5930
|
-
] }))
|
|
5932
|
+
] }, data[0]))
|
|
5931
5933
|
] }) });
|
|
5932
5934
|
};
|
|
5933
5935
|
var keyStyles = {
|
|
@@ -6016,7 +6018,7 @@ var ReloadButton = ({
|
|
|
6016
6018
|
|
|
6017
6019
|
// src/components/databrowser/components/sidebar/search-input.tsx
|
|
6018
6020
|
import { useEffect as useEffect11, useRef as useRef4, useState as useState12 } from "react";
|
|
6019
|
-
import { IconX } from "@tabler/icons-react";
|
|
6021
|
+
import { IconX as IconX2 } from "@tabler/icons-react";
|
|
6020
6022
|
import { jsx as jsx45, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6021
6023
|
var dedupeSearchHistory = (history) => {
|
|
6022
6024
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -6130,7 +6132,7 @@ var SearchInput = () => {
|
|
|
6130
6132
|
setState("");
|
|
6131
6133
|
},
|
|
6132
6134
|
children: [
|
|
6133
|
-
/* @__PURE__ */ jsx45(
|
|
6135
|
+
/* @__PURE__ */ jsx45(IconX2, { size: 16 }),
|
|
6134
6136
|
/* @__PURE__ */ jsx45("span", { className: "sr-only", children: "Clear" })
|
|
6135
6137
|
]
|
|
6136
6138
|
}
|
|
@@ -6254,12 +6256,12 @@ import {
|
|
|
6254
6256
|
import { restrictToHorizontalAxis } from "@dnd-kit/modifiers";
|
|
6255
6257
|
import { horizontalListSortingStrategy, SortableContext, useSortable } from "@dnd-kit/sortable";
|
|
6256
6258
|
import { CSS } from "@dnd-kit/utilities";
|
|
6257
|
-
import { IconChevronDown as IconChevronDown2, IconMaximize, IconPlus as
|
|
6259
|
+
import { IconChevronDown as IconChevronDown2, IconMaximize, IconPlus as IconPlus3 } from "@tabler/icons-react";
|
|
6258
6260
|
|
|
6259
6261
|
// src/components/ui/command.tsx
|
|
6260
6262
|
import * as React13 from "react";
|
|
6261
6263
|
import { Command as CommandPrimitive } from "cmdk";
|
|
6262
|
-
import {
|
|
6264
|
+
import { IconSearch } from "@tabler/icons-react";
|
|
6263
6265
|
import { jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6264
6266
|
var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
6265
6267
|
CommandPrimitive,
|
|
@@ -6274,7 +6276,7 @@ var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
6274
6276
|
));
|
|
6275
6277
|
Command.displayName = CommandPrimitive.displayName;
|
|
6276
6278
|
var CommandInput = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs33("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
6277
|
-
/* @__PURE__ */ jsx50(
|
|
6279
|
+
/* @__PURE__ */ jsx50(IconSearch, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
6278
6280
|
/* @__PURE__ */ jsx50(
|
|
6279
6281
|
CommandPrimitive.Input,
|
|
6280
6282
|
{
|
|
@@ -6342,9 +6344,9 @@ import {
|
|
|
6342
6344
|
IconArrowsMinimize,
|
|
6343
6345
|
IconCopyPlus,
|
|
6344
6346
|
IconPin,
|
|
6345
|
-
IconSearch,
|
|
6347
|
+
IconSearch as IconSearch2,
|
|
6346
6348
|
IconSquareX,
|
|
6347
|
-
IconX as
|
|
6349
|
+
IconX as IconX3
|
|
6348
6350
|
} from "@tabler/icons-react";
|
|
6349
6351
|
|
|
6350
6352
|
// src/components/databrowser/components/tab-type-icon.tsx
|
|
@@ -6399,7 +6401,7 @@ var Tab = ({ id, isList }) => {
|
|
|
6399
6401
|
const hasPinnedTabs = tabs.some(([, data]) => data.pinned);
|
|
6400
6402
|
const { ref, isOverflow } = useOverflow();
|
|
6401
6403
|
const label = search.key || selectedKey;
|
|
6402
|
-
const iconNode = search.key ? /* @__PURE__ */ jsx52(
|
|
6404
|
+
const iconNode = search.key ? /* @__PURE__ */ jsx52(IconSearch2, { size: 15 }) : selectedKey ? /* @__PURE__ */ jsx52(TabTypeIcon, { selectedKey }) : void 0;
|
|
6403
6405
|
const tabNode = /* @__PURE__ */ jsxs34(
|
|
6404
6406
|
"div",
|
|
6405
6407
|
{
|
|
@@ -6430,7 +6432,7 @@ var Tab = ({ id, isList }) => {
|
|
|
6430
6432
|
removeTab(id);
|
|
6431
6433
|
},
|
|
6432
6434
|
className: "p-1 text-zinc-300 transition-colors hover:text-zinc-500 dark:text-zinc-400",
|
|
6433
|
-
children: /* @__PURE__ */ jsx52(
|
|
6435
|
+
children: /* @__PURE__ */ jsx52(IconX3, { size: 16 })
|
|
6434
6436
|
}
|
|
6435
6437
|
)
|
|
6436
6438
|
]
|
|
@@ -6455,7 +6457,7 @@ var Tab = ({ id, isList }) => {
|
|
|
6455
6457
|
] }),
|
|
6456
6458
|
/* @__PURE__ */ jsx52(ContextMenuSeparator, {}),
|
|
6457
6459
|
/* @__PURE__ */ jsxs34(ContextMenuItem, { onSelect: () => forceRemoveTab(id), className: "gap-2", children: [
|
|
6458
|
-
/* @__PURE__ */ jsx52(
|
|
6460
|
+
/* @__PURE__ */ jsx52(IconX3, { size: 16 }),
|
|
6459
6461
|
"Close Tab"
|
|
6460
6462
|
] }),
|
|
6461
6463
|
/* @__PURE__ */ jsxs34(ContextMenuItem, { onSelect: () => closeOtherTabs(id), className: "gap-2", children: [
|
|
@@ -6720,7 +6722,7 @@ function AddTabButton() {
|
|
|
6720
6722
|
size: "icon-sm",
|
|
6721
6723
|
onClick: handleAddTab,
|
|
6722
6724
|
className: "flex-shrink-0 dark:bg-zinc-200",
|
|
6723
|
-
children: /* @__PURE__ */ jsx53(
|
|
6725
|
+
children: /* @__PURE__ */ jsx53(IconPlus3, { className: "text-zinc-500 dark:text-zinc-600", size: 16 })
|
|
6724
6726
|
}
|
|
6725
6727
|
);
|
|
6726
6728
|
}
|
|
@@ -6783,10 +6785,11 @@ function TabsListButton({
|
|
|
6783
6785
|
// src/components/databrowser/index.tsx
|
|
6784
6786
|
import { jsx as jsx54, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6785
6787
|
var RedisBrowser = ({
|
|
6786
|
-
token,
|
|
6787
6788
|
url,
|
|
6789
|
+
token,
|
|
6788
6790
|
hideTabs,
|
|
6789
6791
|
storage,
|
|
6792
|
+
disableTelemetry,
|
|
6790
6793
|
onFullScreenClick,
|
|
6791
6794
|
theme = "light"
|
|
6792
6795
|
}) => {
|
|
@@ -6795,7 +6798,7 @@ var RedisBrowser = ({
|
|
|
6795
6798
|
useEffect14(() => {
|
|
6796
6799
|
queryClient.resetQueries();
|
|
6797
6800
|
}, [credentials.url]);
|
|
6798
|
-
return /* @__PURE__ */ jsx54(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx54(RedisProvider, { redisCredentials: credentials, children: /* @__PURE__ */ jsx54(DarkModeProvider, { theme, children: /* @__PURE__ */ jsx54(DatabrowserProvider, { storage, rootRef, children: /* @__PURE__ */ jsx54(TooltipProvider, { children: /* @__PURE__ */ jsx54(
|
|
6801
|
+
return /* @__PURE__ */ jsx54(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx54(RedisProvider, { redisCredentials: credentials, telemetry: !disableTelemetry, children: /* @__PURE__ */ jsx54(DarkModeProvider, { theme, children: /* @__PURE__ */ jsx54(DatabrowserProvider, { storage, rootRef, children: /* @__PURE__ */ jsx54(TooltipProvider, { children: /* @__PURE__ */ jsx54(
|
|
6799
6802
|
RedisBrowserRoot,
|
|
6800
6803
|
{
|
|
6801
6804
|
hideTabs,
|
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-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 ./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.8-canary-2", "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" } }
|