refactor: use injected store so we can use a distinct instance not a global one

This commit is contained in:
Braks
2021-07-13 16:13:15 +02:00
parent 8f727a4d93
commit 6c9d88b09d
13 changed files with 327 additions and 217 deletions
+4 -1
View File
@@ -1,5 +1,6 @@
import { Selection as D3Selection, ZoomBehavior } from 'd3';
import { Component, HTMLAttributes, PropType, VNode } from 'vue';
import { Store } from 'pinia';
export type ElementId = string;
@@ -869,7 +870,7 @@ export interface RevueFlowState {
onConnectEnd?: OnConnectEndFunc;
}
export type RevueFlowActionsTree = {
export type RevueFlowActions = {
setOnConnect: (onConnect: OnConnectFunc) => void;
setOnConnectStart: (onConnectStart: OnConnectStartFunc) => void;
setOnConnectStop: (onConnectStop: OnConnectStopFunc) => void;
@@ -903,4 +904,6 @@ export type RevueFlowActionsTree = {
setConnectionMode: (connectionMode: ConnectionMode) => void;
};
export type RevueFlowStore = Store<string, RevueFlowState, any, RevueFlowActions>;
export type UpdateNodeInternals = (nodeId: ElementId) => void;