@mdxui/do 3.0.0 → 4.0.0

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.
Files changed (52) hide show
  1. package/README.md +80 -275
  2. package/dist/app/index.d.ts +125 -125
  3. package/dist/app/index.js +8 -7
  4. package/dist/breadcrumbs-C9Qn3S7d.d.ts +81 -0
  5. package/dist/capnweb-client-Bq78FtEA.d.ts +229 -0
  6. package/dist/chunk-3XKYQRXY.js +192 -0
  7. package/dist/chunk-3XKYQRXY.js.map +1 -0
  8. package/dist/{chunk-JWKIONEO.js → chunk-5SHZZC7L.js} +3 -3
  9. package/dist/{chunk-JWKIONEO.js.map → chunk-5SHZZC7L.js.map} +1 -1
  10. package/dist/{chunk-YGIBMNRH.js → chunk-7UFINK3Q.js} +30 -27
  11. package/dist/chunk-7UFINK3Q.js.map +1 -0
  12. package/dist/{chunk-5AWTQDRF.js → chunk-JJLAES6W.js} +2 -2
  13. package/dist/{chunk-5AWTQDRF.js.map → chunk-JJLAES6W.js.map} +1 -1
  14. package/dist/{chunk-NTSEARBC.js → chunk-KT52UU3U.js} +473 -203
  15. package/dist/chunk-KT52UU3U.js.map +1 -0
  16. package/dist/{chunk-EQVOEEQO.js → chunk-LJIWB7KE.js} +2 -2
  17. package/dist/{chunk-EQVOEEQO.js.map → chunk-LJIWB7KE.js.map} +1 -1
  18. package/dist/{chunk-IESVTECE.js → chunk-NA652ART.js} +64 -4
  19. package/dist/chunk-NA652ART.js.map +1 -0
  20. package/dist/chunk-OVLO7UOH.js +1071 -0
  21. package/dist/chunk-OVLO7UOH.js.map +1 -0
  22. package/dist/chunk-WMNT4OIE.js +249 -0
  23. package/dist/chunk-WMNT4OIE.js.map +1 -0
  24. package/dist/components/index.d.ts +20 -1
  25. package/dist/components/index.js +2 -1
  26. package/dist/{config-CmZBQQaT.d.ts → config-CxvpD8Y6.d.ts} +2 -13
  27. package/dist/{do-C-t9UgjT.d.ts → do-D27i5bU0.d.ts} +2 -1
  28. package/dist/{errors-B4Oyyj4Z.d.ts → errors-DratdVIz.d.ts} +1 -1
  29. package/dist/hooks/index.d.ts +30 -3
  30. package/dist/hooks/index.js +4 -4
  31. package/dist/hooks/things/index.d.ts +2 -2
  32. package/dist/hooks/things/index.js +3 -3
  33. package/dist/index.d.ts +76 -14
  34. package/dist/index.js +9 -8
  35. package/dist/lib/index.d.ts +703 -5
  36. package/dist/lib/index.js +2 -2
  37. package/dist/providers/index.d.ts +7 -123
  38. package/dist/providers/index.js +2 -2
  39. package/dist/{query-keys-BC901wog.d.ts → query-keys-CZNFikIi.d.ts} +3 -3
  40. package/dist/schemas/index.d.ts +5 -5
  41. package/dist/{thing-BVhCTzOi.d.ts → thing-BF25aUtJ.d.ts} +68 -68
  42. package/dist/types/index.d.ts +445 -445
  43. package/dist/views/index.d.ts +1 -1
  44. package/dist/views/index.js +6 -6
  45. package/package.json +2 -2
  46. package/dist/chunk-FO3N7SXV.js +0 -469
  47. package/dist/chunk-FO3N7SXV.js.map +0 -1
  48. package/dist/chunk-IESVTECE.js.map +0 -1
  49. package/dist/chunk-NTSEARBC.js.map +0 -1
  50. package/dist/chunk-OWEAW4U6.js +0 -116
  51. package/dist/chunk-OWEAW4U6.js.map +0 -1
  52. package/dist/chunk-YGIBMNRH.js.map +0 -1
@@ -1,19 +1,21 @@
1
- import { DataBrowserView, DataGridView, DocumentEditorView, FunctionEditorView } from './chunk-YGIBMNRH.js';
2
- import { useNamespaces, useTypes } from './chunk-IESVTECE.js';
3
- import { useThings } from './chunk-JWKIONEO.js';
4
- import { DOProvider, useDO } from './chunk-FO3N7SXV.js';
5
- import { useLocation, NavLink, Outlet, useParams, useNavigate, BrowserRouter, Routes, Route } from 'react-router-dom';
6
- import { ThemeProvider } from 'next-themes';
1
+ import { DataGridView, DocumentEditorView, FunctionEditorView, DataBrowserView } from './chunk-7UFINK3Q.js';
2
+ import { useBreadcrumbs, useNamespaces, useTypes } from './chunk-NA652ART.js';
3
+ import { useThings } from './chunk-5SHZZC7L.js';
4
+ import { useDO, useEndpoint, DOProvider, useDOState } from './chunk-WMNT4OIE.js';
5
+ import { Breadcrumbs, EndpointSelector } from './chunk-3XKYQRXY.js';
6
+ import { createWebRouter, WebOutlet } from '@mdxui/navigation/web';
7
+ import { useRouterState, Link, useParams, useNavigate, RouterProvider } from '@tanstack/react-router';
7
8
  import * as React from 'react';
8
- import { createContext, useState, useMemo, useContext, useEffect } from 'react';
9
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
+ import { createContext, useMemo, useContext, useState, useEffect } from 'react';
10
10
  import { useAuth, AuthKitProvider } from '@workos-inc/authkit-react';
11
+ import { ThemeProvider } from 'next-themes';
12
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
11
13
  import { WorkOsWidgets } from '@workos-inc/widgets';
