@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/index.js CHANGED
@@ -7736,6 +7736,7 @@ function ExplorePage({
7736
7736
  const fileInputRef = React.useRef(null);
7737
7737
  const stagedRef = React.useRef([]);
7738
7738
  stagedRef.current = staged;
7739
+ const pickQueueRef = React.useRef(Promise.resolve());
7739
7740
  const [shareLabel, setShareLabel] = React.useState("Share");
7740
7741
  const [shareUrl, setShareUrl] = React.useState(null);
7741
7742
  const scrollRef = React.useRef(null);
@@ -7813,23 +7814,27 @@ function ExplorePage({
7813
7814
  }
7814
7815
  }, [createShareLink, pageUrl]);
7815
7816
  const handleFilesPicked = React.useCallback(
7816
- async (picked) => {
7817
- if (!picked || picked.length === 0) return;
7818
- const { accepted, rejected } = await stageFiles(
7819
- Array.from(picked),
7820
- stagedRef.current
7821
- );
7822
- setStaged((prev) => [...prev, ...accepted]);
7823
- const first = rejected[0];
7824
- setAttachmentNotice(
7825
- first ? first.reason === "too-large" ? fill(T.attachmentTooLarge, {
7826
- name: first.name,
7827
- size: String(MAX_ATTACHMENT_BYTES / (1024 * 1024))
7828
- }) : fill(T.attachmentTooMany, {
7829
- name: first.name,
7830
- max: String(MAX_ATTACHMENTS)
7831
- }) : null
7832
- );
7817
+ (picked) => {
7818
+ if (!picked || picked.length === 0) return pickQueueRef.current;
7819
+ const files = Array.from(picked);
7820
+ pickQueueRef.current = pickQueueRef.current.then(async () => {
7821
+ const { accepted, rejected } = await stageFiles(
7822
+ files,
7823
+ stagedRef.current
7824
+ );
7825
+ setStaged((prev) => [...prev, ...accepted]);
7826
+ const first = rejected[0];
7827
+ setAttachmentNotice(
7828
+ first ? first.reason === "too-large" ? fill(T.attachmentTooLarge, {
7829
+ name: first.name,
7830
+ size: String(MAX_ATTACHMENT_BYTES / (1024 * 1024))
7831
+ }) : fill(T.attachmentTooMany, {
7832
+ name: first.name,
7833
+ max: String(MAX_ATTACHMENTS)
7834
+ }) : null
7835
+ );
7836
+ });
7837
+ return pickQueueRef.current;
7833
7838
  },
7834
7839
  [T]
7835
7840
  );