@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
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @ssot-registry/lineage-graph
|
|
2
|
+
|
|
3
|
+
Portable React viewer for SSOT lineage graph payloads.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { LineageGraphApp } from "@ssot-registry/lineage-graph";
|
|
7
|
+
|
|
8
|
+
<LineageGraphApp payload={payload} />;
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The package also exports `createStandaloneHtml(payload)`, which is used by the Python `ssot-registry graph lineage` command to emit an offline HTML artifact.
|
|
12
|
+
|
|
13
|
+
`LineageGraphApp` is the forward path for new integrations. The lower-level
|
|
14
|
+
`LineageGraph` canvas export remains available for compatibility with existing
|
|
15
|
+
callers, but new work should use the workspace app shell.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LineageGraphApp } from "./views/LineageGraphAppView";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { LineageEdge, SelectionState } from "../types";
|
|
3
|
+
export declare function ConnectedEdgesPanel({ connectedEdges, selectedNodeId, centerId, setCenterId, setSelection, }: {
|
|
4
|
+
connectedEdges: LineageEdge[];
|
|
5
|
+
selectedNodeId: string | null;
|
|
6
|
+
centerId: string | null;
|
|
7
|
+
setCenterId: (id: string | null) => void;
|
|
8
|
+
setSelection: React.Dispatch<React.SetStateAction<SelectionState>>;
|
|
9
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare function FamilyFilters({ families, familyVisible, setFamilyVisible, }: {
|
|
3
|
+
families: string[];
|
|
4
|
+
familyVisible: Record<string, boolean>;
|
|
5
|
+
setFamilyVisible: React.Dispatch<React.SetStateAction<Record<string, boolean>>>;
|
|
6
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { DepthSetting, LayoutMode, LineageEdge, LineagePayload, PositionedNode, RendererMode, SelectionState, ViewportState } from "../types";
|
|
3
|
+
interface InternalOptions {
|
|
4
|
+
mode: LayoutMode;
|
|
5
|
+
depth: DepthSetting;
|
|
6
|
+
nodeLimit: number | "all";
|
|
7
|
+
edgeType: string;
|
|
8
|
+
search: string;
|
|
9
|
+
familyVisible: Record<string, boolean>;
|
|
10
|
+
centerId: string | null;
|
|
11
|
+
renderer: "auto" | "webgl" | "canvas";
|
|
12
|
+
xScale: number;
|
|
13
|
+
yScale: number;
|
|
14
|
+
edgeOpacity: number;
|
|
15
|
+
edgeWidth: number;
|
|
16
|
+
ribbonCulling: "off" | "light" | "strong";
|
|
17
|
+
forceCutoff: number;
|
|
18
|
+
forceStrength: number;
|
|
19
|
+
repulsionStrength: number;
|
|
20
|
+
selectedNodeId?: string | null;
|
|
21
|
+
selectedEdgeIndex?: number | null;
|
|
22
|
+
}
|
|
23
|
+
export interface LineageGraphHandle {
|
|
24
|
+
fit: () => void;
|
|
25
|
+
exportPng: () => void;
|
|
26
|
+
exportSvg: () => void;
|
|
27
|
+
}
|
|
28
|
+
export interface LineageGraphRuntimeState {
|
|
29
|
+
visibleNodes: PositionedNode[];
|
|
30
|
+
visibleEdges: LineageEdge[];
|
|
31
|
+
rendererMode: RendererMode;
|
|
32
|
+
viewport: ViewportState;
|
|
33
|
+
}
|
|
34
|
+
export declare function LineageGraph({ payload, options, className, onSelectionChange, }: {
|
|
35
|
+
payload: LineagePayload;
|
|
36
|
+
options?: Partial<InternalOptions>;
|
|
37
|
+
className?: string;
|
|
38
|
+
onSelectionChange?: (selection: SelectionState) => void;
|
|
39
|
+
}): React.ReactElement;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { LineageNode, SelectionState } from "../types";
|
|
3
|
+
export declare function ResultsList({ nodes, search, selection, setSelection, }: {
|
|
4
|
+
nodes: LineageNode[];
|
|
5
|
+
search: string;
|
|
6
|
+
selection: SelectionState;
|
|
7
|
+
setSelection: React.Dispatch<React.SetStateAction<SelectionState>>;
|
|
8
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { LineageNode, SelectionState } from "../types";
|
|
3
|
+
export declare function SelectedNodePanel({ selectedNode, centerId, setCenterId, setSelection, }: {
|
|
4
|
+
selectedNode?: LineageNode;
|
|
5
|
+
centerId: string | null;
|
|
6
|
+
setCenterId: (id: string | null) => void;
|
|
7
|
+
setSelection: React.Dispatch<React.SetStateAction<SelectionState>>;
|
|
8
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { DepthSetting, LayoutMode } from "../types";
|
|
3
|
+
interface ViewControlsProps {
|
|
4
|
+
mode: LayoutMode;
|
|
5
|
+
setMode: (mode: LayoutMode) => void;
|
|
6
|
+
depth: DepthSetting;
|
|
7
|
+
setDepth: (depth: DepthSetting) => void;
|
|
8
|
+
nodeLimit: number | "all";
|
|
9
|
+
setNodeLimit: (limit: number | "all") => void;
|
|
10
|
+
edgeType: string;
|
|
11
|
+
setEdgeType: (edgeType: string) => void;
|
|
12
|
+
edgeTypes: string[];
|
|
13
|
+
search: string;
|
|
14
|
+
setSearch: (search: string) => void;
|
|
15
|
+
xScaleExponent: number;
|
|
16
|
+
setXScaleExponent: (value: number) => void;
|
|
17
|
+
yScaleExponent: number;
|
|
18
|
+
setYScaleExponent: (value: number) => void;
|
|
19
|
+
edgeOpacity: number;
|
|
20
|
+
setEdgeOpacity: (value: number) => void;
|
|
21
|
+
edgeWidth: number;
|
|
22
|
+
setEdgeWidth: (value: number) => void;
|
|
23
|
+
ribbonCulling: "off" | "light" | "strong";
|
|
24
|
+
setRibbonCulling: (value: "off" | "light" | "strong") => void;
|
|
25
|
+
forceCutoff: number;
|
|
26
|
+
setForceCutoff: (value: number) => void;
|
|
27
|
+
forceStrength: number;
|
|
28
|
+
setForceStrength: (value: number) => void;
|
|
29
|
+
repulsionStrength: number;
|
|
30
|
+
setRepulsionStrength: (value: number) => void;
|
|
31
|
+
}
|
|
32
|
+
export declare function ViewControls(props: ViewControlsProps): React.ReactElement;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { LineageFamily } from "./types";
|
|
2
|
+
export declare const FAMILY_COLORS: Record<string, string>;
|
|
3
|
+
export declare const FAMILY_RANKS: Record<string, number>;
|
|
4
|
+
export declare function familyColor(family: LineageFamily): string;
|
|
5
|
+
export declare function familyRank(family: LineageFamily): number;
|
|
6
|
+
export declare function familyClassName(family: LineageFamily): string;
|
package/dist/html.d.ts
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { LineageGraph } from "./LineageGraph";
|
|
2
|
+
export { LineageGraphApp } from "./LineageGraphApp";
|
|
3
|
+
export { createStandaloneHtml } from "./html";
|
|
4
|
+
export { applyForceLayoutStep, applyLineageLayout, normalizeNodes, resolveDepth } from "./layout";
|
|
5
|
+
export type { DepthSetting, LayoutMode, LineageEdge, LineageFamily, LineageGraphProps, LineageNode, LineagePayload, PositionedNode, RendererMode, RendererOptions, RendererPreference, SelectionState, StandaloneHtmlOptions, ViewportState, } from "./types";
|
package/dist/layout.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DepthSetting, LineageEdge, LineageNode, PositionedNode } from "./types";
|
|
2
|
+
export interface ForceLayoutOptions {
|
|
3
|
+
springStrength?: number;
|
|
4
|
+
repulsionStrength?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function normalizeNodes(nodes: LineageNode[]): PositionedNode[];
|
|
7
|
+
export declare function resolveDepth(edges: LineageEdge[], seeds: string[], depth: DepthSetting, edgeType?: string): {
|
|
8
|
+
ids: Set<string>;
|
|
9
|
+
edges: LineageEdge[];
|
|
10
|
+
};
|
|
11
|
+
export declare function applyLineageLayout(nodes: PositionedNode[], xScale: number, yScale: number): PositionedNode[];
|
|
12
|
+
export declare function applyForceLayoutStep(nodes: PositionedNode[], edges: LineageEdge[], iterations?: number, options?: ForceLayoutOptions): PositionedNode[];
|