@mdxui/do 4.0.1 → 4.0.8

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 (125) hide show
  1. package/dist/app/index.d.ts +32 -186
  2. package/dist/app/index.js +19 -11
  3. package/dist/auth/index.d.ts +48 -0
  4. package/dist/auth/index.js +4 -0
  5. package/dist/{breadcrumbs-C9Qn3S7d.d.ts → breadcrumbs-DltlCiHt.d.ts} +3 -3
  6. package/dist/chunk-2FWXT4HH.js +576 -0
  7. package/dist/chunk-2FWXT4HH.js.map +1 -0
  8. package/dist/chunk-5PC6U46L.js +604 -0
  9. package/dist/chunk-5PC6U46L.js.map +1 -0
  10. package/dist/chunk-63VCRTDQ.js +2505 -0
  11. package/dist/chunk-63VCRTDQ.js.map +1 -0
  12. package/dist/chunk-7J3RSIG4.js +178 -0
  13. package/dist/chunk-7J3RSIG4.js.map +1 -0
  14. package/dist/chunk-7QCTRNEJ.js +173 -0
  15. package/dist/chunk-7QCTRNEJ.js.map +1 -0
  16. package/dist/chunk-7TFHUKS7.js +66 -0
  17. package/dist/chunk-7TFHUKS7.js.map +1 -0
  18. package/dist/{chunk-LJIWB7KE.js → chunk-BU5HMHGQ.js} +3 -3
  19. package/dist/chunk-BU5HMHGQ.js.map +1 -0
  20. package/dist/{chunk-GGO5GW72.js → chunk-BZURBNFD.js} +305 -51
  21. package/dist/chunk-BZURBNFD.js.map +1 -0
  22. package/dist/{chunk-XH3LVW7J.js → chunk-FM2RTAHV.js} +5 -65
  23. package/dist/chunk-FM2RTAHV.js.map +1 -0
  24. package/dist/{chunk-OHWWWONS.js → chunk-HC4PBXV4.js} +131 -58
  25. package/dist/chunk-HC4PBXV4.js.map +1 -0
  26. package/dist/{chunk-Y52IEYVM.js → chunk-JPZ6RZJE.js} +78 -45
  27. package/dist/chunk-JPZ6RZJE.js.map +1 -0
  28. package/dist/{chunk-KAZJ43F6.js → chunk-KLN5OTQH.js} +168 -361
  29. package/dist/chunk-KLN5OTQH.js.map +1 -0
  30. package/dist/chunk-LCYBQR35.js +79 -0
  31. package/dist/chunk-LCYBQR35.js.map +1 -0
  32. package/dist/chunk-PJYGRD7N.js +216 -0
  33. package/dist/chunk-PJYGRD7N.js.map +1 -0
  34. package/dist/chunk-QEXY4FZV.js +292 -0
  35. package/dist/chunk-QEXY4FZV.js.map +1 -0
  36. package/dist/chunk-SX4IIE2R.js +53 -0
  37. package/dist/chunk-SX4IIE2R.js.map +1 -0
  38. package/dist/chunk-UCWMSKCW.js +901 -0
  39. package/dist/chunk-UCWMSKCW.js.map +1 -0
  40. package/dist/{chunk-YMQRC6IC.js → chunk-WC6SFBAF.js} +59 -6
  41. package/dist/chunk-WC6SFBAF.js.map +1 -0
  42. package/dist/chunk-WIKU77ZY.js +18 -0
  43. package/dist/chunk-WIKU77ZY.js.map +1 -0
  44. package/dist/chunk-X3AWNFBF.js +47 -0
  45. package/dist/chunk-X3AWNFBF.js.map +1 -0
  46. package/dist/chunk-ZZTQGMLX.js +23 -0
  47. package/dist/chunk-ZZTQGMLX.js.map +1 -0
  48. package/dist/{lib → client}/index.d.ts +97 -345
  49. package/dist/client/index.js +3 -0
  50. package/dist/common-DW_JM2dW.d.ts +454 -0
  51. package/dist/components/index.d.ts +11 -2
  52. package/dist/components/index.js +8 -3
  53. package/dist/{config-CxvpD8Y6.d.ts → config-DB14_LhF.d.ts} +1 -1
  54. package/dist/{do-D27i5bU0.d.ts → do-D37hbmL9.d.ts} +6 -14
  55. package/dist/dotdo-client-2DkwXHM2.d.ts +344 -0
  56. package/dist/errors-BOY11CJs.d.ts +373 -0
  57. package/dist/features/data-browser/index.d.ts +51 -0
  58. package/dist/features/data-browser/index.js +12 -0
  59. package/dist/features/data-browser/index.js.map +1 -0
  60. package/dist/features/data-grid/index.d.ts +22 -0
  61. package/dist/features/data-grid/index.js +12 -0
  62. package/dist/features/data-grid/index.js.map +1 -0
  63. package/dist/features/document-editor/index.d.ts +26 -0
  64. package/dist/features/document-editor/index.js +12 -0
  65. package/dist/features/document-editor/index.js.map +1 -0
  66. package/dist/features/function-editor/index.d.ts +215 -0
  67. package/dist/features/function-editor/index.js +7 -0
  68. package/dist/features/function-editor/index.js.map +1 -0
  69. package/dist/hooks/index.d.ts +64 -7
  70. package/dist/hooks/index.js +8 -7
  71. package/dist/hooks/things/index.d.ts +5 -297
  72. package/dist/hooks/things/index.js +6 -6
  73. package/dist/index-C0m9UI6W.d.ts +444 -0
  74. package/dist/index.d.ts +41 -31
  75. package/dist/index.js +21 -13
  76. package/dist/providers/index.d.ts +16 -28
  77. package/dist/providers/index.js +3 -3
  78. package/dist/schemas/index.d.ts +4551 -109
  79. package/dist/schemas/index.js +2 -260
  80. package/dist/schemas/index.js.map +1 -1
  81. package/dist/shell/index.d.ts +92 -0
  82. package/dist/shell/index.js +6 -0
  83. package/dist/shell/index.js.map +1 -0
  84. package/dist/{thing-BF25aUtJ.d.ts → thing-Dc3AE2XI.d.ts} +22 -22
  85. package/dist/thing-adapters-aMjF0h9u.d.ts +1214 -0
  86. package/dist/types/index.d.ts +954 -7521
  87. package/dist/types/index.js +2 -2
  88. package/dist/ui-filters-BvrjMP_U.d.ts +108 -0
  89. package/dist/{errors-DratdVIz.d.ts → utils/index.d.ts} +38 -77
  90. package/dist/utils/index.js +4 -0
  91. package/dist/utils/index.js.map +1 -0
  92. package/dist-app/assets/index-DWX3479M.js +7 -0
  93. package/dist-app/assets/index-DWX3479M.js.map +1 -0
  94. package/dist-app/assets/main-BptePr_C.js +318 -0
  95. package/dist-app/assets/main-BptePr_C.js.map +1 -0
  96. package/dist-app/assets/main-CS9jgKzj.css +1 -0
  97. package/dist-app/index.html +38 -0
  98. package/package.json +46 -33
  99. package/dist/agents-2_r9e9i7.d.ts +0 -1043
  100. package/dist/capnweb-client-Bq78FtEA.d.ts +0 -229
  101. package/dist/chunk-3XKYQRXY.js +0 -192
  102. package/dist/chunk-3XKYQRXY.js.map +0 -1
  103. package/dist/chunk-4KXVN3EQ.js +0 -56
  104. package/dist/chunk-4KXVN3EQ.js.map +0 -1
  105. package/dist/chunk-GGO5GW72.js.map +0 -1
  106. package/dist/chunk-GYIMQZE7.js +0 -1994
  107. package/dist/chunk-GYIMQZE7.js.map +0 -1
  108. package/dist/chunk-IQ23B4ME.js +0 -944
  109. package/dist/chunk-IQ23B4ME.js.map +0 -1
  110. package/dist/chunk-JJLAES6W.js +0 -76
  111. package/dist/chunk-JJLAES6W.js.map +0 -1
  112. package/dist/chunk-KAZJ43F6.js.map +0 -1
  113. package/dist/chunk-LJIWB7KE.js.map +0 -1
  114. package/dist/chunk-OHWWWONS.js.map +0 -1
  115. package/dist/chunk-VRLUXCLD.js +0 -31
  116. package/dist/chunk-VRLUXCLD.js.map +0 -1
  117. package/dist/chunk-XH3LVW7J.js.map +0 -1
  118. package/dist/chunk-Y52IEYVM.js.map +0 -1
  119. package/dist/chunk-YMQRC6IC.js.map +0 -1
  120. package/dist/lib/index.js +0 -6
  121. package/dist/query-keys-CZNFikIi.d.ts +0 -153
  122. package/dist/views/index.d.ts +0 -131
  123. package/dist/views/index.js +0 -11
  124. /package/dist/{lib → auth}/index.js.map +0 -0
  125. /package/dist/{views → client}/index.js.map +0 -0
