import { type NgDrawFlowComponent } from '../ng-draw-flow.component'; import { type DfDataConnection, type DfDataModel, type DfDataNode, type DfEvent, type DfPoint } from '../ng-draw-flow.interfaces'; import * as i0 from "@angular/core"; type Nullable = T | null; /** * Root-scoped facade that mirrors `NgDrawFlowComponent` state and public * controls so host applications can interact with the editor without a * component reference. */ export declare class NgDrawFlowStoreService { private host?; private readonly selectedNodeSignal; private readonly dataModelSignal; private readonly selectedConnectionSignal; private readonly scaleSignal; private readonly nodeDeletedSubject; private readonly nodeMovedSubject; private readonly nodeSelectedSubject; private readonly connectionCreatedSubject; private readonly connectionDeletedSubject; private readonly connectionSelectedSubject; private readonly lastNodeDeletedSignal; private readonly lastNodeMovedSignal; private readonly lastNodeSelectedSignal; private readonly lastConnectionCreatedSignal; private readonly lastConnectionDeletedSignal; private readonly lastConnectionSelectedSignal; /** Snapshot of the current editor data model. */ readonly dataModel: import("@angular/core").Signal>; /** Stream of data model updates emitted after each change. */ readonly dataModel$: import("rxjs").Observable>; /** Snapshot of the currently selected node (if any). */ readonly selectedNode: import("@angular/core").Signal>; /** Stream of node selection changes. */ readonly selectedNode$: import("rxjs").Observable>; /** Snapshot of the currently selected connection (if any). */ readonly selectedConnection: import("@angular/core").Signal>; /** Stream of connection selection changes. */ readonly selectedConnection$: import("rxjs").Observable>; /** Snapshot of the current zoom scale in percents. */ readonly scale: import("@angular/core").Signal; /** Stream of zoom scale updates. */ readonly scale$: import("rxjs").Observable; /** Whether a node or a connection is selected. */ readonly hasSelection: import("@angular/core").Signal; /** Emits whenever a node is deleted (UI or API). */ readonly nodeDeleted$: import("rxjs").Observable>; /** Last node deletion event. Signal-first counterpart of `nodeDeleted$`. */ readonly lastNodeDeleted: import("@angular/core").Signal>>; /** Emits whenever a node moves. */ readonly nodeMoved$: import("rxjs").Observable>; /** Last node movement event. Signal-first counterpart of `nodeMoved$`. */ readonly lastNodeMoved: import("@angular/core").Signal>>; /** Emits whenever a node becomes selected. */ readonly nodeSelected$: import("rxjs").Observable; /** Last selected node event payload. Signal-first counterpart of `nodeSelected$`. */ readonly lastNodeSelected: import("@angular/core").Signal>; /** Emits whenever a connection is created. */ readonly connectionCreated$: import("rxjs").Observable>; /** Last connection creation event. Signal-first counterpart of `connectionCreated$`. */ readonly lastConnectionCreated: import("@angular/core").Signal>>; /** Emits whenever a connection is removed. */ readonly connectionDeleted$: import("rxjs").Observable>; /** Last connection deletion event. Signal-first counterpart of `connectionDeleted$`. */ readonly lastConnectionDeleted: import("@angular/core").Signal>>; /** Emits whenever a connection becomes selected. */ readonly connectionSelected$: import("rxjs").Observable; /** Last selected connection payload. Signal-first counterpart of `connectionSelected$`. */ readonly lastConnectionSelected: import("@angular/core").Signal>; /** * Binds a component instance so store methods can forward commands and * reflect state changes. */ attach(host: NgDrawFlowComponent): void; /** * Unbinds the current component instance and clears all cached state. */ detach(host: NgDrawFlowComponent): void; /** Forwards a zoom-in command to the live editor. */ zoomIn(): void; /** Forwards a zoom-out command to the live editor. */ zoomOut(): void; /** Resets pan and zoom on the live editor. */ resetPosition(): void; /** Partially updates zoom and coordinates. */ setPosition(position?: Partial & { zoom?: number; }): void; /** * Applies an absolute zoom factor on the live editor and stores its * percentage representation. */ setScale(scale: number): void; /** * Removes the provided connection via the live editor instance. */ removeConnection(connection: DfDataConnection): void; /** * Removes the provided node via the live editor instance. */ removeNode(node: DfDataNode | string): void; /** * Applies a model to the live editor and propagates it through the bound * form control. Without an attached editor, only the cached snapshot changes. */ setDataModel(model: DfDataModel): void; /** * Replaces the cached data model and revalidates current selections. */ updateDataModel(model: DfDataModel): void; /** Pushes a new zoom scale in percents without touching the live editor. */ setScaleValue(scale: number): void; /** Stores the provided node as selected and clears connection selection. */ setSelectedNode(node: DfDataNode): void; /** Clears node selection optionally guarding against mismatched ids. */ clearSelectedNode(id?: string): void; /** Updates cached node data when the selected node changes externally. */ updateSelectedNode(node: DfDataNode): void; /** Stores the provided connection as selected and clears node selection. */ setSelectedConnection(connection: DfDataConnection): void; /** Clears connection selection optionally guarding by equality check. */ clearSelectedConnection(connection?: DfDataConnection): void; /** Updates cached connection data when the selected connection changes. */ updateSelectedConnection(connection: DfDataConnection): void; /** Emits a node deletion event and reconciles cached state. */ emitNodeDeleted(event: DfEvent): void; /** Emits a node movement event and reconciles cached state. */ emitNodeMoved(event: DfEvent): void; /** Emits a connection creation event and reconciles cached state. */ emitConnectionCreated(event: DfEvent): void; /** Emits a connection deletion event and reconciles cached state. */ emitConnectionDeleted(event: DfEvent): void; /** Records a connection as selected and notifies subscribers. */ emitConnectionSelected(connection: DfDataConnection): void; /** Records a node as selected and notifies subscribers. */ emitNodeSelected(node: DfDataNode): void; /** Clears all cached state (model, selections, scale). */ clear(): void; private reset; private cloneModel; private cloneNode; private cloneConnection; private cloneNodeEvent; private cloneConnectionEvent; private clearSelectionOnScene; private isSameConnection; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export {};