Thomas G. Lopes commited on
Commit
1de8a7e
·
1 Parent(s): 6b7aed6

base canvas

Browse files
package.json CHANGED
@@ -27,6 +27,7 @@
27
  "@iconify-json/carbon": "^1.2.8",
28
  "@iconify-json/lucide": "^1.2.45",
29
  "@iconify-json/material-symbols": "^1.2.15",
 
30
  "@playwright/test": "^1.49.1",
31
  "@ryoppippi/unplugin-typia": "^1.0.0",
32
  "@samchon/openapi": "^3.0.0",
@@ -75,6 +76,7 @@
75
  "type": "module",
76
  "dependencies": {
77
  "@tailwindcss/typography": "^0.5.16",
 
78
  "dequal": "^2.0.3",
79
  "eslint-plugin-svelte": "^3.11.0",
80
  "marked": "^16.1.2",
 
27
  "@iconify-json/carbon": "^1.2.8",
28
  "@iconify-json/lucide": "^1.2.45",
29
  "@iconify-json/material-symbols": "^1.2.15",
30
+ "@iconify-json/mingcute": "^1.2.5",
31
  "@playwright/test": "^1.49.1",
32
  "@ryoppippi/unplugin-typia": "^1.0.0",
33
  "@samchon/openapi": "^3.0.0",
 
76
  "type": "module",
77
  "dependencies": {
78
  "@tailwindcss/typography": "^0.5.16",
79
+ "@xyflow/svelte": "^1.2.4",
80
  "dequal": "^2.0.3",
81
  "eslint-plugin-svelte": "^3.11.0",
82
  "marked": "^16.1.2",
pnpm-lock.yaml CHANGED
@@ -11,6 +11,9 @@ importers:
11
  '@tailwindcss/typography':
12
  specifier: ^0.5.16
13
  version: 0.5.16(tailwindcss@4.0.9)
 
 
 
14
  dequal:
15
  specifier: ^2.0.3
16
  version: 2.0.3
@@ -57,6 +60,9 @@ importers:
57
  '@iconify-json/material-symbols':
58
  specifier: ^1.2.15
59
  version: 1.2.15
 
 
 
60
  '@playwright/test':
61
  specifier: ^1.49.1
62
  version: 1.52.0
@@ -644,6 +650,9 @@ packages:
644
  '@iconify-json/material-symbols@1.2.15':
645
  resolution: {integrity: sha512-KkHRnMh1s08N1Olf3xk+z3ZIrke/7Ys3uUIMfKuSkZPbNssG4IApKkJOV5po6mg6oxMooXdNpab4PS0S5LMSOA==}
646
 
 
 
 
647
  '@iconify/types@2.0.0':
648
  resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
649
 
@@ -1014,6 +1023,11 @@ packages:
1014
  '@sinclair/typebox@0.27.8':
1015
  resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}
1016
 
 
 
 
 
 
1017
  '@sveltejs/acorn-typescript@1.0.5':
1018
  resolution: {integrity: sha512-IwQk4yfwLdibDlrXVE04jTZYlLnwsTT2PIOQQGNLWfjavGifnk1JD1LcZjZaBTRcxZu2FfPfNLOE04DSu9lqtQ==}
1019
  peerDependencies:
@@ -1172,6 +1186,24 @@ packages:
1172
  '@types/cookie@0.6.0':
1173
  resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
1174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1175
  '@types/estree@1.0.6':
1176
  resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==}
1177
 
@@ -1293,6 +1325,14 @@ packages:
1293
  '@vitest/utils@3.1.4':
1294
  resolution: {integrity: sha512-yriMuO1cfFhmiGc8ataN51+9ooHRuURdfAZfwFd3usWynjzpLslZdYnRegTv32qdgtJTsj15FoeZe2g15fY1gg==}
1295
 
 
 
 
 
 
 
 
 
1296
  abort-controller@3.0.0:
1297
  resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}
1298
  engines: {node: '>=6.5'}
@@ -1527,6 +1567,44 @@ packages:
1527
  resolution: {integrity: sha512-ZgW+Jgdd7i52AaLYCriF8Mxqft0gD/R9i9wi6RWBhs1pqdPEzPjym7rvRKi397WmQFf3SlyUsszhw+VVCbx79Q==}
1528
  engines: {node: '>=18'}
1529
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1530
  data-urls@5.0.0:
