@principal-ai/subsystems-react 0.20.6 → 0.21.1
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 +1 -1
- package/dist/graphify/anchor.d.ts +17 -0
- package/dist/graphify/anchor.d.ts.map +1 -1
- package/dist/graphify/anchor.js +41 -0
- package/dist/graphify/anchor.js.map +1 -1
- package/dist/graphify/consolidated.d.ts +40 -1
- package/dist/graphify/consolidated.d.ts.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/pierre/{PierreThroughlineCodeView.d.ts → PierreWalkthroughCodeView.d.ts} +7 -7
- package/dist/pierre/{PierreThroughlineCodeView.d.ts.map → PierreWalkthroughCodeView.d.ts.map} +1 -1
- package/dist/pierre/{PierreThroughlineCodeView.js → PierreWalkthroughCodeView.js} +28 -36
- package/dist/pierre/PierreWalkthroughCodeView.js.map +1 -0
- package/dist/pierre/index.d.ts +2 -2
- package/dist/pierre/index.js +1 -1
- package/dist/pierre/pierreFileLang.d.ts +1 -1
- package/dist/pierre/pierreFileLang.js +1 -1
- package/dist/stories/Subsystem/ComponentGraph/fixtures.d.ts +14 -2
- package/dist/stories/Subsystem/ComponentGraph/fixtures.d.ts.map +1 -1
- package/dist/stories/Subsystem/ComponentGraph/fixtures.js +86 -20
- package/dist/stories/Subsystem/ComponentGraph/fixtures.js.map +1 -1
- package/dist/subsystem/FileDrawer.d.ts +2 -2
- package/dist/subsystem/FileDrawer.js +2 -2
- package/dist/subsystem/SubsystemComponentGraph.d.ts +25 -24
- package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.js +204 -199
- package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
- package/dist/subsystem/formatDeclaration.d.ts +2 -1
- package/dist/subsystem/formatDeclaration.d.ts.map +1 -1
- package/dist/subsystem/formatDeclaration.js +57 -33
- package/dist/subsystem/formatDeclaration.js.map +1 -1
- package/dist/subsystem/model.d.ts +85 -35
- package/dist/subsystem/model.d.ts.map +1 -1
- package/dist/subsystem/model.js +85 -6
- package/dist/subsystem/model.js.map +1 -1
- package/dist/subsystem/nodes.d.ts.map +1 -1
- package/dist/subsystem/nodes.js +30 -13
- package/dist/subsystem/nodes.js.map +1 -1
- package/dist/subsystem/tokenizeComponent.js +2 -2
- package/dist/subsystem/tokenizeComponent.js.map +1 -1
- package/package.json +3 -3
- package/src/graphify/anchor.test.ts +31 -2
- package/src/graphify/anchor.ts +46 -0
- package/src/graphify/consolidated.ts +43 -1
- package/src/index.ts +13 -5
- package/src/pierre/{PierreThroughlineCodeView.tsx → PierreWalkthroughCodeView.tsx} +39 -47
- package/src/pierre/index.ts +2 -2
- package/src/pierre/pierreFileLang.ts +1 -1
- package/src/stories/Pierre/CodeView.stories.tsx +3 -3
- package/src/stories/Subsystem/ComponentDeclarationAudit.stories.tsx +14 -14
- package/src/stories/Subsystem/ComponentGraph/Appearance.stories.tsx +13 -15
- package/src/stories/Subsystem/ComponentGraph/Basics.stories.tsx +8 -8
- package/src/stories/Subsystem/ComponentGraph/Captures.stories.tsx +14 -14
- package/src/stories/Subsystem/ComponentGraph/CustomEntities.stories.tsx +11 -10
- package/src/stories/Subsystem/ComponentGraph/DetailPanel.stories.tsx +13 -14
- package/src/stories/Subsystem/ComponentGraph/Flows.stories.tsx +31 -66
- package/src/stories/Subsystem/ComponentGraph/FrameworkStereotype.stories.tsx +2 -2
- package/src/stories/Subsystem/ComponentGraph/GraphTitle.stories.tsx +4 -4
- package/src/stories/Subsystem/ComponentGraph/Processes.stories.tsx +3 -3
- package/src/stories/Subsystem/ComponentGraph/Proposed.stories.tsx +1 -1
- package/src/stories/Subsystem/ComponentGraph/Scenarios.stories.tsx +518 -33
- package/src/stories/Subsystem/ComponentGraph/Spotlights.stories.tsx +13 -13
- package/src/stories/Subsystem/ComponentGraph/fixtures.ts +105 -21
- package/src/subsystem/FileDrawer.tsx +2 -2
- package/src/subsystem/SubsystemComponentGraph.tsx +268 -259
- package/src/subsystem/formatDeclaration.test.ts +76 -1
- package/src/subsystem/formatDeclaration.ts +57 -33
- package/src/subsystem/model.test.ts +27 -15
- package/src/subsystem/model.ts +175 -45
- package/src/subsystem/nodes.tsx +47 -13
- package/src/subsystem/tokenizeComponent.ts +2 -2
- package/dist/components/ConfigurationSelector.d.ts +0 -35
- package/dist/components/ConfigurationSelector.d.ts.map +0 -1
- package/dist/components/ConfigurationSelector.js +0 -63
- package/dist/components/ConfigurationSelector.js.map +0 -1
- package/dist/components/GraphRenderer.d.ts +0 -295
- package/dist/components/GraphRenderer.d.ts.map +0 -1
- package/dist/components/GraphRenderer.js +0 -2008
- package/dist/components/GraphRenderer.js.map +0 -1
- package/dist/components/MultiCanvasRenderer.d.ts +0 -75
- package/dist/components/MultiCanvasRenderer.d.ts.map +0 -1
- package/dist/components/MultiCanvasRenderer.js +0 -203
- package/dist/components/MultiCanvasRenderer.js.map +0 -1
- package/dist/components/NodeTooltip.d.ts +0 -24
- package/dist/components/NodeTooltip.d.ts.map +0 -1
- package/dist/components/NodeTooltip.js +0 -160
- package/dist/components/NodeTooltip.js.map +0 -1
- package/dist/components/SelectionSidebar.d.ts +0 -18
- package/dist/components/SelectionSidebar.d.ts.map +0 -1
- package/dist/components/SelectionSidebar.js +0 -190
- package/dist/components/SelectionSidebar.js.map +0 -1
- package/dist/components/SequenceDiagramRenderer.d.ts +0 -77
- package/dist/components/SequenceDiagramRenderer.d.ts.map +0 -1
- package/dist/components/SequenceDiagramRenderer.js +0 -604
- package/dist/components/SequenceDiagramRenderer.js.map +0 -1
- package/dist/components/WorkflowSequenceDiagram.d.ts +0 -63
- package/dist/components/WorkflowSequenceDiagram.d.ts.map +0 -1
- package/dist/components/WorkflowSequenceDiagram.js +0 -147
- package/dist/components/WorkflowSequenceDiagram.js.map +0 -1
- package/dist/components/dashboard/DashboardRenderer.d.ts +0 -10
- package/dist/components/dashboard/DashboardRenderer.d.ts.map +0 -1
- package/dist/components/dashboard/DashboardRenderer.js +0 -179
- package/dist/components/dashboard/DashboardRenderer.js.map +0 -1
- package/dist/components/dashboard/MetricPanel.d.ts +0 -10
- package/dist/components/dashboard/MetricPanel.d.ts.map +0 -1
- package/dist/components/dashboard/MetricPanel.js +0 -103
- package/dist/components/dashboard/MetricPanel.js.map +0 -1
- package/dist/components/dashboard/MockDataProvider.d.ts +0 -30
- package/dist/components/dashboard/MockDataProvider.d.ts.map +0 -1
- package/dist/components/dashboard/MockDataProvider.js +0 -270
- package/dist/components/dashboard/MockDataProvider.js.map +0 -1
- package/dist/components/dashboard/components/BarChart.d.ts +0 -10
- package/dist/components/dashboard/components/BarChart.d.ts.map +0 -1
- package/dist/components/dashboard/components/BarChart.js +0 -167
- package/dist/components/dashboard/components/BarChart.js.map +0 -1
- package/dist/components/dashboard/components/LineChart.d.ts +0 -10
- package/dist/components/dashboard/components/LineChart.d.ts.map +0 -1
- package/dist/components/dashboard/components/LineChart.js +0 -141
- package/dist/components/dashboard/components/LineChart.js.map +0 -1
- package/dist/components/dashboard/components/MetricCard.d.ts +0 -9
- package/dist/components/dashboard/components/MetricCard.d.ts.map +0 -1
- package/dist/components/dashboard/components/MetricCard.js +0 -163
- package/dist/components/dashboard/components/MetricCard.js.map +0 -1
- package/dist/components/dashboard/components/SourceLink.d.ts +0 -9
- package/dist/components/dashboard/components/SourceLink.d.ts.map +0 -1
- package/dist/components/dashboard/components/SourceLink.js +0 -39
- package/dist/components/dashboard/components/SourceLink.js.map +0 -1
- package/dist/components/dashboard/components/TimeRangeSelector.d.ts +0 -9
- package/dist/components/dashboard/components/TimeRangeSelector.d.ts.map +0 -1
- package/dist/components/dashboard/components/TimeRangeSelector.js +0 -167
- package/dist/components/dashboard/components/TimeRangeSelector.js.map +0 -1
- package/dist/components/dashboard/components/index.d.ts +0 -6
- package/dist/components/dashboard/components/index.d.ts.map +0 -1
- package/dist/components/dashboard/components/index.js +0 -6
- package/dist/components/dashboard/components/index.js.map +0 -1
- package/dist/components/dashboard/index.d.ts +0 -6
- package/dist/components/dashboard/index.d.ts.map +0 -1
- package/dist/components/dashboard/index.js +0 -8
- package/dist/components/dashboard/index.js.map +0 -1
- package/dist/components/dashboard/types.d.ts +0 -74
- package/dist/components/dashboard/types.d.ts.map +0 -1
- package/dist/components/dashboard/types.js +0 -8
- package/dist/components/dashboard/types.js.map +0 -1
- package/dist/components/state-view/PipelineView.d.ts +0 -14
- package/dist/components/state-view/PipelineView.d.ts.map +0 -1
- package/dist/components/state-view/PipelineView.js +0 -195
- package/dist/components/state-view/PipelineView.js.map +0 -1
- package/dist/components/state-view/index.d.ts +0 -14
- package/dist/components/state-view/index.d.ts.map +0 -1
- package/dist/components/state-view/index.js +0 -12
- package/dist/components/state-view/index.js.map +0 -1
- package/dist/components/state-view/types.d.ts +0 -188
- package/dist/components/state-view/types.d.ts.map +0 -1
- package/dist/components/state-view/types.js +0 -10
- package/dist/components/state-view/types.js.map +0 -1
- package/dist/components/state-view/useStateView.d.ts +0 -32
- package/dist/components/state-view/useStateView.d.ts.map +0 -1
- package/dist/components/state-view/useStateView.js +0 -129
- package/dist/components/state-view/useStateView.js.map +0 -1
- package/dist/contexts/GraphEditContext.d.ts +0 -20
- package/dist/contexts/GraphEditContext.d.ts.map +0 -1
- package/dist/contexts/GraphEditContext.js +0 -8
- package/dist/contexts/GraphEditContext.js.map +0 -1
- package/dist/contexts/TooltipPortalContext.d.ts +0 -8
- package/dist/contexts/TooltipPortalContext.d.ts.map +0 -1
- package/dist/contexts/TooltipPortalContext.js +0 -8
- package/dist/contexts/TooltipPortalContext.js.map +0 -1
- package/dist/edges/CustomEdge.d.ts +0 -24
- package/dist/edges/CustomEdge.d.ts.map +0 -1
- package/dist/edges/CustomEdge.js +0 -222
- package/dist/edges/CustomEdge.js.map +0 -1
- package/dist/edges/GenericEdge.d.ts +0 -18
- package/dist/edges/GenericEdge.d.ts.map +0 -1
- package/dist/edges/GenericEdge.js +0 -10
- package/dist/edges/GenericEdge.js.map +0 -1
- package/dist/graphify/kind.d.ts +0 -23
- package/dist/graphify/kind.d.ts.map +0 -1
- package/dist/graphify/kind.js +0 -77
- package/dist/graphify/kind.js.map +0 -1
- package/dist/hooks/usePathBasedEvents.d.ts +0 -42
- package/dist/hooks/usePathBasedEvents.d.ts.map +0 -1
- package/dist/hooks/usePathBasedEvents.js +0 -119
- package/dist/hooks/usePathBasedEvents.js.map +0 -1
- package/dist/hooks/useSequenceLayout.d.ts +0 -186
- package/dist/hooks/useSequenceLayout.d.ts.map +0 -1
- package/dist/hooks/useSequenceLayout.js +0 -327
- package/dist/hooks/useSequenceLayout.js.map +0 -1
- package/dist/hooks/useUndoRedo.d.ts +0 -80
- package/dist/hooks/useUndoRedo.d.ts.map +0 -1
- package/dist/hooks/useUndoRedo.js +0 -70
- package/dist/hooks/useUndoRedo.js.map +0 -1
- package/dist/nodes/CustomNode.d.ts +0 -28
- package/dist/nodes/CustomNode.d.ts.map +0 -1
- package/dist/nodes/CustomNode.js +0 -820
- package/dist/nodes/CustomNode.js.map +0 -1
- package/dist/nodes/GenericNode.d.ts +0 -20
- package/dist/nodes/GenericNode.d.ts.map +0 -1
- package/dist/nodes/GenericNode.js +0 -20
- package/dist/nodes/GenericNode.js.map +0 -1
- package/dist/nodes/otel/OtelBoundaryNode.d.ts +0 -55
- package/dist/nodes/otel/OtelBoundaryNode.d.ts.map +0 -1
- package/dist/nodes/otel/OtelBoundaryNode.js +0 -81
- package/dist/nodes/otel/OtelBoundaryNode.js.map +0 -1
- package/dist/nodes/otel/OtelEventNode.d.ts +0 -59
- package/dist/nodes/otel/OtelEventNode.d.ts.map +0 -1
- package/dist/nodes/otel/OtelEventNode.js +0 -82
- package/dist/nodes/otel/OtelEventNode.js.map +0 -1
- package/dist/nodes/otel/OtelResourceNode.d.ts +0 -53
- package/dist/nodes/otel/OtelResourceNode.d.ts.map +0 -1
- package/dist/nodes/otel/OtelResourceNode.js +0 -105
- package/dist/nodes/otel/OtelResourceNode.js.map +0 -1
- package/dist/nodes/otel/OtelScopeNode.d.ts +0 -53
- package/dist/nodes/otel/OtelScopeNode.d.ts.map +0 -1
- package/dist/nodes/otel/OtelScopeNode.js +0 -81
- package/dist/nodes/otel/OtelScopeNode.js.map +0 -1
- package/dist/nodes/otel/OtelSpanConventionNode.d.ts +0 -61
- package/dist/nodes/otel/OtelSpanConventionNode.d.ts.map +0 -1
- package/dist/nodes/otel/OtelSpanConventionNode.js +0 -131
- package/dist/nodes/otel/OtelSpanConventionNode.js.map +0 -1
- package/dist/nodes/otel/index.d.ts +0 -17
- package/dist/nodes/otel/index.d.ts.map +0 -1
- package/dist/nodes/otel/index.js +0 -13
- package/dist/nodes/otel/index.js.map +0 -1
- package/dist/nodes/otel/shared/NodeBadges.d.ts +0 -10
- package/dist/nodes/otel/shared/NodeBadges.d.ts.map +0 -1
- package/dist/nodes/otel/shared/NodeBadges.js +0 -178
- package/dist/nodes/otel/shared/NodeBadges.js.map +0 -1
- package/dist/nodes/otel/shared/NodeContent.d.ts +0 -10
- package/dist/nodes/otel/shared/NodeContent.d.ts.map +0 -1
- package/dist/nodes/otel/shared/NodeContent.js +0 -96
- package/dist/nodes/otel/shared/NodeContent.js.map +0 -1
- package/dist/nodes/otel/shared/index.d.ts +0 -8
- package/dist/nodes/otel/shared/index.d.ts.map +0 -1
- package/dist/nodes/otel/shared/index.js +0 -8
- package/dist/nodes/otel/shared/index.js.map +0 -1
- package/dist/nodes/otel/shared/types.d.ts +0 -129
- package/dist/nodes/otel/shared/types.d.ts.map +0 -1
- package/dist/nodes/otel/shared/types.js +0 -5
- package/dist/nodes/otel/shared/types.js.map +0 -1
- package/dist/nodes/otel/shared/useNodeBehavior.d.ts +0 -42
- package/dist/nodes/otel/shared/useNodeBehavior.d.ts.map +0 -1
- package/dist/nodes/otel/shared/useNodeBehavior.js +0 -61
- package/dist/nodes/otel/shared/useNodeBehavior.js.map +0 -1
- package/dist/pierre/PierreThroughlineCodeView.js.map +0 -1
- package/dist/subsystem/SubsystemCarousel.d.ts +0 -36
- package/dist/subsystem/SubsystemCarousel.d.ts.map +0 -1
- package/dist/subsystem/SubsystemCarousel.js +0 -163
- package/dist/subsystem/SubsystemCarousel.js.map +0 -1
- package/dist/utils/animationMapping.d.ts +0 -53
- package/dist/utils/animationMapping.d.ts.map +0 -1
- package/dist/utils/animationMapping.js +0 -126
- package/dist/utils/animationMapping.js.map +0 -1
- package/dist/utils/canvasBounds.d.ts +0 -50
- package/dist/utils/canvasBounds.d.ts.map +0 -1
- package/dist/utils/canvasBounds.js +0 -88
- package/dist/utils/canvasBounds.js.map +0 -1
- package/dist/utils/graphConverter.d.ts +0 -18
- package/dist/utils/graphConverter.d.ts.map +0 -1
- package/dist/utils/graphConverter.js +0 -114
- package/dist/utils/graphConverter.js.map +0 -1
- package/dist/utils/iconResolver.d.ts +0 -29
- package/dist/utils/iconResolver.d.ts.map +0 -1
- package/dist/utils/iconResolver.js +0 -30
- package/dist/utils/iconResolver.js.map +0 -1
- package/dist/utils/orientationUtils.d.ts +0 -19
- package/dist/utils/orientationUtils.d.ts.map +0 -1
- package/dist/utils/orientationUtils.js +0 -62
- package/dist/utils/orientationUtils.js.map +0 -1
|
@@ -3,13 +3,9 @@ import '@xyflow/react/dist/style.css';
|
|
|
3
3
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
4
4
|
import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
|
|
5
5
|
import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
|
|
6
|
-
import type {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
SubsystemThroughline,
|
|
10
|
-
} from '../../../subsystem/model';
|
|
11
|
-
import { PierreThroughlineCodeView } from '../../../pierre';
|
|
12
|
-
import type { ThroughlineViewerContext } from '../../../subsystem/SubsystemComponentGraph';
|
|
6
|
+
import type { SubsystemComponent, SubsystemWalkthrough } from '../../../subsystem/model';
|
|
7
|
+
import { PierreWalkthroughCodeView } from '../../../pierre';
|
|
8
|
+
import type { WalkthroughViewerContext } from '../../../subsystem/SubsystemComponentGraph';
|
|
13
9
|
|
|
14
10
|
const meta = {
|
|
15
11
|
title: 'Subsystem/ComponentGraph/Flows',
|
|
@@ -30,16 +26,6 @@ const meta = {
|
|
|
30
26
|
export default meta;
|
|
31
27
|
type Story = StoryObj<typeof meta>;
|
|
32
28
|
|
|
33
|
-
// ---------------------------------------------------------------------------
|
|
34
|
-
// Mirror of the retrofitted electron-app drawing graph: the sidebar's Files
|
|
35
|
-
// panel swaps to a Flows panel listing three throughlines (open / save /
|
|
36
|
-
// delete). Clicking a flow row toggles its steps; clicking a step focuses
|
|
37
|
-
// that step's edge, frames it on the canvas, and scrolls the bottom CodeView
|
|
38
|
-
// to that step's snippet. Other opened flows stay dimmed; the rest of the
|
|
39
|
-
// graph is hidden.
|
|
40
|
-
// ---------------------------------------------------------------------------
|
|
41
|
-
|
|
42
|
-
/** Build enough placeholder lines so step `line` values land inside the file. */
|
|
43
29
|
function fakeSource(path: string, markedLines: number[]): string {
|
|
44
30
|
const maxLine = Math.max(80, ...markedLines);
|
|
45
31
|
const marks = new Set(markedLines);
|
|
@@ -58,19 +44,11 @@ function fakeSource(path: string, markedLines: number[]): string {
|
|
|
58
44
|
}
|
|
59
45
|
|
|
60
46
|
const storyFiles: Record<string, string> = {
|
|
61
|
-
'src/panels/DrawingsLeftPanel.tsx': fakeSource('src/panels/DrawingsLeftPanel.tsx', [
|
|
62
|
-
|
|
63
|
-
]),
|
|
64
|
-
'src/hooks/useDrawingsHost.ts': fakeSource('src/hooks/useDrawingsHost.ts', [
|
|
65
|
-
45, 64, 66,
|
|
66
|
-
]),
|
|
67
|
-
'src/workspace/WorkspaceShell.tsx': fakeSource('src/workspace/WorkspaceShell.tsx', [
|
|
68
|
-
369, 372,
|
|
69
|
-
]),
|
|
47
|
+
'src/panels/DrawingsLeftPanel.tsx': fakeSource('src/panels/DrawingsLeftPanel.tsx', [56, 85]),
|
|
48
|
+
'src/hooks/useDrawingsHost.ts': fakeSource('src/hooks/useDrawingsHost.ts', [45, 64, 66]),
|
|
49
|
+
'src/workspace/WorkspaceShell.tsx': fakeSource('src/workspace/WorkspaceShell.tsx', [369, 372]),
|
|
70
50
|
'src/storage/drawingsStorage.ts': fakeSource('src/storage/drawingsStorage.ts', [90]),
|
|
71
|
-
'src/components/DrawingTabContent.tsx': fakeSource('src/components/DrawingTabContent.tsx', [
|
|
72
|
-
83, 112, 121,
|
|
73
|
-
]),
|
|
51
|
+
'src/components/DrawingTabContent.tsx': fakeSource('src/components/DrawingTabContent.tsx', [83, 112, 121]),
|
|
74
52
|
};
|
|
75
53
|
|
|
76
54
|
function readStoryFile(path: string): Promise<string> {
|
|
@@ -144,59 +122,46 @@ const drawingComponents: SubsystemComponent[] = [
|
|
|
144
122
|
},
|
|
145
123
|
];
|
|
146
124
|
|
|
147
|
-
const
|
|
148
|
-
{ id: 'e-scan', from: 'panel', to: 'storage', mechanism: 'calls' },
|
|
149
|
-
{ id: 'e-open-event', from: 'panel', to: 'host', mechanism: 'produces' },
|
|
150
|
-
{ id: 'e-refresh', from: 'host', to: 'panel', mechanism: 'produces' },
|
|
151
|
-
{ id: 'e-open', from: 'host', to: 'storage', mechanism: 'calls' },
|
|
152
|
-
{ id: 'e-read', from: 'storage', to: 'fs', mechanism: 'calls' },
|
|
153
|
-
{ id: 'e-delete', from: 'host', to: 'fs', mechanism: 'calls' },
|
|
154
|
-
{ id: 'e-show', from: 'host', to: 'shell', mechanism: 'produces' },
|
|
155
|
-
{ id: 'e-mount', from: 'shell', to: 'tab', mechanism: 'feeds' },
|
|
156
|
-
{ id: 'e-tab-io', from: 'tab', to: 'fs', mechanism: 'calls' },
|
|
157
|
-
{ id: 'e-saved-event', from: 'tab', to: 'host', mechanism: 'produces' },
|
|
158
|
-
];
|
|
159
|
-
|
|
160
|
-
const drawingThroughlines: SubsystemThroughline[] = [
|
|
125
|
+
const drawingWalkthroughs: SubsystemWalkthrough[] = [
|
|
161
126
|
{
|
|
162
127
|
id: 'tl-open-drawing',
|
|
163
128
|
title: 'Open drawing',
|
|
164
129
|
steps: [
|
|
165
|
-
{
|
|
166
|
-
{
|
|
167
|
-
{
|
|
168
|
-
{
|
|
169
|
-
{
|
|
170
|
-
{
|
|
171
|
-
{
|
|
130
|
+
{ from: 'panel', to: 'storage', mechanism: 'calls', file: 'src/panels/DrawingsLeftPanel.tsx', line: 56, symbol: 'DrawingsLeftPanel.scan', annotation: 'Lists the drawings directory; each row feeds an open intent.' },
|
|
131
|
+
{ from: 'panel', to: 'host', mechanism: 'produces', file: 'src/panels/DrawingsLeftPanel.tsx', line: 85, symbol: 'DrawingsLeftPanel.openDrawing', annotation: 'Emits the open intent up to the host.' },
|
|
132
|
+
{ from: 'host', to: 'storage', mechanism: 'calls', file: 'src/hooks/useDrawingsHost.ts', line: 45, symbol: 'useDrawingsHost.openDrawing', annotation: 'Host resolves the path and delegates to storage.' },
|
|
133
|
+
{ from: 'host', to: 'shell', mechanism: 'produces', file: 'src/workspace/WorkspaceShell.tsx', line: 369, symbol: 'WorkspaceShell.openTab', annotation: 'Asks the shell to surface the drawing as a tab.' },
|
|
134
|
+
{ from: 'shell', to: 'tab', mechanism: 'feeds', file: 'src/workspace/WorkspaceShell.tsx', line: 372, symbol: 'WorkspaceShell.mountTab' },
|
|
135
|
+
{ from: 'storage', to: 'fs', mechanism: 'calls', file: 'src/storage/drawingsStorage.ts', line: 90, symbol: 'DrawingsStorage.read', annotation: 'Reads the file through the sandboxed fs service.' },
|
|
136
|
+
{ from: 'tab', to: 'fs', mechanism: 'calls', file: 'src/components/DrawingTabContent.tsx', line: 83, symbol: 'DrawingTabContent.load' },
|
|
172
137
|
],
|
|
173
138
|
},
|
|
174
139
|
{
|
|
175
140
|
id: 'tl-save-drawing',
|
|
176
141
|
title: 'Save drawing',
|
|
177
142
|
steps: [
|
|
178
|
-
{
|
|
179
|
-
{
|
|
180
|
-
{
|
|
181
|
-
{
|
|
143
|
+
{ from: 'tab', to: 'fs', mechanism: 'calls', file: 'src/components/DrawingTabContent.tsx', line: 112, symbol: 'DrawingTabContent.save' },
|
|
144
|
+
{ from: 'tab', to: 'host', mechanism: 'produces', file: 'src/components/DrawingTabContent.tsx', line: 121, symbol: 'DrawingTabContent.emitSaved' },
|
|
145
|
+
{ from: 'host', to: 'panel', mechanism: 'produces', file: 'src/hooks/useDrawingsHost.ts', line: 64, symbol: 'useDrawingsHost.onSaved' },
|
|
146
|
+
{ from: 'panel', to: 'storage', mechanism: 'calls', file: 'src/panels/DrawingsLeftPanel.tsx', line: 56, symbol: 'DrawingsLeftPanel.scan' },
|
|
182
147
|
],
|
|
183
148
|
},
|
|
184
149
|
{
|
|
185
150
|
id: 'tl-delete-drawing',
|
|
186
151
|
title: 'Delete drawing',
|
|
187
152
|
steps: [
|
|
188
|
-
{
|
|
189
|
-
{
|
|
190
|
-
{
|
|
153
|
+
{ from: 'host', to: 'fs', mechanism: 'calls', file: 'src/hooks/useDrawingsHost.ts', line: 64, symbol: 'useDrawingsHost.deleteDrawing' },
|
|
154
|
+
{ from: 'host', to: 'panel', mechanism: 'produces', file: 'src/hooks/useDrawingsHost.ts', line: 66, symbol: 'useDrawingsHost.refreshList' },
|
|
155
|
+
{ from: 'panel', to: 'storage', mechanism: 'calls', file: 'src/panels/DrawingsLeftPanel.tsx', line: 56, symbol: 'DrawingsLeftPanel.scan' },
|
|
191
156
|
],
|
|
192
157
|
},
|
|
193
158
|
];
|
|
194
159
|
|
|
195
160
|
function FlowsDemo() {
|
|
196
|
-
const
|
|
197
|
-
({
|
|
198
|
-
<
|
|
199
|
-
|
|
161
|
+
const renderWalkthroughViewer = useCallback(
|
|
162
|
+
({ walkthrough, stepIndex }: WalkthroughViewerContext) => (
|
|
163
|
+
<PierreWalkthroughCodeView
|
|
164
|
+
walkthrough={walkthrough}
|
|
200
165
|
stepIndex={stepIndex}
|
|
201
166
|
readFile={readStoryFile}
|
|
202
167
|
contextLines={4}
|
|
@@ -209,11 +174,11 @@ function FlowsDemo() {
|
|
|
209
174
|
<div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
|
|
210
175
|
<SubsystemComponentGraph
|
|
211
176
|
components={drawingComponents}
|
|
212
|
-
|
|
213
|
-
|
|
177
|
+
relations={[]}
|
|
178
|
+
walkthroughs={drawingWalkthroughs}
|
|
214
179
|
title="drawing-files flow"
|
|
215
|
-
description="Three
|
|
216
|
-
|
|
180
|
+
description="Three walkthroughs over one graph — opening, saving, and deleting a drawing. The sidebar's **Walkthroughs** panel lists each step by **symbol**; clicking a step focuses that hop and scrolls the bottom CodeView to that snippet."
|
|
181
|
+
renderWalkthroughViewer={renderWalkthroughViewer}
|
|
217
182
|
renderFileViewer={(file, opts) => (
|
|
218
183
|
<div
|
|
219
184
|
style={{
|
|
@@ -236,4 +201,4 @@ function FlowsDemo() {
|
|
|
236
201
|
|
|
237
202
|
export const ThreeFlows: Story = {
|
|
238
203
|
render: () => <FlowsDemo />,
|
|
239
|
-
};
|
|
204
|
+
};
|
|
@@ -137,7 +137,7 @@ export const ReactComponentsAndHooks: Story = {
|
|
|
137
137
|
title="Framework + stereotype"
|
|
138
138
|
description="construct stays language-shaped (function / type_alias). framework + stereotype label React units as component / hook without inventing a react_component construct. Empty fields mean language-only."
|
|
139
139
|
components={reactUiComponents}
|
|
140
|
-
|
|
140
|
+
relations={reactUiEdges.relations} walkthroughs={reactUiEdges.walkthroughs}
|
|
141
141
|
/>
|
|
142
142
|
</div>
|
|
143
143
|
),
|
|
@@ -209,7 +209,7 @@ export const NestControllerStack: Story = {
|
|
|
209
209
|
title="Nest framework stereotypes"
|
|
210
210
|
description="Same optional fields work outside React: class/function constructs plus nestjs controller / guard / middleware / injectable stereotypes."
|
|
211
211
|
components={nestComponents}
|
|
212
|
-
|
|
212
|
+
relations={nestEdges.relations} walkthroughs={nestEdges.walkthroughs}
|
|
213
213
|
/>
|
|
214
214
|
</div>
|
|
215
215
|
),
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
4
4
|
import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
|
|
5
5
|
import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
|
|
6
|
-
import { components,
|
|
6
|
+
import { components, graphSpecFromEdges, relations } from './fixtures';
|
|
7
7
|
|
|
8
8
|
const meta = {
|
|
9
9
|
title: 'Subsystem/ComponentGraph/GraphTitle',
|
|
@@ -30,7 +30,7 @@ const graphOnlyComponents = components([
|
|
|
30
30
|
['caller', 'Web client', 'external', '', 'external', undefined, undefined],
|
|
31
31
|
]);
|
|
32
32
|
|
|
33
|
-
const graphOnlyEdges =
|
|
33
|
+
const graphOnlyEdges = graphSpecFromEdges([
|
|
34
34
|
['caller', 'entry', 'calls'],
|
|
35
35
|
['entry', 'store', 'writes'],
|
|
36
36
|
['entry', 'stripe', 'calls'],
|
|
@@ -41,7 +41,7 @@ function GraphOnly() {
|
|
|
41
41
|
<div style={{ width: '100%', height: '100vh' }}>
|
|
42
42
|
<SubsystemComponentGraph
|
|
43
43
|
components={graphOnlyComponents}
|
|
44
|
-
|
|
44
|
+
relations={graphOnlyEdges.relations} walkthroughs={graphOnlyEdges.walkthroughs}
|
|
45
45
|
graphTitle="Checkout"
|
|
46
46
|
hideSidebar
|
|
47
47
|
/>
|
|
@@ -60,7 +60,7 @@ export const WithSidebar: Story = {
|
|
|
60
60
|
<div style={{ width: '100%', height: '100vh' }}>
|
|
61
61
|
<SubsystemComponentGraph
|
|
62
62
|
components={graphOnlyComponents}
|
|
63
|
-
|
|
63
|
+
relations={graphOnlyEdges.relations} walkthroughs={graphOnlyEdges.walkthroughs}
|
|
64
64
|
title="Checkout"
|
|
65
65
|
description="A small e-commerce checkout subsystem: an HTTP entry point that writes to retained cart state and calls out to Stripe."
|
|
66
66
|
graphTitle="Checkout"
|
|
@@ -2,7 +2,7 @@ import '@xyflow/react/dist/style.css';
|
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
|
|
4
4
|
import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
|
|
5
|
-
import { components,
|
|
5
|
+
import { components, graphSpecFromEdges, relations } from './fixtures';
|
|
6
6
|
|
|
7
7
|
const meta = {
|
|
8
8
|
title: 'Subsystem/ComponentGraph/Processes',
|
|
@@ -47,7 +47,7 @@ const processComponents = [
|
|
|
47
47
|
: c,
|
|
48
48
|
);
|
|
49
49
|
|
|
50
|
-
const processEdges =
|
|
50
|
+
const processEdges = graphSpecFromEdges([
|
|
51
51
|
['main', 'store', 'writes'],
|
|
52
52
|
['main', 'bridge', 'calls'],
|
|
53
53
|
['bridge', 'view', 'feeds'],
|
|
@@ -61,7 +61,7 @@ export const ProcessBoundaries: Story = {
|
|
|
61
61
|
title="Process boundaries"
|
|
62
62
|
description="Host and renderer each render in their own ELK-aware boundary frame. The telemetry service has no `process` and sits outside every boundary."
|
|
63
63
|
components={processComponents}
|
|
64
|
-
|
|
64
|
+
relations={processEdges.relations} walkthroughs={processEdges.walkthroughs}
|
|
65
65
|
/>
|
|
66
66
|
</div>
|
|
67
67
|
),
|
|
@@ -237,7 +237,7 @@ function MigrationDemo() {
|
|
|
237
237
|
<div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
|
|
238
238
|
<SubsystemComponentGraph
|
|
239
239
|
components={migrationComponents}
|
|
240
|
-
|
|
240
|
+
relations={migrationEdges.relations} walkthroughs={migrationEdges.walkthroughs}
|
|
241
241
|
onSelect={(id) => setSelected(id)}
|
|
242
242
|
/>
|
|
243
243
|
<div style={{ marginTop: 8, padding: '0 12px', fontFamily: 'monospace', fontSize: 12, color: '#aaa' }}>
|