Braks
39b21faa5b
refactor(types)!: Remove elements prop, change EdgeTypes/NodeTypes prop to string[]
...
* 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 >
2021-11-20 22:10:25 +01:00
Braks
1b6ea1e1b5
update: make types for nodes and edges a computed prop
...
* remove nodeTypesId (was used in react to manually trigger a nodeTypes change)
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 03:28:46 +01:00
Braks
d25fa579e4
fix: suspension not working properly
...
* move invoke to vueflow to suspend
* await dimensions in Node/Edge-wrapper components
* await nodes/edges in renderer
* await elements in VueFlow
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 02:00:37 +01:00
Braks
6a68292f7c
feat: merge store with props
...
* 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 >
2021-11-19 23:45:39 +01:00
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
470ab3782a
update: remove useHooks usage
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 23:17:09 +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
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
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
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
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
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
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
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
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
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
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
aaf5f608f5
feat: add path alias for src
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-06 09:38:02 +01:00
Braks
a8f7cc2389
fix: zoom pane not scaling
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-06 08:54:35 +01:00
Braks
3931a59524
fix(docs): dedupe and add alias for vue
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-06 08:54:35 +01:00
Braks
e99dfc3dd2
update(docs): Add all examples
2021-11-06 08:54:35 +01:00
Braks
61779638ac
update(dist): Remove rollup and use vite to build lib
...
* Remove custom tsconfig paths to avoid resolving issues on published package
2021-11-06 08:54:35 +01:00
Braks
6ec8258f33
fix: typings
2021-10-22 14:29:27 +02:00
Braks
3ee3843af6
fix: Edge updates not triggering properly
...
update(types): Add FlowEvents type
2021-10-22 10:46:12 +02:00
Braks
26b3901bd5
fix: node not updating handlebounds when handle pos changes
...
* watch source & target pos and update node dimensions on next tick
2021-10-22 08:16:32 +02:00
Braks
cd02dd0444
fix: node type change not triggering recalculation of node dimensions
2021-10-21 16:23:23 +02:00
Braks
636eeff9fe
feat: use v-html for node labels
...
* add span tag as wrapper for node labels
feat(examples):
* Add overview example
2021-10-21 15:29:17 +02:00
Braks
ff7ee5c7fe
fix: label type in edges
2021-10-20 23:09:36 +02:00
Braks
2bfecf7148
update: change name to vue flow
...
* Add gif to readme
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-10-20 22:39:54 +02:00
Braks
64a4b8c418
fix: nodes as fragments
...
feat: accept vnode as edge text
2021-10-20 22:39:54 +02:00
Braks
b2b1fe822f
feat: add useStore and useHooks composables that provide default store/hooks
2021-10-20 22:39:54 +02:00
Braks
61dc9dea33
fix: edges and edge anchors not re-calculating correctly
2021-10-20 22:39:54 +02:00
Braks
7ecbcba7eb
fix: edge anchor
2021-10-20 22:39:54 +02:00
Braks
9d9a90e9a7
update: Add slots to CustomConnectionLine.vue, Edge.vue, Node.vue
2021-10-20 22:39:54 +02:00
Braks
6cfe5f6d43
chore(deps): remove unused deps
...
* update deps
* some ts fixes
2021-10-20 22:39:54 +02:00
Braks
17f2517ab4
fix: too many re-render on edges and nodes
2021-10-20 22:39:54 +02:00
Braks
c3fb3cd10a
fix: zoom pan helper
2021-10-20 22:39:54 +02:00
Braks
a895853b64
update: Add injection keys
2021-10-20 22:39:54 +02:00
Braks
a5ae6a4e48
update(deps): Add unplugin-components
...
fix: Excessive rerender of edge texts
update(script-setup): Update some examples
* Remove more jsx files
2021-10-20 22:39:54 +02:00
Braks
1ff3a8dc9c
update(script-setup): Refactor additional-components
...
* Remove jsx files
fix: ConnectionLine.vue not recalculating properly
2021-10-20 22:39:54 +02:00
Braks
560bdc203b
update(script-setup): Refactor remaining files to script setup style
2021-10-20 22:39:54 +02:00
Braks
77eac0c12a
chore(lint): Update eslint rules
...
* Remove semi
2021-10-20 22:39:54 +02:00
Braks
ece1fecbf8
fix(perfomance): Edge updating too much
...
* Edges update constantly even though options aren't really changing
2021-08-17 22:13:24 +02:00
Braks
3f6d49914f
fix: Add measurment (px) to EdgeText width and height
2021-08-17 19:47:05 +02:00
Braks
e4a094017d
feat(example): Add hidden example
...
* Check if node/edge is hidden before rendering
2021-08-16 21:41:16 +02:00
Braks
384c05240f
feat(example): Add edge types example (stress tests)
...
* Remove a lot of computed functions or merge them into existing ones
*
2021-08-16 21:17:38 +02:00
Braks
9e397e6817
fix(example): custom edges not displayed correctly
2021-08-08 19:28:45 +02:00
Braks
6b9c608381
update: edge label bg true by default
2021-08-08 19:28:45 +02:00
Braks
16e93af184
fix: edges not updating text
2021-08-08 19:28:45 +02:00