@snowcone-app/ui 0.10.12 → 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/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  checkTailwindConfig,
23
23
  checkThemeTokens,
24
24
  runConfigChecks
25
- } from "./chunk-UJ5ZXSFD.js";
25
+ } from "./chunk-4E5PVNXY.js";
26
26
 
27
27
  // ../brand/brand.json
28
28
  var brand_default = {
@@ -505,7 +505,7 @@ function Shop({
505
505
  useEffect2(() => {
506
506
  if (process.env.NODE_ENV === "development" && typeof window !== "undefined") {
507
507
  setTimeout(() => {
508
- import("./dev-warnings-LI2YBKKQ.js").then(({ runConfigChecks: runConfigChecks2 }) => {
508
+ import("./dev-warnings-2MCWOVV5.js").then(({ runConfigChecks: runConfigChecks2 }) => {
509
509
  runConfigChecks2();
510
510
  });
511
511
  }, 1e3);
@@ -10470,7 +10470,8 @@ import {
10470
10470
  getMockupUrl,
10471
10471
  resolveVariantId,
10472
10472
  resolvePreviewVariantId as resolvePreviewVariantId2,
10473
- resolveMockupId
10473
+ resolveMockupId,
10474
+ SNOWCONE_HOSTS
10474
10475
  } from "@snowcone-app/sdk";
10475
10476
 
10476
10477
  // src/hooks/viewport/useContainerWidth.ts
@@ -11250,7 +11251,7 @@ var HeroProductImage = memo3(function HeroProductImage2({
11250
11251
  signHintShownRef.current = true;
11251
11252
  const hasSigner = typeof window !== "undefined" && !!window.snowcone?.signMockupUrl;
11252
11253
  console.warn(
11253
- hasSigner ? "[Snowcone] A mockup image failed to load and its URL is unsigned. Your `signMockupUrl` likely errored \u2014 check your /api/sign route and that its secret matches the shop's signing secret." : "[Snowcone] A mockup image failed to load (likely 'Missing required signature'). If your shop requires signed URLs, pass `signMockupUrl` to <Shop> so the UI can sign mockup <img> URLs. Docs: https://developers.snowcone.app/design-system/signing-at-scale"
11254
+ hasSigner ? "[Snowcone] A mockup image failed to load and its URL is unsigned. Your `signMockupUrl` likely errored \u2014 check your /api/sign route and that its secret matches the shop's signing secret." : `[Snowcone] A mockup image failed to load (likely 'Missing required signature'). If your shop requires signed URLs, pass \`signMockupUrl\` to <Shop> so the UI can sign mockup <img> URLs. Docs: ${SNOWCONE_HOSTS.docs}/design-system/signing-at-scale`
11254
11255
  );
11255
11256
  }
11256
11257
  }
@@ -12731,6 +12732,16 @@ import {
12731
12732
  useMemo as useMemo15,
12732
12733
  memo as memo4
12733
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
12734
12745
  import { jsx as jsx74, jsxs as jsxs50 } from "react/jsx-runtime";
12735
12746
  function StaticCarouselImage({
12736
12747
  src,
@@ -13330,7 +13341,7 @@ var MobileProductCarousel = memo4(function MobileProductCarousel2({
13330
13341
  unavailableText,
13331
13342
  className: "w-full h-full object-cover cursor-pointer pointer-events-none",
13332
13343
  viewportPolicy: true,
13333
- fit: image.galleryRole === "size-picture" ? "whole" : "cover"
13344
+ fit: slideFit(image.galleryRole)
13334
13345
  }
13335
13346
  ) : image.isRealMockup && !currentArtwork ? /* @__PURE__ */ jsx74(LoadingOverlayPrismCandyInline, { visible: true, variant: "light" }) : /* @__PURE__ */ jsx74(
13336
13347
  StaticCarouselImage,
@@ -13415,7 +13426,7 @@ var MobileProductCarousel = memo4(function MobileProductCarousel2({
13415
13426
  alt: img.label,
13416
13427
  naturalWidth: img.naturalWidth,
13417
13428
  naturalHeight: img.naturalHeight,
13418
- ...img.galleryRole === "size-picture" ? { fit: "whole" } : {}
13429
+ ...zoomFit(img.galleryRole) === "whole" ? { fit: "whole" } : {}
13419
13430
  } : null;
13420
13431
  }).filter((img) => img !== null);
13421
13432
  return /* @__PURE__ */ jsx74(