1531
  resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==}
1532
  engines: {node: '>=18'}
@@ -3619,6 +3697,10 @@ snapshots:
3619
  dependencies:
3620
  '@iconify/types': 2.0.0
3621
 
 
 
 
 
3622
  '@iconify/types@2.0.0': {}
3623
 
3624
  '@iconify/utils@2.3.0':
@@ -3949,6 +4031,10 @@ snapshots:
3949
 
3950
  '@sinclair/typebox@0.27.8': {}
3951
 
 
 
 
 
3952
  '@sveltejs/acorn-typescript@1.0.5(acorn@8.14.0)':
3953
  dependencies:
3954
  acorn: 8.14.0
@@ -4116,6 +4202,27 @@ snapshots:
4116
 
4117
  '@types/cookie@0.6.0': {}
4118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4119
  '@types/estree@1.0.6': {}
4120
 
4121
  '@types/hast@3.0.4':
@@ -4283,6 +4390,24 @@ snapshots:
4283
  loupe: 3.1.3
4284
  tinyrainbow: 2.0.0
4285
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4286
  abort-controller@3.0.0:
4287
  dependencies:
4288
  event-target-shim: 5.0.1
@@ -4484,6 +4609,42 @@ snapshots:
4484
  '@asamuzakjp/css-color': 3.2.0
4485
  rrweb-cssom: 0.8.0
4486
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4487
  data-urls@5.0.0:
4488
  dependencies:
4489
  whatwg-mimetype: 4.0.0
 
11
  '@tailwindcss/typography':
12
  specifier: ^0.5.16
13
  version: 0.5.16(tailwindcss@4.0.9)
14
+ '@xyflow/svelte':
15
+ specifier: ^1.2.4
16
+ version: 1.2.4(svelte@5.36.16)
17
  dequal:
18
  specifier: ^2.0.3
19
  version: 2.0.3
 
60
  '@iconify-json/material-symbols':
61
  specifier: ^1.2.15
62
  version: 1.2.15
63
+ '@iconify-json/mingcute':
64
+ specifier: ^1.2.5
65
+ version: 1.2.5
66
  '@playwright/test':
67
  specifier: ^1.49.1
68
  version: 1.52.0
 
650
  '@iconify-json/material-symbols@1.2.15':
651
  resolution: {integrity: sha512-KkHRnMh1s08N1Olf3xk+z3ZIrke/7Ys3uUIMfKuSkZPbNssG4IApKkJOV5po6mg6oxMooXdNpab4PS0S5LMSOA==}
652
 
653
+ '@iconify-json/mingcute@1.2.5':
654
+ resolution: {integrity: sha512-LKlW4wahStprbfJcpzUnuayObOVAuztgYSy3v5oTke6cBJNfqEeE/mtMhHgpoSgGJvo5hhde2Q0+DoxKEldY2A==}
655
+
656
  '@iconify/types@2.0.0':
657
  resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
658
 
 
1023
  '@sinclair/typebox@0.27.8':
1024
  resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}
1025
 
1026
+ '@svelte-put/shortcut@4.1.0':
1027
+ resolution: {integrity: sha512-wImNEIkbxAIWFqlfuhcbC+jRPDeRa/uJGIXHMEVVD+jqL9xCwWNnkGQJ6Qb2XVszuRLHlb8SGZDL3Io/h3vs8w==}
1028
+ peerDependencies:
1029
+ svelte: ^5.1.0
1030
+
1031
  '@sveltejs/acorn-typescript@1.0.5':
1032
  resolution: {integrity: sha512-IwQk4yfwLdibDlrXVE04jTZYlLnwsTT2PIOQQGNLWfjavGifnk1JD1LcZjZaBTRcxZu2FfPfNLOE04DSu9lqtQ==}
1033
  peerDependencies:
 
1186
  '@types/cookie@0.6.0':
1187
  resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
1188
 
1189
+ '@types/d3-color@3.1.3':
1190
+ resolution: {integrity: sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==}
1191
+
1192
+ '@types/d3-drag@3.0.7':
1193
+ resolution: {integrity: sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==}
1194
+
1195
+ '@types/d3-interpolate@3.0.4':
1196
+ resolution: {integrity: sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==}
1197
+
1198
+ '@types/d3-selection@3.0.11':
1199
+ resolution: {integrity: sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==}
1200
+
1201
+ '@types/d3-transition@3.0.9':
1202
+ resolution: {integrity: sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==}
1203
+
1204
+ '@types/d3-zoom@3.0.8':
1205
+ resolution: {integrity: sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==}
1206
+
1207
  '@types/estree@1.0.6':
