chore(types): cleanup
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import EdgeText from './EdgeText';
|
||||
import { BaseEdgeProps } from '../../types';
|
||||
import type { BaseEdgeProps } from '../../types';
|
||||
|
||||
const BaseEdge = ({
|
||||
path,
|
||||
|
||||
@@ -2,7 +2,8 @@ import { memo } from 'react';
|
||||
|
||||
import BaseEdge from './BaseEdge';
|
||||
import { getBezierEdgeCenter } from './utils';
|
||||
import { BezierEdgeProps, Position } from '../../types';
|
||||
import { Position } from '../../types';
|
||||
import type { BezierEdgeProps } from '../../types';
|
||||
|
||||
export interface GetBezierPathParams {
|
||||
sourceX: number;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FC, MouseEvent as ReactMouseEvent, SVGAttributes } from 'react';
|
||||
import type { FC, MouseEvent as ReactMouseEvent, SVGAttributes } from 'react';
|
||||
import cc from 'classcat';
|
||||
|
||||
import { Position } from '../../types';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { memo, useRef, useState, useEffect, FC, PropsWithChildren } from 'react';
|
||||
import { memo, useRef, useState, useEffect } from 'react';
|
||||
import type { FC, PropsWithChildren } from 'react';
|
||||
import cc from 'classcat';
|
||||
|
||||
import { EdgeTextProps, Rect } from '../../types';
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { memo } from 'react';
|
||||
import { EdgeProps, Position } from '../../types';
|
||||
|
||||
import BaseEdge from './BaseEdge';
|
||||
import { getBezierEdgeCenter } from './utils';
|
||||
import { Position } from '../../types';
|
||||
import type { EdgeProps } from '../../types';
|
||||
|
||||
export interface GetSimpleBezierPathParams {
|
||||
sourceX: number;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { memo } from 'react';
|
||||
|
||||
import { SmoothStepEdgeProps, Position, XYPosition } from '../../types';
|
||||
import BaseEdge from './BaseEdge';
|
||||
import { getEdgeCenter } from './utils';
|
||||
import { Position } from '../../types';
|
||||
import type { SmoothStepEdgeProps, XYPosition } from '../../types';
|
||||
|
||||
export interface GetSmoothStepPathParams {
|
||||
sourceX: number;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { memo, useMemo } from 'react';
|
||||
|
||||
import { SmoothStepEdgeProps } from '../../types';
|
||||
import SmoothStepEdge from './SmoothStepEdge';
|
||||
import type { SmoothStepEdgeProps } from '../../types';
|
||||
|
||||
const StepEdge = memo((props: SmoothStepEdgeProps) => (
|
||||
<SmoothStepEdge
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { memo } from 'react';
|
||||
|
||||
import BaseEdge from './BaseEdge';
|
||||
import { EdgeProps } from '../../types';
|
||||
import { getEdgeCenter } from './utils';
|
||||
import type { EdgeProps } from '../../types';
|
||||
|
||||
export type GetStraightPathParams = {
|
||||
sourceX: number;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { MouseEvent as ReactMouseEvent } from 'react';
|
||||
import { StoreApi } from 'zustand';
|
||||
|
||||
import { Edge, MarkerType, ReactFlowState } from '../../types';
|
||||
import type { Edge, MarkerType, ReactFlowState } from '../../types';
|
||||
|
||||
export const getMarkerEnd = (markerType?: MarkerType, markerEndId?: string): string => {
|
||||
if (typeof markerEndId !== 'undefined' && markerEndId) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { memo, ComponentType, useState, useMemo, KeyboardEvent, useRef } from 'react';
|
||||
import { memo, useState, useMemo, useRef } from 'react';
|
||||
import type { ComponentType, KeyboardEvent } from 'react';
|
||||
import cc from 'classcat';
|
||||
|
||||
import { useStoreApi } from '../../hooks/useStore';
|
||||
@@ -7,8 +8,8 @@ import { handleMouseDown } from '../Handle/handler';
|
||||
import { EdgeAnchor } from './EdgeAnchor';
|
||||
import { getMarkerId } from '../../utils/graph';
|
||||
import { getMouseHandler } from './utils';
|
||||
import { EdgeProps, WrapEdgeProps, Connection } from '../../types';
|
||||
import { elementSelectionKeys } from '../../utils';
|
||||
import type { EdgeProps, WrapEdgeProps, Connection } from '../../types';
|
||||
|
||||
export default (EdgeComponent: ComponentType<EdgeProps>) => {
|
||||
const EdgeWrapper = ({
|
||||
|
||||
Reference in New Issue
Block a user