@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.
Files changed (97) hide show
  1. package/dist/api/index.d.ts +87 -0
  2. package/dist/api/index.js +3 -0
  3. package/dist/auth/context.d.ts +19 -0
  4. package/dist/auth/context.js +1 -0
  5. package/dist/auth/index.d.ts +85 -0
  6. package/dist/auth/index.js +3 -0
  7. package/dist/chunk-3KMDHCAR.js +52 -0
  8. package/dist/chunk-5UWFGBFM.js +129 -0
  9. package/dist/chunk-6BJOYF6E.js +8 -0
  10. package/dist/chunk-6M6OLGQY.js +36 -0
  11. package/dist/chunk-7AI5ZYJ4.js +202 -0
  12. package/dist/chunk-7PLEQFHO.js +18 -0
  13. package/dist/chunk-GDV44UWF.js +138 -0
  14. package/dist/chunk-GEFB5YIR.js +338 -0
  15. package/dist/chunk-HBRMWW6V.js +43 -0
  16. package/dist/chunk-HUWJXLLF.js +681 -0
  17. package/dist/chunk-J3FALDQE.js +176 -0
  18. package/dist/chunk-JKERRYVS.js +109 -0
  19. package/dist/chunk-KA7LO7U5.js +28 -0
  20. package/dist/chunk-LHQTTUL2.js +27 -0
  21. package/dist/chunk-MAAS6CGR.js +1299 -0
  22. package/dist/chunk-NE36BUGQ.js +146 -0
  23. package/dist/chunk-NGXCFBCS.js +398 -0
  24. package/dist/chunk-OEYU5O27.js +235 -0
  25. package/dist/chunk-OUHGHTE7.js +748 -0
  26. package/dist/chunk-OXVOHOP3.js +661 -0
  27. package/dist/chunk-PSLKGOBZ.js +58 -0
  28. package/dist/chunk-PYL4XW6H.js +107 -0
  29. package/dist/chunk-Q47SPRY7.js +1 -0
  30. package/dist/chunk-Q7DJKLEN.js +18 -0
  31. package/dist/chunk-RJCA5672.js +1664 -0
  32. package/dist/chunk-S66I2PYB.js +748 -0
  33. package/dist/chunk-W7ZBF5AA.js +1 -0
  34. package/dist/chunk-WNWKOCGJ.js +1067 -0
  35. package/dist/chunk-XCYKC6OZ.js +1 -0
  36. package/dist/chunk-YULUKCS6.js +56 -0
  37. package/dist/chunk-YZ6GTZXL.js +48 -0
  38. package/dist/chunk-ZGHDPDTF.js +379 -0
  39. package/dist/components/command-queue/index.css +53 -0
  40. package/dist/components/command-queue/index.d.ts +204 -0
  41. package/dist/components/command-queue/index.js +10 -0
  42. package/dist/components/forms/index.d.ts +56 -0
  43. package/dist/components/forms/index.js +2 -0
  44. package/dist/components/index.css +443 -0
  45. package/dist/components/index.d.ts +1354 -0
  46. package/dist/components/index.js +18 -0
  47. package/dist/components/monitoring/index.d.ts +66 -0
  48. package/dist/components/monitoring/index.js +2 -0
  49. package/dist/components/navigation/index.d.ts +54 -0
  50. package/dist/components/navigation/index.js +91 -0
  51. package/dist/components/notifications/index.d.ts +52 -0
  52. package/dist/components/notifications/index.js +4 -0
  53. package/dist/components/resource-definition/index.css +388 -0
  54. package/dist/components/resource-definition/index.d.ts +301 -0
  55. package/dist/components/resource-definition/index.js +3 -0
  56. package/dist/display/index.css +53 -0
  57. package/dist/display/index.d.ts +606 -0
  58. package/dist/display/index.js +6 -0
  59. package/dist/execution/index.css +388 -0
  60. package/dist/execution/index.d.ts +1090 -0
  61. package/dist/execution/index.js +4 -0
  62. package/dist/graph/index.css +388 -0
  63. package/dist/graph/index.d.ts +429 -0
  64. package/dist/graph/index.js +1 -0
  65. package/dist/hooks/index.d.ts +1927 -0
  66. package/dist/hooks/index.js +6 -0
  67. package/dist/hooks/published.d.ts +1653 -0
  68. package/dist/hooks/published.js +4 -0
  69. package/dist/index.css +505 -0
  70. package/dist/index.d.ts +7284 -0
  71. package/dist/index.js +31 -0
  72. package/dist/initialization/index.d.ts +2325 -0
  73. package/dist/initialization/index.js +4 -0
  74. package/dist/organization/index.d.ts +225 -0
  75. package/dist/organization/index.js +4 -0
  76. package/dist/profile/index.d.ts +2265 -0
  77. package/dist/profile/index.js +3 -0
  78. package/dist/provider/index.css +61 -0
  79. package/dist/provider/index.d.ts +291 -0
  80. package/dist/provider/index.js +7 -0
  81. package/dist/provider/published.d.ts +198 -0
  82. package/dist/provider/published.js +6 -0
  83. package/dist/router/context.d.ts +19 -0
  84. package/dist/router/context.js +1 -0
  85. package/dist/router/index.d.ts +31 -0
  86. package/dist/router/index.js +2 -0
  87. package/dist/sse/index.d.ts +83 -0
  88. package/dist/sse/index.js +185 -0
  89. package/dist/supabase/index.d.ts +4289 -0
  90. package/dist/supabase/index.js +47 -0
  91. package/dist/typeform/index.d.ts +458 -0
  92. package/dist/typeform/index.js +1976 -0
  93. package/dist/typeform/schemas.d.ts +67 -0
  94. package/dist/typeform/schemas.js +1 -0
  95. package/dist/utils/index.d.ts +177 -0
  96. package/dist/utils/index.js +1 -0
  97. package/package.json +88 -0
