* graphnode is a node containing internal Vue Flow data
* move util files to util directory
* move flow actions type into store file
* rename panel type file to zoom
* rename types file to flow
* Rename Node to NodeWrapper
* Rename Edge to EdgeWrapper
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
* no more elements prop - v-model instead!
* Instead of passing an object map to components just pass in an array of strings as nodeTypes/edgeTypes object
* the string name will either be resolved to a dynamic component with :is="type" or a slot with the type-name
* update all examples
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
* While the graph is suspended we open up a loading indicator slot
* a prop option has to be passed to enable the indicator
* add some styles for a default loading text
* move loading event to after store has been initialized *and* zoom pane dimensions are present
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
* if options are passed to useVueFlow, we want to merge them with possibly passed props
* renamed flowStore to stateStore
* fix examples
* add store prop to pass an already existing store to flow
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
* Add getter for node/edge types
* change nodeTypes prop type to only Record<string, NodeType> - same for edges
* Add rgb example
* remove v-model for elements
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
* For easier access and to avoid context issues with injections hooks are put into the store
* hooks can be accessed and will emit events when the flow has bound its emit function to the hooks
* useHooks and useStore are not exported anymore! Instead, useVueFlow is provided, which will return an instance of the current vue flow store
* Rename NodeIdContextKey to NodeId
* Add addElements function to store to add elements without having to re-set the whole store
* use v-model for elements, re-set elements only if there's an actual change
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
* Accept either a Record<string, Component | boolean> or string[] as nodetypes option
* If bool / string is used a slot will be expected, otherwise no node/edge will be rendered
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
* Replace jsx with script setup syntax
* Simplify logic and make it more "composable"
* Move Zoom functions to useZoom composable
* Update eslint config & tsconfig