@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.
@@ -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);
@@ -3442,23 +3443,27 @@ function ExplorePage({
3442
3443
  }
3443
3444
  }, [createShareLink, pageUrl]);
3444
3445
  const handleFilesPicked = useCallback(
3445
- async (picked) => {
3446
- if (!picked || picked.length === 0) return;
3447
- const { accepted, rejected } = await stageFiles(
3448
- Array.from(picked),
3449
- stagedRef.current
3450
- );
3451
- setStaged((prev) => [...prev, ...accepted]);
3452
- const first = rejected[0];
3453
- setAttachmentNotice(
3454
- first ? first.reason === "too-large" ? fill(T.attachmentTooLarge, {
3455
- name: first.name,
3456
- size: String(MAX_ATTACHMENT_BYTES / (1024 * 1024))
3457
- }) : fill(T.attachmentTooMany, {
3458
- name: first.name,
3459
- max: String(MAX_ATTACHMENTS)
3460
- }) : null
3461
- );
3446
+ (picked) => {
3447
+ if (!picked || picked.length === 0) return pickQueueRef.current;
3448
+ const files = Array.from(picked);
3449
+ pickQueueRef.current = pickQueueRef.current.then(async () => {
3450
+ const { accepted, rejected } = await stageFiles(
3451
+ files,
3452
+ stagedRef.current
3453
+ );
3454
+ setStaged((prev) => [...prev, ...accepted]);
3455
+ const first = rejected[0];
3456
+ setAttachmentNotice(
3457
+ first ? first.reason === "too-large" ? fill(T.attachmentTooLarge, {
3458
+ name: first.name,
3459
+ size: String(MAX_ATTACHMENT_BYTES / (1024 * 1024))
3460
+ }) : fill(T.attachmentTooMany, {
3461
+ name: first.name,
3462
+ max: String(MAX_ATTACHMENTS)
3463
+ }) : null
3464
+ );
3465
+ });
3466
+ return pickQueueRef.current;
3462
3467
  },
3463
3468
  [T]
3464
3469
  );