12
14
  import { DropdownMenu, DropdownMenuTrigger, SidebarMenuButton, Avatar, AvatarImage, AvatarFallback, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuItem, Sidebar, SidebarHeader, SidebarMenu, SidebarMenuItem, SidebarContent, SidebarGroup, SidebarGroupLabel, SidebarFooter, SidebarProvider, SidebarInset, SidebarTrigger, Separator, Toaster, Card, CardHeader, CardTitle, CardDescription, CardContent } from '@mdxui/primitives';
13
15
  import { ChevronsUpDown, User, Settings, LogOut, Database, Shapes, Activity, Network, Code, Users, CreditCard, Building, Construction, Home, Bot, GitBranch, BookOpen, Zap, Play, Plug, Shield, UserCog, Key } from 'lucide-react';
14
16
  import { z } from 'zod';
15
17
 
16
- var DOShellContext = createContext(null);
18
+ var DOConfigContext = createContext(null);
17
19
  var defaultIdentity = {
18
20
  clientId: "",
19
21
  devMode: false,
@@ -28,8 +30,7 @@ var defaultConfig = {
28
30
  routes: {},
29
31
  customRoutes: []
30
32
  };
31
- function DOShellProvider({ config, children }) {
32
- const [namespace, setNamespace] = useState(config.defaultNamespace ?? "default");
33
+ function DOConfigProvider({ config, children }) {
33
34
  const value = useMemo(() => {
34
35
  const mergedConfig = {
35
36
  ...defaultConfig,
@@ -38,25 +39,25 @@ function DOShellProvider({ config, children }) {
38
39
  theme: { ...defaultConfig.theme, ...config.theme },
39
40
  identity: { ...defaultIdentity, ...config.identity }
40
41
  };
41
- return {
42
- config: mergedConfig,
43
- namespace,
44
- setNamespace
45
- };
46
- }, [config, namespace]);
47
- return /* @__PURE__ */ jsx(DOShellContext.Provider, { value, children });
42
+ return { config: mergedConfig };
43
+ }, [config]);
44
+ return /* @__PURE__ */ jsx(DOConfigContext.Provider, { value, children });
48
45
  }
49
- function useDOShell() {
50
- const context = useContext(DOShellContext);
46
+ function useDOConfig() {
47
+ const context = useContext(DOConfigContext);
51
48
  if (!context) {
52
- throw new Error("useDOShell must be used within a DOShellProvider");
49
+ throw new Error("useDOConfig must be used within a DOConfigProvider");
53
50
  }
54
51
  return context;
55
52
  }
56
- function useDOShellRoutes() {
57
- const { config } = useDOShell();
53
+ function useDORoutes() {
54
+ const { config } = useDOConfig();
58
55
  return config.routes ?? {};
59
56
  }
57
+ function useDOCustomRoutes() {
58
+ const { config } = useDOConfig();
59
+ return config.customRoutes ?? [];
60
+ }
60
61
  var useIdentity = useAuth;
61
62
  function IdentityWidgetsWrapper({ children }) {
62
63
  const [mounted, setMounted] = useState(false);
@@ -100,7 +101,7 @@ function IdentityWidgetsWrapper({ children }) {
100
101
  );
101
102
  }
102
103
  function DOIdentityProvider({ children }) {
103
- const { config } = useDOShell();
104
+ const { config } = useDOConfig();
104
105
  const { identity } = config;
105
106
  const redirectUri = identity.redirectUri ?? (typeof window !== "undefined" ? `${window.location.origin}${config.basePath ?? "/"}` : void 0);
106
107
  const onRedirectCallback = () => {
@@ -123,6 +124,31 @@ function DOIdentityProvider({ children }) {
123
124
  }
124
125
  );
125
126
  }
127
+ function DOProviderWithState({
128
+ config,
129
+ initialNamespace,
130
+ children
131
+ }) {
132
+ const { getAccessToken, user } = useAuth();
133
+ const [accessToken, setAccessToken] = useState(void 0);
134
+ const endpoint = useEndpoint(config.apiEndpoint);
135
+ useEffect(() => {
136
+ if (user) {
137
+ getAccessToken().then(setAccessToken).catch(() => setAccessToken(void 0));
138
+ } else {
139
+ setAccessToken(void 0);
140
+ }
141
+ }, [user, getAccessToken]);
142
+ const authenticatedConfig = useMemo(() => {
143
+ const authToken = accessToken ?? config.authToken;
144
+ return {
145
+ ...config,
146
+ apiEndpoint: endpoint,
147
+ authToken
148
+ };
149
+ }, [config, accessToken, endpoint]);
150
+ return /* @__PURE__ */ jsx(DOProvider, { config: authenticatedConfig, initialNamespace, children });
151
+ }
126
152
  function AppProviders({ config, children }) {
127
153
  const themeMode = config.theme?.mode ?? "system";
128
154
  return /* @__PURE__ */ jsx(
@@ -132,8 +158,8 @@ function AppProviders({ config, children }) {
132
158
  defaultTheme: themeMode,
133
159
  enableSystem: themeMode === "system",
134
160
  disableTransitionOnChange: true,
135
- children: /* @__PURE__ */ jsx(DOShellProvider, { config, children: /* @__PURE__ */ jsx(DOIdentityProvider, { children: /* @__PURE__ */ jsx(
136
- DOProvider,
161
+ children: /* @__PURE__ */ jsx(DOConfigProvider, { config, children: /* @__PURE__ */ jsx(DOIdentityProvider, { children: /* @__PURE__ */ jsx(
162
+ DOProviderWithState,
137
163
  {
138
164
  config: config.do,
139
165
  initialNamespace: config.defaultNamespace,
@@ -143,7 +169,54 @@ function AppProviders({ config, children }) {
143
169
  }
144
170
  );
145
171
  }
146
- var DOAppProviders = AppProviders;
172
+ function DefaultLandingPage() {
173
+ const { signIn } = useAuth();
174
+ return /* @__PURE__ */ jsx("div", { className: "min-h-screen bg-background flex flex-col items-center justify-center p-4", children: /* @__PURE__ */ jsxs("div", { className: "text-center max-w-md", children: [
175
+ /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight mb-4", children: "DO Admin" }),
176
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-8", children: "Sign in to access the admin dashboard and manage your Durable Objects." }),
177
+ /* @__PURE__ */ jsx(
178
+ "button",
179
+ {
180
+ type: "button",
181
+ onClick: () => signIn(),
182
+ className: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--radius-md)] text-sm font-medium transition-colors bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-6",
183
+ children: "Sign In"
184
+ }
185
+ )
186
+ ] }) });
187
+ }
188
+ function AuthGate({ children }) {
189
+ const { config } = useDOConfig();
190
+ const { user, isLoading } = useAuth();
191
+ const { identity } = config;
192
+ const required = identity.required ?? true;
193
+ const onUnauthenticated = identity.onUnauthenticated ?? "landing";
194
+ if (!required) {
195
+ return /* @__PURE__ */ jsx(Fragment, { children });
196
+ }
197
+ if (isLoading) {
198
+ return /* @__PURE__ */ jsx("div", { className: "min-h-screen bg-background flex items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
199
+ /* @__PURE__ */ jsx("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" }),
200
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Loading..." })
201
+ ] }) });
202
+ }
203
+ if (user) {
204
+ return /* @__PURE__ */ jsx(Fragment, { children });
205
+ }
206
+ switch (onUnauthenticated) {
207
+ case "redirect":
208
+ if (identity.unauthenticatedRedirectUrl && typeof window !== "undefined") {
209
+ window.location.href = identity.unauthenticatedRedirectUrl;
210
+ return /* @__PURE__ */ jsx("div", { className: "min-h-screen bg-background flex items-center justify-center", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Redirecting..." }) });
211
+ }
212
+ return identity.landingComponent ? /* @__PURE__ */ jsx(Fragment, { children: identity.landingComponent }) : /* @__PURE__ */ jsx(DefaultLandingPage, {});
213
+ case "allow":
214
+ return /* @__PURE__ */ jsx(Fragment, { children });
215
+ case "landing":
216
+ default:
217
+ return identity.landingComponent ? /* @__PURE__ */ jsx(Fragment, { children: identity.landingComponent }) : /* @__PURE__ */ jsx(DefaultLandingPage, {});
218
+ }
219
+ }
147
220
  function getInitials(name) {
148
221
  if (!name) return "?";
149
222
  const parts = name.trim().split(/\s+/);
@@ -223,41 +296,82 @@ var navGroups = {
223
296
  main: [{ title: "Overview", url: "/", icon: Home, routeKey: "overview" }],
224
297
  development: [
225
298
  { title: "Agents", url: "/agents", icon: Bot, routeKey: "agents" },
226
- { title: "Functions", url: "/functions", icon: Code, routeKey: "functions" },
227
- { title: "Workflows", url: "/workflows", icon: GitBranch, routeKey: "workflows" },
228
- { title: "Databases", url: "/databases", icon: Database, routeKey: "databases" }
299
+ {
300
+ title: "Functions",
301
+ url: "/functions",
302
+ icon: Code,
303
+ routeKey: "functions"
304
+ },
305
+ {
306
+ title: "Workflows",
307
+ url: "/workflows",
308
+ icon: GitBranch,
309
+ routeKey: "workflows"
310
+ },
311
+ {
312
+ title: "Databases",
313
+ url: "/databases",
314
+ icon: Database,
315
+ routeKey: "databases"
316
+ }
229
317
  ],
230
318
  dataModel: [
231
319
  { title: "Things", url: "/things", icon: Shapes, routeKey: "things" },
232
320
  { title: "Nouns", url: "/nouns", icon: BookOpen, routeKey: "nouns" },
233
321
  { title: "Verbs", url: "/verbs", icon: Zap, routeKey: "verbs" },
234
322
  { title: "Actions", url: "/actions", icon: Play, routeKey: "actions" },
235
- { title: "Relationships", url: "/relationships", icon: Network, routeKey: "relationships" },
323
+ {
324
+ title: "Relationships",
325
+ url: "/relationships",
326
+ icon: Network,
327
+ routeKey: "relationships"
328
+ },
236
329
  { title: "Events", url: "/events", icon: Activity, routeKey: "events" }
237
330
  ],
238
331
  saas: [
239
- { title: "Customers", url: "/customers", icon: Users, routeKey: "customers" },
240
- { title: "Subscriptions", url: "/subscriptions", icon: CreditCard, routeKey: "subscriptions" },
241
- { title: "Integrations", url: "/integrations", icon: Plug, routeKey: "integrations" }
332
+ {
333
+ title: "Customers",
334
+ url: "/customers",
335
+ icon: Users,
336
+ routeKey: "customers"
337
+ },
338
+ {
339
+ title: "Subscriptions",
340
+ url: "/subscriptions",
341
+ icon: CreditCard,
342
+ routeKey: "subscriptions"
343
+ },
344
+ {
345
+ title: "Integrations",
346
+ url: "/integrations",
347
+ icon: Plug,
348
+ routeKey: "integrations"
349
+ }
242
350
  ],
243
351
  admin: [
244
352
  { title: "Organizations", url: "/orgs", icon: Building, routeKey: "orgs" },
245
353
  { title: "Roles", url: "/roles", icon: Shield, routeKey: "roles" },
246
354
  { title: "Users", url: "/users", icon: UserCog, routeKey: "users" },
247
355
  { title: "API Keys", url: "/api-keys", icon: Key, routeKey: "apiKeys" },
248
- { title: "Settings", url: "/settings", icon: Settings, routeKey: "settings" }
356
+ {
357
+ title: "Settings",
358
+ url: "/settings",
359
+ icon: Settings,
360
+ routeKey: "settings"
361
+ }
249
362
  ]
250
363
  };
251
364
  function DOShellNav({ headerContent, ...props }) {
252
- const location = useLocation();
253
- const { config } = useDOShell();
254
- const routesConfig = useDOShellRoutes();
365
+ const routerState = useRouterState();
366
+ const { config } = useDOConfig();
367
+ const routesConfig = useDORoutes();
255
368
  const branding = config.branding;
369
+ const pathname = routerState.location.pathname;
256
370
  const isActive = (url) => {
257
371
  if (url === "/") {
258
- return location.pathname === "/" || location.pathname === "";
372
+ return pathname === "/" || pathname === "";
259
373
  }
260
- return location.pathname.startsWith(url);
374
+ return pathname.startsWith(url);
261
375
  };
262
376
  const isRouteEnabled = (routeKey) => {
263
377
  if (!routeKey) return true;
@@ -269,7 +383,7 @@ function DOShellNav({ headerContent, ...props }) {
269
383
  };
270
384
  return /* @__PURE__ */ jsxs(Sidebar, { variant: "inset", ...props, children: [
271
385
  /* @__PURE__ */ jsxs(SidebarHeader, { children: [
272
- /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, { size: "lg", asChild: true, children: /* @__PURE__ */ jsxs(NavLink, { to: "/", children: [
386
+ /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, { size: "lg", asChild: true, children: /* @__PURE__ */ jsxs(Link, { to: "/", children: [
273
387
  /* @__PURE__ */ jsx("div", { className: "bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-(--radius)", children: branding?.logo ?? /* @__PURE__ */ jsx(Database, { className: "size-4" }) }),
274
388
  /* @__PURE__ */ jsxs("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
275
389
  /* @__PURE__ */ jsx("span", { className: "truncate font-medium", children: branding?.name ?? "DO Admin" }),
@@ -279,122 +393,149 @@ function DOShellNav({ headerContent, ...props }) {
279
393
  headerContent
280
394
  ] }),
281
395
  /* @__PURE__ */ jsxs(SidebarContent, { children: [
282
- /* @__PURE__ */ jsx(SidebarGroup, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.main).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, { asChild: true, isActive: isActive(item.url), tooltip: item.title, children: /* @__PURE__ */ jsxs(NavLink, { to: item.url, children: [
283
- /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
284
- /* @__PURE__ */ jsx("span", { children: item.title })
285
- ] }) }) }, item.title)) }) }),
396
+ /* @__PURE__ */ jsx(SidebarGroup, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.main).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
397
+ SidebarMenuButton,
398
+ {
399
+ asChild: true,
400
+ isActive: isActive(item.url),
401
+ tooltip: item.title,
402
+ children: /* @__PURE__ */ jsxs(Link, { to: item.url, children: [
403
+ /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
404
+ /* @__PURE__ */ jsx("span", { children: item.title })
405
+ ] })
406
+ }
407
+ ) }, item.title)) }) }),
286
408
  filterNavItems(navGroups.development).length > 0 && /* @__PURE__ */ jsxs(SidebarGroup, { children: [
287
409
  /* @__PURE__ */ jsx(SidebarGroupLabel, { children: "Development" }),
288
- /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.development).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, { asChild: true, isActive: isActive(item.url), tooltip: item.title, children: /* @__PURE__ */ jsxs(NavLink, { to: item.url, children: [
289
- /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
290
- /* @__PURE__ */ jsx("span", { children: item.title })
291
- ] }) }) }, item.title)) })
410
+ /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.development).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
411
+ SidebarMenuButton,
412
+ {
413
+ asChild: true,
414
+ isActive: isActive(item.url),
415
+ tooltip: item.title,
416
+ children: /* @__PURE__ */ jsxs(Link, { to: item.url, children: [
417
+ /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
418
+ /* @__PURE__ */ jsx("span", { children: item.title })
419
+ ] })
420
+ }
421
+ ) }, item.title)) })
292
422
  ] }),
