import { Action } from 'easy-peasy'; import { Selection as D3Selection, ZoomBehavior } from 'd3'; import { ElementId, Elements, Transform, Node, Edge, Rect, Dimensions, XYPosition, OnConnectFunc, SelectionRect, HandleElement } from '../types'; declare type TransformXYK = { x: number; y: number; k: number; }; declare type NodePosUpdate = { id: ElementId; pos: XYPosition; }; declare type NodeUpdate = { id: ElementId; width: number; height: number; handleBounds: { source: HandleElement[] | null; target: HandleElement[] | null; }; }; declare type SelectionUpdate = { isActive: boolean; selection?: SelectionRect; }; declare type D3Init = { zoom: ZoomBehavior; selection: D3Selection; }; declare type SetSnapGrid = { snapToGrid: boolean; snapGrid: [number, number]; }; export interface StoreModel { width: number; height: number; transform: Transform; nodes: Node[]; edges: Edge[]; selectedElements: Elements; selectedNodesBbox: Rect; d3Zoom: ZoomBehavior | null; d3Selection: D3Selection | null; d3Initialised: boolean; nodesSelectionActive: boolean; selectionActive: boolean; selection: SelectionRect | null; connectionSourceId: ElementId | null; connectionPosition: XYPosition; snapToGrid: boolean; snapGrid: [number, number]; isInteractive: boolean; onConnect: OnConnectFunc; setOnConnect: Action; setNodes: Action; setEdges: Action; updateNodeData: Action; updateNodePos: Action; setSelection: Action; setNodesSelection: Action; setSelectedElements: Action; updateSelection: Action; updateTransform: Action; updateSize: Action; initD3: Action; setSnapGrid: Action; setConnectionPosition: Action; setConnectionSourceId: Action; setInteractive: Action; } declare const store: { getState: () => import("easy-peasy").IntermediateStateMapper<{ width: number; height: number; transform: [number, number, number]; nodes: Node[]; edges: Edge[]; selectedElements: (Node | Edge)[]; selectedNodesBbox: Rect; d3Zoom: ZoomBehavior | null; d3Selection: D3Selection | null; d3Initialised: boolean; nodesSelectionActive: boolean; selectionActive: boolean; selection: SelectionRect | null; connectionSourceId: string | null; connectionPosition: XYPosition; snapToGrid: boolean; snapGrid: [number, number]; isInteractive: boolean; onConnect: OnConnectFunc; }, "1">; subscribe: (listener: () => void) => import("redux").Unsubscribe; replaceReducer: (nextReducer: import("redux").Reducer | null; d3Selection: D3Selection | null; d3Initialised: boolean; nodesSelectionActive: boolean; selectionActive: boolean; selection: SelectionRect | null; connectionSourceId: string | null; connectionPosition: XYPosition; snapToGrid: boolean; snapGrid: [number, number]; isInteractive: boolean; onConnect: OnConnectFunc; }, "1">, import("redux").AnyAction>) => void; dispatch: import("easy-peasy").Dispatch>; addModel: (key: string, modelSlice: ModelSlice) => void; clearMockedActions: () => void; getActions: () => import("easy-peasy").ActionMapper<{ selectedNodesBbox: Rect; d3Zoom: ZoomBehavior | null; d3Selection: D3Selection | null; selection: SelectionRect | null; connectionPosition: XYPosition; onConnect: OnConnectFunc; setOnConnect: Action; setNodes: Action; setEdges: Action; updateNodeData: Action; updateNodePos: Action; setSelection: Action; setNodesSelection: Action; setSelectedElements: Action; updateSelection: Action; updateTransform: Action; updateSize: Action; initD3: Action; setSnapGrid: Action; setConnectionPosition: Action; setConnectionSourceId: Action; setInteractive: Action; }, "1">; getListeners: () => import("easy-peasy").ListenerMapper<{ selectedNodesBbox: Rect; d3Zoom: ZoomBehavior | null; d3Selection: D3Selection | null; selection: SelectionRect | null; connectionPosition: XYPosition; onConnect: OnConnectFunc; }, "1">; getMockedActions: () => import("easy-peasy").MockedAction[]; reconfigure: (model: NewStoreModel) => void; removeModel: (key: string) => void; }; export default store;