fix: try to deploy as package...

This commit is contained in:
Braks
2021-07-09 21:54:05 +02:00
parent 5eff860573
commit 99548a0dba
39 changed files with 161 additions and 120 deletions
+14 -4
View File
@@ -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;