Braks
37388ddf47
feat(types): Add NodeTypes and EdgeTypes
...
* Interface for passing an object of NodeTypes/EdgeTypes
* Object needs to be passed with components markedRaw
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 17:47:57 +01:00
Braks
8c4747a8a9
update: move watcher to onMounted hook
...
* remove default values for nodes edges from initial store
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 16:51:40 +01:00
Braks
ee95fbe34a
update(examples): rgb flow styles
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 15:41:25 +01:00
Braks
f92c5462bf
update: a couple more perfomance related updates
...
* check for selected value inside Node instead of the wrapping renderer
* instead of "parsing" elements just return the current store.elements object
* use map funct to find index
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 15:41:00 +01:00
Braks
08b9afb502
v0.0.29
2021-11-19 13:56:41 +01:00
Braks
3f139dffee
update: add default null value to injections
...
* "disables" warnings about injection not being found
* we assume that the injection can be undefined, so we don't need to be spammed about missing injections
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 13:55:42 +01:00
Braks
9c0e293d82
v0.0.28
2021-11-19 13:50:08 +01:00
Braks
f99dca1c11
update(examples): Use vmodel for custom node
...
* use v-model for save & restore example
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 13:47:09 +01:00
Braks
054e71a609
feat: Add instance to store
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 13:46:37 +01:00
Braks
e93da64c70
feat: v-model for elements
...
* add vmodel for elements and a new modelValue prop (which should replace the elements prop further along the road to avoid confusion)
*
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 13:46:17 +01:00
Braks
b91d65fd3a
fix: storage not properly preloading
...
* Add elements to store state when using addElements action
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 13:42:41 +01:00
Braks
48da1eccba
update: merge props with state objects
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 02:44:48 +01:00
Braks
5e399a6cc1
v0.0.27
2021-11-19 02:14:56 +01:00
Braks
f534572cef
fix!: v-model implemented again
...
* fix store usage
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 02:13:47 +01:00
Braks
95550b3c1f
v0.0.26
2021-11-19 01:56:07 +01:00
Braks
8605909f5d
feat: export default edge and node types object
...
* set isReady after load-hook trigger
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 01:55:48 +01:00
Braks
70b077a1f5
fix!: props and composable not merging together properly
...
* 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 >
2021-11-19 01:43:07 +01:00
Braks
c8d3ff6a29
update: add return type to useVueFlow default export
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 23:42:37 +01:00
Braks
de934732c1
v0.0.25
2021-11-18 23:17:35 +01:00
Braks
470ab3782a
update: remove useHooks usage
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 23:17:09 +01:00
Braks
99dbd4b2cc
feat!: Add hooks to store
...
* 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 >
2021-11-18 21:24:20 +01:00
Braks
0cca54e7e2
v0.0.24
2021-11-18 18:20:51 +01:00
Braks
3e24a3585a
update: mini map to accept node slot instead of "nodes" slot
...
* some type updates
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 18:17:00 +01:00
Braks
a493168daf
feat: Add useVueFlow composable
...
* Allows for use of the vue flow instance without having to listen to the onLoad event
* fix usekeypress export
* Add types for controls events
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 18:04:50 +01:00
Braks
e98be05d41
v0.0.23
2021-11-18 15:33:51 +01:00
Braks
6bcd708234
fix: default value for label
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 15:33:36 +01:00
Braks
156287b9d2
chore(deps): update deps
...
* replace fast-deep-equal with microdiff
* remove localforage (using useStorage instead)
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 15:29:50 +01:00
Braks
90a2a6544d
update(zoom): remove watcher and use until
...
* wait until height and width are set for zoom pane to trigger load hook
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 14:32:30 +01:00
Braks
60327c4ca0
update(zoom): clamp transform values
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 14:14:05 +01:00
Braks
14980e38b7
feat: Add suspensions to node, noderenderer and around zoom-pane
...
* bind zoompanhelper functions to zoom-pane slot
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 14:08:46 +01:00
Braks
54dfd8498b
feat: add zoom-pane slot
...
* if the user wants to pass a slot into zoom pane
* props are the current width/height and transform values
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 13:40:51 +01:00
Braks
0be492b7c6
feat: bind props to slots
...
* bind props to slots in edges, handle, nodes
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 13:40:06 +01:00
Braks
b2d124ef7a
v0.0.22
2021-11-18 03:24:42 +01:00
Braks
b918eb6b89
fix: event propagation from zoom
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 03:23:36 +01:00
Braks
6353f156b9
v0.0.21
2021-11-18 03:20:06 +01:00
Braks
8b82c4fb33
feat: Add slots to edges and nodes
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 03:19:13 +01:00
Braks
f22a3baa90
v0.0.20
2021-11-18 03:08:02 +01:00
Braks
812a7da2fe
fix: move slots outside of zoom pane
...
* avoids zoom gesture events bubbling to zoom pane and causing elements over flow to trigger zoom when they shouldn't
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 03:06:21 +01:00
Braks
091ed3eeb4
update(docs): quickstart example in README.md
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 17:10:47 +01:00
Braks
1deb41766b
chore(deps): update revue-draggable to v0.3.4
...
* fix import path of utils in NodesSelection.vue
* remove scale (bug)
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 16:07:56 +01:00
Braks
03734364a0
v0.0.19
2021-11-17 10:05:41 +01:00
Braks
43ce52347c
update: invoke until func in zoom pane
...
* instead of using .then cb we use the invoke func to call the async await and wait for the zoomPaneEl
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 10:04:28 +01:00
Braks
872ad1d05b
revert: inject necessary styles directly to bundle
...
* Causes delayed stylings which gives a bad UE
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 09:49:26 +01:00
Braks
e9b3265c35
v0.0.18
2021-11-17 09:45:07 +01:00
Braks
954722aac2
feat(zoom): Add suspension to zoom pane
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 09:44:26 +01:00
Braks
68e44adea6
update(docs): README.md
...
* add css import to example
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 09:36:23 +01:00
Braks
7b9ca28505
v0.0.17
2021-11-17 09:34:43 +01:00
Braks
074d284a8e
feat: inject necessary styles directly to bundle
...
* add vite plugin css injected by js
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 09:33:21 +01:00
Braks
688c0954e4
update: change docs url
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 02:24:48 +01:00
Braks
c7f735d933
v0.0.16
2021-11-17 01:40:36 +01:00
Braks
10215b4631
update: create vue.d.ts files
...
* add vue-tsc to emit d.ts files from vue components
* use absolute paths in components
* avoids conflicts with ts custom paths in vue-tsc generated vue.d.ts files
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 01:39:50 +01:00
Braks
a21238f9aa
v0.0.15
2021-11-17 00:48:14 +01:00
Braks
23ad66dd75
update: hide edges with v-show instead of v-if
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 00:46:43 +01:00
Braks
677c9a8b5e
fix: properly check if node is connectable/draggable/connectable
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 00:45:43 +01:00
Braks
6b4cb9e937
update(docs): README.md
...
* minor updates in zoompane and interaction example
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 00:35:21 +01:00
Braks
e05e546671
v0.0.14
2021-11-16 23:20:57 +01:00
Braks
694dc7e691
fix: node dimensions not updating properly
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 23:20:06 +01:00
Braks
3b4e164511
v0.0.13
2021-11-16 20:05:03 +01:00
Braks
9b604e7628
fix: pass props to store state
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 20:04:00 +01:00
Braks
808c6b17e0
fix: remove force-update from node
...
* update dimensions directly, not on next tick
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 20:00:09 +01:00
Braks
93730a7b98
update: count store id gradually up instead of "randomizing" one
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 19:59:44 +01:00
Braks
0bde39fa40
v0.0.12
2021-11-16 19:04:47 +01:00
Braks
e1e656ccf2
update: export default nodes and edges
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 19:04:35 +01:00
Braks
2d730cf3fe
v0.0.11
2021-11-16 17:55:58 +01:00
Braks
6c2bdcdae6
fix(types): remove sourceX/Y, targetX/Y attributes from edge type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 17:55:14 +01:00
Braks
fc19ddec46
v0.0.10
2021-11-16 17:47:08 +01:00
Braks
413c7ac688
update(types!): Merge EdgeProps into Edge type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 17:45:01 +01:00
Braks
525a1880b6
v0.0.9
2021-11-16 16:04:29 +01:00
Braks
a58d952e9f
fix: disable inherting attrs on nodes/edges to avoid warnings
...
* disable context warnings for non-dev environments
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 16:01:44 +01:00
Braks
63f710e422
update(docs): README.md
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 15:44:24 +01:00
Braks
a0921859ce
v0.0.8
2021-11-16 13:35:24 +01:00
Braks
4fb55aba68
fix: cancel keypress for input dom nodes
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 13:34:21 +01:00
Braks
b077241625
fix: missing script lang in README.md
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 13:11:44 +01:00
Braks
e560cdd257
v0.0.7
2021-11-16 13:08:28 +01:00
Braks
8414ee1ac1
update: remove js files after declaration generation
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 13:08:18 +01:00
Braks
476a5aa09b
fix: type in usehooks
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 13:06:54 +01:00
Braks
490983bebe
fix: todo in useHandle
...
* edge update end only emits the mouse event, not the edge
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 13:04:55 +01:00
Braks
7c66cf5d9b
update!: Remove update node internals composable
...
* It's practically useless as vue doesn't need the trigger to catch a re-render
* Remove unused types
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 12:58:16 +01:00
Braks
b8c8142dc4
v0.0.6
2021-11-16 10:01:06 +01:00
Braks
d1dab4cda8
feat: Extend options to pass custom nodes / edges
...
* 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 >
2021-11-16 09:43:17 +01:00
Braks
d9e310403c
v0.0.5
2021-11-16 09:06:19 +01:00
Braks
65b73d3f7b
update: Transform d.ts file paths to resolve correctly
...
* Add typescript-transform-paths plugin as dev-dep
* Add ts-patch as dev-dep
* Use tsc instead of vue-tsc to build declaration files
* Update tsconfig.json to emit declaration and use transform plugin
* Remove vue-tsc from dev-deps
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 09:04:42 +01:00
Braks
7c72507234
update(docs): README.md
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 21:18:58 +01:00
Braks
814212e369
v0.0.4
2021-11-15 21:04:57 +01:00
Braks
30d667bf83
update: remove umd build
...
* default to es
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 21:04:12 +01:00
Braks
eeb604715f
v0.0.3
2021-11-15 20:57:46 +01:00
Braks
b5e56f85bd
update: switch to umd build
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 20:57:08 +01:00
Braks
9dc8c09ebe
v0.0.2
2021-11-15 20:37:48 +01:00
Braks
0a55693fb1
update(docs): README.md
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 20:35:26 +01:00
Braks
ffdadda051
update!: Rename Flow container to VueFlow
...
* Export renamed to VueFlow
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 20:34:02 +01:00
Braks
98d7053951
update(docs): Remove docs dir
...
* Docs are in a dedicated repo now
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 20:07:03 +01:00
Braks
dec2774145
update(edge): hide edge if source/target pos are NaN-ish
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 14:31:54 +01:00
Braks
d6ee5f8868
fix: wrong watch source in nodes
...
* causes console warnings
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 12:50:03 +01:00
Braks
9c3eeef5eb
fix: warnings when NaN values are passed to svg transformations
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 12:44:09 +01:00
Braks
3705a39fa8
refactor: perfomance optimisations through less dependency tracking
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 11:22:56 +01:00
Braks
482a1aa4af
fix(examples): Proper events for listeners
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 10:43:58 +01:00
Braks
4d7712fdb2
v0.0.1
2021-11-06 17:04:31 +01:00
Braks
9f329c8802
feat(docs): Add docs index page
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-06 15:42:05 +01:00
Braks
066155b9f7
feat: copy default theme css file separately to dist
...
* to enable overwriting the default theme export it separately
* add rollup plugin copy for copying the css file
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-06 15:42:05 +01:00
Braks
1b0602dcce
update(docs): README.md
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-06 15:42:05 +01:00