import { __name } from "../../_virtual/_rolldown/runtime.mjs"; import { RelationshipDetailsTypes } from "./_types.mjs"; import { LayoutResult } from "./layout.mjs"; import { EdgeChange, NodeChange, ReactFlowInstance, ReactFlowState } from "@xyflow/react"; import { BBox, EdgeId, ExclusiveUnion, Fqn, ViewId } from "@likec4/core"; import { ActorRef, SnapshotFrom, StateMachine } from "xstate"; //#region src/overlays/relationship-details/actor.d.ts type XYFLowInstance = ReactFlowInstance; type XYStoreState = ReactFlowState; type XYStoreApi = { getState: () => XYStoreState; }; export type Input = ExclusiveUnion<{ Edge: { edgeId: EdgeId; viewId: ViewId; }; Between: { source: Fqn; target: Fqn; viewId: ViewId; }; }>; type Subject = { edgeId: EdgeId; source?: never; target?: never; } | { source: Fqn; target: Fqn; edgeId?: never; }; export type Context = Readonly<{ subject: Subject; viewId: ViewId; xyflow: XYFLowInstance | null; xystore: XYStoreApi | null; initialized: { xydata: boolean; xyflow: boolean; }; xynodes: RelationshipDetailsTypes.Node[]; xyedges: RelationshipDetailsTypes.Edge[]; bounds: BBox; }>; export type Events = { type: 'xyflow.init'; instance: XYFLowInstance; store: XYStoreApi; } | { type: 'xyflow.nodeClick'; node: RelationshipDetailsTypes.Node; } | { type: 'xyflow.edgeClick'; edge: RelationshipDetailsTypes.Edge; } | { type: 'xyflow.edgeMouseEnter'; edge: RelationshipDetailsTypes.Edge; } | { type: 'xyflow.edgeMouseLeave'; edge: RelationshipDetailsTypes.Edge; } | { type: 'dim.nonhovered.edges'; } | { type: 'undim.edges'; } | { type: 'xyflow.selectionChange'; nodes: RelationshipDetailsTypes.Node[]; edges: RelationshipDetailsTypes.Edge[]; } | { type: 'xyflow.applyNodeChanges'; changes: NodeChange[]; } | { type: 'xyflow.applyEdgeChanges'; changes: EdgeChange[]; } | { type: 'xyflow.paneClick'; } | { type: 'xyflow.paneDblClick'; } | { type: 'xyflow.resized'; } | { type: 'xyflow.updateNodeInternals'; } | { type: 'update.layoutData'; data: LayoutResult; } | { type: 'fitDiagram'; duration?: number; bounds?: BBox; } | { type: 'navigate.to'; params: { edgeId: EdgeId; viewId?: ViewId; } | { source: Fqn; target: Fqn; viewId?: ViewId; }; } | { type: 'close'; }; export type Tags = never; export interface RelationshipDetailsLogic extends StateMachine {} export type RelationshipDetailsSnapshot = SnapshotFrom; export interface RelationshipDetailsActorRef extends ActorRef {} //#endregion export type { Input as RelationshipDetailsInput };