293
423
  filterNavItems(navGroups.dataModel).length > 0 && /* @__PURE__ */ jsxs(SidebarGroup, { children: [
294
424
  /* @__PURE__ */ jsx(SidebarGroupLabel, { children: "Data Model" }),
295
- /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.dataModel).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, { asChild: true, isActive: isActive(item.url), tooltip: item.title, children: /* @__PURE__ */ jsxs(NavLink, { to: item.url, children: [
296
- /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
297
- /* @__PURE__ */ jsx("span", { children: item.title })
298
- ] }) }) }, item.title)) })
425
+ /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.dataModel).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
426
+ SidebarMenuButton,
427
+ {
428
+ asChild: true,
429
+ isActive: isActive(item.url),
430
+ tooltip: item.title,
431
+ children: /* @__PURE__ */ jsxs(Link, { to: item.url, children: [
432
+ /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
433
+ /* @__PURE__ */ jsx("span", { children: item.title })
434
+ ] })
435
+ }
436
+ ) }, item.title)) })
299
437
  ] }),
300
438
  filterNavItems(navGroups.saas).length > 0 && /* @__PURE__ */ jsxs(SidebarGroup, { children: [
301
439
  /* @__PURE__ */ jsx(SidebarGroupLabel, { children: "SaaS" }),
302
- /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.saas).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, { asChild: true, isActive: isActive(item.url), tooltip: item.title, children: /* @__PURE__ */ jsxs(NavLink, { to: item.url, children: [
303
- /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
304
- /* @__PURE__ */ jsx("span", { children: item.title })
305
- ] }) }) }, item.title)) })
440
+ /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.saas).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
441
+ SidebarMenuButton,
442
+ {
443
+ asChild: true,
444
+ isActive: isActive(item.url),
445
+ tooltip: item.title,
446
+ children: /* @__PURE__ */ jsxs(Link, { to: item.url, children: [
447
+ /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
448
+ /* @__PURE__ */ jsx("span", { children: item.title })
449
+ ] })
450
+ }
451
+ ) }, item.title)) })
306
452
  ] }),
