@dyrected/admin 2.5.45 → 2.5.47

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/admin.css CHANGED
@@ -191,10 +191,60 @@
191
191
  --sidebar-accent-foreground: 259 100% 62%;
192
192
  --sidebar-border: 256 51% 90%;
193
193
  --sidebar-ring: 259 100% 62%;
194
+ }
195
+
196
+ .dy-admin-ui.dark,
197
+ .dy-admin-ui[data-theme="dark"] {
198
+ --background: 240 10% 4%; /* #09090B charcoal */
199
+ --foreground: 78 38% 95%; /* warm lime-white */
200
+
201
+ --card: 240 8% 7%; /* #111114 */
202
+ --card-foreground: 78 38% 95%;
203
+
204
+ --popover: 240 8% 7%;
205
+ --popover-foreground: 78 38% 95%;
206
+
207
+ --primary: 81 100% 59%; /* Signal Lime */
208
+ --primary-foreground: 60 3% 6%;
209
+ --intelligence: 259 100% 70%; /* Brighter Violet */
210
+ --intelligence-foreground: 0 0% 100%;
211
+
212
+ --secondary: 259 45% 15%;
213
+ --secondary-foreground: 266 82% 92%;
214
+
215
+ --muted: 240 7% 13%;
216
+ --muted-foreground: 252 9% 68%;
217
+
218
+ --accent: 259 44% 16%;
219
+ --accent-foreground: 266 82% 88%;
220
+
221
+ --destructive: 0 72% 58%;
222
+ --destructive-foreground: 0 0% 100%;
223
+
224
+ --border: 256 20% 21%;
225
+ --input: 256 20% 21%;
226
+ --ring: 259 100% 70% / 0.34;
227
+
228
+ --sidebar-background: 240 10% 4%;
229
+ --sidebar-foreground: 78 38% 95%;
230
+ --sidebar-primary: 81 100% 59%;
231
+ --sidebar-primary-foreground: 60 3% 6%;
232
+ --sidebar-accent: 259 44% 16%;
233
+ --sidebar-accent-foreground: 266 82% 88%;
234
+ --sidebar-border: 256 20% 21%;
235
+ --sidebar-ring: 259 100% 70%;
236
+ }
237
+
238
+ .dy-admin-ui {
194
239
  color-scheme: light;
195
240
  font-family: var(--font-sans), ui-sans-serif, system-ui, sans-serif;
196
241
  }
197
242
 
