diff --git a/plugins/catalog-graph/report.api.md b/plugins/catalog-graph/report.api.md index fd1e403473..883c79acf4 100644 --- a/plugins/catalog-graph/report.api.md +++ b/plugins/catalog-graph/report.api.md @@ -181,8 +181,31 @@ export type EntityRelationsGraphProps = { renderLabel?: DependencyGraphTypes.RenderLabelFunction; curve?: 'curveStepBefore' | 'curveMonotoneX'; showArrowHeads?: boolean; + onPostTransformation?: GraphTransformationDebugger; }; +// @public +export type GraphTransformationDebugger = ( + transformation: string | undefined, + transformationContext: TransformationContext, + clonedContext: TransformationContext, +) => void; + // @public export type RelationPairs = [string, string][]; + +// @public +export interface TransformationContext { + // (undocumented) + edges: EntityEdge[]; + // (undocumented) + maxDepth: number; + nodeDistances: Map; + // (undocumented) + nodes: EntityNode[]; + // (undocumented) + rootEntityRefs: string[]; + // (undocumented) + unidirectional: boolean; +} ``` diff --git a/plugins/catalog-graph/src/index.ts b/plugins/catalog-graph/src/index.ts index 68b84c2325..d020e96989 100644 --- a/plugins/catalog-graph/src/index.ts +++ b/plugins/catalog-graph/src/index.ts @@ -35,3 +35,7 @@ export type { EntityNode, } from './lib/types'; export { Direction } from './lib/types'; +export type { + TransformationContext, + GraphTransformationDebugger, +} from './lib/graph-transformations';