307
453
  filterNavItems(navGroups.admin).length > 0 && /* @__PURE__ */ jsxs(SidebarGroup, { children: [
308
454
  /* @__PURE__ */ jsx(SidebarGroupLabel, { children: "Admin" }),
309
- /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.admin).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, { asChild: true, isActive: isActive(item.url), tooltip: item.title, children: /* @__PURE__ */ jsxs(NavLink, { to: item.url, children: [
310
- /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
311
- /* @__PURE__ */ jsx("span", { children: item.title })
312
- ] }) }) }, item.title)) })
455
+ /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.admin).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
456
+ SidebarMenuButton,
457
+ {
458
+ asChild: true,
459
+ isActive: isActive(item.url),
460
+ tooltip: item.title,
461
+ children: /* @__PURE__ */ jsxs(Link, { to: item.url, children: [
462
+ /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
463
+ /* @__PURE__ */ jsx("span", { children: item.title })
464
+ ] })
465
+ }
466
+ ) }, item.title)) })
313
467
  ] })
314
468
  ] }),
315
469
  /* @__PURE__ */ jsx(SidebarFooter, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(UserMenu, {}) }) }) })
316
470
  ] });
317
471
  }
318
- function DefaultLandingPage() {
319
- const { signIn } = useAuth();
320
- return /* @__PURE__ */ jsx("div", { className: "min-h-screen bg-background flex flex-col items-center justify-center p-4", children: /* @__PURE__ */ jsxs("div", { className: "text-center max-w-md", children: [
321
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight mb-4", children: "DO Admin" }),
322
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-8", children: "Sign in to access the admin dashboard and manage your Durable Objects." }),
323
- /* @__PURE__ */ jsx(
324
- "button",
325
- {
326
- type: "button",
327
- onClick: () => signIn(),
328
- className: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--radius-md)] text-sm font-medium transition-colors bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-6",
329
- children: "Sign In"
330
- }
331
- )
332
- ] }) });
333
- }
334
- function AuthGate({ children }) {
335
- const { config } = useDOShell();
336
- const { user, isLoading } = useAuth();
337
- const { identity } = config;
338
- const required = identity.required ?? true;
339
- const onUnauthenticated = identity.onUnauthenticated ?? "landing";
340
- if (!required) {
341
- return /* @__PURE__ */ jsx(Fragment, { children });
342
- }
343
- if (isLoading) {
344
- return /* @__PURE__ */ jsx("div", { className: "min-h-screen bg-background flex items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
345
- /* @__PURE__ */ jsx("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" }),
346
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Loading..." })
347
- ] }) });
348
- }
349
- if (user) {
350
- return /* @__PURE__ */ jsx(Fragment, { children });
351
- }
352
- switch (onUnauthenticated) {
353
- case "redirect":
354
- if (identity.unauthenticatedRedirectUrl && typeof window !== "undefined") {
355
- window.location.href = identity.unauthenticatedRedirectUrl;
356
- return /* @__PURE__ */ jsx("div", { className: "min-h-screen bg-background flex items-center justify-center", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Redirecting..." }) });
357
- }
358
- return identity.landingComponent ? /* @__PURE__ */ jsx(Fragment, { children: identity.landingComponent }) : /* @__PURE__ */ jsx(DefaultLandingPage, {});
359
- case "allow":
360
- return /* @__PURE__ */ jsx(Fragment, { children });
361
- case "landing":
362
- default:
363
- return identity.landingComponent ? /* @__PURE__ */ jsx(Fragment, { children: identity.landingComponent }) : /* @__PURE__ */ jsx(DefaultLandingPage, {});
364
- }
472
+ function RouterLink({ href, children, className }) {
473
+ return /* @__PURE__ */ jsx(Link, { to: href, className, children });
365
474
  }
366
475
  function DOShell({
367
476
  children,
368
477
  sidebarHeaderContent,
369
478
  headerContent,
370
- breadcrumbs
479
+ breadcrumbs: breadcrumbsProp
371
480
  }) {
481
+ const autoBreadcrumbs = useBreadcrumbs();
482
+ const breadcrumbs = breadcrumbsProp ?? autoBreadcrumbs;
372
483
  return /* @__PURE__ */ jsx(AuthGate, { children: /* @__PURE__ */ jsxs(SidebarProvider, { className: "h-svh!", children: [
373
484
  /* @__PURE__ */ jsx(DOShellNav, { headerContent: sidebarHeaderContent }),
374
485
  /* @__PURE__ */ jsxs(SidebarInset, { className: "overflow-hidden", children: [
375
- /* @__PURE__ */ jsxs("header", { className: "flex h-16 shrink-0 items-center gap-2 border-b bg-background transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: [
376
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-4", children: [
486
+ /* @__PURE__ */ jsxs("header", { className: "relative flex h-16 shrink-0 items-center gap-2 border-b bg-background transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: [
487
+ /* @__PURE__ */ jsxs("div", { className: "z-10 flex shrink-0 items-center gap-2 bg-background px-4", children: [
377
488
  /* @__PURE__ */ jsx(SidebarTrigger, { className: "-ml-1" }),
378
489
  /* @__PURE__ */ jsx(Separator, { orientation: "vertical", className: "mr-2 h-4" }),
379
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx("nav", { className: "flex items-center gap-1 text-sm", children: breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
380
- index > 0 && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "/" }),
381
- crumb.href ? /* @__PURE__ */ jsx(
382
- "a",
383
- {
384
- href: crumb.href,
385
- className: "text-muted-foreground hover:text-foreground transition-colors",
386
- children: crumb.label
387
- }
388
- ) : /* @__PURE__ */ jsx("span", { className: "text-foreground", children: crumb.label })
389
- ] }, crumb.label)) })
490
+ breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Breadcrumbs, { items: breadcrumbs, LinkComponent: RouterLink })
390
491
  ] }),
391
- headerContent && /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center gap-2 px-4", children: headerContent })
492
+ headerContent && /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center px-4 xl:absolute xl:inset-0 xl:justify-center", children: /* @__PURE__ */ jsx("div", { className: "w-full max-w-md", children: headerContent }) })
392
493
  ] }),
393
- /* @__PURE__ */ jsx("main", { className: "flex-1 overflow-auto p-4", children: children ?? /* @__PURE__ */ jsx(Outlet, {}) })
494
+ /* @__PURE__ */ jsx("main", { className: "flex-1 overflow-auto", children })
394
495
  ] }),
395
496
  /* @__PURE__ */ jsx(Toaster, { closeButton: true, position: "top-right" })
396
497
  ] }) });
