fix(system) exportet Optional type, fix(svelte) adjusted exported edge types
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Writable } from 'svelte/store';
|
import type { Writable } from 'svelte/store';
|
||||||
import { Handle, Position, type NodeProps } from '@xyflow/svelte';
|
import { Handle, Position, type NodeProps, BezierEdge, SmoothStepEdge } from '@xyflow/svelte';
|
||||||
|
|
||||||
type $$Props = NodeProps;
|
type $$Props = NodeProps;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { getBezierPath } from '@xyflow/system';
|
import { getBezierPath, type Optional } from '@xyflow/system';
|
||||||
|
|
||||||
import type { EdgeProps } from '$lib/types';
|
import type { EdgeProps } from '$lib/types';
|
||||||
import { BaseEdge } from '$lib/components/BaseEdge';
|
import { BaseEdge } from '$lib/components/BaseEdge';
|
||||||
|
|
||||||
type $$Props = Partial<EdgeProps>;
|
type $$Props = Optional<EdgeProps, 'id' | 'target' | 'source'>;
|
||||||
|
|
||||||
$: [path, labelX, labelY] = getBezierPath({
|
$: [path, labelX, labelY] = getBezierPath({
|
||||||
sourceX: $$props.sourceX,
|
sourceX: $$props.sourceX,
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { getSmoothStepPath } from '@xyflow/system';
|
import { getSmoothStepPath, type Optional } from '@xyflow/system';
|
||||||
|
|
||||||
import type { EdgeProps } from '$lib/types';
|
import type { EdgeProps } from '$lib/types';
|
||||||
import { BaseEdge } from '$lib/components/BaseEdge';
|
import { BaseEdge } from '$lib/components/BaseEdge';
|
||||||
|
|
||||||
type $$Props = Partial<EdgeProps>;
|
type $$Props = Optional<EdgeProps, 'id' | 'target' | 'source'>;
|
||||||
|
|
||||||
$: [path, labelX, labelY] = getSmoothStepPath({
|
$: [path, labelX, labelY] = getSmoothStepPath({
|
||||||
sourceX: $$props.sourceX,
|
sourceX: $$props.sourceX,
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { getSmoothStepPath } from '@xyflow/system';
|
import { getSmoothStepPath, type Optional } from '@xyflow/system';
|
||||||
|
|
||||||
import type { EdgeProps } from '$lib/types';
|
import type { EdgeProps } from '$lib/types';
|
||||||
import { BaseEdge } from '$lib/components/BaseEdge';
|
import { BaseEdge } from '$lib/components/BaseEdge';
|
||||||
|
|
||||||
type $$Props = Partial<EdgeProps>;
|
type $$Props = Optional<EdgeProps, 'id' | 'target' | 'source'>;
|
||||||
|
|
||||||
$: [path, labelX, labelY] = getSmoothStepPath({
|
$: [path, labelX, labelY] = getSmoothStepPath({
|
||||||
sourceX: $$props.sourceX,
|
sourceX: $$props.sourceX,
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { getStraightPath } from '@xyflow/system';
|
import { getStraightPath } from '@xyflow/system';
|
||||||
|
import type { Optional } from '@xyflow/system/dist/esm/utils/types';
|
||||||
|
|
||||||
import type { EdgeProps } from '$lib/types';
|
import type { EdgeProps } from '$lib/types';
|
||||||
import { BaseEdge } from '$lib/components/BaseEdge';
|
import { BaseEdge } from '$lib/components/BaseEdge';
|
||||||
|
|
||||||
type $$Props = Partial<EdgeProps>;
|
type $$Props = Optional<EdgeProps, 'id' | 'target' | 'source'>;
|
||||||
|
|
||||||
$: [path, labelX, labelY] = getStraightPath({
|
$: [path, labelX, labelY] = getStraightPath({
|
||||||
sourceX: $$props.sourceX,
|
sourceX: $$props.sourceX,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import type { Optional } from '../utils/types';
|
||||||
|
|
||||||
export enum Position {
|
export enum Position {
|
||||||
Left = 'left',
|
Left = 'left',
|
||||||
Top = 'top',
|
Top = 'top',
|
||||||
|
|||||||
@@ -5,3 +5,4 @@ export * from './general';
|
|||||||
export * from './marker';
|
export * from './marker';
|
||||||
export * from './node-toolbar';
|
export * from './node-toolbar';
|
||||||
export * from './store';
|
export * from './store';
|
||||||
|
export * from './types';
|
||||||
|
|||||||
Reference in New Issue
Block a user