From bba97aa01a661398b8d5cb6912bf9ffdf82f0548 Mon Sep 17 00:00:00 2001
From: Peter
Date: Tue, 26 Sep 2023 15:45:06 +0200
Subject: [PATCH 1/7] feat(svelte) added connectionLineComponent
---
.../src/components/Header/Header.svelte | 3 +-
.../custom-connection-line/+page.svelte | 35 +++++++++++++++++++
.../ConnectionLine.svelte | 11 ++++++
.../custom-connection-line/CustomNode.svelte | 34 ++++++++++++++++++
.../ConnectionLine/ConnectionLine.svelte | 8 +++--
.../container/SvelteFlow/SvelteFlow.svelte | 4 ++-
6 files changed, 90 insertions(+), 5 deletions(-)
create mode 100644 examples/svelte/src/routes/custom-connection-line/+page.svelte
create mode 100644 examples/svelte/src/routes/custom-connection-line/ConnectionLine.svelte
create mode 100644 examples/svelte/src/routes/custom-connection-line/CustomNode.svelte
diff --git a/examples/svelte/src/components/Header/Header.svelte b/examples/svelte/src/components/Header/Header.svelte
index 6fa79b68..3d0c9ff5 100644
--- a/examples/svelte/src/components/Header/Header.svelte
+++ b/examples/svelte/src/components/Header/Header.svelte
@@ -13,7 +13,8 @@
'subflows',
'usesvelteflow',
'useupdatenodeinternals',
- 'validation'
+ 'validation',
+ 'custom-connection-line'
];
const onChange = (event: Event) => {
diff --git a/examples/svelte/src/routes/custom-connection-line/+page.svelte b/examples/svelte/src/routes/custom-connection-line/+page.svelte
new file mode 100644
index 00000000..c5bcab3f
--- /dev/null
+++ b/examples/svelte/src/routes/custom-connection-line/+page.svelte
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/svelte/src/routes/custom-connection-line/ConnectionLine.svelte b/examples/svelte/src/routes/custom-connection-line/ConnectionLine.svelte
new file mode 100644
index 00000000..977359f1
--- /dev/null
+++ b/examples/svelte/src/routes/custom-connection-line/ConnectionLine.svelte
@@ -0,0 +1,11 @@
+
+
+{#if $connectionPath}
+
+
+
+{/if}
diff --git a/examples/svelte/src/routes/custom-connection-line/CustomNode.svelte b/examples/svelte/src/routes/custom-connection-line/CustomNode.svelte
new file mode 100644
index 00000000..0f4cc6bd
--- /dev/null
+++ b/examples/svelte/src/routes/custom-connection-line/CustomNode.svelte
@@ -0,0 +1,34 @@
+
+
+
diff --git a/packages/svelte/src/lib/components/ConnectionLine/ConnectionLine.svelte b/packages/svelte/src/lib/components/ConnectionLine/ConnectionLine.svelte
index f2abe041..31d67711 100644
--- a/packages/svelte/src/lib/components/ConnectionLine/ConnectionLine.svelte
+++ b/packages/svelte/src/lib/components/ConnectionLine/ConnectionLine.svelte
@@ -8,8 +8,10 @@
{#if $connectionPath}
{/if}
diff --git a/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte b/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte
index 600622ce..c77c0b29 100644
--- a/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte
+++ b/packages/svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte
@@ -154,7 +154,9 @@
-
+
+
+
Date: Tue, 26 Sep 2023 15:49:09 +0200
Subject: [PATCH 2/7] refined example
---
.../src/routes/custom-connection-line/ConnectionLine.svelte | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/svelte/src/routes/custom-connection-line/ConnectionLine.svelte b/examples/svelte/src/routes/custom-connection-line/ConnectionLine.svelte
index 977359f1..a3676bb0 100644
--- a/examples/svelte/src/routes/custom-connection-line/ConnectionLine.svelte
+++ b/examples/svelte/src/routes/custom-connection-line/ConnectionLine.svelte
@@ -6,6 +6,6 @@
{#if $connectionPath}
-
+
{/if}
From 854a9d3606868ddb2da7daba88d0ee151f4f3807 Mon Sep 17 00:00:00 2001
From: Peter
Date: Tue, 26 Sep 2023 16:01:00 +0200
Subject: [PATCH 3/7] feat(svelte) added connectionLineContainerStyle and
connectionLineStyle props
---
.../lib/components/ConnectionLine/ConnectionLine.svelte | 7 +++++--
.../svelte/src/lib/container/SvelteFlow/SvelteFlow.svelte | 4 +++-
packages/svelte/src/lib/container/SvelteFlow/types.ts | 2 ++
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/packages/svelte/src/lib/components/ConnectionLine/ConnectionLine.svelte b/packages/svelte/src/lib/components/ConnectionLine/ConnectionLine.svelte
index 31d67711..9f53f486 100644
--- a/packages/svelte/src/lib/components/ConnectionLine/ConnectionLine.svelte
+++ b/packages/svelte/src/lib/components/ConnectionLine/ConnectionLine.svelte
@@ -3,13 +3,16 @@
import { useStore } from '$lib/store';
+ export let containerStyle: string = '';
+ export let style: string = '';
+
const { connectionPath, width, height, connection } = useStore();
{#if $connectionPath}
-