243
+ .dy-admin-ui.dark,
244
+ .dy-admin-ui[data-theme="dark"] {
245
+ color-scheme: dark;
246
+ }
247
+
198
248
  .dy-admin-ui :where(h1, h2, h3, h4, h5, h6){
199
249
  font-family: var(--font-serif), ui-serif, Georgia, serif;
200
250
  font-weight: 500;
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  declare const buttonVariants: (props?: {
4
4
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost";
5
- size?: "icon" | "default" | "sm" | "lg";
5
+ size?: "default" | "sm" | "lg" | "icon";
6
6
  } & import('class-variance-authority/types').ClassProp) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  asChild?: boolean;
@@ -0,0 +1,9 @@
1
+ import { AdminThemePreference, ResolvedAdminTheme } from './admin-theme';
2
+ import * as React from "react";
3
+ export interface AdminThemeContextValue {
4
+ theme: AdminThemePreference;
5
+ resolvedTheme: ResolvedAdminTheme;
6
+ setTheme: (theme: AdminThemePreference) => void;
7
+ themeClassName: string;
8
+ }
9
+ export declare const AdminThemeContext: React.Context<AdminThemeContextValue>;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ export declare function AdminThemeProvider({ children }: {
3
+ children: React.ReactNode;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export declare function AdminThemedRoot({ children }: {
6
+ children: React.ReactNode;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export type AdminThemePreference = "system" | "light" | "dark";
2
+ export type ResolvedAdminTheme = "light" | "dark";
3
+ export declare function resolveAdminTheme(preference: AdminThemePreference, systemTheme: ResolvedAdminTheme): ResolvedAdminTheme;
4
+ export declare function adminThemeClassName(resolvedTheme: ResolvedAdminTheme): "dy-admin-ui dark" | "dy-admin-ui";
@@ -0,0 +1,2 @@
1
+ export type { AdminThemePreference, ResolvedAdminTheme } from './admin-theme';
2
+ export declare function useAdminTheme(): import('./admin-theme-context').AdminThemeContextValue;
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import { HashRouter, Link, MemoryRouter, Route, Routes, useLocation, useNavigate
5
5
  import { QueryClient, QueryClientProvider, useInfiniteQuery, useMutation, useQueries, useQuery, useQueryClient } from "@tanstack/react-query";
6
6
  import { createClient } from "@dyrected/sdk";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
- import { AlertCircle, AlertTriangle, AlignCenter, AlignLeft, AlignRight, Archive, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpRight, Bold, BookOpen, Braces, Calendar, Check, CheckCircle, CheckCircle2, ChevronDown, ChevronDownIcon, ChevronLeft, ChevronLeftIcon, ChevronRight, ChevronRightIcon, ChevronUp, ChevronsUpDown, Circle, Clock, Clock3, Code, Code2, Compass, Copy, Database, Download, ExternalLink, Eye, EyeOff, FileDown, FileIcon, FileText, FileUp, Filter, Globe, GripVertical, Heading1, Heading2, Image as Image$1, Info, Italic, KeyRound, Layers, LayoutDashboard, Library, Link as Link$1, List, ListOrdered, Loader2, Lock, LogOut, Mail, Menu, Monitor, MoreHorizontal, PanelLeftClose, PanelLeftOpen, Pencil, Play, Plus, Quote, RotateCcw, Save, Scissors, Search, Settings, Settings2, Share2, Shield, Smartphone, Sparkles, Strikethrough, Table, Trash2, Underline, Undo2, Upload, UploadCloud, Users, Video, Volume2, X, XCircle, icons } from "lucide-react";
8
+ import { AlertCircle, AlertTriangle, AlignCenter, AlignLeft, AlignRight, Archive, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpRight, Bold, BookOpen, Braces, Calendar, Check, CheckCircle, CheckCircle2, ChevronDown, ChevronDownIcon, ChevronLeft, ChevronLeftIcon, ChevronRight, ChevronRightIcon, ChevronUp, ChevronsUpDown, Circle, Clock, Clock3, Code, Code2, Compass, Copy, Database, Download, ExternalLink, Eye, EyeOff, FileDown, FileIcon, FileText, FileUp, Filter, Globe, GripVertical, Heading1, Heading2, Image as Image$1, Info, Italic, KeyRound, Layers, LayoutDashboard, Library, Link as Link$1, List, ListOrdered, Loader2, Lock, LogOut, Mail, Menu, Monitor, Moon, MoreHorizontal, PanelLeftClose, PanelLeftOpen, Pencil, Play, Plus, Quote, RotateCcw, Save, Scissors, Search, Settings, Settings2, Share2, Shield, Smartphone, Sparkles, Strikethrough, Sun, Table, Trash2, Underline, Undo2, Upload, UploadCloud, Users, Video, Volume2, X, XCircle, icons } from "lucide-react";
9
9
  import { clsx } from "clsx";
10
10
  import { extendTailwindMerge } from "tailwind-merge";
11
11
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
@@ -75,7 +75,8 @@ function DyrectedProvider({ children, apiKey: initialApiKey, baseUrl: initialBas
75
75
  const [apiKey, setApiKey] = useState(() => initialApiKey || (typeof window !== "undefined" ? localStorage.getItem("dyrected_key") : null) || void 0);
76
76
  const [siteId, setSiteId] = useState(() => initialSiteId || (typeof window !== "undefined" ? localStorage.getItem("dyrected_site_id") : null) || void 0);
77
77
  const [schemas, setSchemas] = useState(null);
78
- const [user, setUser] = useState(null);
78
+ const initialTokenUser = useMemo(() => initialToken ? decodeTokenPayload(initialToken) : null, [initialToken]);
79
+ const [user, setUser] = useState(() => initialTokenUser);
79
80
  const [authCollectionSlug, setAuthCollectionSlug] = useState(() => (typeof window !== "undefined" ? localStorage.getItem("dyrected_admin_auth_collection") : null) || null);
80
81
  const client = useMemo(() => {
81
82
  if (!baseUrl) return null;
@@ -106,6 +107,7 @@ function DyrectedProvider({ children, apiKey: initialApiKey, baseUrl: initialBas
106
107
  cancelled = true;
107
108
  };
108
109
  }, [client]);
110
+ const activeUser = initialTokenUser ?? user;
109
111
  useEffect(() => {
110
112
  if (initialToken && client) client.setToken(initialToken);
111
113
  }, [initialToken, client]);
@@ -143,18 +145,18 @@ function DyrectedProvider({ children, apiKey: initialApiKey, baseUrl: initialBas
143
145
  schemas
144
146
  ]);
145
147
  useEffect(() => {
146
- if (initialToken || !client || !schemas || user) return;
148
+ if (initialToken || !client || !schemas || activeUser) return;
147
149
  const token = localStorage.getItem("dyrected_token");
148
150
  const resolvedCollectionSlug = authCollectionSlug || getAdminCollectionSlug(schemas);
149
151
  if (!token || !resolvedCollectionSlug) return;
150
152
  client.setToken(token);
151
153
  client.collection(resolvedCollectionSlug).me().then((nextUser) => setUser(nextUser), () => setUser(null));
152
154
  }, [
155
+ activeUser,
153
156
  authCollectionSlug,
154
157
  client,
155
158
  initialToken,
156
- schemas,
157
- user
159
+ schemas
158
160
  ]);
159
161
  const logout = useCallback(() => {
160
162
  localStorage.removeItem("dyrected_url");
@@ -183,13 +185,37 @@ function DyrectedProvider({ children, apiKey: initialApiKey, baseUrl: initialBas
183
185
  logout,
184
186
  isAuthenticated: !!baseUrl && !!apiKey,
185
187
  schemas,
186
- user,
188
+ user: activeUser,
187
189
  initialToken,
188
190
  components
189
191
  },
190
192
  children
191
193
  });
192
194
  }
195
+ function decodeTokenPayload(token) {
196
+ const payload = token.split(".")[1];
197
+ if (!payload) return null;
198
+ try {
199
+ const normalized = payload.replace(/-/g, "+").replace(/_/g, "/");
200
+ const padded = normalized.padEnd(Math.ceil(normalized.length / 4) * 4, "=");
201
+ const json = decodeURIComponent(atob(padded).split("").map((char) => `%${char.charCodeAt(0).toString(16).padStart(2, "0")}`).join(""));
202
+ const parsed = JSON.parse(json);
203
+ if (!parsed || typeof parsed !== "object") return null;
204
+ const user = parsed;
205
+ const roles = Array.isArray(user.roles) ? user.roles.filter((role) => typeof role === "string").map(normalizeCloudRole) : [];
206
+ const role = typeof user.role === "string" ? normalizeCloudRole(user.role) : void 0;
207
+ return {
208
+ ...user,
209
+ ...role ? { role } : {},
210
+ roles: roles.length > 0 ? roles : role ? [role] : roles
211
+ };
212
+ } catch {
213
+ return null;
214
+ }
215
+ }
216
+ function normalizeCloudRole(role) {
217
+ return role === "owner" ? "admin" : role;
218
+ }
193
219
  //#endregion
194
220
  //#region src/providers/query-provider.tsx
195
221
  function QueryProvider({ children }) {
@@ -376,9 +402,40 @@ function BrandingProvider({ children }) {
376
402
  ]), children] });
377
403
  }
378
404
  //#endregion
405
+ //#region src/hooks/admin-theme.ts
406
+ function resolveAdminTheme(preference, systemTheme) {
407
+ return preference === "system" ? systemTheme : preference;
408
+ }
409
+ function adminThemeClassName(resolvedTheme) {
410
+ return resolvedTheme === "dark" ? "dy-admin-ui dark" : "dy-admin-ui";
411
+ }
412
+ //#endregion
413
+ //#region src/hooks/admin-theme-context.ts
414
+ var AdminThemeContext = React$1.createContext(null);
415
+ //#endregion
416
+ //#region src/hooks/use-admin-theme.ts
417
+ function getSystemTheme$1() {
418
+ if (typeof window === "undefined" || !window.matchMedia) return "light";
419
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
420
+ }
421
+ function useAdminTheme() {
422
+ const context = React$1.useContext(AdminThemeContext);
423
+ if (!context) {
424
+ const resolvedTheme = getSystemTheme$1();
425
+ return {
426
+ theme: "system",
427
+ resolvedTheme,
428
+ setTheme: () => void 0,
429
+ themeClassName: adminThemeClassName(resolvedTheme)
430
+ };
431
+ }
432
+ return context;
433
+ }
434
+ //#endregion
379
435
  //#region src/components/ui/dropdown-menu.tsx
380
436
  var DropdownMenu = DropdownMenuPrimitive.Root;
381
437
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
438
+ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
382
439
  var DropdownMenuSubTrigger = React$1.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
383
440
  ref,
384
441
  className: cn("dy-flex dy-cursor-default dy-select-none dy-items-center dy-gap-2 dy-rounded-sm dy-px-2 dy-py-1.5 dy-text-sm dy-outline-none focus:dy-bg-accent data-[state=open]:dy-bg-accent [&_svg]:dy-pointer-events-none [&_svg]:dy-size-4 [&_svg]:dy-shrink-0", inset && "dy-pl-8", className),
@@ -392,15 +449,19 @@ var DropdownMenuSubContent = React$1.forwardRef(({ className, ...props }, ref) =
392
449
  ...props
393
450
  }));
394
451
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
395
- var DropdownMenuContent = React$1.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx("div", {
396
- className: "dy-admin-ui",
397
- children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
398
- ref,
399
- sideOffset,
400
- className: cn("dy-z-50 dy-max-h-[var(--radix-dropdown-menu-content-available-height)] dy-min-w-[8rem] dy-overflow-y-auto dy-overflow-x-hidden dy-rounded-md dy-border dy-bg-popover dy-p-1 dy-text-popover-foreground dy-shadow-md data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0 data-[state=closed]:dy-zoom-out-95 data-[state=open]:dy-zoom-in-95 data-[side=bottom]:dy-slide-in-from-top-2 data-[side=left]:dy-slide-in-from-right-2 data-[side=right]:dy-slide-in-from-left-2 data-[side=top]:dy-slide-in-from-bottom-2 dy-origin-[--radix-dropdown-menu-content-transform-origin]", className),
401
- ...props
402
- })
403
- }) }));
452
+ var DropdownMenuContent = React$1.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
453
+ const { resolvedTheme, themeClassName } = useAdminTheme();
454
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx("div", {
455
+ className: themeClassName,
456
+ "data-theme": resolvedTheme,
457
+ children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
458
+ ref,
459
+ sideOffset,
460
+ className: cn("dy-z-50 dy-max-h-[var(--radix-dropdown-menu-content-available-height)] dy-min-w-[8rem] dy-overflow-y-auto dy-overflow-x-hidden dy-rounded-md dy-border dy-bg-popover dy-p-1 dy-text-popover-foreground dy-shadow-md data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0 data-[state=closed]:dy-zoom-out-95 data-[state=open]:dy-zoom-in-95 data-[side=bottom]:dy-slide-in-from-top-2 data-[side=left]:dy-slide-in-from-right-2 data-[side=right]:dy-slide-in-from-left-2 data-[side=top]:dy-slide-in-from-bottom-2 dy-origin-[--radix-dropdown-menu-content-transform-origin]", className),
461
+ ...props
462
+ })
463
+ }) });
464
+ });
404
465
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
405
466
  var DropdownMenuItem = React$1.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
