@principal-ai/principal-view-react 0.16.57 → 0.16.59

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.
@@ -2,22 +2,31 @@
2
2
  * SubsystemComponentGraph — a clickable, read-only React Flow component graph
3
3
  * for a subsystem snapshot.
4
4
  *
5
- * Nodes are positioned with ELK auto-layout (layered, minimized crossings) and
6
- * colored by package. Only cross-package edges leave a package region. Clicking
7
- * a component invokes `onSelect`. (Package frames are deferred nodes are
8
- * color-coded by package for now.)
5
+ * Nodes are positioned with ELK auto-layout (layered, minimized crossings,
6
+ * process-aware compound groups). Components sharing a `process` render
7
+ * inside one labeled boundary frame; nodes without one sit outside every
8
+ * boundary. Clicking a component invokes `onSelect`.
9
9
  *
10
10
  * This is a focused fork of the package's `GraphRenderer` pipeline (same ELK
11
11
  * edge routing, delayed fitView, Background/Controls/MiniMap, node/edge type
12
12
  * injection, onNodeClick) adapted to the subsystem model — read-only.
13
13
  */
14
14
  import type { ReactNode } from 'react';
15
- import { type SubsystemComponentEdge, type SubsystemComponent } from './model';
15
+ import { type SubsystemComponentEdge, type SubsystemComponent, type SubsystemThroughline } from './model';
16
16
  import type { SubsystemOpenFileOptions } from './declarationRef';
17
17
  import type { ComponentVerificationState } from './ComponentDeclaration';
18
18
  export interface SubsystemComponentGraphProps {
19
19
  components: SubsystemComponent[];
20
20
  edges: SubsystemComponentEdge[];
21
+ /**
22
+ * Ordered execution stories over the graph's edges — one throughline per
23
+ * flow. When present the sidebar's bottom half offers a Files/Flows toggle:
24
+ * the flows panel lists each throughline's steps (`symbol` or `file:line`);
25
+ * clicking a flow row toggles its steps; clicking a step focuses that
26
+ * step's edge. Opened flows stay on the canvas (unselected ones dimmed);
27
+ * everything else is hidden.
28
+ */
29
+ throughlines?: SubsystemThroughline[];
21
30
  onSelect?: (componentId: string) => void;
22
31
  /** Called when an edge is clicked (relationship / mechanism + refs seam). */
23
32
  onEdgeSelect?: (edge: SubsystemComponentE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