1208
  resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==}
1209
 
 
1325
  '@vitest/utils@3.1.4':
1326
  resolution: {integrity: sha512-yriMuO1cfFhmiGc8ataN51+9ooHRuURdfAZfwFd3usWynjzpLslZdYnRegTv32qdgtJTsj15FoeZe2g15fY1gg==}
1327
 
1328
+ '@xyflow/svelte@1.2.4':
1329
+ resolution: {integrity: sha512-CygKmc3t+KevPdx9VEWa6Q0O7DegJ6qzYrOH5dQo5zp9Inm2cYAZpkUuk64ry9Djw/gwy7EvrJTjyXetuvBGOg==}
1330
+ peerDependencies:
1331
+ svelte: ^5.25.0
1332
+
1333
+ '@xyflow/system@0.0.68':
1334
+ resolution: {integrity: sha512-QDG2wxIG4qX+uF8yzm1ULVZrcXX3MxPBoxv7O52FWsX87qIImOqifUhfa/TwsvLdzn7ic2DDBH1uI8TKbdNTYA==}
1335
+
1336
  abort-controller@3.0.0:
1337
  resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}
1338
  engines: {node: '>=6.5'}
 
1567
  resolution: {integrity: sha512-ZgW+Jgdd7i52AaLYCriF8Mxqft0gD/R9i9wi6RWBhs1pqdPEzPjym7rvRKi397WmQFf3SlyUsszhw+VVCbx79Q==}
1568
  engines: {node: '>=18'}
1569
 
1570
+ d3-color@3.1.0:
1571
+ resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==}
1572
+ engines: {node: '>=12'}
1573
+
1574
+ d3-dispatch@3.0.1:
1575
+ resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==}
1576
+ engines: {node: '>=12'}
1577
+
1578
+ d3-drag@3.0.0:
1579
+ resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==}
1580
+ engines: {node: '>=12'}
1581
+
1582
+ d3-ease@3.0.1:
1583
+ resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==}
1584
+ engines: {node: '>=12'}
1585
+
1586
+ d3-interpolate@3.0.1:
1587
+ resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==}
1588
+ engines: {node: '>=12'}
1589
+
1590
+ d3-selection@3.0.0:
1591
+ resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==}
1592
+ engines: {node: '>=12'}
1593
+
1594
+ d3-timer@3.0.1:
1595
+ resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==}
1596
+ engines: {node: '>=12'}
1597
+
1598
+ d3-transition@3.0.1:
1599
+ resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==}
1600
+ engines: {node: '>=12'}
1601
+ peerDependencies:
1602
+ d3-selection: 2 - 3
1603
+
1604
+ d3-zoom@3.0.0:
1605
+ resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==}
1606
+ engines: {node: '>=12'}
1607
+
1608
  data-urls@5.0.0:
1609
  resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==}
1610
  engines: {node: '>=18'}
 
3697
  dependencies:
3698
  '@iconify/types': 2.0.0
3699
 
3700
+ '@iconify-json/mingcute@1.2.5':
3701
+ dependencies:
3702
+ '@iconify/types': 2.0.0
3703
+
3704
  '@iconify/types@2.0.0': {}
3705
 
3706
  '@iconify/utils@2.3.0':
 
4031
 
4032
  '@sinclair/typebox@0.27.8': {}
4033
 
4034
+ '@svelte-put/shortcut@4.1.0(svelte@5.36.16)':
4035
+ dependencies:
4036
+ svelte: 5.36.16
4037
+
4038
  '@sveltejs/acorn-typescript@1.0.5(acorn@8.14.0)':
4039
  dependencies:
4040
  acorn: 8.14.0
 
4202
 
4203
  '@types/cookie@0.6.0': {}
4204
 