406
467
  ref,
@@ -449,6 +510,42 @@ var DropdownMenuShortcut = ({ className, ...props }) => {
449
510
  };
450
511
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
451
512
  //#endregion
513
+ //#region src/components/ui/button.tsx
514
+ var buttonVariants = cva("dy-inline-flex dy-items-center dy-justify-center dy-gap-2 dy-whitespace-nowrap dy-rounded-md dy-text-sm dy-font-medium dy-ring-offset-background dy-transition-colors focus-visible:dy-outline-none focus-visible:dy-ring-2 focus-visible:dy-ring-ring focus-visible:dy-ring-offset-2 disabled:dy-pointer-events-none disabled:dy-opacity-50 [&_svg]:dy-pointer-events-none [&_svg]:dy-size-4 [&_svg]:dy-shrink-0", {
515
+ variants: {
516
+ variant: {
517
+ default: "dy-bg-primary dy-text-primary-foreground hover:dy-bg-primary/90",
518
+ destructive: "dy-bg-destructive dy-text-destructive-foreground hover:dy-bg-destructive/90",
519
+ outline: "dy-border dy-border-input dy-bg-background hover:dy-bg-accent hover:dy-text-accent-foreground",
520
+ secondary: "dy-bg-secondary dy-text-secondary-foreground hover:dy-bg-secondary/80",
521
+ ghost: "hover:dy-bg-accent hover:dy-text-accent-foreground",
522
+ link: "dy-text-primary dy-underline-offset-4 hover:dy-underline"
523
+ },
524
+ size: {
525
+ default: "dy-h-10 dy-px-4 dy-py-2",
526
+ sm: "dy-h-9 dy-rounded-md dy-px-3",
527
+ lg: "dy-h-11 dy-rounded-md dy-px-8",
528
+ icon: "dy-h-10 dy-w-10"
529
+ }
530
+ },
531
+ defaultVariants: {
532
+ variant: "default",
533
+ size: "default"
534
+ }
535
+ });
536
+ var Button = React$1.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
537
+ return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
538
+ className: cn(buttonVariants({
539
+ variant,
540
+ size,
541
+ className
542
+ })),
543
+ ref,
544
+ ...props
545
+ });
546
+ });
547
+ Button.displayName = "Button";
548
+ //#endregion
452
549
  //#region src/components/layout/admin-shell.tsx
