refactor(core): add explicit imports and remove auto-imports

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-05-25 20:48:26 +02:00
committed by Braks
parent 5a86c7cf1d
commit e3e6a03359
63 changed files with 328 additions and 508 deletions
+5 -1
View File
@@ -1,4 +1,8 @@
import { computed, inject } from 'vue'
import { useVueFlow } from './useVueFlow'
import type { CustomEvent, ElementData } from '~/types'
import { NodeId, NodeRef } from '~/context'
import { ErrorCode, VueFlowError, getConnectedEdges } from '~/utils'
/**
* Access a node, it's parent (if one exists) and connected edges
@@ -7,7 +11,7 @@ import type { CustomEvent, ElementData } from '~/types'
*
* Meaning if you do not provide an id, this composable has to be called in a child of your custom node component, or it will throw
*/
export default function useNode<Data = ElementData, CustomEvents extends Record<string, CustomEvent> = any>(id?: string) {
export function useNode<Data = ElementData, CustomEvents extends Record<string, CustomEvent> = any>(id?: string) {
const nodeId = id ?? inject(NodeId, '')
const nodeEl = inject(NodeRef, null)