refactor(packages): change package structure

This commit is contained in:
moklick
2023-06-05 15:40:18 +02:00
parent b2e296901e
commit 8354759f57
332 changed files with 980 additions and 3244 deletions
@@ -1,4 +1,4 @@
import type { PanelPosition, ProOptions } from '@reactflow/system';
import type { PanelPosition, ProOptions } from '@xyflow/system';
export type AttributionProps = {
proOptions?: ProOptions;
@@ -1,7 +1,7 @@
<script lang="ts">
import { createEventDispatcher, type SvelteComponentTyped } from 'svelte';
import { Position } from '@reactflow/system';
import { getMarkerId } from '@reactflow/utils';
import { Position } from '@xyflow/system';
import { getMarkerId } from '@xyflow/system';
import { useStore } from '$lib/store';
import BezierEdge from '$lib/components/edges/BezierEdge.svelte';
@@ -1,8 +1,8 @@
<script lang="ts">
import { getContext, createEventDispatcher } from 'svelte';
import cc from 'classcat';
import { Position, type Connection } from '@reactflow/system';
import { XYHandle, isMouseEvent } from '@reactflow/utils';
import { Position, type Connection } from '@xyflow/system';
import { XYHandle, isMouseEvent } from '@xyflow/system';
import { useStore } from '$lib/store';
import type { HandleComponentProps } from '$lib/types';
@@ -17,7 +17,6 @@
export let isConnectableStart: $$Props['isConnectableStart'] = true;
export let isConnectableEnd: $$Props['isConnectableEnd'] = true;
let className: $$Props['class'] = undefined;
export { className as class };
@@ -64,7 +63,6 @@
domNode: $domNode,
nodes: $nodes,
connectionMode: $connectionMode,
transform: $transform,
lib: $lib,
autoPanOnConnect: true,
isValidConnection: $isValidConnection,
@@ -72,6 +70,7 @@
cancelConnection,
panBy,
onConnect: onConnectExtended,
getTransform: () => $transform,
});
}
}
@@ -92,8 +91,8 @@
])}
class:source={!isTarget}
class:target={isTarget}
class:connectableStart={isConnectableStart}
class:isConnectableEnd={isConnectableEnd}
class:connectablestart={isConnectableStart}
class:connectableend={isConnectableEnd}
class:connectable={isConnectable}
on:mousedown={onPointerDown}
on:touchstart={onPointerDown}
@@ -1,5 +1,5 @@
<script lang="ts">
import { getRectOfNodes } from '@reactflow/utils';
import { getRectOfNodes } from '@xyflow/system';
import { useStore } from '$lib/store';
import { Selection } from '$lib/components/Selection';
@@ -2,7 +2,7 @@
import { createEventDispatcher, onMount, setContext, SvelteComponentTyped } from 'svelte';
import cc from 'classcat';
import { errorMessages, type NodeProps } from '@reactflow/system';
import { errorMessages, type NodeProps } from '@xyflow/system';
import drag from '$lib/actions/drag';
import { useStore } from '$lib/store';
@@ -1,4 +1,4 @@
import type { XYPosition } from '@reactflow/system';
import type { XYPosition } from '@xyflow/system';
import type { Node } from '$lib/types';
export type NodeWrapperProps = Pick<
@@ -1,5 +1,5 @@
<script lang="ts">
import { getBezierPath } from '@reactflow/edge-utils';
import { getBezierPath } from '@xyflow/system';
import type { EdgeProps } from '$lib/types';
import { BaseEdge } from '$lib/components/BaseEdge';
@@ -1,5 +1,5 @@
<script lang="ts">
import { getSmoothStepPath } from '@reactflow/edge-utils';
import { getSmoothStepPath } from '@xyflow/system';
import type { EdgeProps } from '$lib/types';
import { BaseEdge } from '$lib/components/BaseEdge';
@@ -1,5 +1,5 @@
<script lang="ts">
import { getSmoothStepPath } from '@reactflow/edge-utils';
import { getSmoothStepPath } from '@xyflow/system';
import type { EdgeProps } from '$lib/types';
import { BaseEdge } from '$lib/components/BaseEdge';
@@ -1,5 +1,5 @@
<script lang="ts">
import { getStraightPath } from '@reactflow/edge-utils';
import { getStraightPath } from '@xyflow/system';
import type { EdgeProps } from '$lib/types';
import { BaseEdge } from '$lib/components/BaseEdge';
@@ -1,5 +1,5 @@
<script lang="ts">
import { Position, type NodeProps } from '@reactflow/system';
import { Position, type NodeProps } from '@xyflow/system';
import { Handle } from '$lib/components/Handle';
@@ -1,5 +1,5 @@
<script lang="ts">
import { Position, type NodeProps } from '@reactflow/system';
import { Position, type NodeProps } from '@xyflow/system';
import { Handle } from '$lib/components/Handle';
@@ -1,5 +1,5 @@
<script lang="ts">
import { Position, type NodeProps } from '@reactflow/system';
import { Position, type NodeProps } from '@xyflow/system';
import { Handle } from '$lib/components/Handle';