453
550
  function getUserString(user, key) {
454
551
  const value = user?.[key];
@@ -496,6 +593,63 @@ function NavGroup({ label, children, collapsed, defaultExpanded = true }) {
496
593
  })]
497
594
  });
498
595
  }
596
+ function ThemeSelector({ collapsed = false, mobile = false }) {
597
+ const { resolvedTheme, setTheme, theme } = useAdminTheme();
598
+ const Icon = resolvedTheme === "dark" ? Moon : Sun;
599
+ const options = [
600
+ {
601
+ value: "system",
602
+ label: "System",
603
+ icon: Monitor
604
+ },
605
+ {
606
+ value: "light",
607
+ label: "Light",
608
+ icon: Sun
609
+ },
610
+ {
611
+ value: "dark",
612
+ label: "Dark",
613
+ icon: Moon
614
+ }
615
+ ];
616
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
617
+ asChild: true,
618
+ children: /* @__PURE__ */ jsxs(Button, {
619
+ type: "button",
620
+ variant: "ghost",
621
+ size: mobile || collapsed ? "icon" : "sm",
622
+ className: cn("dy-text-muted-foreground hover:dy-bg-accent hover:dy-text-foreground", collapsed || mobile ? "dy-h-8 dy-w-8" : "dy-h-7 dy-w-full dy-justify-start dy-px-2.5 dy-text-[11px]"),
623
+ title: "Theme",
624
+ "aria-label": "Change admin theme",
625
+ children: [/* @__PURE__ */ jsx(Icon, { className: "dy-h-3.5 dy-w-3.5" }), !collapsed && !mobile && /* @__PURE__ */ jsx("span", { children: "Theme" })]
626
+ })
627
+ }), /* @__PURE__ */ jsxs(DropdownMenuContent, {
628
+ side: collapsed || mobile ? "bottom" : "top",
629
+ align: "end",
630
+ sideOffset: 8,
631
+ className: "dy-w-40",
632
+ children: [
633
+ /* @__PURE__ */ jsx(DropdownMenuLabel, {
634
+ className: "dy-px-2 dy-py-1.5 dy-text-xs dy-text-muted-foreground",
635
+ children: "Theme"
636
+ }),
637
+ /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
638
+ /* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
639
+ value: theme,
640
+ onValueChange: (value) => setTheme(value),
641
+ children: options.map((option) => {
642
+ const OptionIcon = option.icon;
643
+ return /* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
644
+ value: option.value,
645
+ className: "dy-cursor-pointer",
646
+ children: [/* @__PURE__ */ jsx(OptionIcon, { className: "dy-h-4 dy-w-4" }), option.label]
647
+ }, option.value);
648
+ })
649
+ })
650
+ ]
651
+ })] });
652
+ }
499
653
  function SidebarInner({ schemas, isLoading, location, logout, isEmbedded, collapsed, onToggleCollapse, onNavigate }) {
500
654
  const { client, user } = useDyrected();
501
655
  const collections = schemas?.collections?.filter((c) => !c?.admin?.hidden && !c?.slug.startsWith("platform_")) ?? [];
@@ -507,7 +661,7 @@ function SidebarInner({ schemas, isLoading, location, logout, isEmbedded, collap
507
661
  }) : /* @__PURE__ */ jsx("div", { className: "dy-my-2 dy-mx-3 dy-h-px dy-bg-border" });
508
662
  const branding = schemas?.admin?.branding;
509
663
  return /* @__PURE__ */ jsxs("div", {
510
- className: "dy-flex dy-flex-col dy-min-h-screen dy-admin-ui",
664
+ className: "dy-flex dy-flex-col dy-min-h-screen",
511
665
  children: [
512
666
  !isEmbedded && /* @__PURE__ */ jsx("div", {
513
667
  className: cn("dy-flex dy-items-center dy-h-14 dy-shrink-0 dy-transition-all", collapsed ? "dy-justify-center dy-px-2" : "dy-gap-2.5 dy-px-4"),
@@ -641,6 +795,7 @@ function SidebarInner({ schemas, isLoading, location, logout, isEmbedded, collap
641
795
  collapsed,
642
796
  onClick: onNavigate
643
797
  }),
798
+ /* @__PURE__ */ jsx(ThemeSelector, { collapsed }),
644
799
  !isEmbedded && user && /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
645
800
  asChild: true,
646
801
  children: /* @__PURE__ */ jsxs("button", {
@@ -782,9 +937,12 @@ function AdminShell({ children, isEmbedded = false }) {
782
937
  className: "dy-h-7 dy-w-auto"
783
938
  })
784
939
  }),
785
- user && /* @__PURE__ */ jsx("div", {
786
- className: "dy-ml-auto dy-flex dy-h-8 dy-w-8 dy-items-center dy-justify-center dy-rounded-full dy-bg-primary/10 dy-text-primary dy-font-semibold dy-text-xs dy-shrink-0",
787
- children: (user.name || user.email || "?")[0].toUpperCase()
940
+ /* @__PURE__ */ jsxs("div", {
941
+ className: "dy-ml-auto dy-flex dy-items-center dy-gap-1.5",
942
+ children: [/* @__PURE__ */ jsx(ThemeSelector, { mobile: true }), user && /* @__PURE__ */ jsx("div", {
943
+ className: "dy-flex dy-h-8 dy-w-8 dy-items-center dy-justify-center dy-rounded-full dy-bg-primary/10 dy-text-primary dy-font-semibold dy-text-xs dy-shrink-0",
944
+ children: (user.name || user.email || "?")[0].toUpperCase()
945
+ })]
788
946
  })
789
947
  ]
790
948
  }), /* @__PURE__ */ jsx("div", {
@@ -796,42 +954,6 @@ function AdminShell({ children, isEmbedded = false }) {
796
954
  }) });
797
955
  }
798
956
  //#endregion
799
- //#region src/components/ui/button.tsx
800
- var buttonVariants = cva("dy-inline-flex dy-items-center dy-justify-center dy-gap-2 dy-whitespace-nowrap dy-rounded-md dy-text-sm dy-font-medium dy-ring-offset-background dy-transition-colors focus-visible:dy-outline-none focus-visible:dy-ring-2 focus-visible:dy-ring-ring focus-visible:dy-ring-offset-2 disabled:dy-pointer-events-none disabled:dy-opacity-50 [&_svg]:dy-pointer-events-none [&_svg]:dy-size-4 [&_svg]:dy-shrink-0", {
801
- variants: {
802
- variant: {
803
- default: "dy-bg-primary dy-text-primary-foreground hover:dy-bg-primary/90",
804
- destructive: "dy-bg-destructive dy-text-destructive-foreground hover:dy-bg-destructive/90",
805
- outline: "dy-border dy-border-input dy-bg-background hover:dy-bg-accent hover:dy-text-accent-foreground",
806
- secondary: "dy-bg-secondary dy-text-secondary-foreground hover:dy-bg-secondary/80",
807
- ghost: "hover:dy-bg-accent hover:dy-text-accent-foreground",
808
- link: "dy-text-primary dy-underline-offset-4 hover:dy-underline"
809
- },
810
- size: {
811
- default: "dy-h-10 dy-px-4 dy-py-2",
812
- sm: "dy-h-9 dy-rounded-md dy-px-3",
813
- lg: "dy-h-11 dy-rounded-md dy-px-8",
814
- icon: "dy-h-10 dy-w-10"
815
- }
816
- },
817
- defaultVariants: {
818
- variant: "default",
819
- size: "default"
820
- }
821
- });
822
- var Button = React$1.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
823
- return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
824
- className: cn(buttonVariants({
825
- variant,
826
- size,
827
- className
828
- })),
829
- ref,
830
- ...props
831
- });
832
- });
833
- Button.displayName = "Button";
834
- //#endregion
835
957
  //#region src/components/ui/badge.tsx
