@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
|
@@ -3365,6 +3365,7 @@ function ExplorePage({
|
|
|
3365
3365
|
const fileInputRef = useRef(null);
|
|
3366
3366
|
const stagedRef = useRef([]);
|
|
3367
3367
|
stagedRef.current = staged;
|
|
3368
|
+
const pickQueueRef = useRef(Promise.resolve());
|
|
3368
3369
|
const [shareLabel, setShareLabel] = useState("Share");
|
|
3369
3370
|
const [shareUrl, setShareUrl] = useState(null);
|
|
3370
3371
|
const scrollRef = useRef(null);
|
|
@@ -3430,35 +3431,42 @@ function ExplorePage({
|
|
|
3430
3431
|
setTimeout(() => setShareLabel("Share"), 2500);
|
|
3431
3432
|
return;
|
|
3432
3433
|
}
|
|
3433
|
-
const
|
|
3434
|
-
|
|
3434
|
+
const url = new URL(pageUrl ?? window.location.href);
|
|
3435
|
+
url.search = "";
|
|
3436
|
+
url.hash = "";
|
|
3437
|
+
url.searchParams.set("c", token);
|
|
3438
|
+
const shareable = url.toString();
|
|
3435
3439
|
try {
|
|
3436
|
-
await navigator.clipboard.writeText(
|
|
3440
|
+
await navigator.clipboard.writeText(shareable);
|
|
3437
3441
|
setShareLabel("Copied");
|
|
3438
3442
|
setTimeout(() => setShareLabel("Share"), 2500);
|
|
3439
3443
|
} catch {
|
|
3440
|
-
setShareUrl(
|
|
3444
|
+
setShareUrl(shareable);
|
|
3441
3445
|
setShareLabel("Share");
|
|
3442
3446
|
}
|
|
3443
3447
|
}, [createShareLink, pageUrl]);
|
|
3444
3448
|
const handleFilesPicked = useCallback(
|
|
3445
|
-
|
|
3446
|
-
if (!picked || picked.length === 0) return;
|
|
3447
|
-
const
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3449
|
+
(picked) => {
|
|
3450
|
+
if (!picked || picked.length === 0) return pickQueueRef.current;
|
|
3451
|
+
const files = Array.from(picked);
|
|
3452
|
+
pickQueueRef.current = pickQueueRef.current.then(async () => {
|
|
3453
|
+
const { accepted, rejected } = await stageFiles(
|
|
3454
|
+
files,
|
|
3455
|
+
stagedRef.current
|
|
3456
|
+
);
|
|
3457
|
+
setStaged((prev) => [...prev, ...accepted]);
|
|
3458
|
+
const first = rejected[0];
|
|
3459
|
+
setAttachmentNotice(
|
|
3460
|
+
first ? first.reason === "too-large" ? fill(T.attachmentTooLarge, {
|
|
3461
|
+
name: first.name,
|
|
3462
|
+
size: String(MAX_ATTACHMENT_BYTES / (1024 * 1024))
|
|
3463
|
+
}) : fill(T.attachmentTooMany, {
|
|
3464
|
+
name: first.name,
|
|
3465
|
+
max: String(MAX_ATTACHMENTS)
|
|
3466
|
+
}) : null
|
|
3467
|
+
);
|
|
3468
|
+
});
|
|
3469
|
+
return pickQueueRef.current;
|
|
3462
3470
|
},
|
|
3463
3471
|
[T]
|
|
3464
3472
|
);
|