fix: try to deploy as package...
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
import { defineStore, StoreDefinition } from 'pinia';
|
||||
import { createPinia, defineStore, StoreDefinition } from 'pinia';
|
||||
import isEqual from 'fast-deep-equal';
|
||||
import { Edge, Node, NodeDiffUpdate, ReactFlowState, RevueFlowActionsTree, XYPosition } from '../types';
|
||||
import { getConnectedEdges, getNodesInside, getRectOfNodes, isEdge, isNode, parseEdge, parseNode } from '../utils/graph';
|
||||
import {
|
||||
getConnectedEdges,
|
||||
getNodesInside,
|
||||
getRectOfNodes,
|
||||
isEdge,
|
||||
isNode,
|
||||
parseEdge,
|
||||
parseNode
|
||||
} from '../utils/graph';
|
||||
import { clampPosition, getDimensions } from '../utils';
|
||||
import { getHandleBounds } from '../components/Nodes/utils';
|
||||
import { provide } from 'vue-demi';
|
||||
|
||||
type NextElements = {
|
||||
nextNodes: Node[];
|
||||
@@ -13,6 +22,7 @@ type NextElements = {
|
||||
export default function configureStore(
|
||||
preloadedState: ReactFlowState
|
||||
): StoreDefinition<'revue-flow', ReactFlowState, any, RevueFlowActionsTree> {
|
||||
provide(Symbol('pinia'), createPinia());
|
||||
return defineStore({
|
||||
id: 'revue-flow',
|
||||
state: () => preloadedState,
|
||||
@@ -189,8 +199,8 @@ export default function configureStore(
|
||||
const selectedElementsChanged = !isEqual(nextSelectedElements, this.selectedElements);
|
||||
const selectedElementsUpdate = selectedElementsChanged
|
||||
? {
|
||||
selectedElements: nextSelectedElements.length > 0 ? nextSelectedElements : null
|
||||
}
|
||||
selectedElements: nextSelectedElements.length > 0 ? nextSelectedElements : null
|
||||
}
|
||||
: {};
|
||||
|
||||
this.userSelectionRect = nextUserSelectRect;
|
||||
|
||||
Reference in New Issue
Block a user