@@ -0,0 +1,429 @@
1
+ export { default as graphStyles } from './Graph.module.css';
2
+ import { Node, Edge, NodeMouseHandler, EdgeProps, Position } from '@xyflow/react';
3
+ import * as react from 'react';
4
+ import { MouseEvent, CSSProperties, ReactNode } from 'react';
5
+ import * as react_jsx_runtime from 'react/jsx-runtime';
6
+
7
+ /**
8
+ * Graph Component Constants
9
+ *
10
+ * Shared constants for graph layout, dimensions, and behavior
11
+ */
12
+ declare const GRAPH_CONSTANTS: {
13
+ readonly NODE_WIDTH: 220;
14
+ readonly NODE_HEIGHT: 140;
15
+ readonly HANDLE_SIZE: 12;
16
+ readonly MIN_ZOOM: 0.2;
17
+ readonly MAX_ZOOM: 1.5;
18
+ readonly RANK_SEP: 140;
19
+ readonly NODE_SEP: 60;
20
+ };
21
+
22
+ /**
23
+ * Resource Type Metadata
24
+ *
25
+ * Centralized metadata for ResourceDefinition types including icon names and colors.
26
+ * Icon names reference @tabler/icons-react - UI layer maps these to actual components.
27
+ */
28
+
29
+ /**
30
+ * Node color types for graph visualization
31
+ * Used by both @repo/core (metadata) and @repo/ui (components)
32
+ */
33
+ type NodeColorType = 'violet' | 'blue' | 'orange' | 'teal' | 'gray' | 'yellow';
34
+
35
+ /**
36
+ * Graph Component Types
37
+ *
38
+ * Shared type definitions for graph components
39
+ */
40
+
41
+ type GlowIntensity = 'none' | 'subtle' | 'medium' | 'intense';
42
+ interface GraphThemeColors {
43
+ primary: string;
44
+ agent: string;
45
+ workflow: string;
46
+ trigger: string;
47
+ integration: string;
48
+ approval: string;
49
+ primaryGlow: string;
50
+ agentGlow: string;
51
+ workflowGlow: string;
52
+ triggerGlow: string;
53
+ integrationGlow: string;
54
+ approvalGlow: string;
55
+ edgeTriggers: string;
56
+ edgeUses: string;
57
+ edgeApproval: string;
58
+ edgeTriggersGlow: string;
59
+ edgeUsesGlow: string;
60
+ edgeApprovalGlow: string;
61
+ }
62
+
63
+ /**
64
+ * useGraphTheme - Hook for theme-aware graph colors
65
+ *
66
+ * Returns color values that adapt to light/dark mode for graph elements.
67
+ * Self-contained: derives colors from hardcoded domain palette using color-mix().
68
+ */
69
+
70
+ declare function useGraphTheme(): GraphThemeColors;
71
+
72
+ /**
73
+ * useConnectionHighlight - Hook to track and highlight connected nodes/edges
74
+ *
75
+ * When a node is hovered, highlights all directly connected nodes and edges
76
+ * while dimming unconnected elements for better visual clarity.
77
+ */
78
+
79
+ interface UseConnectionHighlightReturn {
80
+ hoveredNodeId: string | null;
81
+ highlightedNodeIds: Set<string>;
82
+ highlightedEdgeIds: Set<string>;
83
+ onNodeMouseEnter: (nodeId: string) => void;
84
+ onNodeMouseLeave: () => void;
85
+ getNodeClassName: (nodeId: string) => string;
86
+ getEdgeClassName: (edgeId: string) => string;
87
+ }
88
+ /**
89
+ * Hook to manage connection highlighting state
90
+ */
91
+ declare function useConnectionHighlight(nodes: Node[], edges: Edge[]): UseConnectionHighlightReturn;
92
+
93
+ /**
94
+ * useGraphHighlighting - Higher-level hook for connection highlighting
95
+ *
96
+ * Wraps useConnectionHighlight and automatically applies CSS classes to nodes/edges
97
+ * based on hover state. Eliminates boilerplate code in graph components.
98
+ *
99
+ * @example
100
+ * ```tsx
101
+ * const { nodes, edges, handleNodeMouseEnter, handleNodeMouseLeave } =
102
+ * useGraphHighlighting(layoutNodes, layoutEdges)
103
+ *
104
+ * <ReactFlow
105
+ * nodes={nodes}
106
+ * edges={edges}
107
+ * onNodeMouseEnter={handleNodeMouseEnter}
108
+ * onNodeMouseLeave={handleNodeMouseLeave}
109
+ * />
110
+ * ```
111
+ */
112
+
113
+ interface GraphHighlightingResult {
114
+ nodes: Node[];
115
+ edges: Edge[];
116
+ handleNodeMouseEnter: NodeMouseHandler;
117
+ handleNodeMouseLeave: NodeMouseHandler;
118
+ }
119
+ /**
120
+ * Apply connection highlighting to nodes and edges
121
+ *
122
+ * @param layoutNodes - Nodes from layout algorithm (without highlight classes)
123
+ * @param layoutEdges - Edges from layout algorithm (without highlight classes)
124
+ * @returns Nodes/edges with highlight classes and mouse handlers
125
+ */
126
+ declare function useGraphHighlighting(layoutNodes: Node[], layoutEdges: Edge[]): GraphHighlightingResult;
127
+
128
+ /**
129
+ * useDirectedChainHighlighting - Directed chain highlighting for ReactFlow graphs
130
+ *
131
+ * When a node is hovered, highlights all predecessors (upstream) and successors
132
+ * (downstream) following edge direction, while dimming unrelated nodes.
133
+ *
134
+ * Pre-computes directed reachability for O(1) lookup on hover.
135
+ *
136
+ * @example
137
+ * ```tsx
138
+ * const { nodes, edges, handleNodeMouseEnter, handleNodeMouseLeave } =
139
+ * useDirectedChainHighlighting(layoutNodes, layoutEdges)
140
+ *
141
+ * <ReactFlow
142
+ * nodes={nodes}
143
+ * edges={edges}
144
+ * onNodeMouseEnter={handleNodeMouseEnter}
145
+ * onNodeMouseLeave={handleNodeMouseLeave}
146
+ * />
147
+ * ```
148
+ */
149
+
150
+ interface DirectedChainHighlightingOptions {
151
+ /** Optional selected node ID - its chain will always be highlighted */
152
+ selectedNodeId?: string | null;
153
+ }
154
+ interface DirectedChainHighlightingResult<N extends Node, E extends Edge> {
155
+ nodes: N[];
156
+ edges: E[];
157
+ hoveredNodeId: string | null;
158
+ handleNodeMouseEnter: NodeMouseHandler;
159
+ handleNodeMouseLeave: NodeMouseHandler;
160
+ }
161
+ /**
162
+ * Apply directed chain highlighting to graph nodes and edges
163
+ *
164
+ * @param layoutNodes - Nodes from layout algorithm
165
+ * @param layoutEdges - Edges from layout algorithm
166
+ * @param options - Optional configuration (selectedNodeId for persistent chain highlight)
167
+ * @returns Nodes/edges with highlight classes and mouse handlers
168
+ */
169
+ declare function useDirectedChainHighlighting<N extends Node, E extends Edge>(layoutNodes: N[], layoutEdges: E[], options?: DirectedChainHighlightingOptions): DirectedChainHighlightingResult<N, E>;
170
+
171
+ /**
172
+ * Generic hook for handling node selection in ReactFlow graphs
173
+ * Supports both string-based and number-based node IDs
174
+ */
175
+ declare function useNodeSelection<T extends string | number>(selectedId: T | null, onSelect: (id: T | null) => void): {
176
+ handleNodeClick: (event: MouseEvent, node: Node) => void;
177
+ handlePaneClick: () => void;
178
+ handleContainerClick: (event: MouseEvent) => void;
179
+ };
180
+
181
+ /**
182
+ * Hook to trigger fit view when data or nodes change
183
+ *
184
+ * @param data - Data that triggers fit view when changed (e.g., timelineData, iterationData)
185
+ * @param nodes - ReactFlow nodes array
186
+ * @returns fitViewTrigger - Increment value to pass to GraphFitViewHandler
187
+ */
188
+ declare function useFitViewTrigger(data: unknown, nodes: Node[]): number;
189
+
190
+ interface GraphContainerProps {
191
+ children: React.ReactNode;
192
+ height?: number | string;
193
+ }
194
+ /**
195
+ * Returns the animated grid background styles for the current theme.
196
+ * Uses color-mix() with --color-primary so the grid adapts to any preset.
197
+ *
198
+ * @param isDark - Whether dark mode is active
199
+ * @returns CSSProperties object with background styles
200
+ */
201
+ declare function getGraphBackgroundStyles(isDark: boolean): CSSProperties;
202
+ /**
203
+ * Hook that returns the animated grid background styles for the current theme
204
+ *
205
+ * @returns CSSProperties object with background styles
206
+ *
207
+ * @example
208
+ * ```tsx
209
+ * function MyComponent() {
210
+ * const backgroundStyles = useGraphBackgroundStyles()
211
+ *
212
+ * return (
213
+ * <div style={{ ...myStyles, ...backgroundStyles }}>
214
+ * Content
215
+ * </div>
216
+ * )
217
+ * }
218
+ * ```
219
+ */
220
+ declare function useGraphBackgroundStyles(): CSSProperties;
221
+ declare function GraphContainer({ children, height }: GraphContainerProps): react_jsx_runtime.JSX.Element;
222
+ /**
223
+ * GraphBackground - Empty background component (no dots)
224
+ *
225
+ * Usage: Place inside <ReactFlow> component
226
+ */
227
+ declare function GraphBackground(): null;
228
+
229
+ /**
230
+ * GraphLegend - Legend panel for graph visualization
231
+ *
232
+ * Provides:
233
+ * - Theme-aware styling using CSS variables
234
+ * - Colored legend dots (for nodes) or lines (for edges)
235
+ * - Flexible positioning
236
+ */
237
+ interface LegendItem {
238
+ color: string;
239
+ label: string;
240
+ /** Use 'line' for edge legends, 'dot' (default) for node legends */
241
+ type?: 'dot' | 'line';
242
+ }
243
+ interface GraphLegendProps {
244
+ title?: string;
245
+ items: LegendItem[];
246
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
247
+ }
248
+ /**
249
+ * GraphLegend - Main legend component
250
+ *
251
+ * Renders a glassmorphism panel with colored legend items.
252
+ * Can be positioned in any corner of the graph.
253
+ */
254
+ declare function GraphLegend({ title, items, position }: GraphLegendProps): react_jsx_runtime.JSX.Element;
255
+
256
+ /**
257
+ * GraphFitViewButton - Custom fit view button for ReactFlow graphs
258
+ *
259
+ * Supports two variants:
260
+ * - 'reactflow': Native ReactFlow button style
261
+ * - 'mantine': Mantine ActionIcon with theme support
262
+ */
263
+ type FitViewButtonVariant = 'reactflow' | 'mantine';
264
+ interface GraphFitViewButtonProps {
265
+ padding?: number;
266
+ variant?: FitViewButtonVariant;
267
+ duration?: number;
268
+ }
269
+ /**
270
+ * GraphFitViewButton - Custom fit view button for ReactFlow visualizers
271
+ *
272
+ * Usage:
273
+ * ```tsx
274
+ * <ReactFlow>
275
+ * <GraphFitViewButton padding={0.15} variant="mantine" duration={300} />
276
+ * </ReactFlow>
277
+ * ```
278
+ */
279
+ declare function GraphFitViewButton({ padding, variant, duration }: GraphFitViewButtonProps): react_jsx_runtime.JSX.Element;
280
+
281
+ /**
282
+ * GraphFitViewHandler - Programmatic fit view trigger component
283
+ *
284
+ * Used to trigger fitView after animations complete (e.g., Mantine Collapse).
285
+ * Must be placed inside ReactFlow component.
286
+ *
287
+ * @example
288
+ * ```tsx
289
+ * const [fitViewTrigger, setFitViewTrigger] = useState(0)
290
+ *
291
+ * // When collapse expands, trigger fit view
292
+ * const handleExpand = () => {
293
+ * setExpanded(true)
294
+ * setFitViewTrigger(prev => prev + 1)
295
+ * }
296
+ *
297
+ * <ReactFlow>
298
+ * <GraphFitViewHandler trigger={fitViewTrigger} />
299
+ * </ReactFlow>
300
+ * ```
301
+ */
302
+ interface GraphFitViewHandlerProps {
303
+ /**
304
+ * Trigger value - increment to trigger fitView
305
+ * Must be > 0 to trigger
306
+ */
307
+ trigger?: number;
308
+ /**
309
+ * Padding around nodes when fitting view
310
+ * @default 0.15
311
+ */
312
+ padding?: number;
313
+ /**
314
+ * Animation duration in milliseconds
315
+ * @default 300
316
+ */
317
+ duration?: number;
318
+ /**
319
+ * Delay before triggering fitView (to wait for animations)
320
+ * @default 250
321
+ */
322
+ delay?: number;
323
+ }
324
+ /**
325
+ * Invisible component that triggers fitView when trigger value changes
326
+ *
327
+ * @param trigger - Increment this value to trigger fitView
328
+ * @param padding - Padding around nodes (default: 0.15)
329
+ * @param duration - Animation duration in ms (default: 300)
330
+ * @param delay - Delay before triggering in ms (default: 250)
331
+ */
332
+ declare function GraphFitViewHandler({ trigger, padding, duration, delay }: GraphFitViewHandlerProps): null;
333
+
334
+ interface BaseNodeProps {
335
+ children: ReactNode;
336
+ color: NodeColorType;
337
+ selected?: boolean;
338
+ highlighted?: boolean;
339
+ width?: number;
340
+ className?: string;
341
+ /** Handle layout direction: 'horizontal' (left/right) or 'vertical' (top/bottom) */
342
+ handleDirection?: 'horizontal' | 'vertical';
343
+ /** Whether to render the source (outgoing) handle. Default: true */
344
+ showSourceHandle?: boolean;
345
+ /** Whether to render the target (incoming) handle. Default: true */
346
+ showTargetHandle?: boolean;
347
+ }
348
+ declare const BaseNode: react.NamedExoticComponent<BaseNodeProps>;
349
+
350
+ interface BaseEdgeProps {
351
+ id: string;
352
+ sourceX: number;
353
+ sourceY: number;
354
+ targetX: number;
355
+ targetY: number;
356
+ sourcePosition: EdgeProps['sourcePosition'];
357
+ targetPosition: EdgeProps['targetPosition'];
358
+ color: string;
359
+ glowColor: string;
360
+ label?: string;
361
+ animated?: boolean;
362
+ selected?: boolean;
363
+ dimmed?: boolean;
364
+ edgeIndex?: number;
365
+ totalEdges?: number;
366
+ }
367
+ declare const BaseEdge: react.NamedExoticComponent<BaseEdgeProps>;
368
+
369
+ interface GlowingHandleProps {
370
+ type: 'source' | 'target';
371
+ position: Position;
372
+ color: NodeColorType;
373
+ id?: string;
374
+ }
375
+ declare function GlowingHandle({ type, position, color: _color, id }: GlowingHandleProps): react_jsx_runtime.JSX.Element;
376
+
377
+ /**
378
+ * calculateGraphHeight - Dynamic height calculation for graph containers
379
+ *
380
+ * Calculates container height based on item count with min/max bounds.
381
+ * Useful for graphs that grow with content (workflow steps, knowledge nodes, etc.)
382
+ *
383
+ * @example
384
+ * ```tsx
385
+ * const containerHeight = calculateGraphHeight({
386
+ * itemCount: workflow.steps.length,
387
+ * minHeight: 300,
388
+ * maxHeight: 500,
389
+ * heightPerItem: 80
390
+ * })
391
+ *
392
+ * <div style={{ height: containerHeight }}>
393
+ * <ReactFlow ... />
394
+ * </div>
395
+ * ```
396
+ */
397
+ interface GraphHeightOptions {
398
+ /**
399
+ * Number of items to calculate height for
400
+ */
401
+ itemCount: number;
402
+ /**
403
+ * Minimum container height in pixels
404
+ * @default 300
405
+ */
406
+ minHeight?: number;
407
+ /**
408
+ * Maximum container height in pixels
409
+ * @default 500
410
+ */
411
+ maxHeight?: number;
412
+ /**
413
+ * Additional height per item in pixels
414
+ * @default 80
415
+ */
416
+ heightPerItem?: number;
417
+ }
418
+ /**
419
+ * Calculate dynamic container height based on item count
420
+ *
421
+ * Formula: min(minHeight + (itemCount * heightPerItem), maxHeight)
422
+ *
423
+ * @param options - Configuration for height calculation
424
+ * @returns Container height in pixels
425
+ */
426
+ declare function calculateGraphHeight({ itemCount, minHeight, maxHeight, heightPerItem }: GraphHeightOptions): number;
427
+
428
+ export { BaseEdge, BaseNode, GRAPH_CONSTANTS, GlowingHandle, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, calculateGraphHeight, getGraphBackgroundStyles, useConnectionHighlight, useDirectedChainHighlighting, useFitViewTrigger, useGraphBackgroundStyles, useGraphHighlighting, useGraphTheme, useNodeSelection };
429
+ export type { DirectedChainHighlightingOptions, DirectedChainHighlightingResult, FitViewButtonVariant, GlowIntensity, GraphFitViewHandlerProps, GraphHeightOptions, GraphHighlightingResult, GraphThemeColors, NodeColorType };
@@ -0,0 +1 @@
1
+ export { BaseEdge, BaseNode, GRAPH_CONSTANTS, GlowingHandle, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, calculateGraphHeight, getGraphBackgroundStyles, Graph_default as graphStyles, useConnectionHighlight, useDirectedChainHighlighting, useFitViewTrigger, useGraphBackgroundStyles, useGraphHighlighting, useGraphTheme, useNodeSelection } from '../chunk-HUWJXLLF.js';