@ssot-registry/lineage-graph 0.2.25-dev.5
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 +15 -0
- package/dist/LineageGraph.d.ts +2 -0
- package/dist/LineageGraphApp.d.ts +1 -0
- package/dist/components/ConnectedEdgesPanel.d.ts +9 -0
- package/dist/components/FamilyFilters.d.ts +6 -0
- package/dist/components/Legend.d.ts +4 -0
- package/dist/components/LineageGraphCanvas.d.ts +40 -0
- package/dist/components/PackageSummary.d.ts +6 -0
- package/dist/components/ResultsList.d.ts +8 -0
- package/dist/components/SelectedNodePanel.d.ts +8 -0
- package/dist/components/ViewControls.d.ts +33 -0
- package/dist/constants.d.ts +6 -0
- package/dist/html.d.ts +2 -0
- package/dist/index.d.ts +5 -0
- package/dist/layout.d.ts +12 -0
- package/dist/lineage-graph.cjs +95 -0
- package/dist/lineage-graph.css +1 -0
- package/dist/lineage-graph.js +9267 -0
- package/dist/standalone/ssot-lineage-graph.css +1 -0
- package/dist/standalone/ssot-lineage-graph.js +84 -0
- package/dist/standalone.d.ts +6 -0
- package/dist/subcomponents/KeyValue.d.ts +5 -0
- package/dist/subcomponents/Section.d.ts +8 -0
- package/dist/subcomponents/StatCard.d.ts +5 -0
- package/dist/subcomponents/format.d.ts +1 -0
- package/dist/types.d.ts +179 -0
- package/dist/views/LineageGraphAppView.d.ts +18 -0
- package/dist/workspace/App.d.ts +5 -0
- package/dist/workspace/components/LeftSidebar.d.ts +35 -0
- package/dist/workspace/components/LineageGraphApp.d.ts +26 -0
- package/dist/workspace/components/LineageGraphCanvas.d.ts +48 -0
- package/dist/workspace/components/RightInspector.d.ts +18 -0
- package/dist/workspace/components/StorybookDocs.d.ts +6 -0
- package/dist/workspace/main.d.ts +1 -0
- package/dist/workspace/types.d.ts +190 -0
- package/dist/workspace/utils/graphHelpers.d.ts +21 -0
- package/dist/workspace/utils/indexedDbHelper.d.ts +45 -0
- package/dist/workspace/utils/mockData.d.ts +10 -0
- package/package.json +54 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare function Section({ title, children, className, collapsible, defaultOpen, }: {
|
|
3
|
+
title?: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
collapsible?: boolean;
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function valueText(value: unknown): string;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
export type LineageFamily = "ADR" | "Boundary" | "Claim" | "Evidence" | "Feature" | "Issue" | "Profile" | "Release" | "Risk" | "Spec" | "SPEC" | "Test" | string;
|
|
2
|
+
export type LayoutMode = "network" | "lineage";
|
|
3
|
+
export type RendererPreference = "auto" | "webgl" | "canvas";
|
|
4
|
+
export type RendererMode = "webgl" | "canvas";
|
|
5
|
+
export type DepthSetting = "1" | "2" | "3" | "max";
|
|
6
|
+
export interface LineageNode {
|
|
7
|
+
id: string;
|
|
8
|
+
family: LineageFamily;
|
|
9
|
+
label?: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
summary?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
status?: string;
|
|
14
|
+
lifecycle?: {
|
|
15
|
+
stage?: string;
|
|
16
|
+
state?: string;
|
|
17
|
+
promotedAt?: string;
|
|
18
|
+
certifiedAt?: string;
|
|
19
|
+
publishedAt?: string;
|
|
20
|
+
};
|
|
21
|
+
tier?: string;
|
|
22
|
+
origin?: string;
|
|
23
|
+
originKind?: string;
|
|
24
|
+
originRef?: string;
|
|
25
|
+
source?: {
|
|
26
|
+
path?: string;
|
|
27
|
+
line?: number;
|
|
28
|
+
url?: string;
|
|
29
|
+
documentId?: string;
|
|
30
|
+
};
|
|
31
|
+
path?: string;
|
|
32
|
+
degree?: number;
|
|
33
|
+
tags?: string[];
|
|
34
|
+
packs?: string[];
|
|
35
|
+
governancePacks?: string[];
|
|
36
|
+
contractPacks?: string[];
|
|
37
|
+
boundaries?: string[];
|
|
38
|
+
releases?: string[];
|
|
39
|
+
profiles?: string[];
|
|
40
|
+
validation?: {
|
|
41
|
+
status?: "pass" | "warn" | "fail" | "unknown";
|
|
42
|
+
issues?: string[];
|
|
43
|
+
lastCheckedAt?: string;
|
|
44
|
+
};
|
|
45
|
+
proof?: {
|
|
46
|
+
claimTier?: string;
|
|
47
|
+
testStatus?: string;
|
|
48
|
+
evidenceStatus?: string;
|
|
49
|
+
releaseStatus?: string;
|
|
50
|
+
completeness?: number;
|
|
51
|
+
};
|
|
52
|
+
metrics?: {
|
|
53
|
+
upstreamCount?: number;
|
|
54
|
+
downstreamCount?: number;
|
|
55
|
+
blockerCount?: number;
|
|
56
|
+
staleEdgeCount?: number;
|
|
57
|
+
};
|
|
58
|
+
links?: Array<{
|
|
59
|
+
label: string;
|
|
60
|
+
href: string;
|
|
61
|
+
kind?: string;
|
|
62
|
+
}>;
|
|
63
|
+
x?: number;
|
|
64
|
+
y?: number;
|
|
65
|
+
vx?: number;
|
|
66
|
+
vy?: number;
|
|
67
|
+
pinned?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface LineageEdge {
|
|
70
|
+
from: string;
|
|
71
|
+
to: string;
|
|
72
|
+
type?: string;
|
|
73
|
+
label?: string;
|
|
74
|
+
direction?: "forward" | "reverse" | "bidirectional";
|
|
75
|
+
status?: "active" | "planned" | "deprecated" | "stale" | "missing" | "invalid" | "unknown";
|
|
76
|
+
originKind?: string;
|
|
77
|
+
strength?: number;
|
|
78
|
+
tier?: string;
|
|
79
|
+
source?: {
|
|
80
|
+
path?: string;
|
|
81
|
+
line?: number;
|
|
82
|
+
field?: string;
|
|
83
|
+
url?: string;
|
|
84
|
+
};
|
|
85
|
+
proof?: {
|
|
86
|
+
required?: boolean;
|
|
87
|
+
satisfied?: boolean;
|
|
88
|
+
blocker?: boolean;
|
|
89
|
+
reason?: string;
|
|
90
|
+
};
|
|
91
|
+
pack?: {
|
|
92
|
+
id?: string;
|
|
93
|
+
kind?: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export interface LineageGroup {
|
|
97
|
+
id: string;
|
|
98
|
+
kind: string;
|
|
99
|
+
label: string;
|
|
100
|
+
nodeIds: string[];
|
|
101
|
+
status?: string;
|
|
102
|
+
originKind?: string;
|
|
103
|
+
summary?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface LineagePayload {
|
|
106
|
+
schemaVersion?: string;
|
|
107
|
+
generatedAt?: string;
|
|
108
|
+
generator?: {
|
|
109
|
+
name?: string;
|
|
110
|
+
version?: string;
|
|
111
|
+
command?: string;
|
|
112
|
+
};
|
|
113
|
+
registry?: {
|
|
114
|
+
path?: string;
|
|
115
|
+
repoRoot?: string;
|
|
116
|
+
schemaVersion?: string;
|
|
117
|
+
validationStatus?: "valid" | "invalid" | "unknown";
|
|
118
|
+
};
|
|
119
|
+
package?: {
|
|
120
|
+
id?: string;
|
|
121
|
+
name?: string;
|
|
122
|
+
version?: string;
|
|
123
|
+
kind?: string;
|
|
124
|
+
repositoryUrl?: string;
|
|
125
|
+
canonicalUrl?: string;
|
|
126
|
+
};
|
|
127
|
+
nodes: LineageNode[];
|
|
128
|
+
edges: LineageEdge[];
|
|
129
|
+
groups?: LineageGroup[];
|
|
130
|
+
summaries?: Record<string, unknown>;
|
|
131
|
+
summary?: Record<string, unknown>;
|
|
132
|
+
}
|
|
133
|
+
export interface SelectionState {
|
|
134
|
+
selectedNodeId: string | null;
|
|
135
|
+
selectedEdgeIndex: number | null;
|
|
136
|
+
focusNodeId: string | null;
|
|
137
|
+
}
|
|
138
|
+
export interface RendererOptions {
|
|
139
|
+
renderer?: RendererPreference;
|
|
140
|
+
layoutMode?: LayoutMode;
|
|
141
|
+
initialDepth?: DepthSetting;
|
|
142
|
+
initialNodeLimit?: number | "all";
|
|
143
|
+
forceCutoff?: number;
|
|
144
|
+
forceStrength?: number;
|
|
145
|
+
repulsionStrength?: number;
|
|
146
|
+
edgeOpacity?: number;
|
|
147
|
+
edgeWidth?: number;
|
|
148
|
+
ribbonCulling?: "off" | "light" | "strong";
|
|
149
|
+
}
|
|
150
|
+
export interface LineageGraphProps {
|
|
151
|
+
payload: LineagePayload;
|
|
152
|
+
options?: RendererOptions;
|
|
153
|
+
className?: string;
|
|
154
|
+
onSelectionChange?: (selection: SelectionState) => void;
|
|
155
|
+
}
|
|
156
|
+
export interface ViewportState {
|
|
157
|
+
x: number;
|
|
158
|
+
y: number;
|
|
159
|
+
zoom: number;
|
|
160
|
+
}
|
|
161
|
+
export interface PositionedNode extends Required<Pick<LineageNode, "id" | "family">> {
|
|
162
|
+
label: string;
|
|
163
|
+
status: string;
|
|
164
|
+
tier: string;
|
|
165
|
+
origin: string;
|
|
166
|
+
path: string;
|
|
167
|
+
degree: number;
|
|
168
|
+
x: number;
|
|
169
|
+
y: number;
|
|
170
|
+
vx: number;
|
|
171
|
+
vy: number;
|
|
172
|
+
pinned: boolean;
|
|
173
|
+
}
|
|
174
|
+
export interface StandaloneHtmlOptions {
|
|
175
|
+
title?: string;
|
|
176
|
+
script?: string;
|
|
177
|
+
style?: string;
|
|
178
|
+
rootId?: string;
|
|
179
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "../styles.css";
|
|
3
|
+
import "../workspace/index.css";
|
|
4
|
+
import type { LineagePayload } from "../types";
|
|
5
|
+
interface LineageGraphAppProps {
|
|
6
|
+
payload: LineagePayload;
|
|
7
|
+
selectedRegistryKey?: string;
|
|
8
|
+
onChangeRegistry?: (key: string) => void;
|
|
9
|
+
registryOptions?: Array<{
|
|
10
|
+
key: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}>;
|
|
13
|
+
defaultMode?: "network" | "lineage" | "proof" | "release" | "origins" | "packs" | "validation";
|
|
14
|
+
theme?: "light" | "steel-dark";
|
|
15
|
+
showDocumentation?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function LineageGraphApp(props: LineageGraphAppProps): React.ReactElement;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { LineagePayload, LineageNode, GraphFilters, OriginKind, GraphViewMode } from "../types";
|
|
7
|
+
interface LeftSidebarProps {
|
|
8
|
+
payload: LineagePayload;
|
|
9
|
+
filters: GraphFilters;
|
|
10
|
+
onUpdateFilters: (next: GraphFilters) => void;
|
|
11
|
+
viewMode: GraphViewMode;
|
|
12
|
+
onChangeViewMode: (mode: GraphViewMode) => void;
|
|
13
|
+
selectedRegistryKey: string;
|
|
14
|
+
onChangeRegistry: (key: string) => void;
|
|
15
|
+
registryOptions?: Array<{
|
|
16
|
+
key: string;
|
|
17
|
+
label: string;
|
|
18
|
+
}>;
|
|
19
|
+
allPacks: string[];
|
|
20
|
+
allTiers: string[];
|
|
21
|
+
allOriginKinds: OriginKind[];
|
|
22
|
+
filteredNodes: LineageNode[];
|
|
23
|
+
isCollapsed: boolean;
|
|
24
|
+
onToggleCollapse: () => void;
|
|
25
|
+
onSelectNode?: (id: string | null) => void;
|
|
26
|
+
onFocusNode?: (id: string | null) => void;
|
|
27
|
+
nodeLimit?: number;
|
|
28
|
+
onUpdateNodeLimit?: (limit: number) => void;
|
|
29
|
+
egoHops?: number;
|
|
30
|
+
onUpdateEgoHops?: (hops: number) => void;
|
|
31
|
+
isolateEgo?: boolean;
|
|
32
|
+
onUpdateIsolateEgo?: (val: boolean) => void;
|
|
33
|
+
}
|
|
34
|
+
export declare const LeftSidebar: React.FC<LeftSidebarProps>;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { LineagePayload, LineageNode, LineageEdge, GraphViewMode, ViewSettings } from "../types";
|
|
7
|
+
interface LineageGraphAppProps {
|
|
8
|
+
payload: LineagePayload;
|
|
9
|
+
selectedRegistryKey?: string;
|
|
10
|
+
onChangeRegistry?: (key: string) => void;
|
|
11
|
+
registryOptions?: Array<{
|
|
12
|
+
key: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}>;
|
|
15
|
+
defaultMode?: GraphViewMode;
|
|
16
|
+
theme?: ViewSettings["theme"];
|
|
17
|
+
showDocumentation?: boolean;
|
|
18
|
+
precomputedIndices?: {
|
|
19
|
+
nodeMap: Map<string, LineageNode>;
|
|
20
|
+
incoming: Map<string, string[]>;
|
|
21
|
+
outgoing: Map<string, string[]>;
|
|
22
|
+
edgeMap: Map<string, LineageEdge[]>;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export declare const LineageGraphApp: React.FC<LineageGraphAppProps>;
|
|
26
|
+
export default LineageGraphApp;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { LineagePayload, LineageNode, LineageEdge, GraphViewMode, ViewSettings, NodePositions } from "../types";
|
|
7
|
+
interface LineageGraphCanvasProps {
|
|
8
|
+
payload: LineagePayload;
|
|
9
|
+
positions: NodePositions;
|
|
10
|
+
mode: GraphViewMode;
|
|
11
|
+
selectedNodeId: string | null;
|
|
12
|
+
selectedNodeIds?: Set<string>;
|
|
13
|
+
focusNodeId: string | null;
|
|
14
|
+
collapsedNodeIds: Set<string>;
|
|
15
|
+
hiddenNodeIds: Set<string>;
|
|
16
|
+
onSelectNode: (id: string | null, isShiftPressed?: boolean) => void;
|
|
17
|
+
onToggleCollapse: (id: string) => void;
|
|
18
|
+
onToggleHideNode: (id: string) => void;
|
|
19
|
+
onClearHiddenNodes: () => void;
|
|
20
|
+
onUpdatePositions: (next: NodePositions) => void;
|
|
21
|
+
viewSettings: ViewSettings;
|
|
22
|
+
precomputedIndices?: {
|
|
23
|
+
nodeMap: Map<string, LineageNode>;
|
|
24
|
+
incoming: Map<string, string[]>;
|
|
25
|
+
outgoing: Map<string, string[]>;
|
|
26
|
+
edgeMap: Map<string, LineageEdge[]>;
|
|
27
|
+
};
|
|
28
|
+
egoHops?: number;
|
|
29
|
+
onAddGroup?: (group: any) => void;
|
|
30
|
+
onBulkHideNodes?: (ids: string[]) => void;
|
|
31
|
+
onBulkHighlightNodes?: (ids: string[]) => void;
|
|
32
|
+
highlightedNodeIds?: Set<string>;
|
|
33
|
+
customGroups?: {
|
|
34
|
+
id: string;
|
|
35
|
+
label: string;
|
|
36
|
+
nodeIds: string[];
|
|
37
|
+
}[];
|
|
38
|
+
isolateEgo?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare const FAMILY_COLORS: Record<string, {
|
|
41
|
+
bg: string;
|
|
42
|
+
text: string;
|
|
43
|
+
border: string;
|
|
44
|
+
glow: string;
|
|
45
|
+
}>;
|
|
46
|
+
export declare function generateGhostParallelPaths(startX: number, startY: number, endX: number, endY: number, mode: string, offset: number): string;
|
|
47
|
+
export declare const LineageGraphCanvas: React.FC<LineageGraphCanvasProps>;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { LineagePayload } from "../types";
|
|
7
|
+
interface RightInspectorProps {
|
|
8
|
+
payload: LineagePayload;
|
|
9
|
+
selectedNodeId: string | null;
|
|
10
|
+
focusNodeId: string | null;
|
|
11
|
+
onSelectNode: (id: string | null) => void;
|
|
12
|
+
onSetFocusNode: (id: string | null) => void;
|
|
13
|
+
onClearFocusNode: () => void;
|
|
14
|
+
isCollapsed: boolean;
|
|
15
|
+
onToggleCollapse: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const RightInspector: React.FC<RightInspectorProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.css';
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
export type GraphViewMode = "network" | "lineage" | "proof" | "release" | "origins" | "packs" | "validation" | "flow-force";
|
|
6
|
+
export type OriginKind = "ssot-core" | "ssot-origin" | "repo-local" | "extension-pack" | "generated" | "unknown" | string;
|
|
7
|
+
export type LineageFamily = "ADR" | "Spec" | "SPEC" | "Feature" | "Claim" | "Test" | "Evidence" | "Boundary" | "Profile" | "Release" | "Risk" | "Issue" | string;
|
|
8
|
+
export interface LineageNode {
|
|
9
|
+
id: string;
|
|
10
|
+
family: LineageFamily;
|
|
11
|
+
label?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
summary?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
body?: string;
|
|
16
|
+
status?: string;
|
|
17
|
+
lifecycle?: {
|
|
18
|
+
stage?: string;
|
|
19
|
+
state?: string;
|
|
20
|
+
promotedAt?: string;
|
|
21
|
+
certifiedAt?: string;
|
|
22
|
+
publishedAt?: string;
|
|
23
|
+
};
|
|
24
|
+
tier?: string;
|
|
25
|
+
origin?: string;
|
|
26
|
+
originKind?: OriginKind;
|
|
27
|
+
originRef?: string;
|
|
28
|
+
source?: {
|
|
29
|
+
path?: string;
|
|
30
|
+
line?: number;
|
|
31
|
+
url?: string;
|
|
32
|
+
documentId?: string;
|
|
33
|
+
};
|
|
34
|
+
path?: string;
|
|
35
|
+
degree?: number;
|
|
36
|
+
tags?: string[];
|
|
37
|
+
packs?: string[];
|
|
38
|
+
governancePacks?: string[];
|
|
39
|
+
contractPacks?: string[];
|
|
40
|
+
boundaries?: string[];
|
|
41
|
+
releases?: string[];
|
|
42
|
+
profiles?: string[];
|
|
43
|
+
validation?: {
|
|
44
|
+
status?: "pass" | "warn" | "fail" | "unknown";
|
|
45
|
+
issues?: string[];
|
|
46
|
+
lastCheckedAt?: string;
|
|
47
|
+
};
|
|
48
|
+
proof?: {
|
|
49
|
+
claimTier?: string;
|
|
50
|
+
testStatus?: string;
|
|
51
|
+
evidenceStatus?: string;
|
|
52
|
+
releaseStatus?: string;
|
|
53
|
+
completeness?: number;
|
|
54
|
+
};
|
|
55
|
+
metrics?: {
|
|
56
|
+
upstreamCount?: number;
|
|
57
|
+
downstreamCount?: number;
|
|
58
|
+
blockerCount?: number;
|
|
59
|
+
staleEdgeCount?: number;
|
|
60
|
+
};
|
|
61
|
+
links?: Array<{
|
|
62
|
+
label: string;
|
|
63
|
+
href: string;
|
|
64
|
+
kind?: "source" | "docs" | "website" | "issue" | "release" | "external" | string;
|
|
65
|
+
}>;
|
|
66
|
+
}
|
|
67
|
+
export interface LineageEdge {
|
|
68
|
+
from: string;
|
|
69
|
+
to: string;
|
|
70
|
+
type?: string;
|
|
71
|
+
label?: string;
|
|
72
|
+
direction?: "forward" | "reverse" | "bidirectional";
|
|
73
|
+
status?: "active" | "planned" | "deprecated" | "stale" | "missing" | "invalid" | "unknown";
|
|
74
|
+
originKind?: "direct" | "derived" | "inferred" | "generated" | "unknown" | string;
|
|
75
|
+
strength?: number;
|
|
76
|
+
tier?: string;
|
|
77
|
+
source?: {
|
|
78
|
+
path?: string;
|
|
79
|
+
line?: number;
|
|
80
|
+
field?: string;
|
|
81
|
+
url?: string;
|
|
82
|
+
};
|
|
83
|
+
proof?: {
|
|
84
|
+
required?: boolean;
|
|
85
|
+
satisfied?: boolean;
|
|
86
|
+
blocker?: boolean;
|
|
87
|
+
reason?: string;
|
|
88
|
+
};
|
|
89
|
+
pack?: {
|
|
90
|
+
id?: string;
|
|
91
|
+
kind?: "governance-pack" | "pack-contract" | "extension-pack" | string;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export interface LineageGroup {
|
|
95
|
+
id: string;
|
|
96
|
+
kind: "boundary" | "release" | "profile" | "package" | "governance-pack" | "pack-contract" | "origin" | string;
|
|
97
|
+
label: string;
|
|
98
|
+
nodeIds: string[];
|
|
99
|
+
status?: string;
|
|
100
|
+
originKind?: string;
|
|
101
|
+
summary?: string;
|
|
102
|
+
}
|
|
103
|
+
export interface LineageSummaries {
|
|
104
|
+
counts?: {
|
|
105
|
+
nodes?: number;
|
|
106
|
+
edges?: number;
|
|
107
|
+
families?: Record<string, number>;
|
|
108
|
+
statuses?: Record<string, number>;
|
|
109
|
+
origins?: Record<string, number>;
|
|
110
|
+
tiers?: Record<string, number>;
|
|
111
|
+
};
|
|
112
|
+
proof?: {
|
|
113
|
+
completeChains?: number;
|
|
114
|
+
incompleteChains?: number;
|
|
115
|
+
blockedReleases?: number;
|
|
116
|
+
missingEvidence?: number;
|
|
117
|
+
missingTests?: number;
|
|
118
|
+
};
|
|
119
|
+
packs?: {
|
|
120
|
+
governancePacks?: number;
|
|
121
|
+
contractPacks?: number;
|
|
122
|
+
extensionPacks?: number;
|
|
123
|
+
};
|
|
124
|
+
hotspots?: Array<{
|
|
125
|
+
nodeId: string;
|
|
126
|
+
reason: string;
|
|
127
|
+
score?: number;
|
|
128
|
+
}>;
|
|
129
|
+
}
|
|
130
|
+
export interface LineagePayload {
|
|
131
|
+
schemaVersion?: string;
|
|
132
|
+
generatedAt?: string;
|
|
133
|
+
generator?: {
|
|
134
|
+
name?: string;
|
|
135
|
+
version?: string;
|
|
136
|
+
command?: string;
|
|
137
|
+
};
|
|
138
|
+
registry?: {
|
|
139
|
+
path?: string;
|
|
140
|
+
repoRoot?: string;
|
|
141
|
+
schemaVersion?: string;
|
|
142
|
+
validationStatus?: "valid" | "invalid" | "unknown";
|
|
143
|
+
};
|
|
144
|
+
package?: {
|
|
145
|
+
id?: string;
|
|
146
|
+
name?: string;
|
|
147
|
+
version?: string;
|
|
148
|
+
kind?: string;
|
|
149
|
+
repositoryUrl?: string;
|
|
150
|
+
canonicalUrl?: string;
|
|
151
|
+
};
|
|
152
|
+
nodes: LineageNode[];
|
|
153
|
+
edges: LineageEdge[];
|
|
154
|
+
groups?: LineageGroup[];
|
|
155
|
+
summaries?: LineageSummaries;
|
|
156
|
+
summary?: Record<string, unknown>;
|
|
157
|
+
}
|
|
158
|
+
export interface GraphFilters {
|
|
159
|
+
search: string;
|
|
160
|
+
families: Set<LineageFamily>;
|
|
161
|
+
statuses: Set<string>;
|
|
162
|
+
originKinds: Set<OriginKind>;
|
|
163
|
+
tiers: Set<string>;
|
|
164
|
+
packs: Set<string>;
|
|
165
|
+
validationStatuses: Set<string>;
|
|
166
|
+
edgeTypes: Set<string>;
|
|
167
|
+
}
|
|
168
|
+
export interface GraphSelection {
|
|
169
|
+
selectedNodeId: string | null;
|
|
170
|
+
selectedEdgeId: string | null;
|
|
171
|
+
focusNodeId: string | null;
|
|
172
|
+
focusHistory: string[];
|
|
173
|
+
collapsedNodeIds: Set<string>;
|
|
174
|
+
}
|
|
175
|
+
export interface ViewSettings {
|
|
176
|
+
showLabels: boolean;
|
|
177
|
+
edgeWidth: number;
|
|
178
|
+
edgeOpacity: number;
|
|
179
|
+
showMinimap: boolean;
|
|
180
|
+
theme: "light" | "steel-dark";
|
|
181
|
+
}
|
|
182
|
+
export interface Position {
|
|
183
|
+
x: number;
|
|
184
|
+
y: number;
|
|
185
|
+
vx?: number;
|
|
186
|
+
vy?: number;
|
|
187
|
+
fx?: number | null;
|
|
188
|
+
fy?: number | null;
|
|
189
|
+
}
|
|
190
|
+
export type NodePositions = Record<string, Position>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { LineagePayload, LineageNode, LineageEdge, NodePositions, GraphViewMode } from "../types";
|
|
6
|
+
export declare const FAMILY_LAYERS: Record<string, number>;
|
|
7
|
+
export declare function columnForNode(node: LineageNode, viewMode?: GraphViewMode): number;
|
|
8
|
+
export declare function computeGraphIndices(payload: LineagePayload): {
|
|
9
|
+
nodeMap: Map<string, LineageNode>;
|
|
10
|
+
incoming: Map<string, string[]>;
|
|
11
|
+
outgoing: Map<string, string[]>;
|
|
12
|
+
edgeMap: Map<string, LineageEdge[]>;
|
|
13
|
+
};
|
|
14
|
+
export declare function hasCollapsedUpstreamAncestor(id: string, incoming: Map<string, string[]>, collapsedIds: Set<string>): boolean;
|
|
15
|
+
export declare function traceSubGraph(nodeId: string, incoming: Map<string, string[]>, outgoing: Map<string, string[]>, depth?: number): {
|
|
16
|
+
nodes: Set<string>;
|
|
17
|
+
edges: Set<string>;
|
|
18
|
+
};
|
|
19
|
+
export declare function computeDeterministicLayout(nodes: LineageNode[], incoming: Map<string, string[]>, outgoing: Map<string, string[]>, collapsedIds: Set<string>, scaleX?: number, scaleY?: number, width?: number, height?: number, viewMode?: GraphViewMode, userHiddenIds?: Set<string>): NodePositions;
|
|
20
|
+
export declare function runForceSimulationStep(nodes: LineageNode[], edges: LineageEdge[], positions: NodePositions, disabledIds: Set<string>, width?: number, height?: number, centerGravity?: number, repulsionConstant?: number, springConstant?: number, restLength?: number, viewMode?: string): NodePositions;
|
|
21
|
+
export declare function generateSvgLinkCurve(startX: number, startY: number, endX: number, endY: number, mode: string): string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { LineageNode, LineageEdge, LineagePayload } from "../types.js";
|
|
6
|
+
export interface CachedDatasetMeta {
|
|
7
|
+
key: string;
|
|
8
|
+
nodesCount: number;
|
|
9
|
+
edgesCount: number;
|
|
10
|
+
generatedAt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface SerializedIndices {
|
|
13
|
+
incoming: [string, string[]][];
|
|
14
|
+
outgoing: [string, string[]][];
|
|
15
|
+
edgeMap: [string, LineageEdge[]][];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Checks if a dataset is fully cached in IndexedDB
|
|
19
|
+
*/
|
|
20
|
+
export declare function isDatasetCached(key: string): Promise<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Save massive dataset and precomputed indices to IndexedDB
|
|
23
|
+
*/
|
|
24
|
+
export declare function saveDatasetToCache(key: string, payload: LineagePayload, indices: {
|
|
25
|
+
nodeMap: Map<string, LineageNode>;
|
|
26
|
+
incoming: Map<string, string[]>;
|
|
27
|
+
outgoing: Map<string, string[]>;
|
|
28
|
+
edgeMap: Map<string, LineageEdge[]>;
|
|
29
|
+
}, onProgress?: (status: string, percent: number) => void): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Retrieve massive dataset and rebuild indices from IndexedDB cache
|
|
32
|
+
*/
|
|
33
|
+
export declare function loadDatasetFromCache(key: string, onProgress?: (status: string, percent: number) => void): Promise<{
|
|
34
|
+
payload: LineagePayload;
|
|
35
|
+
precomputedIndices: {
|
|
36
|
+
nodeMap: Map<string, LineageNode>;
|
|
37
|
+
incoming: Map<string, string[]>;
|
|
38
|
+
outgoing: Map<string, string[]>;
|
|
39
|
+
edgeMap: Map<string, LineageEdge[]>;
|
|
40
|
+
};
|
|
41
|
+
} | null>;
|
|
42
|
+
/**
|
|
43
|
+
* Remove cached items
|
|
44
|
+
*/
|
|
45
|
+
export declare function clearDatasetCache(key: string): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { LineagePayload } from "../types";
|
|
6
|
+
export declare const mockCoreRegistry: LineagePayload;
|
|
7
|
+
export declare const mockDriftRegistry: LineagePayload;
|
|
8
|
+
export declare function createLargeRegistry(): LineagePayload;
|
|
9
|
+
export declare function createSuperLargeRegistry(): LineagePayload;
|
|
10
|
+
export declare function createMegaScaleRegistry(): LineagePayload;
|