@ssot-registry/lineage-graph 0.2.26-dev.1 → 0.2.26
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/dist/lineage-graph.cjs +17 -17
- package/dist/lineage-graph.css +1 -1
- package/dist/lineage-graph.js +4330 -4138
- package/dist/standalone/ssot-lineage-graph.css +1 -1
- package/dist/standalone/ssot-lineage-graph.js +21 -21
- package/dist/workspace/components/LineageGraphCanvas/LineageGraphCanvas.d.ts +42 -0
- package/dist/workspace/components/LineageGraphCanvas/constants.d.ts +6 -0
- package/dist/workspace/components/LineageGraphCanvas/helpers.d.ts +9 -0
- package/dist/workspace/components/LineageGraphCanvas/index.d.ts +3 -0
- package/dist/workspace/components/LineageGraphCanvas/useNodeDragging.d.ts +19 -0
- package/dist/workspace/components/LineageGraphCanvas/useViewport.d.ts +38 -0
- package/dist/workspace/components/LineageGraphCanvas.d.ts +3 -48
- package/dist/workspace/types.d.ts +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { LineagePayload, LineageNode, LineageEdge, GraphViewMode, ViewSettings, NodePositions, GraphFilters } 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
|
+
filters?: GraphFilters;
|
|
40
|
+
}
|
|
41
|
+
export declare const LineageGraphCanvas: React.FC<LineageGraphCanvasProps>;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LineageNode, GraphViewMode } from "../../types";
|
|
2
|
+
export declare function generateGhostParallelPaths(startX: number, startY: number, endX: number, endY: number, mode: string, offset: number): string;
|
|
3
|
+
export declare const getNodeBadgeClass: (node: LineageNode, mode: GraphViewMode) => "" | "bg-rose-500 text-white animate-pulse" | "bg-orange-400 text-white" | "bg-emerald-500 text-white" | "bg-rose-500 text-white" | "bg-indigo-500 text-white";
|
|
4
|
+
export declare const getNodeBadgeInfo: (node: LineageNode, mode: GraphViewMode) => {
|
|
5
|
+
className: string;
|
|
6
|
+
icon: string;
|
|
7
|
+
label: string;
|
|
8
|
+
} | null;
|
|
9
|
+
export declare const getFamilySvgColor: (family: string) => string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { NodePositions, GraphViewMode } from "../../types";
|
|
3
|
+
interface UseNodeDraggingProps {
|
|
4
|
+
positions: NodePositions;
|
|
5
|
+
zoom: number;
|
|
6
|
+
mode: GraphViewMode;
|
|
7
|
+
onUpdatePositions: (next: NodePositions) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function useNodeDragging({ positions, zoom, mode, onUpdatePositions, }: UseNodeDraggingProps): {
|
|
10
|
+
draggedNodeId: string | null;
|
|
11
|
+
setDraggedNodeId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
12
|
+
hasDragged: boolean;
|
|
13
|
+
handleNodePointerDown: (id: string, e: React.PointerEvent<HTMLDivElement>) => void;
|
|
14
|
+
handleNodePointerMove: (id: string, e: React.PointerEvent<HTMLDivElement>) => void;
|
|
15
|
+
handleNodePointerUp: (id: string, e: React.PointerEvent<HTMLDivElement>) => void;
|
|
16
|
+
handleNodeDoubleClick: (id: string, e: React.MouseEvent) => void;
|
|
17
|
+
handleTogglePinNode: (id: string, e: React.MouseEvent) => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { LineagePayload, NodePositions } from "../../types";
|
|
3
|
+
interface UseViewportProps {
|
|
4
|
+
positions: NodePositions;
|
|
5
|
+
payload: LineagePayload;
|
|
6
|
+
focusNodeId: string | null;
|
|
7
|
+
draggedNodeId: string | null;
|
|
8
|
+
onClickBackground?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function useViewport({ positions, payload, focusNodeId, draggedNodeId, onClickBackground, }: UseViewportProps): {
|
|
11
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
12
|
+
pan: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
};
|
|
16
|
+
setPan: React.Dispatch<React.SetStateAction<{
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
}>>;
|
|
20
|
+
zoom: number;
|
|
21
|
+
setZoom: React.Dispatch<React.SetStateAction<number>>;
|
|
22
|
+
isPanning: boolean;
|
|
23
|
+
setIsPanning: React.Dispatch<React.SetStateAction<boolean>>;
|
|
24
|
+
debouncedBounds: {
|
|
25
|
+
left: number;
|
|
26
|
+
right: number;
|
|
27
|
+
top: number;
|
|
28
|
+
bottom: number;
|
|
29
|
+
zoom: number;
|
|
30
|
+
};
|
|
31
|
+
handleWorkspacePointerDown: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
32
|
+
handleWorkspacePointerMove: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
33
|
+
handleWorkspacePointerUp: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
34
|
+
handleWheel: (e: React.WheelEvent<HTMLDivElement>) => void;
|
|
35
|
+
handleFitView: () => void;
|
|
36
|
+
handleResetZoom: () => void;
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
@@ -1,48 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 {};
|
|
1
|
+
export { LineageGraphCanvas } from "./LineageGraphCanvas/LineageGraphCanvas";
|
|
2
|
+
export { FAMILY_COLORS } from "./LineageGraphCanvas/constants";
|
|
3
|
+
export { generateGhostParallelPaths, getFamilySvgColor, getNodeBadgeClass, getNodeBadgeInfo, } from "./LineageGraphCanvas/helpers";
|
|
@@ -70,7 +70,7 @@ export interface LineageEdge {
|
|
|
70
70
|
type?: string;
|
|
71
71
|
label?: string;
|
|
72
72
|
direction?: "forward" | "reverse" | "bidirectional";
|
|
73
|
-
status?: "active" | "planned" | "deprecated" | "stale" | "missing" | "invalid" | "unknown";
|
|
73
|
+
status?: "active" | "planned" | "deprecated" | "stale" | "missing" | "invalid" | "unknown" | string;
|
|
74
74
|
originKind?: "direct" | "derived" | "inferred" | "generated" | "unknown" | string;
|
|
75
75
|
strength?: number;
|
|
76
76
|
tier?: string;
|
|
@@ -186,5 +186,6 @@ export interface Position {
|
|
|
186
186
|
vy?: number;
|
|
187
187
|
fx?: number | null;
|
|
188
188
|
fy?: number | null;
|
|
189
|
+
iy?: number;
|
|
189
190
|
}
|
|
190
191
|
export type NodePositions = Record<string, Position>;
|