update: create vue.d.ts files

* add vue-tsc to emit d.ts files from vue components
* use absolute paths in components
* avoids conflicts with ts custom paths in vue-tsc generated vue.d.ts files

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-17 01:39:50 +01:00
parent a21238f9aa
commit 10215b4631
26 changed files with 153 additions and 115 deletions
@@ -1,8 +1,8 @@
<script lang="ts" setup>
import { CSSProperties } from 'vue'
import { getBezierPath, getSmoothStepPath } from '../Edges/utils'
import { ConnectionLineType, HandleElement, Node, Position } from '~/types'
import { useStore } from '~/composables'
import { useStore } from '../../composables'
import { ConnectionLineType, HandleElement, Node, Position } from '../../types'
interface ConnectionLineProps {
sourceNode: Node
+1 -1
View File
@@ -1,8 +1,8 @@
<script lang="ts" setup>
import { CSSProperties } from 'vue'
import { ArrowHeadType, EdgeProps, ElementId, Position } from '../../types'
import { getCenter, getMarkerEnd, getBezierPath } from './utils'
import EdgeText from './EdgeText.vue'
import { ArrowHeadType, EdgeProps, ElementId, Position } from '~/types'
interface BezierEdgeProps extends EdgeProps {
id: ElementId
+2 -2
View File
@@ -1,9 +1,9 @@
<script lang="ts" setup>
import { useHandle, useHooks, useStore } from '../../composables'
import { ConnectionMode, Edge, EdgePositions, EdgeType, Position } from '../../types'
import EdgeAnchor from './EdgeAnchor.vue'
import { getEdgePositions, getHandle, getSourceTargetNodes, isEdgeVisible } from '~/container/EdgeRenderer/utils'
import { isEdge } from '~/utils'
import { ConnectionMode, Edge, EdgePositions, EdgeType, Position } from '~/types'
import { useHandle, useHooks, useStore } from '~/composables'
interface EdgeProps {
type: EdgeType
+1 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { HTMLAttributes } from 'vue'
import { Position } from '~/types'
import { Position } from '../../types'
const shiftX = (x: number, shift: number, position: Position): number => {
if (position === Position.Left) return x - shift
+1 -1
View File
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { ArrowHeadType, EdgeProps, ElementId, Position } from '../../types'
import EdgeText from './EdgeText.vue'
import { getCenter, getMarkerEnd, getSmoothStepPath } from './utils'
import { ArrowHeadType, EdgeProps, ElementId, Position } from '~/types'
interface SmoothStepEdgeProps extends EdgeProps {
id: ElementId
+1 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { ArrowHeadType, EdgeProps, ElementId, Position } from '../../types'
import SmoothStepEdge from './SmoothStepEdge.vue'
import { ArrowHeadType, EdgeProps, ElementId, Position } from '~/types'
export interface StepEdgeProps extends EdgeProps {
id: ElementId
+1 -1
View File
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { ArrowHeadType, EdgeProps, ElementId, Position } from '../../types'
import EdgeText from './EdgeText.vue'
import { getMarkerEnd, getBezierPath } from './utils'
import { ArrowHeadType, EdgeProps, ElementId, Position } from '~/types'
interface StraightEdgeProps extends EdgeProps {
id: ElementId
+2 -2
View File
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { Position, ValidConnectionFunc } from '~/types'
import { useHandle, useHooks, useStore } from '../../composables'
import { Position, ValidConnectionFunc } from '../../types'
import { NodeIdContextKey } from '~/context'
import { useHandle, useHooks, useStore } from '~/composables'
interface HandleProps {
id?: string
+1 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import Handle from '../Handle/Handle.vue'
import { NodeProps, Position } from '~/types'
import { NodeProps, Position } from '../../types'
interface DefaultNodeProps extends NodeProps {
data?: NodeProps['data']
+1 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import Handle from '../Handle/Handle.vue'
import { NodeProps, Position } from '~/types'
import { NodeProps, Position } from '../../types'
interface InputNodeProps extends NodeProps {
data?: NodeProps['data']
+2 -2
View File
@@ -1,8 +1,8 @@
<script lang="ts" setup>
import { DraggableEventListener, DraggableCore } from '@braks/revue-draggable'
import { Node, NodeType, SnapGrid } from '~/types'
import { useHooks, useStore } from '../../composables'
import { Node, NodeType, SnapGrid } from '../../types'
import { NodeIdContextKey } from '~/context'
import { useHooks, useStore } from '~/composables'
interface NodeProps {
node: Node
+1 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import Handle from '../Handle/Handle.vue'
import { NodeProps, Position } from '~/types'
import { NodeProps, Position } from '../../types'
interface OutputNodeProps extends NodeProps {
data?: NodeProps['data']
@@ -1,8 +1,8 @@
<script lang="ts" setup>
import { Draggable, DraggableEventListener } from '@braks/revue-draggable'
import { Node } from '~/types'
import { useHooks, useStore } from '../../composables'
import { Node } from '../../types'
import { getRectOfNodes, isNode } from '~/utils'
import { useHooks, useStore } from '~/composables'
const store = useStore()
const hooks = useHooks()
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { useStore } from '../../composables'
import SelectionRect from './SelectionRect.vue'
import { getMousePosition } from './utils'
import { useStore } from '~/composables'
const store = useStore()
const el = templateRef('user-selection', null)
+1 -1
View File
@@ -1,4 +1,4 @@
import { XYPosition } from '~/types'
import { XYPosition } from '../../types'
export function getMousePosition(event: MouseEvent): XYPosition | void {
const flowNode = (event.target as Element).closest('.vue-flow')