@snowcone-app/ui 0.10.13 → 0.10.14
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 +6 -0
- package/dist/index.cjs +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/composed/carousels/MobileProductCarousel.tsx +3 -4
- package/src/composed/carousels/__tests__/fit.test.ts +16 -0
- package/src/composed/carousels/fit.ts +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#5085](https://github.com/snowcone-app/snowcone-monorepo/pull/5085) [`d804242`](https://github.com/snowcone-app/snowcone-monorepo/commit/d804242f071609a10876118ffcd6465395c6bd32) Thanks [@kevinsproles](https://github.com/kevinsproles)! - `MobileProductCarousel`: the size picture's slide is drawn cropped (cover) like every slide again; the zoom viewer still opens it whole. On a ~342x448 phone hero a whole 16:9 diagram shrank to a letterbox (garment 92-120 px, caption 5 px).
|
|
8
|
+
|
|
3
9
|
## 0.10.13
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -13045,6 +13045,16 @@ function ResponsiveZoom({
|
|
|
13045
13045
|
|
|
13046
13046
|
// src/composed/carousels/MobileProductCarousel.tsx
|
|
13047
13047
|
var import_react56 = require("react");
|
|
13048
|
+
|
|
13049
|
+
// src/composed/carousels/fit.ts
|
|
13050
|
+
function slideFit(_galleryRole) {
|
|
13051
|
+
return "cover";
|
|
13052
|
+
}
|
|
13053
|
+
function zoomFit(galleryRole) {
|
|
13054
|
+
return galleryRole === "size-picture" ? "whole" : "cover";
|
|
13055
|
+
}
|
|
13056
|
+
|
|
13057
|
+
// src/composed/carousels/MobileProductCarousel.tsx
|
|
13048
13058
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
13049
13059
|
function StaticCarouselImage({
|
|
13050
13060
|
src,
|
|
@@ -13644,7 +13654,7 @@ var MobileProductCarousel = (0, import_react56.memo)(function MobileProductCarou
|
|
|
13644
13654
|
unavailableText,
|
|
13645
13655
|
className: "w-full h-full object-cover cursor-pointer pointer-events-none",
|
|
13646
13656
|
viewportPolicy: true,
|
|
13647
|
-
fit: image.galleryRole
|
|
13657
|
+
fit: slideFit(image.galleryRole)
|
|
13648
13658
|
}
|
|
13649
13659
|
) : image.isRealMockup && !currentArtwork ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(LoadingOverlayPrismCandyInline, { visible: true, variant: "light" }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
13650
13660
|
StaticCarouselImage,
|
|
@@ -13729,7 +13739,7 @@ var MobileProductCarousel = (0, import_react56.memo)(function MobileProductCarou
|
|
|
13729
13739
|
alt: img.label,
|
|
13730
13740
|
naturalWidth: img.naturalWidth,
|
|
13731
13741
|
naturalHeight: img.naturalHeight,
|
|
13732
|
-
...img.galleryRole === "
|
|
13742
|
+
...zoomFit(img.galleryRole) === "whole" ? { fit: "whole" } : {}
|
|
13733
13743
|
} : null;
|
|
13734
13744
|
}).filter((img) => img !== null);
|
|
13735
13745
|
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|