@snowcone-app/ui 0.10.7 → 0.10.9
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,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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.
|
|
8
|
+
|
|
9
|
+
## 0.10.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`d753dfd`](https://github.com/snowcone-app/snowcone-monorepo/commit/d753dfde97f1a296cafb2c9c5d73434ce98fb602)]:
|
|
14
|
+
- @snowcone-app/sdk@0.29.0
|
|
15
|
+
|
|
3
16
|
## 0.10.7
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -11413,6 +11413,15 @@ var HeroProductImage = (0, import_react46.memo)(function HeroProductImage2({
|
|
|
11413
11413
|
const [firstImageLoaded, setFirstImageLoaded] = (0, import_react46.useState)(false);
|
|
11414
11414
|
const [loaderMounted, setLoaderMounted] = (0, import_react46.useState)(true);
|
|
11415
11415
|
const [imgFailed, setImgFailed] = (0, import_react46.useState)(false);
|
|
11416
|
+
const failedSrc = (() => {
|
|
11417
|
+
if (!imgFailed || !renderedUrl) return void 0;
|
|
11418
|
+
try {
|
|
11419
|
+
const u = new URL(renderedUrl, typeof location !== "undefined" ? location.href : "https://x");
|
|
11420
|
+
return u.protocol === "blob:" ? "blob" : u.host + u.pathname;
|
|
11421
|
+
} catch {
|
|
11422
|
+
return "?";
|
|
11423
|
+
}
|
|
11424
|
+
})();
|
|
11416
11425
|
const [retryNonce, setRetryNonce] = (0, import_react46.useState)(0);
|
|
11417
11426
|
const retriedUrlRef = (0, import_react46.useRef)(null);
|
|
11418
11427
|
const prevDisplayUrlRef = (0, import_react46.useRef)(displayUrl);
|
|
@@ -11503,6 +11512,8 @@ var HeroProductImage = (0, import_react46.memo)(function HeroProductImage2({
|
|
|
11503
11512
|
style,
|
|
11504
11513
|
"data-hero-image": "true",
|
|
11505
11514
|
"data-fit": fit,
|
|
11515
|
+
"data-picture-failed": imgFailed ? "E_PICTURE_UNDISPLAYED" : void 0,
|
|
11516
|
+
"data-picture-failed-src": failedSrc,
|
|
11506
11517
|
"data-mockup-unavailable": unavailable ? unavailable.code : void 0,
|
|
11507
11518
|
children: [
|
|
11508
11519
|
unavailable && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|