397
498
  }
499
+ function DatabasesPage() {
500
+ const params = useParams({ strict: false });
501
+ const ns = params.ns;
502
+ const type = params.type;
503
+ return /* @__PURE__ */ jsx(
504
+ DataGridView,
505
+ {
506
+ initialNamespace: ns,
507
+ initialType: type,
508
+ className: "h-full"
509
+ }
510
+ );
511
+ }
512
+ function DocumentPage() {
513
+ const params = useParams({ strict: false });
514
+ const ns = params.ns;
515
+ const type = params.type;
516
+ const id = params.id;
517
+ const navigate = useNavigate();
518
+ const handleBack = () => {
519
+ navigate({ to: `/things/${ns}/${type}` });
520
+ };
521
+ const handleDelete = () => {
522
+ navigate({ to: `/things/${ns}/${type}` });
523
+ };
524
+ return /* @__PURE__ */ jsx(
525
+ DocumentEditorView,
526
+ {
527
+ initialNamespace: ns,
528
+ initialType: type,
529
+ initialId: id,
530
+ onBack: handleBack,
531
+ onDelete: handleDelete,
532
+ className: "h-full"
533
+ }
534
+ );
535
+ }
536
+ function FunctionsPage() {
537
+ return /* @__PURE__ */ jsx(FunctionEditorView, { className: "h-full" });
538
+ }
398
539
  function StatCard({ title, value, description, icon: Icon, href }) {
399
540
  const content = /* @__PURE__ */ jsxs(Card, { className: "hover:bg-muted/50 transition-colors", children: [
400
541
  /* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
@@ -407,13 +548,13 @@ function StatCard({ title, value, description, icon: Icon, href }) {
407
548
  ] })
408
549
  ] });
409
550
  if (href) {
410
- return /* @__PURE__ */ jsx(NavLink, { to: href, className: "block", children: content });
551
+ return /* @__PURE__ */ jsx(Link, { to: href, className: "block", children: content });
411
552
  }
412
553
  return content;
413
554
  }
414
555
  function QuickAction({ title, description, icon: Icon, href }) {
415
556
  return /* @__PURE__ */ jsxs(
416
- NavLink,
557
+ Link,
417
558
  {
418
559
  to: href,
419
560
  className: "flex items-center gap-4 rounded-(--radius) border p-4 hover:bg-muted/50 transition-colors",
@@ -557,11 +698,26 @@ function OverviewPage() {
557
698
  ] }) })
558
699
  ] });
