@ai-matrx/media 0.5.1 → 0.5.3
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 +19 -0
- package/dist/react.cjs +8 -0
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +8 -0
- package/dist/react.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @ai-matrx/media
|
|
2
2
|
|
|
3
|
+
## 0.5.3
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/media/v0.5.2..npm/media/v0.5.3 -- apps/shared/media`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.5.2 — 2026-09-09
|
|
10
|
+
|
|
11
|
+
### Consumer action (C28)
|
|
12
|
+
|
|
13
|
+
- Upgrade. No API change; late object-URL recovery results cannot affect a
|
|
14
|
+
replacement file or an unmounted renderer.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Blob recovery verdicts and rejections are scoped to the mounted file
|
|
19
|
+
generation. Selecting another file invalidates the old completion without
|
|
20
|
+
changing the client-owned retry allowance or current-file diagnostics.
|
|
21
|
+
|
|
3
22
|
## 0.5.1 — 2026-09-08
|
|
4
23
|
|
|
5
24
|
### Consumer action (C28)
|
package/dist/react.cjs
CHANGED
|
@@ -688,13 +688,18 @@ function useMediaBlobLoadRecovery(ref, source, options) {
|
|
|
688
688
|
const refKey = stableRefKey(ref);
|
|
689
689
|
const [failed, setFailed] = (0, import_react4.useState)(false);
|
|
690
690
|
const attemptRef = (0, import_react4.useRef)(0);
|
|
691
|
+
const generationRef = (0, import_react4.useRef)(0);
|
|
691
692
|
const recoveryInFlightRef = (0, import_react4.useRef)(false);
|
|
692
693
|
const onRetry = options.onRetry;
|
|
693
694
|
const onTerminal = options.onTerminal;
|
|
694
695
|
(0, import_react4.useEffect)(() => {
|
|
696
|
+
generationRef.current += 1;
|
|
695
697
|
attemptRef.current = 0;
|
|
696
698
|
recoveryInFlightRef.current = false;
|
|
697
699
|
setFailed(false);
|
|
700
|
+
return () => {
|
|
701
|
+
generationRef.current += 1;
|
|
702
|
+
};
|
|
698
703
|
}, [refKey]);
|
|
699
704
|
(0, import_react4.useEffect)(() => {
|
|
700
705
|
recoveryInFlightRef.current = false;
|
|
@@ -719,6 +724,7 @@ function useMediaBlobLoadRecovery(ref, source, options) {
|
|
|
719
724
|
recoveryInFlightRef.current = true;
|
|
720
725
|
attemptRef.current += 1;
|
|
721
726
|
const attempt = attemptRef.current;
|
|
727
|
+
const generation = generationRef.current;
|
|
722
728
|
const recover = client.recoverBlobLoadError;
|
|
723
729
|
if (!ref || !recover) {
|
|
724
730
|
finishTerminal(
|
|
@@ -730,6 +736,7 @@ function useMediaBlobLoadRecovery(ref, source, options) {
|
|
|
730
736
|
}
|
|
731
737
|
recover(ref, attempt).then(
|
|
732
738
|
(verdict) => {
|
|
739
|
+
if (generation !== generationRef.current) return;
|
|
733
740
|
if (verdict === "retry") {
|
|
734
741
|
setFailed(false);
|
|
735
742
|
onRetry();
|
|
@@ -742,6 +749,7 @@ function useMediaBlobLoadRecovery(ref, source, options) {
|
|
|
742
749
|
);
|
|
743
750
|
},
|
|
744
751
|
(err) => {
|
|
752
|
+
if (generation !== generationRef.current) return;
|
|
745
753
|
finishTerminal(
|
|
746
754
|
event,
|
|
747
755
|
attempt,
|