@ai-matrx/media 0.5.3 → 0.5.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @ai-matrx/media
2
2
 
3
+ ## 0.5.4 — 2026-09-11
4
+
5
+ ### Consumer action (C28)
6
+
7
+ - Upgrade. No API change; private thumbnail recovery now enforces its existing
8
+ single-retry contract across the temporary source-clear/re-read transition.
9
+
10
+ ### Fixed
11
+
12
+ - Blob-backed thumbnails keep their recovery attempt state in the stable
13
+ thumbnail owner. Refreshing a revoked object URL can no longer remount the
14
+ recovery hook, reset attempt two to attempt one, and permit an unbounded
15
+ retry loop.
16
+
3
17
  ## 0.5.3
4
18
 
5
19
  Automatic changed-only republish (docs/metadata drift since the last tag — see
package/dist/react.cjs CHANGED
@@ -1538,6 +1538,11 @@ function MediaThumbnail({
1538
1538
  thumbnailUrl,
1539
1539
  allowSourceFallback
1540
1540
  });
1541
+ const blobRecovery = useMediaBlobLoadRecovery(
1542
+ source.blobBacked ? mediaRef : null,
1543
+ source.blobBacked ? source.src : null,
1544
+ { onRetry: source.retryBlob }
1545
+ );
1541
1546
  const fallback = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex h-full w-full items-center justify-center bg-muted/40", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FileIcon2, { fileName, mimeType, size: iconSize }) });
1542
1547
  let body = source.loading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "h-full w-full animate-pulse bg-muted" }) : fallback;
1543
1548
  if (source.src) {
@@ -1549,7 +1554,7 @@ function MediaThumbnail({
1549
1554
  mediaRef,
1550
1555
  recoverable: source.recoverable,
1551
1556
  blobBacked: source.blobBacked,
1552
- retryBlob: source.retryBlob,
1557
+ blobRecovery,
1553
1558
  fallback
1554
1559
  }
1555
1560
  );
@@ -1562,7 +1567,7 @@ function MediaThumbnail({
1562
1567
  mediaRef,
1563
1568
  recoverable: source.recoverable,
1564
1569
  blobBacked: source.blobBacked,
1565
- retryBlob: source.retryBlob,
1570
+ blobRecovery,
1566
1571
  fallback
1567
1572
  }
1568
1573
  );
@@ -1582,18 +1587,13 @@ function ImageThumb({
1582
1587
  mediaRef,
1583
1588
  recoverable,
1584
1589
  blobBacked,
1585
- retryBlob,
1590
+ blobRecovery,
1586
1591
  fallback
1587
1592
  }) {
1588
1593
  const { retryKey, onLoadError, failed } = useMediaLoadRecovery(url, {
1589
1594
  recoverable,
1590
1595
  failureRef: mediaRef
1591
1596
  });
1592
- const blobRecovery = useMediaBlobLoadRecovery(
1593
- blobBacked ? mediaRef : null,
1594
- blobBacked ? url : null,
1595
- { onRetry: retryBlob }
1596
- );
1597
1597
  const activeRecovery = blobBacked ? { retryKey: 0, ...blobRecovery } : { retryKey, onLoadError, failed };
1598
1598
  if (activeRecovery.failed) return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: fallback });
1599
1599
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
@@ -1613,18 +1613,13 @@ function VideoPosterThumb({
1613
1613
  mediaRef,
1614
1614
  recoverable,
1615
1615
  blobBacked,
1616
- retryBlob,
1616
+ blobRecovery,
1617
1617
  fallback
1618
1618
  }) {
1619
1619
  const { retryKey, onLoadError, failed } = useMediaLoadRecovery(url, {
1620
1620
  recoverable,
1621
1621
  failureRef: mediaRef
1622
1622
  });
1623
- const blobRecovery = useMediaBlobLoadRecovery(
1624
- blobBacked ? mediaRef : null,
1625
- blobBacked ? url : null,
1626
- { onRetry: retryBlob }
1627
- );
1628
1623
  const activeRecovery = blobBacked ? { retryKey: 0, ...blobRecovery } : { retryKey, onLoadError, failed };
1629
1624
  const ref = (0, import_react9.useRef)(null);
1630
1625
  (0, import_react9.useEffect)(() => {