559
700
  }
701
+ function PlaceholderPage({ title, description }) {
702
+ return /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center p-4", children: /* @__PURE__ */ jsxs(Card, { className: "max-w-md", children: [
703
+ /* @__PURE__ */ jsxs(CardHeader, { className: "text-center", children: [
704
+ /* @__PURE__ */ jsx("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-muted", children: /* @__PURE__ */ jsx(Construction, { className: "h-8 w-8 text-muted-foreground" }) }),
705
+ /* @__PURE__ */ jsx(CardTitle, { children: title }),
706
+ /* @__PURE__ */ jsx(CardDescription, { children: description ?? "This feature is coming soon." })
707
+ ] }),
708
+ /* @__PURE__ */ jsxs(CardContent, { className: "text-center text-sm text-muted-foreground", children: [
709
+ /* @__PURE__ */ jsx("p", { children: "We're working hard to bring you this functionality." }),
710
+ /* @__PURE__ */ jsx("p", { children: "Check back soon for updates." })
711
+ ] })
712
+ ] }) });
713
+ }
560
714
  function ThingsPage() {
561
- const { ns, type } = useParams();
715
+ const params = useParams({ strict: false });
716
+ const ns = params.ns;
717
+ const type = params.type;
562
718
  const navigate = useNavigate();
563
719
  const handleOpen = (thing) => {
564
- navigate(`/things/${thing.ns}/${thing.type}/${thing.id}`);
720
+ navigate({ to: `/things/${thing.ns}/${thing.type}/${thing.id}` });
565
721
  };
566
722
  return /* @__PURE__ */ jsx(
567
723
  DataBrowserView,
@@ -573,94 +729,208 @@ function ThingsPage() {
573
729
  }
574
730
  );
575
731
  }
