@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
package/dist/index.mjs
CHANGED
|
@@ -7706,6 +7706,7 @@ function ExplorePage({
|
|
|
7706
7706
|
const fileInputRef = useRef(null);
|
|
7707
7707
|
const stagedRef = useRef([]);
|
|
7708
7708
|
stagedRef.current = staged;
|
|
7709
|
+
const pickQueueRef = useRef(Promise.resolve());
|
|
7709
7710
|
const [shareLabel, setShareLabel] = useState("Share");
|
|
7710
7711
|
const [shareUrl, setShareUrl] = useState(null);
|
|
7711
7712
|
const scrollRef = useRef(null);
|
|
@@ -7771,35 +7772,42 @@ function ExplorePage({
|
|
|
7771
7772
|
setTimeout(() => setShareLabel("Share"), 2500);
|
|
7772
7773
|
return;
|
|
7773
7774
|
}
|
|
7774
|
-
const
|
|
7775
|
-
|
|
7775
|
+
const url = new URL(pageUrl ?? window.location.href);
|
|
7776
|
+
url.search = "";
|
|
7777
|
+
url.hash = "";
|
|
7778
|
+
url.searchParams.set("c", token);
|
|
7779
|
+
const shareable = url.toString();
|
|
7776
7780
|
try {
|
|
7777
|
-
await navigator.clipboard.writeText(
|
|
7781
|
+
await navigator.clipboard.writeText(shareable);
|
|
7778
7782
|
setShareLabel("Copied");
|
|
7779
7783
|
setTimeout(() => setShareLabel("Share"), 2500);
|
|
7780
7784
|
} catch {
|
|
7781
|
-
setShareUrl(
|
|
7785
|
+
setShareUrl(shareable);
|
|
7782
7786
|
setShareLabel("Share");
|
|
7783
7787
|
}
|
|
7784
7788
|
}, [createShareLink, pageUrl]);
|
|
7785
7789
|
const handleFilesPicked = useCallback(
|
|
7786
|
-
|
|
7787
|
-
if (!picked || picked.length === 0) return;
|
|
7788
|
-
const
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7790
|
+
(picked) => {
|
|
7791
|
+
if (!picked || picked.length === 0) return pickQueueRef.current;
|
|
7792
|
+
const files = Array.from(picked);
|
|
7793
|
+
pickQueueRef.current = pickQueueRef.current.then(async () => {
|
|
7794
|
+
const { accepted, rejected } = await stageFiles(
|
|
7795
|
+
files,
|
|
7796
|
+
stagedRef.current
|
|
7797
|
+
);
|
|
7798
|
+
setStaged((prev) => [...prev, ...accepted]);
|
|
7799
|
+
const first = rejected[0];
|
|
7800
|
+
setAttachmentNotice(
|
|
7801
|
+
first ? first.reason === "too-large" ? fill(T.attachmentTooLarge, {
|
|
7802
|
+
name: first.name,
|
|
7803
|
+
size: String(MAX_ATTACHMENT_BYTES / (1024 * 1024))
|
|
7804
|
+
}) : fill(T.attachmentTooMany, {
|
|
7805
|
+
name: first.name,
|
|
7806
|
+
max: String(MAX_ATTACHMENTS)
|
|
7807
|
+
}) : null
|
|
7808
|
+
);
|
|
7809
|
+
});
|
|
7810
|
+
return pickQueueRef.current;
|
|
7803
7811
|
},
|
|
7804
7812
|
[T]
|
|
7805
7813
|
);
|