UNPKG

@fabiomdf/vue-hierarchy-tree

Version:

A Vue 3 component for creating interactive hierarchy trees with drag-and-drop functionality

25 lines (24 loc) 913 B
import { FlowData, BoxElement } from '../types/flow'; interface FlowDataOptions { boxWidth: number; boxHeight: number; enableCollisionAvoidance: boolean; enableConsoleLog: boolean; highlightSelectedBox: boolean; } export declare function useFlowData(initialData: FlowData, options: FlowDataOptions): { flowData: FlowData; boxRefs: Record<string, BoxElement>; selectedBoxId: import('vue').Ref<string | null, string | null>; setBoxRef: (id: string, el: unknown) => void; addChildBox: (parentId: string) => void; updateBoxLabel: (boxId: string, newLabel: string) => void; updateBoxPosition: (boxId: string, newPosition: { x: number; y: number; }) => void; removeBox: (boxId: string) => void; selectBox: (boxId: string | null) => void; validConnections: import('vue').ComputedRef<import('../types/flow').ConnectionData[]>; }; export {};