576
- function DatabasesPage() {
577
- const { ns, type } = useParams();
732
+ function TypedThingsPage({ type }) {
733
+ const navigate = useNavigate();
734
+ const handleOpen = (thing) => {
735
+ navigate({ to: `/things/${thing.ns}/${thing.type}/${thing.id}` });
736
+ };
578
737
  return /* @__PURE__ */ jsx(
579
- DataGridView,
738
+ DataBrowserView,
580
739
  {
581
- initialNamespace: ns,
582
740
  initialType: type,
741
+ onOpen: handleOpen,
583
742
  className: "h-full"
584
743
  }
585
744
  );
586
745
  }
587
- function DocumentPage() {
588
- const { ns, type, id } = useParams();
589
- const navigate = useNavigate();
590
- const handleBack = () => {
591
- navigate(`/things/${ns}/${type}`);
592
- };
593
- const handleDelete = () => {
594
- navigate(`/things/${ns}/${type}`);
595
- };
746
+ function NounsPage() {
747
+ return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Noun" });
748
+ }
749
+ function VerbsPage() {
750
+ return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Verb" });
751
+ }
752
+ function ActionsPage() {
753
+ return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Action" });
754
+ }
755
+ function RelationshipsPage() {
756
+ return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Relationship" });
757
+ }
758
+ function EventsPage() {
759
+ return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Event" });
760
+ }
761
+ function CustomersPage() {
762
+ return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Customer" });
763
+ }
764
+ function SubscriptionsPage() {
765
+ return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Subscription" });
766
+ }
767
+ function OrgsPage() {
768
+ return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Org" });
769
+ }
770
+ function RolesPage() {
771
+ return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Role" });
772
+ }
773
+ function UsersPage() {
774
+ return /* @__PURE__ */ jsx(TypedThingsPage, { type: "User" });
775
+ }
776
+ function APIKeysPage() {
777
+ return /* @__PURE__ */ jsx(TypedThingsPage, { type: "APIKey" });
778
+ }
779
+ var doRoutes = {
780
+ // Main
781
+ overview: {
782
+ path: "/",
783
+ component: OverviewPage
784
+ },
785
+ // Development
786
+ agents: {
787
+ path: "/agents",
788
+ component: () => /* @__PURE__ */ jsx(PlaceholderPage, { title: "Agents", description: "Autonomous AI workers" })
789
+ },
790
+ functions: {
791
+ path: "/functions",
792
+ component: FunctionsPage
793
+ },
794
+ workflows: {
795
+ path: "/workflows",
796
+ component: FunctionsPage
797
+ // Uses FunctionEditorView for now
798
+ },
799
+ databases: {
800
+ path: "/databases",
801
+ component: DatabasesPage
802
+ },
803
+ databasesWithParams: {
804
+ path: "/databases/:ns/:type",
805
+ component: DatabasesPage
806
+ },
807
+ // Data Model
808
+ things: {
809
+ path: "/things",
810
+ component: ThingsPage
811
+ },
812
+ thingsWithNs: {
813
+ path: "/things/:ns",
814
+ component: ThingsPage
815
+ },
816
+ thingsWithType: {
817
+ path: "/things/:ns/:type",
818
+ component: ThingsPage
819
+ },
820
+ document: {
821
+ path: "/things/:ns/:type/:id",
822
+ component: DocumentPage
823
+ },
824
+ nouns: {
825
+ path: "/nouns",
826
+ component: NounsPage
827
+ },
828
+ verbs: {
829
+ path: "/verbs",
830
+ component: VerbsPage
831
+ },
832
+ actions: {
833
+ path: "/actions",
834
+ component: ActionsPage
835
+ },
836
+ relationships: {
837
+ path: "/relationships",
838
+ component: RelationshipsPage
839
+ },
840
+ events: {
841
+ path: "/events",
842
+ component: EventsPage
843
+ },
844
+ // SaaS
845
+ customers: {
846
+ path: "/customers",
847
+ component: CustomersPage
848
+ },
849
+ subscriptions: {
850
+ path: "/subscriptions",
851
+ component: SubscriptionsPage
852
+ },
853
+ integrations: {
854
+ path: "/integrations",
855
+ component: () => /* @__PURE__ */ jsx(
856
+ PlaceholderPage,
857
+ {
858
+ title: "Integrations",
859
+ description: "External service connections"
860
+ }
861
+ )
862
+ },
863
+ // Admin
864
+ orgs: {
865
+ path: "/orgs",
866
+ component: OrgsPage
867
+ },
868
+ roles: {
869
+ path: "/roles",
870
+ component: RolesPage
871
+ },
872
+ users: {
873
+ path: "/users",
874
+ component: UsersPage
875
+ },
876
+ apiKeys: {
877
+ path: "/api-keys",
878
+ component: APIKeysPage
879
+ },
880
+ settings: {
881
+ path: "/settings",
882
+ component: () => /* @__PURE__ */ jsx(PlaceholderPage, { title: "Settings", description: "Application settings" })
883
+ }
884
+ };
885
+ function DefaultHeaderContent() {
886
+ const { config } = useDOConfig();
887
+ const { endpoint, setEndpoint, recentEndpoints } = useDOState({
888
+ endpoint: config.do.apiEndpoint
889
+ });
596
890
  return /* @__PURE__ */ jsx(
597
- DocumentEditorView,
891
+ EndpointSelector,
598
892
  {
599
- initialNamespace: ns,
600
- initialType: type,
601
- initialId: id,
602
- onBack: handleBack,
603
- onDelete: handleDelete,
604
- className: "h-full"
893
+ endpoint,
894
+ onEndpointChange: setEndpoint,
895
+ recentEndpoints,
896
+ className: "w-full max-w-md"
605
897
  }
606
898
  );
607
899
  }
608
- function FunctionsPage() {
609
- return /* @__PURE__ */ jsx(FunctionEditorView, { className: "h-full" });
610
- }
611
- function PlaceholderPage({ title, description }) {
612
- return /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center p-4", children: /* @__PURE__ */ jsxs(Card, { className: "max-w-md", children: [
613
- /* @__PURE__ */ jsxs(CardHeader, { className: "text-center", children: [
614
- /* @__PURE__ */ jsx("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-muted", children: /* @__PURE__ */ jsx(Construction, { className: "h-8 w-8 text-muted-foreground" }) }),
615
- /* @__PURE__ */ jsx(CardTitle, { children: title }),
616
- /* @__PURE__ */ jsx(CardDescription, { children: description ?? "This feature is coming soon." })
617
- ] }),
618
- /* @__PURE__ */ jsxs(CardContent, { className: "text-center text-sm text-muted-foreground", children: [
619
- /* @__PURE__ */ jsx("p", { children: "We're working hard to bring you this functionality." }),
620
- /* @__PURE__ */ jsx("p", { children: "Check back soon for updates." })
621
- ] })
622
- ] }) });
900
+ function createShellComponent(headerContent, sidebarHeaderContent) {
901
+ return function ShellLayout() {
902
+ return /* @__PURE__ */ jsx(
903
+ DOShell,
904
+ {
905
+ headerContent: headerContent ?? /* @__PURE__ */ jsx(DefaultHeaderContent, {}),
906
+ sidebarHeaderContent,
907
+ children: /* @__PURE__ */ jsx(WebOutlet, {})
908
+ }
909
+ );
910
+ };
623
911
  }
