@burdenoff/website-sdk 2026.829.6 → 2026.829.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/explore.js +22 -17
- package/dist/components/explore.js.map +1 -1
- package/dist/components/explore.mjs +22 -17
- package/dist/components/explore.mjs.map +1 -1
- package/dist/index.js +22 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3391,6 +3391,7 @@ function ExplorePage({
|
|
|
3391
3391
|
const fileInputRef = React.useRef(null);
|
|
3392
3392
|
const stagedRef = React.useRef([]);
|
|
3393
3393
|
stagedRef.current = staged;
|
|
3394
|
+
const pickQueueRef = React.useRef(Promise.resolve());
|
|
3394
3395
|
const [shareLabel, setShareLabel] = React.useState("Share");
|
|
3395
3396
|
const [shareUrl, setShareUrl] = React.useState(null);
|
|
3396
3397
|
const scrollRef = React.useRef(null);
|
|
@@ -3468,23 +3469,27 @@ function ExplorePage({
|
|
|
3468
3469
|
}
|
|
3469
3470
|
}, [createShareLink, pageUrl]);
|
|
3470
3471
|
const handleFilesPicked = React.useCallback(
|
|
3471
|
-
|
|
3472
|
-
if (!picked || picked.length === 0) return;
|
|
3473
|
-
const
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3472
|
+
(picked) => {
|
|
3473
|
+
if (!picked || picked.length === 0) return pickQueueRef.current;
|
|
3474
|
+
const files = Array.from(picked);
|
|
3475
|
+
pickQueueRef.current = pickQueueRef.current.then(async () => {
|
|
3476
|
+
const { accepted, rejected } = await stageFiles(
|
|
3477
|
+
files,
|
|
3478
|
+
stagedRef.current
|
|
3479
|
+
);
|
|
3480
|
+
setStaged((prev) => [...prev, ...accepted]);
|
|
3481
|
+
const first = rejected[0];
|
|
3482
|
+
setAttachmentNotice(
|
|
3483
|
+
first ? first.reason === "too-large" ? fill(T.attachmentTooLarge, {
|
|
3484
|
+
name: first.name,
|
|
3485
|
+
size: String(MAX_ATTACHMENT_BYTES / (1024 * 1024))
|
|
3486
|
+
}) : fill(T.attachmentTooMany, {
|
|
3487
|
+
name: first.name,
|
|
3488
|
+
max: String(MAX_ATTACHMENTS)
|
|
3489
|
+
}) : null
|
|
3490
|
+
);
|
|
3491
|
+
});
|
|
3492
|
+
return pickQueueRef.current;
|
|
3488
3493
|
},
|
|
3489
3494
|
[T]
|
|
3490
3495
|
);
|