develop (#43)
* fix(ts): use strict mode strictNullChecks etc * chore: Use extended React.HTMLAttributes<> (#41) * refactor(code-format): add prettier closes #42 * feat(renderer): add snap to grid option closes #20 * chore(dependabot): use develop as target branch
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
import React, { HTMLAttributes } from 'react';
|
||||
import { GridType } from '../../types';
|
||||
interface GridProps extends HTMLAttributes<SVGElement> {
|
||||
backgroundType?: GridType;
|
||||
gap?: number;
|
||||
color?: string;
|
||||
size?: number;
|
||||
}
|
||||
declare const Grid: React.MemoExoticComponent<({ gap, color, size, style, className, backgroundType, }: GridProps) => JSX.Element>;
|
||||
export default Grid;
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import { SVGAttributes } from 'react';
|
||||
import { ElementId, Node, Transform } from '../../types';
|
||||
interface ConnectionLineProps {
|
||||
connectionSourceId: ElementId;
|
||||
connectionPositionX: number;
|
||||
connectionPositionY: number;
|
||||
connectionLineType?: string | null;
|
||||
nodes: Node[];
|
||||
transform: Transform;
|
||||
connectionLineStyle?: SVGAttributes<{}>;
|
||||
className?: string;
|
||||
}
|
||||
declare const _default: ({ connectionSourceId, connectionLineStyle, connectionPositionX, connectionPositionY, connectionLineType, nodes, className, transform, }: ConnectionLineProps) => JSX.Element | null;
|
||||
export default _default;
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
import React from 'react';
|
||||
import { EdgeBezierProps } from '../../types';
|
||||
declare const _default: React.MemoExoticComponent<({ sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, style, }: EdgeBezierProps) => JSX.Element>;
|
||||
export default _default;
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
import React from 'react';
|
||||
import { EdgeProps } from '../../types';
|
||||
declare const _default: React.MemoExoticComponent<({ sourceX, sourceY, targetX, targetY, style }: EdgeProps) => JSX.Element>;
|
||||
export default _default;
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
import React from 'react';
|
||||
import { EdgeProps } from '../../types';
|
||||
declare const _default: React.MemoExoticComponent<({ sourceX, sourceY, targetX, targetY, style }: EdgeProps) => JSX.Element>;
|
||||
export default _default;
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
import { ElementId, Edge, EdgeCompProps } from '../../types';
|
||||
interface EdgeWrapperProps {
|
||||
id: ElementId;
|
||||
source: ElementId;
|
||||
target: ElementId;
|
||||
type: any;
|
||||
onClick: (edge: Edge) => void;
|
||||
animated: boolean;
|
||||
selected: boolean;
|
||||
}
|
||||
declare const _default: (EdgeComponent: React.ComponentType<EdgeCompProps>) => React.MemoExoticComponent<({ id, source, target, type, animated, selected, onClick, ...rest }: EdgeWrapperProps) => JSX.Element>;
|
||||
export default _default;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import React from 'react';
|
||||
import { HandleType, ElementId, Position, XYPosition, OnConnectFunc, Connection } from '../../types';
|
||||
declare type ValidConnectionFunc = (connection: Connection) => boolean;
|
||||
declare type SetSourceIdFunc = (nodeId: ElementId | null) => void;
|
||||
interface BaseHandleProps {
|
||||
type: HandleType;
|
||||
nodeId: ElementId;
|
||||
onConnect: OnConnectFunc;
|
||||
position: Position;
|
||||
setSourceId: SetSourceIdFunc;
|
||||
setPosition: (pos: XYPosition) => void;
|
||||
isValidConnection: ValidConnectionFunc;
|
||||
id?: ElementId | boolean;
|
||||
className?: string;
|
||||
}
|
||||
declare const BaseHandle: React.MemoExoticComponent<({ type, nodeId, onConnect, position, setSourceId, setPosition, className, id, isValidConnection, ...rest }: BaseHandleProps) => JSX.Element>;
|
||||
export default BaseHandle;
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
import React from 'react';
|
||||
import { HandleType, Position, OnConnectFunc } from '../../types';
|
||||
interface HandleProps {
|
||||
type: HandleType;
|
||||
position: Position;
|
||||
onConnect?: OnConnectFunc;
|
||||
isValidConnection?: () => boolean;
|
||||
}
|
||||
declare const Handle: React.MemoExoticComponent<({ onConnect, type, position, isValidConnection, ...rest }: HandleProps) => JSX.Element>;
|
||||
export default Handle;
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
/// <reference types="react" />
|
||||
import { NodeProps } from '../../types';
|
||||
declare const _default: ({ data, style }: NodeProps) => JSX.Element;
|
||||
export default _default;
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
/// <reference types="react" />
|
||||
import { NodeProps } from '../../types';
|
||||
declare const _default: ({ data, style }: NodeProps) => JSX.Element;
|
||||
export default _default;
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
/// <reference types="react" />
|
||||
import { NodeProps } from '../../types';
|
||||
declare const _default: ({ data, style }: NodeProps) => JSX.Element;
|
||||
export default _default;
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
import React, { CSSProperties } from 'react';
|
||||
import { Node, Transform, ElementId, NodeComponentProps } from '../../types';
|
||||
interface WrapNodeProps {
|
||||
id: ElementId;
|
||||
type: string;
|
||||
data: any;
|
||||
selected: boolean;
|
||||
transform: Transform;
|
||||
xPos: number;
|
||||
yPos: number;
|
||||
onClick: (node: Node) => void | undefined;
|
||||
onNodeDragStop: (node: Node) => void;
|
||||
style?: CSSProperties;
|
||||
}
|
||||
declare const _default: (NodeComponent: React.ComponentType<NodeComponentProps>) => React.MemoExoticComponent<({ id, type, data, transform, xPos, yPos, selected, onClick, onNodeDragStop, style, }: WrapNodeProps) => JSX.Element>;
|
||||
export default _default;
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import React from 'react';
|
||||
declare const _default: React.MemoExoticComponent<() => JSX.Element>;
|
||||
export default _default;
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import React from 'react';
|
||||
declare const _default: React.MemoExoticComponent<() => JSX.Element>;
|
||||
export default _default;
|
||||
Reference in New Issue
Block a user