@@ -1,944 +0,0 @@
1
- import { DataGridView, DocumentEditorView, FunctionEditorView, DataBrowserView } from './chunk-GYIMQZE7.js';
2
- import { useBreadcrumbs, useNamespaces, useTypes } from './chunk-XH3LVW7J.js';
3
- import { useThings } from './chunk-YMQRC6IC.js';
4
- import { useDO, useEndpoint, DOProvider, useDOState } from './chunk-OHWWWONS.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';
8
- import * as React from 'react';
9
- import { createContext, useMemo, useContext, useState, useEffect } from 'react';
10
- import { useAuth, IdentityProvider, WidgetsProvider } from '@mdxui/auth';
11
- import { ThemeProvider } from 'next-themes';
12
- import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
13
- import { useSidebar, 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';
14
- 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';
15
- import { z } from 'zod';
16
-
17
- var DOConfigContext = createContext(null);
18
- var defaultIdentity = {
19
- clientId: "",
20
- devMode: false,
21
- required: true,
22
- onUnauthenticated: "landing"
23
- };
24
- var defaultConfig = {
25
- basePath: "/",
26
- defaultNamespace: "default",
27
- branding: { name: "DO Admin" },
28
- theme: { mode: "system" },
29
- routes: {},
30
- customRoutes: []
31
- };
32
- function DOConfigProvider({ config, children }) {
33
- const value = useMemo(() => {
34
- const mergedConfig = {
35
- ...defaultConfig,
36
- ...config,
37
- branding: { ...defaultConfig.branding, ...config.branding },
38
- theme: { ...defaultConfig.theme, ...config.theme },
39
- identity: { ...defaultIdentity, ...config.identity }
40
- };
41
- return { config: mergedConfig };
42
- }, [config]);
43
- return /* @__PURE__ */ jsx(DOConfigContext.Provider, { value, children });
44
- }
45
- function useDOConfig() {
46
- const context = useContext(DOConfigContext);
47
- if (!context) {
48
- throw new Error("useDOConfig must be used within a DOConfigProvider");
49
- }
50
- return context;
51
- }
52
- function useDORoutes() {
53
- const { config } = useDOConfig();
54
- return config.routes ?? {};
55
- }
56
- function useDOCustomRoutes() {
57
- const { config } = useDOConfig();
58
- return config.customRoutes ?? [];
59
- }
60
- var useIdentity = useAuth;
61
- function DOIdentityProvider({ children }) {
62
- const { config } = useDOConfig();
63
- const { identity } = config;
64
- const redirectUri = identity.redirectUri ?? (typeof window !== "undefined" ? `${window.location.origin}${config.basePath ?? "/"}` : void 0);
65
- const onRedirectCallback = () => {
66
- if (typeof window !== "undefined") {
67
- const url = new URL(window.location.href);
68
- url.searchParams.delete("code");
69
- url.searchParams.delete("state");
70
- window.history.replaceState({}, "", url.pathname);
71
- }
72
- };
73
- return /* @__PURE__ */ jsx(
74
- IdentityProvider,
75
- {
76
- clientId: identity.clientId,
77
- apiHostname: identity.apiHostname,
78
- devMode: identity.devMode,
79
- redirectUri,
80
- onRedirectCallback,
81
- children: /* @__PURE__ */ jsx(WidgetsProvider, { children })
82
- }
83
- );
84
- }
85
- function DOProviderWithState({
86
- config,
87
- initialNamespace,
88
- children
89
- }) {
90
- const { getAccessToken, user } = useAuth();
91
- const [accessToken, setAccessToken] = useState(void 0);
92
- const endpoint = useEndpoint(config.apiEndpoint);
93
- useEffect(() => {
94
- if (user) {
95
- getAccessToken().then(setAccessToken).catch(() => setAccessToken(void 0));
96
- } else {
97
- setAccessToken(void 0);
98
- }
99
- }, [user, getAccessToken]);
100
- const authenticatedConfig = useMemo(() => {
101
- const authToken = accessToken ?? config.authToken;
102
- return {
103
- ...config,
104
- apiEndpoint: endpoint,
105
- authToken
106
- };
107
- }, [config, accessToken, endpoint]);
108
- return /* @__PURE__ */ jsx(DOProvider, { config: authenticatedConfig, initialNamespace, children });
109
- }
110
- function AppProviders({ config, children }) {
111
- const themeMode = config.theme?.mode ?? "system";
112
- return /* @__PURE__ */ jsx(
113
- ThemeProvider,
114
- {
115
- attribute: "class",
116
- defaultTheme: themeMode,
117
- enableSystem: themeMode === "system",
118
- disableTransitionOnChange: true,
119
- children: /* @__PURE__ */ jsx(DOConfigProvider, { config, children: /* @__PURE__ */ jsx(DOIdentityProvider, { children: /* @__PURE__ */ jsx(
120
- DOProviderWithState,
121
- {
122
- config: config.do,
123
- initialNamespace: config.defaultNamespace,
124
- children
125
- }
126
- ) }) })
127
- }
128
- );
129
- }
130
- function DefaultLandingPage() {
131
- const { signIn } = useAuth();
132
- 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: [
133
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight mb-4", children: "DO Admin" }),
134
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-8", children: "Sign in to access the admin dashboard and manage your Durable Objects." }),
135
- /* @__PURE__ */ jsx(
136
- "button",
137
- {
138
- type: "button",
139
- onClick: () => signIn(),
140
- 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",
141
- children: "Sign In"
142
- }
143
- )
144
- ] }) });
145
- }
146
- function AuthGate({ children }) {
147
- const { config } = useDOConfig();
148
- const { user, isLoading } = useAuth();
149
- const { identity } = config;
150
- const required = identity.required ?? true;
151
- const onUnauthenticated = identity.onUnauthenticated ?? "landing";
152
- if (!required) {
153
- return /* @__PURE__ */ jsx(Fragment, { children });
154
- }
155
- if (isLoading) {
156
- 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: [
157
- /* @__PURE__ */ jsx("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" }),
158
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Loading..." })
159
- ] }) });
160
- }
161
- if (user) {
162
- return /* @__PURE__ */ jsx(Fragment, { children });
163
- }
164
- switch (onUnauthenticated) {
165
- case "redirect":
166
- if (identity.unauthenticatedRedirectUrl && typeof window !== "undefined") {
167
- window.location.href = identity.unauthenticatedRedirectUrl;
168
- 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..." }) });
169
- }
170
- return identity.landingComponent ? /* @__PURE__ */ jsx(Fragment, { children: identity.landingComponent }) : /* @__PURE__ */ jsx(DefaultLandingPage, {});
171
- case "allow":
172
- return /* @__PURE__ */ jsx(Fragment, { children });
173
- case "landing":
174
- default:
175
- return identity.landingComponent ? /* @__PURE__ */ jsx(Fragment, { children: identity.landingComponent }) : /* @__PURE__ */ jsx(DefaultLandingPage, {});
176
- }
177
- }
178
- function getInitials(name) {
179
- if (!name) return "?";
180
- const parts = name.trim().split(/\s+/);
181
- if (parts.length === 1) return parts[0].charAt(0).toUpperCase();
182
- return (parts[0].charAt(0) + parts[parts.length - 1].charAt(0)).toUpperCase();
183
- }
184
- function UserMenu({ compact = false }) {
185
- const { user, signOut, isLoading } = useAuth();
186
- const { isMobile } = useSidebar();
187
- if (isLoading) {
188
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 p-2", children: [
189
- /* @__PURE__ */ jsx("div", { className: "h-8 w-8 animate-pulse rounded-full bg-muted" }),
190
- !compact && /* @__PURE__ */ jsx("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" })
191
- ] });
192
- }
193
- if (!user) {
194
- return null;
195
- }
196
- const displayName = user.firstName ? `${user.firstName}${user.lastName ? ` ${user.lastName}` : ""}` : user.email;
197
- const initials = getInitials(user.firstName ? `${user.firstName} ${user.lastName ?? ""}` : user.email);
198
- return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
199
- /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
200
- SidebarMenuButton,
201
- {
202
- size: "lg",
203
- className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
204
- children: [
205
- /* @__PURE__ */ jsxs(Avatar, { className: "h-8 w-8 rounded-lg", children: [
206
- /* @__PURE__ */ jsx(AvatarImage, { src: user.profilePictureUrl ?? void 0, alt: displayName }),
207
- /* @__PURE__ */ jsx(AvatarFallback, { className: "rounded-lg", children: initials })
208
- ] }),
209
- !compact && /* @__PURE__ */ jsxs("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
210
- /* @__PURE__ */ jsx("span", { className: "truncate font-semibold", children: displayName }),
211
- /* @__PURE__ */ jsx("span", { className: "truncate text-xs text-muted-foreground", children: user.email })
212
- ] }),
213
- /* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-auto size-4" })
214
- ]
215
- }
216
- ) }),
217
- /* @__PURE__ */ jsxs(
218
- DropdownMenuContent,
219
- {
220
- className: "w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded",
221
- side: isMobile ? "bottom" : "right",
222
- align: "end",
223
- sideOffset: 4,
224
- children: [
225
- /* @__PURE__ */ jsx(DropdownMenuLabel, { className: "p-0 font-normal", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-1 py-1.5 text-left text-sm", children: [
226
- /* @__PURE__ */ jsxs(Avatar, { className: "h-8 w-8 rounded-lg", children: [
227
- /* @__PURE__ */ jsx(AvatarImage, { src: user.profilePictureUrl ?? void 0, alt: displayName }),
228
- /* @__PURE__ */ jsx(AvatarFallback, { className: "rounded-lg", children: initials })
229
- ] }),
230
- /* @__PURE__ */ jsxs("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
231
- /* @__PURE__ */ jsx("span", { className: "truncate font-semibold", children: displayName }),
232
- /* @__PURE__ */ jsx("span", { className: "truncate text-xs text-muted-foreground", children: user.email })
233
- ] })
234
- ] }) }),
235
- /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
236
- /* @__PURE__ */ jsxs(DropdownMenuItem, { children: [
237
- /* @__PURE__ */ jsx(User, { className: "mr-2 size-4" }),
238
- "Account"
239
- ] }),
240
- /* @__PURE__ */ jsxs(DropdownMenuItem, { children: [
241
- /* @__PURE__ */ jsx(Settings, { className: "mr-2 size-4" }),
242
- "Settings"
243
- ] }),
244
- /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
245
- /* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => signOut(), children: [
246
- /* @__PURE__ */ jsx(LogOut, { className: "mr-2 size-4" }),
247
- "Sign Out"
248
- ] })
249
- ]
250
- }
251
- )
252
- ] });
253
- }
254
- var navGroups = {
255
- main: [{ title: "Overview", url: "/", icon: Home, routeKey: "overview" }],
256
- development: [
257
- { title: "Agents", url: "/agents", icon: Bot, routeKey: "agents" },
258
- {
259
- title: "Functions",
260
- url: "/functions",
261
- icon: Code,
262
- routeKey: "functions"
263
- },
264
- {
265
- title: "Workflows",
266
- url: "/workflows",
267
- icon: GitBranch,
268
- routeKey: "workflows"
269
- },
270
- {
271
- title: "Databases",
272
- url: "/databases",
273
- icon: Database,
274
- routeKey: "databases"
275
- }
276
- ],
277
- dataModel: [
278
- { title: "Things", url: "/things", icon: Shapes, routeKey: "things" },
279
- { title: "Nouns", url: "/nouns", icon: BookOpen, routeKey: "nouns" },
280
- { title: "Verbs", url: "/verbs", icon: Zap, routeKey: "verbs" },
281
- { title: "Actions", url: "/actions", icon: Play, routeKey: "actions" },
282
- {
283
- title: "Relationships",
284
- url: "/relationships",
285
- icon: Network,
286
- routeKey: "relationships"
287
- },
288
- { title: "Events", url: "/events", icon: Activity, routeKey: "events" }
289
- ],
290
- saas: [
291
- {
292
- title: "Customers",
293
- url: "/customers",
294
- icon: Users,
295
- routeKey: "customers"
296
- },
297
- {
298
- title: "Subscriptions",
299
- url: "/subscriptions",
300
- icon: CreditCard,
301
- routeKey: "subscriptions"
302
- },
303
- {
304
- title: "Integrations",
305
- url: "/integrations",
306
- icon: Plug,
307
- routeKey: "integrations"
308
- }
309
- ],
310
- admin: [
311
- { title: "Organizations", url: "/orgs", icon: Building, routeKey: "orgs" },
312
- { title: "Roles", url: "/roles", icon: Shield, routeKey: "roles" },
313
- { title: "Users", url: "/users", icon: UserCog, routeKey: "users" },
314
- { title: "API Keys", url: "/api-keys", icon: Key, routeKey: "apiKeys" },
315
- {
316
- title: "Settings",
317
- url: "/settings",
318
- icon: Settings,
319
- routeKey: "settings"
320
- }
321
- ]
322
- };
323
- function DOShellNav({ headerContent, ...props }) {
324
- const routerState = useRouterState();
325
- const { config } = useDOConfig();
326
- const routesConfig = useDORoutes();
327
- const branding = config.branding;
328
- const pathname = routerState.location.pathname;
329
- const isActive = (url) => {
330
- if (url === "/") {
331
- return pathname === "/" || pathname === "";
332
- }
333
- return pathname.startsWith(url);
334
- };
335
- const isRouteEnabled = (routeKey) => {
336
- if (!routeKey) return true;
337
- if (routesConfig[routeKey] === false) return false;
338
- return true;
339
- };
340
- const filterNavItems = (items) => {
341
- return items.filter((item) => isRouteEnabled(item.routeKey));
342
- };
343
- return /* @__PURE__ */ jsxs(Sidebar, { variant: "inset", ...props, children: [
344
- /* @__PURE__ */ jsxs(SidebarHeader, { children: [
345
- /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, { size: "lg", asChild: true, children: /* @__PURE__ */ jsxs(Link, { to: "/", children: [
346
- /* @__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" }) }),
347
- /* @__PURE__ */ jsxs("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
348
- /* @__PURE__ */ jsx("span", { className: "truncate font-medium", children: branding?.name ?? "DO Admin" }),
349
- /* @__PURE__ */ jsx("span", { className: "truncate text-xs", children: "Dashboard" })
350
- ] })
351
- ] }) }) }) }),
352
- headerContent
353
- ] }),
354
- /* @__PURE__ */ jsxs(SidebarContent, { children: [
355
- /* @__PURE__ */ jsx(SidebarGroup, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.main).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
356
- SidebarMenuButton,
357
- {
358
- asChild: true,
359
- isActive: isActive(item.url),
360
- tooltip: item.title,
361
- children: /* @__PURE__ */ jsxs(Link, { to: item.url, children: [
362
- /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
363
- /* @__PURE__ */ jsx("span", { children: item.title })
364
- ] })
365
- }
366
- ) }, item.title)) }) }),
367
- filterNavItems(navGroups.development).length > 0 && /* @__PURE__ */ jsxs(SidebarGroup, { children: [
368
- /* @__PURE__ */ jsx(SidebarGroupLabel, { children: "Development" }),
369
- /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.development).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
370
- SidebarMenuButton,
371
- {
372
- asChild: true,
373
- isActive: isActive(item.url),
374
- tooltip: item.title,
375
- children: /* @__PURE__ */ jsxs(Link, { to: item.url, children: [
376
- /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
377
- /* @__PURE__ */ jsx("span", { children: item.title })
378
- ] })
379
- }
380
- ) }, item.title)) })
381
- ] }),
382
- filterNavItems(navGroups.dataModel).length > 0 && /* @__PURE__ */ jsxs(SidebarGroup, { children: [
383
- /* @__PURE__ */ jsx(SidebarGroupLabel, { children: "Data Model" }),
384
- /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.dataModel).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
385
- SidebarMenuButton,
386
- {
387
- asChild: true,
388
- isActive: isActive(item.url),
389
- tooltip: item.title,
390
- children: /* @__PURE__ */ jsxs(Link, { to: item.url, children: [
391
- /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
392
- /* @__PURE__ */ jsx("span", { children: item.title })
393
- ] })
394
- }
395
- ) }, item.title)) })
396
- ] }),
397
- filterNavItems(navGroups.saas).length > 0 && /* @__PURE__ */ jsxs(SidebarGroup, { children: [
398
- /* @__PURE__ */ jsx(SidebarGroupLabel, { children: "SaaS" }),
399
- /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.saas).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
400
- SidebarMenuButton,
401
- {
402
- asChild: true,
403
- isActive: isActive(item.url),
404
- tooltip: item.title,
405
- children: /* @__PURE__ */ jsxs(Link, { to: item.url, children: [
406
- /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
407
- /* @__PURE__ */ jsx("span", { children: item.title })
408
- ] })
409
- }
410
- ) }, item.title)) })
411
- ] }),
412
- filterNavItems(navGroups.admin).length > 0 && /* @__PURE__ */ jsxs(SidebarGroup, { children: [
413
- /* @__PURE__ */ jsx(SidebarGroupLabel, { children: "Admin" }),
414
- /* @__PURE__ */ jsx(SidebarMenu, { children: filterNavItems(navGroups.admin).map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
415
- SidebarMenuButton,
416
- {
417
- asChild: true,
418
- isActive: isActive(item.url),
419
- tooltip: item.title,
420
- children: /* @__PURE__ */ jsxs(Link, { to: item.url, children: [
421
- /* @__PURE__ */ jsx(item.icon, { className: "size-4" }),
422
- /* @__PURE__ */ jsx("span", { children: item.title })
423
- ] })
424
- }
425
- ) }, item.title)) })
426
- ] })
427
- ] }),
428
- /* @__PURE__ */ jsx(SidebarFooter, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(UserMenu, {}) }) }) })
429
- ] });
430
- }
431
- function RouterLink({ href, children, className }) {
432
- return /* @__PURE__ */ jsx(Link, { to: href, className, children });
433
- }
434
- function DOShell({
435
- children,
436
- sidebarHeaderContent,
437
- headerContent,
438
- breadcrumbs: breadcrumbsProp
439
- }) {
440
- const autoBreadcrumbs = useBreadcrumbs();
441
- const breadcrumbs = breadcrumbsProp ?? autoBreadcrumbs;
442
- return /* @__PURE__ */ jsx(AuthGate, { children: /* @__PURE__ */ jsxs(SidebarProvider, { className: "h-svh!", children: [
443
- /* @__PURE__ */ jsx(DOShellNav, { headerContent: sidebarHeaderContent }),
444
- /* @__PURE__ */ jsxs(SidebarInset, { className: "overflow-hidden", children: [
445
- /* @__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: [
446
- /* @__PURE__ */ jsxs("div", { className: "z-10 flex shrink-0 items-center gap-2 bg-background px-4", children: [
447
- /* @__PURE__ */ jsx(SidebarTrigger, { className: "-ml-1" }),
448
- /* @__PURE__ */ jsx(Separator, { orientation: "vertical", className: "mr-2 h-4" }),
449
- breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Breadcrumbs, { items: breadcrumbs, LinkComponent: RouterLink })
450
- ] }),
451
- 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 }) })
452
- ] }),
453
- /* @__PURE__ */ jsx("main", { className: "flex-1 overflow-auto", children })
454
- ] }),
455
- /* @__PURE__ */ jsx(Toaster, { closeButton: true, position: "top-right" })
456
- ] }) });
457
- }
458
- function DatabasesPage() {
459
- const params = useParams({ strict: false });
460
- const ns = params.ns;
461
- const type = params.type;
462
- return /* @__PURE__ */ jsx(
463
- DataGridView,
464
- {
465
- initialNamespace: ns,
466
- initialType: type,
467
- className: "h-full"
468
- }
469
- );
470
- }
471
- function DocumentPage() {
472
- const params = useParams({ strict: false });
473
- const ns = params.ns;
474
- const type = params.type;
475
- const id = params.id;
476
- const navigate = useNavigate();
477
- const handleBack = () => {
478
- navigate({ to: `/things/${ns}/${type}` });
479
- };
480
- const handleDelete = () => {
481
- navigate({ to: `/things/${ns}/${type}` });
482
- };
483
- return /* @__PURE__ */ jsx(
484
- DocumentEditorView,
485
- {
486
- initialNamespace: ns,
487
- initialType: type,
488
- initialId: id,
489
- onBack: handleBack,
490
- onDelete: handleDelete,
491
- className: "h-full"
492
- }
493
- );
494
- }
495
- function FunctionsPage() {
496
- return /* @__PURE__ */ jsx(FunctionEditorView, { className: "h-full" });
497
- }
498
- function StatCard({ title, value, description, icon: Icon, href }) {
499
- const content = /* @__PURE__ */ jsxs(Card, { className: "hover:bg-muted/50 transition-colors", children: [
500
- /* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
501
- /* @__PURE__ */ jsx(CardTitle, { className: "text-sm font-medium", children: title }),
502
- /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4 text-muted-foreground" })
503
- ] }),
504
- /* @__PURE__ */ jsxs(CardContent, { children: [
505
- /* @__PURE__ */ jsx("div", { className: "text-2xl font-bold", children: value }),
506
- description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: description })
507
- ] })
508
- ] });
509
- if (href) {
510
- return /* @__PURE__ */ jsx(Link, { to: href, className: "block", children: content });
511
- }
512
- return content;
513
- }
514
- function QuickAction({ title, description, icon: Icon, href }) {
515
- return /* @__PURE__ */ jsxs(
516
- Link,
517
- {
518
- to: href,
519
- className: "flex items-center gap-4 rounded-(--radius) border p-4 hover:bg-muted/50 transition-colors",
520
- children: [
521
- /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-(--radius) bg-primary/10", children: /* @__PURE__ */ jsx(Icon, { className: "h-5 w-5 text-primary" }) }),
522
- /* @__PURE__ */ jsxs("div", { children: [
523
- /* @__PURE__ */ jsx("h3", { className: "font-medium", children: title }),
524
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description })
525
- ] })
526
- ]
527
- }
528
- );
529
- }
530
- function OverviewPage() {
531
- const { namespace, isConnected } = useDO();
532
- const { data: namespaces } = useNamespaces();
533
- const { data: types } = useTypes({ ns: namespace });
534
- const { data: thingsResult } = useThings({ ns: namespace, limit: 1 });
535
- const namespaceCount = namespaces?.length ?? 0;
536
- const typeCount = types?.length ?? 0;
537
- const thingCount = thingsResult?.total ?? 0;
538
- return /* @__PURE__ */ jsxs("div", { className: "space-y-8", children: [
539
- /* @__PURE__ */ jsxs("div", { children: [
540
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Dashboard" }),
541
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Welcome to DO Admin. Manage your Durable Objects and data." })
542
- ] }),
543
- !isConnected && /* @__PURE__ */ jsx(Card, { className: "border-destructive", children: /* @__PURE__ */ jsxs(CardHeader, { children: [
544
- /* @__PURE__ */ jsx(CardTitle, { className: "text-destructive", children: "Connection Error" }),
545
- /* @__PURE__ */ jsx(CardDescription, { children: "Unable to connect to the backend. Please check your configuration." })
546
- ] }) }),
547
- /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4", children: [
548
- /* @__PURE__ */ jsx(
549
- StatCard,
550
- {
551
- title: "Namespaces",
552
- value: namespaceCount,
553
- description: "Active namespaces",
554
- icon: Database,
555
- href: "/databases"
556
- }
557
- ),
558
- /* @__PURE__ */ jsx(
559
- StatCard,
560
- {
561
- title: "Types",
562
- value: typeCount,
563
- description: "Defined types",
564
- icon: Shapes,
565
- href: "/things"
566
- }
567
- ),
568
- /* @__PURE__ */ jsx(
569
- StatCard,
570
- {
571
- title: "Things",
572
- value: thingCount,
573
- description: "Total records",
574
- icon: Activity,
575
- href: "/things"
576
- }
577
- ),
578
- /* @__PURE__ */ jsx(
579
- StatCard,
580
- {
581
- title: "Namespace",
582
- value: namespace,
583
- description: "Currently selected",
584
- icon: Network
585
- }
586
- )
587
- ] }),
588
- /* @__PURE__ */ jsxs("div", { children: [
589
- /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold mb-4", children: "Quick Actions" }),
590
- /* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3", children: [
591
- /* @__PURE__ */ jsx(
592
- QuickAction,
593
- {
594
- title: "Browse Things",
595
- description: "View and manage all your Things",
596
- icon: Shapes,
597
- href: "/things"
598
- }
599
- ),
600
- /* @__PURE__ */ jsx(
601
- QuickAction,
602
- {
603
- title: "Query Database",
604
- description: "Run queries on your data",
605
- icon: Database,
606
- href: "/databases"
607
- }
608
- ),
609
- /* @__PURE__ */ jsx(
610
- QuickAction,
611
- {
612
- title: "Run Functions",
613
- description: "Execute code against your DO",
614
- icon: Code,
615
- href: "/functions"
616
- }
617
- ),
618
- /* @__PURE__ */ jsx(
619
- QuickAction,
620
- {
621
- title: "Manage Customers",
622
- description: "View and manage customers",
623
- icon: Users,
624
- href: "/customers"
625
- }
626
- ),
627
- /* @__PURE__ */ jsx(
628
- QuickAction,
629
- {
630
- title: "View Subscriptions",
631
- description: "Manage billing and subscriptions",
632
- icon: CreditCard,
633
- href: "/subscriptions"
634
- }
635
- ),
636
- /* @__PURE__ */ jsx(
637
- QuickAction,
638
- {
639
- title: "Organizations",
640
- description: "Manage organizations and teams",
641
- icon: Building,
642
- href: "/orgs"
643
- }
644
- )
645
- ] })
646
- ] }),
647
- /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardHeader, { children: [
648
- /* @__PURE__ */ jsxs(CardTitle, { children: [
649
- "Current Namespace: ",
650
- namespace
651
- ] }),
652
- /* @__PURE__ */ jsxs(CardDescription, { children: [
653
- 'You are currently working in the "',
654
- namespace,
655
- '" namespace. Switch namespaces from the Things or Databases view.'
656
- ] })
657
- ] }) })
658
- ] });
659
- }
660
- function PlaceholderPage({ title, description }) {
661
- return /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center p-4", children: /* @__PURE__ */ jsxs(Card, { className: "max-w-md", children: [
662
- /* @__PURE__ */ jsxs(CardHeader, { className: "text-center", children: [
663
- /* @__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" }) }),
664
- /* @__PURE__ */ jsx(CardTitle, { children: title }),
665
- /* @__PURE__ */ jsx(CardDescription, { children: description ?? "This feature is coming soon." })
666
- ] }),
667
- /* @__PURE__ */ jsxs(CardContent, { className: "text-center text-sm text-muted-foreground", children: [
668
- /* @__PURE__ */ jsx("p", { children: "We're working hard to bring you this functionality." }),
669
- /* @__PURE__ */ jsx("p", { children: "Check back soon for updates." })
670
- ] })
671
- ] }) });
672
- }
673
- function ThingsPage() {
674
- const params = useParams({ strict: false });
675
- const ns = params.ns;
676
- const type = params.type;
677
- const navigate = useNavigate();
678
- const handleOpen = (thing) => {
679
- navigate({ to: `/things/${thing.ns}/${thing.type}/${thing.id}` });
680
- };
681
- return /* @__PURE__ */ jsx(
682
- DataBrowserView,
683
- {
684
- initialNamespace: ns,
685
- initialType: type,
686
- onOpen: handleOpen,
687
- className: "h-full"
688
- }
689
- );
690
- }
691
- function TypedThingsPage({ type }) {
692
- const navigate = useNavigate();
693
- const handleOpen = (thing) => {
694
- navigate({ to: `/things/${thing.ns}/${thing.type}/${thing.id}` });
695
- };
696
- return /* @__PURE__ */ jsx(
697
- DataBrowserView,
698
- {
699
- initialType: type,
700
- onOpen: handleOpen,
701
- className: "h-full"
702
- }
703
- );
704
- }
705
- function NounsPage() {
706
- return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Noun" });
707
- }
708
- function VerbsPage() {
709
- return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Verb" });
710
- }
711
- function ActionsPage() {
712
- return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Action" });
713
- }
714
- function RelationshipsPage() {
715
- return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Relationship" });
716
- }
717
- function EventsPage() {
718
- return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Event" });
719
- }
720
- function CustomersPage() {
721
- return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Customer" });
722
- }
723
- function SubscriptionsPage() {
724
- return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Subscription" });
725
- }
726
- function OrgsPage() {
727
- return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Org" });
728
- }
729
- function RolesPage() {
730
- return /* @__PURE__ */ jsx(TypedThingsPage, { type: "Role" });
731
- }
732
- function UsersPage() {
733
- return /* @__PURE__ */ jsx(TypedThingsPage, { type: "User" });
734
- }
735
- function APIKeysPage() {
736
- return /* @__PURE__ */ jsx(TypedThingsPage, { type: "APIKey" });
737
- }
738
- var doRoutes = {
739
- // Main
740
- overview: {
741
- path: "/",
742
- component: OverviewPage
743
- },
744
- // Development
745
- agents: {
746
- path: "/agents",
747
- component: () => /* @__PURE__ */ jsx(PlaceholderPage, { title: "Agents", description: "Autonomous AI workers" })
748
- },
749
- functions: {
750
- path: "/functions",
751
- component: FunctionsPage
752
- },
753
- workflows: {
754
- path: "/workflows",
755
- component: FunctionsPage
756
- // Uses FunctionEditorView for now
757
- },
758
- databases: {
759
- path: "/databases",
760
- component: DatabasesPage
761
- },
762
- databasesWithParams: {
763
- path: "/databases/:ns/:type",
764
- component: DatabasesPage
765
- },
766
- // Data Model
767
- things: {
768
- path: "/things",
769
- component: ThingsPage
770
- },
771
- thingsWithNs: {
772
- path: "/things/:ns",
773
- component: ThingsPage
774
- },
775
- thingsWithType: {
776
- path: "/things/:ns/:type",
777
- component: ThingsPage
778
- },
779
- document: {
780
- path: "/things/:ns/:type/:id",
781
- component: DocumentPage
782
- },
783
- nouns: {
784
- path: "/nouns",
785
- component: NounsPage
786
- },
787
- verbs: {
788
- path: "/verbs",
789
- component: VerbsPage
790
- },
791
- actions: {
792
- path: "/actions",
793
- component: ActionsPage
794
- },
795
- relationships: {
796
- path: "/relationships",
797
- component: RelationshipsPage
798
- },
799
- events: {
800
- path: "/events",
801
- component: EventsPage
802
- },
803
- // SaaS
804
- customers: {
805
- path: "/customers",
806
- component: CustomersPage
807
- },
808
- subscriptions: {
809
- path: "/subscriptions",
810
- component: SubscriptionsPage
811
- },
812
- integrations: {
813
- path: "/integrations",
814
- component: () => /* @__PURE__ */ jsx(
815
- PlaceholderPage,
816
- {
817
- title: "Integrations",
818
- description: "External service connections"
819
- }
820
- )
821
- },
822
- // Admin
823
- orgs: {
824
- path: "/orgs",
825
- component: OrgsPage
826
- },
827
- roles: {
828
- path: "/roles",
829
- component: RolesPage
830
- },
831
- users: {
832
- path: "/users",
833
- component: UsersPage
834
- },
835
- apiKeys: {
836
- path: "/api-keys",
837
- component: APIKeysPage
838
- },
839
- settings: {
840
- path: "/settings",
841
- component: () => /* @__PURE__ */ jsx(PlaceholderPage, { title: "Settings", description: "Application settings" })
842
- }
843
- };
844
- function DefaultHeaderContent() {
845
- const { config } = useDOConfig();
846
- const { endpoint, setEndpoint, recentEndpoints } = useDOState({
847
- endpoint: config.do.apiEndpoint
848
- });
849
- return /* @__PURE__ */ jsx(
850
- EndpointSelector,
851
- {
852
- endpoint,
853
- onEndpointChange: setEndpoint,
854
- recentEndpoints,
855
- className: "w-full max-w-md"
856
- }
857
- );
858
- }
859
- function createShellComponent(headerContent, sidebarHeaderContent) {
860
- return function ShellLayout() {
861
- return /* @__PURE__ */ jsx(
862
- DOShell,
863
- {
864
- headerContent: headerContent ?? /* @__PURE__ */ jsx(DefaultHeaderContent, {}),
865
- sidebarHeaderContent,
866
- children: /* @__PURE__ */ jsx(WebOutlet, {})
867
- }
868
- );
869
- };
870
- }
871
- function DOApp({
872
- config,
873
- headerContent,
874
- sidebarHeaderContent
875
- }) {
876
- const basePath = config.basePath ?? "";
877
- const router = React.useMemo(() => {
878
- const ShellComponent = createShellComponent(
879
- headerContent,
880
- sidebarHeaderContent
881
- );
882
- return createWebRouter(doRoutes, {
883
- rootComponent: ShellComponent,
884
- basepath: basePath || void 0
885
- });
886
- }, [basePath, headerContent, sidebarHeaderContent]);
887
- return /* @__PURE__ */ jsx(AppProviders, { config, children: /* @__PURE__ */ jsx(
888
- RouterProvider,
889
- {
890
- router
891
- }
892
- ) });
893
- }
894
- var DatabaseRouteParams = z.object({
895
- ns: z.string().optional(),
896
- type: z.string().optional()
897
- });
898
- var ThingsRouteParams = z.object({
899
- ns: z.string().optional(),
900
- type: z.string().optional()
901
- });
902
- var DocumentRouteParams = z.object({
903
- ns: z.string(),
904
- type: z.string(),
905
- id: z.string()
906
- });
907
- var TypeFilteredRouteParams = z.object({
908
- type: z.string().optional()
909
- });
910
-
911
- // src/app/routes.ts
912
- var doRoutePaths = {
913
- // Main
914
- overview: "/",
915
- // Development
916
- agents: "/agents",
917
- functions: "/functions",
918
- workflows: "/workflows",
919
- databases: "/databases",
920
- databaseTable: "/databases/:ns/:type",
921
- // Data Model
922
- things: "/things",
923
- thingsBrowse: "/things/:ns/:type?",
924
- document: "/things/:ns/:type/:id",
925
- nouns: "/nouns",
926
- verbs: "/verbs",
927
- actions: "/actions",
928
- relationships: "/relationships",
929
- events: "/events",
930
- // SaaS
931
- customers: "/customers",
932
- subscriptions: "/subscriptions",
933
- integrations: "/integrations",
934
- // Admin
935
- orgs: "/orgs",
936
- roles: "/roles",
937
- users: "/users",
938
- apiKeys: "/api-keys",
939
- settings: "/settings"
940
- };
941
-
942
- export { AppProviders, AuthGate, DOApp, DOConfigProvider, DOIdentityProvider, DOShell, DOShellNav, DatabaseRouteParams, DatabasesPage, DocumentPage, DocumentRouteParams, FunctionsPage, OverviewPage, PlaceholderPage, ThingsPage, ThingsRouteParams, TypeFilteredRouteParams, UserMenu, doRoutePaths, useDOConfig, useDOCustomRoutes, useDORoutes, useIdentity };
943
- //# sourceMappingURL=chunk-IQ23B4ME.js.map
944
- //# sourceMappingURL=chunk-IQ23B4ME.js.map