import { __name } from "../../_virtual/_rolldown/runtime.mjs"; import { RelationshipsBrowserTypes } from "./_types.mjs"; import { LayoutRelationshipsViewResult } from "./layout.mjs"; import { EdgeChange, NodeChange, ReactFlowInstance, ReactFlowState } from "@xyflow/react"; import { BBox, Fqn, ViewId } from "@likec4/core"; import { ActorRef, SnapshotFrom, StateMachine } from "xstate"; //#region src/overlays/relationships-browser/actor.d.ts type XYFLowInstance = ReactFlowInstance; type XYStoreState = ReactFlowState; type XYStoreApi = { getState: () => XYStoreState; setState: (state: XYStoreState) => void; }; export type Input = { subject: Fqn; viewId: ViewId | null; scope: 'global' | 'view'; closeable?: boolean; enableSelectSubject?: boolean; enableChangeScope?: boolean; }; export interface Context { subject: Fqn; viewId: ViewId | null; scope: 'global' | 'view'; closeable: boolean; enableSelectSubject: boolean; enableChangeScope: boolean; xyflow: XYFLowInstance | null; xystore: XYStoreApi | null; layouted: LayoutRelationshipsViewResult | null; navigateFromNode: string | null; xynodes: RelationshipsBrowserTypes.Node[]; xyedges: RelationshipsBrowserTypes.Edge[]; } export type Events = { type: 'xyflow.init'; instance: XYFLowInstance; store: XYStoreApi; } | { type: 'xyflow.nodeClick'; node: RelationshipsBrowserTypes.Node; } | { type: 'xyflow.edgeClick'; edge: RelationshipsBrowserTypes.Edge; } | { type: 'xyflow.applyNodeChanges'; changes: NodeChange[]; } | { type: 'xyflow.applyEdgeChanges'; changes: EdgeChange[]; } | { type: 'xyflow.paneClick'; } | { type: 'xyflow.paneDblClick'; } | { type: 'xyflow.resized'; } | { type: 'xyflow.edgeMouseEnter'; edge: RelationshipsBrowserTypes.Edge; } | { type: 'xyflow.edgeMouseLeave'; edge: RelationshipsBrowserTypes.Edge; } | { type: 'xyflow.selectionChange'; nodes: RelationshipsBrowserTypes.Node[]; edges: RelationshipsBrowserTypes.Edge[]; } | { type: 'dim.nonhovered.edges'; } | { type: 'undim.edges'; } | { type: 'xyflow.updateNodeInternals'; } | { type: 'xyflow.unmount'; } | { type: 'fitDiagram'; duration?: number; bounds?: BBox; } | { type: 'navigate.to'; subject: Fqn; fromNode?: string | undefined; viewId?: ViewId | undefined; } | { type: 'update.xydata'; xynodes: RelationshipsBrowserTypes.Node[]; xyedges: RelationshipsBrowserTypes.Edge[]; } | { type: 'change.scope'; scope: 'global' | 'view'; } | { type: 'update.view'; layouted: LayoutRelationshipsViewResult; } | { type: 'close'; }; type Tags = 'active'; export interface RelationshipsBrowserLogic extends StateMachine {} export type RelationshipsBrowserSnapshot = SnapshotFrom; export interface RelationshipsBrowserActorRef extends ActorRef {} //#endregion export type { Input as RelationshipsBrowserInput };