@upstash/react-redis-browser 0.2.5 → 0.2.7-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.mjs CHANGED
@@ -1,8 +1,26 @@
1
1
  // src/components/databrowser/index.tsx
2
- import { useEffect as useEffect14, useMemo as useMemo8 } from "react";
2
+ import { useEffect as useEffect14, useMemo as useMemo9, useRef as useRef6 } from "react";
3
+
4
+ // src/dark-mode-context.tsx
5
+ import { createContext, useContext } from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ var DarkModeContext = createContext(void 0);
8
+ var DarkModeProvider = ({
9
+ children,
10
+ darkMode
11
+ }) => {
12
+ return /* @__PURE__ */ jsx(DarkModeContext.Provider, { value: { darkMode }, children });
13
+ };
14
+ var useDarkMode = () => {
15
+ const context = useContext(DarkModeContext);
16
+ if (!context) {
17
+ throw new Error("useDarkMode must be used within a DarkModeProvider");
18
+ }
19
+ return context.darkMode;
20
+ };
3
21
 
4
22
  // src/redis-context.tsx
5
- import { createContext, useContext, useMemo } from "react";
23
+ import { createContext as createContext2, useContext as useContext2, useMemo } from "react";
6
24
 
7
25
  // src/lib/clients.ts
8
26
  import { MutationCache, QueryCache, QueryClient } from "@tanstack/react-query";
@@ -181,8 +199,8 @@ var queryClient = new QueryClient({
181
199
  });
182
200
 
183
201
  // src/redis-context.tsx