4205
+ '@types/d3-color@3.1.3': {}
4206
+
4207
+ '@types/d3-drag@3.0.7':
4208
+ dependencies:
4209
+ '@types/d3-selection': 3.0.11
4210
+
4211
+ '@types/d3-interpolate@3.0.4':
4212
+ dependencies:
4213
+ '@types/d3-color': 3.1.3
4214
+
4215
+ '@types/d3-selection@3.0.11': {}
4216
+
4217
+ '@types/d3-transition@3.0.9':
4218
+ dependencies:
4219
+ '@types/d3-selection': 3.0.11
4220
+
4221
+ '@types/d3-zoom@3.0.8':
4222
+ dependencies:
4223
+ '@types/d3-interpolate': 3.0.4
4224
+ '@types/d3-selection': 3.0.11
4225
+
4226
  '@types/estree@1.0.6': {}
4227
 
4228
  '@types/hast@3.0.4':
 
4390
  loupe: 3.1.3
4391
  tinyrainbow: 2.0.0
4392
 
4393
+ '@xyflow/svelte@1.2.4(svelte@5.36.16)':
4394
+ dependencies:
4395
+ '@svelte-put/shortcut': 4.1.0(svelte@5.36.16)
4396
+ '@xyflow/system': 0.0.68
4397
+ svelte: 5.36.16
4398
+
4399
+ '@xyflow/system@0.0.68':
4400
+ dependencies:
4401
+ '@types/d3-drag': 3.0.7
4402
+ '@types/d3-interpolate': 3.0.4
4403
+ '@types/d3-selection': 3.0.11
4404
+ '@types/d3-transition': 3.0.9
4405
+ '@types/d3-zoom': 3.0.8
4406
+ d3-drag: 3.0.0
4407
+ d3-interpolate: 3.0.1
4408
+ d3-selection: 3.0.0
4409
+ d3-zoom: 3.0.0
4410
+
4411
  abort-controller@3.0.0:
4412
  dependencies:
4413
  event-target-shim: 5.0.1
 
4609
  '@asamuzakjp/css-color': 3.2.0
4610
  rrweb-cssom: 0.8.0
4611
 
4612
+ d3-color@3.1.0: {}
4613
+
4614
+ d3-dispatch@3.0.1: {}
4615
+
4616
+ d3-drag@3.0.0:
4617
+ dependencies:
4618
+ d3-dispatch: 3.0.1
4619
+ d3-selection: 3.0.0
4620
+
4621
+ d3-ease@3.0.1: {}
4622
+
4623
+ d3-interpolate@3.0.1:
4624
+ dependencies:
4625
+ d3-color: 3.1.0
4626
+
4627
+ d3-selection@3.0.0: {}
4628
+
4629
+ d3-timer@3.0.1: {}
4630
+
4631
+ d3-transition@3.0.1(d3-selection@3.0.0):
4632
+ dependencies:
4633
+ d3-color: 3.1.0
4634
+ d3-dispatch: 3.0.1
4635
+ d3-ease: 3.0.1
4636
+ d3-interpolate: 3.0.1
4637
+ d3-selection: 3.0.0
4638
+ d3-timer: 3.0.1
4639
+
4640
+ d3-zoom@3.0.0:
4641
+ dependencies:
4642
+ d3-dispatch: 3.0.1
4643
+ d3-drag: 3.0.0
4644
+ d3-interpolate: 3.0.1
4645
+ d3-selection: 3.0.0
4646
+ d3-transition: 3.0.1(d3-selection@3.0.0)
4647
+
4648
  data-urls@5.0.0:
4649
  dependencies:
4650
  whatwg-mimetype: 4.0.0
src/routes/+layout.svelte CHANGED
@@ -1,11 +1,4 @@
1
  <script lang="ts">
2
- import DebugMenu from "$lib/components/debug-menu.svelte";
3
- import CustomModelConfig from "$lib/components/inference-playground/custom-model-config.svelte";
4
- import ImgPreview from "$lib/components/inference-playground/img-preview.svelte";
5
- import Prompts from "$lib/components/prompts.svelte";
6
- import QuotaModal from "$lib/components/quota-modal.svelte";
7
- import ShareModal from "$lib/components/share-modal.svelte";
8
- import { conversations } from "$lib/state/conversations.svelte";
9
  import "../app.css";
10
 
11
  interface Props {
@@ -13,7 +6,6 @@
13
  }
14
 
15
  let { children }: Props = $props();
16
- conversations.init();
17
  </script>
18
 
19
  <svelte:boundary>
@@ -22,10 +14,3 @@
22
  <!-- pending -->
23
  {/snippet}
24
  </svelte:boundary>
