@principal-ai/subsystems-react 0.17.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 +93 -0
- package/dist/components/ConfigurationSelector.d.ts +35 -0
- package/dist/components/ConfigurationSelector.d.ts.map +1 -0
- package/dist/components/ConfigurationSelector.js +63 -0
- package/dist/components/ConfigurationSelector.js.map +1 -0
- package/dist/components/GraphRenderer.d.ts +295 -0
- package/dist/components/GraphRenderer.d.ts.map +1 -0
- package/dist/components/GraphRenderer.js +2008 -0
- package/dist/components/GraphRenderer.js.map +1 -0
- package/dist/components/MultiCanvasRenderer.d.ts +75 -0
- package/dist/components/MultiCanvasRenderer.d.ts.map +1 -0
- package/dist/components/MultiCanvasRenderer.js +203 -0
- package/dist/components/MultiCanvasRenderer.js.map +1 -0
- package/dist/components/NodeTooltip.d.ts +24 -0
- package/dist/components/NodeTooltip.d.ts.map +1 -0
- package/dist/components/NodeTooltip.js +160 -0
- package/dist/components/NodeTooltip.js.map +1 -0
- package/dist/components/SelectionSidebar.d.ts +18 -0
- package/dist/components/SelectionSidebar.d.ts.map +1 -0
- package/dist/components/SelectionSidebar.js +190 -0
- package/dist/components/SelectionSidebar.js.map +1 -0
- package/dist/components/SequenceDiagramRenderer.d.ts +77 -0
- package/dist/components/SequenceDiagramRenderer.d.ts.map +1 -0
- package/dist/components/SequenceDiagramRenderer.js +604 -0
- package/dist/components/SequenceDiagramRenderer.js.map +1 -0
- package/dist/components/WorkflowSequenceDiagram.d.ts +63 -0
- package/dist/components/WorkflowSequenceDiagram.d.ts.map +1 -0
- package/dist/components/WorkflowSequenceDiagram.js +147 -0
- package/dist/components/WorkflowSequenceDiagram.js.map +1 -0
- package/dist/components/dashboard/DashboardRenderer.d.ts +10 -0
- package/dist/components/dashboard/DashboardRenderer.d.ts.map +1 -0
- package/dist/components/dashboard/DashboardRenderer.js +179 -0
- package/dist/components/dashboard/DashboardRenderer.js.map +1 -0
- package/dist/components/dashboard/MetricPanel.d.ts +10 -0
- package/dist/components/dashboard/MetricPanel.d.ts.map +1 -0
- package/dist/components/dashboard/MetricPanel.js +103 -0
- package/dist/components/dashboard/MetricPanel.js.map +1 -0
- package/dist/components/dashboard/MockDataProvider.d.ts +30 -0
- package/dist/components/dashboard/MockDataProvider.d.ts.map +1 -0
- package/dist/components/dashboard/MockDataProvider.js +270 -0
- package/dist/components/dashboard/MockDataProvider.js.map +1 -0
- package/dist/components/dashboard/components/BarChart.d.ts +10 -0
- package/dist/components/dashboard/components/BarChart.d.ts.map +1 -0
- package/dist/components/dashboard/components/BarChart.js +167 -0
- package/dist/components/dashboard/components/BarChart.js.map +1 -0
- package/dist/components/dashboard/components/LineChart.d.ts +10 -0
- package/dist/components/dashboard/components/LineChart.d.ts.map +1 -0
- package/dist/components/dashboard/components/LineChart.js +141 -0
- package/dist/components/dashboard/components/LineChart.js.map +1 -0
- package/dist/components/dashboard/components/MetricCard.d.ts +9 -0
- package/dist/components/dashboard/components/MetricCard.d.ts.map +1 -0
- package/dist/components/dashboard/components/MetricCard.js +163 -0
- package/dist/components/dashboard/components/MetricCard.js.map +1 -0
- package/dist/components/dashboard/components/SourceLink.d.ts +9 -0
- package/dist/components/dashboard/components/SourceLink.d.ts.map +1 -0
- package/dist/components/dashboard/components/SourceLink.js +39 -0
- package/dist/components/dashboard/components/SourceLink.js.map +1 -0
- package/dist/components/dashboard/components/TimeRangeSelector.d.ts +9 -0
- package/dist/components/dashboard/components/TimeRangeSelector.d.ts.map +1 -0
- package/dist/components/dashboard/components/TimeRangeSelector.js +167 -0
- package/dist/components/dashboard/components/TimeRangeSelector.js.map +1 -0
- package/dist/components/dashboard/components/index.d.ts +6 -0
- package/dist/components/dashboard/components/index.d.ts.map +1 -0
- package/dist/components/dashboard/components/index.js +6 -0
- package/dist/components/dashboard/components/index.js.map +1 -0
- package/dist/components/dashboard/index.d.ts +6 -0
- package/dist/components/dashboard/index.d.ts.map +1 -0
- package/dist/components/dashboard/index.js +8 -0
- package/dist/components/dashboard/index.js.map +1 -0
- package/dist/components/dashboard/types.d.ts +74 -0
- package/dist/components/dashboard/types.d.ts.map +1 -0
- package/dist/components/dashboard/types.js +8 -0
- package/dist/components/dashboard/types.js.map +1 -0
- package/dist/components/session-events/SessionEventFeed.d.ts +34 -0
- package/dist/components/session-events/SessionEventFeed.d.ts.map +1 -0
- package/dist/components/session-events/SessionEventFeed.js +1196 -0
- package/dist/components/session-events/SessionEventFeed.js.map +1 -0
- package/dist/components/session-events/index.d.ts +7 -0
- package/dist/components/session-events/index.d.ts.map +1 -0
- package/dist/components/session-events/index.js +6 -0
- package/dist/components/session-events/index.js.map +1 -0
- package/dist/components/state-view/PipelineView.d.ts +14 -0
- package/dist/components/state-view/PipelineView.d.ts.map +1 -0
- package/dist/components/state-view/PipelineView.js +195 -0
- package/dist/components/state-view/PipelineView.js.map +1 -0
- package/dist/components/state-view/index.d.ts +14 -0
- package/dist/components/state-view/index.d.ts.map +1 -0
- package/dist/components/state-view/index.js +12 -0
- package/dist/components/state-view/index.js.map +1 -0
- package/dist/components/state-view/types.d.ts +188 -0
- package/dist/components/state-view/types.d.ts.map +1 -0
- package/dist/components/state-view/types.js +10 -0
- package/dist/components/state-view/types.js.map +1 -0
- package/dist/components/state-view/useStateView.d.ts +32 -0
- package/dist/components/state-view/useStateView.d.ts.map +1 -0
- package/dist/components/state-view/useStateView.js +129 -0
- package/dist/components/state-view/useStateView.js.map +1 -0
- package/dist/contexts/GraphEditContext.d.ts +20 -0
- package/dist/contexts/GraphEditContext.d.ts.map +1 -0
- package/dist/contexts/GraphEditContext.js +8 -0
- package/dist/contexts/GraphEditContext.js.map +1 -0
- package/dist/contexts/TooltipPortalContext.d.ts +8 -0
- package/dist/contexts/TooltipPortalContext.d.ts.map +1 -0
- package/dist/contexts/TooltipPortalContext.js +8 -0
- package/dist/contexts/TooltipPortalContext.js.map +1 -0
- package/dist/edges/CustomEdge.d.ts +24 -0
- package/dist/edges/CustomEdge.d.ts.map +1 -0
- package/dist/edges/CustomEdge.js +222 -0
- package/dist/edges/CustomEdge.js.map +1 -0
- package/dist/edges/GenericEdge.d.ts +18 -0
- package/dist/edges/GenericEdge.d.ts.map +1 -0
- package/dist/edges/GenericEdge.js +10 -0
- package/dist/edges/GenericEdge.js.map +1 -0
- package/dist/graphify/anchor.d.ts +28 -0
- package/dist/graphify/anchor.d.ts.map +1 -0
- package/dist/graphify/anchor.js +132 -0
- package/dist/graphify/anchor.js.map +1 -0
- package/dist/graphify/consolidated.d.ts +210 -0
- package/dist/graphify/consolidated.d.ts.map +1 -0
- package/dist/graphify/consolidated.js +11 -0
- package/dist/graphify/consolidated.js.map +1 -0
- package/dist/graphify/ids.d.ts +19 -0
- package/dist/graphify/ids.d.ts.map +1 -0
- package/dist/graphify/ids.js +46 -0
- package/dist/graphify/ids.js.map +1 -0
- package/dist/graphify/index.d.ts +18 -0
- package/dist/graphify/index.d.ts.map +1 -0
- package/dist/graphify/index.js +12 -0
- package/dist/graphify/index.js.map +1 -0
- package/dist/graphify/kind.d.ts +23 -0
- package/dist/graphify/kind.d.ts.map +1 -0
- package/dist/graphify/kind.js +77 -0
- package/dist/graphify/kind.js.map +1 -0
- package/dist/graphify/resolve.d.ts +48 -0
- package/dist/graphify/resolve.d.ts.map +1 -0
- package/dist/graphify/resolve.js +83 -0
- package/dist/graphify/resolve.js.map +1 -0
- package/dist/graphify/signature.d.ts +87 -0
- package/dist/graphify/signature.d.ts.map +1 -0
- package/dist/graphify/signature.js +276 -0
- package/dist/graphify/signature.js.map +1 -0
- package/dist/graphify/types.d.ts +141 -0
- package/dist/graphify/types.d.ts.map +1 -0
- package/dist/graphify/types.js +8 -0
- package/dist/graphify/types.js.map +1 -0
- package/dist/hooks/useElkLayout.d.ts +66 -0
- package/dist/hooks/useElkLayout.d.ts.map +1 -0
- package/dist/hooks/useElkLayout.js +136 -0
- package/dist/hooks/useElkLayout.js.map +1 -0
- package/dist/hooks/usePathBasedEvents.d.ts +42 -0
- package/dist/hooks/usePathBasedEvents.d.ts.map +1 -0
- package/dist/hooks/usePathBasedEvents.js +119 -0
- package/dist/hooks/usePathBasedEvents.js.map +1 -0
- package/dist/hooks/useSequenceLayout.d.ts +186 -0
- package/dist/hooks/useSequenceLayout.d.ts.map +1 -0
- package/dist/hooks/useSequenceLayout.js +327 -0
- package/dist/hooks/useSequenceLayout.js.map +1 -0
- package/dist/hooks/useUndoRedo.d.ts +80 -0
- package/dist/hooks/useUndoRedo.d.ts.map +1 -0
- package/dist/hooks/useUndoRedo.js +70 -0
- package/dist/hooks/useUndoRedo.js.map +1 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/CustomNode.d.ts +28 -0
- package/dist/nodes/CustomNode.d.ts.map +1 -0
- package/dist/nodes/CustomNode.js +820 -0
- package/dist/nodes/CustomNode.js.map +1 -0
- package/dist/nodes/GenericNode.d.ts +20 -0
- package/dist/nodes/GenericNode.d.ts.map +1 -0
- package/dist/nodes/GenericNode.js +20 -0
- package/dist/nodes/GenericNode.js.map +1 -0
- package/dist/nodes/otel/OtelBoundaryNode.d.ts +55 -0
- package/dist/nodes/otel/OtelBoundaryNode.d.ts.map +1 -0
- package/dist/nodes/otel/OtelBoundaryNode.js +81 -0
- package/dist/nodes/otel/OtelBoundaryNode.js.map +1 -0
- package/dist/nodes/otel/OtelEventNode.d.ts +59 -0
- package/dist/nodes/otel/OtelEventNode.d.ts.map +1 -0
- package/dist/nodes/otel/OtelEventNode.js +82 -0
- package/dist/nodes/otel/OtelEventNode.js.map +1 -0
- package/dist/nodes/otel/OtelResourceNode.d.ts +53 -0
- package/dist/nodes/otel/OtelResourceNode.d.ts.map +1 -0
- package/dist/nodes/otel/OtelResourceNode.js +105 -0
- package/dist/nodes/otel/OtelResourceNode.js.map +1 -0
- package/dist/nodes/otel/OtelScopeNode.d.ts +53 -0
- package/dist/nodes/otel/OtelScopeNode.d.ts.map +1 -0
- package/dist/nodes/otel/OtelScopeNode.js +81 -0
- package/dist/nodes/otel/OtelScopeNode.js.map +1 -0
- package/dist/nodes/otel/OtelSpanConventionNode.d.ts +61 -0
- package/dist/nodes/otel/OtelSpanConventionNode.d.ts.map +1 -0
- package/dist/nodes/otel/OtelSpanConventionNode.js +131 -0
- package/dist/nodes/otel/OtelSpanConventionNode.js.map +1 -0
- package/dist/nodes/otel/index.d.ts +17 -0
- package/dist/nodes/otel/index.d.ts.map +1 -0
- package/dist/nodes/otel/index.js +13 -0
- package/dist/nodes/otel/index.js.map +1 -0
- package/dist/nodes/otel/shared/NodeBadges.d.ts +10 -0
- package/dist/nodes/otel/shared/NodeBadges.d.ts.map +1 -0
- package/dist/nodes/otel/shared/NodeBadges.js +178 -0
- package/dist/nodes/otel/shared/NodeBadges.js.map +1 -0
- package/dist/nodes/otel/shared/NodeContent.d.ts +10 -0
- package/dist/nodes/otel/shared/NodeContent.d.ts.map +1 -0
- package/dist/nodes/otel/shared/NodeContent.js +96 -0
- package/dist/nodes/otel/shared/NodeContent.js.map +1 -0
- package/dist/nodes/otel/shared/index.d.ts +8 -0
- package/dist/nodes/otel/shared/index.d.ts.map +1 -0
- package/dist/nodes/otel/shared/index.js +8 -0
- package/dist/nodes/otel/shared/index.js.map +1 -0
- package/dist/nodes/otel/shared/types.d.ts +129 -0
- package/dist/nodes/otel/shared/types.d.ts.map +1 -0
- package/dist/nodes/otel/shared/types.js +5 -0
- package/dist/nodes/otel/shared/types.js.map +1 -0
- package/dist/nodes/otel/shared/useNodeBehavior.d.ts +42 -0
- package/dist/nodes/otel/shared/useNodeBehavior.d.ts.map +1 -0
- package/dist/nodes/otel/shared/useNodeBehavior.js +61 -0
- package/dist/nodes/otel/shared/useNodeBehavior.js.map +1 -0
- package/dist/pierre/PierreFileView.d.ts +17 -0
- package/dist/pierre/PierreFileView.d.ts.map +1 -0
- package/dist/pierre/PierreFileView.js +46 -0
- package/dist/pierre/PierreFileView.js.map +1 -0
- package/dist/pierre/PierreSnippetView.d.ts +28 -0
- package/dist/pierre/PierreSnippetView.d.ts.map +1 -0
- package/dist/pierre/PierreSnippetView.js +105 -0
- package/dist/pierre/PierreSnippetView.js.map +1 -0
- package/dist/pierre/PierreThroughlineCodeView.d.ts +22 -0
- package/dist/pierre/PierreThroughlineCodeView.d.ts.map +1 -0
- package/dist/pierre/PierreThroughlineCodeView.js +206 -0
- package/dist/pierre/PierreThroughlineCodeView.js.map +1 -0
- package/dist/pierre/constructColors.d.ts +24 -0
- package/dist/pierre/constructColors.d.ts.map +1 -0
- package/dist/pierre/constructColors.js +91 -0
- package/dist/pierre/constructColors.js.map +1 -0
- package/dist/pierre/index.d.ts +12 -0
- package/dist/pierre/index.d.ts.map +1 -0
- package/dist/pierre/index.js +7 -0
- package/dist/pierre/index.js.map +1 -0
- package/dist/pierre/pierreBackground.d.ts +15 -0
- package/dist/pierre/pierreBackground.d.ts.map +1 -0
- package/dist/pierre/pierreBackground.js +31 -0
- package/dist/pierre/pierreBackground.js.map +1 -0
- package/dist/pierre/pierreFileLang.d.ts +27 -0
- package/dist/pierre/pierreFileLang.d.ts.map +1 -0
- package/dist/pierre/pierreFileLang.js +52 -0
- package/dist/pierre/pierreFileLang.js.map +1 -0
- package/dist/pierre/pierreSyntaxTheme.d.ts +11 -0
- package/dist/pierre/pierreSyntaxTheme.d.ts.map +1 -0
- package/dist/pierre/pierreSyntaxTheme.js +20 -0
- package/dist/pierre/pierreSyntaxTheme.js.map +1 -0
- package/dist/pierre/scrollAnchor.d.ts +5 -0
- package/dist/pierre/scrollAnchor.d.ts.map +1 -0
- package/dist/pierre/scrollAnchor.js +9 -0
- package/dist/pierre/scrollAnchor.js.map +1 -0
- package/dist/pierre/sliceSnippet.d.ts +10 -0
- package/dist/pierre/sliceSnippet.d.ts.map +1 -0
- package/dist/pierre/sliceSnippet.js +16 -0
- package/dist/pierre/sliceSnippet.js.map +1 -0
- package/dist/pierre/syntaxTokens.d.ts +11 -0
- package/dist/pierre/syntaxTokens.d.ts.map +1 -0
- package/dist/pierre/syntaxTokens.js +51 -0
- package/dist/pierre/syntaxTokens.js.map +1 -0
- package/dist/stories/Subsystem/ComponentGraph/fixtures.d.ts +8 -0
- package/dist/stories/Subsystem/ComponentGraph/fixtures.d.ts.map +1 -0
- package/dist/stories/Subsystem/ComponentGraph/fixtures.js +116 -0
- package/dist/stories/Subsystem/ComponentGraph/fixtures.js.map +1 -0
- package/dist/subsystem/ComponentDeclaration.d.ts +87 -0
- package/dist/subsystem/ComponentDeclaration.d.ts.map +1 -0
- package/dist/subsystem/ComponentDeclaration.js +374 -0
- package/dist/subsystem/ComponentDeclaration.js.map +1 -0
- package/dist/subsystem/FileDrawer.d.ts +17 -0
- package/dist/subsystem/FileDrawer.d.ts.map +1 -0
- package/dist/subsystem/FileDrawer.js +72 -0
- package/dist/subsystem/FileDrawer.js.map +1 -0
- package/dist/subsystem/GraphLayoutCover.d.ts +20 -0
- package/dist/subsystem/GraphLayoutCover.d.ts.map +1 -0
- package/dist/subsystem/GraphLayoutCover.js +42 -0
- package/dist/subsystem/GraphLayoutCover.js.map +1 -0
- package/dist/subsystem/SubsystemComponentGraph.d.ts +96 -0
- package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -0
- package/dist/subsystem/SubsystemComponentGraph.js +1059 -0
- package/dist/subsystem/SubsystemComponentGraph.js.map +1 -0
- package/dist/subsystem/SubsystemFileTree.d.ts +24 -0
- package/dist/subsystem/SubsystemFileTree.d.ts.map +1 -0
- package/dist/subsystem/SubsystemFileTree.js +150 -0
- package/dist/subsystem/SubsystemFileTree.js.map +1 -0
- package/dist/subsystem/declarationRef.d.ts +39 -0
- package/dist/subsystem/declarationRef.d.ts.map +1 -0
- package/dist/subsystem/declarationRef.js +32 -0
- package/dist/subsystem/declarationRef.js.map +1 -0
- package/dist/subsystem/formatDeclaration.d.ts +11 -0
- package/dist/subsystem/formatDeclaration.d.ts.map +1 -0
- package/dist/subsystem/formatDeclaration.js +146 -0
- package/dist/subsystem/formatDeclaration.js.map +1 -0
- package/dist/subsystem/model.d.ts +353 -0
- package/dist/subsystem/model.d.ts.map +1 -0
- package/dist/subsystem/model.js +503 -0
- package/dist/subsystem/model.js.map +1 -0
- package/dist/subsystem/nodes.d.ts +69 -0
- package/dist/subsystem/nodes.d.ts.map +1 -0
- package/dist/subsystem/nodes.js +289 -0
- package/dist/subsystem/nodes.js.map +1 -0
- package/dist/subsystem/paths.d.ts +63 -0
- package/dist/subsystem/paths.d.ts.map +1 -0
- package/dist/subsystem/paths.js +86 -0
- package/dist/subsystem/paths.js.map +1 -0
- package/dist/subsystem/tokenizeComponent.d.ts +20 -0
- package/dist/subsystem/tokenizeComponent.d.ts.map +1 -0
- package/dist/subsystem/tokenizeComponent.js +56 -0
- package/dist/subsystem/tokenizeComponent.js.map +1 -0
- package/dist/subsystem/tokenizeFormatted.d.ts +12 -0
- package/dist/subsystem/tokenizeFormatted.d.ts.map +1 -0
- package/dist/subsystem/tokenizeFormatted.js +13 -0
- package/dist/subsystem/tokenizeFormatted.js.map +1 -0
- package/dist/utils/animationMapping.d.ts +53 -0
- package/dist/utils/animationMapping.d.ts.map +1 -0
- package/dist/utils/animationMapping.js +126 -0
- package/dist/utils/animationMapping.js.map +1 -0
- package/dist/utils/canvasBounds.d.ts +50 -0
- package/dist/utils/canvasBounds.d.ts.map +1 -0
- package/dist/utils/canvasBounds.js +88 -0
- package/dist/utils/canvasBounds.js.map +1 -0
- package/dist/utils/elkLayout.d.ts +137 -0
- package/dist/utils/elkLayout.d.ts.map +1 -0
- package/dist/utils/elkLayout.js +596 -0
- package/dist/utils/elkLayout.js.map +1 -0
- package/dist/utils/graphConverter.d.ts +18 -0
- package/dist/utils/graphConverter.d.ts.map +1 -0
- package/dist/utils/graphConverter.js +114 -0
- package/dist/utils/graphConverter.js.map +1 -0
- package/dist/utils/iconResolver.d.ts +29 -0
- package/dist/utils/iconResolver.d.ts.map +1 -0
- package/dist/utils/iconResolver.js +30 -0
- package/dist/utils/iconResolver.js.map +1 -0
- package/dist/utils/orientationUtils.d.ts +19 -0
- package/dist/utils/orientationUtils.d.ts.map +1 -0
- package/dist/utils/orientationUtils.js +62 -0
- package/dist/utils/orientationUtils.js.map +1 -0
- package/package.json +80 -0
- package/src/components/ConfigurationSelector.tsx +133 -0
- package/src/components/GraphRenderer.tsx +3195 -0
- package/src/components/MultiCanvasRenderer.tsx +295 -0
- package/src/components/NodeTooltip.tsx +279 -0
- package/src/components/PendingChanges.test.tsx +375 -0
- package/src/components/SelectionSidebar.tsx +352 -0
- package/src/components/SequenceDiagramRenderer.tsx +1156 -0
- package/src/components/WorkflowSequenceDiagram.tsx +270 -0
- package/src/components/dashboard/DashboardRenderer.tsx +317 -0
- package/src/components/dashboard/MetricPanel.tsx +254 -0
- package/src/components/dashboard/MockDataProvider.ts +330 -0
- package/src/components/dashboard/components/BarChart.tsx +299 -0
- package/src/components/dashboard/components/LineChart.tsx +279 -0
- package/src/components/dashboard/components/MetricCard.tsx +270 -0
- package/src/components/dashboard/components/SourceLink.tsx +63 -0
- package/src/components/dashboard/components/TimeRangeSelector.tsx +280 -0
- package/src/components/dashboard/components/index.ts +5 -0
- package/src/components/dashboard/index.ts +47 -0
- package/src/components/dashboard/types.ts +126 -0
- package/src/components/session-events/SessionEventFeed.tsx +1797 -0
- package/src/components/session-events/index.ts +13 -0
- package/src/components/state-view/PipelineView.tsx +347 -0
- package/src/components/state-view/index.ts +14 -0
- package/src/components/state-view/types.ts +261 -0
- package/src/components/state-view/useStateView.ts +205 -0
- package/src/contexts/GraphEditContext.tsx +27 -0
- package/src/contexts/TooltipPortalContext.ts +8 -0
- package/src/edges/CustomEdge.tsx +402 -0
- package/src/edges/GenericEdge.tsx +36 -0
- package/src/graphify/anchor.test.ts +124 -0
- package/src/graphify/anchor.ts +160 -0
- package/src/graphify/consolidated.ts +246 -0
- package/src/graphify/ids.ts +48 -0
- package/src/graphify/index.ts +72 -0
- package/src/graphify/kind.test.ts +108 -0
- package/src/graphify/kind.ts +120 -0
- package/src/graphify/resolve.test.ts +89 -0
- package/src/graphify/resolve.ts +115 -0
- package/src/graphify/signature.test.ts +278 -0
- package/src/graphify/signature.ts +354 -0
- package/src/graphify/types.ts +164 -0
- package/src/hooks/useElkLayout.test.ts +134 -0
- package/src/hooks/useElkLayout.ts +191 -0
- package/src/hooks/usePathBasedEvents.ts +192 -0
- package/src/hooks/useSequenceLayout.ts +543 -0
- package/src/hooks/useUndoRedo.ts +144 -0
- package/src/index.ts +341 -0
- package/src/nodes/CustomNode.tsx +1231 -0
- package/src/nodes/GenericNode.tsx +55 -0
- package/src/nodes/otel/OtelBoundaryNode.tsx +224 -0
- package/src/nodes/otel/OtelEventNode.tsx +225 -0
- package/src/nodes/otel/OtelResourceNode.tsx +251 -0
- package/src/nodes/otel/OtelScopeNode.tsx +221 -0
- package/src/nodes/otel/OtelSpanConventionNode.tsx +295 -0
- package/src/nodes/otel/index.ts +23 -0
- package/src/nodes/otel/shared/NodeBadges.tsx +295 -0
- package/src/nodes/otel/shared/NodeContent.tsx +204 -0
- package/src/nodes/otel/shared/index.ts +8 -0
- package/src/nodes/otel/shared/types.ts +138 -0
- package/src/nodes/otel/shared/useNodeBehavior.ts +114 -0
- package/src/pierre/PierreFileView.tsx +81 -0
- package/src/pierre/PierreSnippetView.tsx +184 -0
- package/src/pierre/PierreThroughlineCodeView.tsx +304 -0
- package/src/pierre/constructColors.test.ts +52 -0
- package/src/pierre/constructColors.ts +112 -0
- package/src/pierre/index.ts +18 -0
- package/src/pierre/pierreBackground.ts +33 -0
- package/src/pierre/pierreFileLang.test.ts +26 -0
- package/src/pierre/pierreFileLang.ts +55 -0
- package/src/pierre/pierreSyntaxTheme.ts +23 -0
- package/src/pierre/scrollAnchor.test.ts +13 -0
- package/src/pierre/scrollAnchor.ts +11 -0
- package/src/pierre/sliceSnippet.test.ts +21 -0
- package/src/pierre/sliceSnippet.ts +31 -0
- package/src/pierre/syntaxTokens.test.ts +35 -0
- package/src/pierre/syntaxTokens.ts +60 -0
- package/src/stories/Audit/BoundaryNodes.stories.tsx +385 -0
- package/src/stories/Audit/CanvasEdgeTypes.stories.tsx +1448 -0
- package/src/stories/Audit/CanvasNodeTypes.stories.tsx +1049 -0
- package/src/stories/Audit/ColorPriority.stories.tsx +895 -0
- package/src/stories/Audit/DiamondBadges.stories.tsx +629 -0
- package/src/stories/Audit/NodeDimensionsTesting.stories.tsx +724 -0
- package/src/stories/Audit/NodeFieldsAudit.stories.tsx +996 -0
- package/src/stories/Audit/NodeFontSizeTesting.stories.tsx +715 -0
- package/src/stories/Audit/NodeShapes.stories.tsx +1208 -0
- package/src/stories/Audit/WideNodesTesting.stories.tsx +1045 -0
- package/src/stories/Components/DashboardRenderer.stories.tsx +263 -0
- package/src/stories/Components/GraphRenderer.stories.tsx +3236 -0
- package/src/stories/Components/MultiCanvasRenderer.stories.tsx +370 -0
- package/src/stories/Components/SequenceDiagram.stories.tsx +255 -0
- package/src/stories/Components/StateView.stories.tsx +417 -0
- package/src/stories/Components/TraceViewer.stories.tsx +442 -0
- package/src/stories/Components/WorkflowSequenceDiagram.stories.tsx +802 -0
- package/src/stories/Features/AnimationWorkshop.stories.tsx +727 -0
- package/src/stories/Features/ChangeTypeVisual.stories.tsx +67 -0
- package/src/stories/Features/EventDrivenAnimations.stories.tsx +513 -0
- package/src/stories/Features/MultiConfig.stories.tsx +539 -0
- package/src/stories/Introduction.mdx +34 -0
- package/src/stories/Layout/ElkEdgeRouting.stories.tsx +539 -0
- package/src/stories/Layout/GraphOrientation.stories.tsx +500 -0
- package/src/stories/Layout/MultiDirectionalConnections.stories.tsx +352 -0
- package/src/stories/Nodes/NodeDefinitionComparison.stories.tsx +560 -0
- package/src/stories/Nodes/NodeNameFallbacks.stories.tsx +491 -0
- package/src/stories/Nodes/NumericColors.stories.tsx +440 -0
- package/src/stories/OTEL/EventNameDisplay.stories.tsx +694 -0
- package/src/stories/OTEL/EventNameFallback.stories.tsx +578 -0
- package/src/stories/OTEL/OtelComponents.stories.tsx +422 -0
- package/src/stories/OTEL/OtelNodeTypesPrototype.stories.tsx +806 -0
- package/src/stories/OTEL/RawEventCards.stories.tsx +57 -0
- package/src/stories/OTEL/SpanBadges.stories.tsx +840 -0
- package/src/stories/OTEL/ValidationEventsCanvas.stories.tsx +209 -0
- package/src/stories/Pierre/CodeView.stories.tsx +219 -0
- package/src/stories/RealWorld/BacklogMdCanvases.stories.tsx +721 -0
- package/src/stories/RealWorld/FileCitySequence.stories.tsx +516 -0
- package/src/stories/RealWorld/RealCanvasFiles.stories.tsx +336 -0
- package/src/stories/Subsystem/ComponentDeclarationAudit.stories.tsx +321 -0
- package/src/stories/Subsystem/ComponentGraph/Appearance.stories.tsx +365 -0
- package/src/stories/Subsystem/ComponentGraph/Basics.stories.tsx +137 -0
- package/src/stories/Subsystem/ComponentGraph/Captures.stories.tsx +238 -0
- package/src/stories/Subsystem/ComponentGraph/DetailPanel.stories.tsx +315 -0
- package/src/stories/Subsystem/ComponentGraph/Flows.stories.tsx +239 -0
- package/src/stories/Subsystem/ComponentGraph/FrameworkStereotype.stories.tsx +216 -0
- package/src/stories/Subsystem/ComponentGraph/GraphTitle.stories.tsx +70 -0
- package/src/stories/Subsystem/ComponentGraph/Processes.stories.tsx +68 -0
- package/src/stories/Subsystem/ComponentGraph/Scenarios.stories.tsx +959 -0
- package/src/stories/Subsystem/ComponentGraph/Spotlights.stories.tsx +681 -0
- package/src/stories/Subsystem/ComponentGraph/fixtures.ts +129 -0
- package/src/stories/__traces__/test-run.canvas.json +241 -0
- package/src/stories/data/activity-feed-analytics.dashboard.json +300 -0
- package/src/stories/data/file-city-images-transformed.otel.canvas.json +295 -0
- package/src/stories/data/file-city-workflows.json +269 -0
- package/src/stories/data/graph-converter-test-execution.json +443 -0
- package/src/stories/data/graph-converter-test.workflow.json +105 -0
- package/src/stories/data/graph-converter-validated-execution.json +58 -0
- package/src/stories/data/opencode-session-raw-events.json +273396 -0
- package/src/subsystem/ComponentDeclaration.tsx +643 -0
- package/src/subsystem/FileDrawer.tsx +106 -0
- package/src/subsystem/GraphLayoutCover.tsx +69 -0
- package/src/subsystem/SubsystemComponentGraph.tsx +1644 -0
- package/src/subsystem/SubsystemFileTree.tsx +190 -0
- package/src/subsystem/declarationRef.test.ts +33 -0
- package/src/subsystem/declarationRef.ts +63 -0
- package/src/subsystem/formatDeclaration.ts +174 -0
- package/src/subsystem/model.test.ts +244 -0
- package/src/subsystem/model.ts +850 -0
- package/src/subsystem/nodes.test.ts +56 -0
- package/src/subsystem/nodes.tsx +443 -0
- package/src/subsystem/paths.test.ts +123 -0
- package/src/subsystem/paths.ts +127 -0
- package/src/subsystem/tokenizeComponent.ts +70 -0
- package/src/subsystem/tokenizeFormatted.ts +19 -0
- package/src/utils/animationMapping.ts +166 -0
- package/src/utils/canvasBounds.ts +146 -0
- package/src/utils/elkLayout.test.ts +240 -0
- package/src/utils/elkLayout.ts +779 -0
- package/src/utils/graphConverter.ts +148 -0
- package/src/utils/iconResolver.tsx +53 -0
- package/src/utils/orientationUtils.ts +73 -0
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { SequenceDiagramRenderer } from '../../components/SequenceDiagramRenderer';
|
|
4
|
+
import { WorkflowSequenceDiagram } from '../../components/WorkflowSequenceDiagram';
|
|
5
|
+
import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
|
|
6
|
+
import workflowData from '../data/file-city-workflows.json';
|
|
7
|
+
import type { WorkflowScenario } from '@principal-ai/subsystems-core';
|
|
8
|
+
|
|
9
|
+
const meta = {
|
|
10
|
+
title: 'RealWorld/FileCitySequence',
|
|
11
|
+
component: SequenceDiagramRenderer,
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: 'fullscreen',
|
|
14
|
+
docs: {
|
|
15
|
+
description: {
|
|
16
|
+
component: `
|
|
17
|
+
# File City Image Generation Workflows
|
|
18
|
+
|
|
19
|
+
This demonstrates the **graph-to-sequence** concepts applied to the File City image generation system.
|
|
20
|
+
|
|
21
|
+
## Participant Model
|
|
22
|
+
|
|
23
|
+
Following the sequence-first architecture:
|
|
24
|
+
|
|
25
|
+
- **Nodes** = Participants (Main Process, Renderer Process)
|
|
26
|
+
- **Edges** = Move Events (IPC calls crossing process boundaries)
|
|
27
|
+
- **Transform Events** = Internal processing within each participant
|
|
28
|
+
|
|
29
|
+
## Key Concepts
|
|
30
|
+
|
|
31
|
+
- **Sequence diagrams are primary** - They show actual execution traces
|
|
32
|
+
- **Graphs aggregate sequences** - The canvas shows all possible paths
|
|
33
|
+
- **Move vs Transform Events**:
|
|
34
|
+
- **Move**: Data crossing participant boundaries (IPC calls)
|
|
35
|
+
- **Transform**: Internal processing within a participant
|
|
36
|
+
|
|
37
|
+
See \`/docs/GRAPH_TO_SEQUENCE_CONCEPTS.md\` for the full conceptual model.
|
|
38
|
+
`,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
tags: ['autodocs'],
|
|
43
|
+
decorators: [
|
|
44
|
+
(Story) => (
|
|
45
|
+
<ThemeProvider theme={defaultEditorTheme}>
|
|
46
|
+
<div style={{ height: '100vh', boxSizing: 'border-box' }}>
|
|
47
|
+
<Story />
|
|
48
|
+
</div>
|
|
49
|
+
</ThemeProvider>
|
|
50
|
+
),
|
|
51
|
+
],
|
|
52
|
+
} satisfies Meta<typeof SequenceDiagramRenderer>;
|
|
53
|
+
|
|
54
|
+
export default meta;
|
|
55
|
+
type Story = StoryObj<typeof meta>;
|
|
56
|
+
|
|
57
|
+
// ============================================================================
|
|
58
|
+
// Helper Components
|
|
59
|
+
// ============================================================================
|
|
60
|
+
|
|
61
|
+
interface SequenceWithEventsProps {
|
|
62
|
+
events: SequenceEvent[];
|
|
63
|
+
edges: SequenceEdge[];
|
|
64
|
+
height?: number;
|
|
65
|
+
layoutOptions?: any;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const SequenceWithEventsList: React.FC<SequenceWithEventsProps> = ({
|
|
69
|
+
events,
|
|
70
|
+
edges,
|
|
71
|
+
height = 500,
|
|
72
|
+
layoutOptions,
|
|
73
|
+
}) => {
|
|
74
|
+
return (
|
|
75
|
+
<div style={{ display: 'flex', flexDirection: 'column', height: '100vh' }}>
|
|
76
|
+
{/* Top Half - Sequence Diagram */}
|
|
77
|
+
<div style={{ flex: 1, overflow: 'hidden' }}>
|
|
78
|
+
<SequenceDiagramRenderer
|
|
79
|
+
events={events}
|
|
80
|
+
edges={edges}
|
|
81
|
+
height={height}
|
|
82
|
+
layoutOptions={layoutOptions}
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
{/* Bottom Half - Event List */}
|
|
87
|
+
<div style={{
|
|
88
|
+
flex: 1,
|
|
89
|
+
overflow: 'auto',
|
|
90
|
+
background: '#1e1e1e',
|
|
91
|
+
color: '#d4d4d4',
|
|
92
|
+
fontFamily: 'monospace',
|
|
93
|
+
fontSize: 13,
|
|
94
|
+
}}>
|
|
95
|
+
<div style={{ padding: '16px' }}>
|
|
96
|
+
<h3 style={{ margin: '0 0 12px 0', color: '#4ec9b0' }}>Event Sequence</h3>
|
|
97
|
+
<table style={{ width: '100%', borderCollapse: 'collapse' }}>
|
|
98
|
+
<thead>
|
|
99
|
+
<tr style={{ borderBottom: '1px solid #3e3e3e' }}>
|
|
100
|
+
<th style={{ textAlign: 'left', padding: '8px', color: '#9cdcfe' }}>Order</th>
|
|
101
|
+
<th style={{ textAlign: 'left', padding: '8px', color: '#9cdcfe' }}>Event Name</th>
|
|
102
|
+
<th style={{ textAlign: 'left', padding: '8px', color: '#9cdcfe' }}>Label</th>
|
|
103
|
+
<th style={{ textAlign: 'left', padding: '8px', color: '#9cdcfe' }}>Type</th>
|
|
104
|
+
</tr>
|
|
105
|
+
</thead>
|
|
106
|
+
<tbody>
|
|
107
|
+
{events.map((event, index) => {
|
|
108
|
+
const isMoveEvent = (event as any).moveEvent;
|
|
109
|
+
const participant = event.name.split('.')[0];
|
|
110
|
+
return (
|
|
111
|
+
<tr key={event.id} style={{ borderBottom: '1px solid #2a2a2a' }}>
|
|
112
|
+
<td style={{ padding: '8px', color: '#b5cea8' }}>{index + 1}</td>
|
|
113
|
+
<td style={{
|
|
114
|
+
padding: '8px',
|
|
115
|
+
color: isMoveEvent ? '#ce9178' : '#dcdcaa',
|
|
116
|
+
fontWeight: isMoveEvent ? 'bold' : 'normal'
|
|
117
|
+
}}>
|
|
118
|
+
{event.name}
|
|
119
|
+
</td>
|
|
120
|
+
<td style={{ padding: '8px', color: '#d4d4d4' }}>{event.label}</td>
|
|
121
|
+
<td style={{
|
|
122
|
+
padding: '8px',
|
|
123
|
+
color: isMoveEvent ? '#f48771' : '#569cd6'
|
|
124
|
+
}}>
|
|
125
|
+
{isMoveEvent ? '→ Move Event (IPC)' : `Transform (${participant})`}
|
|
126
|
+
</td>
|
|
127
|
+
</tr>
|
|
128
|
+
);
|
|
129
|
+
})}
|
|
130
|
+
</tbody>
|
|
131
|
+
</table>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// ============================================================================
|
|
139
|
+
// Workflow Stories
|
|
140
|
+
// ============================================================================
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* **Happy Path - Cache Hit**
|
|
144
|
+
*
|
|
145
|
+
* Optimal execution path where a cached image already exists.
|
|
146
|
+
*
|
|
147
|
+
* **Flow:**
|
|
148
|
+
* 1. Renderer requests image via IPC
|
|
149
|
+
* 2. Main process checks cache → Hit!
|
|
150
|
+
* 3. Returns cached URL immediately
|
|
151
|
+
* 4. Renderer displays image
|
|
152
|
+
*
|
|
153
|
+
* **Move Events (cross-boundary):**
|
|
154
|
+
* - `main.image_requested` (Renderer → Main)
|
|
155
|
+
* - `renderer.cache_hit` (Main → Renderer)
|
|
156
|
+
*/
|
|
157
|
+
export const CacheHitFlow: Story = {
|
|
158
|
+
render: () => (
|
|
159
|
+
<SequenceWithEventsList
|
|
160
|
+
events={workflowData.workflows[0].events}
|
|
161
|
+
edges={workflowData.workflows[0].edges}
|
|
162
|
+
height={600}
|
|
163
|
+
layoutOptions={{
|
|
164
|
+
laneWidth: 200,
|
|
165
|
+
eventSpacing: 80,
|
|
166
|
+
}}
|
|
167
|
+
/>
|
|
168
|
+
),
|
|
169
|
+
parameters: {
|
|
170
|
+
docs: {
|
|
171
|
+
description: {
|
|
172
|
+
story: 'Fast path when cached image exists - only 2 IPC calls needed.',
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* **Full Generation Flow**
|
|
180
|
+
*
|
|
181
|
+
* Complete execution path when no cached image exists.
|
|
182
|
+
*
|
|
183
|
+
* **Flow:**
|
|
184
|
+
* 1. Renderer requests image via IPC
|
|
185
|
+
* 2. Main process checks cache → Miss
|
|
186
|
+
* 3. Fetches file tree from repository cache
|
|
187
|
+
* 4. Generates new File City visualization
|
|
188
|
+
* 5. Saves to cache
|
|
189
|
+
* 6. Returns generated URL via IPC
|
|
190
|
+
* 7. Renderer displays image
|
|
191
|
+
*
|
|
192
|
+
* **Move Events (cross-boundary):**
|
|
193
|
+
* - `main.image_requested` (Renderer → Main)
|
|
194
|
+
* - `renderer.generation_complete` (Main → Renderer)
|
|
195
|
+
*
|
|
196
|
+
* **Transform Events (internal to Main):**
|
|
197
|
+
* - `cache_checked`, `filetree_fetched`, `generation_started`
|
|
198
|
+
*/
|
|
199
|
+
export const GenerateNewFlow: Story = {
|
|
200
|
+
render: () => (
|
|
201
|
+
<SequenceWithEventsList
|
|
202
|
+
events={workflowData.workflows[1].events}
|
|
203
|
+
edges={workflowData.workflows[1].edges}
|
|
204
|
+
height={700}
|
|
205
|
+
layoutOptions={{
|
|
206
|
+
laneWidth: 200,
|
|
207
|
+
eventSpacing: 80,
|
|
208
|
+
}}
|
|
209
|
+
/>
|
|
210
|
+
),
|
|
211
|
+
parameters: {
|
|
212
|
+
docs: {
|
|
213
|
+
description: {
|
|
214
|
+
story: 'Full generation path with cache miss - includes image generation.',
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* **Error Path - No FileTree**
|
|
222
|
+
*
|
|
223
|
+
* Error handling when file tree is not available.
|
|
224
|
+
*
|
|
225
|
+
* **Flow:**
|
|
226
|
+
* 1. Renderer requests image via IPC
|
|
227
|
+
* 2. Main process checks cache → Miss
|
|
228
|
+
* 3. Attempts to fetch file tree → Not available
|
|
229
|
+
* 4. Skips generation, returns null
|
|
230
|
+
* 5. Renderer displays fallback UI
|
|
231
|
+
*
|
|
232
|
+
* **Move Events:**
|
|
233
|
+
* - `main.image_requested` (Renderer → Main)
|
|
234
|
+
* - `renderer.generation_skipped` (Main → Renderer)
|
|
235
|
+
*/
|
|
236
|
+
export const NoFileTreeFlow: Story = {
|
|
237
|
+
render: () => (
|
|
238
|
+
<SequenceWithEventsList
|
|
239
|
+
events={workflowData.workflows[2].events}
|
|
240
|
+
edges={workflowData.workflows[2].edges}
|
|
241
|
+
height={600}
|
|
242
|
+
layoutOptions={{
|
|
243
|
+
laneWidth: 200,
|
|
244
|
+
eventSpacing: 80,
|
|
245
|
+
}}
|
|
246
|
+
/>
|
|
247
|
+
),
|
|
248
|
+
parameters: {
|
|
249
|
+
docs: {
|
|
250
|
+
description: {
|
|
251
|
+
story: 'Error handling when repository file tree is unavailable.',
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* **Error During Generation**
|
|
259
|
+
*
|
|
260
|
+
* Error handling when image generation fails.
|
|
261
|
+
*
|
|
262
|
+
* **Flow:**
|
|
263
|
+
* 1. Renderer requests image via IPC
|
|
264
|
+
* 2. Main process checks cache → Miss
|
|
265
|
+
* 3. Fetches file tree successfully
|
|
266
|
+
* 4. Starts generation → Error occurs
|
|
267
|
+
* 5. Returns error via IPC
|
|
268
|
+
* 6. Renderer displays fallback UI
|
|
269
|
+
*
|
|
270
|
+
* **Move Events:**
|
|
271
|
+
* - `main.image_requested` (Renderer → Main)
|
|
272
|
+
* - `renderer.generation_error` (Main → Renderer)
|
|
273
|
+
*/
|
|
274
|
+
export const ErrorFlow: Story = {
|
|
275
|
+
render: () => (
|
|
276
|
+
<SequenceWithEventsList
|
|
277
|
+
events={workflowData.workflows[3].events}
|
|
278
|
+
edges={workflowData.workflows[3].edges}
|
|
279
|
+
height={650}
|
|
280
|
+
layoutOptions={{
|
|
281
|
+
laneWidth: 200,
|
|
282
|
+
eventSpacing: 80,
|
|
283
|
+
}}
|
|
284
|
+
/>
|
|
285
|
+
),
|
|
286
|
+
parameters: {
|
|
287
|
+
docs: {
|
|
288
|
+
description: {
|
|
289
|
+
story: 'Error handling when image generation fails unexpectedly.',
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* **Comparison View**
|
|
297
|
+
*
|
|
298
|
+
* Side-by-side comparison of cache hit vs full generation.
|
|
299
|
+
* Shows how the same canvas structure supports multiple execution paths.
|
|
300
|
+
*/
|
|
301
|
+
export const ComparisonView: Story = {
|
|
302
|
+
render: () => (
|
|
303
|
+
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', height: '100vh' }}>
|
|
304
|
+
<div style={{ display: 'flex', flexDirection: 'column', borderRight: '1px solid #3e3e3e' }}>
|
|
305
|
+
<h3 style={{ margin: '12px', color: '#d4d4d4' }}>Cache Hit (Fast)</h3>
|
|
306
|
+
<div style={{ flex: 1 }}>
|
|
307
|
+
<SequenceDiagramRenderer
|
|
308
|
+
events={workflowData.workflows[0].events}
|
|
309
|
+
edges={workflowData.workflows[0].edges}
|
|
310
|
+
height={600}
|
|
311
|
+
layoutOptions={{
|
|
312
|
+
laneWidth: 180,
|
|
313
|
+
eventSpacing: 70,
|
|
314
|
+
}}
|
|
315
|
+
/>
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
|
319
|
+
<h3 style={{ margin: '12px', color: '#d4d4d4' }}>Generate New (Full)</h3>
|
|
320
|
+
<div style={{ flex: 1 }}>
|
|
321
|
+
<SequenceDiagramRenderer
|
|
322
|
+
events={workflowData.workflows[1].events}
|
|
323
|
+
edges={workflowData.workflows[1].edges}
|
|
324
|
+
height={600}
|
|
325
|
+
layoutOptions={{
|
|
326
|
+
laneWidth: 180,
|
|
327
|
+
eventSpacing: 70,
|
|
328
|
+
}}
|
|
329
|
+
/>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
),
|
|
334
|
+
parameters: {
|
|
335
|
+
docs: {
|
|
336
|
+
description: {
|
|
337
|
+
story: 'Visual comparison showing branching execution paths from the same canvas.',
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* **All Paths Overview**
|
|
345
|
+
*
|
|
346
|
+
* Grid view of all possible execution paths through the system.
|
|
347
|
+
* Demonstrates the canvas as an "aggregation of sequences" - showing
|
|
348
|
+
* the full possibility space that the canvas represents.
|
|
349
|
+
*/
|
|
350
|
+
export const AllPathsOverview: Story = {
|
|
351
|
+
render: () => (
|
|
352
|
+
<div style={{
|
|
353
|
+
display: 'grid',
|
|
354
|
+
gridTemplateColumns: '1fr 1fr',
|
|
355
|
+
height: '100vh',
|
|
356
|
+
overflow: 'auto',
|
|
357
|
+
background: '#1e1e1e'
|
|
358
|
+
}}>
|
|
359
|
+
{workflowData.workflows.map((workflow, index) => (
|
|
360
|
+
<div
|
|
361
|
+
key={workflow.id}
|
|
362
|
+
style={{
|
|
363
|
+
display: 'flex',
|
|
364
|
+
flexDirection: 'column',
|
|
365
|
+
borderRight: index % 2 === 0 ? '1px solid #3e3e3e' : 'none',
|
|
366
|
+
borderBottom: index < 2 ? '1px solid #3e3e3e' : 'none'
|
|
367
|
+
}}
|
|
368
|
+
>
|
|
369
|
+
<div style={{ padding: '12px', borderBottom: '1px solid #3e3e3e' }}>
|
|
370
|
+
<h3 style={{ margin: '0 0 4px 0', color: '#d4d4d4' }}>{workflow.name}</h3>
|
|
371
|
+
<p style={{ fontSize: 13, color: '#858585', margin: 0 }}>
|
|
372
|
+
{workflow.description}
|
|
373
|
+
</p>
|
|
374
|
+
</div>
|
|
375
|
+
<div style={{ flex: 1 }}>
|
|
376
|
+
<SequenceDiagramRenderer
|
|
377
|
+
events={workflow.events}
|
|
378
|
+
edges={workflow.edges}
|
|
379
|
+
height={400}
|
|
380
|
+
layoutOptions={{
|
|
381
|
+
laneWidth: 160,
|
|
382
|
+
eventSpacing: 60,
|
|
383
|
+
laneGap: 40,
|
|
384
|
+
}}
|
|
385
|
+
/>
|
|
386
|
+
</div>
|
|
387
|
+
</div>
|
|
388
|
+
))}
|
|
389
|
+
</div>
|
|
390
|
+
),
|
|
391
|
+
parameters: {
|
|
392
|
+
docs: {
|
|
393
|
+
description: {
|
|
394
|
+
story: 'Complete overview of all execution paths - the "library of possibilities".',
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* **Using WorkflowSequenceDiagram Wrapper**
|
|
402
|
+
*
|
|
403
|
+
* Demonstrates the simplified API using the WorkflowSequenceDiagram component.
|
|
404
|
+
* This component automatically handles the conversion from workflow to sequence format.
|
|
405
|
+
*/
|
|
406
|
+
export const UsingWorkflowWrapper: Story = {
|
|
407
|
+
render: () => {
|
|
408
|
+
// Convert our workflow data to the expected WorkflowScenario format
|
|
409
|
+
const scenario: WorkflowScenario = {
|
|
410
|
+
id: 'cache-hit-flow',
|
|
411
|
+
name: 'Cache Hit Flow',
|
|
412
|
+
description: 'Optimal path where cached image exists',
|
|
413
|
+
events: workflowData.workflows[1].events.map(e => ({
|
|
414
|
+
name: e.name,
|
|
415
|
+
label: e.label,
|
|
416
|
+
moveEvent: e.moveEvent,
|
|
417
|
+
participant: e.participant,
|
|
418
|
+
})),
|
|
419
|
+
edges: workflowData.workflows[1].edges,
|
|
420
|
+
template: {
|
|
421
|
+
events: {},
|
|
422
|
+
},
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
return (
|
|
426
|
+
<div style={{ height: '100vh', display: 'flex', flexDirection: 'column' }}>
|
|
427
|
+
<div style={{
|
|
428
|
+
padding: '12px',
|
|
429
|
+
background: '#1e1e1e',
|
|
430
|
+
borderBottom: '1px solid #3e3e3e',
|
|
431
|
+
color: '#d4d4d4'
|
|
432
|
+
}}>
|
|
433
|
+
<h3 style={{ margin: '0 0 4px 0' }}>WorkflowSequenceDiagram Component</h3>
|
|
434
|
+
<p style={{ fontSize: 13, color: '#858585', margin: 0 }}>
|
|
435
|
+
Cleaner API - just pass the workflow scenario and optional canvas
|
|
436
|
+
</p>
|
|
437
|
+
</div>
|
|
438
|
+
<div style={{ flex: 1 }}>
|
|
439
|
+
<WorkflowSequenceDiagram
|
|
440
|
+
scenario={scenario}
|
|
441
|
+
height="100%"
|
|
442
|
+
layoutOptions={{
|
|
443
|
+
laneWidth: 200,
|
|
444
|
+
eventSpacing: 80,
|
|
445
|
+
}}
|
|
446
|
+
/>
|
|
447
|
+
</div>
|
|
448
|
+
</div>
|
|
449
|
+
);
|
|
450
|
+
},
|
|
451
|
+
parameters: {
|
|
452
|
+
docs: {
|
|
453
|
+
description: {
|
|
454
|
+
story: 'Simplified API using the WorkflowSequenceDiagram wrapper component.',
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
},
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* **Interactive Drill-Down**
|
|
462
|
+
*
|
|
463
|
+
* Lanes default to top-level participants. Use the ▶ chevrons on a lane
|
|
464
|
+
* header to drill into its sub-namespaces, and ‹ on a child lane to step
|
|
465
|
+
* back out.
|
|
466
|
+
*/
|
|
467
|
+
export const InteractiveDrillDown: Story = {
|
|
468
|
+
render: () => {
|
|
469
|
+
const [opened, setOpened] = React.useState<string[]>([]);
|
|
470
|
+
|
|
471
|
+
const handleToggle = (namespace: string) => {
|
|
472
|
+
setOpened((prev) =>
|
|
473
|
+
prev.includes(namespace)
|
|
474
|
+
? prev.filter((n) => n !== namespace)
|
|
475
|
+
: [...prev, namespace]
|
|
476
|
+
);
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
return (
|
|
480
|
+
<div style={{ height: '100vh', display: 'flex', flexDirection: 'column' }}>
|
|
481
|
+
<div style={{
|
|
482
|
+
padding: '12px',
|
|
483
|
+
background: '#1e1e1e',
|
|
484
|
+
borderBottom: '1px solid #3e3e3e',
|
|
485
|
+
color: '#d4d4d4',
|
|
486
|
+
}}>
|
|
487
|
+
<strong>Opened:</strong>{' '}
|
|
488
|
+
{opened.length ? opened.join(', ') : 'none (top-level participants)'}
|
|
489
|
+
<p style={{ fontSize: 13, color: '#858585', marginTop: 8, marginBottom: 0 }}>
|
|
490
|
+
▶ on a lane drills into its sub-namespaces. ‹ on a child lane steps back out.
|
|
491
|
+
</p>
|
|
492
|
+
</div>
|
|
493
|
+
<div style={{ flex: 1 }}>
|
|
494
|
+
<SequenceDiagramRenderer
|
|
495
|
+
events={workflowData.workflows[1].events}
|
|
496
|
+
edges={workflowData.workflows[1].edges}
|
|
497
|
+
height={700}
|
|
498
|
+
layoutOptions={{
|
|
499
|
+
openedNamespaces: opened,
|
|
500
|
+
laneWidth: 200,
|
|
501
|
+
eventSpacing: 80,
|
|
502
|
+
}}
|
|
503
|
+
onToggleNamespace={handleToggle}
|
|
504
|
+
/>
|
|
505
|
+
</div>
|
|
506
|
+
</div>
|
|
507
|
+
);
|
|
508
|
+
},
|
|
509
|
+
parameters: {
|
|
510
|
+
docs: {
|
|
511
|
+
description: {
|
|
512
|
+
story: 'Drill into participant lanes to reveal their sub-namespaces.',
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
};
|