@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/dist/index.js
CHANGED
|
@@ -12732,6 +12732,16 @@ import {
|
|
|
12732
12732
|
useMemo as useMemo15,
|
|
12733
12733
|
memo as memo4
|
|
12734
12734
|
} from "react";
|
|
12735
|
+
|
|
12736
|
+
// src/composed/carousels/fit.ts
|
|
12737
|
+
function slideFit(_galleryRole) {
|
|
12738
|
+
return "cover";
|
|
12739
|
+
}
|
|
12740
|
+
function zoomFit(galleryRole) {
|
|
12741
|
+
return galleryRole === "size-picture" ? "whole" : "cover";
|
|
12742
|
+
}
|
|
12743
|
+
|
|
12744
|
+
// src/composed/carousels/MobileProductCarousel.tsx
|
|
12735
12745
|
import { jsx as jsx74, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
12736
12746
|
function StaticCarouselImage({
|
|
12737
12747
|
src,
|
|
@@ -13331,7 +13341,7 @@ var MobileProductCarousel = memo4(function MobileProductCarousel2({
|
|
|
13331
13341
|
unavailableText,
|
|
13332
13342
|
className: "w-full h-full object-cover cursor-pointer pointer-events-none",
|
|
13333
13343
|
viewportPolicy: true,
|
|
13334
|
-
fit: image.galleryRole
|
|
13344
|
+
fit: slideFit(image.galleryRole)
|
|
13335
13345
|
}
|
|
13336
13346
|
) : image.isRealMockup && !currentArtwork ? /* @__PURE__ */ jsx74(LoadingOverlayPrismCandyInline, { visible: true, variant: "light" }) : /* @__PURE__ */ jsx74(
|
|
13337
13347
|
StaticCarouselImage,
|
|
@@ -13416,7 +13426,7 @@ var MobileProductCarousel = memo4(function MobileProductCarousel2({
|
|
|
13416
13426
|
alt: img.label,
|
|
13417
13427
|
naturalWidth: img.naturalWidth,
|
|
13418
13428
|
naturalHeight: img.naturalHeight,
|
|
13419
|
-
...img.galleryRole === "
|
|
13429
|
+
...zoomFit(img.galleryRole) === "whole" ? { fit: "whole" } : {}
|
|
13420
13430
|
} : null;
|
|
13421
13431
|
}).filter((img) => img !== null);
|
|
13422
13432
|
return /* @__PURE__ */ jsx74(
|