diff --git a/packages/vue-flow/src/auto-imports.d.ts b/packages/vue-flow/src/auto-imports.d.ts index a1450201..00f2b321 100644 --- a/packages/vue-flow/src/auto-imports.d.ts +++ b/packages/vue-flow/src/auto-imports.d.ts @@ -1,13 +1,14 @@ // Generated by 'unplugin-auto-import' -// We suggest you to commit this file into source control +export {} declare global { - const $: typeof import('vue/macros')['$'] const $$: typeof import('vue/macros')['$$'] + const $: typeof import('vue/macros')['$'] const $computed: typeof import('vue/macros')['$computed'] const $customRef: typeof import('vue/macros')['$customRef'] const $ref: typeof import('vue/macros')['$ref'] const $shallowRef: typeof import('vue/macros')['$shallowRef'] const $toRef: typeof import('vue/macros')['$toRef'] + const EffectScope: typeof import('vue')['EffectScope'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] const computed: typeof import('vue')['computed'] @@ -31,7 +32,6 @@ declare global { const defineComponent: typeof import('vue')['defineComponent'] const eagerComputed: typeof import('@vueuse/core')['eagerComputed'] const effectScope: typeof import('vue')['effectScope'] - const EffectScope: typeof import('vue')['EffectScope'] const extendRef: typeof import('@vueuse/core')['extendRef'] const getCurrentInstance: typeof import('vue')['getCurrentInstance'] const getCurrentScope: typeof import('vue')['getCurrentScope'] @@ -39,6 +39,8 @@ declare global { const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch'] const inject: typeof import('vue')['inject'] const isDefined: typeof import('@vueuse/core')['isDefined'] + const isProxy: typeof import('vue')['isProxy'] + const isReactive: typeof import('vue')['isReactive'] const isReadonly: typeof import('vue')['isReadonly'] const isRef: typeof import('vue')['isRef'] const logicAnd: typeof import('@vueuse/core')['logicAnd'] @@ -124,8 +126,8 @@ declare global { const useDark: typeof import('@vueuse/core')['useDark'] const useDateFormat: typeof import('@vueuse/core')['useDateFormat'] const useDebounce: typeof import('@vueuse/core')['useDebounce'] - const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory'] const useDebounceFn: typeof import('@vueuse/core')['useDebounceFn'] + const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory'] const useDeviceMotion: typeof import('@vueuse/core')['useDeviceMotion'] const useDeviceOrientation: typeof import('@vueuse/core')['useDeviceOrientation'] const useDevicePixelRatio: typeof import('@vueuse/core')['useDevicePixelRatio'] @@ -204,8 +206,8 @@ declare global { const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList'] const useTextSelection: typeof import('@vueuse/core')['useTextSelection'] const useThrottle: typeof import('@vueuse/core')['useThrottle'] - const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory'] const useThrottleFn: typeof import('@vueuse/core')['useThrottleFn'] + const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory'] const useTimeAgo: typeof import('@vueuse/core')['useTimeAgo'] const useTimeout: typeof import('@vueuse/core')['useTimeout'] const useTimeoutFn: typeof import('@vueuse/core')['useTimeoutFn'] @@ -216,10 +218,10 @@ declare global { const useTransition: typeof import('@vueuse/core')['useTransition'] const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams'] const useUserMedia: typeof import('@vueuse/core')['useUserMedia'] - const useVibrate: typeof import('@vueuse/core')['useVibrate'] - const useVirtualList: typeof import('@vueuse/core')['useVirtualList'] const useVModel: typeof import('@vueuse/core')['useVModel'] const useVModels: typeof import('@vueuse/core')['useVModels'] + const useVibrate: typeof import('@vueuse/core')['useVibrate'] + const useVirtualList: typeof import('@vueuse/core')['useVirtualList'] const useWakeLock: typeof import('@vueuse/core')['useWakeLock'] const useWebNotification: typeof import('@vueuse/core')['useWebNotification'] const useWebSocket: typeof import('@vueuse/core')['useWebSocket'] @@ -235,8 +237,9 @@ declare global { const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable'] const watchOnce: typeof import('@vueuse/core')['watchOnce'] const watchPausable: typeof import('@vueuse/core')['watchPausable'] + const watchPostEffect: typeof import('vue')['watchPostEffect'] + const watchSyncEffect: typeof import('vue')['watchSyncEffect'] const watchThrottled: typeof import('@vueuse/core')['watchThrottled'] const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter'] const whenever: typeof import('@vueuse/core')['whenever'] } -export {} diff --git a/packages/vue-flow/src/composables/useVueFlow.ts b/packages/vue-flow/src/composables/useVueFlow.ts index 659edd25..9c6808b9 100644 --- a/packages/vue-flow/src/composables/useVueFlow.ts +++ b/packages/vue-flow/src/composables/useVueFlow.ts @@ -135,7 +135,7 @@ export default (options?: FlowProps): VueFlowStore => { provide(VueFlow, vueFlow) // dispose of state values and storage entry - onScopeDispose(() => { + tryOnScopeDispose(() => { if (storage.get(vueFlow!.id)) { storage.remove(vueFlow!.id) } diff --git a/packages/vue-flow/src/container/VueFlow/VueFlow.vue b/packages/vue-flow/src/container/VueFlow/VueFlow.vue index 9db1c779..fcb6bac8 100644 --- a/packages/vue-flow/src/container/VueFlow/VueFlow.vue +++ b/packages/vue-flow/src/container/VueFlow/VueFlow.vue @@ -1,9 +1,23 @@