@mdxui/do 4.0.0 → 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.
- package/dist/app/index.d.ts +32 -186
- package/dist/app/index.js +19 -11
- package/dist/auth/index.d.ts +48 -0
- package/dist/auth/index.js +4 -0
- package/dist/{breadcrumbs-C9Qn3S7d.d.ts → breadcrumbs-DltlCiHt.d.ts} +3 -3
- package/dist/chunk-2FWXT4HH.js +576 -0
- package/dist/chunk-2FWXT4HH.js.map +1 -0
- package/dist/chunk-5PC6U46L.js +604 -0
- package/dist/chunk-5PC6U46L.js.map +1 -0
- package/dist/chunk-63VCRTDQ.js +2505 -0
- package/dist/chunk-63VCRTDQ.js.map +1 -0
- package/dist/chunk-7J3RSIG4.js +178 -0
- package/dist/chunk-7J3RSIG4.js.map +1 -0
- package/dist/chunk-7QCTRNEJ.js +173 -0
- package/dist/chunk-7QCTRNEJ.js.map +1 -0
- package/dist/chunk-7TFHUKS7.js +66 -0
- package/dist/chunk-7TFHUKS7.js.map +1 -0
- package/dist/{chunk-LJIWB7KE.js → chunk-BU5HMHGQ.js} +3 -3
- package/dist/chunk-BU5HMHGQ.js.map +1 -0
- package/dist/{chunk-GGO5GW72.js → chunk-BZURBNFD.js} +305 -51
- package/dist/chunk-BZURBNFD.js.map +1 -0
- package/dist/{chunk-NA652ART.js → chunk-FM2RTAHV.js} +5 -65
- package/dist/chunk-FM2RTAHV.js.map +1 -0
- package/dist/{chunk-WMNT4OIE.js → chunk-HC4PBXV4.js} +131 -58
- package/dist/chunk-HC4PBXV4.js.map +1 -0
- package/dist/{chunk-Y52IEYVM.js → chunk-JPZ6RZJE.js} +78 -45
- package/dist/chunk-JPZ6RZJE.js.map +1 -0
- package/dist/{chunk-OVLO7UOH.js → chunk-KLN5OTQH.js} +168 -361
- package/dist/chunk-KLN5OTQH.js.map +1 -0
- package/dist/chunk-LCYBQR35.js +79 -0
- package/dist/chunk-LCYBQR35.js.map +1 -0
- package/dist/chunk-PJYGRD7N.js +216 -0
- package/dist/chunk-PJYGRD7N.js.map +1 -0
- package/dist/chunk-QEXY4FZV.js +292 -0
- package/dist/chunk-QEXY4FZV.js.map +1 -0
- package/dist/chunk-SX4IIE2R.js +53 -0
- package/dist/chunk-SX4IIE2R.js.map +1 -0
- package/dist/chunk-UCWMSKCW.js +901 -0
- package/dist/chunk-UCWMSKCW.js.map +1 -0
- package/dist/{chunk-5SHZZC7L.js → chunk-WC6SFBAF.js} +59 -6
- package/dist/chunk-WC6SFBAF.js.map +1 -0
- package/dist/chunk-WIKU77ZY.js +18 -0
- package/dist/chunk-WIKU77ZY.js.map +1 -0
- package/dist/chunk-X3AWNFBF.js +47 -0
- package/dist/chunk-X3AWNFBF.js.map +1 -0
- package/dist/chunk-ZZTQGMLX.js +23 -0
- package/dist/chunk-ZZTQGMLX.js.map +1 -0
- package/dist/{lib → client}/index.d.ts +97 -345
- package/dist/client/index.js +3 -0
- package/dist/common-DW_JM2dW.d.ts +454 -0
- package/dist/components/index.d.ts +11 -2
- package/dist/components/index.js +8 -3
- package/dist/{config-CxvpD8Y6.d.ts → config-DB14_LhF.d.ts} +1 -1
- package/dist/{do-D27i5bU0.d.ts → do-D37hbmL9.d.ts} +6 -14
- package/dist/dotdo-client-2DkwXHM2.d.ts +344 -0
- package/dist/errors-BOY11CJs.d.ts +373 -0
- package/dist/features/data-browser/index.d.ts +51 -0
- package/dist/features/data-browser/index.js +12 -0
- package/dist/features/data-browser/index.js.map +1 -0
- package/dist/features/data-grid/index.d.ts +22 -0
- package/dist/features/data-grid/index.js +12 -0
- package/dist/features/data-grid/index.js.map +1 -0
- package/dist/features/document-editor/index.d.ts +26 -0
- package/dist/features/document-editor/index.js +12 -0
- package/dist/features/document-editor/index.js.map +1 -0
- package/dist/features/function-editor/index.d.ts +215 -0
- package/dist/features/function-editor/index.js +7 -0
- package/dist/features/function-editor/index.js.map +1 -0
- package/dist/hooks/index.d.ts +64 -7
- package/dist/hooks/index.js +8 -7
- package/dist/hooks/things/index.d.ts +5 -297
- package/dist/hooks/things/index.js +6 -6
- package/dist/index-C0m9UI6W.d.ts +444 -0
- package/dist/index.d.ts +42 -32
- package/dist/index.js +21 -13
- package/dist/providers/index.d.ts +16 -28
- package/dist/providers/index.js +3 -3
- package/dist/schemas/index.d.ts +4551 -109
- package/dist/schemas/index.js +2 -260
- package/dist/schemas/index.js.map +1 -1
- package/dist/shell/index.d.ts +92 -0
- package/dist/shell/index.js +6 -0
- package/dist/shell/index.js.map +1 -0
- package/dist/{thing-BF25aUtJ.d.ts → thing-Dc3AE2XI.d.ts} +22 -22
- package/dist/thing-adapters-aMjF0h9u.d.ts +1214 -0
- package/dist/types/index.d.ts +954 -7521
- package/dist/types/index.js +2 -2
- package/dist/ui-filters-BvrjMP_U.d.ts +108 -0
- package/dist/{errors-DratdVIz.d.ts → utils/index.d.ts} +38 -77
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.js.map +1 -0
- package/dist-app/assets/index-DWX3479M.js +7 -0
- package/dist-app/assets/index-DWX3479M.js.map +1 -0
- package/dist-app/assets/main-BptePr_C.js +318 -0
- package/dist-app/assets/main-BptePr_C.js.map +1 -0
- package/dist-app/assets/main-CS9jgKzj.css +1 -0
- package/dist-app/index.html +38 -0
- package/package.json +32 -19
- package/dist/agents-2_r9e9i7.d.ts +0 -1043
- package/dist/capnweb-client-Bq78FtEA.d.ts +0 -229
- package/dist/chunk-3XKYQRXY.js +0 -192
- package/dist/chunk-3XKYQRXY.js.map +0 -1
- package/dist/chunk-4KXVN3EQ.js +0 -56
- package/dist/chunk-4KXVN3EQ.js.map +0 -1
- package/dist/chunk-5SHZZC7L.js.map +0 -1
- package/dist/chunk-7UFINK3Q.js +0 -1994
- package/dist/chunk-7UFINK3Q.js.map +0 -1
- package/dist/chunk-GGO5GW72.js.map +0 -1
- package/dist/chunk-JJLAES6W.js +0 -76
- package/dist/chunk-JJLAES6W.js.map +0 -1
- package/dist/chunk-KT52UU3U.js +0 -985
- package/dist/chunk-KT52UU3U.js.map +0 -1
- package/dist/chunk-LJIWB7KE.js.map +0 -1
- package/dist/chunk-NA652ART.js.map +0 -1
- package/dist/chunk-OVLO7UOH.js.map +0 -1
- package/dist/chunk-VRLUXCLD.js +0 -31
- package/dist/chunk-VRLUXCLD.js.map +0 -1
- package/dist/chunk-WMNT4OIE.js.map +0 -1
- package/dist/chunk-Y52IEYVM.js.map +0 -1
- package/dist/lib/index.js +0 -6
- package/dist/query-keys-CZNFikIi.d.ts +0 -153
- package/dist/views/index.d.ts +0 -131
- package/dist/views/index.js +0 -11
- /package/dist/{lib → auth}/index.js.map +0 -0
- /package/dist/{views → client}/index.js.map +0 -0
package/dist/app/index.d.ts
CHANGED
|
@@ -1,51 +1,18 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { d as DOShellConfig
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export { DOClient, DOContextValue, DOProvider, DOProviderProps, useDO, useDOClient, useDOUrls, useDataProviderSafe, useSyncStatus } from '../providers/index.js';
|
|
4
|
+
import { d as DOShellConfig } from '../config-DB14_LhF.js';
|
|
5
|
+
export { DOConfigContextValue, DOConfigProvider, DOShell, DOShellNav, DOShellNavProps, DOShellProps, useDOConfig, useDOCustomRoutes, useDORoutes } from '../shell/index.js';
|
|
6
|
+
export { AuthGate, AuthGateProps, DOIdentityProvider, DOIdentityProviderProps, UserMenu, useIdentity } from '../auth/index.js';
|
|
7
|
+
export { DOClient, DOContextValue, DOProvider, DOProviderProps, useDO, useDOClient, useDOUrls, useDataProviderSafe } from '../providers/index.js';
|
|
9
8
|
export { useQueryClient } from '@tanstack/react-query';
|
|
10
9
|
import { z } from 'zod';
|
|
11
|
-
import '../do-
|
|
10
|
+
import '../do-D37hbmL9.js';
|
|
11
|
+
import '../breadcrumbs-DltlCiHt.js';
|
|
12
|
+
import '@mdxui/primitives';
|
|
13
|
+
import '@mdxui/auth';
|
|
12
14
|
import '@mdxui/app';
|
|
13
|
-
import '../
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* DatabasesPage - Renders DataGridView with route params
|
|
17
|
-
*
|
|
18
|
-
* Route: /databases/:ns?/:type?
|
|
19
|
-
*/
|
|
20
|
-
declare function DatabasesPage(): react_jsx_runtime.JSX.Element;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* DocumentPage - Renders DocumentEditorView with route params
|
|
24
|
-
*
|
|
25
|
-
* Route: /things/$ns/$type/$id
|
|
26
|
-
*/
|
|
27
|
-
declare function DocumentPage(): react_jsx_runtime.JSX.Element;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* FunctionsPage - Renders FunctionEditorView
|
|
31
|
-
*
|
|
32
|
-
* Route: /functions
|
|
33
|
-
*/
|
|
34
|
-
declare function FunctionsPage(): react_jsx_runtime.JSX.Element;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* OverviewPage - Main dashboard landing page
|
|
38
|
-
*
|
|
39
|
-
* Shows stats, quick actions, and recent activity.
|
|
40
|
-
*/
|
|
41
|
-
declare function OverviewPage(): react_jsx_runtime.JSX.Element;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* ThingsPage - Renders DataBrowserView with route params
|
|
45
|
-
*
|
|
46
|
-
* Route: /things/$ns?/$type?
|
|
47
|
-
*/
|
|
48
|
-
declare function ThingsPage(): react_jsx_runtime.JSX.Element;
|
|
15
|
+
import '../dotdo-client-2DkwXHM2.js';
|
|
49
16
|
|
|
50
17
|
interface DOAppProps {
|
|
51
18
|
/** Shell configuration */
|
|
@@ -57,180 +24,52 @@ interface DOAppProps {
|
|
|
57
24
|
}
|
|
58
25
|
/**
|
|
59
26
|
* DOApp - Complete routed DO Admin Dashboard application with authentication
|
|
60
|
-
*
|
|
61
|
-
* This is the main entry point for using DO Admin with WorkOS authentication and routing.
|
|
62
|
-
* It sets up all necessary providers, routing, and the shell.
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* ```tsx
|
|
66
|
-
* import { DOApp } from '@mdxui/do'
|
|
67
|
-
*
|
|
68
|
-
* function App() {
|
|
69
|
-
* return (
|
|
70
|
-
* <DOApp
|
|
71
|
-
* config={{
|
|
72
|
-
* do: {
|
|
73
|
-
* apiEndpoint: 'https://api.do.ai',
|
|
74
|
-
* authMethod: 'jwt',
|
|
75
|
-
* bindings: [],
|
|
76
|
-
* realTimeUpdates: true,
|
|
77
|
-
* },
|
|
78
|
-
* identity: {
|
|
79
|
-
* clientId: 'client_xxx',
|
|
80
|
-
* devMode: true,
|
|
81
|
-
* },
|
|
82
|
-
* branding: {
|
|
83
|
-
* name: 'My DO Admin',
|
|
84
|
-
* },
|
|
85
|
-
* defaultNamespace: 'production',
|
|
86
|
-
* }}
|
|
87
|
-
* />
|
|
88
|
-
* )
|
|
89
|
-
* }
|
|
90
|
-
* ```
|
|
91
27
|
*/
|
|
92
|
-
declare function DOApp({ config
|
|
28
|
+
declare function DOApp({ config }: DOAppProps): react_jsx_runtime.JSX.Element;
|
|
93
29
|
|
|
94
30
|
interface AppProvidersProps {
|
|
95
31
|
config: DOShellConfig;
|
|
96
32
|
children: ReactNode;
|
|
97
33
|
}
|
|
98
34
|
/**
|
|
99
|
-
* AppProviders -
|
|
35
|
+
* AppProviders - Root provider for DO Admin Shell
|
|
100
36
|
*
|
|
101
37
|
* @example
|
|
102
38
|
* ```tsx
|
|
103
|
-
* <AppProviders
|
|
104
|
-
* config={{
|
|
105
|
-
* do: { apiEndpoint: '...', authMethod: 'jwt', bindings: [], realTimeUpdates: true },
|
|
106
|
-
* identity: { clientId: 'client_xxx', devMode: true },
|
|
107
|
-
* }}
|
|
108
|
-
* >
|
|
39
|
+
* <AppProviders config={{ do: {...}, identity: {...} }}>
|
|
109
40
|
* <DOShell />
|
|
110
41
|
* </AppProviders>
|
|
111
42
|
* ```
|
|
112
43
|
*/
|
|
113
44
|
declare function AppProviders({ config, children }: AppProvidersProps): react_jsx_runtime.JSX.Element;
|
|
114
45
|
|
|
115
|
-
interface AuthGateProps {
|
|
116
|
-
children: ReactNode;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* AuthGate handles authentication state and shows appropriate UI:
|
|
120
|
-
* - Loading state while checking auth
|
|
121
|
-
* - Landing page or redirect when not authenticated
|
|
122
|
-
* - Children (dashboard) when authenticated
|
|
123
|
-
*/
|
|
124
|
-
declare function AuthGate({ children }: AuthGateProps): react_jsx_runtime.JSX.Element;
|
|
125
|
-
|
|
126
46
|
/**
|
|
127
|
-
*
|
|
128
|
-
*/
|
|
129
|
-
interface DOConfigContextValue {
|
|
130
|
-
/** Merged shell configuration */
|
|
131
|
-
config: DOShellConfig;
|
|
132
|
-
}
|
|
133
|
-
interface DOConfigProviderProps {
|
|
134
|
-
config: DOShellConfig;
|
|
135
|
-
children: ReactNode;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* DOConfigProvider - Provides static shell configuration
|
|
139
|
-
*
|
|
140
|
-
* This is a minimal context for static config only.
|
|
141
|
-
* Dynamic state (endpoint, namespace) is managed via TanStack Query.
|
|
142
|
-
*/
|
|
143
|
-
declare function DOConfigProvider({ config, children }: DOConfigProviderProps): react_jsx_runtime.JSX.Element;
|
|
144
|
-
/**
|
|
145
|
-
* Hook to access static shell configuration
|
|
146
|
-
*/
|
|
147
|
-
declare function useDOConfig(): DOConfigContextValue;
|
|
148
|
-
/**
|
|
149
|
-
* Hook to access enabled routes configuration
|
|
150
|
-
*/
|
|
151
|
-
declare function useDORoutes(): Partial<Record<string, boolean>>;
|
|
152
|
-
/**
|
|
153
|
-
* Hook to access custom routes
|
|
154
|
-
*/
|
|
155
|
-
declare function useDOCustomRoutes(): DOCustomRoute[];
|
|
156
|
-
|
|
157
|
-
interface DOShellProps {
|
|
158
|
-
/** Children to render in the main content area (typically TanStack Router Outlet) */
|
|
159
|
-
children: React.ReactNode;
|
|
160
|
-
/** Optional header content for the sidebar */
|
|
161
|
-
sidebarHeaderContent?: React.ReactNode;
|
|
162
|
-
/** Optional content to render in the header after breadcrumbs */
|
|
163
|
-
headerContent?: React.ReactNode;
|
|
164
|
-
/**
|
|
165
|
-
* Breadcrumb items to display.
|
|
166
|
-
* If not provided, auto-generates from current route.
|
|
167
|
-
* Pass empty array to disable breadcrumbs.
|
|
168
|
-
*/
|
|
169
|
-
breadcrumbs?: BreadcrumbItemConfig[];
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* DOShell - Main layout wrapper for the DO Admin Dashboard.
|
|
173
|
-
*
|
|
174
|
-
* This layout provides:
|
|
175
|
-
* - Authentication gate (shows landing page if not authenticated)
|
|
176
|
-
* - A collapsible sidebar with navigation on the left
|
|
177
|
-
* - A main content area with a header containing breadcrumbs
|
|
178
|
-
* - Toast notifications via Sonner
|
|
179
|
-
* - Responsive design that works on mobile and desktop
|
|
180
|
-
*
|
|
181
|
-
* Uses TanStack Router for navigation.
|
|
47
|
+
* DatabasesPage - Renders DataGridView with route params
|
|
182
48
|
*
|
|
183
|
-
*
|
|
184
|
-
* ```tsx
|
|
185
|
-
* <DOShell headerContent={<SearchBar />}>
|
|
186
|
-
* <Outlet />
|
|
187
|
-
* </DOShell>
|
|
188
|
-
* ```
|
|
49
|
+
* Route: /databases/:ns?/:type?
|
|
189
50
|
*/
|
|
190
|
-
declare function
|
|
51
|
+
declare function DatabasesPage(): react_jsx_runtime.JSX.Element;
|
|
191
52
|
|
|
192
|
-
interface DOShellNavProps extends React.ComponentProps<typeof Sidebar> {
|
|
193
|
-
/** Optional header content to display at the top of the sidebar */
|
|
194
|
-
headerContent?: React.ReactNode;
|
|
195
|
-
}
|
|
196
53
|
/**
|
|
197
|
-
*
|
|
54
|
+
* DocumentPage - Renders DocumentEditorView with route params
|
|
198
55
|
*
|
|
199
|
-
*
|
|
200
|
-
* - Highlights active route based on current location
|
|
201
|
-
* - Uses lucide-react icons for each navigation item
|
|
202
|
-
* - Collapsible on mobile via the Sidebar component
|
|
203
|
-
* - Supports custom header content
|
|
204
|
-
* - Routes can be enabled/disabled via config
|
|
56
|
+
* Route: /things/$ns/$type/$id
|
|
205
57
|
*/
|
|
206
|
-
declare function
|
|
58
|
+
declare function DocumentPage(): react_jsx_runtime.JSX.Element;
|
|
207
59
|
|
|
208
60
|
/**
|
|
209
|
-
*
|
|
210
|
-
* Re-exports useAuth from WorkOS AuthKit for convenience.
|
|
211
|
-
*/
|
|
212
|
-
declare const useIdentity: typeof useAuth;
|
|
213
|
-
interface DOIdentityProviderProps {
|
|
214
|
-
children: ReactNode;
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Identity provider that wraps the shell with WorkOS AuthKit authentication.
|
|
61
|
+
* FunctionsPage - Renders FunctionEditorView
|
|
218
62
|
*
|
|
219
|
-
*
|
|
63
|
+
* Route: /functions
|
|
220
64
|
*/
|
|
221
|
-
declare function
|
|
65
|
+
declare function FunctionsPage(): react_jsx_runtime.JSX.Element;
|
|
222
66
|
|
|
223
|
-
interface UserMenuProps {
|
|
224
|
-
/** Whether to show in compact mode (icon only) */
|
|
225
|
-
compact?: boolean;
|
|
226
|
-
}
|
|
227
67
|
/**
|
|
228
|
-
*
|
|
68
|
+
* OverviewPage - Main dashboard landing page
|
|
229
69
|
*
|
|
230
|
-
*
|
|
231
|
-
* settings and signing out.
|
|
70
|
+
* Shows stats, quick actions, and recent activity.
|
|
232
71
|
*/
|
|
233
|
-
declare function
|
|
72
|
+
declare function OverviewPage(): react_jsx_runtime.JSX.Element;
|
|
234
73
|
|
|
235
74
|
interface PlaceholderPageProps {
|
|
236
75
|
/** Title for the page */
|
|
@@ -243,6 +82,13 @@ interface PlaceholderPageProps {
|
|
|
243
82
|
*/
|
|
244
83
|
declare function PlaceholderPage({ title, description }: PlaceholderPageProps): react_jsx_runtime.JSX.Element;
|
|
245
84
|
|
|
85
|
+
/**
|
|
86
|
+
* ThingsPage - Renders DataBrowserView with route params
|
|
87
|
+
*
|
|
88
|
+
* Route: /things/$ns?/$type?
|
|
89
|
+
*/
|
|
90
|
+
declare function ThingsPage(): react_jsx_runtime.JSX.Element;
|
|
91
|
+
|
|
246
92
|
/**
|
|
247
93
|
* Route parameter schemas for DO Shell routes
|
|
248
94
|
*
|
|
@@ -344,4 +190,4 @@ declare const doRoutePaths: {
|
|
|
344
190
|
};
|
|
345
191
|
type DORoutePath = typeof doRoutePaths[keyof typeof doRoutePaths];
|
|
346
192
|
|
|
347
|
-
export { AppProviders, type AppProvidersProps,
|
|
193
|
+
export { AppProviders, type AppProvidersProps, DOApp, type DOAppProps, type DORoutePath, DatabaseRouteParams, type DatabaseRouteParamsType, DatabasesPage, DocumentPage, DocumentRouteParams, type DocumentRouteParamsType, FunctionsPage, OverviewPage, PlaceholderPage, ThingsPage, ThingsRouteParams, type ThingsRouteParamsType, TypeFilteredRouteParams, type TypeFilteredRouteParamsType, doRoutePaths };
|
package/dist/app/index.js
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
export { AppProviders,
|
|
2
|
-
import '../chunk-7UFINK3Q.js';
|
|
3
|
-
import '../chunk-JJLAES6W.js';
|
|
1
|
+
export { AppProviders, DOApp, DatabaseRouteParams, DatabasesPage, DocumentPage, DocumentRouteParams, FunctionsPage, OverviewPage, PlaceholderPage, ThingsPage, ThingsRouteParams, TypeFilteredRouteParams, doRoutePaths } from '../chunk-5PC6U46L.js';
|
|
4
2
|
import '../chunk-GKSP5RIA.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-7QCTRNEJ.js';
|
|
4
|
+
export { DOShell, DOShellNav } from '../chunk-PJYGRD7N.js';
|
|
5
|
+
import '../chunk-SX4IIE2R.js';
|
|
6
|
+
export { DOIdentityProvider, useIdentity } from '../chunk-ZZTQGMLX.js';
|
|
7
|
+
export { AuthGate, DOConfigProvider, UserMenu, useDOConfig, useDOCustomRoutes, useDORoutes } from '../chunk-7J3RSIG4.js';
|
|
8
|
+
import '../chunk-63VCRTDQ.js';
|
|
9
|
+
import '../chunk-UCWMSKCW.js';
|
|
10
|
+
import '../chunk-2FWXT4HH.js';
|
|
11
|
+
import '../chunk-QEXY4FZV.js';
|
|
12
|
+
import '../chunk-FM2RTAHV.js';
|
|
13
|
+
import '../chunk-WC6SFBAF.js';
|
|
14
|
+
import '../chunk-BZURBNFD.js';
|
|
15
|
+
import '../chunk-LCYBQR35.js';
|
|
16
|
+
import '../chunk-7TFHUKS7.js';
|
|
17
|
+
export { DOProvider, useDO, useDOClient, useDOUrls, useDataProviderSafe, useQueryClient } from '../chunk-HC4PBXV4.js';
|
|
18
|
+
import '../chunk-KLN5OTQH.js';
|
|
19
|
+
import '../chunk-JPZ6RZJE.js';
|
|
20
|
+
import '../chunk-X3AWNFBF.js';
|
|
13
21
|
//# sourceMappingURL=index.js.map
|
|
14
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { useAuth } from '@mdxui/auth';
|
|
5
|
+
|
|
6
|
+
interface AuthGateProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* AuthGate handles authentication state and shows appropriate UI:
|
|
11
|
+
* - Loading state while checking auth
|
|
12
|
+
* - Landing page or redirect when not authenticated
|
|
13
|
+
* - Children (dashboard) when authenticated
|
|
14
|
+
*/
|
|
15
|
+
declare function AuthGate({ children }: AuthGateProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Hook to access identity/auth state.
|
|
19
|
+
* Re-exports useAuth from @mdxui/auth for convenience.
|
|
20
|
+
*/
|
|
21
|
+
declare const useIdentity: typeof useAuth;
|
|
22
|
+
interface DOIdentityProviderProps {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Identity provider that wraps the shell with WorkOS AuthKit authentication.
|
|
27
|
+
*
|
|
28
|
+
* Provides authentication context to all child components.
|
|
29
|
+
* Delegates to @mdxui/auth's IdentityProvider which handles:
|
|
30
|
+
* - Default redirectUri (window.location.origin)
|
|
31
|
+
* - Clearing auth params from URL after redirect
|
|
32
|
+
* - WidgetsProvider wrapper
|
|
33
|
+
*/
|
|
34
|
+
declare function DOIdentityProvider({ children }: DOIdentityProviderProps): react_jsx_runtime.JSX.Element;
|
|
35
|
+
|
|
36
|
+
interface UserMenuProps {
|
|
37
|
+
/** Whether to show in compact mode (icon only) */
|
|
38
|
+
compact?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* UserMenu - User dropdown with profile info and sign out
|
|
42
|
+
*
|
|
43
|
+
* Displays the current user's avatar and name, with options for
|
|
44
|
+
* settings and signing out.
|
|
45
|
+
*/
|
|
46
|
+
declare function UserMenu({ compact }: UserMenuProps): react_jsx_runtime.JSX.Element | null;
|
|
47
|
+
|
|
48
|
+
export { AuthGate, type AuthGateProps, DOIdentityProvider, type DOIdentityProviderProps, UserMenu, useIdentity };
|
|
@@ -54,13 +54,13 @@ interface BreadcrumbsProps {
|
|
|
54
54
|
* ]}
|
|
55
55
|
* />
|
|
56
56
|
*
|
|
57
|
-
* // With
|
|
58
|
-
* import {
|
|
57
|
+
* // With @mdxui/navigation WebLink
|
|
58
|
+
* import { WebLink } from '@mdxui/navigation/web'
|
|
59
59
|
*
|
|
60
60
|
* <Breadcrumbs
|
|
61
61
|
* items={breadcrumbItems}
|
|
62
62
|
* LinkComponent={({ href, children, className }) => (
|
|
63
|
-
* <
|
|
63
|
+
* <WebLink to={href} className={className}>{children}</WebLink>
|
|
64
64
|
* )}
|
|
65
65
|
* />
|
|
66
66
|
*
|