836
958
  var badgeVariants = cva("dy-inline-flex dy-items-center dy-rounded-full dy-border dy-px-2.5 dy-py-0.5 dy-text-xs dy-font-semibold dy-transition-colors focus:dy-outline-none focus:dy-ring-2 focus:dy-ring-ring focus:dy-ring-offset-2", {
837
959
  variants: { variant: {
@@ -1222,13 +1344,17 @@ Input.displayName = "Input";
1222
1344
  //#region src/components/ui/popover.tsx
1223
1345
  var Popover = PopoverPrimitive.Root;
1224
1346
  var PopoverTrigger = PopoverPrimitive.Trigger;
1225
- var PopoverContent = React$1.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
1226
- ref,
1227
- align,
1228
- sideOffset,
1229
- className: cn("dy-admin-ui dy-z-[100] dy-w-72 dy-rounded-md dy-border dy-bg-popover dy-p-0 dy-text-popover-foreground dy-shadow-md dy-outline-none data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0 data-[state=closed]:dy-zoom-out-95 data-[state=open]:dy-zoom-in-95 data-[side=bottom]:dy-slide-in-from-top-2 data-[side=left]:dy-slide-in-from-right-2 data-[side=right]:dy-slide-in-from-left-2 data-[side=top]:dy-slide-in-from-bottom-2 dy-origin-[--radix-popover-content-transform-origin]", className),
1230
- ...props
1231
- }) }));
1347
+ var PopoverContent = React$1.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => {
1348
+ const { resolvedTheme, themeClassName } = useAdminTheme();
1349
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
1350
+ ref,
1351
+ align,
1352
+ sideOffset,
1353
+ "data-theme": resolvedTheme,
1354
+ className: cn(themeClassName, "dy-z-[100] dy-w-72 dy-rounded-md dy-border dy-bg-popover dy-p-0 dy-text-popover-foreground dy-shadow-md dy-outline-none data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0 data-[state=closed]:dy-zoom-out-95 data-[state=open]:dy-zoom-in-95 data-[side=bottom]:dy-slide-in-from-top-2 data-[side=left]:dy-slide-in-from-right-2 data-[side=right]:dy-slide-in-from-left-2 data-[side=top]:dy-slide-in-from-bottom-2 dy-origin-[--radix-popover-content-transform-origin]", className),
1355
+ ...props
1356
+ }) });
1357
+ });
1232
1358
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
1233
1359
  var PopoverAnchor = PopoverPrimitive.Anchor;
