@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.
Files changed (39) hide show
  1. package/README.md +15 -0
  2. package/dist/LineageGraph.d.ts +2 -0
  3. package/dist/LineageGraphApp.d.ts +1 -0
  4. package/dist/components/ConnectedEdgesPanel.d.ts +9 -0
  5. package/dist/components/FamilyFilters.d.ts +6 -0
  6. package/dist/components/Legend.d.ts +4 -0
  7. package/dist/components/LineageGraphCanvas.d.ts +40 -0
  8. package/dist/components/PackageSummary.d.ts +6 -0
  9. package/dist/components/ResultsList.d.ts +8 -0
  10. package/dist/components/SelectedNodePanel.d.ts +8 -0
  11. package/dist/components/ViewControls.d.ts +33 -0
  12. package/dist/constants.d.ts +6 -0
  13. package/dist/html.d.ts +2 -0
  14. package/dist/index.d.ts +5 -0
  15. package/dist/layout.d.ts +12 -0
  16. package/dist/lineage-graph.cjs +95 -0
  17. package/dist/lineage-graph.css +1 -0
  18. package/dist/lineage-graph.js +9267 -0
  19. package/dist/standalone/ssot-lineage-graph.css +1 -0
  20. package/dist/standalone/ssot-lineage-graph.js +84 -0
  21. package/dist/standalone.d.ts +6 -0
  22. package/dist/subcomponents/KeyValue.d.ts +5 -0
  23. package/dist/subcomponents/Section.d.ts +8 -0
  24. package/dist/subcomponents/StatCard.d.ts +5 -0
  25. package/dist/subcomponents/format.d.ts +1 -0
  26. package/dist/types.d.ts +179 -0
  27. package/dist/views/LineageGraphAppView.d.ts +18 -0
  28. package/dist/workspace/App.d.ts +5 -0
  29. package/dist/workspace/components/LeftSidebar.d.ts +35 -0
  30. package/dist/workspace/components/LineageGraphApp.d.ts +26 -0
  31. package/dist/workspace/components/LineageGraphCanvas.d.ts +48 -0
  32. package/dist/workspace/components/RightInspector.d.ts +18 -0
  33. package/dist/workspace/components/StorybookDocs.d.ts +6 -0
  34. package/dist/workspace/main.d.ts +1 -0
  35. package/dist/workspace/types.d.ts +190 -0
  36. package/dist/workspace/utils/graphHelpers.d.ts +21 -0
  37. package/dist/workspace/utils/indexedDbHelper.d.ts +45 -0
  38. package/dist/workspace/utils/mockData.d.ts +10 -0
  39. 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,2 @@
1
+ export { LineageGraph } from "./components/LineageGraphCanvas";
2
+ export type { LineageGraphHandle, LineageGraphRuntimeState } from "./components/LineageGraphCanvas";
@@ -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,4 @@
1
+ import React from "react";
2
+ export declare function Legend({ families }: {
3
+ families: string[];
4
+ }): 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,6 @@
1
+ import React from "react";
2
+ import type { LineagePayload } from "../types";
3
+ export declare function PackageSummary({ payload, packageText }: {
4
+ payload: LineagePayload;
5
+ packageText: string;
6
+ }): React.ReactElement;
@@ -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
@@ -0,0 +1,2 @@
1
+ import type { LineagePayload, StandaloneHtmlOptions } from "./types";
2
+ export declare function createStandaloneHtml(payload: LineagePayload, options?: StandaloneHtmlOptions): string;
@@ -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";
@@ -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[];