diff --git a/packages/core/src/types/flow.ts b/packages/core/src/types/flow.ts index aec8f4ce9..d384df492 100644 --- a/packages/core/src/types/flow.ts +++ b/packages/core/src/types/flow.ts @@ -15,52 +15,12 @@ import type { } from './connection' import type { PanOnScrollMode } from './zoom' import type { EdgeTypesObject, NodeTypesObject } from './components' -import type { CustomEvent, EdgeMouseEvent, EdgeUpdateEvent, MouseTouchEvent, NodeDragEvent, NodeMouseEvent } from './hooks' +import type { EdgeMouseEvent, EdgeUpdateEvent, MouseTouchEvent, NodeDragEvent, NodeMouseEvent } from './hooks' import type { ValidConnectionFunc } from './handle' import type { EdgeChange, NodeChange } from './changes' import type { VueFlowStore } from './store' -// todo: should be object type -export type ElementData = any - -/** - * @deprecated - will be removed in the next major version - * A flow element (after parsing into state) - */ -export type FlowElement< - NodeData = ElementData, - EdgeData = ElementData, - NodeEvents extends Record = any, - EdgeEvents extends Record = any, -> = GraphNode | GraphEdge - -/** - * @deprecated - will be removed in the next major version - * An array of flow elements (after parsing into state) - */ -export type FlowElements< - NodeData = ElementData, - EdgeData = ElementData, - NodeEvents extends Record = any, - EdgeEvents extends Record = any, -> = FlowElement[] - -/** Initial elements (before parsing into state) */ -export type Element< - NodeData = ElementData, - EdgeData = ElementData, - NodeEvents extends Record = any, - EdgeEvents extends Record = any, -> = Node | Edge - -export type Elements< - NodeData = ElementData, - EdgeData = ElementData, - NodeEvents extends Record = any, - EdgeEvents extends Record = any, -> = Element[] - -export type MaybeElement = Node | Edge | Connection | FlowElement | Element +export type MaybeElement = Node | Edge | Connection | Element export interface CustomThemeVars { [key: string]: string | number | undefined @@ -75,12 +35,8 @@ export type CSSVars = | '--vf-handle' export type ThemeVars = { [key in CSSVars]?: CSSProperties['color'] } -export type Styles = CSSProperties & ThemeVars & CustomThemeVars -/** @deprecated will be removed in the next major version */ -export type ClassFunc = (element: ElementType) => string | void -/** @deprecated will be removed in the next major version */ -export type StyleFunc = (element: ElementType) => Styles | void +export type Styles = CSSProperties & ThemeVars & CustomThemeVars /** Handle Positions */ export enum Position { @@ -142,11 +98,6 @@ export interface FlowExportObject { export interface FlowProps { id?: string - /** - * all elements (nodes + edges) - * @deprecated use {@link FlowProps.nodes} & {@link FlowProps.nodes} instead - */ - modelValue?: Elements nodes?: Node[] edges?: Edge[] /** either use the edgeTypes prop to define your edge-types or use slots (