refactor: Remove link from deps

Signed-off-by: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
bcakmakoglu
2022-02-22 10:35:38 +01:00
parent 776000ccf1
commit 6e5c58fcae
34 changed files with 36 additions and 48 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { VueFlow, MiniMap, Controls, Background, isNode, useVueFlow, Elements } from '@braks/vue-flow'
import { VueFlow, MiniMap, Controls, Background, isNode, useVueFlow, Elements } from '~/index'
const elements = ref<Elements>([
{ id: '1', type: 'input', label: 'Node 1', position: { x: 250, y: 5 } },
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import { VueFlow, Background, MiniMap, Controls, Elements, FlowEvents, FlowInstance, isNode, addEdge } from '@braks/vue-flow'
import { VueFlow, Background, MiniMap, Controls, Elements, FlowEvents, FlowInstance, isNode, addEdge } from '~/index'
export default defineComponent({
name: 'BasicOptionsAPI',
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { VueFlow, Background, BackgroundVariant, Elements } from '@braks/vue-flow'
import ConnectionLine from './ConnectionLine.vue'
import { VueFlow, Background, BackgroundVariant, Elements } from '~/index'
const elements = ref<Elements>([
{
+1 -12
View File
@@ -1,17 +1,6 @@
<script lang="ts" setup>
import {
ConnectionMode,
Elements,
isEdge,
Node,
Position,
SnapGrid,
useVueFlow,
VueFlow,
Controls,
MiniMap,
} from '@braks/vue-flow'
import ColorSelectorNode from './ColorSelectorNode.vue'
import { ConnectionMode, Elements, isEdge, Node, Position, SnapGrid, useVueFlow, VueFlow, Controls, MiniMap } from '~/index'
const elements = ref<Elements>([])
const bgColor = ref('#1A192B')
+1 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { VueFlow, FlowInstance, Node, useVueFlow } from '@braks/vue-flow'
import Sidebar from './Sidebar.vue'
import { VueFlow, FlowInstance, Node, useVueFlow } from '~/index'
let id = 0
const getId = () => `dndnode_${id++}`
+1 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { VueFlow, MiniMap, Controls, FlowInstance } from '@braks/vue-flow'
import { getElements } from './utils'
import { VueFlow, MiniMap, Controls, FlowInstance } from '~/index'
const onLoad = (flowInstance: FlowInstance) => {
flowInstance.fitView()
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { getBezierPath, getMarkerId, Position, EdgeProps } from '@braks/vue-flow'
import { getBezierPath, getMarkerId, Position, EdgeProps } from '~/index'
interface CustomEdgeProps<T = { text: string }> extends EdgeProps<T> {
source: string
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { getEdgeCenter, getBezierPath, getMarkerId, Position, EdgeProps, EdgeText } from '@braks/vue-flow'
import { getEdgeCenter, getBezierPath, getMarkerId, Position, EdgeProps, EdgeText } from '~/index'
interface CustomEdgeProps extends EdgeProps {
source: string
+1 -1
View File
@@ -1,8 +1,8 @@
<script lang="ts" setup>
import { VueFlow, MiniMap, Controls, Background, MarkerType, useVueFlow, Edge, Node } from '@braks/vue-flow'
import CustomEdge from './CustomEdge.vue'
import CustomEdge2 from './CustomEdge2.vue'
import CustomLabel from './CustomLabel.vue'
import { VueFlow, MiniMap, Controls, Background, MarkerType, useVueFlow, Edge, Node } from '~/index'
const initialNodes: Node[] = [
{ id: '1', type: 'input', label: 'Input 1', position: { x: 250, y: 0 } },
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { VueFlow, MiniMap, Controls, Background, BackgroundVariant, Node, useVueFlow } from '@braks/vue-flow'
import { VueFlow, MiniMap, Controls, Background, BackgroundVariant, Node, useVueFlow } from '~/index'
const { nodes, addNodes, edges, addEdges, onConnect, onPaneReady, onNodeDragStop, dimensions } = useVueFlow()
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { VueFlow, MiniMap, Controls, useVueFlow } from '@braks/vue-flow'
import { VueFlow, MiniMap, Controls, useVueFlow } from '~/index'
const isHidden = ref(false)
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { VueFlow, MiniMap, Controls, useVueFlow } from '@braks/vue-flow'
import { VueFlow, MiniMap, Controls, useVueFlow } from '~/index'
const {
nodesDraggable,
+1 -1
View File
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import dagre from 'dagre'
import { VueFlow, Controls, ConnectionMode, Elements, isNode, CoordinateExtent, Position } from '@braks/vue-flow'
import initialElements from './initial-elements'
import { VueFlow, Controls, ConnectionMode, Elements, isNode, CoordinateExtent, Position } from '~/index'
const dagreGraph = new dagre.graphlib.Graph()
dagreGraph.setDefaultEdgeLabel(() => ({}))
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { VueFlow, Background, Elements } from '@braks/vue-flow'
import { VueFlow, Background, Elements } from '~/index'
const initialElements: Elements = [
{ id: '1', type: 'input', label: 'Node 1', position: { x: 250, y: 5 }, class: 'light' },
{ id: '2', label: 'Node 2', position: { x: 100, y: 100 }, class: 'light' },
+2 -2
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { Handle, Position, getNodesInside, useVueFlow } from '@braks/vue-flow'
import type { NodeProps } from '@braks/vue-flow'
import { Handle, Position, getNodesInside, useVueFlow } from '~/index'
import type { NodeProps } from '~/index'
const props = defineProps<NodeProps>()
const { onNodeDragStop, getNodes, transform } = useVueFlow()
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { ConnectionMode, useVueFlow, VueFlow, MiniMap, Background, Controls } from '@braks/vue-flow'
import { ConnectionMode, useVueFlow, VueFlow, MiniMap, Background, Controls } from '~/index'
const { onConnect, nodes, edges, addEdges } = useVueFlow({
fitViewOnInit: true,
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { VueFlow, addEdge, Connection, Edge, Elements, isEdge, FlowInstance, Position } from '@braks/vue-flow'
import { VueFlow, addEdge, Connection, Edge, Elements, isEdge, FlowInstance, Position } from '~/index'
const initialElements: Elements = [
{
+1 -1
View File
@@ -14,7 +14,7 @@ import {
Edge,
FlowEvents,
MarkerType,
} from '@braks/vue-flow'
} from '~/index'
const onNodeDragStart = (e: FlowEvents['nodeDragStart']) => console.log('drag start', e)
const onNodeDrag = (e: FlowEvents['nodeDrag']) => console.log('drag', e)
+1 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { VueFlow, Controls, FlowInstance, Elements, ConnectionMode, useVueFlow } from '@braks/vue-flow'
import Sidebar from './Sidebar.vue'
import { VueFlow, Controls, FlowInstance, Elements, ConnectionMode, useVueFlow } from '~/index'
const onLoad = (flowInstance: FlowInstance) => console.log('flow loaded:', flowInstance)
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { useVueFlow } from '@braks/vue-flow'
import { useVueFlow } from '~/index'
const { nodesSelectionActive, addSelectedNodes, getNodes, transform } = useVueFlow()
const selectAll = () => {
+1 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { CSSProperties } from 'vue'
import { Handle, NodeProps, Position } from '@braks/vue-flow'
import { Handle, NodeProps, Position } from '~/index'
interface RGBNodeProps extends NodeProps {
data: {
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { Handle, NodeProps, Position } from '@braks/vue-flow'
import { Handle, NodeProps, Position } from '~/index'
interface RBGOutputNodeProps extends NodeProps {
rgb: string
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { useZoomPanHelper, FlowExportObject, Node, useVueFlow } from '@braks/vue-flow'
import { useZoomPanHelper, FlowExportObject, Node, useVueFlow } from '~/index'
const flowKey = 'example-flow'
const state = useStorage<FlowExportObject>(flowKey, {
+1 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { VueFlow, Elements } from '@braks/vue-flow'
import Controls from './Controls.vue'
import { VueFlow, Elements } from '~/index'
const initialElements: Elements = [
{ id: '1', label: 'Node 1', position: { x: 100, y: 100 } },
+1 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import { VueFlow, FlowInstance } from '@braks/vue-flow'
import { getElements } from './utils'
import { VueFlow, FlowInstance } from '~/index'
const instance = ref<FlowInstance>()
const onLoad = (flowInstance: FlowInstance) => {
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { VueFlow, Elements } from '@braks/vue-flow'
import { VueFlow, Elements } from '~/index'
const elementsA: Elements = [
{ id: '1a', type: 'input', label: 'Node 1', position: { x: 250, y: 5 }, class: 'light' },
+2 -2
View File
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { CSSProperties } from 'vue'
import { Handle, Position } from '@braks/vue-flow'
import type { NodeProps } from '@braks/vue-flow'
import { Handle, Position } from '~/index'
import type { NodeProps } from '~/index'
const props = defineProps<NodeProps>()
const nodeStyles: CSSProperties = { padding: '10px 15px', border: '1px solid #ddd' }
@@ -10,7 +10,7 @@ import {
Edge,
FlowEvents,
ConnectionMode,
} from '@braks/vue-flow'
} from '~/index'
const initialElements: Elements = [
{
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { VueFlow, Elements } from '@braks/vue-flow'
import { VueFlow, Elements } from '~/index'
const initialElements: Elements = [
{ id: '1', label: '-', position: { x: 100, y: 100 } },
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { Position, Handle, ValidConnectionFunc } from '@braks/vue-flow'
import { Position, Handle, ValidConnectionFunc } from '~/index'
interface CustomInputProps {
isValidTargetPos: ValidConnectionFunc
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { Position, Handle, NodeProps, ValidConnectionFunc } from '@braks/vue-flow'
import { Position, Handle, NodeProps, ValidConnectionFunc } from '~/index'
interface CustomNodeProps extends NodeProps {
id: string
+1 -1
View File
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { VueFlow, Connection, OnConnectStartParams, FlowInstance, useVueFlow } from '@braks/vue-flow'
import CustomInput from './CustomInput.vue'
import CustomNode from './CustomNode.vue'
import { VueFlow, Connection, OnConnectStartParams, FlowInstance, useVueFlow } from '~/index'
const { nodes, edges, addEdges } = useVueFlow({
nodes: [
+2 -2
View File
@@ -4,10 +4,10 @@ import { DraggablePlugin } from '@braks/revue-draggable'
import App from './App.vue'
import { router } from './router'
/* import the required styles */
import '@braks/vue-flow/dist/style.css'
import '../src/style.css'
/* import the default theme (optional) */
import '@braks/vue-flow/dist/theme-default.css'
import '../src/theme-default.css'
const app = createApp(App)