@ai-matrx/media 0.5.3 → 0.5.5
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 +20 -0
- package/dist/react.cjs +9 -14
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +9 -14
- package/dist/react.js.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @ai-matrx/media
|
|
2
2
|
|
|
3
|
+
## 0.5.5
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/media/v0.5.4..npm/media/v0.5.5 -- apps/shared/media`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.5.4 — 2026-09-11
|
|
10
|
+
|
|
11
|
+
### Consumer action (C28)
|
|
12
|
+
|
|
13
|
+
- Upgrade. No API change; private thumbnail recovery now enforces its existing
|
|
14
|
+
single-retry contract across the temporary source-clear/re-read transition.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Blob-backed thumbnails keep their recovery attempt state in the stable
|
|
19
|
+
thumbnail owner. Refreshing a revoked object URL can no longer remount the
|
|
20
|
+
recovery hook, reset attempt two to attempt one, and permit an unbounded
|
|
21
|
+
retry loop.
|
|
22
|
+
|
|
3
23
|
## 0.5.3
|
|
4
24
|
|
|
5
25
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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)(() => {
|