@snowcone-app/ui 0.10.8 → 0.10.10
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 +15 -0
- package/dist/index.cjs +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/composed/HeroProductImage.tsx +9 -0
- package/src/composed/__tests__/HeroProductImage.failed.test.tsx +37 -0
- package/src/patterns/RealtimeProvider.tsx +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#4643](https://github.com/snowcone-app/snowcone-monorepo/pull/4643) [`af17a28`](https://github.com/snowcone-app/snowcone-monorepo/commit/af17a28ff9a11fa6e59efb83aff3c8dae863a082) Thanks [@kevinsproles](https://github.com/kevinsproles)! - Realtime frame flow control: an `all_mockups_rendered` summary that arrives before its frames (they wait behind the ack window) no longer replaces the frame a picture still has to draw. It was lost, never drawn or acked, and the box waited out its 5 s ack timeout (`E_RT_ACK_TIMEOUT`) on every picture of the gallery. A frame dropped by the per-picture bound (`E_BLOB_PICTURE_BOUND`) is now acked too.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`af17a28`](https://github.com/snowcone-app/snowcone-monorepo/commit/af17a28ff9a11fa6e59efb83aff3c8dae863a082)]:
|
|
10
|
+
- @snowcone-app/sdk@0.29.1
|
|
11
|
+
|
|
12
|
+
## 0.10.9
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#4594](https://github.com/snowcone-app/snowcone-monorepo/pull/4594) [`c753dca`](https://github.com/snowcone-app/snowcone-monorepo/commit/c753dcacb0056c95848ddc9942502902d043f4f5) Thanks [@kevinsproles](https://github.com/kevinsproles)! - `HeroProductImage` stamps a picture that fails to display: after its one retry, the root carries `data-picture-failed="E_PICTURE_UNDISPLAYED"` and `data-picture-failed-src` (the URL's host and path, never its query). It's cleared when a picture loads. Before this, the failed `<img>` was removed and nothing said so, which is how Firefox showing none of our AVIF store pictures went unseen.
|
|
17
|
+
|
|
3
18
|
## 0.10.8
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -6322,6 +6322,7 @@ function RealtimeProvider({
|
|
|
6322
6322
|
console.error(
|
|
6323
6323
|
`[RealtimeProvider] E_BLOB_PICTURE_BOUND: ${owner} has more than ${MAX_FRAMES_PER_PICTURE} frames waiting to be shown; dropping its oldest unshown frame (the picture on screen is kept).`
|
|
6324
6324
|
);
|
|
6325
|
+
ackUrl(victim);
|
|
6325
6326
|
revokeBlobUrl(victim);
|
|
6326
6327
|
}
|
|
6327
6328
|
blobsByOwnerRef.current.set(owner, list);
|
|
@@ -6333,7 +6334,7 @@ function RealtimeProvider({
|
|
|
6333
6334
|
}
|
|
6334
6335
|
registeredBlobUrlsRef.current.add(url);
|
|
6335
6336
|
return url;
|
|
6336
|
-
}, [revokeBlobUrl]);
|
|
6337
|
+
}, [revokeBlobUrl, ackUrl]);
|
|
6337
6338
|
const releaseOlderFrames = (0, import_react25.useCallback)((owner) => {
|
|
6338
6339
|
const list = blobsByOwnerRef.current.get(owner);
|
|
6339
6340
|
const shown = shownBlobByOwnerRef.current.get(owner);
|
|
@@ -11413,6 +11414,15 @@ var HeroProductImage = (0, import_react46.memo)(function HeroProductImage2({
|
|
|
11413
11414
|
const [firstImageLoaded, setFirstImageLoaded] = (0, import_react46.useState)(false);
|
|
11414
11415
|
const [loaderMounted, setLoaderMounted] = (0, import_react46.useState)(true);
|
|
11415
11416
|
const [imgFailed, setImgFailed] = (0, import_react46.useState)(false);
|
|
11417
|
+
const failedSrc = (() => {
|
|
11418
|
+
if (!imgFailed || !renderedUrl) return void 0;
|
|
11419
|
+
try {
|
|
11420
|
+
const u = new URL(renderedUrl, typeof location !== "undefined" ? location.href : "https://x");
|
|
11421
|
+
return u.protocol === "blob:" ? "blob" : u.host + u.pathname;
|
|
11422
|
+
} catch {
|
|
11423
|
+
return "?";
|
|
11424
|
+
}
|
|
11425
|
+
})();
|
|
11416
11426
|
const [retryNonce, setRetryNonce] = (0, import_react46.useState)(0);
|
|
11417
11427
|
const retriedUrlRef = (0, import_react46.useRef)(null);
|
|
11418
11428
|
const prevDisplayUrlRef = (0, import_react46.useRef)(displayUrl);
|
|
@@ -11503,6 +11513,8 @@ var HeroProductImage = (0, import_react46.memo)(function HeroProductImage2({
|
|
|
11503
11513
|
style,
|
|
11504
11514
|
"data-hero-image": "true",
|
|
11505
11515
|
"data-fit": fit,
|
|
11516
|
+
"data-picture-failed": imgFailed ? "E_PICTURE_UNDISPLAYED" : void 0,
|
|
11517
|
+
"data-picture-failed-src": failedSrc,
|
|
11506
11518
|
"data-mockup-unavailable": unavailable ? unavailable.code : void 0,
|
|
11507
11519
|
children: [
|
|
11508
11520
|
unavailable && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|