@principal-ai/subsystems-react 0.55.0 → 0.55.2
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 +2 -1
- package/dist/graphify/index.d.ts +2 -0
- package/dist/graphify/index.d.ts.map +1 -1
- package/dist/graphify/index.js +1 -0
- package/dist/graphify/index.js.map +1 -1
- package/dist/graphify/symbolFocus.d.ts +49 -0
- package/dist/graphify/symbolFocus.d.ts.map +1 -0
- package/dist/graphify/symbolFocus.js +139 -0
- package/dist/graphify/symbolFocus.js.map +1 -0
- package/dist/index.d.ts +7 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/pierre/PierreTrailCodeView.d.ts +1 -1
- package/dist/pierre/PierreTrailCodeView.d.ts.map +1 -1
- package/dist/stories/Canvases/Aggregate/aggregateViewFixture.d.ts.map +1 -0
- package/dist/stories/Canvases/Aggregate/aggregateViewFixture.js.map +1 -0
- package/dist/stories/Canvases/Subsystem/fixtures.d.ts.map +1 -0
- package/dist/stories/Canvases/Subsystem/fixtures.js.map +1 -0
- package/dist/subsystem/ComponentDeclaration.d.ts +1 -1
- package/dist/subsystem/ComponentDeclaration.d.ts.map +1 -1
- package/dist/subsystem/ComponentDeclaration.js +1 -1
- package/dist/subsystem/ComponentDeclaration.js.map +1 -1
- package/dist/subsystem/ConstructsCatalog.d.ts +1 -1
- package/dist/subsystem/ConstructsCatalog.d.ts.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.d.ts +36 -2
- package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.js +250 -35
- package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
- package/dist/subsystem/SymbolFocusedView.d.ts +30 -0
- package/dist/subsystem/SymbolFocusedView.d.ts.map +1 -0
- package/dist/subsystem/SymbolFocusedView.js +24 -0
- package/dist/subsystem/SymbolFocusedView.js.map +1 -0
- package/dist/subsystem/SymbolInspectionCard.d.ts +1 -1
- package/dist/subsystem/SymbolInspectionCard.d.ts.map +1 -1
- package/dist/subsystem/SymbolInspectionCard.js +1 -1
- package/dist/subsystem/SymbolInspectionCard.js.map +1 -1
- package/dist/subsystem/TrailsPanel.d.ts +16 -1
- package/dist/subsystem/TrailsPanel.d.ts.map +1 -1
- package/dist/subsystem/TrailsPanel.js +71 -9
- package/dist/subsystem/TrailsPanel.js.map +1 -1
- package/dist/subsystem/graphChrome.d.ts +13 -0
- package/dist/subsystem/graphChrome.d.ts.map +1 -1
- package/dist/subsystem/graphChrome.js +19 -1
- package/dist/subsystem/graphChrome.js.map +1 -1
- package/dist/subsystem/model.d.ts +40 -4
- package/dist/subsystem/model.d.ts.map +1 -1
- package/dist/subsystem/model.js +38 -7
- package/dist/subsystem/model.js.map +1 -1
- package/dist/subsystem/{declarationRef.d.ts → sourceSpan.d.ts} +1 -1
- package/dist/subsystem/sourceSpan.d.ts.map +1 -0
- package/dist/subsystem/{declarationRef.js → sourceSpan.js} +1 -1
- package/dist/subsystem/sourceSpan.js.map +1 -0
- package/package.json +2 -2
- package/src/graphify/index.ts +6 -0
- package/src/graphify/symbolFocus.test.ts +163 -0
- package/src/graphify/symbolFocus.ts +190 -0
- package/src/index.ts +9 -2
- package/src/pierre/PierreTrailCodeView.tsx +1 -1
- package/src/stories/{Subsystem/AggregateGraph → Canvases/Aggregate}/AggregateFrameGraph.stories.tsx +1 -1
- package/src/stories/{Subsystem/C4Graph → Canvases/C4}/C4CardGrow.stories.tsx +1 -1
- package/src/stories/{Subsystem/C4Graph → Canvases/C4}/C4Component.stories.tsx +1 -1
- package/src/stories/{Subsystem/C4Graph → Canvases/C4}/C4Container.stories.tsx +1 -1
- package/src/stories/{Subsystem/C4Graph → Canvases/C4}/C4NodeGallery.stories.tsx +1 -1
- package/src/stories/{Subsystem/C4Graph → Canvases/C4}/C4ToComponentDrill.stories.tsx +1 -1
- package/src/stories/{Subsystem/C4Graph → Canvases/C4}/C4Transition.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/AnimatedProgression.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Appearance.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Basics.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Captures.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Constructs.stories.tsx +2 -2
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/CustomEntities.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Deprecated.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/DetailPanel.stories.tsx +2 -2
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Diagnostics.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/EdgeViews.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/FrameworkStereotype.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/GraphTitle.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Issues.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/LayoutDirection.stories.tsx +122 -0
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/ModuleBadges.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/ModulePathNesting.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Modules.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/NodeAnatomy.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Packages.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Processes.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Proposed.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/ProposedTrails.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Reorder.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Scenarios.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Spotlights.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/StoreValueType.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/TrailAutoplay.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/Trails.stories.tsx +78 -2
- package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/WorkspacePackageFrames.stories.tsx +1 -1
- package/src/stories/Canvases/SymbolFocusedView/SymbolFocusedView.stories.tsx +163 -0
- package/src/stories/{Subsystem → Components}/AgentsPanel.stories.tsx +1 -1
- package/src/stories/{Subsystem/ComponentDeclarationAudit.stories.tsx → Components/ComponentDeclaration/Audit.stories.tsx} +4 -4
- package/src/stories/{Subsystem/ComponentDeclarationSymbols.stories.tsx → Components/ComponentDeclaration/Symbols.stories.tsx} +5 -5
- package/src/stories/{Subsystem → Components}/ConstructsCatalog.stories.tsx +2 -2
- package/src/stories/{Subsystem/Sidebar → Components}/GraphSidebar.stories.tsx +4 -4
- package/src/stories/{Subsystem/IssueIcons.stories.tsx → Components/IssueList.stories.tsx} +1 -1
- package/src/stories/{Subsystem/StoreValueTypeDeclaration.stories.tsx → Components/StoreValueType.stories.tsx} +1 -1
- package/src/subsystem/ComponentDeclaration.tsx +2 -2
- package/src/subsystem/ConstructsCatalog.tsx +1 -1
- package/src/subsystem/SubsystemComponentGraph.tsx +334 -28
- package/src/subsystem/SymbolFocusedView.tsx +80 -0
- package/src/subsystem/SymbolInspectionCard.tsx +2 -2
- package/src/subsystem/TrailsPanel.tsx +114 -5
- package/src/subsystem/graphChrome.tsx +22 -1
- package/src/subsystem/layoutDirection.test.ts +26 -0
- package/src/subsystem/model.test.ts +17 -0
- package/src/subsystem/model.ts +70 -10
- package/src/subsystem/{declarationRef.test.ts → sourceSpan.test.ts} +1 -1
- package/dist/stories/Subsystem/AggregateGraph/aggregateViewFixture.d.ts.map +0 -1
- package/dist/stories/Subsystem/AggregateGraph/aggregateViewFixture.js.map +0 -1
- package/dist/stories/Subsystem/ComponentGraph/fixtures.d.ts.map +0 -1
- package/dist/stories/Subsystem/ComponentGraph/fixtures.js.map +0 -1
- package/dist/subsystem/declarationRef.d.ts.map +0 -1
- package/dist/subsystem/declarationRef.js.map +0 -1
- package/src/stories/Subsystem/EgoGraph/EgoGraph.stories.tsx +0 -351
- /package/dist/stories/{Subsystem/AggregateGraph → Canvases/Aggregate}/aggregateViewFixture.d.ts +0 -0
- /package/dist/stories/{Subsystem/AggregateGraph → Canvases/Aggregate}/aggregateViewFixture.js +0 -0
- /package/dist/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/fixtures.d.ts +0 -0
- /package/dist/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/fixtures.js +0 -0
- /package/src/graphify/__fixtures__/{ego-samples.json → symbol-focused-samples.json} +0 -0
- /package/src/stories/{Subsystem/AggregateGraph → Canvases/Aggregate}/aggregateViewFixture.ts +0 -0
- /package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/fixtures.ts +0 -0
- /package/src/subsystem/{declarationRef.ts → sourceSpan.ts} +0 -0
package/src/index.ts
CHANGED
|
@@ -74,6 +74,7 @@ export {
|
|
|
74
74
|
extractNamedTypes,
|
|
75
75
|
extractGraphifySignature,
|
|
76
76
|
compareSignatures,
|
|
77
|
+
toSymbolFocusedView,
|
|
77
78
|
} from './graphify';
|
|
78
79
|
export type {
|
|
79
80
|
ComponentAnchorInput,
|
|
@@ -83,6 +84,9 @@ export type {
|
|
|
83
84
|
GraphifyInferredSignature,
|
|
84
85
|
ClaimedSignature,
|
|
85
86
|
SignatureCompareResult,
|
|
87
|
+
SymbolFocusedViewInput,
|
|
88
|
+
SymbolFocusedViewOptions,
|
|
89
|
+
SymbolFocusedViewGraph,
|
|
86
90
|
} from './graphify';
|
|
87
91
|
|
|
88
92
|
// ELK layout utilities
|
|
@@ -101,6 +105,8 @@ export type { UseElkLayoutOptions, UseElkLayoutResult } from './hooks/useElkLayo
|
|
|
101
105
|
// Subsystem component graph
|
|
102
106
|
export { SubsystemComponentGraph } from './subsystem/SubsystemComponentGraph';
|
|
103
107
|
export type { SubsystemComponentGraphProps, TrailViewerContext } from './subsystem/SubsystemComponentGraph';
|
|
108
|
+
export { SymbolFocusedView } from './subsystem/SymbolFocusedView';
|
|
109
|
+
export type { SymbolFocusedViewProps } from './subsystem/SymbolFocusedView';
|
|
104
110
|
export { SubsystemModelTransition } from './subsystem/SubsystemModelTransition';
|
|
105
111
|
export type {
|
|
106
112
|
SubsystemModelTransitionProps,
|
|
@@ -235,6 +241,7 @@ export type {
|
|
|
235
241
|
SubsystemEdgeMechanism,
|
|
236
242
|
SubsystemEdgeView,
|
|
237
243
|
SubsystemEdgeProvenance,
|
|
244
|
+
SubsystemLayoutDirection,
|
|
238
245
|
SubsystemGraphifyRelation,
|
|
239
246
|
SubsystemConstructDeclaration,
|
|
240
247
|
SubsystemDeclarationProvenance,
|
|
@@ -314,13 +321,13 @@ export type {
|
|
|
314
321
|
SubsystemSourceSpan,
|
|
315
322
|
SubsystemOpenFileOptions,
|
|
316
323
|
SpanFreshness,
|
|
317
|
-
} from './subsystem/
|
|
324
|
+
} from './subsystem/sourceSpan';
|
|
318
325
|
export {
|
|
319
326
|
parseSourceLocation,
|
|
320
327
|
normalizeDeclarationLine,
|
|
321
328
|
extractDeclarationLine,
|
|
322
329
|
DECLARATION_HASH_ALGO,
|
|
323
|
-
} from './subsystem/
|
|
330
|
+
} from './subsystem/sourceSpan';
|
|
324
331
|
export {
|
|
325
332
|
setPrettierProvider,
|
|
326
333
|
getPrettierProvider,
|
|
@@ -38,7 +38,7 @@ import type {
|
|
|
38
38
|
SubsystemTrail,
|
|
39
39
|
SubsystemTrailStep,
|
|
40
40
|
} from '../subsystem/model';
|
|
41
|
-
import type { SubsystemOpenFileOptions } from '../subsystem/
|
|
41
|
+
import type { SubsystemOpenFileOptions } from '../subsystem/sourceSpan';
|
|
42
42
|
import { buildPierreOptions, PIERRE_FILE_STYLE } from './pierreBackground';
|
|
43
43
|
import { pierreLangForPath } from './pierreFileLang';
|
|
44
44
|
import { resolvePierreSyntaxThemeName } from './pierreSyntaxTheme';
|
|
@@ -5,7 +5,7 @@ import { C4NodeCard, NODE_W, NODE_H } from '../../../subsystem/C4NodeCard';
|
|
|
5
5
|
import type { C4Container, C4Component } from '../../../subsystem/c4';
|
|
6
6
|
|
|
7
7
|
const meta = {
|
|
8
|
-
title: '
|
|
8
|
+
title: 'Canvases/C4/C4CardGrow',
|
|
9
9
|
parameters: { layout: 'fullscreen' },
|
|
10
10
|
tags: ['autodocs'],
|
|
11
11
|
decorators: [
|
|
@@ -6,7 +6,7 @@ import { C4Graph } from '../../../subsystem/C4Graph';
|
|
|
6
6
|
import type { C4Edge, C4Model, C4Element, C4Component, C4Container } from '../../../subsystem/c4';
|
|
7
7
|
|
|
8
8
|
const meta = {
|
|
9
|
-
title: '
|
|
9
|
+
title: 'Canvases/C4/C4Component',
|
|
10
10
|
component: C4Graph,
|
|
11
11
|
parameters: { layout: 'fullscreen' },
|
|
12
12
|
tags: ['autodocs'],
|
|
@@ -6,7 +6,7 @@ import { C4Graph } from '../../../subsystem/C4Graph';
|
|
|
6
6
|
import type { C4Edge, C4Model, C4Element, C4Container } from '../../../subsystem/c4';
|
|
7
7
|
|
|
8
8
|
const meta = {
|
|
9
|
-
title: '
|
|
9
|
+
title: 'Canvases/C4/C4Container',
|
|
10
10
|
component: C4Graph,
|
|
11
11
|
parameters: { layout: 'fullscreen' },
|
|
12
12
|
tags: ['autodocs'],
|
|
@@ -31,7 +31,7 @@ import type { C4Element } from '../../../subsystem/c4';
|
|
|
31
31
|
// ---------------------------------------------------------------------------
|
|
32
32
|
|
|
33
33
|
const meta = {
|
|
34
|
-
title: '
|
|
34
|
+
title: 'Canvases/C4/C4NodeGallery',
|
|
35
35
|
parameters: { layout: 'fullscreen' },
|
|
36
36
|
tags: ['autodocs'],
|
|
37
37
|
decorators: [
|
|
@@ -6,7 +6,7 @@ import { C4Graph } from '../../../subsystem/C4Graph';
|
|
|
6
6
|
import type { C4Edge, C4Model, C4Element, C4Component, C4Container } from '../../../subsystem/c4';
|
|
7
7
|
|
|
8
8
|
const meta = {
|
|
9
|
-
title: '
|
|
9
|
+
title: 'Canvases/C4/C4Transition',
|
|
10
10
|
component: C4Graph,
|
|
11
11
|
parameters: { layout: 'fullscreen' },
|
|
12
12
|
tags: ['autodocs'],
|
package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/AnimatedProgression.stories.tsx
RENAMED
|
@@ -14,7 +14,7 @@ import type { SubsystemComponent, SubsystemTrail } from '../../../subsystem/mode
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
const meta = {
|
|
17
|
-
title: 'Subsystem/
|
|
17
|
+
title: 'Canvases/Subsystem/Animated progression',
|
|
18
18
|
component: SubsystemComponentGraph,
|
|
19
19
|
parameters: { layout: 'fullscreen' },
|
|
20
20
|
} satisfies Meta<typeof SubsystemComponentGraph>;
|
|
@@ -8,7 +8,7 @@ import type { GraphifyComponentDetail } from '../../../graphify';
|
|
|
8
8
|
import { investigateOnlyComponents, investigateOnlyTrails } from './fixtures';
|
|
9
9
|
|
|
10
10
|
const meta = {
|
|
11
|
-
title: 'Subsystem/
|
|
11
|
+
title: 'Canvases/Subsystem/Appearance',
|
|
12
12
|
component: SubsystemComponentGraph,
|
|
13
13
|
parameters: {
|
|
14
14
|
layout: 'fullscreen',
|
|
@@ -7,7 +7,7 @@ import type { SubsystemComponent, SubsystemComponentEdge } from '../../../subsys
|
|
|
7
7
|
import { components, graphSpecFromSteps } from './fixtures';
|
|
8
8
|
|
|
9
9
|
const meta = {
|
|
10
|
-
title: 'Subsystem/
|
|
10
|
+
title: 'Canvases/Subsystem/Basics',
|
|
11
11
|
component: SubsystemComponentGraph,
|
|
12
12
|
parameters: {
|
|
13
13
|
layout: 'fullscreen',
|
|
@@ -8,7 +8,7 @@ import type { GraphifyComponentDetail } from '../../../graphify';
|
|
|
8
8
|
import { components, graphSpecFromSteps, readerDetail, investigateOnlyComponents, investigateOnlyTrails } from './fixtures';
|
|
9
9
|
|
|
10
10
|
const meta = {
|
|
11
|
-
title: 'Subsystem/
|
|
11
|
+
title: 'Canvases/Subsystem/Captures',
|
|
12
12
|
component: SubsystemComponentGraph,
|
|
13
13
|
parameters: {
|
|
14
14
|
layout: 'fullscreen',
|
|
@@ -5,11 +5,11 @@ import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme
|
|
|
5
5
|
import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
|
|
6
6
|
import { PierreFileView, PierreSnippetView } from '../../../pierre';
|
|
7
7
|
import type { SubsystemComponent } from '../../../subsystem/model';
|
|
8
|
-
import type { SubsystemOpenFileOptions } from '../../../subsystem/
|
|
8
|
+
import type { SubsystemOpenFileOptions } from '../../../subsystem/sourceSpan';
|
|
9
9
|
import type { GraphifyComponentDetail } from '../../../graphify';
|
|
10
10
|
|
|
11
11
|
const meta = {
|
|
12
|
-
title: 'Subsystem/
|
|
12
|
+
title: 'Canvases/Subsystem/Constructs',
|
|
13
13
|
component: SubsystemComponentGraph,
|
|
14
14
|
parameters: {
|
|
15
15
|
layout: 'fullscreen',
|
package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/CustomEntities.stories.tsx
RENAMED
|
@@ -155,7 +155,7 @@ const entityGraph = graphSpecFromSteps([
|
|
|
155
155
|
]);
|
|
156
156
|
|
|
157
157
|
const meta = {
|
|
158
|
-
title: 'Subsystem/
|
|
158
|
+
title: 'Canvases/Subsystem/CustomEntities',
|
|
159
159
|
component: SubsystemComponentGraph,
|
|
160
160
|
parameters: { layout: 'fullscreen' },
|
|
161
161
|
tags: ['autodocs'],
|
|
@@ -17,7 +17,7 @@ import { trailFromSteps } from './fixtures';
|
|
|
17
17
|
* as siblings — proposed = not built yet, deprecated = built once, removed since.
|
|
18
18
|
*/
|
|
19
19
|
const meta = {
|
|
20
|
-
title: 'Subsystem/
|
|
20
|
+
title: 'Canvases/Subsystem/Deprecated',
|
|
21
21
|
parameters: { layout: 'fullscreen' },
|
|
22
22
|
tags: ['autodocs'],
|
|
23
23
|
decorators: [
|
|
@@ -5,14 +5,14 @@ import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme
|
|
|
5
5
|
import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
|
|
6
6
|
import { PierreFileView, PierreSnippetView } from '../../../pierre';
|
|
7
7
|
import type { SubsystemComponent, SubsystemComponentEdge } from '../../../subsystem/model';
|
|
8
|
-
import type { SubsystemOpenFileOptions } from '../../../subsystem/
|
|
8
|
+
import type { SubsystemOpenFileOptions } from '../../../subsystem/sourceSpan';
|
|
9
9
|
import type { GraphifyComponentDetail } from '../../../graphify';
|
|
10
10
|
import componentDeclarationSource from '../../../subsystem/ComponentDeclaration.tsx?raw';
|
|
11
11
|
import resolveSource from '../../../graphify/resolve.ts?raw';
|
|
12
12
|
import { readerDetail } from './fixtures';
|
|
13
13
|
|
|
14
14
|
const meta = {
|
|
15
|
-
title: 'Subsystem/
|
|
15
|
+
title: 'Canvases/Subsystem/DetailPanel',
|
|
16
16
|
component: SubsystemComponentGraph,
|
|
17
17
|
parameters: {
|
|
18
18
|
layout: 'fullscreen',
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import { components, graphSpecFromSteps } from './fixtures';
|
|
11
11
|
|
|
12
12
|
const meta = {
|
|
13
|
-
title: 'Subsystem/
|
|
13
|
+
title: 'Canvases/Subsystem/Diagnostics',
|
|
14
14
|
component: SubsystemComponentGraph,
|
|
15
15
|
parameters: {
|
|
16
16
|
layout: 'fullscreen',
|
|
@@ -7,7 +7,7 @@ import type { SubsystemEdgeView, SubsystemGraphifyRelation } from '../../../subs
|
|
|
7
7
|
import { components, trailFromSteps } from './fixtures';
|
|
8
8
|
|
|
9
9
|
const meta = {
|
|
10
|
-
title: 'Subsystem/
|
|
10
|
+
title: 'Canvases/Subsystem/EdgeViews',
|
|
11
11
|
component: SubsystemComponentGraph,
|
|
12
12
|
parameters: {
|
|
13
13
|
layout: 'fullscreen',
|
package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/FrameworkStereotype.stories.tsx
RENAMED
|
@@ -6,7 +6,7 @@ import type { SubsystemComponent } from '../../../subsystem/model';
|
|
|
6
6
|
import { trailFromSteps } from './fixtures';
|
|
7
7
|
|
|
8
8
|
const meta = {
|
|
9
|
-
title: 'Subsystem/
|
|
9
|
+
title: 'Canvases/Subsystem/FrameworkStereotype',
|
|
10
10
|
component: SubsystemComponentGraph,
|
|
11
11
|
parameters: { layout: 'fullscreen' },
|
|
12
12
|
tags: ['autodocs'],
|
|
@@ -6,7 +6,7 @@ import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGr
|
|
|
6
6
|
import { components, graphSpecFromSteps } from './fixtures';
|
|
7
7
|
|
|
8
8
|
const meta = {
|
|
9
|
-
title: 'Subsystem/
|
|
9
|
+
title: 'Canvases/Subsystem/GraphTitle',
|
|
10
10
|
component: SubsystemComponentGraph,
|
|
11
11
|
parameters: {
|
|
12
12
|
layout: 'fullscreen',
|
|
@@ -10,7 +10,7 @@ import type { C4Container } from '../../../subsystem/c4';
|
|
|
10
10
|
import { components, graphSpecFromSteps } from './fixtures';
|
|
11
11
|
|
|
12
12
|
const meta = {
|
|
13
|
-
title: 'Subsystem/
|
|
13
|
+
title: 'Canvases/Subsystem/Issues',
|
|
14
14
|
component: SubsystemComponentGraph,
|
|
15
15
|
parameters: {
|
|
16
16
|
layout: 'fullscreen',
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout direction — the canvas toggle flips the layered layout between
|
|
3
|
+
* left-to-right and top-to-bottom.
|
|
4
|
+
*
|
|
5
|
+
* The flip is sequenced: edges fade out, ELK re-lays out while the nodes slide
|
|
6
|
+
* to their new slots, then the edges fade back in. Old routes never cut across
|
|
7
|
+
* the new layout mid-flight. The camera refits when the new layout lands
|
|
8
|
+
* (`refocusOnLayoutFlip`, on by default) — a vertical graph grows
|
|
9
|
+
* downward and would otherwise leave most of itself off-screen.
|
|
10
|
+
*/
|
|
11
|
+
import React, { useState } from 'react';
|
|
12
|
+
import '@xyflow/react/dist/style.css';
|
|
13
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
14
|
+
import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
|
|
15
|
+
import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGraph';
|
|
16
|
+
import type { SubsystemLayoutDirection } from '../../../subsystem/model';
|
|
17
|
+
import { components, graphSpecFromSteps } from './fixtures';
|
|
18
|
+
|
|
19
|
+
const meta = {
|
|
20
|
+
title: 'Canvases/Subsystem/LayoutDirection',
|
|
21
|
+
component: SubsystemComponentGraph,
|
|
22
|
+
parameters: { layout: 'fullscreen' },
|
|
23
|
+
tags: ['autodocs'],
|
|
24
|
+
decorators: [
|
|
25
|
+
(Story) => (
|
|
26
|
+
<ThemeProvider theme={defaultEditorTheme}>
|
|
27
|
+
<Story />
|
|
28
|
+
</ThemeProvider>
|
|
29
|
+
),
|
|
30
|
+
],
|
|
31
|
+
} satisfies Meta<typeof SubsystemComponentGraph>;
|
|
32
|
+
|
|
33
|
+
export default meta;
|
|
34
|
+
type Story = StoryObj<typeof meta>;
|
|
35
|
+
|
|
36
|
+
// A graph with enough layers to make the axis obvious: two producers fan into
|
|
37
|
+
// a service, which writes to a store and produces an event.
|
|
38
|
+
const layoutComponents = components([
|
|
39
|
+
['api', 'ApiHandler', 'function', 'src/api/handler.ts', 'pkg:github/principal-ai/agent-monitoring', 'HTTP entry point', 'handleRequest'],
|
|
40
|
+
['cli', 'CliHandler', 'function', 'src/cli/handler.ts', 'pkg:github/principal-ai/agent-monitoring', 'command entry point', 'handleCommand'],
|
|
41
|
+
['svc', 'SessionService', 'class', 'src/session/SessionService.ts', 'pkg:github/principal-ai/agent-monitoring', 'owns session persistence', 'SessionService'],
|
|
42
|
+
['store', 'SessionStore', 'class', 'src/session/SessionStore.ts', 'pkg:github/principal-ai/agent-monitoring', 'retained session state', 'SessionStore'],
|
|
43
|
+
['event', 'SessionEvent', 'interface', 'src/types/SessionEvent.ts', 'pkg:github/principal-ai/agent-monitoring', 'output event shape', 'SessionEvent'],
|
|
44
|
+
]);
|
|
45
|
+
|
|
46
|
+
const layoutSpec = graphSpecFromSteps([
|
|
47
|
+
['api', 'svc', 'calls', 'src/api/handler.ts', 42],
|
|
48
|
+
['cli', 'svc', 'calls', 'src/cli/handler.ts', 18],
|
|
49
|
+
['svc', 'store', 'writes', 'src/session/SessionService.ts', 88],
|
|
50
|
+
['svc', 'event', 'produces', 'src/session/SessionService.ts', 95],
|
|
51
|
+
]);
|
|
52
|
+
|
|
53
|
+
function DirectionDemo({ initial }: { initial: SubsystemLayoutDirection }) {
|
|
54
|
+
return (
|
|
55
|
+
<div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
|
|
56
|
+
<SubsystemComponentGraph
|
|
57
|
+
components={layoutComponents}
|
|
58
|
+
trails={layoutSpec.trails}
|
|
59
|
+
defaultLayoutDirection={initial}
|
|
60
|
+
showEdgeLabels
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Left-to-right (the default). Click the corner toggle to watch the flip. */
|
|
67
|
+
export const Horizontal: Story = {
|
|
68
|
+
render: () => <DirectionDemo initial="horizontal" />,
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/** Seeded top-to-bottom. The toggle restores the remembered choice per `persistKey`. */
|
|
72
|
+
export const Vertical: Story = {
|
|
73
|
+
render: () => <DirectionDemo initial="vertical" />,
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Host-controlled: the graph renders no built-in toggle; the host owns the
|
|
78
|
+
* value and echoes it back through `onLayoutDirectionChange`.
|
|
79
|
+
*/
|
|
80
|
+
function ControlledDemo() {
|
|
81
|
+
const [direction, setDirection] = useState<SubsystemLayoutDirection>('horizontal');
|
|
82
|
+
return (
|
|
83
|
+
<div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
|
|
84
|
+
<div style={{ display: 'flex', gap: 8, padding: 8, background: defaultEditorTheme.colors.background }}>
|
|
85
|
+
{(['horizontal', 'vertical'] as const).map((d) => (
|
|
86
|
+
<button
|
|
87
|
+
key={d}
|
|
88
|
+
type="button"
|
|
89
|
+
onClick={() => setDirection(d)}
|
|
90
|
+
aria-pressed={direction === d}
|
|
91
|
+
style={{
|
|
92
|
+
padding: '4px 10px',
|
|
93
|
+
borderRadius: 6,
|
|
94
|
+
border: `1px solid ${defaultEditorTheme.colors.border}`,
|
|
95
|
+
background: direction === d ? defaultEditorTheme.colors.border : 'transparent',
|
|
96
|
+
color: defaultEditorTheme.colors.text,
|
|
97
|
+
fontFamily: defaultEditorTheme.fonts.monospace,
|
|
98
|
+
fontSize: 12,
|
|
99
|
+
cursor: 'pointer',
|
|
100
|
+
}}
|
|
101
|
+
>
|
|
102
|
+
{d}
|
|
103
|
+
</button>
|
|
104
|
+
))}
|
|
105
|
+
</div>
|
|
106
|
+
<div style={{ flex: 1, minHeight: 0 }}>
|
|
107
|
+
<SubsystemComponentGraph
|
|
108
|
+
components={layoutComponents}
|
|
109
|
+
trails={layoutSpec.trails}
|
|
110
|
+
layoutDirection={direction}
|
|
111
|
+
onLayoutDirectionChange={setDirection}
|
|
112
|
+
hideLayoutToggle
|
|
113
|
+
showEdgeLabels
|
|
114
|
+
/>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export const ControlledByHost: Story = {
|
|
121
|
+
render: () => <ControlledDemo />,
|
|
122
|
+
};
|
package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/ModuleBadges.stories.tsx
RENAMED
|
@@ -12,7 +12,7 @@ import type {
|
|
|
12
12
|
import { graphSpecFromSteps } from './fixtures';
|
|
13
13
|
|
|
14
14
|
const meta = {
|
|
15
|
-
title: 'Subsystem/
|
|
15
|
+
title: 'Canvases/Subsystem/ModuleBadges',
|
|
16
16
|
parameters: { layout: 'fullscreen' },
|
|
17
17
|
tags: ['autodocs'],
|
|
18
18
|
decorators: [
|
package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/ModulePathNesting.stories.tsx
RENAMED
|
@@ -15,7 +15,7 @@ import type { SubsystemComponent } from '../../../subsystem/model';
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
const meta = {
|
|
18
|
-
title: 'Subsystem/
|
|
18
|
+
title: 'Canvases/Subsystem/Module path nesting',
|
|
19
19
|
component: SubsystemComponentGraph,
|
|
20
20
|
parameters: { layout: 'fullscreen' },
|
|
21
21
|
tags: ['autodocs'],
|
|
@@ -6,7 +6,7 @@ import type { SubsystemComponent } from '../../../subsystem/model';
|
|
|
6
6
|
import { graphSpecFromSteps } from './fixtures';
|
|
7
7
|
|
|
8
8
|
const meta = {
|
|
9
|
-
title: 'Subsystem/
|
|
9
|
+
title: 'Canvases/Subsystem/Modules',
|
|
10
10
|
component: SubsystemComponentGraph,
|
|
11
11
|
parameters: { layout: 'fullscreen' },
|
|
12
12
|
tags: ['autodocs'],
|
|
@@ -6,7 +6,7 @@ import type { SubsystemComponent } from '../../../subsystem/model';
|
|
|
6
6
|
import { graphSpecFromSteps } from './fixtures';
|
|
7
7
|
|
|
8
8
|
const meta = {
|
|
9
|
-
title: 'Subsystem/
|
|
9
|
+
title: 'Canvases/Subsystem/Packages',
|
|
10
10
|
component: SubsystemComponentGraph,
|
|
11
11
|
parameters: { layout: 'fullscreen' },
|
|
12
12
|
tags: ['autodocs'],
|
|
@@ -5,7 +5,7 @@ import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGr
|
|
|
5
5
|
import { components, graphSpecFromSteps } from './fixtures';
|
|
6
6
|
|
|
7
7
|
const meta = {
|
|
8
|
-
title: 'Subsystem/
|
|
8
|
+
title: 'Canvases/Subsystem/Processes',
|
|
9
9
|
component: SubsystemComponentGraph,
|
|
10
10
|
parameters: { layout: 'fullscreen' },
|
|
11
11
|
tags: ['autodocs'],
|
package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/ProposedTrails.stories.tsx
RENAMED
|
@@ -6,7 +6,7 @@ import { SubsystemComponentGraph } from '../../../subsystem/SubsystemComponentGr
|
|
|
6
6
|
import type { SubsystemComponent, SubsystemTrail } from '../../../subsystem/model';
|
|
7
7
|
|
|
8
8
|
const meta = {
|
|
9
|
-
title: 'Subsystem/
|
|
9
|
+
title: 'Canvases/Subsystem/ProposedTrails',
|
|
10
10
|
component: SubsystemComponentGraph,
|
|
11
11
|
parameters: {
|
|
12
12
|
layout: 'fullscreen',
|
|
@@ -7,7 +7,7 @@ import { TrailsPanel } from '../../../subsystem/TrailsPanel';
|
|
|
7
7
|
import type { SubsystemComponent, SubsystemTrail } from '../../../subsystem/model';
|
|
8
8
|
|
|
9
9
|
const meta = {
|
|
10
|
-
title: 'Subsystem/
|
|
10
|
+
title: 'Canvases/Subsystem/Reorder',
|
|
11
11
|
component: SubsystemComponentGraph,
|
|
12
12
|
parameters: {
|
|
13
13
|
layout: 'fullscreen',
|
|
@@ -12,7 +12,7 @@ import type { GraphifyComponentDetail } from '../../../graphify';
|
|
|
12
12
|
import { components, graphSpecFromSteps } from './fixtures';
|
|
13
13
|
|
|
14
14
|
const meta = {
|
|
15
|
-
title: 'Subsystem/
|
|
15
|
+
title: 'Canvases/Subsystem/Scenarios',
|
|
16
16
|
component: SubsystemComponentGraph,
|
|
17
17
|
parameters: {
|
|
18
18
|
layout: 'fullscreen',
|
|
@@ -17,7 +17,7 @@ import { resolvePierreSyntaxThemeName } from '../../../pierre/pierreSyntaxTheme'
|
|
|
17
17
|
import { useTheme } from '@principal-ade/industry-theme';
|
|
18
18
|
|
|
19
19
|
const meta = {
|
|
20
|
-
title: 'Subsystem/
|
|
20
|
+
title: 'Canvases/Subsystem/Spotlights',
|
|
21
21
|
parameters: { layout: 'fullscreen' },
|
|
22
22
|
tags: ['autodocs'],
|
|
23
23
|
decorators: [
|
package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/StoreValueType.stories.tsx
RENAMED
|
@@ -23,7 +23,7 @@ import type { SubsystemComponent, SubsystemGraphNode } from '../../../subsystem/
|
|
|
23
23
|
* accessor shows the accessor's name instead of the state's.
|
|
24
24
|
*/
|
|
25
25
|
const meta = {
|
|
26
|
-
title: 'Subsystem/
|
|
26
|
+
title: 'Canvases/Subsystem/StoreValueType',
|
|
27
27
|
parameters: { layout: 'fullscreen' },
|
|
28
28
|
tags: ['autodocs'],
|
|
29
29
|
decorators: [
|
package/src/stories/{Subsystem/ComponentGraph → Canvases/Subsystem}/TrailAutoplay.stories.tsx
RENAMED
|
@@ -16,7 +16,7 @@ import type { SubsystemComponent, SubsystemTrail } from '../../../subsystem/mode
|
|
|
16
16
|
* camera today. This story exists to expose that gap and iterate on it.
|
|
17
17
|
*/
|
|
18
18
|
const meta = {
|
|
19
|
-
title: 'Subsystem/
|
|
19
|
+
title: 'Canvases/Subsystem/TrailAutoplay',
|
|
20
20
|
component: SubsystemComponentGraph,
|
|
21
21
|
parameters: { layout: 'fullscreen' },
|
|
22
22
|
tags: ['autodocs'],
|
|
@@ -8,7 +8,7 @@ import { PierreTrailCodeView } from '../../../pierre';
|
|
|
8
8
|
import type { TrailViewerContext } from '../../../subsystem/SubsystemComponentGraph';
|
|
9
9
|
|
|
10
10
|
const meta = {
|
|
11
|
-
title: 'Subsystem/
|
|
11
|
+
title: 'Canvases/Subsystem/Trails',
|
|
12
12
|
component: SubsystemComponentGraph,
|
|
13
13
|
parameters: {
|
|
14
14
|
layout: 'fullscreen',
|
|
@@ -272,6 +272,82 @@ const proposedTrails: SubsystemTrail[] = [
|
|
|
272
272
|
},
|
|
273
273
|
],
|
|
274
274
|
},
|
|
275
|
+
// Neighbours for the wrapped title above: a couple of one-line titles and
|
|
276
|
+
// one that wraps to two, so the header's padding reads against the rows on
|
|
277
|
+
// either side of it rather than in isolation.
|
|
278
|
+
{
|
|
279
|
+
id: 'tl-open-drawing',
|
|
280
|
+
title: 'Open drawing',
|
|
281
|
+
steps: [
|
|
282
|
+
{
|
|
283
|
+
from: 'panel',
|
|
284
|
+
to: 'host',
|
|
285
|
+
mechanism: 'produces',
|
|
286
|
+
file: 'src/panels/DrawingsLeftPanel.tsx',
|
|
287
|
+
span: { startLine: 85, endLine: 85, contentHash: 'fixture' },
|
|
288
|
+
purl: stepPurl('src/panels/DrawingsLeftPanel.tsx'),
|
|
289
|
+
symbol: 'DrawingsLeftPanel.openDrawing',
|
|
290
|
+
annotation: 'Emits the open intent up to the host.',
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
from: 'host',
|
|
294
|
+
to: 'storage',
|
|
295
|
+
mechanism: 'calls',
|
|
296
|
+
file: 'src/hooks/useDrawingsHost.ts',
|
|
297
|
+
span: { startLine: 45, endLine: 45, contentHash: 'fixture' },
|
|
298
|
+
purl: stepPurl('src/hooks/useDrawingsHost.ts'),
|
|
299
|
+
symbol: 'useDrawingsHost.openDrawing',
|
|
300
|
+
},
|
|
301
|
+
],
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
id: 'tl-save-drawing',
|
|
305
|
+
title: 'Save the drawing and refresh the list',
|
|
306
|
+
steps: [
|
|
307
|
+
{
|
|
308
|
+
from: 'tab',
|
|
309
|
+
to: 'fs',
|
|
310
|
+
mechanism: 'calls',
|
|
311
|
+
file: 'src/components/DrawingTabContent.tsx',
|
|
312
|
+
span: { startLine: 112, endLine: 112, contentHash: 'fixture' },
|
|
313
|
+
purl: stepPurl('src/components/DrawingTabContent.tsx'),
|
|
314
|
+
symbol: 'DrawingTabContent.save',
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
from: 'host',
|
|
318
|
+
to: 'panel',
|
|
319
|
+
mechanism: 'produces',
|
|
320
|
+
file: 'src/hooks/useDrawingsHost.ts',
|
|
321
|
+
span: { startLine: 64, endLine: 64, contentHash: 'fixture' },
|
|
322
|
+
purl: stepPurl('src/hooks/useDrawingsHost.ts'),
|
|
323
|
+
symbol: 'useDrawingsHost.onSaved',
|
|
324
|
+
},
|
|
325
|
+
],
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
id: 'tl-delete-drawing',
|
|
329
|
+
title: 'Delete drawing',
|
|
330
|
+
steps: [
|
|
331
|
+
{
|
|
332
|
+
from: 'host',
|
|
333
|
+
to: 'fs',
|
|
334
|
+
mechanism: 'calls',
|
|
335
|
+
file: 'src/hooks/useDrawingsHost.ts',
|
|
336
|
+
span: { startLine: 66, endLine: 66, contentHash: 'fixture' },
|
|
337
|
+
purl: stepPurl('src/hooks/useDrawingsHost.ts'),
|
|
338
|
+
symbol: 'useDrawingsHost.deleteDrawing',
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
from: 'panel',
|
|
342
|
+
to: 'storage',
|
|
343
|
+
mechanism: 'calls',
|
|
344
|
+
file: 'src/panels/DrawingsLeftPanel.tsx',
|
|
345
|
+
span: { startLine: 56, endLine: 56, contentHash: 'fixture' },
|
|
346
|
+
purl: stepPurl('src/panels/DrawingsLeftPanel.tsx'),
|
|
347
|
+
symbol: 'DrawingsLeftPanel.scan',
|
|
348
|
+
},
|
|
349
|
+
],
|
|
350
|
+
},
|
|
275
351
|
];
|
|
276
352
|
|
|
277
353
|
function ProposedMissingStepDemo() {
|
|
@@ -306,7 +382,7 @@ function ProposedMissingStepDemo() {
|
|
|
306
382
|
components={proposedComponents}
|
|
307
383
|
trails={proposedTrails}
|
|
308
384
|
title="proposed seam with a missing file"
|
|
309
|
-
description="Expand **Associate a finished run with its model** and click either step
|
|
385
|
+
description="The **Trails** panel lists four flows so the long, wrapped title (*Associate a finished run with its model (proposed)*) reads against its neighbours — two one-line titles and one (*Save the drawing and refresh the list*) that also wraps. Expand **Associate a finished run with its model** and click either step: the proposed step has no file in the checkout, so its snippet shows an inline *Proposed — … isn't in the local checkout yet.* placeholder instead of failing the whole flow."
|
|
310
386
|
renderTrailViewer={renderTrailViewer}
|
|
311
387
|
renderFileViewer={(file) => (
|
|
312
388
|
<div
|