Skip to content

Commit ee58546

Browse files
committed
Fix elements cannot be imported on web
1 parent eda1aa0 commit ee58546

File tree

6 files changed

+197
-187
lines changed

6 files changed

+197
-187
lines changed

app/android/Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GEM
1111
artifactory (3.0.17)
1212
atomos (0.1.3)
1313
aws-eventstream (1.4.0)
14-
aws-partitions (1.1173.0)
14+
aws-partitions (1.1174.0)
1515
aws-sdk-core (3.233.0)
1616
aws-eventstream (~> 1, >= 1.3.0)
1717
aws-partitions (~> 1, >= 1.992.0)
@@ -20,7 +20,7 @@ GEM
2020
bigdecimal
2121
jmespath (~> 1, >= 1.6.1)
2222
logger
23-
aws-sdk-kms (1.113.0)
23+
aws-sdk-kms (1.114.0)
2424
aws-sdk-core (~> 3, >= 3.231.0)
2525
aws-sigv4 (~> 1.5)
2626
aws-sdk-s3 (1.200.0)

app/lib/bloc/document_bloc.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ Future<(NoteData, List<PadElement>)> importAssetsAsync(
5959
ReceivePort? port;
6060
StreamSubscription? subscription;
6161
try {
62+
if (kIsWeb) {
63+
return importAssets((
64+
data,
65+
elements,
66+
onInvalidate: onInvalidate,
67+
alreadyImported: alreadyImported,
68+
assets: assets,
69+
));
70+
}
6271
if (onInvalidate != null) {
6372
port = ReceivePort();
6473
subscription = port.listen((message) {

app/pubspec.lock

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ packages:
156156
dependency: transitive
157157
description:
158158
name: camera_android_camerax
159-
sha256: "2c0746d55f513bed55f52e0b5d9bda18c1533bb16bb89ea93d8033f3815e6cd8"
159+
sha256: "92dcc36e8ff2fa1ea3acdbb609ca2976cded55dceb719b4869c124c6d011f110"
160160
url: "https://pub.dev"
161161
source: hosted
162-
version: "0.6.23+1"
162+
version: "0.6.23+2"
163163
camera_avfoundation:
164164
dependency: transitive
165165
description:
@@ -413,10 +413,10 @@ packages:
413413
dependency: transitive
414414
description:
415415
name: file_selector_ios
416-
sha256: fe9f52123af16bba4ad65bd7e03defbbb4b172a38a8e6aaa2a869a0c56a5f5fb
416+
sha256: fc3c3fc567cd9bcae784dfeb98d37c46a8ded9e8757d37ea67e975c399bc14e0
417417
url: "https://pub.dev"
418418
source: hosted
419-
version: "0.5.3+2"
419+
version: "0.5.3+3"
420420
file_selector_linux:
421421
dependency: transitive
422422
description:
@@ -429,10 +429,10 @@ packages:
429429
dependency: transitive
430430
description:
431431
name: file_selector_macos
432-
sha256: "19124ff4a3d8864fdc62072b6a2ef6c222d55a3404fe14893a3c02744907b60c"
432+
sha256: "88707a3bec4b988aaed3b4df5d7441ee4e987f20b286cddca5d6a8270cab23f2"
433433
url: "https://pub.dev"
434434
source: hosted
435-
version: "0.9.4+4"
435+
version: "0.9.4+5"
436436
file_selector_platform_interface:
437437
dependency: transitive
438438
description:
@@ -532,10 +532,10 @@ packages:
532532
dependency: transitive
533533
description:
534534
name: flutter_plugin_android_lifecycle
535-
sha256: c2fe1001710127dfa7da89977a08d591398370d099aacdaa6d44da7eb14b8476
535+
sha256: "306f0596590e077338312f38837f595c04f28d6cdeeac392d3d74df2f0003687"
536536
url: "https://pub.dev"
537537
source: hosted
538-
version: "2.0.31"
538+
version: "2.0.32"
539539
flutter_secure_storage:
540540
dependency: "direct main"
541541
description:
@@ -643,10 +643,10 @@ packages:
643643
dependency: "direct main"
644644
description:
645645
name: go_router
646-
sha256: c752e2d08d088bf83742cb05bf83003f3e9d276ff1519b5c92f9d5e60e5ddd23
646+
sha256: e1d7ffb0db475e6e845eb58b44768f50b830e23960e3df6908924acd8f7f70ea
647647
url: "https://pub.dev"
648648
source: hosted
649-
version: "16.2.4"
649+
version: "16.2.5"
650650
graphs:
651651
dependency: transitive
652652
description:
@@ -1000,18 +1000,18 @@ packages:
10001000
dependency: transitive
10011001
description:
10021002
name: path_provider_android
1003-
sha256: "3b4c1fc3aa55ddc9cd4aa6759984330d5c8e66aa7702a6223c61540dc6380c37"
1003+
sha256: e122c5ea805bb6773bb12ce667611265980940145be920cd09a4b0ec0285cb16
10041004
url: "https://pub.dev"
10051005
source: hosted
1006-
version: "2.2.19"
1006+
version: "2.2.20"
10071007
path_provider_foundation:
10081008
dependency: transitive
10091009
description:
10101010
name: path_provider_foundation
1011-
sha256: "16eef174aacb07e09c351502740fa6254c165757638eba1e9116b0a781201bbd"
1011+
sha256: efaec349ddfc181528345c56f8eda9d6cccd71c177511b132c6a0ddaefaa2738
10121012
url: "https://pub.dev"
10131013
source: hosted
1014-
version: "2.4.2"
1014+
version: "2.4.3"
10151015
path_provider_linux:
10161016
dependency: transitive
10171017
description:
@@ -1280,10 +1280,10 @@ packages:
12801280
dependency: transitive
12811281
description:
12821282
name: shared_preferences_foundation
1283-
sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03"
1283+
sha256: "1c33a907142607c40a7542768ec9badfd16293bac51da3a4482623d15845f88b"
12841284
url: "https://pub.dev"
12851285
source: hosted
1286-
version: "2.5.4"
1286+
version: "2.5.5"
12871287
shared_preferences_linux:
12881288
dependency: transitive
12891289
description:
@@ -1502,10 +1502,10 @@ packages:
15021502
dependency: transitive
15031503
description:
15041504
name: url_launcher_ios
1505-
sha256: d80b3f567a617cb923546034cc94bfe44eb15f989fe670b37f26abdb9d939cb7
1505+
sha256: "6b63f1441e4f653ae799166a72b50b1767321ecc263a57aadf825a7a2a5477d9"
15061506
url: "https://pub.dev"
15071507
source: hosted
1508-
version: "6.3.4"
1508+
version: "6.3.5"
15091509
url_launcher_linux:
15101510
dependency: transitive
15111511
description:
@@ -1518,10 +1518,10 @@ packages:
15181518
dependency: transitive
15191519
description:
15201520
name: url_launcher_macos
1521-
sha256: c043a77d6600ac9c38300567f33ef12b0ef4f4783a2c1f00231d2b1941fea13f
1521+
sha256: "8262208506252a3ed4ff5c0dc1e973d2c0e0ef337d0a074d35634da5d44397c9"
15221522
url: "https://pub.dev"
15231523
source: hosted
1524-
version: "3.2.3"
1524+
version: "3.2.4"
15251525
url_launcher_platform_interface:
15261526
dependency: transitive
15271527
description:

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@phosphor-icons/react": "^2.1.10",
1717
"@types/react": "^19.2.2",
1818
"@types/react-dom": "^19.2.2",
19-
"astro": "^5.14.5",
19+
"astro": "^5.14.6",
2020
"react": "^19.2.0",
2121
"react-dom": "^19.2.0",
2222
"remark-gemoji": "^8.0.0",

0 commit comments

Comments
 (0)