diff --git a/examples/svelte/src/routes/examples/custom-connection-line/CustomNode.svelte b/examples/svelte/src/routes/examples/custom-connection-line/CustomNode.svelte index 7cca42c0..4f0ac60f 100644 --- a/examples/svelte/src/routes/examples/custom-connection-line/CustomNode.svelte +++ b/examples/svelte/src/routes/examples/custom-connection-line/CustomNode.svelte @@ -1,15 +1,7 @@ diff --git a/examples/svelte/src/routes/examples/customnode/CustomNode.svelte b/examples/svelte/src/routes/examples/customnode/CustomNode.svelte index eb26b88d..dc3abb13 100644 --- a/examples/svelte/src/routes/examples/customnode/CustomNode.svelte +++ b/examples/svelte/src/routes/examples/customnode/CustomNode.svelte @@ -2,16 +2,7 @@ import type { Writable } from 'svelte/store'; import { Handle, Position, type NodeProps, type Node } from '@xyflow/svelte'; - type $$Props = NodeProps }>>; - - interface Props { - data: $$Props['data']; - [key: string]: any - } - - let { data, ...rest }: Props = $props(); - - rest; + let { data }: NodeProps }>> = $props(); const { colorStore } = data; diff --git a/examples/svelte/src/routes/examples/handle-connect/SingleHandleNode.svelte b/examples/svelte/src/routes/examples/handle-connect/SingleHandleNode.svelte index d6be0c52..ce5b27a9 100644 --- a/examples/svelte/src/routes/examples/handle-connect/SingleHandleNode.svelte +++ b/examples/svelte/src/routes/examples/handle-connect/SingleHandleNode.svelte @@ -1,14 +1,7 @@
diff --git a/examples/svelte/src/routes/examples/node-toolbar/CustomNode.svelte b/examples/svelte/src/routes/examples/node-toolbar/CustomNode.svelte index 1f8c2a78..ccbe336c 100644 --- a/examples/svelte/src/routes/examples/node-toolbar/CustomNode.svelte +++ b/examples/svelte/src/routes/examples/node-toolbar/CustomNode.svelte @@ -1,15 +1,7 @@ import { Handle, Position, type BuiltInNode, type NodeProps } from '@xyflow/svelte'; - type $$Props = NodeProps; - rest; - - interface Props { - data?: { label: string }; - positionAbsoluteX?: number; - positionAbsoluteY?: number; - [key: string]: any - } - - let { data = { label: 'Node' }, positionAbsoluteX = 0, positionAbsoluteY = 0, ...rest }: Props = $props(); + let { + data = { label: 'Node' }, + positionAbsoluteX = 0, + positionAbsoluteY = 0 + }: NodeProps = $props();
diff --git a/examples/svelte/src/routes/examples/overview/CustomNodeDragHandle.svelte b/examples/svelte/src/routes/examples/overview/CustomNodeDragHandle.svelte index 41d59778..d211e6fb 100644 --- a/examples/svelte/src/routes/examples/overview/CustomNodeDragHandle.svelte +++ b/examples/svelte/src/routes/examples/overview/CustomNodeDragHandle.svelte @@ -1,15 +1,7 @@
diff --git a/examples/svelte/src/routes/examples/usenodesdata/ResultNode.svelte b/examples/svelte/src/routes/examples/usenodesdata/ResultNode.svelte index 8d5f0724..c28e36b2 100644 --- a/examples/svelte/src/routes/examples/usenodesdata/ResultNode.svelte +++ b/examples/svelte/src/routes/examples/usenodesdata/ResultNode.svelte @@ -8,22 +8,16 @@ } from '@xyflow/svelte'; import { isTextNode, type MyNode } from './+page.svelte'; - type $$Props = NodeProps; - - interface Props { - id: $$Props['id']; - [key: string]: any - } - - let { id, ...rest }: Props = $props(); - rest; + let { id }: NodeProps = $props(); const connections = useHandleConnections({ nodeId: id, type: 'target' }); - let nodeData = $derived(useNodesData($connections.map((connection) => connection.source))); + let nodeData = $derived( + useNodesData($connections.map((connection) => connection.source)) + ); let textNodes = $derived($nodeData.filter(isTextNode)); diff --git a/examples/svelte/src/routes/examples/usenodesdata/TextNode.svelte b/examples/svelte/src/routes/examples/usenodesdata/TextNode.svelte index cb2a0335..10ea8e70 100644 --- a/examples/svelte/src/routes/examples/usenodesdata/TextNode.svelte +++ b/examples/svelte/src/routes/examples/usenodesdata/TextNode.svelte @@ -1,18 +1,9 @@
diff --git a/examples/svelte/src/routes/examples/useupdatenodeinternals/CustomNode.svelte b/examples/svelte/src/routes/examples/useupdatenodeinternals/CustomNode.svelte index a041de86..fcbd852f 100644 --- a/examples/svelte/src/routes/examples/useupdatenodeinternals/CustomNode.svelte +++ b/examples/svelte/src/routes/examples/useupdatenodeinternals/CustomNode.svelte @@ -1,20 +1,11 @@
- - - -
-
+ {#snippet connectionLine()} + {@render connectionLine_render?.()} + {/snippet} + --> +
+
- + {@render children?.()}