@burdenoff/website-sdk 2026.829.6 → 2026.829.8
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 +29 -21
- package/dist/components/explore.js.map +1 -1
- package/dist/components/explore.mjs +29 -21
- package/dist/components/explore.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +29 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -21
- 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);
|
|
@@ -3456,35 +3457,42 @@ function ExplorePage({
|
|
|
3456
3457
|
setTimeout(() => setShareLabel("Share"), 2500);
|
|
3457
3458
|
return;
|
|
3458
3459
|
}
|
|
3459
|
-
const
|
|
3460
|
-
|
|
3460
|
+
const url = new URL(pageUrl ?? window.location.href);
|
|
3461
|
+
url.search = "";
|
|
3462
|
+
url.hash = "";
|
|
3463
|
+
url.searchParams.set("c", token);
|
|
3464
|
+
const shareable = url.toString();
|
|
3461
3465
|
try {
|
|
3462
|
-
await navigator.clipboard.writeText(
|
|
3466
|
+
await navigator.clipboard.writeText(shareable);
|
|
3463
3467
|
setShareLabel("Copied");
|
|
3464
3468
|
setTimeout(() => setShareLabel("Share"), 2500);
|
|
3465
3469
|
} catch {
|
|
3466
|
-
setShareUrl(
|
|
3470
|
+
setShareUrl(shareable);
|
|
3467
3471
|
setShareLabel("Share");
|
|
3468
3472
|
}
|
|
3469
3473
|
}, [createShareLink, pageUrl]);
|
|
3470
3474
|
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
|
-
|
|
3475
|
+
(picked) => {
|
|
3476
|
+
if (!picked || picked.length === 0) return pickQueueRef.current;
|
|
3477
|
+
const files = Array.from(picked);
|
|
3478
|
+
pickQueueRef.current = pickQueueRef.current.then(async () => {
|
|
3479
|
+
const { accepted, rejected } = await stageFiles(
|
|
3480
|
+
files,
|
|
3481
|
+
stagedRef.current
|
|
3482
|
+
);
|
|
3483
|
+
setStaged((prev) => [...prev, ...accepted]);
|
|
3484
|
+
const first = rejected[0];
|
|
3485
|
+
setAttachmentNotice(
|
|
3486
|
+
first ? first.reason === "too-large" ? fill(T.attachmentTooLarge, {
|
|
3487
|
+
name: first.name,
|
|
3488
|
+
size: String(MAX_ATTACHMENT_BYTES / (1024 * 1024))
|
|
3489
|
+
}) : fill(T.attachmentTooMany, {
|
|
3490
|
+
name: first.name,
|
|
3491
|
+
max: String(MAX_ATTACHMENTS)
|
|
3492
|
+
}) : null
|
|
3493
|
+
);
|
|
3494
|
+
});
|
|
3495
|
+
return pickQueueRef.current;
|
|
3488
3496
|
},
|
|
3489
3497
|
[T]
|
|
3490
3498
|
);
|