@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.
@@ -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);
@@ -3468,23 +3469,27 @@ function ExplorePage({
3468
3469
  }
3469
3470
  }, [createShareLink, pageUrl]);
3470
3471
  const handleFilesPicked = React.useCallback(
3471
- async (picked) => {
3472
- if (!picked || picked.length === 0) return;
3473
- const { accepted, rejected } = await stageFiles(
3474
- Array.from(picked),
3475
- stagedRef.current
3476
- );
3477
- setStaged((prev) => [...prev, ...accepted]);
3478
- const first = rejected[0];
3479
- setAttachmentNotice(
3480
- first ? first.reason === "too-large" ? fill(T.attachmentTooLarge, {
3481
- name: first.name,
3482
- size: String(MAX_ATTACHMENT_BYTES / (1024 * 1024))
3483
- }) : fill(T.attachmentTooMany, {
3484
- name: first.name,
3485
- max: String(MAX_ATTACHMENTS)
3486
- }) : null
3487
- );
3472
+ (picked) => {
3473
+ if (!picked || picked.length === 0) return pickQueueRef.current;
3474
+ const files = Array.from(picked);
3475
+ pickQueueRef.current = pickQueueRef.current.then(async () => {
3476
+ const { accepted, rejected } = await stageFiles(
3477
+ files,
3478
+ stagedRef.current
3479
+ );
3480
+ setStaged((prev) => [...prev, ...accepted]);
3481
+ const first = rejected[0];
3482
+ setAttachmentNotice(
3483
+ first ? first.reason === "too-large" ? fill(T.attachmentTooLarge, {
3484
+ name: first.name,
3485
+ size: String(MAX_ATTACHMENT_BYTES / (1024 * 1024))
3486
+ }) : fill(T.attachmentTooMany, {
3487
+ name: first.name,
3488
+ max: String(MAX_ATTACHMENTS)
3489
+ }) : null
3490
+ );
3491
+ });
3492
+ return pickQueueRef.current;
3488
3493
  },
3489
3494
  [T]
3490
3495
  );