1234
1360
  //#endregion
@@ -1259,23 +1385,27 @@ var SelectScrollDownButton = React$1.forwardRef(({ className, ...props }, ref) =
1259
1385
  children: /* @__PURE__ */ jsx(ChevronDown, { className: "dy-h-4 dy-w-4" })
1260
1386
  }));
1261
1387
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
1262
- var SelectContent = React$1.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx("div", {
1263
- className: "dy-admin-ui",
1264
- children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, {
1265
- ref,
1266
- className: cn("dy-relative dy-z-[100] dy-max-h-[--radix-select-content-available-height] dy-min-w-[8rem] dy-overflow-y-auto dy-overflow-x-hidden dy-rounded-md dy-border dy-bg-popover dy-text-popover-foreground dy-shadow-md data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0 data-[state=closed]:dy-zoom-out-95 data-[state=open]:dy-zoom-in-95 data-[side=bottom]:dy-slide-in-from-top-2 data-[side=left]:dy-slide-in-from-right-2 data-[side=right]:dy-translate-x-1 data-[side=top]:dy--translate-y-1 dy-origin-[--radix-select-content-transform-origin]", position === "popper" && "data-[side=bottom]:dy-translate-y-1 data-[side=left]:dy--translate-x-1 data-[side=right]:dy-translate-x-1 data-[side=top]:dy--translate-y-1", className),
1267
- position,
1268
- ...props,
1269
- children: [
1270
- /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
1271
- /* @__PURE__ */ jsx(SelectPrimitive.Viewport, {
1272
- className: cn("dy-p-1", position === "popper" && "dy-h-[var(--radix-select-trigger-height)] dy-w-full dy-min-w-[var(--radix-select-trigger-width)]"),
1273
- children
1274
- }),
1275
- /* @__PURE__ */ jsx(SelectScrollDownButton, {})
1276
- ]
1277
- })
1278
- }) }));
1388
+ var SelectContent = React$1.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
1389
+ const { resolvedTheme, themeClassName } = useAdminTheme();
1390
+ return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx("div", {
1391
+ className: themeClassName,
1392
+ "data-theme": resolvedTheme,
1393
+ children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, {
1394
+ ref,
1395
+ className: cn("dy-relative dy-z-[100] dy-max-h-[--radix-select-content-available-height] dy-min-w-[8rem] dy-overflow-y-auto dy-overflow-x-hidden dy-rounded-md dy-border dy-bg-popover dy-text-popover-foreground dy-shadow-md data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0 data-[state=closed]:dy-zoom-out-95 data-[state=open]:dy-zoom-in-95 data-[side=bottom]:dy-slide-in-from-top-2 data-[side=left]:dy-slide-in-from-right-2 data-[side=right]:dy-translate-x-1 data-[side=top]:dy--translate-y-1 dy-origin-[--radix-select-content-transform-origin]", position === "popper" && "data-[side=bottom]:dy-translate-y-1 data-[side=left]:dy--translate-x-1 data-[side=right]:dy-translate-x-1 data-[side=top]:dy--translate-y-1", className),
1396
+ position,
1397
+ ...props,
1398
+ children: [
1399
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
1400
+ /* @__PURE__ */ jsx(SelectPrimitive.Viewport, {
1401
+ className: cn("dy-p-1", position === "popper" && "dy-h-[var(--radix-select-trigger-height)] dy-w-full dy-min-w-[var(--radix-select-trigger-width)]"),
1402
+ children
1403
+ }),
1404
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
1405
+ ]
1406
+ })
1407
+ }) });
1408
+ });
1279
1409
  SelectContent.displayName = SelectPrimitive.Content.displayName;