25
-
26
- <DebugMenu />
27
- <Prompts />
28
- <QuotaModal />
29
- <ShareModal />
30
- <CustomModelConfig />
31
- <ImgPreview />
 
1
  <script lang="ts">
 
 
 
 
 
 
 
2
  import "../app.css";
3
 
4
  interface Props {
 
6
  }
7
 
8
  let { children }: Props = $props();
 
9
  </script>
10
 
11
  <svelte:boundary>
 
14
  <!-- pending -->
15
  {/snippet}
16
  </svelte:boundary>
 
 
 
 
 
 
 
src/routes/+page.svelte CHANGED
@@ -1,5 +1,21 @@
1
  <script lang="ts">
 
 
 
 
 
 
 
2
  import Playground from "$lib/components/inference-playground/playground.svelte";
 
 
3
  </script>
4
 
5
  <Playground />
 
 
 
 
 
 
 
 
1
  <script lang="ts">
2
+ import DebugMenu from "$lib/components/debug-menu.svelte";
3
+ import CustomModelConfig from "$lib/components/inference-playground/custom-model-config.svelte";
4
+ import ImgPreview from "$lib/components/inference-playground/img-preview.svelte";
5
+ import Prompts from "$lib/components/prompts.svelte";
6
+ import QuotaModal from "$lib/components/quota-modal.svelte";
7
+ import ShareModal from "$lib/components/share-modal.svelte";
8
+ import { conversations } from "$lib/state/conversations.svelte";
9
  import Playground from "$lib/components/inference-playground/playground.svelte";
10
+
11
+ conversations.init();
12
  </script>
13
 
14
  <Playground />
15
+
16
+ <DebugMenu />
17
+ <Prompts />
18
+ <QuotaModal />
19
+ <ShareModal />
20
+ <CustomModelConfig />
21
+ <ImgPreview />
src/routes/canvas/+page.svelte ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script lang="ts">
2
+ import { Background, Controls, MiniMap, SvelteFlow, type Edge, type Node } from "@xyflow/svelte";
3
+
4
+ import "@xyflow/svelte/dist/style.css";
5
+ import ChatNode from "./chat-node.svelte";
6
+
7
+ const nodeTypes = { chat: ChatNode } as const;
8
+
9
+ let nodes = $state.raw<Node[]>([
10
+ { id: "1", position: { x: 0, y: 0 }, data: { label: "1" } },
11
+ { id: "2", position: { x: 0, y: 100 }, data: { label: "2" } },
12
+ { id: "3", position: { x: 0, y: 200 }, data: { label: "3" }, type: "chat" },
13
+ ]);
14
+
15
+ let edges = $state.raw<Edge[]>([{ id: "e1-2", source: "1", target: "2", animated: true }]);
16
+ </script>
17
+
18
+ <div style:width="100vw" style:height="100vh">
19
+ <SvelteFlow bind:nodes bind:edges fitView {nodeTypes}>
20
+ <MiniMap />
21
+ <Controls />
22
+ <Background />
23
+ </SvelteFlow>
24
+ </div>
src/routes/canvas/chat-node.svelte ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script lang="ts">
2
+ import { NodeResizeControl, Position, useSvelteFlow, type NodeProps } from "@xyflow/svelte";
3
+ import { Handle } from "@xyflow/svelte";
4
+ import IconResize from "~icons/mingcute/fullscreen-2-fill";
5
+
6
+ let { id, data }: NodeProps = $props();
7
+
8
+ let { updateNodeData } = useSvelteFlow();
9
+ </script>
10
+
11
+ <div
12
+ class="chat-node flex h-full min-h-[100px] w-full min-w-[200px]
13
+ items-start rounded border bg-white p-4"
14
+ >
15
+ <label for="text">Text:</label>
16
+ <input
17
+ class="nodrag min-w-0 shrink grow border"
18
+ name="text"
19
+ value={data.text}
20
+ oninput={evt => {
21
+ updateNodeData(id, { text: evt.currentTarget.value });
22
+ }}
23
+ />
24
+ </div>
25
+
26
+ <Handle type="target" position={Position.Top} />
27
+ <Handle type="source" position={Position.Bottom} />
28
+
29
+ <NodeResizeControl minWidth={200} minHeight={100} style="background: transparent; border: none;">
30
+ <IconResize class="absolute right-2 bottom-2 -scale-x-100 text-blue-500" />
31
+ </NodeResizeControl>