184
- import { jsx } from "react/jsx-runtime";
185
- var RedisContext = createContext(void 0);
202
+ import { jsx as jsx2 } from "react/jsx-runtime";
203
+ var RedisContext = createContext2(void 0);
186
204
  var RedisProvider = ({
187
205
  children,
188
206
  redisCredentials
@@ -195,7 +213,7 @@ var RedisProvider = ({
195
213
  () => redisClient({ credentials: redisCredentials, pipelining: false }),
196
214
  [redisCredentials]
197
215
  );
198
- return /* @__PURE__ */ jsx(
216
+ return /* @__PURE__ */ jsx2(
199
217
  RedisContext.Provider,
200
218
  {
201
219
  value: { redis: redisInstance, redisNoPipeline: redisInstanceNoPipeline },
@@ -204,7 +222,7 @@ var RedisProvider = ({
204
222
  );
205
223
  };
206
224
  var useRedis = () => {
207
- const context = useContext(RedisContext);
225
+ const context = useContext2(RedisContext);
208
226
  if (!context) {
209
227
  throw new Error("useRedis must be used within a RedisProvider");
210
228
  }
@@ -212,14 +230,15 @@ var useRedis = () => {
212
230
  };
213
231
 
214
232
  // src/store.tsx
215
- import { createContext as createContext2, useContext as useContext2, useMemo as useMemo2 } from "react";
233
+ import { createContext as createContext3, useContext as useContext3, useMemo as useMemo2 } from "react";
216
234
  import { create, useStore } from "zustand";
217
235
  import { persist } from "zustand/middleware";
218
- import { jsx as jsx2 } from "react/jsx-runtime";
219
- var DatabrowserContext = createContext2(void 0);
236
+ import { jsx as jsx3 } from "react/jsx-runtime";
237
+ var DatabrowserContext = createContext3(void 0);
220
238
  var DatabrowserProvider = ({
221
239
  children,
222
- storage
240
+ storage,
241
+ rootRef
223
242
  }) => {
224
243
  const store = useMemo2(() => {
225
244
  if (!storage) return create(storeCreator);
@@ -241,21 +260,32 @@ var DatabrowserProvider = ({
241
260
  removeItem: () => {
242
261
  }
243
262
  },
244
- version: 1,
263
+ version: 2,
245
264
  // @ts-expect-error Reset the store for < v1
246
- migrate: (state, version) => {
265
+ migrate: (originalState, version) => {
266
+ const state = originalState;
247
267
  if (version === 0) {
248
268
  return;
249
269
  }
270
+ if (version === 1) {
271
+ return {
272
+ ...state,
273
+ tabs: state.tabs.map(([id, data]) => [id, { ...data, id }])
274
+ };
275
+ }
250
276
  return state;
251
277
  }
252
278
  })
253
279
  );
254
280
  }, []);
255
- return /* @__PURE__ */ jsx2(DatabrowserContext.Provider, { value: { store }, children });
281
+ return /* @__PURE__ */ jsx3(DatabrowserContext.Provider, { value: { store, rootRef }, children });
282
+ };
283
+ var useDatabrowserRootRef = () => {
284
+ const { rootRef } = useDatabrowser();
285
+ return rootRef;
256
286
  };
257
287
  var useDatabrowser = () => {
258
- const context = useContext2(DatabrowserContext);
288
+ const context = useContext3(DatabrowserContext);
259
289
  if (!context) {
260
290
  throw new Error("useDatabrowser must be used within a DatabrowserProvider");
261
291
  }
@@ -271,8 +301,10 @@ var storeCreator = (set, get) => ({
271
301
  addTab: () => {
272
302
  const id = crypto.randomUUID();
273
303
  const newTabData = {
304
+ id,
274
305
  selectedKey: void 0,
275
- search: { key: "", type: void 0 }
306
+ search: { key: "", type: void 0 },
307
+ pinned: false
276
308
  };
277
309
  set((old) => ({
278
310
  tabs: [...old.tabs, [id, newTabData]],
@@ -282,6 +314,9 @@ var storeCreator = (set, get) => ({
282
314
  },
283
315
  reorderTabs: (oldIndex, newIndex) => {
284
316
  set((old) => {
317
+ const [, oldTabData] = old.tabs[oldIndex];
318
+ const [, newTabData] = old.tabs[newIndex];
319
+ if (oldTabData.pinned || newTabData.pinned) return old;
285
320
  const newTabs = [...old.tabs];
286
321
  const [movedTab] = newTabs.splice(oldIndex, 1);
287
322
  newTabs.splice(newIndex, 0, movedTab);
@@ -289,6 +324,22 @@ var storeCreator = (set, get) => ({
289
324
  });
290
325
  },
291
326
  removeTab: (id) => {
327
+ set((old) => {
328
+ const tabIndex = old.tabs.findIndex(([tabId]) => tabId === id);
329
+ if (tabIndex === -1) return old;
330
+ const [, tabData] = old.tabs[tabIndex];
331
+ if (tabData.pinned) return old;
332
+ const newTabs = [...old.tabs];
333
+ newTabs.splice(tabIndex, 1);
334
+ let selectedTab = old.selectedTab;
335
+ if (selectedTab === id) {
336
+ const [newId] = newTabs[tabIndex - 1] ?? newTabs[tabIndex];
337
+ selectedTab = newTabs.length > 0 ? newId : void 0;
338
+ }
339
+ return { tabs: newTabs, selectedTab };
340
+ });
341
+ },
342
+ forceRemoveTab: (id) => {
292
343
  set((old) => {
293
344
  const tabIndex = old.tabs.findIndex(([tabId]) => tabId === id);
294
345
  if (tabIndex === -1) return old;
@@ -302,6 +353,45 @@ var storeCreator = (set, get) => ({
302
353
  return { tabs: newTabs, selectedTab };
303
354
  });
304
355
  },
356
+ togglePinTab: (id) => {
357
+ set((old) => {
358
+ const tabIndex = old.tabs.findIndex(([tabId2]) => tabId2 === id);
359
+ if (tabIndex === -1) return old;
360
+ const newTabs = [...old.tabs];
361
+ const [tabId, tabData] = newTabs[tabIndex];
362
+ newTabs[tabIndex] = [tabId, { ...tabData, pinned: !tabData.pinned }];
363
+ return { ...old, tabs: newTabs };
364
+ });
365
+ },
366
+ duplicateTab: (id) => {
367
+ let newId;
368
+ set((old) => {
369
+ const tabIndex = old.tabs.findIndex(([tabId]) => tabId === id);
370
+ if (tabIndex === -1) return old;
371
+ const newTabs = [...old.tabs];
372
+ const [, tabData] = newTabs[tabIndex];
373
+ newId = crypto.randomUUID();
374
+ const duplicated = [newId, { ...tabData, id: newId }];
375
+ newTabs.splice(tabIndex + 1, 0, duplicated);
376
+ return { ...old, tabs: newTabs, selectedTab: newId };
377
+ });
378
+ return newId;
379
+ },
380
+ closeOtherTabs: (id) => {
381
+ set((old) => {
382
+ const exists = old.tabs.some(([tabId]) => tabId === id);
383
+ if (!exists) return old;
384
+ const newTabs = old.tabs.filter(([tabId]) => tabId === id);
385
+ return { ...old, tabs: newTabs, selectedTab: id };
386
+ });
387
+ },
388
+ closeAllButPinned: () => {
389
+ set((old) => {
390
+ const newTabs = old.tabs.filter(([, data]) => data.pinned);
391
+ const newSelected = newTabs.length > 0 ? newTabs[0][0] : void 0;
392
+ return { ...old, tabs: newTabs, selectedTab: newSelected };
393
+ });
394
+ },
305
395
  selectTab: (id) => {
306
396
  set({ selectedTab: id });
307
397
  },
@@ -377,14 +467,14 @@ var storeCreator = (set, get) => ({
377
467
  });
378
468
 
379
469
  // src/tab-provider.tsx
380
- import { createContext as createContext3, useContext as useContext3, useMemo as useMemo3 } from "react";
381
- import { jsx as jsx3 } from "react/jsx-runtime";
382
- var TabIdContext = createContext3(void 0);
470
+ import { createContext as createContext4, useContext as useContext4, useMemo as useMemo3 } from "react";
471
+ import { jsx as jsx4 } from "react/jsx-runtime";
472
+ var TabIdContext = createContext4(void 0);
383
473
  var TabIdProvider = ({ children, value }) => {
384
- return /* @__PURE__ */ jsx3(TabIdContext.Provider, { value, children });
474
+ return /* @__PURE__ */ jsx4(TabIdContext.Provider, { value, children });
385
475
  };
386
476
  var useTabId = () => {
387
- const tabId = useContext3(TabIdContext);
477
+ const tabId = useContext4(TabIdContext);
388
478
  if (!tabId) {
389
479
  throw new Error("useTabId must be used within a TabProvider");
390
480
  }
@@ -410,6 +500,7 @@ var useTab = () => {
410
500
  selectedKey: tabData.selectedKey,
411
501
  selectedListItem: tabData.selectedListItem,
412
502
  search: tabData.search,
503
+ pinned: tabData.pinned,
413
504
  setSelectedKey: (key) => setSelectedKey(tabId, key),
414
505
  setSelectedListItem: (item) => setSelectedListItem(tabId, item),
415
506
  setSearch: (search) => setSearch(tabId, search),
@@ -3014,9 +3105,9 @@ var cva = (base, config) => {
3014
3105
  };
3015
3106
 
3016
3107
  // src/components/ui/toast.tsx
3017
- import { jsx as jsx4 } from "react/jsx-runtime";
3108
+ import { jsx as jsx5 } from "react/jsx-runtime";
3018
3109
  var ToastProvider = ToastPrimitives.Provider;
3019
- var ToastViewport = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
3110
+ var ToastViewport = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
3020
3111
  ToastPrimitives.Viewport,
3021
3112
  {
3022
3113
  ref,
@@ -3029,12 +3120,12 @@ var ToastViewport = React2.forwardRef(({ className, ...props }, ref) => /* @__PU
3029
3120
  ));
3030
3121
  ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
3031
3122
  var toastVariants = cva(
3032
- "group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border border-zinc-200 p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full dark:border-zinc-800",
3123
+ "group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border border-zinc-200 p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
3033
3124
  {
3034
3125
  variants: {
3035
3126
  variant: {
3036
- default: "border bg-white text-zinc-950 dark:bg-zinc-950 dark:text-zinc-50",
3037
- destructive: "destructive group border-red-500 bg-red-500 text-zinc-50 dark:border-red-900 dark:bg-red-900 dark:text-zinc-50"
3127
+ default: "border bg-white text-zinc-950",
3128
+ destructive: "destructive group border-red-500 bg-red-500 text-zinc-50"
3038
3129
  }
3039
3130
  },
3040
3131
  defaultVariants: {
@@ -3043,7 +3134,7 @@ var toastVariants = cva(
3043
3134
  }
3044
3135
  );
3045
3136
  var Toast = React2.forwardRef(({ className, variant, ...props }, ref) => {
3046
- return /* @__PURE__ */ jsx4(
3137
+ return /* @__PURE__ */ jsx5(
3047
3138
  ToastPrimitives.Root,
3048
3139
  {
3049
3140
  ref,
@@ -3053,33 +3144,33 @@ var Toast = React2.forwardRef(({ className, variant, ...props }, ref) => {
3053
3144
  );
3054
3145
  });
3055
3146
  Toast.displayName = ToastPrimitives.Root.displayName;
3056
- var ToastAction = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
3147
+ var ToastAction = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
3057
3148
  ToastPrimitives.Action,
3058
3149
  {
3059
3150
  ref,
3060
3151
  className: cn(
3061
- "inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-zinc-200 bg-transparent px-3 text-sm font-medium transition-colors hover:bg-zinc-100 focus:outline-none focus:ring-1 focus:ring-zinc-950 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-zinc-100/40 group-[.destructive]:hover:border-red-500/30 group-[.destructive]:hover:bg-red-500 group-[.destructive]:hover:text-zinc-50 group-[.destructive]:focus:ring-red-500 dark:border-neutral-800 dark:hover:bg-neutral-800 dark:focus:ring-neutral-300 dark:group-[.destructive]:border-neutral-800/40 dark:group-[.destructive]:hover:border-red-900/30 dark:group-[.destructive]:hover:bg-red-900 dark:group-[.destructive]:hover:text-neutral-50 dark:group-[.destructive]:focus:ring-red-900",
3152
+ "inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-zinc-200 bg-transparent px-3 text-sm font-medium transition-colors hover:bg-zinc-100 focus:outline-none focus:ring-1 focus:ring-zinc-950 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-zinc-100/40 group-[.destructive]:hover:border-red-500/30 group-[.destructive]:hover:bg-red-500 group-[.destructive]:hover:text-zinc-50 group-[.destructive]:focus:ring-red-500",
3062
3153
  className
3063
3154
  ),
3064
3155
  ...props
3065
3156
  }
3066
3157
  ));
3067
3158
  ToastAction.displayName = ToastPrimitives.Action.displayName;
3068
- var ToastClose = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
3159
+ var ToastClose = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
3069
3160
  ToastPrimitives.Close,
3070
3161
  {
3071
3162
  ref,
3072
3163
  className: cn(
3073
- "absolute right-1 top-1 rounded-md p-1 text-neutral-950/50 opacity-0 transition-opacity hover:text-neutral-950 focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 dark:text-neutral-50/50 dark:hover:text-neutral-50",
3164
+ "absolute right-1 top-1 rounded-md p-1 text-zinc-950/50 opacity-0 transition-opacity hover:text-zinc-950 focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
3074
3165
  className
3075
3166
  ),
3076
3167
  "toast-close": "",
3077
3168
  ...props,
3078
- children: /* @__PURE__ */ jsx4(Cross2Icon, { className: "size-4" })
3169
+ children: /* @__PURE__ */ jsx5(Cross2Icon, { className: "size-4" })
3079
3170
  }
3080
3171
  ));
3081
3172
  ToastClose.displayName = ToastPrimitives.Close.displayName;
3082
- var ToastTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
3173
+ var ToastTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
3083
3174
  ToastPrimitives.Title,
3084
3175
  {
3085
3176
  ref,
@@ -3088,7 +3179,7 @@ var ToastTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE_
3088
3179
  }
3089
3180
  ));
3090
3181
  ToastTitle.displayName = ToastPrimitives.Title.displayName;
3091
- var ToastDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
3182
+ var ToastDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
3092
3183
  ToastPrimitives.Description,
3093
3184
  {
3094
3185
  ref,
@@ -3099,24 +3190,24 @@ var ToastDescription = React2.forwardRef(({ className, ...props }, ref) => /* @_
3099
3190
  ToastDescription.displayName = ToastPrimitives.Description.displayName;
3100
3191
 
3101
3192
  // src/components/ui/toaster.tsx
3102
- import { jsx as jsx5, jsxs } from "react/jsx-runtime";
3193
+ import { jsx as jsx6, jsxs } from "react/jsx-runtime";
3103
3194
  function Toaster() {
3104
3195
  const { toasts } = useToast();
3105
- return /* @__PURE__ */ jsx5(Portal, { container: portalRoot, children: /* @__PURE__ */ jsxs(ToastProvider, { children: [
3196
+ return /* @__PURE__ */ jsx6(Portal, { container: portalRoot, children: /* @__PURE__ */ jsxs(ToastProvider, { children: [
3106
3197
  toasts.map(({ id, title, description, action, ...props }) => /* @__PURE__ */ jsxs(Toast, { ...props, children: [
3107
3198
  /* @__PURE__ */ jsxs("div", { className: "grid gap-1", children: [
3108
- title && /* @__PURE__ */ jsx5(ToastTitle, { children: title }),
3109
- description && /* @__PURE__ */ jsx5(ToastDescription, { children: description })
3199
+ title && /* @__PURE__ */ jsx6(ToastTitle, { children: title }),
3200
+ description && /* @__PURE__ */ jsx6(ToastDescription, { children: description })
3110
3201
  ] }),
3111
3202
  action,
3112
- /* @__PURE__ */ jsx5(ToastClose, {})
3203
+ /* @__PURE__ */ jsx6(ToastClose, {})
3113
3204
  ] }, id)),
3114
- /* @__PURE__ */ jsx5(ToastViewport, {})
3205
+ /* @__PURE__ */ jsx6(ToastViewport, {})
3115
3206
  ] }) });
3116
3207
  }
3117
3208
 
3118
3209
  // src/components/databrowser/hooks/use-keys.tsx
3119
- import { createContext as createContext4, useContext as useContext4, useMemo as useMemo4 } from "react";
3210
+ import { createContext as createContext5, useContext as useContext5, useMemo as useMemo4 } from "react";
3120
3211
  import { useInfiniteQuery } from "@tanstack/react-query";
3121
3212
 
3122
3213
  // src/components/databrowser/hooks/use-fetch-key-type.ts
@@ -3134,8 +3225,8 @@ var useFetchKeyType = (key) => {
3134
3225
  };
3135
3226
 
3136
3227
  // src/components/databrowser/hooks/use-keys.tsx
3137
- import { jsx as jsx6 } from "react/jsx-runtime";
3138
- var KeysContext = createContext4(void 0);
3228
+ import { jsx as jsx7 } from "react/jsx-runtime";
3229
+ var KeysContext = createContext5(void 0);
3139
3230
  var FETCH_KEYS_QUERY_KEY = "use-fetch-keys";
3140
3231
  var SCAN_COUNTS = [100, 300, 500];
3141
3232
  var KeysProvider = ({ children }) => {
@@ -3208,7 +3299,7 @@ var KeysProvider = ({ children }) => {
3208
3299
  }
3209
3300
  return dedupedKeys;
3210
3301
  }, [query.data]);
3211
- return /* @__PURE__ */ jsx6(
3302
+ return /* @__PURE__ */ jsx7(
3212
3303
  KeysContext.Provider,
3213
3304
  {
3214
3305
  value: {
@@ -3220,7 +3311,7 @@ var KeysProvider = ({ children }) => {
3220
3311
  );
3221
3312
  };
3222
3313
  var useKeys = () => {
3223
- const context = useContext4(KeysContext);
3314
+ const context = useContext5(KeysContext);
3224
3315
  if (!context) {
3225
3316
  throw new Error("useKeys must be used within a KeysProvider");
3226
3317
  }
@@ -3234,24 +3325,24 @@ var useKeyType = (key) => {
3234
3325
 
3235
3326
  // src/components/databrowser/components/display/display-list.tsx
3236
3327
  import { useMemo as useMemo7 } from "react";
3237
- import { IconTrash } from "@tabler/icons-react";
3328
+ import { IconTrash as IconTrash2 } from "@tabler/icons-react";
3238
3329
 
3239
3330
  // src/components/ui/button.tsx
3240
3331
  import * as React3 from "react";
3241
3332
  import { Slot } from "@radix-ui/react-slot";
3242
- import { jsx as jsx7 } from "react/jsx-runtime";
3333
+ import { jsx as jsx8 } from "react/jsx-runtime";
3243
3334
  var buttonVariants = cva(
3244
- "inline-flex items-center justify-center rounded-md text-sm ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-zinc-300",
3335
+ "inline-flex items-center justify-center rounded-md text-sm ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
3245
3336
  {
3246
3337
  variants: {
3247
3338
  variant: {
3248
- default: "bg-white text-black border shadow-sm border-zinc-300 hover:bg-[#FFFFFF]/70 dark:bg-black dark:text-[#FFFFFF] dark:hover:bg-black/10",
3249
- destructive: "bg-red-500 text-zinc-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-zinc-50 dark:hover:bg-red-900/90",
3250
- outline: "border border-zinc-200 bg-white hover:bg-zinc-100 hover:text-zinc-900 dark:border-zinc-800 dark:bg-zinc-950 dark:hover:bg-zinc-800 dark:hover:text-neutral-50",
3251
- primary: "bg-emerald-500 text-white shadow-sm hover:bg-emerald-600 dark:bg-emerald-500 dark:text-white dark:hover:bg-emerald-600",
3252
- secondary: "bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",
3253
- ghost: "hover:bg-[#0000000A] dark:hover:bg-neutral-800 dark:hover:text-neutral-50",
3254
- link: "text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50"
3339
+ default: "bg-white text-black border shadow-sm border-zinc-300 hover:bg-white/70",
3340
+ destructive: "bg-red-500 text-zinc-50 hover:bg-red-500/90",
3341
+ outline: "border border-zinc-200 bg-white hover:bg-zinc-100 hover:text-zinc-900",
3342
+ primary: "bg-emerald-500 text-white shadow-sm hover:bg-emerald-600",
3343
+ secondary: "bg-zinc-100 text-zinc-900 hover:bg-zinc-100/80",
3344
+ ghost: "hover:bg-black/10",
3345
+ link: "text-zinc-900 underline-offset-4 hover:underline"
3255
3346
  },
3256
3347
  size: {
3257
3348
  default: "h-8 px-4 py-2",
@@ -3271,7 +3362,7 @@ var buttonVariants = cva(
3271
3362
  var Button = React3.forwardRef(
3272
3363
  ({ className, variant, size, asChild = false, ...props }, ref) => {
3273
3364
  const Comp = asChild ? Slot : "button";
3274
- return /* @__PURE__ */ jsx7(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
3365
+ return /* @__PURE__ */ jsx8(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
3275
3366
  }
3276
3367
  );
3277
3368
  Button.displayName = "Button";
@@ -3283,19 +3374,13 @@ import { useMutation } from "@tanstack/react-query";
3283
3374
  import { useQuery as useQuery2 } from "@tanstack/react-query";
3284
3375
 
3285
3376
  // src/components/ui/skeleton.tsx
3286
- import { jsx as jsx8 } from "react/jsx-runtime";
3377
+ import { jsx as jsx9 } from "react/jsx-runtime";
3287
3378
  function Skeleton({ className, ...props }) {
3288
- return /* @__PURE__ */ jsx8(
3289
- "div",
3290
- {
3291
- className: cn("animate-pulse rounded-md bg-zinc-900/10 dark:bg-zinc-50/10", className),
3292
- ...props
3293
- }
3294
- );
3379
+ return /* @__PURE__ */ jsx9("div", { className: cn("animate-pulse rounded-md bg-zinc-900/10", className), ...props });
3295
3380
  }
3296
3381
 
3297
3382
  // src/components/databrowser/components/sidebar/db-size.tsx
3298
- import { jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
3383
+ import { jsx as jsx10, jsxs as jsxs2 } from "react/jsx-runtime";
3299
3384
  var FETCH_DB_SIZE_QUERY_KEY = "fetch-db-size";
3300
3385
  var DisplayDbSize = () => {
3301
3386
  const { redis } = useRedis();
@@ -3306,7 +3391,7 @@ var DisplayDbSize = () => {
3306
3391
  }
3307
3392
  });
3308
3393
  if (keyCount === void 0) {
3309
- return /* @__PURE__ */ jsx9("div", { className: "flex items-center justify-center gap-1", children: /* @__PURE__ */ jsx9(Skeleton, { className: "h-5 w-10 rounded" }) });
3394
+ return /* @__PURE__ */ jsx10("div", { className: "flex items-center justify-center gap-1", children: /* @__PURE__ */ jsx10(Skeleton, { className: "h-5 w-10 rounded" }) });
3310
3395
  }
3311
3396
  return /* @__PURE__ */ jsxs2("div", { className: "", children: [
3312
3397
  formatNumber(keyCount),
@@ -3334,8 +3419,7 @@ var useAddKey = () => {
3334
3419
  }
3335
3420
  case "hash": {
3336
3421
  await redis.hset(key, {
3337
- field: "field",
3338
- value: "value"
3422
+ field: "value"
3339
3423
  });
3340
3424
  break;
3341
3425
  }
@@ -3719,7 +3803,7 @@ var useFetchKeySize = (dataKey) => {
3719
3803
  };
3720
3804
 
3721
3805
  // src/components/databrowser/components/display/header-badges.tsx
3722
- import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
3806
+ import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
3723
3807
  var LengthBadge = ({
3724
3808
  dataKey,
3725
3809
  type,
@@ -3727,18 +3811,18 @@ var LengthBadge = ({
3727
3811
  }) => {
3728
3812
  const { data, isLoading } = useFetchKeyLength({ dataKey, type });
3729
3813
  const length = content?.length ?? data;
3730
- return /* @__PURE__ */ jsx10(Badge, { label: "Length:", children: isLoading ? /* @__PURE__ */ jsx10(Skeleton, { className: "ml-1 h-3 w-10 rounded-md opacity-50" }) : length });
3814
+ return /* @__PURE__ */ jsx11(Badge, { label: "Length:", children: isLoading ? /* @__PURE__ */ jsx11(Skeleton, { className: "ml-1 h-3 w-10 rounded-md opacity-50" }) : length });
3731
3815
  };
3732
3816
  var SizeBadge = ({ dataKey }) => {
3733
3817
  const { data: size } = useFetchKeySize(dataKey);
3734
- return /* @__PURE__ */ jsx10(Badge, { label: "Size:", children: size === void 0 || size === null ? /* @__PURE__ */ jsx10(Skeleton, { className: "ml-1 h-3 w-10 rounded-md opacity-50" }) : bytes(size, {
3818
+ return /* @__PURE__ */ jsx11(Badge, { label: "Size:", children: size === void 0 || size === null ? /* @__PURE__ */ jsx11(Skeleton, { className: "ml-1 h-3 w-10 rounded-md opacity-50" }) : bytes(size, {
3735
3819
  unitSeparator: " "
3736
3820
  }) });
3737
3821
  };
3738
3822
  var HeaderTTLBadge = ({ dataKey }) => {
3739
3823
  const { data: expireAt } = useFetchTTL(dataKey);
3740
3824
  const { mutate: setTTL, isPending } = useSetTTL();
3741
- return /* @__PURE__ */ jsx10(
3825
+ return /* @__PURE__ */ jsx11(
3742
3826
  TTLBadge,
3743
3827
  {
3744
3828
  expireAt,
@@ -3748,8 +3832,8 @@ var HeaderTTLBadge = ({ dataKey }) => {
3748
3832
  );
3749
3833
  };
3750
3834
  var Badge = ({ children, label }) => /* @__PURE__ */ jsxs3("div", { className: "flex h-6 items-center gap-0.5 rounded-md bg-white px-2 text-xs text-zinc-700", children: [
3751
- /* @__PURE__ */ jsx10("span", { className: "text-zinc-500", children: label }),
3752
- /* @__PURE__ */ jsx10("span", { className: "font-medium", children })
3835
+ /* @__PURE__ */ jsx11("span", { className: "text-zinc-500", children: label }),
3836
+ /* @__PURE__ */ jsx11("span", { className: "font-medium", children })
3753
3837
  ] });
3754
3838
 
3755
3839
  // src/components/databrowser/components/display/ttl-popover.tsx
@@ -3758,15 +3842,15 @@ import { Controller, useForm } from "react-hook-form";
3758
3842
 
3759
3843
  // src/components/ui/input.tsx
3760
3844
  import * as React4 from "react";
3761
- import { jsx as jsx11 } from "react/jsx-runtime";
3845
+ import { jsx as jsx12 } from "react/jsx-runtime";
3762
3846
  var Input = React4.forwardRef(
3763
3847
  ({ className, type, ...props }, ref) => {
3764
- return /* @__PURE__ */ jsx11(
3848
+ return /* @__PURE__ */ jsx12(
3765
3849
  "input",
3766
3850
  {
3767
3851
  type,
3768
3852
  className: cn(
3769
- "flex h-8 w-full rounded-md border border-zinc-200 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-zinc-950 disabled:cursor-not-allowed disabled:opacity-50",
3853
+ "flex h-8 w-full rounded-md border border-zinc-200 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-zinc-950 disabled:cursor-not-allowed disabled:opacity-50",
3770
3854
  className
3771
3855
  ),
3772
3856
  ref,
@@ -3780,17 +3864,17 @@ Input.displayName = "Input";
3780
3864
  // src/components/ui/popover.tsx
3781
3865
  import * as React5 from "react";
3782
3866
  import * as PopoverPrimitive from "@radix-ui/react-popover";
3783
- import { jsx as jsx12 } from "react/jsx-runtime";
3867
+ import { jsx as jsx13 } from "react/jsx-runtime";
3784
3868
  var Popover = PopoverPrimitive.Root;
3785
3869
  var PopoverTrigger = PopoverPrimitive.Trigger;
3786
- var PopoverContent = React5.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx12(PopoverPrimitive.Portal, { container: portalRoot, children: /* @__PURE__ */ jsx12(
3870
+ var PopoverContent = React5.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx13(PopoverPrimitive.Portal, { container: portalRoot, children: /* @__PURE__ */ jsx13(
3787
3871
  PopoverPrimitive.Content,
3788
3872
  {
3789
3873
  ref,
3790
3874
  align,
3791
3875
  sideOffset,
3792
3876
  className: cn(
3793
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border border-zinc-200 bg-white p-4 text-zinc-950 shadow-md outline-none dark:border-zinc-800 mt-0.5 dark:bg-zinc-950 dark:text-zinc-50",
3877
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border border-zinc-200 bg-white p-4 text-zinc-950 shadow-md outline-none mt-0.5",
3794
3878
  className
3795
3879
  ),
3796
3880
  ...props
@@ -3801,7 +3885,7 @@ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
3801
3885
  // src/components/ui/select.tsx
3802
3886
  import * as React6 from "react";
3803
3887
  import * as SelectPrimitive from "@radix-ui/react-select";
3804
- import { jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
3888
+ import { jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
3805
3889
  var Select = SelectPrimitive.Root;
3806
3890
  var SelectGroup = SelectPrimitive.Group;
3807
3891
  var SelectValue = SelectPrimitive.Value;
@@ -3810,13 +3894,13 @@ var SelectTrigger = React6.forwardRef(({ className, children, ...props }, ref) =
3810
3894
  {
3811
3895
  ref,
3812
3896
  className: cn(
3813
- "relative flex h-8 w-full items-center justify-between rounded-md border border-zinc-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-zinc-500 focus:ring-zinc-950 disabled:cursor-not-allowed disabled:opacity-50 dark:border-zinc-800 dark:bg-zinc-950 dark:ring-offset-zinc-950 dark:placeholder:text-zinc-400 dark:focus:ring-zinc-300",
3897
+ "relative flex h-8 w-full items-center justify-between rounded-md border border-zinc-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-zinc-500 focus:ring-zinc-950 disabled:cursor-not-allowed disabled:opacity-50",
3814
3898
  className
3815
3899
  ),
3816
3900
  ...props,
3817
3901
  children: [
3818
3902
  children,
3819
- /* @__PURE__ */ jsx13(SelectPrimitive.Icon, { asChild: true, className: "absolute right-2", children: /* @__PURE__ */ jsx13(
3903
+ /* @__PURE__ */ jsx14(SelectPrimitive.Icon, { asChild: true, className: "absolute right-2", children: /* @__PURE__ */ jsx14(
3820
3904
  "svg",
3821
3905
  {
3822
3906
  width: "16",
@@ -3824,13 +3908,13 @@ var SelectTrigger = React6.forwardRef(({ className, children, ...props }, ref) =
3824
3908
  viewBox: "0 0 16 16",
3825
3909
  fill: "none",
3826
3910
  xmlns: "http://www.w3.org/2000/svg",
3827
- children: /* @__PURE__ */ jsx13(
3911
+ children: /* @__PURE__ */ jsx14(
3828
3912
  "path",
3829
3913
  {
3830
3914
  d: "M4 6L8 10L12 6",
3831
- stroke: "black",
3915
+ stroke: "currentColor",
3832
3916
  strokeOpacity: "0.4",
3833
- strokeWidth: "1.4",
3917
+ strokeWidth: "1.2",
3834
3918
  strokeLinecap: "round",
3835
3919
  strokeLinejoin: "round"
3836
3920
  }
@@ -3841,18 +3925,18 @@ var SelectTrigger = React6.forwardRef(({ className, children, ...props }, ref) =
3841
3925
  }
3842
3926
  ));
3843
3927
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
3844
- var SelectContent = React6.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx13(SelectPrimitive.Portal, { container: portalRoot, children: /* @__PURE__ */ jsx13(
3928
+ var SelectContent = React6.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx14(SelectPrimitive.Portal, { container: portalRoot, children: /* @__PURE__ */ jsx14(
3845
3929
  SelectPrimitive.Content,
3846
3930
  {
3847
3931
  ref,
3848
3932
  className: cn(
3849
- "relative z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 bg-white text-zinc-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-zinc-800 dark:bg-zinc-950 dark:text-neutral-50",
3933
+ "relative z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 bg-white text-zinc-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
3850
3934
  position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
3851
3935
  className
3852
3936
  ),
3853
3937
  position,
3854
3938
  ...props,
3855
- children: /* @__PURE__ */ jsx13(
3939
+ children: /* @__PURE__ */ jsx14(
3856
3940
  SelectPrimitive.Viewport,
3857
3941
  {
3858
3942
  className: cn(
@@ -3865,7 +3949,7 @@ var SelectContent = React6.forwardRef(({ className, children, position = "popper
3865
3949
  }
3866
3950
  ) }));
3867
3951
  SelectContent.displayName = SelectPrimitive.Content.displayName;
3868
- var SelectLabel = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
3952
+ var SelectLabel = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
3869
3953
  SelectPrimitive.Label,
3870
3954
  {
3871
3955
  ref,
@@ -3879,12 +3963,12 @@ var SelectItem = React6.forwardRef(({ className, children, ...props }, ref) => /
3879
3963
  {
3880
3964
  ref,
3881
3965
  className: cn(
3882
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",
3966
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3883
3967
  className
3884
3968
  ),
3885
3969
  ...props,
3886
3970
  children: [
3887
- /* @__PURE__ */ jsx13("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx13(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx13(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx13(
3971
+ /* @__PURE__ */ jsx14("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx14(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx14(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx14(
3888
3972
  "svg",
3889
3973
  {
3890
3974
  width: "15",
@@ -3893,7 +3977,7 @@ var SelectItem = React6.forwardRef(({ className, children, ...props }, ref) => /
3893
3977
  fill: "none",
3894
3978
  xmlns: "http://www.w3.org/2000/svg",
3895
3979
  className: "h-4 w-4",
3896
- children: /* @__PURE__ */ jsx13(
3980
+ children: /* @__PURE__ */ jsx14(
3897
3981
  "path",
3898
3982
  {
3899
3983
  d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
@@ -3904,32 +3988,32 @@ var SelectItem = React6.forwardRef(({ className, children, ...props }, ref) => /
3904
3988
  )
3905
3989
  }
3906
3990
  ) }) }) }),
3907
- /* @__PURE__ */ jsx13(SelectPrimitive.ItemText, { children })
3991
+ /* @__PURE__ */ jsx14(SelectPrimitive.ItemText, { children })
3908
3992
  ]
3909
3993
  }
3910
3994
  ));
3911
3995
  SelectItem.displayName = SelectPrimitive.Item.displayName;
3912
- var SelectSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
3996
+ var SelectSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
3913
3997
  SelectPrimitive.Separator,
3914
3998
  {
3915
3999
  ref,
3916
- className: cn("-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800", className),
4000
+ className: cn("-mx-1 my-1 h-px bg-zinc-100", className),
3917
4001
  ...props
3918
4002
  }
3919
4003
  ));
3920
4004
  SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
3921
4005
 
3922
4006
  // src/components/ui/spinner.tsx
3923
- import { Fragment, jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
4007
+ import { Fragment, jsx as jsx15, jsxs as jsxs5 } from "react/jsx-runtime";
3924
4008
  var Spinner = ({
3925
4009
  isLoading,
3926
4010
  className,
3927
4011
  isLoadingText,
3928
4012
  children
3929
4013
  }) => {
3930
- return /* @__PURE__ */ jsx14("div", { className: className ?? "flex items-center", children: isLoading ? /* @__PURE__ */ jsxs5(Fragment, { children: [
4014
+ return /* @__PURE__ */ jsx15("div", { className: className ?? "flex items-center", children: isLoading ? /* @__PURE__ */ jsxs5(Fragment, { children: [
3931
4015
  isLoadingText,
3932
- /* @__PURE__ */ jsx14(
4016
+ /* @__PURE__ */ jsx15(
3933
4017
  "svg",
3934
4018
  {
3935
4019
  xmlns: "http://www.w3.org/2000/svg",
@@ -3938,18 +4022,18 @@ var Spinner = ({
3938
4022
  viewBox: "0 0 24 24",
3939
4023
  fill: "none",
3940
4024
  stroke: "currentColor",
3941
- strokeWidth: "2",
4025
+ strokeWidth: "1.2",
3942
4026
  strokeLinecap: "round",
3943
4027
  strokeLinejoin: "round",
3944
4028
  className: cn("h-4 w-4 animate-spin", isLoadingText ? "ml-2" : ""),
3945
- children: /* @__PURE__ */ jsx14("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
4029
+ children: /* @__PURE__ */ jsx15("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
3946
4030
  }
3947
4031
  )
3948
4032
  ] }) : children });
3949
4033
  };
3950
4034
 
3951
4035
  // src/components/databrowser/components/display/ttl-popover.tsx
3952
- import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
4036
+ import { jsx as jsx16, jsxs as jsxs6 } from "react/jsx-runtime";
3953
4037
  var timeUnits = [
3954
4038
  { label: "Seconds", value: 1 },
3955
4039
  { label: "Minutes", value: 60 },
@@ -3991,8 +4075,8 @@ function TTLPopover({
3991
4075
  setOpen(isOpen);
3992
4076
  },
3993
4077
  children: [
3994
- /* @__PURE__ */ jsx15(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx15("button", { children }) }),
3995
- /* @__PURE__ */ jsx15(PopoverContent, { className: "w-[300px]", align: "end", children: /* @__PURE__ */ jsxs6(
4078
+ /* @__PURE__ */ jsx16(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx16("button", { children }) }),
4079
+ /* @__PURE__ */ jsx16(PopoverContent, { className: "w-[300px]", align: "end", children: /* @__PURE__ */ jsxs6(
3996
4080
  "form",
3997
4081
  {
3998
4082
  className: "space-y-4",
@@ -4001,10 +4085,10 @@ function TTLPopover({
4001
4085
  e.stopPropagation();
4002
4086
  },
4003
4087
  children: [
4004
- /* @__PURE__ */ jsx15("h4", { className: "font-medium leading-none", children: "Expiration" }),
4088
+ /* @__PURE__ */ jsx16("h4", { className: "font-medium leading-none", children: "Expiration" }),
4005
4089
  /* @__PURE__ */ jsxs6("div", { children: [
4006
4090
  /* @__PURE__ */ jsxs6("div", { className: "flex items-center", children: [
4007
- /* @__PURE__ */ jsx15(
4091
+ /* @__PURE__ */ jsx16(
4008
4092
  Controller,
4009
4093
  {
4010
4094
  rules: {
@@ -4013,26 +4097,26 @@ function TTLPopover({
4013
4097
  },
4014
4098
  control,
4015
4099
  name: "value",
4016
- render: ({ field }) => /* @__PURE__ */ jsx15(Input, { min: "-1", ...field, className: "grow rounded-r-none" })
4100
+ render: ({ field }) => /* @__PURE__ */ jsx16(Input, { min: "-1", ...field, className: "grow rounded-r-none" })
4017
4101
  }
4018
4102
  ),
4019
- /* @__PURE__ */ jsx15(
4103
+ /* @__PURE__ */ jsx16(
4020
4104
  Controller,
4021
4105
  {
4022
4106
  control,
4023
4107
  name: "type",
4024
4108
  render: ({ field }) => /* @__PURE__ */ jsxs6(Select, { value: field.value, onValueChange: field.onChange, children: [
4025
- /* @__PURE__ */ jsx15(SelectTrigger, { className: "w-auto rounded-l-none border-l-0 pr-8", children: /* @__PURE__ */ jsx15(SelectValue, {}) }),
4026
- /* @__PURE__ */ jsx15(SelectContent, { children: timeUnits.map((unit) => /* @__PURE__ */ jsx15(SelectItem, { value: unit.label, children: unit.label }, unit.label)) })
4109
+ /* @__PURE__ */ jsx16(SelectTrigger, { className: "w-auto rounded-l-none border-l-0 pr-8", children: /* @__PURE__ */ jsx16(SelectValue, {}) }),
4110
+ /* @__PURE__ */ jsx16(SelectContent, { children: timeUnits.map((unit) => /* @__PURE__ */ jsx16(SelectItem, { value: unit.label, children: unit.label }, unit.label)) })
4027
4111
  ] })
4028
4112
  }
4029
4113
  )
4030
4114
  ] }),
4031
- formState.errors.value && /* @__PURE__ */ jsx15("p", { className: "mt-2 text-xs text-red-500", children: formState.errors.value.message }),
4032
- /* @__PURE__ */ jsx15("p", { className: "mt-2 text-xs text-zinc-500", children: "TTL sets a timer to automatically delete keys after a defined period." })
4115
+ formState.errors.value && /* @__PURE__ */ jsx16("p", { className: "mt-2 text-xs text-red-500", children: formState.errors.value.message }),
4116
+ /* @__PURE__ */ jsx16("p", { className: "mt-2 text-xs text-zinc-500", children: "TTL sets a timer to automatically delete keys after a defined period." })
4033
4117
  ] }),
4034
4118
  /* @__PURE__ */ jsxs6("div", { className: "flex justify-between", children: [
4035
- /* @__PURE__ */ jsx15(
4119
+ /* @__PURE__ */ jsx16(
4036
4120
  Button,
4037
4121
  {
4038
4122
  type: "button",
@@ -4043,8 +4127,8 @@ function TTLPopover({
4043
4127
  }
4044
4128
  ),
4045
4129
  /* @__PURE__ */ jsxs6("div", { className: "flex gap-2", children: [
4046
- /* @__PURE__ */ jsx15(Button, { variant: "outline", onClick: () => setOpen(false), type: "button", children: "Cancel" }),
4047
- /* @__PURE__ */ jsx15(Button, { variant: "primary", type: "submit", children: /* @__PURE__ */ jsx15(Spinner, { isLoading: isPending, isLoadingText: "Saving", children: "Save" }) })
4130
+ /* @__PURE__ */ jsx16(Button, { variant: "outline", onClick: () => setOpen(false), type: "button", children: "Cancel" }),
4131
+ /* @__PURE__ */ jsx16(Button, { variant: "primary", type: "submit", children: /* @__PURE__ */ jsx16(Spinner, { isLoading: isPending, isLoadingText: "Saving", children: "Save" }) })
4048
4132
  ] })
4049
4133
  ] })
4050
4134
  ]
@@ -4056,7 +4140,7 @@ function TTLPopover({
4056
4140
  }
4057
4141
 
4058
4142
  // src/components/databrowser/components/display/ttl-badge.tsx
4059
- import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
4143
+ import { jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
4060
4144
  var TTL_INFINITE = -1;
4061
4145
  var TTL_NOT_FOUND = -2;
4062
4146
  var calculateTTL = (expireAt) => {
@@ -4078,9 +4162,9 @@ var TTLBadge = ({
4078
4162
  }, 1e3);
4079
4163
  return () => clearInterval(interval);
4080
4164
  }, [expireAt]);
4081
- return /* @__PURE__ */ jsx16(Badge, { label, children: ttl === void 0 ? /* @__PURE__ */ jsx16(Skeleton, { className: "ml-1 h-3 w-10 rounded-md opacity-50" }) : /* @__PURE__ */ jsx16(TTLPopover, { ttl, setTTL, isPending, children: /* @__PURE__ */ jsxs7("div", { className: "flex gap-[2px]", children: [
4165
+ return /* @__PURE__ */ jsx17(Badge, { label, children: ttl === void 0 ? /* @__PURE__ */ jsx17(Skeleton, { className: "ml-1 h-3 w-10 rounded-md opacity-50" }) : /* @__PURE__ */ jsx17(TTLPopover, { ttl, setTTL, isPending, children: /* @__PURE__ */ jsxs7("div", { className: "flex gap-[2px]", children: [
4082
4166
  ttl === TTL_INFINITE ? "Forever" : formatTime(ttl),
4083
- /* @__PURE__ */ jsx16(IconChevronDown, { className: "mt-[1px] text-zinc-400", size: 12 })
4167
+ /* @__PURE__ */ jsx17(IconChevronDown, { className: "mt-[1px] text-zinc-400", size: 12 })
4084
4168
  ] }) }) });
4085
4169
  };
4086
4170
 
@@ -4150,13 +4234,14 @@ var useSetTTL = () => {
4150
4234
 
4151
4235
  // src/components/databrowser/components/item-context-menu.tsx
4152
4236
  import { useState as useState5 } from "react";
4237
+ import { IconCopy, IconExternalLink, IconTrash } from "@tabler/icons-react";
4153
4238
  import { ContextMenuSeparator as ContextMenuSeparator2 } from "@radix-ui/react-context-menu";
4154
4239
 
4155
4240
  // src/components/ui/context-menu.tsx
4156
4241
  import * as React7 from "react";
4157
4242
  import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
4158
4243
  import { CheckIcon, ChevronRightIcon, DotFilledIcon } from "@radix-ui/react-icons";
4159
- import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
4244
+ import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
4160
4245
  var ContextMenu = ContextMenuPrimitive.Root;
4161
4246
  var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
4162
4247
  var ContextMenuSubTrigger = React7.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
@@ -4164,48 +4249,48 @@ var ContextMenuSubTrigger = React7.forwardRef(({ className, inset, children, ...
4164
4249
  {
4165
4250
  ref,
4166
4251
  className: cn(
4167
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50",
4252
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[state=open]:bg-zinc-100 data-[state=open]:text-zinc-900",
4168
4253
  inset && "pl-8",
4169
4254
  className
4170
4255
  ),
4171
4256
  ...props,
4172
4257
  children: [
4173
4258
  children,
4174
- /* @__PURE__ */ jsx17(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
4259
+ /* @__PURE__ */ jsx18(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
4175
4260
  ]
4176
4261
  }
4177
4262
  ));
4178
4263
  ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
4179
- var ContextMenuSubContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
4264
+ var ContextMenuSubContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
4180
4265
  ContextMenuPrimitive.SubContent,
4181
4266
  {
4182
4267
  ref,
4183
4268
  className: cn(
4184
- "z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
4269
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 bg-white p-1 text-zinc-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
4185
4270
  className
4186
4271
  ),
4187
4272
  ...props
4188
4273
  }
4189
4274
  ));
4190
4275
  ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
4191
- var ContextMenuContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(ContextMenuPrimitive.Portal, { container: portalRoot, children: /* @__PURE__ */ jsx17(
4276
+ var ContextMenuContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(ContextMenuPrimitive.Portal, { container: portalRoot, children: /* @__PURE__ */ jsx18(
4192
4277
  ContextMenuPrimitive.Content,
4193
4278
  {
4194
4279
  ref,
4195
4280
  className: cn(
4196
- "z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
4281
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 bg-white p-1 text-zinc-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
4197
4282
  className
4198
4283
  ),
4199
4284
  ...props
4200
4285
  }
4201
4286
  ) }));
4202
4287
  ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
4203
- var ContextMenuItem = React7.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx17(
4288
+ var ContextMenuItem = React7.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx18(
4204
4289
  ContextMenuPrimitive.Item,
4205
4290
  {
4206
4291
  ref,
4207
4292
  className: cn(
4208
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",
4293
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
4209
4294
  inset && "pl-8",
4210
4295
  className
4211
4296
  ),
@@ -4218,13 +4303,13 @@ var ContextMenuCheckboxItem = React7.forwardRef(({ className, children, checked,
4218
4303
  {
4219
4304
  ref,
4220
4305
  className: cn(
4221
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",
4306
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
4222
4307
  className
4223
4308
  ),
4224
4309
  checked,
4225
4310
  ...props,
4226
4311
  children: [
4227
- /* @__PURE__ */ jsx17("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx17(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx17(CheckIcon, { className: "h-4 w-4" }) }) }),
4312
+ /* @__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(CheckIcon, { className: "h-4 w-4" }) }) }),
4228
4313
  children
4229
4314
  ]
4230
4315
  }
@@ -4235,66 +4320,53 @@ var ContextMenuRadioItem = React7.forwardRef(({ className, children, ...props },
4235
4320
  {
4236
4321
  ref,
4237
4322
  className: cn(
4238
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",
4323
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
4239
4324
  className
4240
4325
  ),
4241
4326
  ...props,
4242
4327
  children: [
4243
- /* @__PURE__ */ jsx17("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx17(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx17(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
4328
+ /* @__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(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
4244
4329
  children
4245
4330
  ]
4246
4331
  }
4247
4332
  ));
4248
4333
  ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
4249
- var ContextMenuLabel = React7.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx17(
4334
+ var ContextMenuLabel = React7.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx18(
4250
4335
  ContextMenuPrimitive.Label,
4251
4336
  {
4252
4337
  ref,
4253
- className: cn(
4254
- "px-2 py-1.5 text-sm font-semibold text-neutral-950 dark:text-neutral-50",
4255
- inset && "pl-8",
4256
- className
4257
- ),
4338
+ className: cn("px-2 py-1.5 text-sm font-semibold text-zinc-950", inset && "pl-8", className),
4258
4339
  ...props
4259
4340
  }
4260
4341
  ));
4261
4342
  ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
4262
- var ContextMenuSeparator = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
4343
+ var ContextMenuSeparator = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
4263
4344
  ContextMenuPrimitive.Separator,
4264
4345
  {
4265
4346
  ref,
4266
- className: cn("-mx-1 my-1 h-px bg-neutral-200 dark:bg-neutral-800", className),
4347
+ className: cn("-mx-1 my-1 h-px bg-zinc-200", className),
4267
4348
  ...props
4268
4349
  }
4269
4350
  ));
4270
4351
  ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
4271
4352
  var ContextMenuShortcut = ({ className, ...props }) => {
4272
- return /* @__PURE__ */ jsx17(
4273
- "span",
4274
- {
4275
- className: cn(
4276
- "ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400",
4277
- className
4278
- ),
4279
- ...props
4280
- }
4281
- );
4353
+ return /* @__PURE__ */ jsx18("span", { className: cn("ml-auto text-xs tracking-widest text-zinc-500", className), ...props });
4282
4354
  };
4283
4355
  ContextMenuShortcut.displayName = "ContextMenuShortcut";
4284
4356
 
4285
4357
  // src/components/ui/alert-dialog.tsx
4286
4358
  import * as React8 from "react";
4287
4359
  import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
4288
- import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
4360
+ import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
4289
4361
  var AlertDialog = AlertDialogPrimitive.Root;
4290
4362
  var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
4291
- var AlertDialogPortal = ({ ...props }) => /* @__PURE__ */ jsx18(AlertDialogPrimitive.Portal, { container: portalRoot, ...props });
4363
+ var AlertDialogPortal = ({ ...props }) => /* @__PURE__ */ jsx19(AlertDialogPrimitive.Portal, { container: portalRoot, ...props });
4292
4364
  AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName;
4293
- var AlertDialogOverlay = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
4365
+ var AlertDialogOverlay = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
4294
4366
  AlertDialogPrimitive.Overlay,
4295
4367
  {
4296
4368
  className: cn(
4297
- "fixed inset-0 z-50 bg-white/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 dark:bg-zinc-950/80",
4369
+ "fixed inset-0 z-50 bg-white/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
4298
4370
  className
4299
4371
  ),
4300
4372
  ...props,
@@ -4303,13 +4375,13 @@ var AlertDialogOverlay = React8.forwardRef(({ className, ...props }, ref) => /*
4303
4375
  ));
4304
4376
  AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
4305
4377
  var AlertDialogContent = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs9(AlertDialogPortal, { children: [
4306
- /* @__PURE__ */ jsx18(AlertDialogOverlay, {}),
4307
- /* @__PURE__ */ jsx18(
4378
+ /* @__PURE__ */ jsx19(AlertDialogOverlay, {}),
4379
+ /* @__PURE__ */ jsx19(
4308
4380
  AlertDialogPrimitive.Content,
4309
4381
  {
4310
4382
  ref,
4311
4383
  className: cn(
4312
- "antialiased data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-zinc-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] dark:border-zinc-800 dark:bg-zinc-950 sm:rounded-lg md:w-full",
4384
+ "antialiased data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:slide-in-from-top-[48%]sm:rounded-lg fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-zinc-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 md:w-full",
4313
4385
  className
4314
4386
  ),
4315
4387
  ...props
@@ -4317,9 +4389,9 @@ var AlertDialogContent = React8.forwardRef(({ className, ...props }, ref) => /*
4317
4389
  )
4318
4390
  ] }));
4319
4391
  AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
4320
- var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx18("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
4392
+ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx19("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
4321
4393
  AlertDialogHeader.displayName = "AlertDialogHeader";
4322
- var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx18(
4394
+ var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx19(
4323
4395
  "div",
4324
4396
  {
4325
4397
  className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
@@ -4327,7 +4399,7 @@ var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx18(
4327
4399
  }
4328
4400
  );
4329
4401
  AlertDialogFooter.displayName = "AlertDialogFooter";
4330
- var AlertDialogTitle = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
4402
+ var AlertDialogTitle = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
4331
4403
  AlertDialogPrimitive.Title,
4332
4404
  {
4333
4405
  ref,
@@ -4336,18 +4408,18 @@ var AlertDialogTitle = React8.forwardRef(({ className, ...props }, ref) => /* @_
4336
4408
  }
4337
4409
  ));
4338
4410
  AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
4339
- var AlertDialogDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
4411
+ var AlertDialogDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
4340
4412
  AlertDialogPrimitive.Description,
4341
4413
  {
4342
4414
  ref,
4343
- className: cn("text-sm text-zinc-500 dark:text-zinc-400", className),
4415
+ className: cn("text-sm text-zinc-500", className),
4344
4416
  ...props
4345
4417
  }
4346
4418
  ));
4347
4419
  AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
4348
- var AlertDialogAction = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(AlertDialogPrimitive.Action, { ref, className: cn(buttonVariants(), className), ...props }));
4420
+ var AlertDialogAction = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(AlertDialogPrimitive.Action, { ref, className: cn(buttonVariants(), className), ...props }));
4349
4421
  AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
4350
- var AlertDialogCancel = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
4422
+ var AlertDialogCancel = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
4351
4423
  AlertDialogPrimitive.Cancel,
4352
4424
  {
4353
4425
  ref,
@@ -4358,7 +4430,7 @@ var AlertDialogCancel = React8.forwardRef(({ className, ...props }, ref) => /* @
4358
4430
  AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
4359
4431
 
4360
4432
  // src/components/databrowser/components/display/delete-alert-dialog.tsx
4361
- import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
4433
+ import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
4362
4434
  function DeleteAlertDialog({
4363
4435
  children,
4364
4436
  onDeleteConfirm,
@@ -4367,24 +4439,24 @@ function DeleteAlertDialog({
4367
4439
  deletionType
4368
4440
  }) {
4369
4441
  return /* @__PURE__ */ jsxs10(AlertDialog, { open, onOpenChange, children: [
4370
- children && /* @__PURE__ */ jsx19(AlertDialogTrigger, { asChild: true, children }),
4442
+ children && /* @__PURE__ */ jsx20(AlertDialogTrigger, { asChild: true, children }),
4371
4443
  /* @__PURE__ */ jsxs10(AlertDialogContent, { children: [
4372
4444
  /* @__PURE__ */ jsxs10(AlertDialogHeader, { children: [
4373
- /* @__PURE__ */ jsx19(AlertDialogTitle, { children: deletionType === "item" ? "Delete Item" : "Delete Key" }),
4445
+ /* @__PURE__ */ jsx20(AlertDialogTitle, { children: deletionType === "item" ? "Delete Item" : "Delete Key" }),
4374
4446
  /* @__PURE__ */ jsxs10(AlertDialogDescription, { className: "mt-5", children: [
4375
4447
  "Are you sure you want to delete this ",
4376
4448
  deletionType,
4377
4449
  "?",
4378
- /* @__PURE__ */ jsx19("br", {}),
4450
+ /* @__PURE__ */ jsx20("br", {}),
4379
4451
  "This action cannot be undone."
4380
4452
  ] })
4381
4453
  ] }),
4382
4454
  /* @__PURE__ */ jsxs10(AlertDialogFooter, { children: [
4383
- /* @__PURE__ */ jsx19(AlertDialogCancel, { type: "button", children: "Cancel" }),
4384
- /* @__PURE__ */ jsx19(
4455
+ /* @__PURE__ */ jsx20(AlertDialogCancel, { type: "button", children: "Cancel" }),
4456
+ /* @__PURE__ */ jsx20(
4385
4457
  AlertDialogAction,
4386
4458
  {
4387
- className: "bg-red-500 text-gray-50 hover:bg-red-600",
4459
+ className: "bg-red-500 text-zinc-50 hover:bg-red-600",
4388
4460
  onClick: onDeleteConfirm,
4389
4461
  children: "Yes, Delete"
4390
4462
  }
@@ -4395,7 +4467,7 @@ function DeleteAlertDialog({
4395
4467
  }
4396
4468
 
4397
4469
  // src/components/databrowser/components/item-context-menu.tsx
4398
- import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
4470
+ import { Fragment as Fragment2, jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
4399
4471
  var ItemContextMenu = ({
4400
4472
  children,
4401
4473
  dataKey,
@@ -4406,7 +4478,7 @@ var ItemContextMenu = ({
4406
4478
  const [data, setData] = useState5();
4407
4479
  const { addTab, setSelectedKey, selectTab, setSelectedListItem } = useDatabrowserStore();
4408
4480
  return /* @__PURE__ */ jsxs11(Fragment2, { children: [
4409
- /* @__PURE__ */ jsx20(
4481
+ /* @__PURE__ */ jsx21(
4410
4482
  DeleteAlertDialog,
4411
4483
  {
4412
4484
  deletionType: "item",
@@ -4428,7 +4500,7 @@ var ItemContextMenu = ({
4428
4500
  }
4429
4501
  ),
4430
4502
  /* @__PURE__ */ jsxs11(ContextMenu, { modal: false, children: [
4431
- /* @__PURE__ */ jsx20(
4503
+ /* @__PURE__ */ jsx21(
4432
4504
  ContextMenuTrigger,
4433
4505
  {
4434
4506
  asChild: true,
@@ -4448,7 +4520,7 @@ var ItemContextMenu = ({
4448
4520
  }
4449
4521
  ),
4450
4522
  /* @__PURE__ */ jsxs11(ContextMenuContent, { children: [
4451
- /* @__PURE__ */ jsx20(
4523
+ /* @__PURE__ */ jsxs11(
4452
4524
  ContextMenuItem,
4453
4525
  {
4454
4526
  onClick: () => {
@@ -4458,10 +4530,14 @@ var ItemContextMenu = ({
4458
4530
  description: "Key copied to clipboard"
4459
4531
  });
4460
4532
  },
4461
- children: "Copy key"
4533
+ className: "gap-2",
4534
+ children: [
4535
+ /* @__PURE__ */ jsx21(IconCopy, { size: 16 }),
4536
+ "Copy key"
4537
+ ]
4462
4538
  }
4463
4539
  ),
4464
- data?.value && /* @__PURE__ */ jsx20(
4540
+ data?.value && /* @__PURE__ */ jsxs11(
4465
4541
  ContextMenuItem,
4466
4542
  {
4467
4543
  onClick: () => {
@@ -4470,10 +4546,14 @@ var ItemContextMenu = ({
4470
4546
  description: "Value copied to clipboard"
4471
4547
  });
4472
4548
  },
4473
- children: "Copy value"
4549
+ className: "gap-2",
4550
+ children: [
4551
+ /* @__PURE__ */ jsx21(IconCopy, { size: 16 }),
4552
+ "Copy value"
4553
+ ]
4474
4554
  }
4475
4555
  ),
4476
- /* @__PURE__ */ jsx20(
4556
+ /* @__PURE__ */ jsxs11(
4477
4557
  ContextMenuItem,
4478
4558
  {
4479
4559
  onClick: () => {
@@ -4485,11 +4565,26 @@ var ItemContextMenu = ({
4485
4565
  key: data.key
4486
4566
  });
4487
4567
  },
4488
- children: "Open in new tab"
4568
+ className: "gap-2",
4569
+ children: [
4570
+ /* @__PURE__ */ jsx21(IconExternalLink, { size: 16 }),
4571
+ "Open in new tab"
4572
+ ]
4489
4573
  }
4490
4574
  ),
4491
- /* @__PURE__ */ jsx20(ContextMenuSeparator2, {}),
4492
- /* @__PURE__ */ jsx20(ContextMenuItem, { disabled: type === "stream", onClick: () => setAlertOpen(true), children: "Delete item" })
4575
+ /* @__PURE__ */ jsx21(ContextMenuSeparator2, {}),
4576
+ /* @__PURE__ */ jsxs11(
4577
+ ContextMenuItem,
4578
+ {
4579
+ disabled: type === "stream",
4580
+ onClick: () => setAlertOpen(true),
4581
+ className: "gap-2",
4582
+ children: [
4583
+ /* @__PURE__ */ jsx21(IconTrash, { size: 16 }),
4584
+ "Delete item"
4585
+ ]
4586
+ }
4587
+ )
4493
4588
  ] })
4494
4589
  ] })
4495
4590
  ] });
@@ -4502,7 +4597,7 @@ import { useEffect as useEffect6, useRef } from "react";
4502
4597
  // src/components/ui/scroll-area.tsx
4503
4598
  import * as React9 from "react";
4504
4599
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
4505
- import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
4600
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
4506
4601
  var ScrollArea = React9.forwardRef(({ className, children, onScroll, disableRoundedInherit = false, ...props }, ref) => /* @__PURE__ */ jsxs12(
4507
4602
  ScrollAreaPrimitive.Root,
4508
4603
  {
@@ -4510,7 +4605,7 @@ var ScrollArea = React9.forwardRef(({ className, children, onScroll, disableRoun
4510
4605
  className: cn("relative overflow-hidden", className),
4511
4606
  ...props,
4512
4607
  children: [
4513
- /* @__PURE__ */ jsx21(
4608
+ /* @__PURE__ */ jsx22(
4514
4609
  ScrollAreaPrimitive.Viewport,
4515
4610
  {
4516
4611
  onScroll,
@@ -4518,23 +4613,23 @@ var ScrollArea = React9.forwardRef(({ className, children, onScroll, disableRoun
4518
4613
  children
4519
4614
  }
4520
4615
  ),
4521
- /* @__PURE__ */ jsx21(ScrollBar, {}),
4522
- /* @__PURE__ */ jsx21(ScrollAreaPrimitive.Corner, {})
4616
+ /* @__PURE__ */ jsx22(ScrollBar, {}),
4617
+ /* @__PURE__ */ jsx22(ScrollAreaPrimitive.Corner, {})
4523
4618
  ]
4524
4619
  }
4525
4620
  ));
4526
4621
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
4527
- var ScrollBar = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
4622
+ var ScrollBar = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
4528
4623
  ScrollAreaPrimitive.ScrollAreaScrollbar,
4529
4624
  {
4530
4625
  ref,
4531
4626
  orientation: "vertical",
4532
4627
  className: cn("flex h-full w-2 touch-none select-none transition-colors", className),
4533
4628
  ...props,
4534
- children: /* @__PURE__ */ jsx21(
4629
+ children: /* @__PURE__ */ jsx22(
4535
4630
  ScrollAreaPrimitive.ScrollAreaThumb,
4536
4631
  {
4537
- className: cn("relative flex-1 rounded-full bg-neutral-200/70 dark:bg-neutral-800")
4632
+ className: cn("relative flex-1 rounded-full bg-zinc-200/70")
4538
4633
  }
4539
4634
  )
4540
4635
  }
@@ -4542,7 +4637,7 @@ var ScrollBar = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
4542
4637
  ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
4543
4638
 
4544
4639
  // src/components/databrowser/components/sidebar/infinite-scroll.tsx
4545
- import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
4640
+ import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
4546
4641
  var InfiniteScroll = ({
4547
4642
  query,
4548
4643
  children,
@@ -4574,7 +4669,7 @@ var InfiniteScroll = ({
4574
4669
  const timer = setTimeout(checkAndFetchMore, 100);
4575
4670
  return () => clearTimeout(timer);
4576
4671
  }, [active, query.data]);
4577
- return /* @__PURE__ */ jsx22(
4672
+ return /* @__PURE__ */ jsx23(
4578
4673
  ScrollArea,
4579
4674
  {
4580
4675
  type: "always",
@@ -4587,7 +4682,7 @@ var InfiniteScroll = ({
4587
4682
  ref: scrollRef,
4588
4683
  children: /* @__PURE__ */ jsxs13("div", { ref: contentRef, children: [
4589
4684
  children,
4590
- /* @__PURE__ */ jsx22("div", { className: "flex h-[100px] justify-center py-2 text-zinc-300", children: query.isFetching && /* @__PURE__ */ jsx22(IconLoader2, { className: "animate-spin", size: 16 }) })
4685
+ /* @__PURE__ */ jsx23("div", { className: "flex h-[100px] justify-center py-2 text-zinc-300", children: query.isFetching && /* @__PURE__ */ jsx23(IconLoader2, { className: "animate-spin", size: 16 }) })
4591
4686
  ] })
4592
4687
  }
4593
4688
  );
@@ -4617,15 +4712,15 @@ import {
4617
4712
  IconList,
4618
4713
  IconQuote
4619
4714
  } from "@tabler/icons-react";
4620
- import { jsx as jsx23 } from "react/jsx-runtime";
4715
+ import { jsx as jsx24 } from "react/jsx-runtime";
4621
4716
  var iconsMap = {
4622
- string: /* @__PURE__ */ jsx23(IconQuote, { size: 15, stroke: 1.3 }),
4623
- set: /* @__PURE__ */ jsx23(IconLayersIntersect, { size: 15, stroke: 1.3 }),
4624
- hash: /* @__PURE__ */ jsx23(IconHash, { size: 15, stroke: 1.3 }),
4625
- json: /* @__PURE__ */ jsx23(IconCodeDots, { size: 15, stroke: 1.3 }),
4626
- zset: /* @__PURE__ */ jsx23(IconArrowsSort, { size: 15, stroke: 1.3 }),
4627
- list: /* @__PURE__ */ jsx23(IconList, { size: 15, stroke: 1.3 }),
4628
- stream: /* @__PURE__ */ jsx23(IconList, { size: 15, stroke: 1.3 })
4717
+ string: /* @__PURE__ */ jsx24(IconQuote, { size: 15, stroke: 1.2 }),
4718
+ set: /* @__PURE__ */ jsx24(IconLayersIntersect, { size: 15, stroke: 1.2 }),
4719
+ hash: /* @__PURE__ */ jsx24(IconHash, { size: 15, stroke: 1.2 }),
4720
+ json: /* @__PURE__ */ jsx24(IconCodeDots, { size: 15, stroke: 1.2 }),
4721
+ zset: /* @__PURE__ */ jsx24(IconArrowsSort, { size: 15, stroke: 1.2 }),
4722
+ list: /* @__PURE__ */ jsx24(IconList, { size: 15, stroke: 1.2 }),
4723
+ stream: /* @__PURE__ */ jsx24(IconList, { size: 15, stroke: 1.2 })
4629
4724
  };
4630
4725
  var tagVariants = cva("inline-flex shrink-0 items-center rounded-md justify-center", {
4631
4726
  variants: {
@@ -4649,7 +4744,7 @@ var tagVariants = cva("inline-flex shrink-0 items-center rounded-md justify-cent
4649
4744
  }
4650
4745
  });
4651
4746
  function TypeTag({ className, variant, type }) {
4652
- return /* @__PURE__ */ jsx23("span", { className: cn(tagVariants({ variant, type, className })), children: type === "icon" ? iconsMap[variant] : DATA_TYPE_NAMES[variant] });
4747
+ return /* @__PURE__ */ jsx24("span", { className: cn(tagVariants({ variant, type, className })), children: type === "icon" ? iconsMap[variant] : DATA_TYPE_NAMES[variant] });
4653
4748
  }
4654
4749
 
4655
4750
  // src/components/databrowser/components/display/key-actions.tsx
@@ -4659,7 +4754,7 @@ import { IconDotsVertical } from "@tabler/icons-react";
4659
4754
  import * as React10 from "react";
4660
4755
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
4661
4756
  import { CheckIcon as CheckIcon2, ChevronRightIcon as ChevronRightIcon2, DotFilledIcon as DotFilledIcon2 } from "@radix-ui/react-icons";
4662
- import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
4757
+ import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
4663
4758
  var DropdownMenu = DropdownMenuPrimitive.Root;
4664
4759
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
4665
4760
  var DropdownMenuSubTrigger = React10.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs14(
@@ -4667,37 +4762,37 @@ var DropdownMenuSubTrigger = React10.forwardRef(({ className, inset, children, .
4667
4762
  {
4668
4763
  ref,
4669
4764
  className: cn(
4670
- "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 data-[state=open]:bg-neutral-100 dark:focus:bg-neutral-800 dark:data-[state=open]:bg-neutral-800 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
4765
+ "data-[state=open]:bg-zinc-100[&_svg]:pointer-events-none flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-zinc-100 [&_svg]:size-4 [&_svg]:shrink-0",
4671
4766
  inset && "pl-8",
4672
4767
  className
4673
4768
  ),
4674
4769
  ...props,
4675
4770
  children: [
4676
4771
  children,
4677
- /* @__PURE__ */ jsx24(ChevronRightIcon2, { className: "ml-auto" })
4772
+ /* @__PURE__ */ jsx25(ChevronRightIcon2, { className: "ml-auto" })
4678
4773
  ]
4679
4774
  }
4680
4775
  ));
4681
4776
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
4682
- var DropdownMenuSubContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
4777
+ var DropdownMenuSubContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4683
4778
  DropdownMenuPrimitive.SubContent,
4684
4779
  {
4685
4780
  ref,
4686
4781
  className: cn(
4687
- "z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
4782
+ "z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border border-zinc-200 bg-white p-1 text-zinc-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
4688
4783
  className
4689
4784
  ),
4690
4785
  ...props
4691
4786
  }
4692
4787
  ));
4693
4788
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
4694
- var DropdownMenuContent = React10.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx24(DropdownMenuPrimitive.Portal, { container: portalRoot, children: /* @__PURE__ */ jsx24(
4789
+ var DropdownMenuContent = React10.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx25(DropdownMenuPrimitive.Portal, { container: portalRoot, children: /* @__PURE__ */ jsx25(
4695
4790
  DropdownMenuPrimitive.Content,
4696
4791
  {
4697
4792
  ref,
4698
4793
  sideOffset,
4699
4794
  className: cn(
4700
- "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
4795
+ "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-zinc-200 bg-white p-1 text-zinc-950 shadow-md",
4701
4796
  "origin-[--radix-dropdown-menu-content-transform-origin] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
4702
4797
  className
4703
4798
  ),
@@ -4705,12 +4800,12 @@ var DropdownMenuContent = React10.forwardRef(({ className, sideOffset = 4, ...pr
4705
4800
  }
4706
4801
  ) }));
4707
4802
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
4708
- var DropdownMenuItem = React10.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx24(
4803
+ var DropdownMenuItem = React10.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx25(
4709
4804
  DropdownMenuPrimitive.Item,
4710
4805
  {
4711
4806
  ref,
4712
4807
  className: cn(
4713
- "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 [&>svg]:size-4 [&>svg]:shrink-0",
4808
+ "data-[disabled]:opacity-50[&>svg]:size-4 relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none [&>svg]:shrink-0",
4714
4809
  inset && "pl-8",
4715
4810
  className
4716
4811
  ),
@@ -4723,13 +4818,13 @@ var DropdownMenuCheckboxItem = React10.forwardRef(({ className, children, checke
4723
4818
  {
4724
4819
  ref,
4725
4820
  className: cn(
4726
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",
4821
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
4727
4822
  className
4728
4823
  ),
4729
4824
  checked,
4730
4825
  ...props,
4731
4826
  children: [
4732
- /* @__PURE__ */ jsx24("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx24(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx24(CheckIcon2, { className: "h-4 w-4" }) }) }),
4827
+ /* @__PURE__ */ jsx25("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx25(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx25(CheckIcon2, { className: "h-4 w-4" }) }) }),
4733
4828
  children
4734
4829
  ]
4735
4830
  }
@@ -4740,18 +4835,18 @@ var DropdownMenuRadioItem = React10.forwardRef(({ className, children, ...props
4740
4835
  {
4741
4836
  ref,
4742
4837
  className: cn(
4743
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",
4838
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-zinc-100 focus:text-zinc-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
4744
4839
  className
4745
4840
  ),
4746
4841
  ...props,
4747
4842
  children: [
4748
- /* @__PURE__ */ jsx24("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx24(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx24(DotFilledIcon2, { className: "h-2 w-2 fill-current" }) }) }),
4843
+ /* @__PURE__ */ jsx25("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx25(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx25(DotFilledIcon2, { className: "h-2 w-2 fill-current" }) }) }),
4749
4844
  children
4750
4845
  ]
4751
4846
  }
4752
4847
  ));
4753
4848
  DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
4754
- var DropdownMenuLabel = React10.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx24(
4849
+ var DropdownMenuLabel = React10.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx25(
4755
4850
  DropdownMenuPrimitive.Label,
4756
4851
  {
4757
4852
  ref,
@@ -4760,28 +4855,28 @@ var DropdownMenuLabel = React10.forwardRef(({ className, inset, ...props }, ref)
4760
4855
  }
4761
4856
  ));
4762
4857
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
4763
- var DropdownMenuSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
4858
+ var DropdownMenuSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4764
4859
  DropdownMenuPrimitive.Separator,
4765
4860
  {
4766
4861
  ref,
4767
- className: cn("-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800", className),
4862
+ className: cn("-mx-1 my-1 h-px bg-zinc-100", className),
4768
4863
  ...props
4769
4864
  }
4770
4865
  ));
4771
4866
  DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
4772
4867
  var DropdownMenuShortcut = ({ className, ...props }) => {
4773
- return /* @__PURE__ */ jsx24("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
4868
+ return /* @__PURE__ */ jsx25("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
4774
4869
  };
4775
4870
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
4776
4871
 
4777
4872
  // src/components/databrowser/components/display/key-actions.tsx
4778
- import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
4873
+ import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
4779
4874
  function KeyActions({ dataKey, content }) {
4780
4875
  const { mutateAsync: deleteKey } = useDeleteKey();
4781
4876
  return /* @__PURE__ */ jsxs15(DropdownMenu, { modal: false, children: [
4782
- /* @__PURE__ */ jsx25(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx25(Button, { size: "icon-sm", "aria-label": "Key actions", children: /* @__PURE__ */ jsx25(IconDotsVertical, { className: "size-4 text-zinc-500" }) }) }),
4877
+ /* @__PURE__ */ jsx26(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx26(Button, { size: "icon-sm", "aria-label": "Key actions", children: /* @__PURE__ */ jsx26(IconDotsVertical, { className: "size-4 text-zinc-500" }) }) }),
4783
4878
  /* @__PURE__ */ jsxs15(DropdownMenuContent, { className: "", align: "end", children: [
4784
- content && /* @__PURE__ */ jsx25(
4879
+ content && /* @__PURE__ */ jsx26(
4785
4880
  DropdownMenuItem,
4786
4881
  {
4787
4882
  onClick: () => {
@@ -4793,7 +4888,7 @@ function KeyActions({ dataKey, content }) {
4793
4888
  children: "Copy content"
4794
4889
  }
4795
4890
  ),
4796
- /* @__PURE__ */ jsx25(
4891
+ /* @__PURE__ */ jsx26(
4797
4892
  DropdownMenuItem,
4798
4893
  {
4799
4894
  onClick: () => {
@@ -4802,12 +4897,12 @@ function KeyActions({ dataKey, content }) {
4802
4897
  children: "Copy key"
4803
4898
  }
4804
4899
  ),
4805
- /* @__PURE__ */ jsx25(
4900
+ /* @__PURE__ */ jsx26(
4806
4901
  DeleteAlertDialog,
4807
4902
  {
4808
4903
  deletionType: "key",
4809
4904
  onDeleteConfirm: async () => await deleteKey(dataKey),
4810
- children: /* @__PURE__ */ jsx25(
4905
+ children: /* @__PURE__ */ jsx26(
4811
4906
  DropdownMenuItem,
4812
4907
  {
4813
4908
  className: "text-red-500 focus:bg-red-500 focus:text-white",
@@ -4822,7 +4917,7 @@ function KeyActions({ dataKey, content }) {
4822
4917
  }
4823
4918
 
4824
4919
  // src/components/databrowser/components/display/display-header.tsx
4825
- import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
4920
+ import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
4826
4921
  var DisplayHeader = ({
4827
4922
  dataKey,
4828
4923
  type,
@@ -4834,17 +4929,17 @@ var DisplayHeader = ({
4834
4929
  };
4835
4930
  return /* @__PURE__ */ jsxs16("div", { className: "rounded-lg bg-zinc-100", children: [
4836
4931
  /* @__PURE__ */ jsxs16("div", { className: "flex min-h-10 items-center justify-between gap-4", children: [
4837
- /* @__PURE__ */ jsx26("h2", { className: "grow truncate text-base", children: dataKey.trim() === "" ? /* @__PURE__ */ jsx26("span", { className: "ml-1 text-zinc-500", children: "(Empty Key)" }) : /* @__PURE__ */ jsx26("span", { className: "font-semibold", children: dataKey }) }),
4932
+ /* @__PURE__ */ jsx27("h2", { className: "grow truncate text-base", children: dataKey.trim() === "" ? /* @__PURE__ */ jsx27("span", { className: "ml-1 text-zinc-500", children: "(Empty Key)" }) : /* @__PURE__ */ jsx27("span", { className: "font-semibold", children: dataKey }) }),
4838
4933
  /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1", children: [
4839
- type !== "string" && type !== "json" && /* @__PURE__ */ jsx26(Button, { onClick: handleAddItem, size: "icon-sm", "aria-label": "Add item", children: /* @__PURE__ */ jsx26(IconPlus, { className: "size-4 text-zinc-500" }) }),
4840
- /* @__PURE__ */ jsx26(KeyActions, { dataKey, content })
4934
+ type !== "string" && type !== "json" && /* @__PURE__ */ jsx27(Button, { onClick: handleAddItem, size: "icon-sm", "aria-label": "Add item", children: /* @__PURE__ */ jsx27(IconPlus, { className: "size-4 text-zinc-500" }) }),
4935
+ /* @__PURE__ */ jsx27(KeyActions, { dataKey, content })
4841
4936
  ] })
4842
4937
  ] }),
4843
4938
  /* @__PURE__ */ jsxs16("div", { className: "flex h-10 flex-wrap items-center gap-1.5", children: [
4844
- /* @__PURE__ */ jsx26(TypeTag, { variant: type, type: "badge" }),
4845
- /* @__PURE__ */ jsx26(SizeBadge, { dataKey }),
4846
- /* @__PURE__ */ jsx26(LengthBadge, { dataKey, type, content }),
4847
- /* @__PURE__ */ jsx26(HeaderTTLBadge, { dataKey })
4939
+ /* @__PURE__ */ jsx27(TypeTag, { variant: type, type: "badge" }),
4940
+ /* @__PURE__ */ jsx27(SizeBadge, { dataKey }),
4941
+ /* @__PURE__ */ jsx27(LengthBadge, { dataKey, type, content }),
4942
+ /* @__PURE__ */ jsx27(HeaderTTLBadge, { dataKey })
4848
4943
  ] })
4849
4944
  ] });
4850
4945
  };
@@ -4855,16 +4950,16 @@ import { Controller as Controller2, FormProvider, useForm as useForm2, useFormCo
4855
4950
  // src/components/ui/tooltip.tsx
4856
4951
  import * as React11 from "react";
4857
4952
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
4858
- import { Fragment as Fragment3, jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
4953
+ import { Fragment as Fragment3, jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
4859
4954
  var Tooltip = TooltipPrimitive.Root;
4860
4955
  var TooltipTrigger = TooltipPrimitive.Trigger;
4861
- var TooltipContent = React11.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx27(TooltipPrimitive.Portal, { container: portalRoot, children: /* @__PURE__ */ jsx27(
4956
+ var TooltipContent = React11.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx28(TooltipPrimitive.Portal, { container: portalRoot, children: /* @__PURE__ */ jsx28(
4862
4957
  TooltipPrimitive.Content,
4863
4958
  {
4864
4959
  ref,
4865
4960
  sideOffset,
4866
4961
  className: cn(
4867
- "z-50 overflow-hidden rounded-md bg-zinc-900 px-3 py-1.5 text-xs text-zinc-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:bg-zinc-50 dark:text-zinc-900",
4962
+ "z-50 overflow-hidden rounded-md bg-zinc-900 px-3 py-1.5 text-xs text-zinc-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
4868
4963
  className
4869
4964
  ),
4870
4965
  ...props
@@ -4875,10 +4970,10 @@ var SimpleTooltip = ({
4875
4970
  content,
4876
4971
  children
4877
4972
  }) => {
4878
- if (!content) return /* @__PURE__ */ jsx27(Fragment3, { children });
4973
+ if (!content) return /* @__PURE__ */ jsx28(Fragment3, { children });
4879
4974
  return /* @__PURE__ */ jsxs17(Tooltip, { delayDuration: 400, children: [
4880
- /* @__PURE__ */ jsx27(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx27("div", { children }) }),
4881
- /* @__PURE__ */ jsx27(TooltipContent, { side: "top", children: content })
4975
+ /* @__PURE__ */ jsx28(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx28("div", { children }) }),
4976
+ /* @__PURE__ */ jsx28(TooltipContent, { side: "top", children: content })
4882
4977
  ] });
4883
4978
  };
4884
4979
 
@@ -4938,12 +5033,12 @@ var useSetHashTTL = () => {
4938
5033
  };
4939
5034
 
4940
5035
  // src/components/databrowser/components/display/hash/hash-field-ttl-badge.tsx
4941
- import { jsx as jsx28 } from "react/jsx-runtime";
5036
+ import { jsx as jsx29 } from "react/jsx-runtime";
4942
5037
  var HashFieldTTLBadge = ({ dataKey, field }) => {
4943
5038
  const { data } = useFetchHashFieldExpires({ dataKey, fields: [field] });
4944
5039
  const { mutate: setTTL, isPending } = useSetHashTTL();
4945
5040
  const expireAt = data?.[field];
4946
- return /* @__PURE__ */ jsx28(
5041
+ return /* @__PURE__ */ jsx29(
4947
5042
  TTLBadge,
4948
5043
  {
4949
5044
  label: "Field TTL:",
@@ -4960,7 +5055,7 @@ import { useController } from "react-hook-form";
4960
5055
 
4961
5056
  // src/components/databrowser/components/display/input/content-type-select.tsx
4962
5057
  import { useMemo as useMemo6 } from "react";
4963
- import { jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
5058
+ import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
4964
5059
  var ContentTypeSelect = ({
4965
5060
  value,
4966
5061
  onChange,
@@ -4968,10 +5063,10 @@ var ContentTypeSelect = ({
4968
5063
  }) => {
4969
5064
  const isValidJSON = useMemo6(() => checkIsValidJSON(data), [data]);
4970
5065
  return /* @__PURE__ */ jsxs18(Select, { value, onValueChange: onChange, children: [
4971
- /* @__PURE__ */ jsx29(SelectTrigger, { className: "h-6 w-auto border-none bg-transparent pl-0 pr-6 text-xs text-zinc-500", children: /* @__PURE__ */ jsx29(SelectValue, { placeholder: "Text" }) }),
4972
- /* @__PURE__ */ jsx29(SelectContent, { children: /* @__PURE__ */ jsxs18(SelectGroup, { children: [
4973
- /* @__PURE__ */ jsx29(SelectItem, { value: "Text", children: "Text" }),
4974
- /* @__PURE__ */ jsx29(SelectItem, { disabled: !isValidJSON, value: "JSON", children: "JSON" })
5066
+ /* @__PURE__ */ jsx30(SelectTrigger, { className: "h-6 w-auto border-none bg-transparent pl-0 pr-6 text-xs text-zinc-500", children: /* @__PURE__ */ jsx30(SelectValue, { placeholder: "Text" }) }),
5067
+ /* @__PURE__ */ jsx30(SelectContent, { children: /* @__PURE__ */ jsxs18(SelectGroup, { children: [
5068
+ /* @__PURE__ */ jsx30(SelectItem, { value: "Text", children: "Text" }),
5069
+ /* @__PURE__ */ jsx30(SelectItem, { disabled: !isValidJSON, value: "JSON", children: "JSON" })
4975
5070
  ] }) })
4976
5071
  ] });
4977
5072
  };
@@ -4982,11 +5077,11 @@ import { Editor, useMonaco } from "@monaco-editor/react";
4982
5077
 
4983
5078
  // src/components/databrowser/copy-button.tsx
4984
5079
  import { useState as useState6 } from "react";
4985
- import { IconCheck, IconCopy } from "@tabler/icons-react";
4986
- import { jsx as jsx30 } from "react/jsx-runtime";
5080
+ import { IconCheck, IconCopy as IconCopy2 } from "@tabler/icons-react";
5081
+ import { jsx as jsx31 } from "react/jsx-runtime";
4987
5082
  function CopyButton({ value, ...props }) {
4988
5083
  const [copied, setCopied] = useState6(false);
4989
- return /* @__PURE__ */ jsx30(
5084
+ return /* @__PURE__ */ jsx31(
4990
5085
  Button,
4991
5086
  {
4992
5087
  onClick: (e) => {
@@ -5003,7 +5098,7 @@ function CopyButton({ value, ...props }) {
5003
5098
  variant: "secondary",
5004
5099
  size: "icon-sm",
5005
5100
  ...props,
5006
- children: copied ? /* @__PURE__ */ jsx30(IconCheck, { className: "size-4 text-green-500" }) : /* @__PURE__ */ jsx30(IconCopy, { className: "size-4 text-zinc-500" })
5101
+ children: copied ? /* @__PURE__ */ jsx31(IconCheck, { className: "size-4 text-green-500" }) : /* @__PURE__ */ jsx31(IconCopy2, { className: "size-4 text-zinc-500" })
5007
5102
  }
5008
5103
  );
5009
5104
  }
@@ -5016,7 +5111,7 @@ var handleCopyClick = async (textToCopy) => {
5016
5111
  };
5017
5112
 
5018
5113
  // src/components/databrowser/components/display/input/custom-editor.tsx
5019
- import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
5114
+ import { jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
5020
5115
  var CustomEditor = ({
5021
5116
  language,
5022
5117
  value,
@@ -5028,15 +5123,17 @@ var CustomEditor = ({
5028
5123
  const { active } = useTab();
5029
5124
  const monaco = useMonaco();
5030
5125
  const editorRef = useRef2();
5126
+ const theme = useDarkMode();
5031
5127
  useEffect7(() => {
5032
5128
  if (!active || !monaco || !editorRef.current) {
5033
5129
  return;
5034
5130
  }
5035
5131
  monaco?.editor.setModelLanguage(editorRef.current.getModel(), language);
5036
5132
  }, [monaco, language, active]);
5037
- const editor = /* @__PURE__ */ jsx31(
5133
+ const editor = /* @__PURE__ */ jsx32(
5038
5134
  Editor,
5039
5135
  {
5136
+ theme: theme === "dark" ? "vs-dark" : "light",
5040
5137
  loading: void 0,
5041
5138
  onMount: (editor2) => {
5042
5139
  editorRef.current = editor2;
@@ -5068,8 +5165,10 @@ var CustomEditor = ({
5068
5165
  automaticLayout: true,
5069
5166
  scrollBeyondLastLine: false,
5070
5167
  renderLineHighlight: "none",
5071
- unusualLineTerminators: "auto"
5072
- }
5168
+ unusualLineTerminators: "auto",
5169
+ padding: { top: 0, bottom: 0 }
5170
+ },
5171
+ className: "[&_.monaco-editor-background]:!bg-transparent [&_.monaco-editor]:!bg-transparent"
5073
5172
  }
5074
5173
  );
5075
5174
  return /* @__PURE__ */ jsxs19(
@@ -5078,8 +5177,8 @@ var CustomEditor = ({
5078
5177
  className: cn("group/editor relative", height === void 0 && "h-full p-2"),
5079
5178
  style: { height },
5080
5179
  children: [
5081
- isTest ? /* @__PURE__ */ jsx31("input", { "aria-label": "editor", value, onChange: (e) => onChange(e.target.value) }) : editor,
5082
- showCopyButton && /* @__PURE__ */ jsx31(
5180
+ isTest ? /* @__PURE__ */ jsx32("input", { "aria-label": "editor", value, onChange: (e) => onChange(e.target.value) }) : editor,
5181
+ showCopyButton && /* @__PURE__ */ jsx32(
5083
5182
  CopyButton,
5084
5183
  {
5085
5184
  value,
@@ -5092,7 +5191,7 @@ var CustomEditor = ({
5092
5191
  };
5093
5192
 
5094
5193
  // src/components/databrowser/components/display/input/use-field.tsx
5095
- import { Fragment as Fragment4, jsx as jsx32 } from "react/jsx-runtime";
5194
+ import { Fragment as Fragment4, jsx as jsx33 } from "react/jsx-runtime";
5096
5195
  var useField = ({
5097
5196
  name,
5098
5197
  form,
@@ -5132,8 +5231,8 @@ var useField = ({
5132
5231
  }
5133
5232
  };
5134
5233
  return {
5135
- selector: /* @__PURE__ */ jsx32(ContentTypeSelect, { value: contentType, onChange: handleTypeChange, data: field.value }),
5136
- editor: /* @__PURE__ */ jsx32(Fragment4, { children: /* @__PURE__ */ jsx32(
5234
+ selector: /* @__PURE__ */ jsx33(ContentTypeSelect, { value: contentType, onChange: handleTypeChange, data: field.value }),
5235
+ editor: /* @__PURE__ */ jsx33(Fragment4, { children: /* @__PURE__ */ jsx33(
5137
5236
  CustomEditor,
5138
5237
  {
5139
5238
  language: contentType === "JSON" ? "json" : "plaintext",
@@ -5157,13 +5256,13 @@ var checkIsValidJSON = (value) => {
5157
5256
  };
5158
5257
 
5159
5258
  // src/components/databrowser/components/display/display-list-edit.tsx
5160
- import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
5259
+ import { jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
5161
5260
  var ListEditDisplay = ({
5162
5261
  dataKey,
5163
5262
  type,
5164
5263
  item
5165
5264
  }) => {
5166
- return /* @__PURE__ */ jsx33("div", { className: "grow rounded-md bg-zinc-100", children: /* @__PURE__ */ jsx33(ListEditForm, { item, type, dataKey }, item.key) });
5265
+ return /* @__PURE__ */ jsx34("div", { className: "grow rounded-md bg-zinc-100", children: /* @__PURE__ */ jsx34(ListEditForm, { item, type, dataKey }, item.key) });
5167
5266
  };
5168
5267
  var ListEditForm = ({
5169
5268
  type,
@@ -5202,9 +5301,9 @@ var ListEditForm = ({
5202
5301
  });
5203
5302
  setSelectedListItem(void 0);
5204
5303
  });
5205
- return /* @__PURE__ */ jsx33(FormProvider, { ...form, children: /* @__PURE__ */ jsxs20("form", { onSubmit, className: "flex flex-col gap-2", children: [
5304
+ return /* @__PURE__ */ jsx34(FormProvider, { ...form, children: /* @__PURE__ */ jsxs20("form", { onSubmit, className: "flex flex-col gap-2", children: [
5206
5305
  /* @__PURE__ */ jsxs20("div", { className: "flex grow flex-col gap-2", children: [
5207
- type !== "list" && /* @__PURE__ */ jsx33(
5306
+ type !== "list" && /* @__PURE__ */ jsx34(
5208
5307
  FormItem,
5209
5308
  {
5210
5309
  readOnly: type === "stream",
@@ -5214,7 +5313,7 @@ var ListEditForm = ({
5214
5313
  data: itemKey
5215
5314
  }
5216
5315
  ),
5217
- type === "zset" ? /* @__PURE__ */ jsx33(NumberFormItem, { name: "value", label: valueLabel }) : type !== "set" && /* @__PURE__ */ jsx33(
5316
+ type === "zset" ? /* @__PURE__ */ jsx34(NumberFormItem, { name: "value", label: valueLabel }) : type !== "set" && /* @__PURE__ */ jsx34(
5218
5317
  FormItem,
5219
5318
  {
5220
5319
  readOnly: type === "stream",
@@ -5233,9 +5332,9 @@ var ListEditForm = ({
5233
5332
  type === "hash" && itemKey !== "" ? "justify-between" : "justify-end"
5234
5333
  ),
5235
5334
  children: [
5236
- type === "hash" && itemKey !== "" && /* @__PURE__ */ jsx33(HashFieldTTLBadge, { dataKey, field: itemKey }),
5335
+ type === "hash" && itemKey !== "" && /* @__PURE__ */ jsx34(HashFieldTTLBadge, { dataKey, field: itemKey }),
5237
5336
  /* @__PURE__ */ jsxs20("div", { className: "flex gap-2", children: [
5238
- /* @__PURE__ */ jsx33(
5337
+ /* @__PURE__ */ jsx34(
5239
5338
  Button,
5240
5339
  {
5241
5340
  type: "button",
@@ -5245,17 +5344,17 @@ var ListEditForm = ({
5245
5344
  children: "Cancel"
5246
5345
  }
5247
5346
  ),
5248
- /* @__PURE__ */ jsx33(
5347
+ /* @__PURE__ */ jsx34(
5249
5348
  SimpleTooltip,
5250
5349
  {
5251
5350
  content: type === "stream" && !isNew ? "Streams are not mutable" : void 0,
5252
- children: /* @__PURE__ */ jsx33(
5351
+ children: /* @__PURE__ */ jsx34(
5253
5352
  Button,
5254
5353
  {
5255
5354
  variant: "primary",
5256
5355
  type: "submit",
5257
5356
  disabled: !form.formState.isValid || !form.formState.isDirty || type === "stream" && !isNew,
5258
- children: /* @__PURE__ */ jsx33(Spinner, { isLoading: isPending, isLoadingText: "Saving", children: "Save" })
5357
+ children: /* @__PURE__ */ jsx34(Spinner, { isLoading: isPending, isLoadingText: "Saving", children: "Save" })
5259
5358
  }
5260
5359
  )
5261
5360
  }
@@ -5268,12 +5367,12 @@ var ListEditForm = ({
5268
5367
  };
5269
5368
  var NumberFormItem = ({ name, label }) => {
5270
5369
  return /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-1", children: [
5271
- /* @__PURE__ */ jsx33("div", { className: "flex", children: /* @__PURE__ */ jsx33("span", { className: "text-xs font-medium text-zinc-700", children: label }) }),
5272
- /* @__PURE__ */ jsx33(
5370
+ /* @__PURE__ */ jsx34("div", { className: "flex", children: /* @__PURE__ */ jsx34("span", { className: "text-xs font-medium text-zinc-700", children: label }) }),
5371
+ /* @__PURE__ */ jsx34(
5273
5372
  Controller2,
5274
5373
  {
5275
5374
  name,
5276
- render: ({ field }) => /* @__PURE__ */ jsx33(
5375
+ render: ({ field }) => /* @__PURE__ */ jsx34(
5277
5376
  "input",
5278
5377
  {
5279
5378
  className: "plain-input rounded-md border border-zinc-300 px-3 py-1 shadow-sm",
@@ -5303,18 +5402,18 @@ var FormItem = ({
5303
5402
  });
5304
5403
  return /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-1", children: [
5305
5404
  /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-1 text-xs", children: [
5306
- /* @__PURE__ */ jsx33("span", { className: "font-medium text-zinc-700", children: label }),
5405
+ /* @__PURE__ */ jsx34("span", { className: "font-medium text-zinc-700", children: label }),
5307
5406
  " ",
5308
- /* @__PURE__ */ jsx33("span", { className: "text-zinc-300", children: "/" }),
5407
+ /* @__PURE__ */ jsx34("span", { className: "text-zinc-300", children: "/" }),
5309
5408
  selector
5310
5409
  ] }),
5311
- /* @__PURE__ */ jsx33("div", { className: "overflow-hidden rounded-md border border-zinc-300 bg-white p-2 shadow-sm", children: editor })
5410
+ /* @__PURE__ */ jsx34("div", { className: "overflow-hidden rounded-md border border-zinc-300 bg-white p-2 shadow-sm", children: editor })
5312
5411
  ] });
5313
5412
  };
5314
5413
 
5315
5414
  // src/components/databrowser/components/display/hash/hash-field-ttl-info.tsx
5316
5415
  import { useEffect as useEffect9, useState as useState8 } from "react";
5317
- import { jsx as jsx34 } from "react/jsx-runtime";
5416
+ import { jsx as jsx35 } from "react/jsx-runtime";
5318
5417
  var HashFieldTTLInfo = ({
5319
5418
  dataKey,
5320
5419
  field,
@@ -5331,11 +5430,11 @@ var HashFieldTTLInfo = ({
5331
5430
  return () => clearInterval(interval);
5332
5431
  }, [expireAt]);
5333
5432
  if (!expireAt || expireAt === TTL_NOT_FOUND || expireAt === TTL_INFINITE) return;
5334
- return /* @__PURE__ */ jsx34("span", { className: "block min-w-[30px] whitespace-nowrap text-right text-red-600", children: formatTime(ttl ?? 0) });
5433
+ return /* @__PURE__ */ jsx35("span", { className: "block min-w-[30px] whitespace-nowrap text-right text-red-600", children: formatTime(ttl ?? 0) });
5335
5434
  };
5336
5435
 
5337
5436
  // src/components/databrowser/components/display/display-list.tsx
5338
- import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
5437
+ import { Fragment as Fragment5, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
5339
5438
  var headerLabels = {
5340
5439
  list: ["Index", "Content"],
5341
5440
  hash: ["Field", "Value"],
@@ -5347,9 +5446,9 @@ var ListDisplay = ({ dataKey, type }) => {
5347
5446
  const { selectedListItem } = useTab();
5348
5447
  const query = useFetchListItems({ dataKey, type });
5349
5448
  return /* @__PURE__ */ jsxs21("div", { className: "flex h-full flex-col gap-2", children: [
5350
- /* @__PURE__ */ jsx35(DisplayHeader, { dataKey, type }),
5351
- selectedListItem && /* @__PURE__ */ jsx35(ListEditDisplay, { dataKey, type, item: selectedListItem }),
5352
- /* @__PURE__ */ jsx35("div", { className: cn("min-h-0 grow", selectedListItem && "hidden"), children: /* @__PURE__ */ jsx35(InfiniteScroll, { query, children: /* @__PURE__ */ jsx35("table", { className: "w-full", children: /* @__PURE__ */ jsx35(ItemContextMenu, { dataKey, type, children: /* @__PURE__ */ jsx35("tbody", { children: /* @__PURE__ */ jsx35(ListItems, { dataKey, type, query }) }) }) }) }) })
5449
+ /* @__PURE__ */ jsx36(DisplayHeader, { dataKey, type }),
5450
+ selectedListItem && /* @__PURE__ */ jsx36(ListEditDisplay, { dataKey, type, item: selectedListItem }),
5451
+ /* @__PURE__ */ jsx36("div", { className: cn("min-h-0 grow", selectedListItem && "hidden"), children: /* @__PURE__ */ jsx36(InfiniteScroll, { query, children: /* @__PURE__ */ jsx36("table", { className: "w-full", children: /* @__PURE__ */ jsx36(ItemContextMenu, { dataKey, type, children: /* @__PURE__ */ jsx36("tbody", { children: /* @__PURE__ */ jsx36(ListItems, { dataKey, type, query }) }) }) }) }) })
5353
5452
  ] });
5354
5453
  };
5355
5454
  var ListItems = ({
@@ -5361,7 +5460,7 @@ var ListItems = ({
5361
5460
  const keys = useMemo7(() => query.data?.pages.flatMap((page) => page.keys) ?? [], [query.data]);
5362
5461
  const fields = useMemo7(() => keys.map((key) => key.key), [keys]);
5363
5462
  const { mutate: editItem } = useEditListItem();
5364
- return /* @__PURE__ */ jsx35(Fragment5, { children: keys.map(({ key, value }, i) => /* @__PURE__ */ jsxs21(
5463
+ return /* @__PURE__ */ jsx36(Fragment5, { children: keys.map(({ key, value }, i) => /* @__PURE__ */ jsxs21(
5365
5464
  "tr",
5366
5465
  {
5367
5466
  "data-item-key": key,
@@ -5371,7 +5470,7 @@ var ListItems = ({
5371
5470
  },
5372
5471
  className: cn("h-10 border-b border-b-zinc-100 transition-colors hover:bg-zinc-100"),
5373
5472
  children: [
5374
- /* @__PURE__ */ jsx35(
5473
+ /* @__PURE__ */ jsx36(
5375
5474
  "td",
5376
5475
  {
5377
5476
  className: cn(
@@ -5381,14 +5480,14 @@ var ListItems = ({
5381
5480
  children: key
5382
5481
  }
5383
5482
  ),
5384
- value !== void 0 && /* @__PURE__ */ jsx35(
5483
+ value !== void 0 && /* @__PURE__ */ jsx36(
5385
5484
  "td",
5386
5485
  {
5387
5486
  className: cn("cursor-pointer truncate px-3", type === "zset" ? "w-24" : "max-w-0"),
5388
5487
  children: value
5389
5488
  }
5390
5489
  ),
5391
- type !== "stream" && /* @__PURE__ */ jsx35(
5490
+ type !== "stream" && /* @__PURE__ */ jsx36(
5392
5491
  "td",
5393
5492
  {
5394
5493
  className: "w-0 min-w-0 p-0",
@@ -5396,8 +5495,8 @@ var ListItems = ({
5396
5495
  e.stopPropagation();
5397
5496
  },
5398
5497
  children: /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-end gap-2", children: [
5399
- type === "hash" && /* @__PURE__ */ jsx35(HashFieldTTLInfo, { dataKey, field: key, fields }),
5400
- /* @__PURE__ */ jsx35(
5498
+ type === "hash" && /* @__PURE__ */ jsx36(HashFieldTTLInfo, { dataKey, field: key, fields }),
5499
+ /* @__PURE__ */ jsx36(
5401
5500
  DeleteAlertDialog,
5402
5501
  {
5403
5502
  deletionType: "item",
@@ -5411,14 +5510,14 @@ var ListItems = ({
5411
5510
  newKey: void 0
5412
5511
  });
5413
5512
  },
5414
- children: /* @__PURE__ */ jsx35(
5513
+ children: /* @__PURE__ */ jsx36(
5415
5514
  Button,
5416
5515
  {
5417
5516
  className: "",
5418
5517
  size: "icon-sm",
5419
5518
  variant: "secondary",
5420
5519
  onClick: (e) => e.stopPropagation(),
5421
- children: /* @__PURE__ */ jsx35(IconTrash, { className: "size-4 text-zinc-500" })
5520
+ children: /* @__PURE__ */ jsx36(IconTrash2, { className: "size-4 text-zinc-500" })
5422
5521
  }
5423
5522
  )
5424
5523
  }
@@ -5435,12 +5534,12 @@ var ListItems = ({
5435
5534
  // src/components/databrowser/components/display/display-simple.tsx
5436
5535
  import { useEffect as useEffect10 } from "react";
5437
5536
  import { useForm as useForm3 } from "react-hook-form";
5438
- import { Fragment as Fragment6, jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
5537
+ import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
5439
5538
  var EditorDisplay = ({ dataKey, type }) => {
5440
5539
  const { data } = useFetchSimpleKey(dataKey, type);
5441
5540
  return /* @__PURE__ */ jsxs22("div", { className: "flex h-full w-full flex-col gap-2", children: [
5442
- /* @__PURE__ */ jsx36(DisplayHeader, { dataKey, type, content: data ?? void 0 }),
5443
- /* @__PURE__ */ jsx36("div", { className: "flex h-full grow flex-col gap-2 rounded-md bg-zinc-100", children: data === void 0 ? /* @__PURE__ */ jsx36(Spinner, { isLoadingText: "", isLoading: true }) : data === null ? /* @__PURE__ */ jsx36(Fragment6, {}) : /* @__PURE__ */ jsx36(EditorDisplayForm, { dataKey, type, data }, dataKey) })
5541
+ /* @__PURE__ */ jsx37(DisplayHeader, { dataKey, type, content: data ?? void 0 }),
5542
+ /* @__PURE__ */ jsx37("div", { className: "flex h-full grow flex-col gap-2 rounded-md bg-zinc-100", children: data === void 0 ? /* @__PURE__ */ jsx37(Spinner, { isLoadingText: "", isLoading: true }) : data === null ? /* @__PURE__ */ jsx37(Fragment6, {}) : /* @__PURE__ */ jsx37(EditorDisplayForm, { dataKey, type, data }, dataKey) })
5444
5543
  ] });
5445
5544
  };
5446
5545
  var EditorDisplayForm = ({
@@ -5461,12 +5560,12 @@ var EditorDisplayForm = ({
5461
5560
  };
5462
5561
  return /* @__PURE__ */ jsxs22(Fragment6, { children: [
5463
5562
  /* @__PURE__ */ jsxs22("div", { className: "flex grow flex-col gap-1", children: [
5464
- /* @__PURE__ */ jsx36("div", { className: "flex shrink-0 items-center gap-2", children: type === "json" ? /* @__PURE__ */ jsx36("div", {}) : selector }),
5465
- /* @__PURE__ */ jsx36("div", { className: "grow rounded-md border border-zinc-300 bg-white p-1", children: editor })
5563
+ /* @__PURE__ */ jsx37("div", { className: "flex shrink-0 items-center gap-2", children: type === "json" ? /* @__PURE__ */ jsx37("div", {}) : selector }),
5564
+ /* @__PURE__ */ jsx37("div", { className: "grow rounded-md border border-zinc-300 bg-white p-1 dark:!bg-[#192321]", children: editor })
5466
5565
  ] }),
5467
- /* @__PURE__ */ jsx36("div", { className: "flex shrink-0 items-center gap-2", children: /* @__PURE__ */ jsxs22("div", { className: "ml-auto flex gap-2", children: [
5468
- form.formState.isDirty && /* @__PURE__ */ jsx36(Button, { onClick: handleCancel, children: "Cancel" }),
5469
- /* @__PURE__ */ jsx36(
5566
+ /* @__PURE__ */ jsx37("div", { className: "flex shrink-0 items-center gap-2", children: /* @__PURE__ */ jsxs22("div", { className: "ml-auto flex gap-2", children: [
5567
+ form.formState.isDirty && /* @__PURE__ */ jsx37(Button, { onClick: handleCancel, children: "Cancel" }),
5568
+ /* @__PURE__ */ jsx37(
5470
5569
  Button,
5471
5570
  {
5472
5571
  variant: "primary",
@@ -5474,7 +5573,7 @@ var EditorDisplayForm = ({
5474
5573
  await setKey(value);
5475
5574
  }),
5476
5575
  disabled: !form.formState.isValid || !form.formState.isDirty,
5477
- children: /* @__PURE__ */ jsx36(Spinner, { isLoading: isSettingKey, isLoadingText: "Saving", children: "Save" })
5576
+ children: /* @__PURE__ */ jsx37(Spinner, { isLoading: isSettingKey, isLoadingText: "Saving", children: "Save" })
5478
5577
  }
5479
5578
  )
5480
5579
  ] }) })
@@ -5482,12 +5581,12 @@ var EditorDisplayForm = ({
5482
5581
  };
5483
5582
 
5484
5583
  // src/components/databrowser/components/display/index.tsx
5485
- import { Fragment as Fragment7, jsx as jsx37 } from "react/jsx-runtime";
5584
+ import { Fragment as Fragment7, jsx as jsx38 } from "react/jsx-runtime";
5486
5585
  var DataDisplay = () => {
5487
5586
  const { selectedKey } = useTab();
5488
5587
  const { query } = useKeys();
5489
5588
  const type = useKeyType(selectedKey);
5490
- return /* @__PURE__ */ jsx37("div", { className: "h-full p-4", children: !selectedKey ? /* @__PURE__ */ jsx37("div", {}) : !type ? query.isLoading ? /* @__PURE__ */ jsx37("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx37("span", { className: "text-gray-500", children: "Loading..." }) }) : /* @__PURE__ */ jsx37("div", {}) : /* @__PURE__ */ jsx37(Fragment7, { children: type === "string" || type === "json" ? /* @__PURE__ */ jsx37(EditorDisplay, { dataKey: selectedKey, type }) : /* @__PURE__ */ jsx37(ListDisplay, { dataKey: selectedKey, type }) }) });
5589
+ return /* @__PURE__ */ jsx38("div", { className: "h-full p-4", children: !selectedKey ? /* @__PURE__ */ jsx38("div", {}) : !type ? query.isLoading ? /* @__PURE__ */ jsx38("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx38("span", { className: "text-zinc-500", children: "Loading..." }) }) : /* @__PURE__ */ jsx38("div", {}) : /* @__PURE__ */ jsx38(Fragment7, { children: type === "string" || type === "json" ? /* @__PURE__ */ jsx38(EditorDisplay, { dataKey: selectedKey, type }) : /* @__PURE__ */ jsx38(ListDisplay, { dataKey: selectedKey, type }) }) });
5491
5590
  };
5492
5591
 
5493
5592
  // src/components/databrowser/components/sidebar/index.tsx
@@ -5502,12 +5601,12 @@ import { Controller as Controller3, useForm as useForm4 } from "react-hook-form"
5502
5601
  // src/components/ui/dialog.tsx
5503
5602
  import * as React12 from "react";
5504
5603
  import * as DialogPrimitive from "@radix-ui/react-dialog";
5505
- import { jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
5604
+ import { jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
5506
5605
  var Dialog = DialogPrimitive.Root;
5507
5606
  var DialogTrigger = DialogPrimitive.Trigger;
5508
- var DialogPortal = (props) => /* @__PURE__ */ jsx38(DialogPrimitive.Portal, { container: portalRoot, ...props });
5607
+ var DialogPortal = (props) => /* @__PURE__ */ jsx39(DialogPrimitive.Portal, { container: portalRoot, ...props });
5509
5608
  DialogPortal.displayName = DialogPrimitive.Portal.displayName;
5510
- var DialogOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
5609
+ var DialogOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
5511
5610
  DialogPrimitive.Overlay,
5512
5611
  {
5513
5612
  ref,
@@ -5522,7 +5621,7 @@ var DialogOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__P
5522
5621
  ));
5523
5622
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
5524
5623
  var DialogContent = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs23(DialogPortal, { children: [
5525
- /* @__PURE__ */ jsx38(DialogOverlay, {}),
5624
+ /* @__PURE__ */ jsx39(DialogOverlay, {}),
5526
5625
  /* @__PURE__ */ jsxs23(
5527
5626
  DialogPrimitive.Content,
5528
5627
  {
@@ -5543,8 +5642,8 @@ var DialogContent = React12.forwardRef(({ className, children, ...props }, ref)
5543
5642
  ...props,
5544
5643
  children: [
5545
5644
  children,
5546
- /* @__PURE__ */ jsxs23(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-zinc-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-zinc-100 data-[state=open]:text-zinc-500 dark:ring-offset-zinc-950 dark:focus:ring-zinc-300 dark:data-[state=open]:bg-zinc-800 dark:data-[state=open]:text-zinc-400", children: [
5547
- /* @__PURE__ */ jsx38(
5645
+ /* @__PURE__ */ jsxs23(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-zinc-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-zinc-100 data-[state=open]:text-zinc-500", children: [
5646
+ /* @__PURE__ */ jsx39(
5548
5647
  "svg",
5549
5648
  {
5550
5649
  width: "15",
@@ -5553,7 +5652,7 @@ var DialogContent = React12.forwardRef(({ className, children, ...props }, ref)
5553
5652
  fill: "none",
5554
5653
  xmlns: "http://www.w3.org/2000/svg",
5555
5654
  className: "h-4 w-4",
5556
- children: /* @__PURE__ */ jsx38(
5655
+ children: /* @__PURE__ */ jsx39(
5557
5656
  "path",
5558
5657
  {
5559
5658
  d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",
@@ -5564,16 +5663,16 @@ var DialogContent = React12.forwardRef(({ className, children, ...props }, ref)
5564
5663
  )
5565
5664
  }
5566
5665
  ),
5567
- /* @__PURE__ */ jsx38("span", { className: "sr-only", children: "Close" })
5666
+ /* @__PURE__ */ jsx39("span", { className: "sr-only", children: "Close" })
5568
5667
  ] })
5569
5668
  ]
5570
5669
  }
5571
5670
  )
5572
5671
  ] }));
5573
5672
  DialogContent.displayName = DialogPrimitive.Content.displayName;
5574
- var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx38("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
5673
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx39("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
5575
5674
  DialogHeader.displayName = "DialogHeader";
5576
- var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx38(
5675
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx39(
5577
5676
  "div",
5578
5677
  {
5579
5678
  className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
@@ -5581,7 +5680,7 @@ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx38(
5581
5680
  }
5582
5681
  );
5583
5682
  DialogFooter.displayName = "DialogFooter";
5584
- var DialogTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
5683
+ var DialogTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
5585
5684
  DialogPrimitive.Title,
5586
5685
  {
5587
5686
  ref,
@@ -5590,18 +5689,18 @@ var DialogTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PUR
5590
5689
  }
5591
5690
  ));
5592
5691
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
5593
- var DialogDescription = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
5692
+ var DialogDescription = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
5594
5693
  DialogPrimitive.Description,
5595
5694
  {
5596
5695
  ref,
5597
- className: cn("text-sm text-zinc-500 dark:text-zinc-400", className),
5696
+ className: cn("text-sm text-zinc-500", className),
5598
5697
  ...props
5599
5698
  }
5600
5699
  ));
5601
5700
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
5602
5701
 
5603
5702
  // src/components/databrowser/components/add-key-modal.tsx
5604
- import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
5703
+ import { jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
5605
5704
  function AddKeyModal() {
5606
5705
  const { setSelectedKey } = useTab();
5607
5706
  const [open, setOpen] = useState9(false);
@@ -5633,24 +5732,24 @@ function AddKeyModal() {
5633
5732
  setOpen(open2);
5634
5733
  },
5635
5734
  children: [
5636
- /* @__PURE__ */ jsx39(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx39(Button, { variant: "primary", size: "icon-sm", "aria-label": "Add key", children: /* @__PURE__ */ jsx39(PlusIcon, { className: "size-4" }) }) }),
5735
+ /* @__PURE__ */ jsx40(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx40(Button, { variant: "primary", size: "icon-sm", "aria-label": "Add key", children: /* @__PURE__ */ jsx40(PlusIcon, { className: "size-4" }) }) }),
5637
5736
  /* @__PURE__ */ jsxs24(DialogContent, { className: "max-w-[400px]", children: [
5638
- /* @__PURE__ */ jsx39(DialogHeader, { children: /* @__PURE__ */ jsx39(DialogTitle, { children: "Create new key" }) }),
5639
- /* @__PURE__ */ jsx39("div", { className: "sr-only", children: /* @__PURE__ */ jsx39(DialogDescription2, { children: "Create new key" }) }),
5737
+ /* @__PURE__ */ jsx40(DialogHeader, { children: /* @__PURE__ */ jsx40(DialogTitle, { children: "Create new key" }) }),
5738
+ /* @__PURE__ */ jsx40("div", { className: "sr-only", children: /* @__PURE__ */ jsx40(DialogDescription2, { children: "Create new key" }) }),
5640
5739
  /* @__PURE__ */ jsxs24("form", { className: "mt-4", onSubmit, children: [
5641
5740
  /* @__PURE__ */ jsxs24("div", { className: "flex gap-1", children: [
5642
- /* @__PURE__ */ jsx39(
5741
+ /* @__PURE__ */ jsx40(
5643
5742
  Controller3,
5644
5743
  {
5645
5744
  control,
5646
5745
  name: "type",
5647
5746
  render: ({ field }) => /* @__PURE__ */ jsxs24(Select, { value: field.value, onValueChange: field.onChange, children: [
5648
- /* @__PURE__ */ jsx39(SelectTrigger, { className: "h-8 w-auto pl-[3px] pr-8", children: /* @__PURE__ */ jsx39(SelectValue, {}) }),
5649
- /* @__PURE__ */ jsx39(SelectContent, { children: /* @__PURE__ */ jsx39(SelectGroup, { children: DATA_TYPES.map((type) => /* @__PURE__ */ jsx39(SelectItem, { value: type, children: /* @__PURE__ */ jsx39(TypeTag, { variant: type, type: "badge" }) }, type)) }) })
5747
+ /* @__PURE__ */ jsx40(SelectTrigger, { className: "h-8 w-auto pl-[3px] pr-8", children: /* @__PURE__ */ jsx40(SelectValue, {}) }),
5748
+ /* @__PURE__ */ jsx40(SelectContent, { children: /* @__PURE__ */ jsx40(SelectGroup, { children: DATA_TYPES.map((type) => /* @__PURE__ */ jsx40(SelectItem, { value: type, children: /* @__PURE__ */ jsx40(TypeTag, { variant: type, type: "badge" }) }, type)) }) })
5650
5749
  ] })
5651
5750
  }
5652
5751
  ),
5653
- /* @__PURE__ */ jsx39(
5752
+ /* @__PURE__ */ jsx40(
5654
5753
  Controller3,
5655
5754
  {
5656
5755
  rules: {
@@ -5658,14 +5757,14 @@ function AddKeyModal() {
5658
5757
  },
5659
5758
  control,
5660
5759
  name: "key",
5661
- render: ({ field }) => /* @__PURE__ */ jsx39(Input, { placeholder: "mykey", ...field, className: "h-8 grow" })
5760
+ render: ({ field }) => /* @__PURE__ */ jsx40(Input, { placeholder: "mykey", ...field, className: "h-8 grow" })
5662
5761
  }
5663
5762
  )
5664
5763
  ] }),
5665
- formState.errors.key && /* @__PURE__ */ jsx39("p", { className: "mb-3 mt-2 text-xs text-red-500", children: formState.errors.key?.message }),
5666
- /* @__PURE__ */ jsx39("p", { className: "mt-2 text-xs text-zinc-500", children: "After creating the key, you can edit the value" }),
5764
+ formState.errors.key && /* @__PURE__ */ jsx40("p", { className: "mb-3 mt-2 text-xs text-red-500", children: formState.errors.key?.message }),
5765
+ /* @__PURE__ */ jsx40("p", { className: "mt-2 text-xs text-zinc-500", children: "After creating the key, you can edit the value" }),
5667
5766
  /* @__PURE__ */ jsxs24("div", { className: "mt-6 flex justify-end gap-2", children: [
5668
- /* @__PURE__ */ jsx39(
5767
+ /* @__PURE__ */ jsx40(
5669
5768
  Button,
5670
5769
  {
5671
5770
  type: "button",
@@ -5676,7 +5775,7 @@ function AddKeyModal() {
5676
5775
  children: "Cancel"
5677
5776
  }
5678
5777
  ),
5679
- /* @__PURE__ */ jsx39(Button, { variant: "primary", type: "submit", children: /* @__PURE__ */ jsx39(Spinner, { isLoading: isPending, isLoadingText: "Creating", children: "Create" }) })
5778
+ /* @__PURE__ */ jsx40(Button, { variant: "primary", type: "submit", children: /* @__PURE__ */ jsx40(Spinner, { isLoading: isPending, isLoadingText: "Creating", children: "Create" }) })
5680
5779
  ] })
5681
5780
  ] })
5682
5781
  ] })
@@ -5686,18 +5785,19 @@ function AddKeyModal() {
5686
5785
  }
5687
5786
 
5688
5787
  // src/components/databrowser/components/sidebar/empty.tsx
5689
- import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
5788
+ import { jsx as jsx41, jsxs as jsxs25 } from "react/jsx-runtime";
5690
5789
  var Empty = () => {
5691
- return /* @__PURE__ */ jsx40("div", { className: "flex h-full w-full items-center justify-center rounded-md border bg-white px-4 py-6 text-center", children: /* @__PURE__ */ jsxs25("div", { className: "space-y-5", children: [
5692
- /* @__PURE__ */ jsx40("p", { className: "text-md font-medium", children: "Data on a break" }),
5693
- /* @__PURE__ */ jsx40("p", { className: "text-balance text-center", children: '"Quick, lure it back with some CLI magic!"' })
5790
+ return /* @__PURE__ */ jsx41("div", { className: "flex h-full w-full items-center justify-center rounded-md border bg-white px-4 py-6 text-center", children: /* @__PURE__ */ jsxs25("div", { className: "space-y-5", children: [
5791
+ /* @__PURE__ */ jsx41("p", { className: "text-md font-medium", children: "Data on a break" }),
5792
+ /* @__PURE__ */ jsx41("p", { className: "text-balance text-center", children: '"Quick, lure it back with some CLI magic!"' })
5694
5793
  ] }) });
5695
5794
  };
5696
5795
 
5697
5796
  // src/components/databrowser/components/sidebar-context-menu.tsx
5698
5797
  import { useState as useState10 } from "react";
5798
+ import { IconCopy as IconCopy3, IconExternalLink as IconExternalLink2, IconTrash as IconTrash3 } from "@tabler/icons-react";
5699
5799
  import { ContextMenuSeparator as ContextMenuSeparator3 } from "@radix-ui/react-context-menu";
5700
- import { Fragment as Fragment8, jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
5800
+ import { Fragment as Fragment8, jsx as jsx42, jsxs as jsxs26 } from "react/jsx-runtime";
5701
5801
  var SidebarContextMenu = ({ children }) => {
5702
5802
  const { mutate: deleteKey } = useDeleteKey();
5703
5803
  const [isAlertOpen, setAlertOpen] = useState10(false);
@@ -5705,7 +5805,7 @@ var SidebarContextMenu = ({ children }) => {
5705
5805
  const { addTab, setSelectedKey, selectTab, setSearch } = useDatabrowserStore();
5706
5806
  const { search: currentSearch } = useTab();
5707
5807
  return /* @__PURE__ */ jsxs26(Fragment8, { children: [
5708
- /* @__PURE__ */ jsx41(
5808
+ /* @__PURE__ */ jsx42(
5709
5809
  DeleteAlertDialog,
5710
5810
  {
5711
5811
  deletionType: "key",
@@ -5719,7 +5819,7 @@ var SidebarContextMenu = ({ children }) => {
5719
5819
  }
5720
5820
  ),
5721
5821
  /* @__PURE__ */ jsxs26(ContextMenu, { modal: false, children: [
5722
- /* @__PURE__ */ jsx41(
5822
+ /* @__PURE__ */ jsx42(
5723
5823
  ContextMenuTrigger,
5724
5824
  {
5725
5825
  onContextMenu: (e) => {
@@ -5735,7 +5835,7 @@ var SidebarContextMenu = ({ children }) => {
5735
5835
  }
5736
5836
  ),
5737
5837
  /* @__PURE__ */ jsxs26(ContextMenuContent, { children: [
5738
- /* @__PURE__ */ jsx41(
5838
+ /* @__PURE__ */ jsxs26(
5739
5839
  ContextMenuItem,
5740
5840
  {
5741
5841
  onClick: () => {
@@ -5744,10 +5844,14 @@ var SidebarContextMenu = ({ children }) => {
5744
5844
  description: "Key copied to clipboard"
5745
5845
  });
5746
5846
  },
5747
- children: "Copy key"
5847
+ className: "gap-2",
5848
+ children: [
5849
+ /* @__PURE__ */ jsx42(IconCopy3, { size: 16 }),
5850
+ "Copy key"
5851
+ ]
5748
5852
  }
5749
5853
  ),
5750
- /* @__PURE__ */ jsx41(
5854
+ /* @__PURE__ */ jsxs26(
5751
5855
  ContextMenuItem,
5752
5856
  {
5753
5857
  onClick: () => {
@@ -5756,21 +5860,28 @@ var SidebarContextMenu = ({ children }) => {
5756
5860
  setSearch(newTabId, currentSearch);
5757
5861
  selectTab(newTabId);
5758
5862
  },
5759
- children: "Open in new tab"
5863
+ className: "gap-2",
5864
+ children: [
5865
+ /* @__PURE__ */ jsx42(IconExternalLink2, { size: 16 }),
5866
+ "Open in new tab"
5867
+ ]
5760
5868
  }
5761
5869
  ),
5762
- /* @__PURE__ */ jsx41(ContextMenuSeparator3, {}),
5763
- /* @__PURE__ */ jsx41(ContextMenuItem, { onClick: () => setAlertOpen(true), children: "Delete key" })
5870
+ /* @__PURE__ */ jsx42(ContextMenuSeparator3, {}),
5871
+ /* @__PURE__ */ jsxs26(ContextMenuItem, { onClick: () => setAlertOpen(true), className: "gap-2", children: [
5872
+ /* @__PURE__ */ jsx42(IconTrash3, { size: 16 }),
5873
+ "Delete key"
5874
+ ] })
5764
5875
  ] })
5765
5876
  ] })
5766
5877
  ] });
5767
5878
  };
5768
5879
 
5769
5880
  // src/components/databrowser/components/sidebar/keys-list.tsx
5770
- import { Fragment as Fragment9, jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
5881
+ import { Fragment as Fragment9, jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
5771
5882
  var KeysList = () => {
5772
5883
  const { keys } = useKeys();
5773
- return /* @__PURE__ */ jsx42(SidebarContextMenu, { children: /* @__PURE__ */ jsx42(Fragment9, { children: keys.map((data, i) => /* @__PURE__ */ jsx42(KeyItem, { nextKey: keys.at(i + 1)?.[0] ?? "", data }, data[0])) }) });
5884
+ return /* @__PURE__ */ jsx43(SidebarContextMenu, { children: /* @__PURE__ */ jsx43(Fragment9, { children: keys.map((data, i) => /* @__PURE__ */ jsx43(KeyItem, { nextKey: keys.at(i + 1)?.[0] ?? "", data }, data[0])) }) });
5774
5885
  };
5775
5886
  var keyStyles = {
5776
5887
  string: "border-sky-400 !bg-sky-50 text-sky-900",
@@ -5799,9 +5910,9 @@ var KeyItem = ({ data, nextKey }) => {
5799
5910
  ),
5800
5911
  onClick: () => setSelectedKey(dataKey),
5801
5912
  children: [
5802
- /* @__PURE__ */ jsx42(TypeTag, { variant: dataType, type: "icon" }),
5803
- /* @__PURE__ */ jsx42("p", { className: "truncate whitespace-nowrap", children: dataKey }),
5804
- !isKeySelected && !isNextKeySelected && /* @__PURE__ */ jsx42("span", { className: "absolute -bottom-px left-3 right-3 h-px bg-zinc-100" })
5913
+ /* @__PURE__ */ jsx43(TypeTag, { variant: dataType, type: "icon" }),
5914
+ /* @__PURE__ */ jsx43("p", { className: "truncate whitespace-nowrap", children: dataKey }),
5915
+ !isKeySelected && !isNextKeySelected && /* @__PURE__ */ jsx43("span", { className: "absolute -bottom-px left-3 right-3 h-px bg-zinc-100" })
5805
5916
  ]
5806
5917
  }
5807
5918
  );
@@ -5810,7 +5921,7 @@ var KeyItem = ({ data, nextKey }) => {
5810
5921
  // src/components/databrowser/components/sidebar/search-input.tsx
5811
5922
  import { useEffect as useEffect11, useRef as useRef3, useState as useState11 } from "react";
5812
5923
  import { IconX } from "@tabler/icons-react";
5813
- import { jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
5924
+ import { jsx as jsx44, jsxs as jsxs28 } from "react/jsx-runtime";
5814
5925
  var dedupeSearchHistory = (history) => {
5815
5926
  const seen = /* @__PURE__ */ new Set();
5816
5927
  return history.filter((item) => {
@@ -5868,7 +5979,7 @@ var SearchInput = () => {
5868
5979
  };
5869
5980
  return /* @__PURE__ */ jsxs28("div", { className: "relative grow", children: [
5870
5981
  /* @__PURE__ */ jsxs28(Popover, { open: isFocus && filteredHistory.length > 0, children: [
5871
- /* @__PURE__ */ jsx43(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx43("div", { children: /* @__PURE__ */ jsx43(
5982
+ /* @__PURE__ */ jsx44(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx44("div", { children: /* @__PURE__ */ jsx44(
5872
5983
  Input,
5873
5984
  {
5874
5985
  ref: inputRef,
@@ -5887,7 +5998,7 @@ var SearchInput = () => {
5887
5998
  onBlur: () => setIsFocus(false)
5888
5999
  }
5889
6000
  ) }) }),
5890
- /* @__PURE__ */ jsx43(
6001
+ /* @__PURE__ */ jsx44(
5891
6002
  PopoverContent,
5892
6003
  {
5893
6004
  className: "w-[--radix-popover-trigger-width] divide-y px-3 py-2 text-[13px] text-zinc-900",
@@ -5896,7 +6007,7 @@ var SearchInput = () => {
5896
6007
  e.preventDefault();
5897
6008
  e.stopPropagation();
5898
6009
  },
5899
- children: filteredHistory.map((item, index) => /* @__PURE__ */ jsx43("div", { className: "w-full py-[3px]", children: /* @__PURE__ */ jsx43(
6010
+ children: filteredHistory.map((item, index) => /* @__PURE__ */ jsx44("div", { className: "w-full py-[3px]", children: /* @__PURE__ */ jsx44(
5900
6011
  "button",
5901
6012
  {
5902
6013
  ref: (el) => {
@@ -5917,14 +6028,14 @@ var SearchInput = () => {
5917
6028
  type: "button",
5918
6029
  variant: "link",
5919
6030
  size: "icon",
5920
- className: "absolute right-1 top-1/2 h-5 w-5 -translate-y-1/2 text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100",
6031
+ className: "absolute right-1 top-1/2 h-5 w-5 -translate-y-1/2 text-zinc-500 hover:text-zinc-900",
5921
6032
  onClick: () => {
5922
6033
  setSearchKey("");
5923
6034
  setState("");
5924
6035
  },
5925
6036
  children: [
5926
- /* @__PURE__ */ jsx43(IconX, { size: 16 }),
5927
- /* @__PURE__ */ jsx43("span", { className: "sr-only", children: "Clear" })
6037
+ /* @__PURE__ */ jsx44(IconX, { size: 16 }),
6038
+ /* @__PURE__ */ jsx44("span", { className: "sr-only", children: "Clear" })
5928
6039
  ]
5929
6040
  }
5930
6041
  ),
@@ -5933,15 +6044,15 @@ var SearchInput = () => {
5933
6044
  };
5934
6045
 
5935
6046
  // src/components/databrowser/components/sidebar/skeleton-buttons.tsx
5936
- import { jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
6047
+ import { jsx as jsx45, jsxs as jsxs29 } from "react/jsx-runtime";
5937
6048
  var DEFAULT_SKELETON_COUNT = 6;
5938
- var LoadingSkeleton = () => /* @__PURE__ */ jsx44("div", { className: "block h-full w-full rounded-lg border border-zinc-200 bg-white p-1 pr-3 transition-all", children: Array.from({ length: DEFAULT_SKELETON_COUNT }).fill(0).map((_, idx) => /* @__PURE__ */ jsxs29("div", { className: "flex h-10 items-center gap-2 px-3", children: [
5939
- /* @__PURE__ */ jsx44(Skeleton, { className: "size-5 shrink-0 rounded" }),
5940
- /* @__PURE__ */ jsx44(Skeleton, { className: "h-4 grow rounded" })
6049
+ var LoadingSkeleton = () => /* @__PURE__ */ jsx45("div", { className: "block h-full w-full rounded-lg border border-zinc-200 bg-white p-1 pr-3 transition-all", children: Array.from({ length: DEFAULT_SKELETON_COUNT }).fill(0).map((_, idx) => /* @__PURE__ */ jsxs29("div", { className: "flex h-10 items-center gap-2 px-3", children: [
6050
+ /* @__PURE__ */ jsx45(Skeleton, { className: "size-5 shrink-0 rounded" }),
6051
+ /* @__PURE__ */ jsx45(Skeleton, { className: "h-4 grow rounded" })
5941
6052
  ] }, idx)) });
5942
6053
 
5943
6054
  // src/components/databrowser/components/sidebar/type-selector.tsx
5944
- import { jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
6055
+ import { jsx as jsx46, jsxs as jsxs30 } from "react/jsx-runtime";
5945
6056
  var ALL_TYPES_KEY = "all";
5946
6057
  function DataTypeSelector() {
5947
6058
  const { search, setSearchType } = useTab();
@@ -5957,9 +6068,9 @@ function DataTypeSelector() {
5957
6068
  },
5958
6069
  value: search.type === void 0 ? ALL_TYPES_KEY : search.type,
5959
6070
  children: [
5960
- /* @__PURE__ */ jsx45(SelectTrigger, { className: "!w-auto select-none whitespace-nowrap rounded-r-none border-r-0 border-zinc-300 pr-8", children: /* @__PURE__ */ jsx45(SelectValue, {}) }),
5961
- /* @__PURE__ */ jsx45(SelectContent, { children: /* @__PURE__ */ jsx45(SelectGroup, { children: [[ALL_TYPES_KEY, "All Types"], ...Object.entries(DATA_TYPE_NAMES)].map(
5962
- ([key, value]) => /* @__PURE__ */ jsx45(SelectItem, { value: key, children: value }, key)
6071
+ /* @__PURE__ */ jsx46(SelectTrigger, { className: "!w-auto select-none whitespace-nowrap rounded-r-none border-r-0 border-zinc-300 pr-8", children: /* @__PURE__ */ jsx46(SelectValue, {}) }),
6072
+ /* @__PURE__ */ jsx46(SelectContent, { children: /* @__PURE__ */ jsx46(SelectGroup, { children: [[ALL_TYPES_KEY, "All Types"], ...Object.entries(DATA_TYPE_NAMES)].map(
6073
+ ([key, value]) => /* @__PURE__ */ jsx46(SelectItem, { value: key, children: value }, key)
5963
6074
  ) }) })
5964
6075
  ]
5965
6076
  }
@@ -5967,19 +6078,19 @@ function DataTypeSelector() {
5967
6078
  }
5968
6079
 
5969
6080
  // src/components/databrowser/components/sidebar/index.tsx
5970
- import { jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
6081
+ import { jsx as jsx47, jsxs as jsxs31 } from "react/jsx-runtime";
5971
6082
  function Sidebar() {
5972
6083
  const { keys, query } = useKeys();
5973
6084
  return /* @__PURE__ */ jsxs31("div", { className: "flex h-full flex-col gap-2 p-4", children: [
5974
6085
  /* @__PURE__ */ jsxs31("div", { className: "rounded-lg bg-zinc-100", children: [
5975
6086
  /* @__PURE__ */ jsxs31("div", { className: "flex h-10 items-center justify-between pl-1", children: [
5976
- /* @__PURE__ */ jsx46(DisplayDbSize, {}),
6087
+ /* @__PURE__ */ jsx47(DisplayDbSize, {}),
5977
6088
  /* @__PURE__ */ jsxs31("div", { className: "flex gap-1", children: [
5978
- /* @__PURE__ */ jsx46(
6089
+ /* @__PURE__ */ jsx47(
5979
6090
  Button,
5980
6091
  {
5981
6092
  "aria-label": "Refresh",
5982
- className: "h-7 w-7 px-0",
6093
+ className: "h-7 w-7 px-0 text-zinc-500",
5983
6094
  onClick: () => {
5984
6095
  queryClient.invalidateQueries({
5985
6096
  queryKey: [FETCH_KEYS_QUERY_KEY]
@@ -5997,28 +6108,28 @@ function Sidebar() {
5997
6108
  queryKey: [FETCH_KEY_TYPE_QUERY_KEY]
5998
6109
  });
5999
6110
  },
6000
- children: /* @__PURE__ */ jsx46(Spinner, { isLoading: query.isFetching, children: /* @__PURE__ */ jsx46(IconRefresh, { size: 16 }) })
6111
+ children: /* @__PURE__ */ jsx47(Spinner, { isLoading: query.isFetching, children: /* @__PURE__ */ jsx47(IconRefresh, { size: 16 }) })
6001
6112
  }
6002
6113
  ),
6003
- /* @__PURE__ */ jsx46(AddKeyModal, {})
6114
+ /* @__PURE__ */ jsx47(AddKeyModal, {})
6004
6115
  ] })
6005
6116
  ] }),
6006
6117
  /* @__PURE__ */ jsxs31("div", { className: "flex h-10 items-center", children: [
6007
- /* @__PURE__ */ jsx46(DataTypeSelector, {}),
6008
- /* @__PURE__ */ jsx46(SearchInput, {})
6118
+ /* @__PURE__ */ jsx47(DataTypeSelector, {}),
6119
+ /* @__PURE__ */ jsx47(SearchInput, {})
6009
6120
  ] })
6010
6121
  ] }),
6011
- query.isLoading && keys.length === 0 ? /* @__PURE__ */ jsx46(LoadingSkeleton, {}) : keys.length > 0 ? (
6122
+ query.isLoading && keys.length === 0 ? /* @__PURE__ */ jsx47(LoadingSkeleton, {}) : keys.length > 0 ? (
6012
6123
  // Infinite scroll already has a loader at the bottom
6013
- /* @__PURE__ */ jsx46(InfiniteScroll, { query, disableRoundedInherit: true, className: "min-h-0", children: /* @__PURE__ */ jsx46(KeysList, {}) })
6014
- ) : /* @__PURE__ */ jsx46(Empty, {})
6124
+ /* @__PURE__ */ jsx47(InfiniteScroll, { query, disableRoundedInherit: true, className: "min-h-0", children: /* @__PURE__ */ jsx47(KeysList, {}) })
6125
+ ) : /* @__PURE__ */ jsx47(Empty, {})
6015
6126
  ] });
6016
6127
  }
6017
6128
 
6018
6129
  // src/components/databrowser/components/databrowser-instance.tsx
6019
- import { jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
6130
+ import { jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
6020
6131
  var DatabrowserInstance = ({ hidden }) => {
6021
- return /* @__PURE__ */ jsx47(KeysProvider, { children: /* @__PURE__ */ jsxs32("div", { className: cn("min-h-0 grow rounded-md bg-zinc-100", hidden && "hidden"), children: [
6132
+ return /* @__PURE__ */ jsx48(KeysProvider, { children: /* @__PURE__ */ jsxs32("div", { className: cn("min-h-0 grow rounded-md bg-zinc-100", hidden && "hidden"), children: [
6022
6133
  /* @__PURE__ */ jsxs32(
6023
6134
  PanelGroup,
6024
6135
  {
@@ -6026,18 +6137,18 @@ var DatabrowserInstance = ({ hidden }) => {
6026
6137
  direction: "horizontal",
6027
6138
  className: "h-full w-full gap-0.5 text-sm antialiased",
6028
6139
  children: [
6029
- /* @__PURE__ */ jsx47(Panel, { defaultSize: 30, minSize: 30, children: /* @__PURE__ */ jsx47(Sidebar, {}) }),
6030
- /* @__PURE__ */ jsx47(PanelResizeHandle, { className: "group flex h-full w-3 justify-center", children: /* @__PURE__ */ jsx47("div", { className: "h-full border-r border-dashed border-zinc-200 transition-colors group-hover:border-zinc-500" }) }),
6031
- /* @__PURE__ */ jsx47(Panel, { minSize: 40, children: /* @__PURE__ */ jsx47(DataDisplay, {}) })
6140
+ /* @__PURE__ */ jsx48(Panel, { defaultSize: 30, minSize: 30, children: /* @__PURE__ */ jsx48(Sidebar, {}) }),
6141
+ /* @__PURE__ */ jsx48(PanelResizeHandle, { className: "group flex h-full w-3 justify-center", children: /* @__PURE__ */ jsx48("div", { className: "h-full border-r border-dashed border-zinc-200 transition-colors group-hover:border-zinc-500" }) }),
6142
+ /* @__PURE__ */ jsx48(Panel, { minSize: 40, children: /* @__PURE__ */ jsx48(DataDisplay, {}) })
6032
6143
  ]
6033
6144
  }
6034
6145
  ),
6035
- /* @__PURE__ */ jsx47(Toaster, {})
6146
+ /* @__PURE__ */ jsx48(Toaster, {})
6036
6147
  ] }) });
6037
6148
  };
6038
6149
 
6039
6150
  // src/components/databrowser/components/databrowser-tabs.tsx
6040
- import { useCallback as useCallback3, useEffect as useEffect13, useRef as useRef5, useState as useState13 } from "react";
6151
+ import { useCallback as useCallback3, useEffect as useEffect13, useMemo as useMemo8, useRef as useRef5, useState as useState13 } from "react";
6041
6152
  import {
6042
6153
  closestCenter,
6043
6154
  DndContext,
@@ -6049,19 +6160,19 @@ import {
6049
6160
  import { restrictToHorizontalAxis } from "@dnd-kit/modifiers";
6050
6161
  import { horizontalListSortingStrategy, SortableContext, useSortable } from "@dnd-kit/sortable";
6051
6162
  import { CSS } from "@dnd-kit/utilities";
6052
- import { IconPlus as IconPlus2, IconSearch as IconSearch2 } from "@tabler/icons-react";
6163
+ import { IconChevronDown as IconChevronDown2, IconPlus as IconPlus2 } from "@tabler/icons-react";
6053
6164
 
6054
6165
  // src/components/ui/command.tsx
6055
6166
  import * as React13 from "react";
6056
6167
  import { Command as CommandPrimitive } from "cmdk";
6057
6168
  import { MagnifyingGlassIcon } from "@radix-ui/react-icons";
6058
- import { jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
6059
- var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
6169
+ import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
6170
+ var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx49(
6060
6171
  CommandPrimitive,
6061
6172
  {
6062
6173
  ref,
6063
6174
  className: cn(
6064
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50",
6175
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-zinc-950",
6065
6176
  className
6066
6177
  ),
6067
6178
  ...props
@@ -6069,13 +6180,13 @@ var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__
6069
6180
  ));
6070
6181
  Command.displayName = CommandPrimitive.displayName;
6071
6182
  var CommandInput = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs33("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
6072
- /* @__PURE__ */ jsx48(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
6073
- /* @__PURE__ */ jsx48(
6183
+ /* @__PURE__ */ jsx49(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
6184
+ /* @__PURE__ */ jsx49(
6074
6185
  CommandPrimitive.Input,
6075
6186
  {
6076
6187
  ref,
6077
6188
  className: cn(
6078
- "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400",
6189
+ "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-zinc-500 disabled:cursor-not-allowed disabled:opacity-50",
6079
6190
  className
6080
6191
  ),
6081
6192
  ...props
@@ -6083,7 +6194,7 @@ var CommandInput = React13.forwardRef(({ className, ...props }, ref) => /* @__PU
6083
6194
  )
6084
6195
  ] }));
6085
6196
  CommandInput.displayName = CommandPrimitive.Input.displayName;
6086
- var CommandList = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
6197
+ var CommandList = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx49(
6087
6198
  CommandPrimitive.List,
6088
6199
  {
6089
6200
  ref,
@@ -6092,75 +6203,63 @@ var CommandList = React13.forwardRef(({ className, ...props }, ref) => /* @__PUR
6092
6203
  }
6093
6204
  ));
6094
6205
  CommandList.displayName = CommandPrimitive.List.displayName;
6095
- var CommandEmpty = React13.forwardRef((props, ref) => /* @__PURE__ */ jsx48(
6096
- CommandPrimitive.Empty,
6097
- {
6098
- ref,
6099
- className: "py-6 text-center text-sm",
6100
- ...props
6101
- }
6102
- ));
6206
+ var CommandEmpty = React13.forwardRef((props, ref) => /* @__PURE__ */ jsx49(CommandPrimitive.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
6103
6207
  CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
6104
- var CommandGroup = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
6208
+ var CommandGroup = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx49(
6105
6209
  CommandPrimitive.Group,
6106
6210
  {
6107
6211
  ref,
6108
6212
  className: cn(
6109
- "overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:text-neutral-50 dark:[&_[cmdk-group-heading]]:text-neutral-400",
6213
+ "text-zinc-950[&_[cmdk-group-heading]]:px-2 overflow-hidden p-1 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-zinc-500",
6110
6214
  className
6111
6215
  ),
6112
6216
  ...props
6113
6217
  }
6114
6218
  ));
6115
6219
  CommandGroup.displayName = CommandPrimitive.Group.displayName;
6116
- var CommandSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
6220
+ var CommandSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx49(
6117
6221
  CommandPrimitive.Separator,
6118
6222
  {
6119
6223
  ref,
6120
- className: cn("-mx-1 h-px bg-neutral-200 dark:bg-neutral-800", className),
6224
+ className: cn("-mx-1 h-px bg-zinc-200", className),
6121
6225
  ...props
6122
6226
  }
6123
6227
  ));
6124
6228
  CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
6125
- var CommandItem = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
6229
+ var CommandItem = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx49(
6126
6230
  CommandPrimitive.Item,
6127
6231
  {
6128
6232
  ref,
6129
6233
  className: cn(
6130
- "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 dark:data-[selected=true]:bg-neutral-800 dark:data-[selected=true]:text-neutral-50",
6234
+ "data-[disabled=true]:opacity-50[&_svg]:pointer-events-none relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-zinc-100 data-[selected=true]:text-zinc-900 [&_svg]:size-4 [&_svg]:shrink-0",
6131
6235
  className
6132
6236
  ),
6133
6237
  ...props
6134
6238
  }
6135
6239
  ));
6136
6240
  CommandItem.displayName = CommandPrimitive.Item.displayName;
6137
- var CommandShortcut = ({
6138
- className,
6139
- ...props
6140
- }) => {
6141
- return /* @__PURE__ */ jsx48(
6142
- "span",
6143
- {
6144
- className: cn(
6145
- "ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400",
6146
- className
6147
- ),
6148
- ...props
6149
- }
6150
- );
6241
+ var CommandShortcut = ({ className, ...props }) => {
6242
+ return /* @__PURE__ */ jsx49("span", { className: cn("ml-auto text-xs tracking-widest text-zinc-500", className), ...props });
6151
6243
  };
6152
6244
  CommandShortcut.displayName = "CommandShortcut";
6153
6245
 
6154
6246
  // src/components/databrowser/components/tab.tsx
6155
- import { IconSearch, IconX as IconX2 } from "@tabler/icons-react";
6247
+ import {
6248
+ IconArrowsMinimize,
6249
+ IconCopyPlus,
6250
+ IconPin,
6251
+ IconSearch,
6252
+ IconSquareX,
6253
+ IconX as IconX2
6254
+ } from "@tabler/icons-react";
6156
6255
 
6157
6256
  // src/components/databrowser/components/tab-type-icon.tsx
6158
- import { jsx as jsx49 } from "react/jsx-runtime";
6257
+ import { jsx as jsx50 } from "react/jsx-runtime";
6159
6258
  function TabTypeIcon({ selectedKey }) {
6160
6259
  const { data: keyType, isLoading } = useFetchKeyType(selectedKey);
6161
- if (isLoading) return /* @__PURE__ */ jsx49(Skeleton, { className: "h-5 w-5 rounded" });
6260
+ if (isLoading) return /* @__PURE__ */ jsx50(Skeleton, { className: "h-5 w-5 rounded" });
6162
6261
  if (!keyType || keyType === "none") return;
6163
- return /* @__PURE__ */ jsx49(TypeTag, { variant: keyType, type: "icon" });
6262
+ return /* @__PURE__ */ jsx50(TypeTag, { variant: keyType, type: "icon" });
6164
6263
  }
6165
6264
 
6166
6265
  // src/hooks/use-overflow.ts
@@ -6190,25 +6289,46 @@ var useOverflow = () => {
6190
6289
  };
6191
6290
 
6192
6291
  // src/components/databrowser/components/tab.tsx
6193
- import { jsx as jsx50, jsxs as jsxs34 } from "react/jsx-runtime";
6194
- var Tab = ({ id }) => {
6195
- const { active, search, selectedKey } = useTab();
6196
- const { selectTab, removeTab, tabs } = useDatabrowserStore();
6292
+ import { jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
6293
+ var Tab = ({ id, isList }) => {
6294
+ const { active, search, selectedKey, pinned } = useTab();
6295
+ const {
6296
+ selectTab,
6297
+ removeTab,
6298
+ forceRemoveTab,
6299
+ tabs,
6300
+ togglePinTab,
6301
+ duplicateTab,
6302
+ closeOtherTabs,
6303
+ closeAllButPinned
6304
+ } = useDatabrowserStore();
6305
+ const hasPinnedTabs = tabs.some(([, data]) => data.pinned);
6197
6306
  const { ref, isOverflow } = useOverflow();
6198
6307
  const label = search.key || selectedKey;
6199
- const iconNode = search.key ? /* @__PURE__ */ jsx50(IconSearch, { size: 15 }) : selectedKey ? /* @__PURE__ */ jsx50(TabTypeIcon, { selectedKey }) : void 0;
6308
+ const iconNode = search.key ? /* @__PURE__ */ jsx51(IconSearch, { size: 15 }) : selectedKey ? /* @__PURE__ */ jsx51(TabTypeIcon, { selectedKey }) : void 0;
6200
6309
  const tabNode = /* @__PURE__ */ jsxs34(
6201
6310
  "div",
6202
6311
  {
6312
+ id: isList ? `list-tab-${id}` : `tab-${id}`,
6203
6313
  onClick: () => selectTab(id),
6204
6314
  className: cn(
6205
- "flex h-9 cursor-pointer items-center gap-2 rounded-t-lg border border-zinc-200 px-3 text-[13px] transition-colors",
6206
- active ? "border-b-white bg-white text-zinc-900" : "bg-zinc-100 hover:bg-zinc-50"
6315
+ "flex h-9 w-full cursor-pointer items-center gap-2 px-3 text-[13px] transition-colors",
6316
+ isList && "max-w-[370px]",
6317
+ !isList && "rounded-t-lg border border-zinc-200",
6318
+ !isList && (active ? "border-b-white bg-white text-zinc-900" : "bg-zinc-100 hover:bg-zinc-50")
6207
6319
  ),
6208
6320
  children: [
6209
6321
  iconNode,
6210
- /* @__PURE__ */ jsx50("span", { ref, className: "max-w-32 truncate whitespace-nowrap", children: label || "New Tab" }),
6211
- tabs.length > 1 && /* @__PURE__ */ jsx50(
6322
+ /* @__PURE__ */ jsx51(
6323
+ "span",
6324
+ {
6325
+ ref,
6326
+ className: cn("min-w-0 grow truncate whitespace-nowrap", !isList && "max-w-32"),
6327
+ children: label || "New Tab"
6328
+ }
6329
+ ),
6330
+ pinned && /* @__PURE__ */ jsx51(IconPin, { size: 14, className: "text-zinc-500" }),
6331
+ tabs.length > 1 && !pinned && /* @__PURE__ */ jsx51(
6212
6332
  "button",
6213
6333
  {
6214
6334
  onClick: (e) => {
@@ -6216,22 +6336,67 @@ var Tab = ({ id }) => {
6216
6336
  removeTab(id);
6217
6337
  },
6218
6338
  className: "p-1 text-zinc-300 transition-colors hover:text-zinc-500",
6219
- children: /* @__PURE__ */ jsx50(IconX2, { size: 16 })
6339
+ children: /* @__PURE__ */ jsx51(IconX2, { size: 16 })
6220
6340
  }
6221
6341
  )
6222
6342
  ]
6223
6343
  }
6224
6344
  );
6225
- return /* @__PURE__ */ jsx50(SimpleTooltip, { content: isOverflow ? label : void 0, children: tabNode });
6345
+ return /* @__PURE__ */ jsxs34(ContextMenu, { children: [
6346
+ /* @__PURE__ */ jsx51(SimpleTooltip, { content: isOverflow ? label : void 0, children: /* @__PURE__ */ jsx51(ContextMenuTrigger, { asChild: true, children: tabNode }) }),
6347
+ /* @__PURE__ */ jsxs34(
6348
+ ContextMenuContent,
6349
+ {
6350
+ onClick: (e) => {
6351
+ e.stopPropagation();
6352
+ },
6353
+ children: [
6354
+ /* @__PURE__ */ jsxs34(ContextMenuItem, { onSelect: () => togglePinTab(id), className: "gap-2", children: [
6355
+ /* @__PURE__ */ jsx51(IconPin, { size: 16 }),
6356
+ pinned ? "Unpin Tab" : "Pin Tab"
6357
+ ] }),
6358
+ /* @__PURE__ */ jsxs34(ContextMenuItem, { onSelect: () => duplicateTab(id), className: "gap-2", children: [
6359
+ /* @__PURE__ */ jsx51(IconCopyPlus, { size: 16 }),
6360
+ "Duplicate Tab"
6361
+ ] }),
6362
+ /* @__PURE__ */ jsx51(ContextMenuSeparator, {}),
6363
+ /* @__PURE__ */ jsxs34(ContextMenuItem, { onSelect: () => forceRemoveTab(id), className: "gap-2", children: [
6364
+ /* @__PURE__ */ jsx51(IconX2, { size: 16 }),
6365
+ "Close Tab"
6366
+ ] }),
6367
+ /* @__PURE__ */ jsxs34(ContextMenuItem, { onSelect: () => closeOtherTabs(id), className: "gap-2", children: [
6368
+ /* @__PURE__ */ jsx51(IconSquareX, { size: 16 }),
6369
+ "Close Other Tabs"
6370
+ ] }),
6371
+ /* @__PURE__ */ jsxs34(
6372
+ ContextMenuItem,
6373
+ {
6374
+ onSelect: () => closeAllButPinned(),
6375
+ className: "gap-2",
6376
+ disabled: !hasPinnedTabs,
6377
+ children: [
6378
+ /* @__PURE__ */ jsx51(IconArrowsMinimize, { size: 16 }),
6379
+ "Close All But Pinned"
6380
+ ]
6381
+ }
6382
+ )
6383
+ ]
6384
+ }
6385
+ )
6386
+ ] });
6226
6387
  };
6227
6388
 
6228
6389
  // src/components/databrowser/components/databrowser-tabs.tsx
6229
- import { jsx as jsx51, jsxs as jsxs35 } from "react/jsx-runtime";
6390
+ import { jsx as jsx52, jsxs as jsxs35 } from "react/jsx-runtime";
6230
6391
  var SortableTab = ({ id }) => {
6231
6392
  const [originalWidth, setOriginalWidth] = useState13(null);
6232
6393
  const textRef = useRef5(null);
6394
+ const { tabs } = useDatabrowserStore();
6395
+ const tabData = tabs.find(([tabId]) => tabId === id)?.[1];
6396
+ const isPinned = tabData?.pinned;
6233
6397
  const { attributes, listeners: listeners2, setNodeRef, transform, transition, isDragging } = useSortable({
6234
6398
  id,
6399
+ disabled: isPinned,
6235
6400
  resizeObserverConfig: {
6236
6401
  disabled: true
6237
6402
  }
@@ -6290,20 +6455,27 @@ var SortableTab = ({ id }) => {
6290
6455
  minWidth: originalWidth ? `${originalWidth}px` : void 0
6291
6456
  } : {}
6292
6457
  };
6293
- return /* @__PURE__ */ jsx51(
6458
+ return /* @__PURE__ */ jsx52(
6294
6459
  "div",
6295
6460
  {
6296
6461
  ref: measureRef,
6297
6462
  style,
6298
- className: isDragging ? "cursor-grabbing" : "cursor-grab",
6463
+ className: isDragging ? "cursor-grabbing" : isPinned ? "cursor-default" : "cursor-grab",
6299
6464
  ...attributes,
6300
- ...listeners2,
6301
- children: /* @__PURE__ */ jsx51(TabIdProvider, { value: id, children: /* @__PURE__ */ jsx51(Tab, { id }) })
6465
+ ...isPinned ? {} : listeners2,
6466
+ children: /* @__PURE__ */ jsx52(TabIdProvider, { value: id, children: /* @__PURE__ */ jsx52(Tab, { id }) })
6302
6467
  }
6303
6468
  );
6304
6469
  };
6305
6470
  var DatabrowserTabs = () => {
6306
- const { tabs, addTab, reorderTabs, selectedTab, selectTab } = useDatabrowserStore();
6471
+ const { tabs, reorderTabs, selectedTab, selectTab } = useDatabrowserStore();
6472
+ const sortedTabs = useMemo8(() => {
6473
+ return [...tabs].sort(([, a], [, b]) => {
6474
+ if (a.pinned && !b.pinned) return -1;
6475
+ if (!a.pinned && b.pinned) return 1;
6476
+ return 0;
6477
+ });
6478
+ }, [tabs]);
6307
6479
  const scrollRef = useRef5(null);
6308
6480
  const [hasLeftShadow, setHasLeftShadow] = useState13(false);
6309
6481
  const [hasRightShadow, setHasRightShadow] = useState13(false);
@@ -6367,16 +6539,16 @@ var DatabrowserTabs = () => {
6367
6539
  }
6368
6540
  };
6369
6541
  return /* @__PURE__ */ jsxs35("div", { className: "relative mb-2 shrink-0", children: [
6370
- /* @__PURE__ */ jsx51("div", { className: "absolute bottom-0 left-0 right-0 -z-10 h-[1px] w-full bg-zinc-200" }),
6542
+ /* @__PURE__ */ jsx52("div", { className: "absolute bottom-0 left-0 right-0 -z-10 h-[1px] w-full bg-zinc-200" }),
6371
6543
  /* @__PURE__ */ jsxs35("div", { className: "flex translate-y-[1px] items-center gap-1", children: [
6372
6544
  /* @__PURE__ */ jsxs35("div", { className: "relative min-w-0 flex-1", children: [
6373
- /* @__PURE__ */ jsx51(
6545
+ /* @__PURE__ */ jsx52(
6374
6546
  "div",
6375
6547
  {
6376
6548
  className: `tabs-shadow-left pointer-events-none absolute left-0 top-0 z-10 h-full w-6 transition-opacity duration-200 ${hasLeftShadow ? "opacity-100" : "opacity-0"}`
6377
6549
  }
6378
6550
  ),
6379
- /* @__PURE__ */ jsx51(
6551
+ /* @__PURE__ */ jsx52(
6380
6552
  "div",
6381
6553
  {
6382
6554
  className: `tabs-shadow-right pointer-events-none absolute right-0 top-0 z-10 h-full w-6 transition-opacity duration-200 ${hasRightShadow ? "opacity-100" : "opacity-0"}`
@@ -6389,7 +6561,7 @@ var DatabrowserTabs = () => {
6389
6561
  onScroll: recomputeShadows,
6390
6562
  className: "scrollbar-hide flex min-w-0 flex-1 items-center gap-1 overflow-x-auto pb-[1px] [&::-webkit-scrollbar]:hidden",
6391
6563
  children: [
6392
- /* @__PURE__ */ jsx51(
6564
+ /* @__PURE__ */ jsx52(
6393
6565
  DndContext,
6394
6566
  {
6395
6567
  sensors,
@@ -6401,143 +6573,144 @@ var DatabrowserTabs = () => {
6401
6573
  strategy: MeasuringStrategy.Always
6402
6574
  }
6403
6575
  },
6404
- children: /* @__PURE__ */ jsx51(
6576
+ children: /* @__PURE__ */ jsx52(
6405
6577
  SortableContext,
6406
6578
  {
6407
- items: tabs.map(([id]) => id),
6579
+ items: sortedTabs.map(([id]) => id),
6408
6580
  strategy: horizontalListSortingStrategy,
6409
- children: selectedTab && tabs.map(([id]) => /* @__PURE__ */ jsx51(SortableTab, { id }, id))
6581
+ children: selectedTab && sortedTabs.map(([id]) => /* @__PURE__ */ jsx52(SortableTab, { id }, id))
6410
6582
  }
6411
6583
  )
6412
6584
  }
6413
6585
  ),
6414
- !isOverflow && /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-1 pl-1 pr-1", children: [
6415
- tabs.length > 4 && /* @__PURE__ */ jsx51(TabSearch, { tabs, onSelectTab: selectTab }),
6416
- /* @__PURE__ */ jsx51(
6417
- Button,
6418
- {
6419
- variant: "secondary",
6420
- size: "icon-sm",
6421
- onClick: addTab,
6422
- className: "flex-shrink-0",
6423
- title: "Add new tab",
6424
- children: /* @__PURE__ */ jsx51(IconPlus2, { className: "text-zinc-500", size: 16 })
6425
- }
6426
- )
6427
- ] })
6586
+ !isOverflow && /* @__PURE__ */ jsx52("div", { className: "flex items-center gap-1 pl-1 pr-1", children: /* @__PURE__ */ jsx52(AddTabButton, {}) })
6428
6587
  ]
6429
6588
  }
6430
6589
  )
6431
6590
  ] }),
6432
- isOverflow && /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-1 pl-1", children: [
6433
- tabs.length > 4 && /* @__PURE__ */ jsx51(TabSearch, { tabs, onSelectTab: selectTab }),
6434
- /* @__PURE__ */ jsx51(
6435
- Button,
6436
- {
6437
- variant: "secondary",
6438
- size: "icon-sm",
6439
- onClick: addTab,
6440
- className: "mr-1 flex-shrink-0",
6441
- title: "Add new tab",
6442
- children: /* @__PURE__ */ jsx51(IconPlus2, { className: "text-zinc-500", size: 16 })
6443
- }
6444
- )
6591
+ /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-1 pl-1", children: [
6592
+ isOverflow && /* @__PURE__ */ jsx52(AddTabButton, {}),
6593
+ tabs.length > 1 && /* @__PURE__ */ jsx52(TabsListButton, { tabs, onSelectTab: selectTab })
6445
6594
  ] })
6446
6595
  ] })
6447
6596
  ] });
6448
6597
  };
6449
- function TabSearch({
6598
+ function AddTabButton() {
6599
+ const { addTab, selectTab } = useDatabrowserStore();
6600
+ const rootRef = useDatabrowserRootRef();
6601
+ const handleAddTab = () => {
6602
+ const tabsId = addTab();
6603
+ selectTab(tabsId);
6604
+ setTimeout(() => {
6605
+ const tab = rootRef?.current?.querySelector(`#tab-${tabsId}`);
6606
+ if (!tab) return;
6607
+ tab.scrollIntoView({ behavior: "smooth" });
6608
+ }, 20);
6609
+ };
6610
+ return /* @__PURE__ */ jsx52(
6611
+ Button,
6612
+ {
6613
+ "aria-label": "Add new tab",
6614
+ variant: "secondary",
6615
+ size: "icon-sm",
6616
+ onClick: handleAddTab,
6617
+ className: "flex-shrink-0",
6618
+ children: /* @__PURE__ */ jsx52(IconPlus2, { className: "text-zinc-500", size: 16 })
6619
+ }
6620
+ );
6621
+ }
6622
+ function TabsListButton({
6450
6623
  tabs,
6451
6624
  onSelectTab
6452
6625
  }) {
6453
6626
  const [open, setOpen] = useState13(false);
6454
- const [query, setQuery] = useState13("");
6455
- const items = tabs.map(([id, data]) => ({
6456
- id,
6457
- label: data.search.key || data.selectedKey || "New Tab",
6458
- searchKey: data.search.key,
6459
- selectedKey: data.selectedKey,
6460
- selectedItemKey: data.selectedListItem?.key
6461
- }));
6462
- const buildDisplayLabel = (it) => it.selectedItemKey ? `${it.label} > ${it.selectedItemKey}` : it.label;
6463
- const dedupedMap = /* @__PURE__ */ new Map();
6464
- for (const it of items) {
6465
- const display = buildDisplayLabel(it);
6466
- const key = display.toLowerCase();
6467
- if (!dedupedMap.has(key)) dedupedMap.set(key, it);
6468
- }
6469
- const deduped = [...dedupedMap.values()];
6470
- const filtered = (query ? deduped.filter((i) => buildDisplayLabel(i).toLowerCase().includes(query.toLowerCase())) : deduped).sort((a, b) => buildDisplayLabel(a).localeCompare(buildDisplayLabel(b)));
6471
- return /* @__PURE__ */ jsxs35(
6472
- Popover,
6473
- {
6474
- open,
6475
- onOpenChange: (v) => {
6476
- setOpen(v);
6477
- if (!v) setQuery("");
6478
- },
6479
- children: [
6480
- /* @__PURE__ */ jsxs35(Tooltip, { delayDuration: 400, children: [
6481
- /* @__PURE__ */ jsx51(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx51(Button, { variant: "secondary", size: "icon-sm", "aria-label": "Search in tabs", children: /* @__PURE__ */ jsx51(IconSearch2, { className: "text-zinc-500", size: 16 }) }) }) }),
6482
- /* @__PURE__ */ jsx51(TooltipContent, { side: "top", children: "Search in tabs" })
6483
- ] }),
6484
- /* @__PURE__ */ jsx51(PopoverContent, { className: "w-72 p-0", align: "end", children: /* @__PURE__ */ jsxs35(Command, { children: [
6485
- /* @__PURE__ */ jsx51(
6486
- CommandInput,
6487
- {
6488
- placeholder: "Search tabs...",
6489
- value: query,
6490
- onValueChange: (v) => setQuery(v),
6491
- className: "h-9"
6492
- }
6493
- ),
6494
- /* @__PURE__ */ jsxs35(CommandList, { children: [
6495
- /* @__PURE__ */ jsx51(CommandEmpty, { children: "No tabs" }),
6496
- /* @__PURE__ */ jsx51(CommandGroup, { children: filtered.map((item) => /* @__PURE__ */ jsxs35(
6497
- CommandItem,
6498
- {
6499
- value: buildDisplayLabel(item),
6500
- onSelect: () => {
6501
- onSelectTab(item.id);
6502
- setOpen(false);
6503
- },
6504
- children: [
6505
- item.searchKey ? /* @__PURE__ */ jsx51(IconSearch2, { size: 15 }) : /* @__PURE__ */ jsx51(TabTypeIcon, { selectedKey: item.selectedKey }),
6506
- /* @__PURE__ */ jsx51("span", { className: "truncate", children: buildDisplayLabel(item) })
6507
- ]
6508
- },
6509
- item.id
6510
- )) })
6511
- ] })
6512
- ] }) })
6513
- ]
6514
- }
6515
- );
6627
+ const sorted = useMemo8(() => {
6628
+ return [...tabs].sort(([, a], [, b]) => {
6629
+ if (a.pinned && !b.pinned) return -1;
6630
+ if (!a.pinned && b.pinned) return 1;
6631
+ return 0;
6632
+ });
6633
+ }, [tabs]);
6634
+ const rootRef = useDatabrowserRootRef();
6635
+ const handleSelectTab = (id) => {
6636
+ onSelectTab(id);
6637
+ setOpen(false);
6638
+ setTimeout(() => {
6639
+ const tab = rootRef?.current?.querySelector(`#tab-${id}`);
6640
+ if (!tab) return;
6641
+ tab.scrollIntoView({ behavior: "smooth" });
6642
+ }, 20);
6643
+ };
6644
+ return /* @__PURE__ */ jsxs35(Popover, { open, onOpenChange: setOpen, children: [
6645
+ /* @__PURE__ */ jsx52(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs35(
6646
+ Button,
6647
+ {
6648
+ variant: "secondary",
6649
+ size: "sm",
6650
+ className: "h-7 gap-1 px-2",
6651
+ "aria-label": "Search in tabs",
6652
+ children: [
6653
+ /* @__PURE__ */ jsx52("span", { className: "text-xs text-zinc-600", children: tabs.length }),
6654
+ /* @__PURE__ */ jsx52(IconChevronDown2, { className: "text-zinc-500", size: 16 })
6655
+ ]
6656
+ }
6657
+ ) }),
6658
+ /* @__PURE__ */ jsx52(PopoverContent, { className: "w-96 p-0", align: "end", children: /* @__PURE__ */ jsx52(Command, { children: /* @__PURE__ */ jsxs35(CommandList, { children: [
6659
+ /* @__PURE__ */ jsx52(CommandEmpty, { children: "No tabs" }),
6660
+ /* @__PURE__ */ jsx52(CommandGroup, { children: sorted.map(([_id, item]) => /* @__PURE__ */ jsx52(
6661
+ CommandItem,
6662
+ {
6663
+ style: {
6664
+ padding: 0
6665
+ },
6666
+ value: item.id,
6667
+ onSelect: () => {
6668
+ handleSelectTab(item.id);
6669
+ },
6670
+ children: /* @__PURE__ */ jsx52(TabIdProvider, { value: _id, children: /* @__PURE__ */ jsx52(Tab, { id: _id, isList: true }) })
6671
+ },
6672
+ item.id
6673
+ )) })
6674
+ ] }) }) })
6675
+ ] });
6516
6676
  }
6517
6677
 
6518
6678
  // src/components/databrowser/index.tsx
6519
- import { jsx as jsx52, jsxs as jsxs36 } from "react/jsx-runtime";
6679
+ import { jsx as jsx53, jsxs as jsxs36 } from "react/jsx-runtime";
6520
6680
  var RedisBrowser = ({
6521
6681
  token,
6522
6682
  url,
6523
6683
  hideTabs,
6524
- storage
6684
+ storage,
6685
+ darkMode = "light"
6525
6686
  }) => {
6526
- const credentials = useMemo8(() => ({ token, url }), [token, url]);
6687
+ const credentials = useMemo9(() => ({ token, url }), [token, url]);
6688
+ const rootRef = useRef6(null);
6527
6689
  useEffect14(() => {
6528
6690
  queryClient.resetQueries();
6529
6691
  }, [credentials.url]);
6530
- return /* @__PURE__ */ jsx52(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx52(RedisProvider, { redisCredentials: credentials, children: /* @__PURE__ */ jsx52(DatabrowserProvider, { storage, children: /* @__PURE__ */ jsx52(TooltipProvider, { children: /* @__PURE__ */ jsxs36(
6531
- "div",
6532
- {
6533
- className: "ups-db",
6534
- style: { height: "100%", display: "flex", flexDirection: "column" },
6535
- children: [
6536
- !hideTabs && /* @__PURE__ */ jsx52(DatabrowserTabs, {}),
6537
- /* @__PURE__ */ jsx52(DatabrowserInstances, {})
6538
- ]
6539
- }
6540
- ) }) }) }) });
6692
+ return /* @__PURE__ */ jsx53(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx53(RedisProvider, { redisCredentials: credentials, children: /* @__PURE__ */ jsx53(DarkModeProvider, { darkMode, children: /* @__PURE__ */ jsx53(DatabrowserProvider, { storage, rootRef, children: /* @__PURE__ */ jsx53(TooltipProvider, { children: /* @__PURE__ */ jsx53(RedisBrowserRoot, { hideTabs, rootRef }) }) }) }) }) });
6693
+ };
6694
+ var RedisBrowserRoot = ({
6695
+ hideTabs,
6696
+ rootRef
6697
+ }) => {
6698
+ const theme = useDarkMode();
6699
+ return (
6700
+ /* ups-db is the custom class used to prefix every style in the css bundle */
6701
+ /* @__PURE__ */ jsxs36(
6702
+ "div",
6703
+ {
6704
+ className: `ups-db ${theme === "dark" ? "dark" : ""}`,
6705
+ style: { height: "100%", display: "flex", flexDirection: "column" },
6706
+ ref: rootRef,
6707
+ children: [
6708
+ !hideTabs && /* @__PURE__ */ jsx53(DatabrowserTabs, {}),
6709
+ /* @__PURE__ */ jsx53(DatabrowserInstances, {})
6710
+ ]
6711
+ }
6712
+ )
6713
+ );
6541
6714
  };
6542
6715
  var DatabrowserInstances = () => {
6543
6716
  const { tabs, selectedTab, selectTab, addTab } = useDatabrowserStore();
@@ -6546,7 +6719,7 @@ var DatabrowserInstances = () => {
6546
6719
  else if (!selectedTab) selectTab(tabs[0][0]);
6547
6720
  }, [tabs, selectedTab, addTab, selectTab]);
6548
6721
  if (!selectedTab) return;
6549
- return tabs.map(([id]) => /* @__PURE__ */ jsx52(TabIdProvider, { value: id, children: /* @__PURE__ */ jsx52(DatabrowserInstance, { hidden: id !== selectedTab }) }, id));
6722
+ return tabs.map(([id]) => /* @__PURE__ */ jsx53(TabIdProvider, { value: id, children: /* @__PURE__ */ jsx53(DatabrowserInstance, { hidden: id !== selectedTab }) }, id));
6550
6723
  };
6551
6724
  export {
6552
6725
  RedisBrowser