Skip to content

Commit e5a8465

Browse files
committed
refactor(core): replace vueuse imports with vue
1 parent c24287d commit e5a8465

File tree

11 files changed

+21
-28
lines changed

11 files changed

+21
-28
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 type { TeleportProps } from 'vue'
44
import { useVueFlow } from '../../composables'
55

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/components/Nodes/NodeWrapper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { computed, defineComponent, h, nextTick, onBeforeUnmount, onMounted, provide, ref, watch } from 'vue'
2-
import { toRef, until, useVModel } from '@vueuse/core'
1+
import { computed, defineComponent, h, nextTick, onBeforeUnmount, onMounted, provide, ref, toRef, watch } from 'vue'
2+
import { until, useVModel } from '@vueuse/core'
33
import {
44
ARIA_NODE_DESC_KEY,
55
arrowKeyDiffs,

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 type { NodeDragEvent, NodeDragItem, XYPosition } from '../types'
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 type { Connection, ConnectionHandle, HandleType, MouseTouchEvent, ValidConnectionFunc } from '../types'
44
import {
55
calcAutoPan,

packages/core/src/composables/useHandleConnections.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import type { ComputedRef } from 'vue'
2-
import { computed, ref, watch } from 'vue'
3-
import type { MaybeRefOrGetter } from '@vueuse/core'
4-
import { toRef, toValue } from '@vueuse/core'
1+
import type { ComputedRef, MaybeRefOrGetter } from 'vue'
2+
import { computed, ref, toRef, toValue, watch } from 'vue'
53
import type { Connection, HandleType } from '../types'
64
import { areConnectionMapsEqual, handleConnectionChange } from '../utils'
75
import { useNodeId } from './useNodeId'

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/useNodesData.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import type { ComputedRef } from 'vue'
2-
import { computed } from 'vue'
3-
import type { MaybeRefOrGetter } from '@vueuse/core'
4-
import { toValue } from '@vueuse/core'
1+
import type { ComputedRef, MaybeRefOrGetter } from 'vue'
2+
import { computed, toValue } from 'vue'
53
import type { GraphNode, Node } from '../types'
64
import { useVueFlow } from './useVueFlow'
75

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, isRef, nextTick, onScopeDispose, watch } from 'vue'
2+
import { effectScope, isRef, 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'

0 commit comments

Comments
 (0)