@elevasis/ui 1.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/dist/api/index.d.ts +87 -0
- package/dist/api/index.js +3 -0
- package/dist/auth/context.d.ts +19 -0
- package/dist/auth/context.js +1 -0
- package/dist/auth/index.d.ts +85 -0
- package/dist/auth/index.js +3 -0
- package/dist/chunk-3KMDHCAR.js +52 -0
- package/dist/chunk-5UWFGBFM.js +129 -0
- package/dist/chunk-6BJOYF6E.js +8 -0
- package/dist/chunk-6M6OLGQY.js +36 -0
- package/dist/chunk-7AI5ZYJ4.js +202 -0
- package/dist/chunk-7PLEQFHO.js +18 -0
- package/dist/chunk-GDV44UWF.js +138 -0
- package/dist/chunk-GEFB5YIR.js +338 -0
- package/dist/chunk-HBRMWW6V.js +43 -0
- package/dist/chunk-HUWJXLLF.js +681 -0
- package/dist/chunk-J3FALDQE.js +176 -0
- package/dist/chunk-JKERRYVS.js +109 -0
- package/dist/chunk-KA7LO7U5.js +28 -0
- package/dist/chunk-LHQTTUL2.js +27 -0
- package/dist/chunk-MAAS6CGR.js +1299 -0
- package/dist/chunk-NE36BUGQ.js +146 -0
- package/dist/chunk-NGXCFBCS.js +398 -0
- package/dist/chunk-OEYU5O27.js +235 -0
- package/dist/chunk-OUHGHTE7.js +748 -0
- package/dist/chunk-OXVOHOP3.js +661 -0
- package/dist/chunk-PSLKGOBZ.js +58 -0
- package/dist/chunk-PYL4XW6H.js +107 -0
- package/dist/chunk-Q47SPRY7.js +1 -0
- package/dist/chunk-Q7DJKLEN.js +18 -0
- package/dist/chunk-RJCA5672.js +1664 -0
- package/dist/chunk-S66I2PYB.js +748 -0
- package/dist/chunk-W7ZBF5AA.js +1 -0
- package/dist/chunk-WNWKOCGJ.js +1067 -0
- package/dist/chunk-XCYKC6OZ.js +1 -0
- package/dist/chunk-YULUKCS6.js +56 -0
- package/dist/chunk-YZ6GTZXL.js +48 -0
- package/dist/chunk-ZGHDPDTF.js +379 -0
- package/dist/components/command-queue/index.css +53 -0
- package/dist/components/command-queue/index.d.ts +204 -0
- package/dist/components/command-queue/index.js +10 -0
- package/dist/components/forms/index.d.ts +56 -0
- package/dist/components/forms/index.js +2 -0
- package/dist/components/index.css +443 -0
- package/dist/components/index.d.ts +1354 -0
- package/dist/components/index.js +18 -0
- package/dist/components/monitoring/index.d.ts +66 -0
- package/dist/components/monitoring/index.js +2 -0
- package/dist/components/navigation/index.d.ts +54 -0
- package/dist/components/navigation/index.js +91 -0
- package/dist/components/notifications/index.d.ts +52 -0
- package/dist/components/notifications/index.js +4 -0
- package/dist/components/resource-definition/index.css +388 -0
- package/dist/components/resource-definition/index.d.ts +301 -0
- package/dist/components/resource-definition/index.js +3 -0
- package/dist/display/index.css +53 -0
- package/dist/display/index.d.ts +606 -0
- package/dist/display/index.js +6 -0
- package/dist/execution/index.css +388 -0
- package/dist/execution/index.d.ts +1090 -0
- package/dist/execution/index.js +4 -0
- package/dist/graph/index.css +388 -0
- package/dist/graph/index.d.ts +429 -0
- package/dist/graph/index.js +1 -0
- package/dist/hooks/index.d.ts +1927 -0
- package/dist/hooks/index.js +6 -0
- package/dist/hooks/published.d.ts +1653 -0
- package/dist/hooks/published.js +4 -0
- package/dist/index.css +505 -0
- package/dist/index.d.ts +7284 -0
- package/dist/index.js +31 -0
- package/dist/initialization/index.d.ts +2325 -0
- package/dist/initialization/index.js +4 -0
- package/dist/organization/index.d.ts +225 -0
- package/dist/organization/index.js +4 -0
- package/dist/profile/index.d.ts +2265 -0
- package/dist/profile/index.js +3 -0
- package/dist/provider/index.css +61 -0
- package/dist/provider/index.d.ts +291 -0
- package/dist/provider/index.js +7 -0
- package/dist/provider/published.d.ts +198 -0
- package/dist/provider/published.js +6 -0
- package/dist/router/context.d.ts +19 -0
- package/dist/router/context.js +1 -0
- package/dist/router/index.d.ts +31 -0
- package/dist/router/index.js +2 -0
- package/dist/sse/index.d.ts +83 -0
- package/dist/sse/index.js +185 -0
- package/dist/supabase/index.d.ts +4289 -0
- package/dist/supabase/index.js +47 -0
- package/dist/typeform/index.d.ts +458 -0
- package/dist/typeform/index.js +1976 -0
- package/dist/typeform/schemas.d.ts +67 -0
- package/dist/typeform/schemas.js +1 -0
- package/dist/utils/index.d.ts +177 -0
- package/dist/utils/index.js +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1,606 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React$1, { ReactNode, ComponentType, CSSProperties } from 'react';
|
|
3
|
+
import { MantineSpacing, MantineColor } from '@mantine/core';
|
|
4
|
+
import { Icon } from '@tabler/icons-react';
|
|
5
|
+
import { Components } from 'react-markdown';
|
|
6
|
+
|
|
7
|
+
interface APIErrorAlertProps {
|
|
8
|
+
/**
|
|
9
|
+
* The error to display. Can be an APIClientError, generic Error, or any unknown value.
|
|
10
|
+
*/
|
|
11
|
+
error: unknown;
|
|
12
|
+
/**
|
|
13
|
+
* Optional title override. If not provided, uses getErrorTitle() based on error code.
|
|
14
|
+
*/
|
|
15
|
+
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Whether to show the request ID (if available). Defaults to true.
|
|
18
|
+
*/
|
|
19
|
+
showRequestId?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Optional custom icon. Defaults to IconAlertCircle.
|
|
22
|
+
*/
|
|
23
|
+
icon?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Alert color. Defaults to 'red'.
|
|
26
|
+
*/
|
|
27
|
+
color?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Alert component for displaying API errors with type-safe error handling.
|
|
31
|
+
*
|
|
32
|
+
* Automatically extracts error message, code, and request ID from APIClientError
|
|
33
|
+
* or falls back to generic Error handling.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* const { data, error } = useQuery(...)
|
|
38
|
+
*
|
|
39
|
+
* if (error) {
|
|
40
|
+
* return <APIErrorAlert error={error} />
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @example With custom title
|
|
45
|
+
* ```tsx
|
|
46
|
+
* <APIErrorAlert
|
|
47
|
+
* error={error}
|
|
48
|
+
* title="Failed to load resources"
|
|
49
|
+
* />
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @example Without request ID
|
|
53
|
+
* ```tsx
|
|
54
|
+
* <APIErrorAlert
|
|
55
|
+
* error={error}
|
|
56
|
+
* showRequestId={false}
|
|
57
|
+
* />
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
declare function APIErrorAlert({ error, title, showRequestId, icon, color }: APIErrorAlertProps): react_jsx_runtime.JSX.Element;
|
|
61
|
+
|
|
62
|
+
interface CollapsibleSectionProps {
|
|
63
|
+
title: string | ReactNode;
|
|
64
|
+
count?: number;
|
|
65
|
+
countLabel?: string;
|
|
66
|
+
children: ReactNode;
|
|
67
|
+
emptyMessage?: string;
|
|
68
|
+
defaultExpanded?: boolean;
|
|
69
|
+
maxHeight?: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Reusable collapsible section with header, badge, and scroll area
|
|
73
|
+
* Used for expandable content like memory sections, logs, etc.
|
|
74
|
+
*/
|
|
75
|
+
declare function CollapsibleSection({ title, count, countLabel, children, emptyMessage, defaultExpanded, maxHeight }: CollapsibleSectionProps): react_jsx_runtime.JSX.Element;
|
|
76
|
+
|
|
77
|
+
interface EmptyStateProps {
|
|
78
|
+
/** Icon component to display (e.g., IconKey from @tabler/icons-react) */
|
|
79
|
+
icon: ComponentType<{
|
|
80
|
+
size: number;
|
|
81
|
+
style?: React.CSSProperties;
|
|
82
|
+
}>;
|
|
83
|
+
/** Main title text */
|
|
84
|
+
title: string;
|
|
85
|
+
/** Description text shown below title */
|
|
86
|
+
description?: string;
|
|
87
|
+
/** Optional action button */
|
|
88
|
+
action?: {
|
|
89
|
+
label: string;
|
|
90
|
+
onClick: () => void;
|
|
91
|
+
icon?: ReactNode;
|
|
92
|
+
};
|
|
93
|
+
/** Vertical padding - defaults to 'xl' */
|
|
94
|
+
py?: MantineSpacing;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* EmptyState - Reusable empty state component for lists and tables
|
|
98
|
+
*
|
|
99
|
+
* Consolidates the Center + Stack + Icon + Text pattern used across:
|
|
100
|
+
* - ApiKeyList.tsx
|
|
101
|
+
* - CredentialList.tsx
|
|
102
|
+
* - Various other list components
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```tsx
|
|
106
|
+
* <EmptyState
|
|
107
|
+
* icon={IconKey}
|
|
108
|
+
* title="No API keys yet"
|
|
109
|
+
* description="Create your first API key to enable external integrations"
|
|
110
|
+
* action={{ label: "Create API Key", onClick: handleCreate }}
|
|
111
|
+
* />
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
declare function EmptyState({ icon: Icon, title, description, action, py }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
115
|
+
|
|
116
|
+
interface NavigationButtonProps {
|
|
117
|
+
/** Icon component to display */
|
|
118
|
+
icon: React$1.ComponentType<{
|
|
119
|
+
size?: number;
|
|
120
|
+
stroke?: number;
|
|
121
|
+
}>;
|
|
122
|
+
/** Button label text */
|
|
123
|
+
label: string;
|
|
124
|
+
/** Whether the button is in collapsed state (hides text) */
|
|
125
|
+
isCollapsed?: boolean;
|
|
126
|
+
/** Whether this button has sub-items/links */
|
|
127
|
+
hasSubItems?: boolean;
|
|
128
|
+
/** Whether sub-items are expanded (controls chevron rotation) */
|
|
129
|
+
isExpanded?: boolean;
|
|
130
|
+
/** Whether the icon and text should be styled as active */
|
|
131
|
+
isActive?: boolean;
|
|
132
|
+
/** Whether the background should be styled as active */
|
|
133
|
+
hasActiveBackground?: boolean;
|
|
134
|
+
/** Click handler */
|
|
135
|
+
onClick?: () => void;
|
|
136
|
+
/** Additional styles for the button container */
|
|
137
|
+
style?: React$1.CSSProperties;
|
|
138
|
+
/** Custom transition duration in ms */
|
|
139
|
+
transitionDuration?: number;
|
|
140
|
+
}
|
|
141
|
+
declare const NavigationButton: React$1.FC<NavigationButtonProps>;
|
|
142
|
+
|
|
143
|
+
declare function PageNotFound(): react_jsx_runtime.JSX.Element;
|
|
144
|
+
|
|
145
|
+
interface PageTitleCaptionProps {
|
|
146
|
+
title: string;
|
|
147
|
+
caption?: string;
|
|
148
|
+
rightSection?: ReactNode;
|
|
149
|
+
}
|
|
150
|
+
declare const PageTitleCaption: ({ title, caption, rightSection }: PageTitleCaptionProps) => react_jsx_runtime.JSX.Element;
|
|
151
|
+
|
|
152
|
+
interface StatsCardSkeletonProps {
|
|
153
|
+
/** Height of the chart skeleton - defaults to 120 */
|
|
154
|
+
chartHeight?: number;
|
|
155
|
+
/** Whether to show a chart skeleton - defaults to true */
|
|
156
|
+
withChart?: boolean;
|
|
157
|
+
/** Number of stat columns - defaults to 3 */
|
|
158
|
+
statCount?: 2 | 3;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* StatsCardSkeleton - Loading skeleton for dashboard metric cards
|
|
162
|
+
*
|
|
163
|
+
* Consolidates the identical card skeleton pattern used across:
|
|
164
|
+
* - ExecutionHealthCard.tsx
|
|
165
|
+
* - CostMetricsCard.tsx
|
|
166
|
+
* - ThroughputCard.tsx
|
|
167
|
+
* - BusinessImpactCard.tsx
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```tsx
|
|
171
|
+
* if (isLoading) {
|
|
172
|
+
* return <StatsCardSkeleton />
|
|
173
|
+
* }
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
declare function StatsCardSkeleton({ chartHeight, withChart, statCount }: StatsCardSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
177
|
+
interface ListSkeletonProps {
|
|
178
|
+
/** Number of skeleton rows to show - defaults to 3 */
|
|
179
|
+
rows?: number;
|
|
180
|
+
/** Height of each row - defaults to 50 */
|
|
181
|
+
rowHeight?: number;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* ListSkeleton - Loading skeleton for table/list content
|
|
185
|
+
*
|
|
186
|
+
* Consolidates the Stack + Skeleton pattern used across:
|
|
187
|
+
* - ApiKeyList.tsx
|
|
188
|
+
* - CredentialList.tsx
|
|
189
|
+
* - Various other list components
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```tsx
|
|
193
|
+
* if (isLoading) {
|
|
194
|
+
* return <ListSkeleton rows={5} />
|
|
195
|
+
* }
|
|
196
|
+
* ```
|
|
197
|
+
*/
|
|
198
|
+
declare function ListSkeleton({ rows, rowHeight }: ListSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
199
|
+
interface DetailCardSkeletonProps {
|
|
200
|
+
/** Number of detail rows - defaults to 3 */
|
|
201
|
+
rows?: number;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* DetailCardSkeleton - Loading skeleton for cards with list of detail items
|
|
205
|
+
*
|
|
206
|
+
* Used for cards like CostBreakdownCard that show a list of items
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* ```tsx
|
|
210
|
+
* if (isLoading) {
|
|
211
|
+
* return <DetailCardSkeleton rows={4} />
|
|
212
|
+
* }
|
|
213
|
+
* ```
|
|
214
|
+
*/
|
|
215
|
+
declare function DetailCardSkeleton({ rows }: DetailCardSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
216
|
+
|
|
217
|
+
interface StatCardBaseProps {
|
|
218
|
+
/** The label/description text */
|
|
219
|
+
label: string;
|
|
220
|
+
/** The value to display (number or formatted string) */
|
|
221
|
+
value: string | number;
|
|
222
|
+
/** Tabler icon component */
|
|
223
|
+
icon: Icon;
|
|
224
|
+
/** Optional extra content rendered below the label */
|
|
225
|
+
children?: ReactNode;
|
|
226
|
+
}
|
|
227
|
+
interface StatCardDefaultProps extends StatCardBaseProps {
|
|
228
|
+
variant?: 'default';
|
|
229
|
+
/** Theme color for the icon (defaults to theme primary) */
|
|
230
|
+
color?: MantineColor;
|
|
231
|
+
isLoading?: never;
|
|
232
|
+
valueColor?: never;
|
|
233
|
+
}
|
|
234
|
+
interface StatCardHeroProps extends StatCardBaseProps {
|
|
235
|
+
variant: 'hero';
|
|
236
|
+
/** Whether data is loading */
|
|
237
|
+
isLoading?: boolean;
|
|
238
|
+
/** Custom color for the value text */
|
|
239
|
+
valueColor?: string;
|
|
240
|
+
/** Card sizing — 'sm' (default) for compact layouts, 'md' for spacious layouts */
|
|
241
|
+
size?: 'sm' | 'md';
|
|
242
|
+
color?: never;
|
|
243
|
+
}
|
|
244
|
+
type StatCardProps = StatCardDefaultProps | StatCardHeroProps;
|
|
245
|
+
/**
|
|
246
|
+
* StatCard - Stat display card with icon, label, and value.
|
|
247
|
+
*
|
|
248
|
+
* Supports two variants:
|
|
249
|
+
* - `default`: Compact card with ThemeIcon (used in admin overviews)
|
|
250
|
+
* - `hero`: Glass card with glowing icon ring (used on dashboards)
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* ```tsx
|
|
254
|
+
* // Default variant
|
|
255
|
+
* <StatCard label="Total Executions" value={150} icon={IconPlayerPlay} color="blue" />
|
|
256
|
+
*
|
|
257
|
+
* // Hero variant
|
|
258
|
+
* <StatCard variant="hero" label="Executions" value={43} icon={IconPlayerPlay} isLoading={false} />
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
261
|
+
declare function StatCard(props: StatCardProps): react_jsx_runtime.JSX.Element;
|
|
262
|
+
/**
|
|
263
|
+
* StatCardSkeleton - Loading skeleton for StatCard (default variant)
|
|
264
|
+
*/
|
|
265
|
+
declare function StatCardSkeleton(): react_jsx_runtime.JSX.Element;
|
|
266
|
+
|
|
267
|
+
interface TabCountBadgeProps {
|
|
268
|
+
count: number;
|
|
269
|
+
isLoading?: boolean;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* A badge that displays a count in tabs with consistent sizing.
|
|
273
|
+
* Uses a fixed-width container to prevent layout shift when switching
|
|
274
|
+
* between the loading spinner and the count badge.
|
|
275
|
+
*/
|
|
276
|
+
declare function TabCountBadge({ count, isLoading }: TabCountBadgeProps): react_jsx_runtime.JSX.Element;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Shared form field types for dynamic form generation
|
|
280
|
+
* Used by: Command Queue, Execution Runner UI, future form-based features
|
|
281
|
+
*/
|
|
282
|
+
/**
|
|
283
|
+
* Supported form field types for action payloads
|
|
284
|
+
* Maps to Mantine form components
|
|
285
|
+
*/
|
|
286
|
+
type FormFieldType = 'text' | 'textarea' | 'number' | 'select' | 'checkbox' | 'radio' | 'richtext';
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Serialized Registry Types
|
|
290
|
+
*
|
|
291
|
+
* Pre-computed JSON-safe types for API responses and Command View.
|
|
292
|
+
* Serialization happens once at API startup, enabling instant response times.
|
|
293
|
+
*/
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Serialized form field for API responses
|
|
297
|
+
*/
|
|
298
|
+
interface SerializedFormField {
|
|
299
|
+
name: string;
|
|
300
|
+
label: string;
|
|
301
|
+
type: FormFieldType;
|
|
302
|
+
defaultValue?: unknown;
|
|
303
|
+
required?: boolean;
|
|
304
|
+
placeholder?: string;
|
|
305
|
+
description?: string;
|
|
306
|
+
options?: Array<{
|
|
307
|
+
label: string;
|
|
308
|
+
value: string | number;
|
|
309
|
+
}>;
|
|
310
|
+
min?: number;
|
|
311
|
+
max?: number;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Serialized form schema for API responses
|
|
315
|
+
*/
|
|
316
|
+
interface SerializedFormSchema {
|
|
317
|
+
title?: string;
|
|
318
|
+
description?: string;
|
|
319
|
+
fields: SerializedFormField[];
|
|
320
|
+
layout?: 'vertical' | 'horizontal' | 'grid';
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Serialized execution form schema for API responses
|
|
324
|
+
*/
|
|
325
|
+
interface SerializedExecutionFormSchema extends SerializedFormSchema {
|
|
326
|
+
fieldMappings?: Record<string, string>;
|
|
327
|
+
submitButton?: {
|
|
328
|
+
label?: string;
|
|
329
|
+
loadingLabel?: string;
|
|
330
|
+
confirmMessage?: string;
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Serialized schedule config for API responses
|
|
335
|
+
*/
|
|
336
|
+
interface SerializedScheduleConfig {
|
|
337
|
+
enabled: boolean;
|
|
338
|
+
defaultSchedule?: string;
|
|
339
|
+
allowedPatterns?: string[];
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Serialized webhook config for API responses
|
|
343
|
+
*/
|
|
344
|
+
interface SerializedWebhookConfig {
|
|
345
|
+
enabled: boolean;
|
|
346
|
+
payloadSchema?: unknown;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Serialized execution interface for API responses
|
|
350
|
+
*/
|
|
351
|
+
interface SerializedExecutionInterface {
|
|
352
|
+
form: SerializedExecutionFormSchema;
|
|
353
|
+
schedule?: SerializedScheduleConfig;
|
|
354
|
+
webhook?: SerializedWebhookConfig;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Time range selector for dashboard metrics
|
|
359
|
+
*/
|
|
360
|
+
type TimeRange = '1h' | '24h' | '7d' | '30d';
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Resource Registry type definitions
|
|
364
|
+
*/
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Environment/deployment status for resources
|
|
368
|
+
*/
|
|
369
|
+
type ResourceStatus = 'dev' | 'prod';
|
|
370
|
+
/**
|
|
371
|
+
* All resource types in the platform
|
|
372
|
+
* Used as the discriminator field in ResourceDefinition
|
|
373
|
+
*/
|
|
374
|
+
type ResourceType = 'agent' | 'workflow' | 'trigger' | 'integration' | 'external' | 'human';
|
|
375
|
+
/**
|
|
376
|
+
* Base interface for ALL platform resources
|
|
377
|
+
* Shared by both executable (agents, workflows) and non-executable (triggers, integrations, etc.) resources
|
|
378
|
+
*/
|
|
379
|
+
interface ResourceDefinition {
|
|
380
|
+
/** Unique resource identifier */
|
|
381
|
+
resourceId: string;
|
|
382
|
+
/** Display name */
|
|
383
|
+
name: string;
|
|
384
|
+
/** Purpose and functionality description */
|
|
385
|
+
description: string;
|
|
386
|
+
/** Version for change tracking and evolution */
|
|
387
|
+
version: string;
|
|
388
|
+
/** Resource type discriminator */
|
|
389
|
+
type: ResourceType;
|
|
390
|
+
/** Environment/deployment status */
|
|
391
|
+
status: ResourceStatus;
|
|
392
|
+
/** Domain tags for filtering and organization */
|
|
393
|
+
domains?: ResourceDomain[];
|
|
394
|
+
/** Whether the agent supports multi-turn sessions (agents only) */
|
|
395
|
+
sessionCapable?: boolean;
|
|
396
|
+
/** Whether the resource is local (monorepo) or remote (externally deployed) */
|
|
397
|
+
origin?: 'local' | 'remote';
|
|
398
|
+
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
399
|
+
archived?: boolean;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Standard Domain Definitions
|
|
404
|
+
* Centralized domain constants and definitions for all organization resources.
|
|
405
|
+
*/
|
|
406
|
+
|
|
407
|
+
declare const DOMAINS: {
|
|
408
|
+
readonly INBOUND_PIPELINE: "inbound-pipeline";
|
|
409
|
+
readonly LEAD_GEN_PIPELINE: "lead-gen-pipeline";
|
|
410
|
+
readonly SUPPORT: "support";
|
|
411
|
+
readonly CLIENT_SUPPORT: "client-support";
|
|
412
|
+
readonly DELIVERY: "delivery";
|
|
413
|
+
readonly OPERATIONS: "operations";
|
|
414
|
+
readonly FINANCE: "finance";
|
|
415
|
+
readonly EXECUTIVE: "executive";
|
|
416
|
+
readonly INSTANTLY: "instantly";
|
|
417
|
+
readonly TESTING: "testing";
|
|
418
|
+
readonly INTERNAL: "internal";
|
|
419
|
+
readonly INTEGRATION: "integration";
|
|
420
|
+
readonly UTILITY: "utility";
|
|
421
|
+
readonly DIAGNOSTIC: "diagnostic";
|
|
422
|
+
};
|
|
423
|
+
/**
|
|
424
|
+
* ResourceDomain - Strongly typed domain identifier
|
|
425
|
+
* Use this type for all domain references to ensure compile-time validation.
|
|
426
|
+
*/
|
|
427
|
+
type ResourceDomain = (typeof DOMAINS)[keyof typeof DOMAINS];
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Execution Runner Types
|
|
431
|
+
*
|
|
432
|
+
* Shared types for the Execution Runner UI feature.
|
|
433
|
+
* Used by both API (apps/api) and frontend (apps/command-center).
|
|
434
|
+
*/
|
|
435
|
+
|
|
436
|
+
interface ExecutionRunnerCatalogItem {
|
|
437
|
+
resourceId: string;
|
|
438
|
+
resourceName: string;
|
|
439
|
+
resourceType: 'workflow' | 'agent';
|
|
440
|
+
description?: string;
|
|
441
|
+
status: 'dev' | 'prod';
|
|
442
|
+
version: string;
|
|
443
|
+
interface: SerializedExecutionInterface;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
interface TimeRangeSelectorProps {
|
|
447
|
+
value: TimeRange;
|
|
448
|
+
onChange: (value: TimeRange) => void;
|
|
449
|
+
width?: number;
|
|
450
|
+
}
|
|
451
|
+
declare function TimeRangeSelector({ value, onChange, width }: TimeRangeSelectorProps): react_jsx_runtime.JSX.Element;
|
|
452
|
+
|
|
453
|
+
interface CustomSelectorProps {
|
|
454
|
+
value: string | null;
|
|
455
|
+
onChange: (value: string | null) => void;
|
|
456
|
+
data: {
|
|
457
|
+
value: string;
|
|
458
|
+
label: string;
|
|
459
|
+
}[] | readonly {
|
|
460
|
+
value: string;
|
|
461
|
+
label: string;
|
|
462
|
+
}[];
|
|
463
|
+
leftSection?: ReactNode;
|
|
464
|
+
placeholder?: string;
|
|
465
|
+
w?: number | string;
|
|
466
|
+
withCheckIcon?: boolean;
|
|
467
|
+
disabled?: boolean;
|
|
468
|
+
}
|
|
469
|
+
declare function CustomSelector({ value, onChange, data, leftSection, placeholder, w, withCheckIcon, disabled }: CustomSelectorProps): react_jsx_runtime.JSX.Element;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* TrendIndicator - Reusable component for showing percentage change trends
|
|
473
|
+
* Displays up/down/flat arrow with colored badge
|
|
474
|
+
*/
|
|
475
|
+
interface TrendIndicatorProps {
|
|
476
|
+
/** Current value */
|
|
477
|
+
current: number;
|
|
478
|
+
/** Previous value to compare against */
|
|
479
|
+
previous: number;
|
|
480
|
+
/** Optional formatter for the value (not used in display but kept for API compatibility) */
|
|
481
|
+
formatter?: (value: number) => string;
|
|
482
|
+
/** If true, negative change is considered positive (e.g., for costs) */
|
|
483
|
+
inverse?: boolean;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Shows a trend indicator with arrow icon and percentage change badge
|
|
487
|
+
*
|
|
488
|
+
* @example
|
|
489
|
+
* // Positive trend (green when going up)
|
|
490
|
+
* <TrendIndicator current={100} previous={80} />
|
|
491
|
+
*
|
|
492
|
+
* @example
|
|
493
|
+
* // Inverse trend (green when going down, useful for costs)
|
|
494
|
+
* <TrendIndicator current={100} previous={120} inverse />
|
|
495
|
+
*/
|
|
496
|
+
declare function TrendIndicator({ current, previous, inverse }: TrendIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
497
|
+
|
|
498
|
+
interface ContextViewerProps {
|
|
499
|
+
/** Any JSON-serializable data to display in a human-readable format */
|
|
500
|
+
data: unknown;
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* Auto-formats any JSON context into a human-readable layout.
|
|
504
|
+
*
|
|
505
|
+
* - Strings → rendered as markdown (supports formatting, lists, tables)
|
|
506
|
+
* - Flat key-value objects → labeled field list
|
|
507
|
+
* - Nested objects → indented subsections with left border
|
|
508
|
+
* - Arrays → bulleted lists or bordered cards
|
|
509
|
+
* - null/undefined/boolean/number → inline text
|
|
510
|
+
*
|
|
511
|
+
* No display configuration needed — the component infers layout from data shape.
|
|
512
|
+
*/
|
|
513
|
+
declare function ContextViewer({ data }: ContextViewerProps): react_jsx_runtime.JSX.Element;
|
|
514
|
+
|
|
515
|
+
interface JsonViewerProps {
|
|
516
|
+
/** JSON data to display (will be stringified) or pre-formatted JSON string */
|
|
517
|
+
data: unknown;
|
|
518
|
+
/** Maximum height with scroll (e.g., '300px'). If not set, expands to content */
|
|
519
|
+
maxHeight?: string | number;
|
|
520
|
+
/** Font size override */
|
|
521
|
+
fontSize?: string | number;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Syntax-highlighted JSON viewer component
|
|
525
|
+
*
|
|
526
|
+
* @example
|
|
527
|
+
* ```tsx
|
|
528
|
+
* import { JsonViewer } from '@repo/ui'
|
|
529
|
+
*
|
|
530
|
+
* <JsonViewer data={{ foo: 'bar', count: 42 }} />
|
|
531
|
+
* <JsonViewer data={apiResponse} maxHeight={300} />
|
|
532
|
+
* ```
|
|
533
|
+
*/
|
|
534
|
+
declare function JsonViewer({ data, maxHeight, fontSize }: JsonViewerProps): react_jsx_runtime.JSX.Element;
|
|
535
|
+
|
|
536
|
+
interface StyledMarkdownProps {
|
|
537
|
+
/** Markdown content to render */
|
|
538
|
+
children: string;
|
|
539
|
+
/** Custom component overrides */
|
|
540
|
+
components?: Partial<Components>;
|
|
541
|
+
/** Additional class name */
|
|
542
|
+
className?: string;
|
|
543
|
+
/** Inline styles for the wrapper div */
|
|
544
|
+
style?: React.CSSProperties;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Styled markdown renderer with Mantine components and syntax highlighting
|
|
548
|
+
*
|
|
549
|
+
* Features:
|
|
550
|
+
* - Colored headings using theme primary color
|
|
551
|
+
* - Syntax-highlighted code blocks (oneDark theme, no token backgrounds)
|
|
552
|
+
* - Styled inline code with Mantine Code component
|
|
553
|
+
* - Styled blockquotes with left border
|
|
554
|
+
* - Proper list styling
|
|
555
|
+
*
|
|
556
|
+
* @example
|
|
557
|
+
* ```tsx
|
|
558
|
+
* import { StyledMarkdown } from '@repo/ui'
|
|
559
|
+
*
|
|
560
|
+
* <StyledMarkdown>{markdownContent}</StyledMarkdown>
|
|
561
|
+
* ```
|
|
562
|
+
*/
|
|
563
|
+
declare function StyledMarkdown({ children, components, className, style }: StyledMarkdownProps): react_jsx_runtime.JSX.Element;
|
|
564
|
+
|
|
565
|
+
interface ResourceCardProps {
|
|
566
|
+
resource: ResourceDefinition;
|
|
567
|
+
onClick: (resource: ResourceDefinition) => void;
|
|
568
|
+
/** Layout mode: 'stack' renders vertically (default), 'row' renders as a dense horizontal strip, 'grid' renders with a right section, 'card' renders with top section above details */
|
|
569
|
+
layout?: 'stack' | 'row' | 'grid' | 'card';
|
|
570
|
+
/** Content rendered in the right column when layout is 'grid' */
|
|
571
|
+
rightSection?: ReactNode;
|
|
572
|
+
/** Content rendered above the details when layout is 'card' */
|
|
573
|
+
topSection?: ReactNode;
|
|
574
|
+
/** Optional "Last run X ago" label shown below status badges */
|
|
575
|
+
lastRunLabel?: string;
|
|
576
|
+
/** HTML data attributes and style overrides passed to the root Card */
|
|
577
|
+
'data-resource-id'?: string;
|
|
578
|
+
style?: CSSProperties;
|
|
579
|
+
}
|
|
580
|
+
declare function ResourceCard({ resource, onClick, layout, rightSection, topSection, lastRunLabel, style, ...rest }: ResourceCardProps): react_jsx_runtime.JSX.Element;
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* Converts ExecutionRunnerCatalogItem to ResourceDefinition format
|
|
584
|
+
* for use with the unified ResourceCard component.
|
|
585
|
+
*
|
|
586
|
+
* @param item - ExecutionRunnerCatalogItem from the execution runner API
|
|
587
|
+
* @returns ResourceDefinition compatible with ResourceCard
|
|
588
|
+
*
|
|
589
|
+
* @example
|
|
590
|
+
* const catalogItem = {
|
|
591
|
+
* resourceId: 'wf-001',
|
|
592
|
+
* resourceName: 'Order Processor',
|
|
593
|
+
* resourceType: 'workflow',
|
|
594
|
+
* description: 'Processes customer orders',
|
|
595
|
+
* status: 'prod',
|
|
596
|
+
* version: '1.0.0',
|
|
597
|
+
* interface: { ... }
|
|
598
|
+
* }
|
|
599
|
+
*
|
|
600
|
+
* const resource = catalogItemToResourceDefinition(catalogItem)
|
|
601
|
+
* <ResourceCard resource={resource} />
|
|
602
|
+
*/
|
|
603
|
+
declare function catalogItemToResourceDefinition(item: ExecutionRunnerCatalogItem): ResourceDefinition;
|
|
604
|
+
|
|
605
|
+
export { APIErrorAlert, CollapsibleSection, ContextViewer, CustomSelector, DetailCardSkeleton, EmptyState, JsonViewer, ListSkeleton, NavigationButton, PageNotFound, PageTitleCaption, ResourceCard, StatCard, StatCardSkeleton, StatsCardSkeleton, StyledMarkdown, TabCountBadge, TimeRangeSelector, TrendIndicator, catalogItemToResourceDefinition };
|
|
606
|
+
export type { ContextViewerProps, JsonViewerProps, NavigationButtonProps, StatCardProps, StyledMarkdownProps, TrendIndicatorProps };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { APIErrorAlert, CollapsibleSection, ContextViewer, CustomSelector, DetailCardSkeleton, EmptyState, JsonViewer, ListSkeleton, NavigationButton, PageNotFound, PageTitleCaption, ResourceCard, StatCard, StatCardSkeleton, StatsCardSkeleton, TabCountBadge, TimeRangeSelector, TrendIndicator, catalogItemToResourceDefinition } from '../chunk-OUHGHTE7.js';
|
|
2
|
+
export { StyledMarkdown } from '../chunk-3KMDHCAR.js';
|
|
3
|
+
import '../chunk-YZ6GTZXL.js';
|
|
4
|
+
import '../chunk-7AI5ZYJ4.js';
|
|
5
|
+
import '../chunk-7PLEQFHO.js';
|
|
6
|
+
import '../chunk-Q7DJKLEN.js';
|