@principal-ai/subsystems-react 0.17.0 → 0.18.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/index.d.ts +7 -44
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -32
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +9 -199
- package/src/components/ConfigurationSelector.tsx +0 -133
- package/src/components/GraphRenderer.tsx +0 -3195
- package/src/components/MultiCanvasRenderer.tsx +0 -295
- package/src/components/NodeTooltip.tsx +0 -279
- package/src/components/PendingChanges.test.tsx +0 -375
- package/src/components/SelectionSidebar.tsx +0 -352
- package/src/components/SequenceDiagramRenderer.tsx +0 -1156
- package/src/components/WorkflowSequenceDiagram.tsx +0 -270
- package/src/components/dashboard/DashboardRenderer.tsx +0 -317
- package/src/components/dashboard/MetricPanel.tsx +0 -254
- package/src/components/dashboard/MockDataProvider.ts +0 -330
- package/src/components/dashboard/components/BarChart.tsx +0 -299
- package/src/components/dashboard/components/LineChart.tsx +0 -279
- package/src/components/dashboard/components/MetricCard.tsx +0 -270
- package/src/components/dashboard/components/SourceLink.tsx +0 -63
- package/src/components/dashboard/components/TimeRangeSelector.tsx +0 -280
- package/src/components/dashboard/components/index.ts +0 -5
- package/src/components/dashboard/index.ts +0 -47
- package/src/components/dashboard/types.ts +0 -126
- package/src/components/state-view/PipelineView.tsx +0 -347
- package/src/components/state-view/index.ts +0 -14
- package/src/components/state-view/types.ts +0 -261
- package/src/components/state-view/useStateView.ts +0 -205
- package/src/contexts/GraphEditContext.tsx +0 -27
- package/src/contexts/TooltipPortalContext.ts +0 -8
- package/src/edges/CustomEdge.tsx +0 -402
- package/src/edges/GenericEdge.tsx +0 -36
- package/src/hooks/usePathBasedEvents.ts +0 -192
- package/src/hooks/useSequenceLayout.ts +0 -543
- package/src/hooks/useUndoRedo.ts +0 -144
- package/src/nodes/CustomNode.tsx +0 -1231
- package/src/nodes/GenericNode.tsx +0 -55
- package/src/nodes/otel/OtelBoundaryNode.tsx +0 -224
- package/src/nodes/otel/OtelEventNode.tsx +0 -225
- package/src/nodes/otel/OtelResourceNode.tsx +0 -251
- package/src/nodes/otel/OtelScopeNode.tsx +0 -221
- package/src/nodes/otel/OtelSpanConventionNode.tsx +0 -295
- package/src/nodes/otel/index.ts +0 -23
- package/src/nodes/otel/shared/NodeBadges.tsx +0 -295
- package/src/nodes/otel/shared/NodeContent.tsx +0 -204
- package/src/nodes/otel/shared/index.ts +0 -8
- package/src/nodes/otel/shared/types.ts +0 -138
- package/src/nodes/otel/shared/useNodeBehavior.ts +0 -114
- package/src/stories/Audit/BoundaryNodes.stories.tsx +0 -385
- package/src/stories/Audit/CanvasEdgeTypes.stories.tsx +0 -1448
- package/src/stories/Audit/CanvasNodeTypes.stories.tsx +0 -1049
- package/src/stories/Audit/ColorPriority.stories.tsx +0 -895
- package/src/stories/Audit/DiamondBadges.stories.tsx +0 -629
- package/src/stories/Audit/NodeDimensionsTesting.stories.tsx +0 -724
- package/src/stories/Audit/NodeFieldsAudit.stories.tsx +0 -996
- package/src/stories/Audit/NodeFontSizeTesting.stories.tsx +0 -715
- package/src/stories/Audit/NodeShapes.stories.tsx +0 -1208
- package/src/stories/Audit/WideNodesTesting.stories.tsx +0 -1045
- package/src/stories/Components/DashboardRenderer.stories.tsx +0 -263
- package/src/stories/Components/GraphRenderer.stories.tsx +0 -3236
- package/src/stories/Components/MultiCanvasRenderer.stories.tsx +0 -370
- package/src/stories/Components/SequenceDiagram.stories.tsx +0 -255
- package/src/stories/Components/StateView.stories.tsx +0 -417
- package/src/stories/Components/TraceViewer.stories.tsx +0 -442
- package/src/stories/Components/WorkflowSequenceDiagram.stories.tsx +0 -802
- package/src/stories/Features/AnimationWorkshop.stories.tsx +0 -727
- package/src/stories/Features/ChangeTypeVisual.stories.tsx +0 -67
- package/src/stories/Features/EventDrivenAnimations.stories.tsx +0 -513
- package/src/stories/Features/MultiConfig.stories.tsx +0 -539
- package/src/stories/Layout/ElkEdgeRouting.stories.tsx +0 -539
- package/src/stories/Layout/GraphOrientation.stories.tsx +0 -500
- package/src/stories/Layout/MultiDirectionalConnections.stories.tsx +0 -352
- package/src/stories/Nodes/NodeDefinitionComparison.stories.tsx +0 -560
- package/src/stories/Nodes/NodeNameFallbacks.stories.tsx +0 -491
- package/src/stories/Nodes/NumericColors.stories.tsx +0 -440
- package/src/stories/OTEL/EventNameDisplay.stories.tsx +0 -694
- package/src/stories/OTEL/EventNameFallback.stories.tsx +0 -578
- package/src/stories/OTEL/OtelComponents.stories.tsx +0 -422
- package/src/stories/OTEL/OtelNodeTypesPrototype.stories.tsx +0 -806
- package/src/stories/OTEL/RawEventCards.stories.tsx +0 -57
- package/src/stories/OTEL/SpanBadges.stories.tsx +0 -840
- package/src/stories/OTEL/ValidationEventsCanvas.stories.tsx +0 -209
- package/src/stories/RealWorld/BacklogMdCanvases.stories.tsx +0 -721
- package/src/stories/RealWorld/FileCitySequence.stories.tsx +0 -516
- package/src/stories/RealWorld/RealCanvasFiles.stories.tsx +0 -336
- package/src/stories/__traces__/test-run.canvas.json +0 -241
- package/src/stories/data/activity-feed-analytics.dashboard.json +0 -300
- package/src/stories/data/file-city-images-transformed.otel.canvas.json +0 -295
- package/src/stories/data/file-city-workflows.json +0 -269
- package/src/stories/data/graph-converter-test-execution.json +0 -443
- package/src/stories/data/graph-converter-test.workflow.json +0 -105
- package/src/stories/data/graph-converter-validated-execution.json +0 -58
- package/src/utils/animationMapping.ts +0 -166
- package/src/utils/canvasBounds.ts +0 -146
- package/src/utils/graphConverter.ts +0 -148
- package/src/utils/iconResolver.tsx +0 -53
- package/src/utils/orientationUtils.ts +0 -73
package/dist/index.d.ts
CHANGED
|
@@ -1,50 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @principal-ai/
|
|
3
|
-
* React components for graph-based visual validation framework
|
|
2
|
+
* @principal-ai/subsystems-react
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* React UI for Subsystem Models (graph, Pierre code views, graphify helpers)
|
|
5
|
+
* plus session-event feeds used by Subsystems Studio.
|
|
7
6
|
*/
|
|
8
|
-
export type { GraphConfiguration, GraphEvent, GraphMetrics, Violation, Warning, ValidationResult, EventStream, NodeTypeDefinition, EdgeTypeDefinition, ConnectionRule, NodeState, EdgeState, ConfigurationFile, ConfigurationLoadResult, ComponentLibrary, } from '@principal-ai/subsystems-core';
|
|
9
|
-
export { GraphRenderer } from './components/GraphRenderer';
|
|
10
|
-
export type { GraphRendererProps, GraphRendererHandle, NodePositionChange, PendingChanges, } from './components/GraphRenderer';
|
|
11
|
-
export { SequenceDiagramRenderer } from './components/SequenceDiagramRenderer';
|
|
12
|
-
export type { SequenceDiagramRendererProps } from './components/SequenceDiagramRenderer';
|
|
13
|
-
export { WorkflowSequenceDiagram } from './components/WorkflowSequenceDiagram';
|
|
14
|
-
export type { WorkflowSequenceDiagramProps } from './components/WorkflowSequenceDiagram';
|
|
15
|
-
export { useSequenceLayout } from './hooks/useSequenceLayout';
|
|
16
|
-
export type { SequenceEvent, SequenceEdge, Swimlane, UseSequenceLayoutOptions, UseSequenceLayoutResult, } from './hooks/useSequenceLayout';
|
|
17
|
-
export { MultiCanvasRenderer, mergeCanvases, parseNodeId } from './components/MultiCanvasRenderer';
|
|
18
|
-
export type { MultiCanvasRendererProps, MultiCanvasLayout, CanvasPlacement, } from './components/MultiCanvasRenderer';
|
|
19
|
-
export { ConfigurationSelector } from './components/ConfigurationSelector';
|
|
20
|
-
export type { ConfigurationSelectorProps } from './components/ConfigurationSelector';
|
|
21
|
-
export { GenericNode } from './nodes/GenericNode';
|
|
22
|
-
export type { GenericNodeProps } from './nodes/GenericNode';
|
|
23
|
-
export { CustomNode } from './nodes/CustomNode';
|
|
24
|
-
export type { CustomNodeData } from './nodes/CustomNode';
|
|
25
|
-
export { OtelSpanConventionNode, OtelEventNode, OtelScopeNode, OtelResourceNode, OtelBoundaryNode, } from './nodes/otel';
|
|
26
|
-
export type { OtelSpanConventionNodeData, OtelEventNodeData, OtelScopeNodeData, OtelResourceNodeData, OtelBoundaryNodeData, WorkflowChip, } from './nodes/otel';
|
|
27
|
-
export { GenericEdge } from './edges/GenericEdge';
|
|
28
|
-
export type { GenericEdgeProps } from './edges/GenericEdge';
|
|
29
|
-
export { CustomEdge } from './edges/CustomEdge';
|
|
30
|
-
export type { CustomEdgeData } from './edges/CustomEdge';
|
|
31
|
-
export { NodeTooltip } from './components/NodeTooltip';
|
|
32
|
-
export type { NodeTooltipProps, OtelInfo } from './components/NodeTooltip';
|
|
33
|
-
export { convertToXYFlowNodes, convertToXYFlowEdges, } from './utils/graphConverter';
|
|
34
|
-
export type { EdgeStateWithHandles } from './utils/graphConverter';
|
|
35
|
-
export { Icon, resolveIcon } from './utils/iconResolver';
|
|
36
|
-
export type { IconProps } from './utils/iconResolver';
|
|
37
|
-
export { swapGraphOrientation, swapNodePositions, swapEdgeSides, } from './utils/orientationUtils';
|
|
38
|
-
export { getCanvasBounds, getCanvasDisplaySize, calculateInitialViewport } from './utils/canvasBounds';
|
|
39
|
-
export type { CanvasBounds, Viewport } from './utils/canvasBounds';
|
|
40
|
-
export { computeElkLayout, createElkLayouter } from './utils/elkLayout';
|
|
41
|
-
export type { ElkLayoutOptions, ElkLayoutResult, ElkRoutingStyle } from './utils/elkLayout';
|
|
42
|
-
export { useElkLayout, applyElkPathsToEdges } from './hooks/useElkLayout';
|
|
43
|
-
export type { UseElkLayoutOptions, UseElkLayoutResult } from './hooks/useElkLayout';
|
|
44
|
-
export { DashboardRenderer, MetricPanel, MetricCard, LineChart, BarChart, SourceLink, TimeRangeSelector, MockDataProvider, createMockDataProvider, } from './components/dashboard';
|
|
45
|
-
export type { DashboardDefinition, MetricDefinition, MetricType, MetricSource, MetricQuery, Derivation, TimeGroup, AlertDefinition, MetricDisplay, DisplayComponent, DashboardLayout, DashboardRow, PanelPlacement, TimeRangePreset, TimeRange, RefreshInterval, TimeRangeConfig, MockMetricData, TimeSeriesPoint, HistogramData, MetricData, DataProvider, DashboardRendererProps, MetricPanelProps, MetricCardProps, LineChartProps, BarChartProps, SourceLinkProps, TimeRangeSelectorProps, } from './components/dashboard';
|
|
46
|
-
export { PipelineView, useStateView } from './components/state-view';
|
|
47
|
-
export type { StateEvent, EventSource, StateReducer, StateDiff, TransitionDefinition, ActiveAnimation, AnimationType, ReplayControls, StateViewDefinition, PipelineState, PipelineStage, PipelineRepoState, PipelineEvent, PipelineEventType, ActivityState, RoomState, ActivityEvent, ActivityEventType, QuotaDistributionState, UserQuotaState, QuotaEvent, QuotaEventType, UseStateViewOptions, UseStateViewResult, PipelineViewProps, } from './components/state-view';
|
|
48
7
|
export { SessionEventFeed, SessionEventFeedGrouped, } from './components/session-events';
|
|
49
8
|
export type { SessionEventFeedProps, SessionEventFeedGroupedProps, SessionEventFeedRow, } from './components/session-events';
|
|
50
9
|
export type { JsonValue, GraphifyFileType, GraphifyConfidence, GraphifyNodeType, GraphifyRelation, GraphifyNode, GraphifyEdge, GraphifyHyperedge, GraphifyGraphMetadata, GraphifyGraph, } from './graphify';
|
|
@@ -52,6 +11,10 @@ export type { GraphifyAnchorResolution, SubsystemGraphifyAnchor, GraphifyMethodI
|
|
|
52
11
|
export type { GraphifyTypeRefStatus, GraphifyTypeRefResolution, } from './graphify';
|
|
53
12
|
export { normalizeGraphifyLabel, createGraphifyTypeResolver, resolveGraphifyTypeRef, normalizeGraphifyId, makeGraphifyId, graphifyFileStem, normalizeSourcePath, resolveComponentAnchor, symbolLabelVariants, inferGraphifyKind, kindsMatch, extractNamedTypes, extractGraphifySignature, compareSignatures, } from './graphify';
|
|
54
13
|
export type { ComponentAnchorInput, ComponentAnchorResult, InferredGraphifyKind, InferGraphifyKindResult, GraphifyInferredSignature, ClaimedSignature, SignatureCompareResult, } from './graphify';
|
|
14
|
+
export { computeElkLayout, createElkLayouter } from './utils/elkLayout';
|
|
15
|
+
export type { ElkLayoutOptions, ElkLayoutResult, ElkRoutingStyle } from './utils/elkLayout';
|
|
16
|
+
export { useElkLayout, applyElkPathsToEdges } from './hooks/useElkLayout';
|
|
17
|
+
export type { UseElkLayoutOptions, UseElkLayoutResult } from './hooks/useElkLayout';
|
|
55
18
|
export { SubsystemComponentGraph } from './subsystem/SubsystemComponentGraph';
|
|
56
19
|
export type { SubsystemComponentGraphProps, ThroughlineViewerContext } from './subsystem/SubsystemComponentGraph';
|
|
57
20
|
export type { ComponentVerificationState, ComponentVerificationPhase, ComponentDeclarationProps, } from './subsystem/ComponentDeclaration';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/dist/index.js
CHANGED
|
@@ -1,41 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @principal-ai/
|
|
3
|
-
* React components for graph-based visual validation framework
|
|
2
|
+
* @principal-ai/subsystems-react
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* React UI for Subsystem Models (graph, Pierre code views, graphify helpers)
|
|
5
|
+
* plus session-event feeds used by Subsystems Studio.
|
|
7
6
|
*/
|
|
8
|
-
// Export components
|
|
9
|
-
export { GraphRenderer } from './components/GraphRenderer';
|
|
10
|
-
export { SequenceDiagramRenderer } from './components/SequenceDiagramRenderer';
|
|
11
|
-
export { WorkflowSequenceDiagram } from './components/WorkflowSequenceDiagram';
|
|
12
|
-
export { useSequenceLayout } from './hooks/useSequenceLayout';
|
|
13
|
-
export { MultiCanvasRenderer, mergeCanvases, parseNodeId } from './components/MultiCanvasRenderer';
|
|
14
|
-
export { ConfigurationSelector } from './components/ConfigurationSelector';
|
|
15
|
-
// Export node/edge renderers
|
|
16
|
-
export { GenericNode } from './nodes/GenericNode';
|
|
17
|
-
export { CustomNode } from './nodes/CustomNode';
|
|
18
|
-
// Export OTEL node components
|
|
19
|
-
export { OtelSpanConventionNode, OtelEventNode, OtelScopeNode, OtelResourceNode, OtelBoundaryNode, } from './nodes/otel';
|
|
20
|
-
export { GenericEdge } from './edges/GenericEdge';
|
|
21
|
-
export { CustomEdge } from './edges/CustomEdge';
|
|
22
|
-
// Export tooltip component
|
|
23
|
-
export { NodeTooltip } from './components/NodeTooltip';
|
|
24
|
-
// Export utilities
|
|
25
|
-
export { convertToXYFlowNodes, convertToXYFlowEdges, } from './utils/graphConverter';
|
|
26
|
-
export { Icon, resolveIcon } from './utils/iconResolver';
|
|
27
|
-
export { swapGraphOrientation, swapNodePositions, swapEdgeSides, } from './utils/orientationUtils';
|
|
28
|
-
export { getCanvasBounds, getCanvasDisplaySize, calculateInitialViewport } from './utils/canvasBounds';
|
|
29
|
-
// ELK layout utilities for circuit-board style edge routing
|
|
30
|
-
export { computeElkLayout, createElkLayouter } from './utils/elkLayout';
|
|
31
|
-
export { useElkLayout, applyElkPathsToEdges } from './hooks/useElkLayout';
|
|
32
|
-
// Dashboard components for rendering metrics from dashboard definition files
|
|
33
|
-
export { DashboardRenderer, MetricPanel, MetricCard, LineChart, BarChart, SourceLink, TimeRangeSelector, MockDataProvider, createMockDataProvider, } from './components/dashboard';
|
|
34
|
-
// State View components for event-driven state visualization
|
|
35
|
-
export { PipelineView, useStateView } from './components/state-view';
|
|
36
7
|
// Session event diagnostic feed (raw → repo-normalized → accumulated)
|
|
37
8
|
export { SessionEventFeed, SessionEventFeedGrouped, } from './components/session-events';
|
|
38
9
|
export { normalizeGraphifyLabel, createGraphifyTypeResolver, resolveGraphifyTypeRef, normalizeGraphifyId, makeGraphifyId, graphifyFileStem, normalizeSourcePath, resolveComponentAnchor, symbolLabelVariants, inferGraphifyKind, kindsMatch, extractNamedTypes, extractGraphifySignature, compareSignatures, } from './graphify';
|
|
10
|
+
// ELK layout utilities
|
|
11
|
+
export { computeElkLayout, createElkLayouter } from './utils/elkLayout';
|
|
12
|
+
export { useElkLayout, applyElkPathsToEdges } from './hooks/useElkLayout';
|
|
39
13
|
// Subsystem component graph
|
|
40
14
|
export { SubsystemComponentGraph } from './subsystem/SubsystemComponentGraph';
|
|
41
15
|
export { ComponentDeclaration } from './subsystem/ComponentDeclaration';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,sEAAsE;AACtE,OAAO,EACL,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AAyCrC,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAWpB,uBAAuB;AACvB,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG1E,4BAA4B;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAO9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAC3F,OAAO,EACL,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,aAAa,GACd,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAchE,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,UAAU,EACV,UAAU,GACX,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AAEpC,6CAA6C;AAC7C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principal-ai/subsystems-react",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "React
|
|
3
|
+
"version": "0.18.0",
|
|
4
|
+
"description": "React UI for Subsystem Models — graph, Pierre code views, and session-event feeds",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
package/src/index.ts
CHANGED
|
@@ -1,206 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @principal-ai/
|
|
3
|
-
* React components for graph-based visual validation framework
|
|
2
|
+
* @principal-ai/subsystems-react
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* React UI for Subsystem Models (graph, Pierre code views, graphify helpers)
|
|
5
|
+
* plus session-event feeds used by Subsystems Studio.
|
|
7
6
|
*/
|
|
8
7
|
|
|
9
|
-
// Re-export types from core
|
|
10
|
-
export type {
|
|
11
|
-
GraphConfiguration,
|
|
12
|
-
GraphEvent,
|
|
13
|
-
GraphMetrics,
|
|
14
|
-
Violation,
|
|
15
|
-
Warning,
|
|
16
|
-
ValidationResult,
|
|
17
|
-
EventStream,
|
|
18
|
-
NodeTypeDefinition,
|
|
19
|
-
EdgeTypeDefinition,
|
|
20
|
-
ConnectionRule,
|
|
21
|
-
NodeState,
|
|
22
|
-
EdgeState,
|
|
23
|
-
ConfigurationFile,
|
|
24
|
-
ConfigurationLoadResult,
|
|
25
|
-
// Library types for loading .principal-views/library.yaml
|
|
26
|
-
ComponentLibrary,
|
|
27
|
-
} from '@principal-ai/subsystems-core';
|
|
28
|
-
|
|
29
|
-
// Export components
|
|
30
|
-
export { GraphRenderer } from './components/GraphRenderer';
|
|
31
|
-
export type {
|
|
32
|
-
GraphRendererProps,
|
|
33
|
-
GraphRendererHandle,
|
|
34
|
-
NodePositionChange,
|
|
35
|
-
PendingChanges,
|
|
36
|
-
} from './components/GraphRenderer';
|
|
37
|
-
|
|
38
|
-
export { SequenceDiagramRenderer } from './components/SequenceDiagramRenderer';
|
|
39
|
-
export type { SequenceDiagramRendererProps } from './components/SequenceDiagramRenderer';
|
|
40
|
-
|
|
41
|
-
export { WorkflowSequenceDiagram } from './components/WorkflowSequenceDiagram';
|
|
42
|
-
export type { WorkflowSequenceDiagramProps } from './components/WorkflowSequenceDiagram';
|
|
43
|
-
|
|
44
|
-
export { useSequenceLayout } from './hooks/useSequenceLayout';
|
|
45
|
-
export type {
|
|
46
|
-
SequenceEvent,
|
|
47
|
-
SequenceEdge,
|
|
48
|
-
Swimlane,
|
|
49
|
-
UseSequenceLayoutOptions,
|
|
50
|
-
UseSequenceLayoutResult,
|
|
51
|
-
} from './hooks/useSequenceLayout';
|
|
52
|
-
|
|
53
|
-
export { MultiCanvasRenderer, mergeCanvases, parseNodeId } from './components/MultiCanvasRenderer';
|
|
54
|
-
export type {
|
|
55
|
-
MultiCanvasRendererProps,
|
|
56
|
-
MultiCanvasLayout,
|
|
57
|
-
CanvasPlacement,
|
|
58
|
-
} from './components/MultiCanvasRenderer';
|
|
59
|
-
|
|
60
|
-
export { ConfigurationSelector } from './components/ConfigurationSelector';
|
|
61
|
-
export type { ConfigurationSelectorProps } from './components/ConfigurationSelector';
|
|
62
|
-
|
|
63
|
-
// Export node/edge renderers
|
|
64
|
-
export { GenericNode } from './nodes/GenericNode';
|
|
65
|
-
export type { GenericNodeProps } from './nodes/GenericNode';
|
|
66
|
-
|
|
67
|
-
export { CustomNode } from './nodes/CustomNode';
|
|
68
|
-
export type { CustomNodeData } from './nodes/CustomNode';
|
|
69
|
-
|
|
70
|
-
// Export OTEL node components
|
|
71
|
-
export {
|
|
72
|
-
OtelSpanConventionNode,
|
|
73
|
-
OtelEventNode,
|
|
74
|
-
OtelScopeNode,
|
|
75
|
-
OtelResourceNode,
|
|
76
|
-
OtelBoundaryNode,
|
|
77
|
-
} from './nodes/otel';
|
|
78
|
-
export type {
|
|
79
|
-
OtelSpanConventionNodeData,
|
|
80
|
-
OtelEventNodeData,
|
|
81
|
-
OtelScopeNodeData,
|
|
82
|
-
OtelResourceNodeData,
|
|
83
|
-
OtelBoundaryNodeData,
|
|
84
|
-
WorkflowChip,
|
|
85
|
-
} from './nodes/otel';
|
|
86
|
-
|
|
87
|
-
export { GenericEdge } from './edges/GenericEdge';
|
|
88
|
-
export type { GenericEdgeProps } from './edges/GenericEdge';
|
|
89
|
-
|
|
90
|
-
export { CustomEdge } from './edges/CustomEdge';
|
|
91
|
-
export type { CustomEdgeData } from './edges/CustomEdge';
|
|
92
|
-
|
|
93
|
-
// Export tooltip component
|
|
94
|
-
export { NodeTooltip } from './components/NodeTooltip';
|
|
95
|
-
export type { NodeTooltipProps, OtelInfo } from './components/NodeTooltip';
|
|
96
|
-
|
|
97
|
-
// Export utilities
|
|
98
|
-
export {
|
|
99
|
-
convertToXYFlowNodes,
|
|
100
|
-
convertToXYFlowEdges,
|
|
101
|
-
} from './utils/graphConverter';
|
|
102
|
-
export type { EdgeStateWithHandles } from './utils/graphConverter';
|
|
103
|
-
export { Icon, resolveIcon } from './utils/iconResolver';
|
|
104
|
-
export type { IconProps } from './utils/iconResolver';
|
|
105
|
-
export {
|
|
106
|
-
swapGraphOrientation,
|
|
107
|
-
swapNodePositions,
|
|
108
|
-
swapEdgeSides,
|
|
109
|
-
} from './utils/orientationUtils';
|
|
110
|
-
export { getCanvasBounds, getCanvasDisplaySize, calculateInitialViewport } from './utils/canvasBounds';
|
|
111
|
-
export type { CanvasBounds, Viewport } from './utils/canvasBounds';
|
|
112
|
-
|
|
113
|
-
// ELK layout utilities for circuit-board style edge routing
|
|
114
|
-
export { computeElkLayout, createElkLayouter } from './utils/elkLayout';
|
|
115
|
-
export type { ElkLayoutOptions, ElkLayoutResult, ElkRoutingStyle } from './utils/elkLayout';
|
|
116
|
-
export { useElkLayout, applyElkPathsToEdges } from './hooks/useElkLayout';
|
|
117
|
-
export type { UseElkLayoutOptions, UseElkLayoutResult } from './hooks/useElkLayout';
|
|
118
|
-
|
|
119
|
-
// Dashboard components for rendering metrics from dashboard definition files
|
|
120
|
-
export {
|
|
121
|
-
DashboardRenderer,
|
|
122
|
-
MetricPanel,
|
|
123
|
-
MetricCard,
|
|
124
|
-
LineChart,
|
|
125
|
-
BarChart,
|
|
126
|
-
SourceLink,
|
|
127
|
-
TimeRangeSelector,
|
|
128
|
-
MockDataProvider,
|
|
129
|
-
createMockDataProvider,
|
|
130
|
-
} from './components/dashboard';
|
|
131
|
-
export type {
|
|
132
|
-
// Dashboard definition types
|
|
133
|
-
DashboardDefinition,
|
|
134
|
-
MetricDefinition,
|
|
135
|
-
MetricType,
|
|
136
|
-
MetricSource,
|
|
137
|
-
MetricQuery,
|
|
138
|
-
Derivation,
|
|
139
|
-
TimeGroup,
|
|
140
|
-
AlertDefinition,
|
|
141
|
-
MetricDisplay,
|
|
142
|
-
DisplayComponent,
|
|
143
|
-
DashboardLayout,
|
|
144
|
-
DashboardRow,
|
|
145
|
-
PanelPlacement,
|
|
146
|
-
// Time range types
|
|
147
|
-
TimeRangePreset,
|
|
148
|
-
TimeRange,
|
|
149
|
-
RefreshInterval,
|
|
150
|
-
TimeRangeConfig,
|
|
151
|
-
// Mock data types
|
|
152
|
-
MockMetricData,
|
|
153
|
-
TimeSeriesPoint,
|
|
154
|
-
HistogramData,
|
|
155
|
-
// Runtime types
|
|
156
|
-
MetricData,
|
|
157
|
-
DataProvider,
|
|
158
|
-
// Component props
|
|
159
|
-
DashboardRendererProps,
|
|
160
|
-
MetricPanelProps,
|
|
161
|
-
MetricCardProps,
|
|
162
|
-
LineChartProps,
|
|
163
|
-
BarChartProps,
|
|
164
|
-
SourceLinkProps,
|
|
165
|
-
TimeRangeSelectorProps,
|
|
166
|
-
} from './components/dashboard';
|
|
167
|
-
|
|
168
|
-
// State View components for event-driven state visualization
|
|
169
|
-
export { PipelineView, useStateView } from './components/state-view';
|
|
170
|
-
export type {
|
|
171
|
-
// Core types
|
|
172
|
-
StateEvent,
|
|
173
|
-
EventSource,
|
|
174
|
-
StateReducer,
|
|
175
|
-
StateDiff,
|
|
176
|
-
TransitionDefinition,
|
|
177
|
-
ActiveAnimation,
|
|
178
|
-
AnimationType,
|
|
179
|
-
ReplayControls,
|
|
180
|
-
StateViewDefinition,
|
|
181
|
-
// Pipeline view types
|
|
182
|
-
PipelineState,
|
|
183
|
-
PipelineStage,
|
|
184
|
-
PipelineRepoState,
|
|
185
|
-
PipelineEvent,
|
|
186
|
-
PipelineEventType,
|
|
187
|
-
// Activity view types
|
|
188
|
-
ActivityState,
|
|
189
|
-
RoomState,
|
|
190
|
-
ActivityEvent,
|
|
191
|
-
ActivityEventType,
|
|
192
|
-
// Quota view types
|
|
193
|
-
QuotaDistributionState,
|
|
194
|
-
UserQuotaState,
|
|
195
|
-
QuotaEvent,
|
|
196
|
-
QuotaEventType,
|
|
197
|
-
// Hook types
|
|
198
|
-
UseStateViewOptions,
|
|
199
|
-
UseStateViewResult,
|
|
200
|
-
// Component props
|
|
201
|
-
PipelineViewProps,
|
|
202
|
-
} from './components/state-view';
|
|
203
|
-
|
|
204
8
|
// Session event diagnostic feed (raw → repo-normalized → accumulated)
|
|
205
9
|
export {
|
|
206
10
|
SessionEventFeed,
|
|
@@ -272,6 +76,12 @@ export type {
|
|
|
272
76
|
SignatureCompareResult,
|
|
273
77
|
} from './graphify';
|
|
274
78
|
|
|
79
|
+
// ELK layout utilities
|
|
80
|
+
export { computeElkLayout, createElkLayouter } from './utils/elkLayout';
|
|
81
|
+
export type { ElkLayoutOptions, ElkLayoutResult, ElkRoutingStyle } from './utils/elkLayout';
|
|
82
|
+
export { useElkLayout, applyElkPathsToEdges } from './hooks/useElkLayout';
|
|
83
|
+
export type { UseElkLayoutOptions, UseElkLayoutResult } from './hooks/useElkLayout';
|
|
84
|
+
|
|
275
85
|
// Subsystem component graph
|
|
276
86
|
export { SubsystemComponentGraph } from './subsystem/SubsystemComponentGraph';
|
|
277
87
|
export type { SubsystemComponentGraphProps, ThroughlineViewerContext } from './subsystem/SubsystemComponentGraph';
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ConfigurationFile } from '@principal-ai/subsystems-core';
|
|
3
|
-
|
|
4
|
-
export interface ConfigurationSelectorProps {
|
|
5
|
-
/** Available configurations */
|
|
6
|
-
configurations: ConfigurationFile[];
|
|
7
|
-
|
|
8
|
-
/** Currently selected configuration name */
|
|
9
|
-
selectedConfig: string;
|
|
10
|
-
|
|
11
|
-
/** Callback when configuration changes */
|
|
12
|
-
onConfigChange: (configName: string) => void;
|
|
13
|
-
|
|
14
|
-
/** Optional custom className */
|
|
15
|
-
className?: string;
|
|
16
|
-
|
|
17
|
-
/** Optional custom styles */
|
|
18
|
-
style?: React.CSSProperties;
|
|
19
|
-
|
|
20
|
-
/** Whether to show description */
|
|
21
|
-
showDescription?: boolean;
|
|
22
|
-
|
|
23
|
-
/** Label text for the selector */
|
|
24
|
-
label?: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Configuration selector component for switching between multiple graph configurations
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```tsx
|
|
32
|
-
* const [selectedConfig, setSelectedConfig] = useState('simple-service');
|
|
33
|
-
*
|
|
34
|
-
* <ConfigurationSelector
|
|
35
|
-
* configurations={loadedConfigs}
|
|
36
|
-
* selectedConfig={selectedConfig}
|
|
37
|
-
* onConfigChange={setSelectedConfig}
|
|
38
|
-
* showDescription
|
|
39
|
-
* />
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
export const ConfigurationSelector: React.FC<ConfigurationSelectorProps> = ({
|
|
43
|
-
configurations,
|
|
44
|
-
selectedConfig,
|
|
45
|
-
onConfigChange,
|
|
46
|
-
className,
|
|
47
|
-
style,
|
|
48
|
-
showDescription = false,
|
|
49
|
-
label = 'Graph Configuration',
|
|
50
|
-
}) => {
|
|
51
|
-
const handleChange = (event: React.ChangeEvent<HTMLSelectElement>) => {
|
|
52
|
-
onConfigChange(event.target.value);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const selectedConfigData = configurations.find((c) => c.name === selectedConfig);
|
|
56
|
-
|
|
57
|
-
const defaultStyle: React.CSSProperties = {
|
|
58
|
-
backgroundColor: 'white',
|
|
59
|
-
padding: '12px 16px',
|
|
60
|
-
borderRadius: '8px',
|
|
61
|
-
boxShadow: '0 2px 8px rgba(0,0,0,0.1)',
|
|
62
|
-
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
63
|
-
...style,
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const labelStyle: React.CSSProperties = {
|
|
67
|
-
display: 'block',
|
|
68
|
-
fontSize: '14px',
|
|
69
|
-
fontWeight: 600,
|
|
70
|
-
marginBottom: '8px',
|
|
71
|
-
color: '#333',
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const selectStyle: React.CSSProperties = {
|
|
75
|
-
width: '100%',
|
|
76
|
-
padding: '8px 12px',
|
|
77
|
-
fontSize: '14px',
|
|
78
|
-
border: '1px solid #ddd',
|
|
79
|
-
borderRadius: '4px',
|
|
80
|
-
backgroundColor: 'white',
|
|
81
|
-
cursor: 'pointer',
|
|
82
|
-
outline: 'none',
|
|
83
|
-
transition: 'border-color 0.2s',
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
const infoStyle: React.CSSProperties = {
|
|
87
|
-
marginTop: '8px',
|
|
88
|
-
fontSize: '12px',
|
|
89
|
-
color: '#666',
|
|
90
|
-
lineHeight: '1.5',
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
if (configurations.length === 0) {
|
|
94
|
-
return (
|
|
95
|
-
<div className={className} style={defaultStyle}>
|
|
96
|
-
<div style={{ ...labelStyle, color: '#999' }}>No configurations available</div>
|
|
97
|
-
</div>
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return (
|
|
102
|
-
<div className={className} style={defaultStyle}>
|
|
103
|
-
<label style={labelStyle} htmlFor="config-selector">
|
|
104
|
-
{label}
|
|
105
|
-
</label>
|
|
106
|
-
|
|
107
|
-
<select
|
|
108
|
-
id="config-selector"
|
|
109
|
-
value={selectedConfig}
|
|
110
|
-
onChange={handleChange}
|
|
111
|
-
style={selectStyle}
|
|
112
|
-
onMouseEnter={(e) => {
|
|
113
|
-
e.currentTarget.style.borderColor = '#4A90E2';
|
|
114
|
-
}}
|
|
115
|
-
onMouseLeave={(e) => {
|
|
116
|
-
e.currentTarget.style.borderColor = '#ddd';
|
|
117
|
-
}}
|
|
118
|
-
>
|
|
119
|
-
{configurations.map((config) => (
|
|
120
|
-
<option key={config.name} value={config.name}>
|
|
121
|
-
{config.config.metadata.name}
|
|
122
|
-
</option>
|
|
123
|
-
))}
|
|
124
|
-
</select>
|
|
125
|
-
|
|
126
|
-
{selectedConfigData && showDescription && selectedConfigData.config.metadata.description && (
|
|
127
|
-
<div style={infoStyle}>
|
|
128
|
-
<div>{selectedConfigData.config.metadata.description}</div>
|
|
129
|
-
</div>
|
|
130
|
-
)}
|
|
131
|
-
</div>
|
|
132
|
-
);
|
|
133
|
-
};
|