chore(core): remove MaybeRefOrGetter util type and use MaybeComputedRef
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -2,8 +2,8 @@ import type { D3DragEvent, DragBehavior, SubjectPosition } from 'd3-drag'
|
||||
import { drag } from 'd3-drag'
|
||||
import { select } from 'd3-selection'
|
||||
import type { Ref } from 'vue'
|
||||
import type { MaybeComputedRef } from '@vueuse/core'
|
||||
import type { NodeDragEvent, NodeDragItem, XYPosition } from '~/types'
|
||||
import type { MaybeRefOrGetter } from '~/types/utils'
|
||||
|
||||
export type UseDragEvent = D3DragEvent<HTMLDivElement, null, SubjectPosition>
|
||||
|
||||
@@ -12,8 +12,8 @@ interface UseDragParams {
|
||||
onDrag: (event: Omit<NodeDragEvent, 'intersections'>) => void
|
||||
onStop: (event: Omit<NodeDragEvent, 'intersections'>) => void
|
||||
el: Ref<Element | undefined>
|
||||
disabled?: MaybeRefOrGetter<boolean>
|
||||
selectable?: MaybeRefOrGetter<boolean>
|
||||
disabled?: MaybeComputedRef<boolean>
|
||||
selectable?: MaybeComputedRef<boolean>
|
||||
id?: string
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import type { MaybeComputedRef } from '@vueuse/core'
|
||||
import type { Connection, ConnectionHandle, HandleType, MouseTouchEvent, ValidConnectionFunc } from '~/types'
|
||||
import type { MaybeRefOrGetter } from '~/types/utils'
|
||||
|
||||
interface UseHandleProps {
|
||||
handleId: MaybeRefOrGetter<string | null>
|
||||
nodeId: MaybeRefOrGetter<string>
|
||||
type: MaybeRefOrGetter<HandleType>
|
||||
handleId: MaybeComputedRef<string | null>
|
||||
nodeId: MaybeComputedRef<string>
|
||||
type: MaybeComputedRef<HandleType>
|
||||
isValidConnection?: ValidConnectionFunc | null
|
||||
edgeUpdaterType?: MaybeRefOrGetter<HandleType>
|
||||
edgeUpdaterType?: MaybeComputedRef<HandleType>
|
||||
onEdgeUpdate?: (event: MouseTouchEvent, connection: Connection) => void
|
||||
onEdgeUpdateEnd?: (event: MouseTouchEvent) => void
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import type { MaybeRef } from '@vueuse/core'
|
||||
|
||||
export type MaybeRefOrGetter<T> = MaybeRef<T> | (() => T)
|
||||
Reference in New Issue
Block a user