refactor(svelte/react): cleanup exports
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
export let positionOrigin: NodeWrapperProps['positionOrigin'] = undefined;
|
||||
export let sourcePosition: NodeWrapperProps['sourcePosition'] = undefined;
|
||||
export let targetPosition: NodeWrapperProps['targetPosition'] = undefined;
|
||||
export let zIndex: NodeWrapperProps['zIndex'];
|
||||
export let dragHandle: NodeWrapperProps['dragHandle'] = undefined;
|
||||
let className: string = '';
|
||||
export { className as class };
|
||||
|
||||
@@ -41,8 +43,7 @@
|
||||
type = 'default';
|
||||
}
|
||||
|
||||
const nodeComponent: typeof SvelteComponentTyped<Partial<NodeProps>> =
|
||||
$nodeTypes[type!] || DefaultNode;
|
||||
const nodeComponent: typeof SvelteComponentTyped<NodeProps> = $nodeTypes[type!] || DefaultNode;
|
||||
const selectNodesOnDrag = false;
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
@@ -105,6 +106,11 @@
|
||||
{selected}
|
||||
{sourcePosition}
|
||||
{targetPosition}
|
||||
{type}
|
||||
{zIndex}
|
||||
{dragging}
|
||||
{dragHandle}
|
||||
isConnectable={connectable}
|
||||
xPos={positionAbsolute?.x ?? 0}
|
||||
yPos={positionAbsolute?.y ?? 0}
|
||||
on:connect:start
|
||||
|
||||
@@ -18,9 +18,11 @@ export type NodeWrapperProps = Pick<
|
||||
| 'height'
|
||||
| 'sourcePosition'
|
||||
| 'targetPosition'
|
||||
| 'dragHandle'
|
||||
> & {
|
||||
positionOrigin?: XYPosition;
|
||||
'on:nodeclick'?: (event: MouseEvent) => void;
|
||||
resizeObserver?: ResizeObserver | null;
|
||||
isParent?: boolean;
|
||||
zIndex: number;
|
||||
};
|
||||
|
||||
@@ -63,6 +63,8 @@
|
||||
sourcePosition={node.sourcePosition}
|
||||
targetPosition={node.targetPosition}
|
||||
dragging={node.dragging}
|
||||
zIndex={node[internalsSymbol]?.z ?? 0}
|
||||
dragHandle={node.dragHandle}
|
||||
{resizeObserver}
|
||||
on:node:click
|
||||
on:node:mouseenter
|
||||
|
||||
@@ -69,7 +69,3 @@ export type SvelteFlowProps = DOMAttributes<HTMLDivElement> & {
|
||||
'on:pane:click'?: CustomEvent;
|
||||
'on:pane:contextmenu'?: CustomEvent;
|
||||
};
|
||||
|
||||
export type SvelteFlowSlots = {
|
||||
default: { slotValue: string };
|
||||
};
|
||||
|
||||
@@ -1,22 +1,81 @@
|
||||
import { SvelteFlow } from '$lib/container/SvelteFlow';
|
||||
// main component
|
||||
export { SvelteFlow } from '$lib/container/SvelteFlow';
|
||||
export * from '$lib/container/SvelteFlow/types';
|
||||
|
||||
export * from '$lib/container/SvelteFlow';
|
||||
// components
|
||||
export * from '$lib/container/Panel';
|
||||
|
||||
export * from '$lib/components/SvelteFlowProvider';
|
||||
export * from '$lib/components/EdgeLabelRenderer';
|
||||
export * from '$lib/components/BaseEdge';
|
||||
export * from '$lib/components/Handle';
|
||||
|
||||
// plugins
|
||||
export * from '$lib/plugins/Controls';
|
||||
export * from '$lib/plugins/Background';
|
||||
export * from '$lib/plugins/Minimap';
|
||||
|
||||
export * from '$lib/types';
|
||||
// utils
|
||||
export * from '$lib/utils';
|
||||
|
||||
export * from '$lib/hooks/useSvelteFlow';
|
||||
|
||||
export * from '@xyflow/system';
|
||||
// types
|
||||
export type { Edge, EdgeProps, EdgeTypes, DefaultEdgeOptions } from '$lib/types/edges';
|
||||
export type { HandleComponentProps, FitViewOptions } from '$lib/types/general';
|
||||
export type { Node, NodeTypes, DefaultNodeOptions } from '$lib/types/nodes';
|
||||
|
||||
export default SvelteFlow;
|
||||
// system types
|
||||
export {
|
||||
type SmoothStepPathOptions,
|
||||
type BezierPathOptions,
|
||||
ConnectionLineType,
|
||||
type EdgeMarker,
|
||||
type EdgeMarkerType,
|
||||
MarkerType,
|
||||
type OnMove,
|
||||
type OnMoveStart,
|
||||
type OnMoveEnd,
|
||||
type Connection,
|
||||
type ConnectionStatus,
|
||||
ConnectionMode,
|
||||
type OnConnectStartParams,
|
||||
type OnConnectStart,
|
||||
type OnConnect,
|
||||
type OnConnectEnd,
|
||||
type IsValidConnection,
|
||||
type Viewport,
|
||||
type SnapGrid,
|
||||
PanOnScrollMode,
|
||||
type ViewportHelperFunctionOptions,
|
||||
type SetCenterOptions,
|
||||
type FitBoundsOptions,
|
||||
type PanelPosition,
|
||||
type ProOptions,
|
||||
SelectionMode,
|
||||
type SelectionRect,
|
||||
type OnError,
|
||||
type NodeOrigin,
|
||||
type OnNodeDrag,
|
||||
type OnSelectionDrag,
|
||||
Position,
|
||||
type XYPosition,
|
||||
type XYZPosition,
|
||||
type Dimensions,
|
||||
type Rect,
|
||||
type Box,
|
||||
type Transform,
|
||||
type CoordinateExtent
|
||||
} from '@xyflow/system';
|
||||
|
||||
// system utils
|
||||
export {
|
||||
type GetBezierPathParams,
|
||||
getBezierEdgeCenter,
|
||||
getBezierPath,
|
||||
getEdgeCenter,
|
||||
type GetSmoothStepPathParams,
|
||||
getSmoothStepPath,
|
||||
type GetStraightPathParams,
|
||||
getStraightPath,
|
||||
getTransformForBounds,
|
||||
getRectOfNodes
|
||||
} from '@xyflow/system';
|
||||
|
||||
Reference in New Issue
Block a user