Skip to content

Commit 7cc798a

Browse files
committed
chore(core): cleanup imports from vueuse/core that exist in vue
1 parent e54b36a commit 7cc798a

File tree

8 files changed

+16
-18
lines changed

8 files changed

+16
-18
lines changed

packages/core/src/components/Edges/EdgeLabelRenderer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts" setup>
2-
import { toRef } from '@vueuse/core'
2+
import { toRef } from 'vue'
33
import { useVueFlow } from '../../composables'
44
55
const { viewportRef } = useVueFlow()

packages/core/src/components/Handle/Handle.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts" setup>
2-
import { toRef, until } from '@vueuse/core'
3-
import { computed, onUnmounted, ref } from 'vue'
2+
import { until } from '@vueuse/core'
3+
import { computed, onUnmounted, ref, toRef } from 'vue'
44
import type { HandleProps } from '../../types/handle'
55
import { Position } from '../../types'
66
import { useHandle, useNode, useVueFlow } from '../../composables'

packages/core/src/composables/useDrag.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import type { D3DragEvent, DragBehavior, SubjectPosition } from 'd3-drag'
22
import { drag } from 'd3-drag'
33
import { select } from 'd3-selection'
4-
import type { Ref } from 'vue'
5-
import { ref, watch } from 'vue'
6-
import type { MaybeRefOrGetter } from '@vueuse/core'
7-
import { toValue } from '@vueuse/core'
4+
import type { MaybeRefOrGetter, Ref } from 'vue'
5+
import { ref, toValue, watch } from 'vue'
86
import { useGetPointerPosition, useVueFlow } from '.'
97
import {
108
calcAutoPan,

packages/core/src/composables/useHandle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { MaybeRefOrGetter } from '@vueuse/core'
2-
import { toValue } from '@vueuse/core'
1+
import type { MaybeRefOrGetter } from 'vue'
2+
import { toValue } from 'vue'
33
import { useVueFlow } from './useVueFlow'
44
import type { Connection, ConnectionHandle, HandleType, MouseTouchEvent, ValidConnectionFunc } from '~/types'
55
import {

packages/core/src/composables/useKeyPress.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { ref, watch } from 'vue'
2-
import type { KeyFilter, KeyPredicate, MaybeRefOrGetter } from '@vueuse/core'
3-
import { onKeyStroke, toValue, useEventListener } from '@vueuse/core'
1+
import type { MaybeRefOrGetter } from 'vue'
2+
import { ref, toValue, watch } from 'vue'
3+
import type { KeyFilter, KeyPredicate } from '@vueuse/core'
4+
import { onKeyStroke, useEventListener } from '@vueuse/core'
45
import { useWindow } from './useWindow'
56

67
export function isInputDOMNode(event: KeyboardEvent): boolean {

packages/core/src/composables/useWatchProps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ToRefs } from 'vue'
2-
import { effectScope, nextTick, onScopeDispose, watch } from 'vue'
2+
import { effectScope, nextTick, onScopeDispose, toRef, watch } from 'vue'
33
import type { WatchPausableReturn } from '@vueuse/core'
4-
import { toRef, watchPausable } from '@vueuse/core'
4+
import { watchPausable } from '@vueuse/core'
55
import type { Connection, FlowProps, VueFlowStore } from '~/types'
66
import { isDef } from '~/utils'
77

packages/core/src/container/Pane/Pane.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script lang="ts" setup>
2-
import { ref } from 'vue'
3-
import { toRef } from '@vueuse/core'
2+
import { ref, toRef } from 'vue'
43
import UserSelection from '../../components/UserSelection/UserSelection.vue'
54
import NodesSelection from '../../components/NodesSelection/NodesSelection.vue'
65
import type { GraphNode } from '../../types'

packages/core/src/container/Viewport/Viewport.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import type { D3ZoomEvent, ZoomTransform } from 'd3-zoom'
33
import { zoom, zoomIdentity } from 'd3-zoom'
44
import { pointer, select } from 'd3-selection'
5-
import { onMounted, ref, watchEffect } from 'vue'
6-
import { toRef, useEventListener, useResizeObserver } from '@vueuse/core'
5+
import { onMounted, ref, toRef, watchEffect } from 'vue'
6+
import { useEventListener, useResizeObserver } from '@vueuse/core'
77
import type { CoordinateExtent, D3ZoomHandler, FlowOptions, ViewportTransform } from '../../types'
88
import { PanOnScrollMode } from '../../types'
99
import { useKeyPress, useVueFlow, useWindow } from '../../composables'

0 commit comments

Comments
 (0)