chore: update deps

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 128b968168
commit 5a86c7cf1d
16 changed files with 878 additions and 732 deletions
+8 -8
View File
@@ -68,7 +68,7 @@
"vue": "^3.2.25" "vue": "^3.2.25"
}, },
"dependencies": { "dependencies": {
"@vueuse/core": "^9.13.0", "@vueuse/core": "^10.1.2",
"d3-drag": "^3.0.0", "d3-drag": "^3.0.0",
"d3-selection": "^3.0.0", "d3-selection": "^3.0.0",
"d3-zoom": "^3.0.0" "d3-zoom": "^3.0.0"
@@ -78,18 +78,18 @@
"@types/d3": "^7.4.0", "@types/d3": "^7.4.0",
"@tooling/eslint-config": "workspace:*", "@tooling/eslint-config": "workspace:*",
"@tooling/tsconfig": "workspace:*", "@tooling/tsconfig": "workspace:*",
"@vitejs/plugin-vue": "^4.0.0", "@vitejs/plugin-vue": "^4.2.1",
"autoprefixer": "^10.4.13", "autoprefixer": "^10.4.14",
"postcss": "^8.4.21", "postcss": "^8.4.23",
"postcss-cli": "^10.1.0", "postcss-cli": "^10.1.0",
"postcss-nested": "^6.0.1", "postcss-nested": "^6.0.1",
"ts-patch": "^2.1.0", "ts-patch": "^2.1.0",
"typescript-transform-paths": "^3.4.6", "typescript-transform-paths": "^3.4.6",
"unplugin-auto-import": "^0.12.2", "unplugin-auto-import": "0.12.2",
"unplugin-vue-macros": "1.8.2", "unplugin-vue-macros": "^2.1.3",
"vite": "^4.1.4", "vite": "^4.3.5",
"vue": "^3.2.25", "vue": "^3.2.25",
"vue-tsc": "^1.2.0" "vue-tsc": "^1.6.4"
}, },
"publishConfig": { "publishConfig": {
"access": "public", "access": "public",
+22 -2
View File
@@ -1,4 +1,7 @@
// Generated by 'unplugin-auto-import' /* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-auto-import
export {} export {}
declare global { declare global {
const $$: typeof import('vue/macros')['$$'] const $$: typeof import('vue/macros')['$$']
@@ -52,8 +55,10 @@ declare global {
const createInjectionState: typeof import('@vueuse/core')['createInjectionState'] const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn'] const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
const createRemoveChange: typeof import('./utils/changes')['createRemoveChange'] const createRemoveChange: typeof import('./utils/changes')['createRemoveChange']
const createReusableTemplate: typeof import('@vueuse/core')['createReusableTemplate']
const createSelectionChange: typeof import('./utils/changes')['createSelectionChange'] const createSelectionChange: typeof import('./utils/changes')['createSelectionChange']
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable'] const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
const createTemplatePromise: typeof import('@vueuse/core')['createTemplatePromise']
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn'] const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
const customRef: typeof import('vue')['customRef'] const customRef: typeof import('vue')['customRef']
const debouncedRef: typeof import('@vueuse/core')['debouncedRef'] const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
@@ -108,21 +113,25 @@ declare global {
const hasSelector: typeof import('./utils/drag')['hasSelector'] const hasSelector: typeof import('./utils/drag')['hasSelector']
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch'] const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
const inject: typeof import('vue')['inject'] const inject: typeof import('vue')['inject']
const isBoolean: typeof import('./utils/general')['isBoolean']
const isDef: typeof import('./utils/store')['isDef'] const isDef: typeof import('./utils/store')['isDef']
const isDefined: typeof import('@vueuse/core')['isDefined'] const isDefined: typeof import('@vueuse/core')['isDefined']
const isEdge: typeof import('./utils/graph')['isEdge'] const isEdge: typeof import('./utils/graph')['isEdge']
const isEdgeVisible: typeof import('./utils/edge')['isEdgeVisible'] const isEdgeVisible: typeof import('./utils/edge')['isEdgeVisible']
const isFunction: typeof import('./utils/general')['isFunction']
const isGraphEdge: typeof import('./utils/graph')['isGraphEdge'] const isGraphEdge: typeof import('./utils/graph')['isGraphEdge']
const isGraphNode: typeof import('./utils/graph')['isGraphNode'] const isGraphNode: typeof import('./utils/graph')['isGraphNode']
const isInputDOMNode: typeof import('./composables/useKeyPress')['isInputDOMNode'] const isInputDOMNode: typeof import('./composables/useKeyPress')['isInputDOMNode']
const isMouseEvent: typeof import('./utils/general')['isMouseEvent'] const isMouseEvent: typeof import('./utils/general')['isMouseEvent']
const isNode: typeof import('./utils/graph')['isNode'] const isNode: typeof import('./utils/graph')['isNode']
const isNumber: typeof import('./utils/general')['isNumber']
const isParentSelected: typeof import('./utils/graph')['isParentSelected'] const isParentSelected: typeof import('./utils/graph')['isParentSelected']
const isProxy: typeof import('vue')['isProxy'] const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive'] const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly'] const isReadonly: typeof import('vue')['isReadonly']
const isRect: typeof import('./utils/graph')['isRect'] const isRect: typeof import('./utils/graph')['isRect']
const isRef: typeof import('vue')['isRef'] const isRef: typeof import('vue')['isRef']
const isString: typeof import('./utils/general')['isString']
const isValidHandle: typeof import('./utils/handle')['isValidHandle'] const isValidHandle: typeof import('./utils/handle')['isValidHandle']
const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable'] const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable']
const markRaw: typeof import('vue')['markRaw'] const markRaw: typeof import('vue')['markRaw']
@@ -167,7 +176,6 @@ declare global {
const rendererPointToPoint: typeof import('./utils/graph')['rendererPointToPoint'] const rendererPointToPoint: typeof import('./utils/graph')['rendererPointToPoint']
const resetRecentHandle: typeof import('./utils/handle')['resetRecentHandle'] const resetRecentHandle: typeof import('./utils/handle')['resetRecentHandle']
const resolveComponent: typeof import('vue')['resolveComponent'] const resolveComponent: typeof import('vue')['resolveComponent']
const resolveDirective: typeof import('vue')['resolveDirective']
const resolveRef: typeof import('@vueuse/core')['resolveRef'] const resolveRef: typeof import('@vueuse/core')['resolveRef']
const resolveUnref: typeof import('@vueuse/core')['resolveUnref'] const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
const shallowReactive: typeof import('vue')['shallowReactive'] const shallowReactive: typeof import('vue')['shallowReactive']
@@ -195,11 +203,14 @@ declare global {
const updateEdgeAction: typeof import('./utils/store')['updateEdgeAction'] const updateEdgeAction: typeof import('./utils/store')['updateEdgeAction']
const useActions: typeof import('./store/actions')['useActions'] const useActions: typeof import('./store/actions')['useActions']
const useActiveElement: typeof import('@vueuse/core')['useActiveElement'] const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
const useAnimate: typeof import('@vueuse/core')['useAnimate']
const useArrayDifference: typeof import('@vueuse/core')['useArrayDifference']
const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery'] const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter'] const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
const useArrayFind: typeof import('@vueuse/core')['useArrayFind'] const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex'] const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast'] const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast']
const useArrayIncludes: typeof import('@vueuse/core')['useArrayIncludes']
const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin'] const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
const useArrayMap: typeof import('@vueuse/core')['useArrayMap'] const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce'] const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
@@ -295,6 +306,8 @@ declare global {
const useOnline: typeof import('@vueuse/core')['useOnline'] const useOnline: typeof import('@vueuse/core')['useOnline']
const usePageLeave: typeof import('@vueuse/core')['usePageLeave'] const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
const useParallax: typeof import('@vueuse/core')['useParallax'] const useParallax: typeof import('@vueuse/core')['useParallax']
const useParentElement: typeof import('@vueuse/core')['useParentElement']
const usePerformanceObserver: typeof import('@vueuse/core')['usePerformanceObserver']
const usePermission: typeof import('@vueuse/core')['usePermission'] const usePermission: typeof import('@vueuse/core')['usePermission']
const usePointer: typeof import('@vueuse/core')['usePointer'] const usePointer: typeof import('@vueuse/core')['usePointer']
const usePointerLock: typeof import('@vueuse/core')['usePointerLock'] const usePointerLock: typeof import('@vueuse/core')['usePointerLock']
@@ -368,8 +381,10 @@ declare global {
const watchArray: typeof import('@vueuse/core')['watchArray'] const watchArray: typeof import('@vueuse/core')['watchArray']
const watchAtMost: typeof import('@vueuse/core')['watchAtMost'] const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
const watchDebounced: typeof import('@vueuse/core')['watchDebounced'] const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
const watchDeep: typeof import('@vueuse/core')['watchDeep']
const watchEffect: typeof import('vue')['watchEffect'] const watchEffect: typeof import('vue')['watchEffect']
const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable'] const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
const watchImmediate: typeof import('@vueuse/core')['watchImmediate']
const watchOnce: typeof import('@vueuse/core')['watchOnce'] const watchOnce: typeof import('@vueuse/core')['watchOnce']
const watchPausable: typeof import('@vueuse/core')['watchPausable'] const watchPausable: typeof import('@vueuse/core')['watchPausable']
const watchPostEffect: typeof import('vue')['watchPostEffect'] const watchPostEffect: typeof import('vue')['watchPostEffect']
@@ -379,3 +394,8 @@ declare global {
const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter'] const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
const whenever: typeof import('@vueuse/core')['whenever'] const whenever: typeof import('@vueuse/core')['whenever']
} }
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
}
@@ -1,4 +1,3 @@
import { isNumber } from '@vueuse/core'
import type { Component, FunctionalComponent } from 'vue' import type { Component, FunctionalComponent } from 'vue'
import EdgeText from './EdgeText.vue' import EdgeText from './EdgeText.vue'
import type { BaseEdgeProps } from '~/types' import type { BaseEdgeProps } from '~/types'
@@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { isString } from '@vueuse/core'
import type { EdgeTextProps } from '../../types/components' import type { EdgeTextProps } from '../../types/components'
import type { Rect as RectType } from '../../types' import type { Rect as RectType } from '../../types'
import { isString } from '../../utils/general'
const { const {
x, x,
@@ -60,7 +60,7 @@ export default {
<text v-bind="$attrs" ref="el" class="vue-flow__edge-text" :y="box.height / 2" dy="0.3em" :style="labelStyle"> <text v-bind="$attrs" ref="el" class="vue-flow__edge-text" :y="box.height / 2" dy="0.3em" :style="labelStyle">
<slot> <slot>
<component :is="label" v-if="!isString(label)" /> <component :is="label as any" v-if="!isString(label)" />
<template v-else> <template v-else>
{{ label }} {{ label }}
</template> </template>
@@ -1,5 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { isFunction, isString } from '@vueuse/core'
import { Position } from '../../types' import { Position } from '../../types'
import type { HandleProps } from '../../types/handle' import type { HandleProps } from '../../types/handle'
@@ -1,4 +1,3 @@
import { isNumber } from '@vueuse/core'
import type { GraphNode, HandleConnectable, NodeComponent } from '~/types' import type { GraphNode, HandleConnectable, NodeComponent } from '~/types'
interface Props { interface Props {
+3 -3
View File
@@ -2,7 +2,7 @@ import type { D3DragEvent, DragBehavior, SubjectPosition } from 'd3-drag'
import { drag } from 'd3-drag' import { drag } from 'd3-drag'
import { select } from 'd3-selection' import { select } from 'd3-selection'
import type { Ref } from 'vue' import type { Ref } from 'vue'
import type { MaybeComputedRef } from '@vueuse/core' import type { MaybeRefOrGetter } from '@vueuse/core'
import type { NodeDragEvent, NodeDragItem, XYPosition } from '~/types' import type { NodeDragEvent, NodeDragItem, XYPosition } from '~/types'
export type UseDragEvent = D3DragEvent<HTMLDivElement, null, SubjectPosition> export type UseDragEvent = D3DragEvent<HTMLDivElement, null, SubjectPosition>
@@ -12,8 +12,8 @@ interface UseDragParams {
onDrag: (event: Omit<NodeDragEvent, 'intersections'>) => void onDrag: (event: Omit<NodeDragEvent, 'intersections'>) => void
onStop: (event: Omit<NodeDragEvent, 'intersections'>) => void onStop: (event: Omit<NodeDragEvent, 'intersections'>) => void
el: Ref<Element | undefined> el: Ref<Element | undefined>
disabled?: MaybeComputedRef<boolean> disabled?: MaybeRefOrGetter<boolean>
selectable?: MaybeComputedRef<boolean> selectable?: MaybeRefOrGetter<boolean>
id?: string id?: string
dragHandle?: MaybeComputedRef<string | undefined> dragHandle?: MaybeComputedRef<string | undefined>
} }
+6 -6
View File
@@ -1,12 +1,12 @@
import type { MaybeComputedRef } from '@vueuse/core' import type { MaybeRefOrGetter } from '@vueuse/core'
import type { Connection, ConnectionHandle, HandleType, MouseTouchEvent, ValidConnectionFunc } from '~/types' import type { Connection, ConnectionHandle, HandleType, MouseTouchEvent, ValidConnectionFunc } from '~/types'
interface UseHandleProps { interface UseHandleProps {
handleId: MaybeComputedRef<string | null> handleId: MaybeRefOrGetter<string | null>
nodeId: MaybeComputedRef<string> nodeId: MaybeRefOrGetter<string>
type: MaybeComputedRef<HandleType> type: MaybeRefOrGetter<HandleType>
isValidConnection?: MaybeComputedRef<ValidConnectionFunc | null> isValidConnection?: MaybeRefOrGetter<ValidConnectionFunc | null>
edgeUpdaterType?: MaybeComputedRef<HandleType> edgeUpdaterType?: MaybeRefOrGetter<HandleType>
onEdgeUpdate?: (event: MouseTouchEvent, connection: Connection) => void onEdgeUpdate?: (event: MouseTouchEvent, connection: Connection) => void
onEdgeUpdateEnd?: (event: MouseTouchEvent) => void onEdgeUpdateEnd?: (event: MouseTouchEvent) => void
} }
+2 -3
View File
@@ -1,6 +1,5 @@
import type { Ref } from 'vue' import type { Ref } from 'vue'
import type { KeyFilter, KeyPredicate, MaybeComputedRef } from '@vueuse/core' import type { KeyFilter, KeyPredicate, MaybeRefOrGetter } from '@vueuse/core'
import { isBoolean, isFunction } from '@vueuse/core'
export function isInputDOMNode(event: KeyboardEvent): boolean { export function isInputDOMNode(event: KeyboardEvent): boolean {
const target = (event.composedPath?.()?.[0] || event.target) as HTMLElement const target = (event.composedPath?.()?.[0] || event.target) as HTMLElement
@@ -38,7 +37,7 @@ function createKeyPredicate(keyFilter: string[], pressedKeys: Set<string>): KeyP
* @param keyFilter - Can be a boolean, a string or an array of strings. If it's a boolean, it will always return that value. If it's a string, it will return true if the key is pressed. If it's an array of strings, it will return true if any of the keys are pressed, or a combination is pressed (e.g. ['ctrl+a', 'ctrl+b']) * @param keyFilter - Can be a boolean, a string or an array of strings. If it's a boolean, it will always return that value. If it's a string, it will return true if the key is pressed. If it's an array of strings, it will return true if any of the keys are pressed, or a combination is pressed (e.g. ['ctrl+a', 'ctrl+b'])
* @param onChange - Callback function that will be called when the key state changes * @param onChange - Callback function that will be called when the key state changes
*/ */
export default (keyFilter: MaybeComputedRef<KeyFilter | null>, onChange?: (keyPressed: boolean) => void): Ref<boolean> => { export default (keyFilter: MaybeRefOrGetter<KeyFilter | null>, onChange?: (keyPressed: boolean) => void): Ref<boolean> => {
const window = useWindow() const window = useWindow()
const isPressed = ref(resolveUnref(keyFilter) === true) const isPressed = ref(resolveUnref(keyFilter) === true)
-1
View File
@@ -1,4 +1,3 @@
import { isFunction, isString } from '@vueuse/core'
import type { import type {
EdgeAddChange, EdgeAddChange,
EdgeChange, EdgeChange,
-1
View File
@@ -1,4 +1,3 @@
import { isNumber } from '@vueuse/shared'
import type { Actions, CoordinateExtent, CoordinateExtentRange, GraphNode, NodeDragItem, State, XYPosition } from '~/types' import type { Actions, CoordinateExtent, CoordinateExtentRange, GraphNode, NodeDragItem, State, XYPosition } from '~/types'
export function hasSelector(target: Element, selector: string, node: Element): boolean { export function hasSelector(target: Element, selector: string, node: Element): boolean {
-1
View File
@@ -1,4 +1,3 @@
import { isNumber } from '@vueuse/core'
import type { Actions, EdgePositions, GraphEdge, GraphNode, HandleElement, Rect, ViewportTransform, XYPosition } from '~/types' import type { Actions, EdgePositions, GraphEdge, GraphNode, HandleElement, Rect, ViewportTransform, XYPosition } from '~/types'
import { Position } from '~/types' import { Position } from '~/types'
+16
View File
@@ -12,3 +12,19 @@ export function getEventPosition(event: MouseEvent | TouchEvent, bounds?: DOMRec
y: evtY - (bounds?.top ?? 0), y: evtY - (bounds?.top ?? 0),
} }
} }
export function isString(val: any): val is string {
return typeof val === 'string'
}
export function isFunction(val: any): val is Function {
return typeof val === 'function'
}
export function isBoolean(val: any): val is boolean {
return typeof val === 'boolean'
}
export function isNumber(val: any): val is number {
return typeof val === 'number'
}
-1
View File
@@ -1,4 +1,3 @@
import { isString } from '@vueuse/core'
import type { import type {
Actions, Actions,
Box, Box,
-1
View File
@@ -1,6 +1,5 @@
import type { ToRefs } from 'vue' import type { ToRefs } from 'vue'
import type { WatchPausableReturn } from '@vueuse/core' import type { WatchPausableReturn } from '@vueuse/core'
import { isFunction } from '@vueuse/core'
import type { Connection, FlowProps, VueFlowStore } from '~/types' import type { Connection, FlowProps, VueFlowStore } from '~/types'
export function useWatch( export function useWatch(
+819 -700
View File
File diff suppressed because it is too large Load Diff