624
- function DOApp({ config, headerContent, sidebarHeaderContent }) {
912
+ function DOApp({
913
+ config,
914
+ headerContent,
915
+ sidebarHeaderContent
916
+ }) {
625
917
  const basePath = config.basePath ?? "";
626
- return /* @__PURE__ */ jsx(AppProviders, { config, children: /* @__PURE__ */ jsx(BrowserRouter, { basename: basePath, children: /* @__PURE__ */ jsx(Routes, { children: /* @__PURE__ */ jsxs(
627
- Route,
918
+ const router = React.useMemo(() => {
919
+ const ShellComponent = createShellComponent(
920
+ headerContent,
921
+ sidebarHeaderContent
922
+ );
923
+ return createWebRouter(doRoutes, {
924
+ rootComponent: ShellComponent,
925
+ basepath: basePath || void 0
926
+ });
927
+ }, [basePath, headerContent, sidebarHeaderContent]);
928
+ return /* @__PURE__ */ jsx(AppProviders, { config, children: /* @__PURE__ */ jsx(
929
+ RouterProvider,
628
930
  {
629
- path: "/",
630
- element: /* @__PURE__ */ jsx(
631
- DOShell,
632
- {
633
- headerContent,
634
- sidebarHeaderContent
635
- }
636
- ),
637
- children: [
638
- /* @__PURE__ */ jsx(Route, { index: true, element: /* @__PURE__ */ jsx(OverviewPage, {}) }),
639
- /* @__PURE__ */ jsx(Route, { path: "agents", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Agents", description: "Autonomous AI workers" }) }),
640
- /* @__PURE__ */ jsx(Route, { path: "functions", element: /* @__PURE__ */ jsx(FunctionsPage, {}) }),
641
- /* @__PURE__ */ jsx(Route, { path: "workflows", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Workflows", description: "Business process orchestration" }) }),
642
- /* @__PURE__ */ jsx(Route, { path: "databases", element: /* @__PURE__ */ jsx(DatabasesPage, {}) }),
643
- /* @__PURE__ */ jsx(Route, { path: "databases/:ns/:type", element: /* @__PURE__ */ jsx(DatabasesPage, {}) }),
644
- /* @__PURE__ */ jsx(Route, { path: "things", element: /* @__PURE__ */ jsx(ThingsPage, {}) }),
645
- /* @__PURE__ */ jsx(Route, { path: "things/:ns", element: /* @__PURE__ */ jsx(ThingsPage, {}) }),
646
- /* @__PURE__ */ jsx(Route, { path: "things/:ns/:type", element: /* @__PURE__ */ jsx(ThingsPage, {}) }),
647
- /* @__PURE__ */ jsx(Route, { path: "things/:ns/:type/:id", element: /* @__PURE__ */ jsx(DocumentPage, {}) }),
648
- /* @__PURE__ */ jsx(Route, { path: "nouns", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Nouns", description: "Semantic entities and concepts" }) }),
649
- /* @__PURE__ */ jsx(Route, { path: "verbs", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Verbs", description: "Actions and operations" }) }),
650
- /* @__PURE__ */ jsx(Route, { path: "actions", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Actions", description: "Executable operations" }) }),
651
- /* @__PURE__ */ jsx(Route, { path: "relationships", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Relationships", description: "Entity connections and graph" }) }),
652
- /* @__PURE__ */ jsx(Route, { path: "events", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Events", description: "Operation log and semantic events" }) }),
653
- /* @__PURE__ */ jsx(Route, { path: "customers", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Customers", description: "Customer management" }) }),
654
- /* @__PURE__ */ jsx(Route, { path: "subscriptions", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Subscriptions", description: "Subscription management" }) }),
655
- /* @__PURE__ */ jsx(Route, { path: "integrations", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Integrations", description: "External service connections" }) }),
656
- /* @__PURE__ */ jsx(Route, { path: "orgs", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Organizations", description: "Organization management" }) }),
657
- /* @__PURE__ */ jsx(Route, { path: "roles", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Roles", description: "Role-based access control" }) }),
658
- /* @__PURE__ */ jsx(Route, { path: "users", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Users", description: "User management" }) }),
659
- /* @__PURE__ */ jsx(Route, { path: "api-keys", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "API Keys", description: "API key management" }) }),
660
- /* @__PURE__ */ jsx(Route, { path: "settings", element: /* @__PURE__ */ jsx(PlaceholderPage, { title: "Settings", description: "Application settings" }) })
661
- ]
931
+ router
662
932
  }
663
- ) }) }) });
933
+ ) });
664
934
  }
665
935
  var DatabaseRouteParams = z.object({
666
936
  ns: z.string().optional(),
@@ -710,6 +980,6 @@ var doRoutePaths = {
710
980
  settings: "/settings"
711
981
  };
712
982
 
713
- export { AppProviders, AuthGate, DOApp, DOAppProviders, DOIdentityProvider, DOShell, DOShellNav, DOShellProvider, DatabaseRouteParams, DatabasesPage, DocumentPage, DocumentRouteParams, FunctionsPage, OverviewPage, PlaceholderPage, ThingsPage, ThingsRouteParams, TypeFilteredRouteParams, UserMenu, doRoutePaths, useDOShell, useDOShellRoutes, useIdentity };
714
- //# sourceMappingURL=chunk-NTSEARBC.js.map
715
- //# sourceMappingURL=chunk-NTSEARBC.js.map
983
+ export { AppProviders, AuthGate, DOApp, DOConfigProvider, DOIdentityProvider, DOShell, DOShellNav, DatabaseRouteParams, DatabasesPage, DocumentPage, DocumentRouteParams, FunctionsPage, OverviewPage, PlaceholderPage, ThingsPage, ThingsRouteParams, TypeFilteredRouteParams, UserMenu, doRoutePaths, useDOConfig, useDOCustomRoutes, useDORoutes, useIdentity };
984
+ //# sourceMappingURL=chunk-KT52UU3U.js.map
985
+ //# sourceMappingURL=chunk-KT52UU3U.js.map