1280
1410
  var SelectLabel = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Label, {
1281
1411
  ref,
@@ -1953,21 +2083,25 @@ var DialogOverlay = React$1.forwardRef(({ className, ...props }, ref) => /* @__P
1953
2083
  ...props
1954
2084
  }));
1955
2085
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
1956
- var DialogContent = React$1.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(DialogPortal, { children: /* @__PURE__ */ jsxs("div", {
1957
- className: "dy-admin-ui",
1958
- children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
1959
- ref,
1960
- className: cn("dy-fixed dy-left-[50%] dy-top-[50%] dy-z-50 dy-grid dy-w-full dy-max-w-lg dy-translate-x-[-50%] dy-translate-y-[-50%] dy-gap-4 dy-border dy-bg-background dy-p-6 dy-shadow-2xl dy-duration-200 data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0 data-[state=closed]:dy-zoom-out-95 data-[state=open]:dy-zoom-in-95 data-[state=closed]:dy-slide-out-to-left-1/2 data-[state=closed]:dy-slide-out-to-top-[48%] data-[state=open]:dy-slide-in-from-left-1/2 data-[state=open]:dy-slide-in-from-top-[48%] sm:dy-rounded-xl", className),
1961
- ...props,
1962
- children: [children, /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
1963
- className: "dy-absolute dy-right-4 dy-top-4 dy-rounded-sm dy-opacity-70 dy-ring-offset-background dy-transition-opacity hover:dy-opacity-100 focus:dy-outline-none focus:dy-ring-2 focus:dy-ring-ring focus:dy-ring-offset-2 disabled:dy-pointer-events-none data-[state=open]:dy-bg-accent data-[state=open]:dy-text-muted-foreground",
1964
- children: [/* @__PURE__ */ jsx(X, { className: "dy-h-4 dy-w-4" }), /* @__PURE__ */ jsx("span", {
1965
- className: "dy-sr-only",
1966
- children: "Close"
2086
+ var DialogContent = React$1.forwardRef(({ className, children, ...props }, ref) => {
2087
+ const { resolvedTheme, themeClassName } = useAdminTheme();
2088
+ return /* @__PURE__ */ jsx(DialogPortal, { children: /* @__PURE__ */ jsxs("div", {
2089
+ className: themeClassName,
2090
+ "data-theme": resolvedTheme,
2091
+ children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
2092
+ ref,
2093
+ className: cn("dy-fixed dy-left-[50%] dy-top-[50%] dy-z-50 dy-grid dy-w-full dy-max-w-lg dy-translate-x-[-50%] dy-translate-y-[-50%] dy-gap-4 dy-border dy-bg-background dy-p-6 dy-shadow-2xl dy-duration-200 data-[state=open]:dy-animate-in data-[state=closed]:dy-animate-out data-[state=closed]:dy-fade-out-0 data-[state=open]:dy-fade-in-0 data-[state=closed]:dy-zoom-out-95 data-[state=open]:dy-zoom-in-95 data-[state=closed]:dy-slide-out-to-left-1/2 data-[state=closed]:dy-slide-out-to-top-[48%] data-[state=open]:dy-slide-in-from-left-1/2 data-[state=open]:dy-slide-in-from-top-[48%] sm:dy-rounded-xl", className),
2094
+ ...props,
2095
+ children: [children, /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
2096
+ className: "dy-absolute dy-right-4 dy-top-4 dy-rounded-sm dy-opacity-70 dy-ring-offset-background dy-transition-opacity hover:dy-opacity-100 focus:dy-outline-none focus:dy-ring-2 focus:dy-ring-ring focus:dy-ring-offset-2 disabled:dy-pointer-events-none data-[state=open]:dy-bg-accent data-[state=open]:dy-text-muted-foreground",
2097
+ children: [/* @__PURE__ */ jsx(X, { className: "dy-h-4 dy-w-4" }), /* @__PURE__ */ jsx("span", {
2098
+ className: "dy-sr-only",
2099
+ children: "Close"
2100
+ })]
1967
2101
  })]
1968
2102
  })]
1969
- })]
1970
- }) }));
2103
+ }) });
2104
+ });
1971
2105
  DialogContent.displayName = DialogPrimitive.Content.displayName;
1972
2106
  var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
1973
2107
  className: cn("dy-flex dy-flex-col dy-space-y-1.5 dy-text-center sm:dy-text-left", className),
@@ -2826,21 +2960,25 @@ var sheetVariants = cva("dy-fixed dy-z-50 dy-gap-4 dy-bg-background dy-p-6 dy-sh
2826
2960
  } },
2827
2961
  defaultVariants: { side: "right" }
2828
2962
  });
2829
- var SheetContent = React$1.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsx(SheetPortal, { children: /* @__PURE__ */ jsxs("div", {
2830
- className: "dy-admin-ui",
2831
- children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
2832
- ref,
2833
- className: cn(sheetVariants({ side }), className),
2834
- ...props,
2835
- children: [children, /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
2836
- className: "dy-absolute dy-right-4 dy-top-4 dy-rounded-sm dy-opacity-70 dy-ring-offset-background dy-transition-opacity hover:dy-opacity-100 focus:dy-outline-none focus:dy-ring-2 focus:dy-ring-ring focus:dy-ring-offset-2 disabled:dy-pointer-events-none data-[state=open]:dy-bg-secondary",
2837
- children: [/* @__PURE__ */ jsx(X, { className: "dy-h-4 dy-w-4" }), /* @__PURE__ */ jsx("span", {
2838
- className: "dy-sr-only",
2839
- children: "Close"
2963
+ var SheetContent = React$1.forwardRef(({ side = "right", className, children, ...props }, ref) => {
2964
+ const { resolvedTheme, themeClassName } = useAdminTheme();
2965
+ return /* @__PURE__ */ jsx(SheetPortal, { children: /* @__PURE__ */ jsxs("div", {
2966
+ className: themeClassName,
2967
+ "data-theme": resolvedTheme,
2968
+ children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
2969
+ ref,
2970
+ className: cn(sheetVariants({ side }), className),
2971
+ ...props,
2972
+ children: [children, /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
2973
+ className: "dy-absolute dy-right-4 dy-top-4 dy-rounded-sm dy-opacity-70 dy-ring-offset-background dy-transition-opacity hover:dy-opacity-100 focus:dy-outline-none focus:dy-ring-2 focus:dy-ring-ring focus:dy-ring-offset-2 disabled:dy-pointer-events-none data-[state=open]:dy-bg-secondary",
2974
+ children: [/* @__PURE__ */ jsx(X, { className: "dy-h-4 dy-w-4" }), /* @__PURE__ */ jsx("span", {
2975
+ className: "dy-sr-only",
2976
+ children: "Close"
2977
+ })]
2840
2978
  })]
2841
2979
  })]
2842
- })]
2843
- }) }));
2980
+ }) });
2981
+ });
2844
2982
  SheetContent.displayName = DialogPrimitive.Content.displayName;
2845
2983
  var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
