@mdxui/do 2.1.1 → 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.
- package/README.md +115 -323
- package/dist/{agents-xcIn2dUB.d.ts → agents-2_r9e9i7.d.ts} +213 -2
- package/dist/app/index.d.ts +347 -0
- package/dist/app/index.js +14 -0
- package/dist/app/index.js.map +1 -0
- package/dist/breadcrumbs-C9Qn3S7d.d.ts +81 -0
- package/dist/capnweb-client-Bq78FtEA.d.ts +229 -0
- package/dist/chunk-3XKYQRXY.js +192 -0
- package/dist/chunk-3XKYQRXY.js.map +1 -0
- package/dist/chunk-4KXVN3EQ.js +56 -0
- package/dist/chunk-4KXVN3EQ.js.map +1 -0
- package/dist/chunk-5SHZZC7L.js +234 -0
- package/dist/chunk-5SHZZC7L.js.map +1 -0
- package/dist/chunk-7UFINK3Q.js +1994 -0
- package/dist/chunk-7UFINK3Q.js.map +1 -0
- package/dist/chunk-JJLAES6W.js +76 -0
- package/dist/chunk-JJLAES6W.js.map +1 -0
- package/dist/chunk-KT52UU3U.js +985 -0
- package/dist/chunk-KT52UU3U.js.map +1 -0
- package/dist/chunk-LJIWB7KE.js +95 -0
- package/dist/chunk-LJIWB7KE.js.map +1 -0
- package/dist/chunk-NA652ART.js +596 -0
- package/dist/chunk-NA652ART.js.map +1 -0
- package/dist/chunk-OVLO7UOH.js +1071 -0
- package/dist/chunk-OVLO7UOH.js.map +1 -0
- package/dist/chunk-VRLUXCLD.js +31 -0
- package/dist/chunk-VRLUXCLD.js.map +1 -0
- package/dist/chunk-WMNT4OIE.js +249 -0
- package/dist/chunk-WMNT4OIE.js.map +1 -0
- package/dist/chunk-Y52IEYVM.js +131 -0
- package/dist/chunk-Y52IEYVM.js.map +1 -0
- package/dist/components/index.d.ts +14 -732
- package/dist/components/index.js +3 -6
- package/dist/config-CxvpD8Y6.d.ts +111 -0
- package/dist/{do-CaQVueZw.d.ts → do-D27i5bU0.d.ts} +32 -33
- package/dist/errors-DratdVIz.d.ts +346 -0
- package/dist/hooks/index.d.ts +450 -691
- package/dist/hooks/index.js +6 -4
- package/dist/hooks/things/index.d.ts +298 -0
- package/dist/hooks/things/index.js +8 -0
- package/dist/hooks/things/index.js.map +1 -0
- package/dist/index.d.ts +62 -989
- package/dist/index.js +12 -839
- package/dist/index.js.map +1 -1
- package/dist/lib/index.d.ts +798 -0
- package/dist/lib/index.js +6 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/providers/index.d.ts +130 -34
- package/dist/providers/index.js +3 -2
- package/dist/query-keys-CZNFikIi.d.ts +153 -0
- package/dist/schemas/index.d.ts +5 -5
- package/dist/schemas/index.js +2 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/{thing-DtI25yZh.d.ts → thing-BF25aUtJ.d.ts} +72 -72
- package/dist/types/index.d.ts +693 -658
- package/dist/types/index.js +1 -2
- package/dist/views/index.d.ts +131 -0
- package/dist/views/index.js +11 -0
- package/dist/views/index.js.map +1 -0
- package/package.json +39 -17
- package/dist/__test-utils__/index.d.ts +0 -399
- package/dist/__test-utils__/index.js +0 -34641
- package/dist/__test-utils__/index.js.map +0 -1
- package/dist/chunk-EEDMN7UF.js +0 -1351
- package/dist/chunk-EEDMN7UF.js.map +0 -1
- package/dist/chunk-G3PMV62Z.js +0 -33
- package/dist/chunk-G3PMV62Z.js.map +0 -1
- package/dist/chunk-NXPXL5NA.js +0 -3789
- package/dist/chunk-NXPXL5NA.js.map +0 -1
- package/dist/chunk-PC5FJY6M.js +0 -20
- package/dist/chunk-PC5FJY6M.js.map +0 -1
- package/dist/chunk-XF6LKY2M.js +0 -445
- package/dist/chunk-XF6LKY2M.js.map +0 -1
- package/dist/magic-string.es-J7BYFTTJ.js +0 -1307
- package/dist/magic-string.es-J7BYFTTJ.js.map +0 -1
|
@@ -1,4 +1,215 @@
|
|
|
1
|
-
import { ExecutionError, TokenUsage } from './schemas/index.js';
|
|
1
|
+
import { EntityReference, ExecutionError, TokenUsage } from './schemas/index.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Relationship Types - Semantic Graph Connections
|
|
5
|
+
*
|
|
6
|
+
* Relationships form a semantic knowledge graph connecting Things.
|
|
7
|
+
* Uses the $.Subject.predicate.Object pattern throughout.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* The Relationships table uses MergeTree with ORDER BY (toNs, toId, fromNs, fromId)
|
|
11
|
+
* optimized for reverse lookups ("who references me?").
|
|
12
|
+
*
|
|
13
|
+
* 64+ semantic predicates across categories:
|
|
14
|
+
* - Temporal: before, after, during, since, until...
|
|
15
|
+
* - Spatial: above, below, near, between, within...
|
|
16
|
+
* - Directional: through, toward, from, into, across...
|
|
17
|
+
* - Relational: of, about, for, including, regarding...
|
|
18
|
+
* - Causal: because, considering, but
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Core relationship record from database
|
|
23
|
+
*/
|
|
24
|
+
interface Relationship {
|
|
25
|
+
/** Unique relationship identifier */
|
|
26
|
+
relationshipId: string;
|
|
27
|
+
/** Semantic predicate type */
|
|
28
|
+
relationshipType: SemanticPredicate;
|
|
29
|
+
/** Source entity namespace */
|
|
30
|
+
fromNs: string;
|
|
31
|
+
/** Source entity type */
|
|
32
|
+
fromType: string;
|
|
33
|
+
/** Source entity ID */
|
|
34
|
+
fromId: string;
|
|
35
|
+
/** Target entity namespace */
|
|
36
|
+
toNs: string;
|
|
37
|
+
/** Target entity type */
|
|
38
|
+
toType: string;
|
|
39
|
+
/** Target entity ID */
|
|
40
|
+
toId: string;
|
|
41
|
+
/** Creation timestamp */
|
|
42
|
+
createdAt: Date;
|
|
43
|
+
/** Creator user ID */
|
|
44
|
+
createdBy: string;
|
|
45
|
+
/** Soft delete timestamp */
|
|
46
|
+
deletedAt?: Date | null;
|
|
47
|
+
/** Deleter user ID */
|
|
48
|
+
deletedBy?: string;
|
|
49
|
+
/** Additional relationship metadata */
|
|
50
|
+
metadata: RelationshipMetadata;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Semantic predicate categories
|
|
54
|
+
*/
|
|
55
|
+
type SemanticPredicateCategory = 'temporal' | 'spatial' | 'directional' | 'relational' | 'causal' | 'ownership' | 'membership' | 'dependency' | 'custom';
|
|
56
|
+
/**
|
|
57
|
+
* Built-in semantic predicates
|
|
58
|
+
*/
|
|
59
|
+
type SemanticPredicate = 'before' | 'after' | 'during' | 'since' | 'until' | 'by' | 'at' | 'in' | 'on' | 'past' | 'throughout' | 'till' | 'above' | 'below' | 'under' | 'near' | 'between' | 'among' | 'beside' | 'within' | 'amid' | 'around' | 'behind' | 'beneath' | 'beyond' | 'inside' | 'upon' | 'outside' | 'over' | 'opposite' | 'underneath' | 'round' | 'through' | 'toward' | 'to' | 'from' | 'into' | 'across' | 'along' | 'against' | 'down' | 'off' | 'onto' | 'up' | 'via' | 'out' | 'with' | 'of' | 'about' | 'concerning' | 'for' | 'including' | 'regarding' | 'like' | 'as' | 'than' | 'unlike' | 'besides' | 'except' | 'despite' | 'without' | 'per' | 'because' | 'considering' | 'but' | 'owns' | 'worksFor' | 'contains' | 'belongsTo' | 'employs' | 'locatedAt' | 'handoff' | 'uses' | 'validates' | 'blocks' | 'dependsOn' | 'references' | 'parentOf' | 'childOf' | 'siblingOf' | string;
|
|
60
|
+
/**
|
|
61
|
+
* Predicate definition with metadata
|
|
62
|
+
*/
|
|
63
|
+
interface PredicateDefinition {
|
|
64
|
+
/** Predicate name */
|
|
65
|
+
name: SemanticPredicate;
|
|
66
|
+
/** Category */
|
|
67
|
+
category: SemanticPredicateCategory;
|
|
68
|
+
/** Human-readable label */
|
|
69
|
+
label: string;
|
|
70
|
+
/** Description */
|
|
71
|
+
description: string;
|
|
72
|
+
/** Inverse predicate (e.g., 'owns' -> 'ownedBy') */
|
|
73
|
+
inverse?: SemanticPredicate;
|
|
74
|
+
/** Is this predicate symmetric? */
|
|
75
|
+
symmetric: boolean;
|
|
76
|
+
/** Is this predicate transitive? */
|
|
77
|
+
transitive: boolean;
|
|
78
|
+
/** Valid source types (empty = any) */
|
|
79
|
+
validFromTypes: string[];
|
|
80
|
+
/** Valid target types (empty = any) */
|
|
81
|
+
validToTypes: string[];
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Additional metadata for relationships
|
|
85
|
+
*/
|
|
86
|
+
interface RelationshipMetadata {
|
|
87
|
+
/** Relationship strength/weight (0-1) */
|
|
88
|
+
weight?: number;
|
|
89
|
+
/** Confidence score (0-1) */
|
|
90
|
+
confidence?: number;
|
|
91
|
+
/** Source of the relationship (manual, inferred, imported) */
|
|
92
|
+
source?: 'manual' | 'inferred' | 'imported' | 'system';
|
|
93
|
+
/** Start date (for temporal relationships) */
|
|
94
|
+
startDate?: Date;
|
|
95
|
+
/** End date (for temporal relationships) */
|
|
96
|
+
endDate?: Date;
|
|
97
|
+
/** Additional properties */
|
|
98
|
+
[key: string]: unknown;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Semantic triple representation ($.Subject.predicate.Object)
|
|
102
|
+
*/
|
|
103
|
+
interface SemanticTriple {
|
|
104
|
+
/** Subject (from) entity reference */
|
|
105
|
+
subject: EntityReference;
|
|
106
|
+
/** Predicate (relationship type) */
|
|
107
|
+
predicate: SemanticPredicate;
|
|
108
|
+
/** Object (to) entity reference */
|
|
109
|
+
object: EntityReference;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Graph query pattern for finding relationships
|
|
113
|
+
*/
|
|
114
|
+
interface GraphPattern {
|
|
115
|
+
/** Subject pattern (supports wildcards) */
|
|
116
|
+
subject?: Partial<EntityReference> & {
|
|
117
|
+
pattern?: string;
|
|
118
|
+
};
|
|
119
|
+
/** Predicate filter */
|
|
120
|
+
predicate?: SemanticPredicate | SemanticPredicate[];
|
|
121
|
+
/** Object pattern (supports wildcards) */
|
|
122
|
+
object?: Partial<EntityReference> & {
|
|
123
|
+
pattern?: string;
|
|
124
|
+
};
|
|
125
|
+
/** Maximum depth for traversal */
|
|
126
|
+
depth?: number;
|
|
127
|
+
/** Direction of traversal */
|
|
128
|
+
direction?: 'outgoing' | 'incoming' | 'both';
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Relationship creation payload
|
|
132
|
+
*/
|
|
133
|
+
interface RelationshipCreateInput {
|
|
134
|
+
/** Predicate type */
|
|
135
|
+
relationshipType: SemanticPredicate;
|
|
136
|
+
/** Source entity */
|
|
137
|
+
from: EntityReference;
|
|
138
|
+
/** Target entity */
|
|
139
|
+
to: EntityReference;
|
|
140
|
+
/** Metadata */
|
|
141
|
+
metadata?: RelationshipMetadata;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Query filters for relationships
|
|
145
|
+
*/
|
|
146
|
+
interface RelationshipFilter {
|
|
147
|
+
/** Filter by predicate type */
|
|
148
|
+
predicates?: SemanticPredicate[];
|
|
149
|
+
/** Filter by source entity */
|
|
150
|
+
from?: Partial<EntityReference>;
|
|
151
|
+
/** Filter by target entity */
|
|
152
|
+
to?: Partial<EntityReference>;
|
|
153
|
+
/** Filter by category */
|
|
154
|
+
categories?: SemanticPredicateCategory[];
|
|
155
|
+
/** Include deleted */
|
|
156
|
+
includeDeleted?: boolean;
|
|
157
|
+
/** Filter by metadata */
|
|
158
|
+
metadata?: Partial<RelationshipMetadata>;
|
|
159
|
+
/** Date range */
|
|
160
|
+
createdAfter?: Date;
|
|
161
|
+
createdBefore?: Date;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Graph traversal result
|
|
165
|
+
*/
|
|
166
|
+
interface GraphTraversalResult {
|
|
167
|
+
/** Root entity */
|
|
168
|
+
root: EntityReference;
|
|
169
|
+
/** All nodes found */
|
|
170
|
+
nodes: EntityReference[];
|
|
171
|
+
/** All edges (relationships) found */
|
|
172
|
+
edges: Relationship[];
|
|
173
|
+
/** Traversal depth reached */
|
|
174
|
+
depth: number;
|
|
175
|
+
/** Paths from root to each node */
|
|
176
|
+
paths: GraphPath[];
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* A path in the graph
|
|
180
|
+
*/
|
|
181
|
+
interface GraphPath {
|
|
182
|
+
/** Starting node */
|
|
183
|
+
start: EntityReference;
|
|
184
|
+
/** Ending node */
|
|
185
|
+
end: EntityReference;
|
|
186
|
+
/** Edges traversed */
|
|
187
|
+
edges: Relationship[];
|
|
188
|
+
/** Total weight (sum of edge weights) */
|
|
189
|
+
totalWeight: number;
|
|
190
|
+
/** Path length (number of edges) */
|
|
191
|
+
length: number;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Statistics for the relationship graph
|
|
195
|
+
*/
|
|
196
|
+
interface GraphStats {
|
|
197
|
+
/** Total relationships */
|
|
198
|
+
totalRelationships: number;
|
|
199
|
+
/** Active relationships (not deleted) */
|
|
200
|
+
activeRelationships: number;
|
|
201
|
+
/** Count by predicate type */
|
|
202
|
+
byPredicate: Record<string, number>;
|
|
203
|
+
/** Count by category */
|
|
204
|
+
byCategory: Record<SemanticPredicateCategory, number>;
|
|
205
|
+
/** Average degree (connections per node) */
|
|
206
|
+
averageDegree: number;
|
|
207
|
+
/** Most connected nodes */
|
|
208
|
+
topConnectedNodes: Array<{
|
|
209
|
+
entity: EntityReference;
|
|
210
|
+
degree: number;
|
|
211
|
+
}>;
|
|
212
|
+
}
|
|
2
213
|
|
|
3
214
|
/**
|
|
4
215
|
* Workflow Types - Business Process Orchestration
|
|
@@ -829,4 +1040,4 @@ interface AgentExecutionFilter {
|
|
|
829
1040
|
minRating?: number;
|
|
830
1041
|
}
|
|
831
1042
|
|
|
832
|
-
export type { AIStepConfig as A,
|
|
1043
|
+
export type { AgentOutput as $, AIStepConfig as A, WorkflowFilter as B, ChoiceCondition as C, DatabaseStepConfig as D, EventTrigger as E, ExecutionFilter as F, GraphPattern as G, HttpStepConfig as H, Agent as I, AgentType as J, RoleCategory as K, AgentClassification as L, ManualTrigger as M, NotificationConfig as N, CharacterBible as O, PredicateDefinition as P, AgentGuardrail as Q, Relationship as R, SemanticPredicateCategory as S, TriggerType as T, HandoffRule as U, AgentStatus as V, WorkflowStatus as W, AgentMetrics as X, AgentExecution as Y, AgentExecutionStatus as Z, AgentInput as _, SemanticPredicate as a, AgentArtifact as a0, AgentTrace as a1, AgentHandoff as a2, GuardrailViolation as a3, AgentFeedback as a4, AgentFilter as a5, AgentExecutionFilter as a6, RelationshipMetadata as b, SemanticTriple as c, RelationshipCreateInput as d, RelationshipFilter as e, GraphTraversalResult as f, GraphPath as g, GraphStats as h, Workflow as i, TriggerBase as j, ScheduleTrigger as k, WebhookTrigger as l, WorkflowTrigger as m, StepType as n, WorkflowStep as o, StepConfig as p, EventStepConfig as q, RetryConfig as r, ErrorHandlingConfig as s, CompensationConfig as t, WorkflowConfig as u, ExecutionStatus as v, WorkflowExecution as w, TriggerData as x, ExecutionContext as y, StepExecution as z };
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { d as DOShellConfig, c as DOCustomRoute } from '../config-CxvpD8Y6.js';
|
|
5
|
+
import { a as BreadcrumbItemConfig } from '../breadcrumbs-C9Qn3S7d.js';
|
|
6
|
+
import { Sidebar } from '@mdxui/primitives';
|
|
7
|
+
import { useAuth } from '@workos-inc/authkit-react';
|
|
8
|
+
export { DOClient, DOContextValue, DOProvider, DOProviderProps, useDO, useDOClient, useDOUrls, useDataProviderSafe, useSyncStatus } from '../providers/index.js';
|
|
9
|
+
export { useQueryClient } from '@tanstack/react-query';
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
import '../do-D27i5bU0.js';
|
|
12
|
+
import '@mdxui/app';
|
|
13
|
+
import '../capnweb-client-Bq78FtEA.js';
|
|
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;
|
|
49
|
+
|
|
50
|
+
interface DOAppProps {
|
|
51
|
+
/** Shell configuration */
|
|
52
|
+
config: DOShellConfig;
|
|
53
|
+
/** Optional custom content to render in the shell header */
|
|
54
|
+
headerContent?: React.ReactNode;
|
|
55
|
+
/** Optional custom content to render in the sidebar header */
|
|
56
|
+
sidebarHeaderContent?: React.ReactNode;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 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
|
+
*/
|
|
92
|
+
declare function DOApp({ config, headerContent, sidebarHeaderContent, }: DOAppProps): react_jsx_runtime.JSX.Element;
|
|
93
|
+
|
|
94
|
+
interface AppProvidersProps {
|
|
95
|
+
config: DOShellConfig;
|
|
96
|
+
children: ReactNode;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* AppProviders - Composed provider hierarchy for DOShell
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```tsx
|
|
103
|
+
* <AppProviders
|
|
104
|
+
* config={{
|
|
105
|
+
* do: { apiEndpoint: '...', authMethod: 'jwt', bindings: [], realTimeUpdates: true },
|
|
106
|
+
* identity: { clientId: 'client_xxx', devMode: true },
|
|
107
|
+
* }}
|
|
108
|
+
* >
|
|
109
|
+
* <DOShell />
|
|
110
|
+
* </AppProviders>
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
declare function AppProviders({ config, children }: AppProvidersProps): react_jsx_runtime.JSX.Element;
|
|
114
|
+
|
|
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
|
+
/**
|
|
127
|
+
* Static config context value (no state, just config)
|
|
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.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```tsx
|
|
185
|
+
* <DOShell headerContent={<SearchBar />}>
|
|
186
|
+
* <Outlet />
|
|
187
|
+
* </DOShell>
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
declare function DOShell({ children, sidebarHeaderContent, headerContent, breadcrumbs: breadcrumbsProp, }: DOShellProps): react_jsx_runtime.JSX.Element;
|
|
191
|
+
|
|
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
|
+
/**
|
|
197
|
+
* DOShellNav - Sidebar navigation component for the DO Shell.
|
|
198
|
+
*
|
|
199
|
+
* Features:
|
|
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
|
|
205
|
+
*/
|
|
206
|
+
declare function DOShellNav({ headerContent, ...props }: DOShellNavProps): react_jsx_runtime.JSX.Element;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Hook to access identity/auth state.
|
|
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.
|
|
218
|
+
*
|
|
219
|
+
* Provides authentication context to all child components.
|
|
220
|
+
*/
|
|
221
|
+
declare function DOIdentityProvider({ children }: DOIdentityProviderProps): react_jsx_runtime.JSX.Element;
|
|
222
|
+
|
|
223
|
+
interface UserMenuProps {
|
|
224
|
+
/** Whether to show in compact mode (icon only) */
|
|
225
|
+
compact?: boolean;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* UserMenu - User dropdown with profile info and sign out
|
|
229
|
+
*
|
|
230
|
+
* Displays the current user's avatar and name, with options for
|
|
231
|
+
* settings and signing out.
|
|
232
|
+
*/
|
|
233
|
+
declare function UserMenu({ compact }: UserMenuProps): react_jsx_runtime.JSX.Element | null;
|
|
234
|
+
|
|
235
|
+
interface PlaceholderPageProps {
|
|
236
|
+
/** Title for the page */
|
|
237
|
+
title: string;
|
|
238
|
+
/** Description of what this page will contain */
|
|
239
|
+
description?: string;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* PlaceholderPage - Shows a "coming soon" message for unimplemented routes
|
|
243
|
+
*/
|
|
244
|
+
declare function PlaceholderPage({ title, description }: PlaceholderPageProps): react_jsx_runtime.JSX.Element;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Route parameter schemas for DO Shell routes
|
|
248
|
+
*
|
|
249
|
+
* These Zod schemas define and validate route parameters.
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Schema for database route params
|
|
254
|
+
*/
|
|
255
|
+
declare const DatabaseRouteParams: z.ZodObject<{
|
|
256
|
+
ns: z.ZodOptional<z.ZodString>;
|
|
257
|
+
type: z.ZodOptional<z.ZodString>;
|
|
258
|
+
}, "strip", z.ZodTypeAny, {
|
|
259
|
+
type?: string | undefined;
|
|
260
|
+
ns?: string | undefined;
|
|
261
|
+
}, {
|
|
262
|
+
type?: string | undefined;
|
|
263
|
+
ns?: string | undefined;
|
|
264
|
+
}>;
|
|
265
|
+
type DatabaseRouteParamsType = z.infer<typeof DatabaseRouteParams>;
|
|
266
|
+
/**
|
|
267
|
+
* Schema for things browse route params
|
|
268
|
+
*/
|
|
269
|
+
declare const ThingsRouteParams: z.ZodObject<{
|
|
270
|
+
ns: z.ZodOptional<z.ZodString>;
|
|
271
|
+
type: z.ZodOptional<z.ZodString>;
|
|
272
|
+
}, "strip", z.ZodTypeAny, {
|
|
273
|
+
type?: string | undefined;
|
|
274
|
+
ns?: string | undefined;
|
|
275
|
+
}, {
|
|
276
|
+
type?: string | undefined;
|
|
277
|
+
ns?: string | undefined;
|
|
278
|
+
}>;
|
|
279
|
+
type ThingsRouteParamsType = z.infer<typeof ThingsRouteParams>;
|
|
280
|
+
/**
|
|
281
|
+
* Schema for document route params
|
|
282
|
+
*/
|
|
283
|
+
declare const DocumentRouteParams: z.ZodObject<{
|
|
284
|
+
ns: z.ZodString;
|
|
285
|
+
type: z.ZodString;
|
|
286
|
+
id: z.ZodString;
|
|
287
|
+
}, "strip", z.ZodTypeAny, {
|
|
288
|
+
id: string;
|
|
289
|
+
type: string;
|
|
290
|
+
ns: string;
|
|
291
|
+
}, {
|
|
292
|
+
id: string;
|
|
293
|
+
type: string;
|
|
294
|
+
ns: string;
|
|
295
|
+
}>;
|
|
296
|
+
type DocumentRouteParamsType = z.infer<typeof DocumentRouteParams>;
|
|
297
|
+
/**
|
|
298
|
+
* Schema for generic type-filtered route params
|
|
299
|
+
*/
|
|
300
|
+
declare const TypeFilteredRouteParams: z.ZodObject<{
|
|
301
|
+
type: z.ZodOptional<z.ZodString>;
|
|
302
|
+
}, "strip", z.ZodTypeAny, {
|
|
303
|
+
type?: string | undefined;
|
|
304
|
+
}, {
|
|
305
|
+
type?: string | undefined;
|
|
306
|
+
}>;
|
|
307
|
+
type TypeFilteredRouteParamsType = z.infer<typeof TypeFilteredRouteParams>;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* DO Shell Routes
|
|
311
|
+
*
|
|
312
|
+
* Route definitions and parameter schemas for the DO Admin Dashboard.
|
|
313
|
+
*/
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Route paths for DO Shell navigation
|
|
317
|
+
*
|
|
318
|
+
* These paths are used throughout the shell for navigation links
|
|
319
|
+
* and route matching.
|
|
320
|
+
*/
|
|
321
|
+
declare const doRoutePaths: {
|
|
322
|
+
readonly overview: "/";
|
|
323
|
+
readonly agents: "/agents";
|
|
324
|
+
readonly functions: "/functions";
|
|
325
|
+
readonly workflows: "/workflows";
|
|
326
|
+
readonly databases: "/databases";
|
|
327
|
+
readonly databaseTable: "/databases/:ns/:type";
|
|
328
|
+
readonly things: "/things";
|
|
329
|
+
readonly thingsBrowse: "/things/:ns/:type?";
|
|
330
|
+
readonly document: "/things/:ns/:type/:id";
|
|
331
|
+
readonly nouns: "/nouns";
|
|
332
|
+
readonly verbs: "/verbs";
|
|
333
|
+
readonly actions: "/actions";
|
|
334
|
+
readonly relationships: "/relationships";
|
|
335
|
+
readonly events: "/events";
|
|
336
|
+
readonly customers: "/customers";
|
|
337
|
+
readonly subscriptions: "/subscriptions";
|
|
338
|
+
readonly integrations: "/integrations";
|
|
339
|
+
readonly orgs: "/orgs";
|
|
340
|
+
readonly roles: "/roles";
|
|
341
|
+
readonly users: "/users";
|
|
342
|
+
readonly apiKeys: "/api-keys";
|
|
343
|
+
readonly settings: "/settings";
|
|
344
|
+
};
|
|
345
|
+
type DORoutePath = typeof doRoutePaths[keyof typeof doRoutePaths];
|
|
346
|
+
|
|
347
|
+
export { AppProviders, type AppProvidersProps, AuthGate, type AuthGateProps, DOApp, type DOAppProps, type DOConfigContextValue, DOConfigProvider, DOIdentityProvider, type DOIdentityProviderProps, type DORoutePath, DOShell, DOShellNav, type DOShellNavProps, type DOShellProps, DatabaseRouteParams, type DatabaseRouteParamsType, DatabasesPage, DocumentPage, DocumentRouteParams, type DocumentRouteParamsType, FunctionsPage, OverviewPage, PlaceholderPage, ThingsPage, ThingsRouteParams, type ThingsRouteParamsType, TypeFilteredRouteParams, type TypeFilteredRouteParamsType, UserMenu, doRoutePaths, useDOConfig, useDOCustomRoutes, useDORoutes, useIdentity };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { AppProviders, AuthGate, DOApp, DOConfigProvider, DOIdentityProvider, DOShell, DOShellNav, DatabaseRouteParams, DatabasesPage, DocumentPage, DocumentRouteParams, FunctionsPage, OverviewPage, PlaceholderPage, ThingsPage, ThingsRouteParams, TypeFilteredRouteParams, UserMenu, doRoutePaths, useDOConfig, useDOCustomRoutes, useDORoutes, useIdentity } from '../chunk-KT52UU3U.js';
|
|
2
|
+
import '../chunk-7UFINK3Q.js';
|
|
3
|
+
import '../chunk-JJLAES6W.js';
|
|
4
|
+
import '../chunk-GKSP5RIA.js';
|
|
5
|
+
import '../chunk-NA652ART.js';
|
|
6
|
+
import '../chunk-5SHZZC7L.js';
|
|
7
|
+
import '../chunk-4KXVN3EQ.js';
|
|
8
|
+
export { DOProvider, useDO, useDOClient, useDOUrls, useDataProviderSafe, useQueryClient, useSyncStatus } from '../chunk-WMNT4OIE.js';
|
|
9
|
+
import '../chunk-OVLO7UOH.js';
|
|
10
|
+
import '../chunk-3XKYQRXY.js';
|
|
11
|
+
import '../chunk-Y52IEYVM.js';
|
|
12
|
+
import '../chunk-GGO5GW72.js';
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Props for the Link component
|
|
6
|
+
*/
|
|
7
|
+
interface BreadcrumbLinkProps {
|
|
8
|
+
href: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Single breadcrumb item configuration
|
|
15
|
+
*/
|
|
16
|
+
interface BreadcrumbItemConfig {
|
|
17
|
+
/** Display label */
|
|
18
|
+
label: string;
|
|
19
|
+
/** Route path - last item should not have href */
|
|
20
|
+
href?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Props for the Breadcrumbs component
|
|
24
|
+
*/
|
|
25
|
+
interface BreadcrumbsProps {
|
|
26
|
+
/** Array of breadcrumb items */
|
|
27
|
+
items: BreadcrumbItemConfig[];
|
|
28
|
+
/** Custom link component (e.g., Next.js Link, TanStack Link) */
|
|
29
|
+
LinkComponent?: React.ComponentType<BreadcrumbLinkProps>;
|
|
30
|
+
/** Additional class names */
|
|
31
|
+
className?: string;
|
|
32
|
+
/** Maximum items to show before collapsing */
|
|
33
|
+
maxItems?: number;
|
|
34
|
+
/** Custom separator element */
|
|
35
|
+
separator?: React.ReactNode;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Breadcrumbs provides navigation context showing the user's location.
|
|
39
|
+
*
|
|
40
|
+
* Features:
|
|
41
|
+
* - Router-agnostic - works with any Link component
|
|
42
|
+
* - Automatic collapse with dropdown for long paths
|
|
43
|
+
* - Accessible breadcrumb semantics
|
|
44
|
+
* - Custom separator support
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* // With default anchor tags
|
|
49
|
+
* <Breadcrumbs
|
|
50
|
+
* items={[
|
|
51
|
+
* { label: 'Home', href: '/' },
|
|
52
|
+
* { label: 'Users', href: '/users' },
|
|
53
|
+
* { label: 'John Doe' },
|
|
54
|
+
* ]}
|
|
55
|
+
* />
|
|
56
|
+
*
|
|
57
|
+
* // With TanStack Router Link
|
|
58
|
+
* import { Link } from '@tanstack/react-router'
|
|
59
|
+
*
|
|
60
|
+
* <Breadcrumbs
|
|
61
|
+
* items={breadcrumbItems}
|
|
62
|
+
* LinkComponent={({ href, children, className }) => (
|
|
63
|
+
* <Link to={href} className={className}>{children}</Link>
|
|
64
|
+
* )}
|
|
65
|
+
* />
|
|
66
|
+
*
|
|
67
|
+
* // With Next.js Link
|
|
68
|
+
* import NextLink from 'next/link'
|
|
69
|
+
*
|
|
70
|
+
* <Breadcrumbs
|
|
71
|
+
* items={breadcrumbItems}
|
|
72
|
+
* LinkComponent={NextLink}
|
|
73
|
+
* />
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
declare function Breadcrumbs({ items, LinkComponent, className, maxItems, separator, }: BreadcrumbsProps): react_jsx_runtime.JSX.Element | null;
|
|
77
|
+
declare namespace Breadcrumbs {
|
|
78
|
+
var displayName: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { type BreadcrumbLinkProps as B, type BreadcrumbItemConfig as a, type BreadcrumbsProps as b, Breadcrumbs as c };
|