2846
2984
  className: cn("dy-flex dy-flex-col dy-space-y-2 dy-text-center sm:dy-text-left", className),
@@ -13297,6 +13435,49 @@ var Toaster$1 = ({ ...props }) => {
13297
13435
  });
13298
13436
  };
13299
13437
  //#endregion
13438
+ //#region src/hooks/admin-theme-provider.tsx
13439
+ function getSystemTheme() {
13440
+ if (typeof window === "undefined" || !window.matchMedia) return "light";
13441
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
13442
+ }
13443
+ function AdminThemeProvider({ children }) {
13444
+ const [theme, setTheme] = usePreferences("theme", "system");
13445
+ const [systemTheme, setSystemTheme] = React$1.useState(() => getSystemTheme());
13446
+ React$1.useEffect(() => {
13447
+ if (typeof window === "undefined" || !window.matchMedia) return;
13448
+ const media = window.matchMedia("(prefers-color-scheme: dark)");
13449
+ const syncSystemTheme = () => {
13450
+ setSystemTheme(media.matches ? "dark" : "light");
13451
+ };
13452
+ syncSystemTheme();
13453
+ media.addEventListener("change", syncSystemTheme);
13454
+ return () => media.removeEventListener("change", syncSystemTheme);
13455
+ }, []);
13456
+ const resolvedTheme = resolveAdminTheme(theme, systemTheme);
13457
+ const value = React$1.useMemo(() => ({
13458
+ theme,
13459
+ resolvedTheme,
13460
+ setTheme,
13461
+ themeClassName: adminThemeClassName(resolvedTheme)
13462
+ }), [
13463
+ resolvedTheme,
13464
+ setTheme,
13465
+ theme
13466
+ ]);
13467
+ return /* @__PURE__ */ jsx(AdminThemeContext.Provider, {
13468
+ value,
13469
+ children
13470
+ });
13471
+ }
13472
+ function AdminThemedRoot({ children }) {
13473
+ const { resolvedTheme, themeClassName } = useAdminTheme();
13474
+ return /* @__PURE__ */ jsx("div", {
13475
+ className: `${themeClassName} dy-h-full`,
13476
+ "data-theme": resolvedTheme,
13477
+ children
13478
+ });
13479
+ }
13480
+ //#endregion
13300
13481
  //#region src/index.tsx
13301
13482
  function CollectionRoute() {
13302
13483
  const { slug } = useParams();
@@ -13383,21 +13564,21 @@ function AdminUI({ apiKey, baseUrl = "/dyrected", siteId, onNavigate, isEmbedded
13383
13564
  });
13384
13565
  return /* @__PURE__ */ jsx("div", {
13385
13566
  className: "dy-admin-ui dy-h-full",
13386
- children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxs(DyrectedProvider, {
13567
+ children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(DyrectedProvider, {
13387
13568
  apiKey,
13388
13569
  baseUrl,
13389
13570
  siteId,
13390
13571
  components,
13391
13572
  initialToken,
13392
13573
  defaultTechStack,
13393
- children: [/* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsx(HashRouter, { children: /* @__PURE__ */ jsx(AdminRoutes, {
13574
+ children: /* @__PURE__ */ jsx(AdminThemeProvider, { children: /* @__PURE__ */ jsxs(AdminThemedRoot, { children: [/* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsx(HashRouter, { children: /* @__PURE__ */ jsx(AdminRoutes, {
13394
13575
  onNavigate,
13395
13576
  isEmbedded
13396
13577
  }) }) }), /* @__PURE__ */ jsx(Toaster$1, {
13397
13578
  position: "top-right",
13398
13579
  expand: true,
13399
13580
  richColors: true
13400
- })]
13581
+ })] }) })
13401
13582
  }) })
13402
13583
  });
13403
13584
  }
@@ -13429,15 +13610,15 @@ function renderAdminUI(container, props) {
13429
13610
  function AdminStandalone({ apiKey, baseUrl, siteId }) {
13430
13611
  return /* @__PURE__ */ jsx("div", {
13431
13612
  className: "dy-admin-ui dy-h-full",
13432
- children: /* @__PURE__ */ jsxs(DyrectedProvider, {
13613
+ children: /* @__PURE__ */ jsx(DyrectedProvider, {
13433
13614
  apiKey,
13434
13615
  baseUrl,
13435
13616
  siteId,
13436
- children: [/* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsx(MemoryRouter, { children: /* @__PURE__ */ jsx(AdminRoutes, {}) }) }), /* @__PURE__ */ jsx(Toaster$1, {
13617
+ children: /* @__PURE__ */ jsx(AdminThemeProvider, { children: /* @__PURE__ */ jsxs(AdminThemedRoot, { children: [/* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsx(MemoryRouter, { children: /* @__PURE__ */ jsx(AdminRoutes, {}) }) }), /* @__PURE__ */ jsx(Toaster$1, {
13437
13618
  position: "top-right",
13438
13619
  expand: true,
13439
13620
  richColors: true
13440
- })]
13621
+ })] }) })
13441
13622
  })
13442
13623
  });
13443
13624
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyrected/admin",
3
- "version": "2.5.45",
3
+ "version": "2.5.47",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -64,8 +64,8 @@
64
64
  "tailwind-merge": "^3.5.0",
65
65
  "tailwindcss-animate": "^1.0.7",
66
66
  "zod": "^3.25.76",
67
- "@dyrected/core": "^2.5.45",
68
- "@dyrected/sdk": "^2.5.45"
67
+ "@dyrected/core": "^2.5.47",
68
+ "@dyrected/sdk": "^2.5.47"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "@tanstack/react-query": "^5.0.0",