@snowcone-app/ui 0.2.6 → 0.3.0

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
@@ -8669,12 +8669,340 @@ function useLoadingOverlay(isLoading) {
8669
8669
  };
8670
8670
  }
8671
8671
 
8672
+ // src/components/LoadingOverlayPrismCandy.tsx
8673
+ import {
8674
+ memo as memo2,
8675
+ useState as useState27,
8676
+ useEffect as useEffect28,
8677
+ useLayoutEffect as useLayoutEffect4,
8678
+ useRef as useRef20,
8679
+ useCallback as useCallback17
8680
+ } from "react";
8681
+ import { createPortal as createPortal2 } from "react-dom";
8682
+ import { Fragment as Fragment10, jsx as jsx55, jsxs as jsxs35 } from "react/jsx-runtime";
8683
+ var BANDS = [
8684
+ { rgb: "230, 45, 55", delay: "-0.0s" },
8685
+ // red
8686
+ { rgb: "250, 125, 30", delay: "-0.3s" },
8687
+ // orange
8688
+ { rgb: "244, 215, 60", delay: "-0.6s" },
8689
+ // yellow
8690
+ { rgb: "110, 200, 70", delay: "-0.9s" },
8691
+ // green
8692
+ { rgb: "65, 145, 205", delay: "-1.2s" },
8693
+ // blue
8694
+ { rgb: "140, 90, 175", delay: "-1.5s" }
8695
+ // purple
8696
+ ];
8697
+ function generateParticles2() {
8698
+ return Array.from({ length: 10 }, () => ({
8699
+ left: 2 + Math.random() * 96,
8700
+ top: 2 + Math.random() * 96,
8701
+ delay: (Math.random() * 3.5).toFixed(1),
8702
+ duration: (3 + Math.random() * 2).toFixed(1),
8703
+ size: 3 + Math.random() * 5
8704
+ }));
8705
+ }
8706
+ var PLATE_ALPHA = 0.1;
8707
+ var BAND_ALPHA = 0.55;
8708
+ var FADE_IN_MS2 = 600;
8709
+ var FADE_OUT_MS2 = 400;
8710
+ var STYLES2 = `
8711
+ /* Registered custom properties \u2014 required for the browser to interpolate
8712
+ them across a CSS transition / animation. Without @property, value
8713
+ changes snap rather than animate. */
8714
+ @property --candy-mount {
8715
+ syntax: "<number>";
8716
+ initial-value: 0;
8717
+ inherits: true;
8718
+ }
8719
+ /* Per-band sweep-fade. Animated by the keyframes below to scale the band
8720
+ rgba alpha 0 \u2192 1 \u2192 1 \u2192 0 across a sweep cycle. Lives on .candy-band
8721
+ only (not inherited), so each band has its own animated value. */
8722
+ @property --band-alpha {
8723
+ syntax: "<number>";
8724
+ initial-value: 0;
8725
+ inherits: false;
8726
+ }
8727
+
8728
+ .candy-loading-overlay {
8729
+ --candy-mount: 0;
8730
+ overflow: hidden;
8731
+ background-color: rgba(255, 255, 255, calc(${PLATE_ALPHA} * var(--candy-mount)));
8732
+ transition: --candy-mount ${FADE_IN_MS2}ms ease-in,
8733
+ background-color ${FADE_IN_MS2}ms ease-in;
8734
+ }
8735
+ .candy-loading-overlay.candy-fade-in { --candy-mount: 1; }
8736
+ .candy-loading-overlay.candy-fade-out {
8737
+ --candy-mount: 0;
8738
+ transition: --candy-mount ${FADE_OUT_MS2}ms ease-out,
8739
+ background-color ${FADE_OUT_MS2}ms ease-out;
8740
+ }
8741
+
8742
+ .candy-band {
8743
+ --band-alpha: 0;
8744
+ position: absolute;
8745
+ width: 220%; height: 30%;
8746
+ left: -60%;
8747
+ mix-blend-mode: screen;
8748
+ -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 35%, black 65%, transparent 100%);
8749
+ mask-image: linear-gradient(180deg, transparent 0%, black 35%, black 65%, transparent 100%);
8750
+ animation-timing-function: ease-in-out;
8751
+ animation-iteration-count: infinite;
8752
+ animation-duration: 6s;
8753
+ }
8754
+ ${BANDS.map((b, i) => {
8755
+ const top = -5 + i * 16;
8756
+ const direction = i % 2 === 0 ? "ltr" : "rtl";
8757
+ return `.candy-band:nth-child(${i + 1}) { top: ${top}%; background: linear-gradient(90deg, transparent 0%, rgba(${b.rgb}, calc(${BAND_ALPHA} * var(--candy-mount) * var(--band-alpha) * var(--band-strength, 1))) 30%, rgba(${b.rgb}, calc(${BAND_ALPHA} * var(--candy-mount) * var(--band-alpha) * var(--band-strength, 1))) 70%, transparent 100%); animation-name: candy-sweep-${direction}; animation-delay: ${b.delay}; }`;
8758
+ }).join("\n")}
8759
+ @keyframes candy-sweep-ltr {
8760
+ 0% { transform: translateX(-45%) rotate(-6deg); --band-alpha: 0; }
8761
+ 25% { --band-alpha: 1; }
8762
+ 50% { transform: translateX(0%) rotate(-6deg); }
8763
+ 75% { --band-alpha: 1; }
8764
+ 100% { transform: translateX(45%) rotate(-6deg); --band-alpha: 0; }
8765
+ }
8766
+ @keyframes candy-sweep-rtl {
8767
+ 0% { transform: translateX(45%) rotate(-6deg); --band-alpha: 0; }
8768
+ 25% { --band-alpha: 1; }
8769
+ 50% { transform: translateX(0%) rotate(-6deg); }
8770
+ 75% { --band-alpha: 1; }
8771
+ 100% { transform: translateX(-45%) rotate(-6deg); --band-alpha: 0; }
8772
+ }
8773
+
8774
+ .candy-particle {
8775
+ position: absolute; border-radius: 50%;
8776
+ /* Particle background and glow alphas also scale with --candy-mount so
8777
+ the sparkles fade with the rest of the overlay. */
8778
+ background: rgba(255, 255, 255, calc(1 * var(--candy-mount)));
8779
+ box-shadow: 0 0 8px rgba(255, 255, 255, calc(0.85 * var(--candy-mount)));
8780
+ opacity: 0;
8781
+ animation: candy-sparkle infinite ease-in-out;
8782
+ }
8783
+ @keyframes candy-sparkle {
8784
+ 0% { opacity: 0; transform: scale(0); }
8785
+ 15% { opacity: 0.7; transform: scale(1.4); }
8786
+ 30% { opacity: 0.4; transform: scale(0.6); }
8787
+ 55% { opacity: 1; transform: scale(2); }
8788
+ 75% { opacity: 0.5; transform: scale(0.9); }
8789
+ 100% { opacity: 0; transform: scale(0); }
8790
+ }
8791
+
8792
+ /* Light-backdrop variant. The default bands screen-blend \u2014 vivid on a dark
8793
+ stage, but they wash out to nothing over white (screen over white = white).
8794
+ On a light card we multiply-blend instead, so each band tints the backdrop
8795
+ toward its hue (jewel/pastel rainbow rather than neon). The sparkle particles
8796
+ stay white in both variants \u2014 they read as snow, and the white glow keeps
8797
+ them legible over the multiply rainbow bands. */
8798
+ .candy-on-light .candy-band { mix-blend-mode: multiply; }
8799
+ /* Opaque light stage baked into the overlay so it fades in/out as one unit
8800
+ with the bands \u2014 matching the PDP hero's smooth crossfade \u2014 instead of a
8801
+ hard backdrop on the parent that snaps on/off. The alpha scales with
8802
+ --candy-mount (overriding the default 0.1 white plate), so it rides the
8803
+ same candy-fade-in / candy-fade-out transition the bands do. The bands
8804
+ multiply-blend against this opaque stage to read as the candy rainbow.
8805
+ #f5f5f5 = the site page background (defaults.css --color-background), kept
8806
+ as a fixed hex (not the token, which would flip dark in dark mode and break
8807
+ the multiply blend) so the loader sits flush with the surrounding page. */
8808
+ .candy-on-light {
8809
+ background-color: rgba(245, 245, 245, calc(1 * var(--candy-mount)));
8810
+ /* Half the band opacity on the light stage \u2014 multiply-blended bands read
8811
+ stronger on light gray than the screen-blended ones do on the dark PDP
8812
+ stage, so dial them back to ~50%. Inherits down to .candy-band; the dark
8813
+ default leaves --band-strength at its 1 fallback, untouched. */
8814
+ --band-strength: 0.5;
8815
+ }
8816
+
8817
+ `;
8818
+ var stylesInjected2 = false;
8819
+ function ensureStyles2() {
8820
+ if (stylesInjected2 || typeof document === "undefined") return;
8821
+ if (typeof CSS !== "undefined" && typeof CSS.registerProperty === "function") {
8822
+ try {
8823
+ CSS.registerProperty({
8824
+ name: "--candy-mount",
8825
+ syntax: "<number>",
8826
+ initialValue: "0",
8827
+ inherits: true
8828
+ });
8829
+ } catch {
8830
+ }
8831
+ try {
8832
+ CSS.registerProperty({
8833
+ name: "--band-alpha",
8834
+ syntax: "<number>",
8835
+ initialValue: "0",
8836
+ inherits: false
8837
+ });
8838
+ } catch {
8839
+ }
8840
+ }
8841
+ const s = document.createElement("style");
8842
+ s.textContent = STYLES2;
8843
+ document.head.appendChild(s);
8844
+ stylesInjected2 = true;
8845
+ }
8846
+ function CandyVisual({
8847
+ fadeClass,
8848
+ style,
8849
+ onTransitionEnd,
8850
+ variantClass = ""
8851
+ }) {
8852
+ const [particles, setParticles] = useState27([]);
8853
+ useEffect28(() => {
8854
+ setParticles(generateParticles2());
8855
+ }, []);
8856
+ return /* @__PURE__ */ jsxs35(
8857
+ "div",
8858
+ {
8859
+ className: `candy-loading-overlay ${variantClass} ${fadeClass}`.trim(),
8860
+ style,
8861
+ onTransitionEnd,
8862
+ children: [
8863
+ BANDS.map((_, i) => /* @__PURE__ */ jsx55("div", { className: "candy-band" }, `b-${i}`)),
8864
+ particles.map((p, i) => /* @__PURE__ */ jsx55(
8865
+ "div",
8866
+ {
8867
+ className: "candy-particle",
8868
+ style: {
8869
+ left: `${p.left}%`,
8870
+ top: `${p.top}%`,
8871
+ animationDelay: `${p.delay}s`,
8872
+ animationDuration: `${p.duration}s`,
8873
+ width: `${p.size}px`,
8874
+ height: `${p.size}px`
8875
+ }
8876
+ },
8877
+ `p-${i}`
8878
+ ))
8879
+ ]
8880
+ }
8881
+ );
8882
+ }
8883
+ var LoadingOverlayPrismCandy = memo2(function LoadingOverlayPrismCandy2({
8884
+ visible = true,
8885
+ onExited
8886
+ }) {
8887
+ ensureStyles2();
8888
+ const anchorRef = useRef20(null);
8889
+ const [bounds, setBounds] = useState27(null);
8890
+ const [mounted, setMounted] = useState27(false);
8891
+ const measure = useCallback17(() => {
8892
+ const el = anchorRef.current;
8893
+ if (!el) return;
8894
+ const r = el.getBoundingClientRect();
8895
+ setBounds({
8896
+ top: r.top + window.scrollY,
8897
+ left: r.left + window.scrollX,
8898
+ width: r.width,
8899
+ height: r.height
8900
+ });
8901
+ }, []);
8902
+ useLayoutEffect4(() => {
8903
+ measure();
8904
+ window.addEventListener("resize", measure);
8905
+ let ro = null;
8906
+ if (typeof ResizeObserver !== "undefined" && anchorRef.current) {
8907
+ ro = new ResizeObserver(measure);
8908
+ ro.observe(anchorRef.current);
8909
+ }
8910
+ return () => {
8911
+ window.removeEventListener("resize", measure);
8912
+ ro?.disconnect();
8913
+ };
8914
+ }, [measure]);
8915
+ useEffect28(() => {
8916
+ const raf = requestAnimationFrame(() => setMounted(true));
8917
+ return () => cancelAnimationFrame(raf);
8918
+ }, []);
8919
+ const handleTransitionEnd = useCallback17(
8920
+ (e) => {
8921
+ if (e.propertyName !== "background-color") return;
8922
+ if (!visible) onExited?.();
8923
+ },
8924
+ [visible, onExited]
8925
+ );
8926
+ let fadeClass = "";
8927
+ if (!visible) fadeClass = "candy-fade-out";
8928
+ else if (mounted) fadeClass = "candy-fade-in";
8929
+ return /* @__PURE__ */ jsxs35(Fragment10, { children: [
8930
+ /* @__PURE__ */ jsx55(
8931
+ "div",
8932
+ {
8933
+ ref: anchorRef,
8934
+ style: {
8935
+ position: "absolute",
8936
+ inset: 0,
8937
+ pointerEvents: "none"
8938
+ },
8939
+ "aria-hidden": "true"
8940
+ }
8941
+ ),
8942
+ bounds && typeof document !== "undefined" && createPortal2(
8943
+ /* @__PURE__ */ jsx55(
8944
+ CandyVisual,
8945
+ {
8946
+ fadeClass,
8947
+ style: {
8948
+ position: "absolute",
8949
+ top: bounds.top,
8950
+ left: bounds.left,
8951
+ width: bounds.width,
8952
+ height: bounds.height,
8953
+ pointerEvents: "none"
8954
+ },
8955
+ onTransitionEnd: handleTransitionEnd
8956
+ }
8957
+ ),
8958
+ document.body
8959
+ )
8960
+ ] });
8961
+ });
8962
+ var LoadingOverlayPrismCandyInline = memo2(
8963
+ function LoadingOverlayPrismCandyInline2({
8964
+ visible = true,
8965
+ onExited,
8966
+ variant = "dark"
8967
+ }) {
8968
+ ensureStyles2();
8969
+ const [mounted, setMounted] = useState27(false);
8970
+ useEffect28(() => {
8971
+ const raf = requestAnimationFrame(() => setMounted(true));
8972
+ return () => cancelAnimationFrame(raf);
8973
+ }, []);
8974
+ const handleTransitionEnd = useCallback17(
8975
+ (e) => {
8976
+ if (e.propertyName !== "background-color") return;
8977
+ if (!visible) onExited?.();
8978
+ },
8979
+ [visible, onExited]
8980
+ );
8981
+ let fadeClass = "";
8982
+ if (!visible) fadeClass = "candy-fade-out";
8983
+ else if (mounted) fadeClass = "candy-fade-in";
8984
+ return /* @__PURE__ */ jsx55(
8985
+ CandyVisual,
8986
+ {
8987
+ fadeClass,
8988
+ variantClass: variant === "light" ? "candy-on-light" : "",
8989
+ style: {
8990
+ position: "absolute",
8991
+ inset: 0,
8992
+ pointerEvents: "none"
8993
+ },
8994
+ onTransitionEnd: handleTransitionEnd
8995
+ }
8996
+ );
8997
+ }
8998
+ );
8999
+
8672
9000
  // src/index.ts
8673
9001
  import { useRealtimeMockup as useRealtimeMockup3 } from "@snowcone-app/sdk/react";
8674
9002
  import { getProduct as getProduct3, listProducts as listProducts4, getMockupUrl as getMockupUrl2 } from "@snowcone-app/sdk";
8675
9003
 
8676
9004
  // src/patterns/ProductPageProvider.tsx
8677
- import { jsx as jsx55 } from "react/jsx-runtime";
9005
+ import { jsx as jsx56 } from "react/jsx-runtime";
8678
9006
  function ProductPageProvider({
8679
9007
  children,
8680
9008
  productId,
@@ -8688,12 +9016,12 @@ function ProductPageProvider({
8688
9016
  realtimeGrantUrl,
8689
9017
  enablePriority = true
8690
9018
  }) {
8691
- let content = /* @__PURE__ */ jsx55(Product, { productId, productData, children });
9019
+ let content = /* @__PURE__ */ jsx56(Product, { productId, productData, children });
8692
9020
  if (enablePriority) {
8693
- content = /* @__PURE__ */ jsx55(MockupPriorityProvider, { children: content });
9021
+ content = /* @__PURE__ */ jsx56(MockupPriorityProvider, { children: content });
8694
9022
  }
8695
9023
  if (enableRealtime) {
8696
- content = /* @__PURE__ */ jsx55(
9024
+ content = /* @__PURE__ */ jsx56(
8697
9025
  RealtimeProvider,
8698
9026
  {
8699
9027
  wsUrl: realtimeWsUrl,
@@ -8703,7 +9031,7 @@ function ProductPageProvider({
8703
9031
  }
8704
9032
  );
8705
9033
  }
8706
- return /* @__PURE__ */ jsx55(
9034
+ return /* @__PURE__ */ jsx56(
8707
9035
  Shop,
8708
9036
  {
8709
9037
  endpoint,
@@ -8723,23 +9051,23 @@ function ProductPageProviderMinimal({
8723
9051
  shop,
8724
9052
  initialArtwork
8725
9053
  }) {
8726
- return /* @__PURE__ */ jsx55(
9054
+ return /* @__PURE__ */ jsx56(
8727
9055
  Shop,
8728
9056
  {
8729
9057
  endpoint,
8730
9058
  mockupUrl,
8731
9059
  shop,
8732
9060
  initialArtwork,
8733
- children: /* @__PURE__ */ jsx55(Product, { productId, productData, children })
9061
+ children: /* @__PURE__ */ jsx56(Product, { productId, productData, children })
8734
9062
  }
8735
9063
  );
8736
9064
  }
8737
9065
 
8738
9066
  // src/composed/ArtAlignment.tsx
8739
9067
  import {
8740
- useRef as useRef20,
8741
- useState as useState27,
8742
- useEffect as useEffect28,
9068
+ useRef as useRef21,
9069
+ useState as useState28,
9070
+ useEffect as useEffect29,
8743
9071
  useMemo as useMemo13
8744
9072
  } from "react";
8745
9073
  import { useDrag } from "@use-gesture/react";
@@ -8747,7 +9075,7 @@ import {
8747
9075
  describeProductArtAlignment,
8748
9076
  getSnapPoints
8749
9077
  } from "@snowcone-app/sdk";
8750
- import { Fragment as Fragment10, jsx as jsx56, jsxs as jsxs35 } from "react/jsx-runtime";
9078
+ import { Fragment as Fragment11, jsx as jsx57, jsxs as jsxs36 } from "react/jsx-runtime";
8751
9079
  function ArtAlignment({
8752
9080
  src: propSrc,
8753
9081
  artworkAspectRatio: propAspectRatio,
@@ -8781,13 +9109,13 @@ function ArtAlignment({
8781
9109
  selection: {}
8782
9110
  };
8783
9111
  }
8784
- const containerRef = useRef20(null);
8785
- const imageRef = useRef20(null);
8786
- const lastUserDragTimeRef = useRef20(0);
8787
- const [containerSize, setContainerSize] = useState27({ width: 0, height: 0 });
8788
- const [position, setPosition] = useState27({ x: 0, y: 0 });
8789
- const [isReady, setIsReady] = useState27(false);
8790
- const [detectedAspectRatio, setDetectedAspectRatio] = useState27();
9112
+ const containerRef = useRef21(null);
9113
+ const imageRef = useRef21(null);
9114
+ const lastUserDragTimeRef = useRef21(0);
9115
+ const [containerSize, setContainerSize] = useState28({ width: 0, height: 0 });
9116
+ const [position, setPosition] = useState28({ x: 0, y: 0 });
9117
+ const [isReady, setIsReady] = useState28(false);
9118
+ const [detectedAspectRatio, setDetectedAspectRatio] = useState28();
8791
9119
  const effectiveAspectRatio = artworkAspectRatio || detectedAspectRatio;
8792
9120
  const alignment = placementDesign?.alignment || propAlignment || "center";
8793
9121
  const descriptor = useMemo13(
@@ -8843,7 +9171,7 @@ function ArtAlignment({
8843
9171
  }
8844
9172
  return style;
8845
9173
  }, [effectiveAspectRatio, height, maxHeight, minHeight]);
8846
- useEffect28(() => {
9174
+ useEffect29(() => {
8847
9175
  if (!containerRef.current) return;
8848
9176
  const resizeObserver = new ResizeObserver((entries) => {
8849
9177
  const entry = entries[0];
@@ -8869,7 +9197,7 @@ function ArtAlignment({
8869
9197
  }
8870
9198
  }
8871
9199
  };
8872
- useEffect28(() => {
9200
+ useEffect29(() => {
8873
9201
  if (!imageRef.current || !descriptor) return;
8874
9202
  if (imageRef.current.complete) {
8875
9203
  setIsReady(true);
@@ -8916,7 +9244,7 @@ function ArtAlignment({
8916
9244
  const halfContainerH = containerSize.height / 2;
8917
9245
  return { halfMaskW, halfMaskH, halfContainerW, halfContainerH };
8918
9246
  }, [maskDimensions.width, maskDimensions.height, containerSize.width, containerSize.height]);
8919
- useEffect28(() => {
9247
+ useEffect29(() => {
8920
9248
  if (Date.now() - lastUserDragTimeRef.current < 500) return;
8921
9249
  if (!isReady || maskDimensions.width === 0 || !descriptor) return;
8922
9250
  const points = getSnapPoints(
@@ -8988,9 +9316,9 @@ function ArtAlignment({
8988
9316
  const maskTransform = useMemo13(() => {
8989
9317
  return descriptor?.effectiveAlignment === "horizontal" ? `translate(calc(-50% + ${position.x}px), -50%)` : `translate(-50%, calc(-50% + ${position.y}px))`;
8990
9318
  }, [descriptor?.effectiveAlignment, position.x, position.y]);
8991
- const lastContextUpdateTimeRef = useRef20(0);
8992
- const pendingAlignmentRef = useRef20(null);
8993
- const throttleTimeoutRef = useRef20(null);
9319
+ const lastContextUpdateTimeRef = useRef21(0);
9320
+ const pendingAlignmentRef = useRef21(null);
9321
+ const throttleTimeoutRef = useRef21(null);
8994
9322
  const THROTTLE_MS = 150;
8995
9323
  const bind = useDrag(
8996
9324
  ({ offset: [ox, oy], last }) => {
@@ -9085,7 +9413,7 @@ function ArtAlignment({
9085
9413
  if (!descriptor) {
9086
9414
  return null;
9087
9415
  }
9088
- return /* @__PURE__ */ jsx56(
9416
+ return /* @__PURE__ */ jsx57(
9089
9417
  "div",
9090
9418
  {
9091
9419
  className: `relative ${className || ""}`,
@@ -9094,8 +9422,8 @@ function ArtAlignment({
9094
9422
  width: "fit-content",
9095
9423
  maxWidth: "100%"
9096
9424
  },
9097
- children: /* @__PURE__ */ jsx56("div", { className: "overflow-hidden p-1", children: /* @__PURE__ */ jsxs35("div", { ref: containerRef, className: "relative", style: containerStyle, children: [
9098
- /* @__PURE__ */ jsx56(
9425
+ children: /* @__PURE__ */ jsx57("div", { className: "overflow-hidden p-1", children: /* @__PURE__ */ jsxs36("div", { ref: containerRef, className: "relative", style: containerStyle, children: [
9426
+ /* @__PURE__ */ jsx57(
9099
9427
  "img",
9100
9428
  {
9101
9429
  ref: imageRef,
@@ -9120,9 +9448,9 @@ function ArtAlignment({
9120
9448
  loading: "eager"
9121
9449
  }
9122
9450
  ),
9123
- isReady && maskDimensions.width > 0 && /* @__PURE__ */ jsxs35(Fragment10, { children: [
9124
- /* @__PURE__ */ jsx56("div", { style: overlayStyle }),
9125
- /* @__PURE__ */ jsx56(
9451
+ isReady && maskDimensions.width > 0 && /* @__PURE__ */ jsxs36(Fragment11, { children: [
9452
+ /* @__PURE__ */ jsx57("div", { style: overlayStyle }),
9453
+ /* @__PURE__ */ jsx57(
9126
9454
  "img",
9127
9455
  {
9128
9456
  src: descriptor.src,
@@ -9150,7 +9478,7 @@ function ArtAlignment({
9150
9478
  loading: "eager"
9151
9479
  }
9152
9480
  ),
9153
- /* @__PURE__ */ jsx56(
9481
+ /* @__PURE__ */ jsx57(
9154
9482
  "div",
9155
9483
  {
9156
9484
  ...bind(),
@@ -9167,8 +9495,8 @@ function ArtAlignment({
9167
9495
  }
9168
9496
 
9169
9497
  // src/composed/ArtworkCustomizer.tsx
9170
- import { useEffect as useEffect29 } from "react";
9171
- import { jsx as jsx57, jsxs as jsxs36 } from "react/jsx-runtime";
9498
+ import { useEffect as useEffect30 } from "react";
9499
+ import { jsx as jsx58, jsxs as jsxs37 } from "react/jsx-runtime";
9172
9500
  function ArtworkCustomizer(props) {
9173
9501
  const designContext = useDesign();
9174
9502
  const artwork = props.artwork || designContext.selectedArtwork;
@@ -9180,7 +9508,7 @@ function ArtworkCustomizer(props) {
9180
9508
  const placements = productCtx?.product?.placements || [];
9181
9509
  const selectedPlacement = productCtx?.selectedPlacement;
9182
9510
  const setSelectedPlacement = productCtx?.setSelectedPlacement;
9183
- useEffect29(() => {
9511
+ useEffect30(() => {
9184
9512
  if (placements.length > 0 && !selectedPlacement && setSelectedPlacement) {
9185
9513
  setSelectedPlacement(placements[0].label);
9186
9514
  }
@@ -9190,13 +9518,13 @@ function ArtworkCustomizer(props) {
9190
9518
  );
9191
9519
  const isColorPlacement = currentPlacement?.type === "color";
9192
9520
  const isFitMode = currentPlacement?.defaultScaleMode === "fit";
9193
- useEffect29(() => {
9521
+ useEffect30(() => {
9194
9522
  }, [selectedPlacement]);
9195
9523
  if (!artwork) {
9196
- return /* @__PURE__ */ jsx57("div", { className: `text-sm text-muted-foreground ${props.className || ""}`, children: "Select artwork to customize" });
9524
+ return /* @__PURE__ */ jsx58("div", { className: `text-sm text-muted-foreground ${props.className || ""}`, children: "Select artwork to customize" });
9197
9525
  }
9198
9526
  if (artwork.type === "pattern") {
9199
- return /* @__PURE__ */ jsx57(
9527
+ return /* @__PURE__ */ jsx58(
9200
9528
  TileCount,
9201
9529
  {
9202
9530
  artwork,
@@ -9207,8 +9535,8 @@ function ArtworkCustomizer(props) {
9207
9535
  );
9208
9536
  }
9209
9537
  const isCanvasEditorMode = props.mode === "canvas" || !!props.children && props.mode !== "alignment";
9210
- return /* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-4", children: [
9211
- placements.length > 1 && /* @__PURE__ */ jsx57("div", { className: "text-sm leading-relaxed", children: placements.map((p) => /* @__PURE__ */ jsx57(
9538
+ return /* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-4", children: [
9539
+ placements.length > 1 && /* @__PURE__ */ jsx58("div", { className: "text-sm leading-relaxed", children: placements.map((p) => /* @__PURE__ */ jsx58(
9212
9540
  "button",
9213
9541
  {
9214
9542
  onClick: () => setSelectedPlacement?.(p.label),
@@ -9217,7 +9545,7 @@ function ArtworkCustomizer(props) {
9217
9545
  },
9218
9546
  p.label
9219
9547
  )) }),
9220
- isColorPlacement ? /* @__PURE__ */ jsx57(ColorPicker2, { placement: selectedPlacement }) : isFitMode ? null : /* @__PURE__ */ jsx57("div", { className: "relative", children: props.children || /* @__PURE__ */ jsx57(
9548
+ isColorPlacement ? /* @__PURE__ */ jsx58(ColorPicker2, { placement: selectedPlacement }) : isFitMode ? null : /* @__PURE__ */ jsx58("div", { className: "relative", children: props.children || /* @__PURE__ */ jsx58(
9221
9549
  ArtAlignment,
9222
9550
  {
9223
9551
  artwork: { src: artwork.src },
@@ -9238,7 +9566,7 @@ import {
9238
9566
  Shapes as LucideShapes,
9239
9567
  Upload as LucideUpload
9240
9568
  } from "lucide-react";
9241
- import { jsx as jsx58, jsxs as jsxs37 } from "react/jsx-runtime";
9569
+ import { jsx as jsx59, jsxs as jsxs38 } from "react/jsx-runtime";
9242
9570
  var ImageIcon = LucideImage;
9243
9571
  var TypeIcon = LucideType;
9244
9572
  var ShapesIcon = LucideShapes;
@@ -9249,29 +9577,29 @@ function CanvasEditor({
9249
9577
  onOpenTypography,
9250
9578
  children
9251
9579
  }) {
9252
- return /* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-6", children: [
9253
- /* @__PURE__ */ jsx58("div", { className: "bg-background border-2 border-border rounded-lg aspect-square overflow-hidden relative", children: children || /* @__PURE__ */ jsx58("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx58("div", { className: "text-muted-foreground text-sm", children: "No editor provided" }) }) }),
9254
- /* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-center gap-8 py-2", children: [
9255
- /* @__PURE__ */ jsx58(
9580
+ return /* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-6", children: [
9581
+ /* @__PURE__ */ jsx59("div", { className: "bg-background border-2 border-border rounded-lg aspect-square overflow-hidden relative", children: children || /* @__PURE__ */ jsx59("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx59("div", { className: "text-muted-foreground text-sm", children: "No editor provided" }) }) }),
9582
+ /* @__PURE__ */ jsxs38("div", { className: "flex items-center justify-center gap-8 py-2", children: [
9583
+ /* @__PURE__ */ jsx59(
9256
9584
  "button",
9257
9585
  {
9258
9586
  onClick: onOpenImageGallery,
9259
9587
  className: "flex flex-col items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",
9260
9588
  "aria-label": "Open image gallery",
9261
- children: /* @__PURE__ */ jsx58("div", { className: "w-10 h-10 flex items-center justify-center", children: /* @__PURE__ */ jsx58(ImageIcon, { className: "w-6 h-6" }) })
9589
+ children: /* @__PURE__ */ jsx59("div", { className: "w-10 h-10 flex items-center justify-center", children: /* @__PURE__ */ jsx59(ImageIcon, { className: "w-6 h-6" }) })
9262
9590
  }
9263
9591
  ),
9264
- /* @__PURE__ */ jsx58(
9592
+ /* @__PURE__ */ jsx59(
9265
9593
  "button",
9266
9594
  {
9267
9595
  onClick: onOpenTypography,
9268
9596
  className: "flex flex-col items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",
9269
9597
  "aria-label": "Add text",
9270
- children: /* @__PURE__ */ jsx58("div", { className: "w-10 h-10 flex items-center justify-center", children: /* @__PURE__ */ jsx58(TypeIcon, { className: "w-6 h-6" }) })
9598
+ children: /* @__PURE__ */ jsx59("div", { className: "w-10 h-10 flex items-center justify-center", children: /* @__PURE__ */ jsx59(TypeIcon, { className: "w-6 h-6" }) })
9271
9599
  }
9272
9600
  ),
9273
- /* @__PURE__ */ jsx58("button", { className: "flex flex-col items-center gap-2 text-muted-foreground hover:text-foreground transition-colors", children: /* @__PURE__ */ jsx58("div", { className: "w-10 h-10 flex items-center justify-center", children: /* @__PURE__ */ jsx58(ShapesIcon, { className: "w-6 h-6" }) }) }),
9274
- /* @__PURE__ */ jsx58("button", { className: "flex flex-col items-center gap-2 text-muted-foreground hover:text-foreground transition-colors", children: /* @__PURE__ */ jsx58("div", { className: "w-10 h-10 flex items-center justify-center", children: /* @__PURE__ */ jsx58(UploadIcon, { className: "w-6 h-6" }) }) })
9601
+ /* @__PURE__ */ jsx59("button", { className: "flex flex-col items-center gap-2 text-muted-foreground hover:text-foreground transition-colors", children: /* @__PURE__ */ jsx59("div", { className: "w-10 h-10 flex items-center justify-center", children: /* @__PURE__ */ jsx59(ShapesIcon, { className: "w-6 h-6" }) }) }),
9602
+ /* @__PURE__ */ jsx59("button", { className: "flex flex-col items-center gap-2 text-muted-foreground hover:text-foreground transition-colors", children: /* @__PURE__ */ jsx59("div", { className: "w-10 h-10 flex items-center justify-center", children: /* @__PURE__ */ jsx59(UploadIcon, { className: "w-6 h-6" }) }) })
9275
9603
  ] })
9276
9604
  ] });
9277
9605
  }
@@ -9279,11 +9607,11 @@ function CanvasEditor({
9279
9607
  // src/composed/HeroProductImage.tsx
9280
9608
  import {
9281
9609
  useMemo as useMemo14,
9282
- useState as useState30,
9283
- useEffect as useEffect31,
9284
- useRef as useRef22,
9285
- memo as memo2,
9286
- useCallback as useCallback17
9610
+ useState as useState31,
9611
+ useEffect as useEffect32,
9612
+ useRef as useRef23,
9613
+ memo as memo3,
9614
+ useCallback as useCallback18
9287
9615
  } from "react";
9288
9616
  import {
9289
9617
  createDesignForPlacements,
@@ -9293,11 +9621,11 @@ import {
9293
9621
  } from "@snowcone-app/sdk";
9294
9622
 
9295
9623
  // src/hooks/viewport/useContainerWidth.ts
9296
- import { useState as useState29, useLayoutEffect as useLayoutEffect4, useEffect as useEffect30, useRef as useRef21 } from "react";
9624
+ import { useState as useState30, useLayoutEffect as useLayoutEffect5, useEffect as useEffect31, useRef as useRef22 } from "react";
9297
9625
  function useContainerWidth(containerRef, maxWidth = 3e3) {
9298
- const [width, setWidth] = useState29(0);
9299
- const resizeTimeoutRef = useRef21(null);
9300
- useLayoutEffect4(() => {
9626
+ const [width, setWidth] = useState30(0);
9627
+ const resizeTimeoutRef = useRef22(null);
9628
+ useLayoutEffect5(() => {
9301
9629
  const el = containerRef.current;
9302
9630
  if (!el) return;
9303
9631
  const cssWidth = el.offsetWidth;
@@ -9305,7 +9633,7 @@ function useContainerWidth(containerRef, maxWidth = 3e3) {
9305
9633
  const dpr = window.devicePixelRatio ?? 1;
9306
9634
  setWidth(Math.min(Math.round(cssWidth * dpr), maxWidth));
9307
9635
  }, [containerRef, maxWidth]);
9308
- useEffect30(() => {
9636
+ useEffect31(() => {
9309
9637
  const measure = () => {
9310
9638
  const el = containerRef.current;
9311
9639
  if (!el) return;
@@ -9328,7 +9656,7 @@ function useContainerWidth(containerRef, maxWidth = 3e3) {
9328
9656
  }
9329
9657
 
9330
9658
  // src/composed/HeroProductImage.tsx
9331
- import { jsx as jsx59, jsxs as jsxs38 } from "react/jsx-runtime";
9659
+ import { jsx as jsx60, jsxs as jsxs39 } from "react/jsx-runtime";
9332
9660
  function slugifyPlacementKey(label) {
9333
9661
  return label.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
9334
9662
  }
@@ -9366,7 +9694,7 @@ function buildHeroMockupUrl(args) {
9366
9694
  });
9367
9695
  }
9368
9696
  var EMPTY_IMAGES = [];
9369
- var HeroProductImage = memo2(function HeroProductImage2({
9697
+ var HeroProductImage = memo3(function HeroProductImage2({
9370
9698
  productId,
9371
9699
  mockupId,
9372
9700
  variantId,
@@ -9399,9 +9727,9 @@ var HeroProductImage = memo2(function HeroProductImage2({
9399
9727
  const shopContext = useShopOptional();
9400
9728
  const realtimeContext = useRealtimeOptional();
9401
9729
  const priorityContext = useMockupPriorityOptional();
9402
- const priorityContextRef = useRef22(priorityContext);
9730
+ const priorityContextRef = useRef23(priorityContext);
9403
9731
  priorityContextRef.current = priorityContext;
9404
- const contextRef = useRef22(context);
9732
+ const contextRef = useRef23(context);
9405
9733
  contextRef.current = context;
9406
9734
  const actualProductId = product?.id || productId || context?.product?.id;
9407
9735
  const actualGvid = useMemo14(() => {
@@ -9413,7 +9741,7 @@ var HeroProductImage = memo2(function HeroProductImage2({
9413
9741
  const artworkSrc = artwork?.src;
9414
9742
  const selectedArtworkSrc = designContext?.selectedArtwork?.src;
9415
9743
  const effectiveArtworkSrc = artworkSrc || selectedArtworkSrc;
9416
- const containerRef = useRef22(null);
9744
+ const containerRef = useRef23(null);
9417
9745
  const measuredWidth = useContainerWidth(containerRef);
9418
9746
  const width = widthProp ?? measuredWidth;
9419
9747
  const initialStaticUrl = useMemo14(() => {
@@ -9482,28 +9810,28 @@ var HeroProductImage = memo2(function HeroProductImage2({
9482
9810
  shimmerDelay,
9483
9811
  initialUrl: realtimeUrl || initialStaticUrl
9484
9812
  });
9485
- const [error, setError] = useState30(null);
9486
- const [isInPreloadZone, setIsInPreloadZone] = useState30(true);
9487
- const componentIdRef = useRef22(
9813
+ const [error, setError] = useState31(null);
9814
+ const [isInPreloadZone, setIsInPreloadZone] = useState31(true);
9815
+ const componentIdRef = useRef23(
9488
9816
  `hero-product-image-${Math.random().toString(36).substr(2, 9)}`
9489
9817
  );
9490
- const [containerMounted, setContainerMounted] = useState30(false);
9491
- const setContainerRef = useCallback17((node) => {
9818
+ const [containerMounted, setContainerMounted] = useState31(false);
9819
+ const setContainerRef = useCallback18((node) => {
9492
9820
  containerRef.current = node;
9493
9821
  setContainerMounted(!!node);
9494
9822
  }, []);
9495
- const lastUrlRef = useRef22(realtimeUrl ?? initialStaticUrl ?? null);
9496
- const priorityRegisteredRef = useRef22(false);
9497
- const onLoadCalledRef = useRef22(false);
9498
- const prevArtworkSrcRef = useRef22(void 0);
9499
- const realtimeArtworkSrcRef = useRef22(void 0);
9500
- const hasReceivedRealtimeRef = useRef22(false);
9501
- const isPendingExportRef = useRef22(false);
9502
- const onUrlGeneratedRef = useRef22(onUrlGenerated);
9823
+ const lastUrlRef = useRef23(realtimeUrl ?? initialStaticUrl ?? null);
9824
+ const priorityRegisteredRef = useRef23(false);
9825
+ const onLoadCalledRef = useRef23(false);
9826
+ const prevArtworkSrcRef = useRef23(void 0);
9827
+ const realtimeArtworkSrcRef = useRef23(void 0);
9828
+ const hasReceivedRealtimeRef = useRef23(false);
9829
+ const isPendingExportRef = useRef23(false);
9830
+ const onUrlGeneratedRef = useRef23(onUrlGenerated);
9503
9831
  onUrlGeneratedRef.current = onUrlGenerated;
9504
- const layersLengthRef = useRef22(layers.length);
9832
+ const layersLengthRef = useRef23(layers.length);
9505
9833
  layersLengthRef.current = layers.length;
9506
- useEffect31(() => {
9834
+ useEffect32(() => {
9507
9835
  if (initialPriority === 1) return;
9508
9836
  if (!containerMounted || !containerRef.current) return;
9509
9837
  if (isInPreloadZone) return;
@@ -9522,7 +9850,7 @@ var HeroProductImage = memo2(function HeroProductImage2({
9522
9850
  );
9523
9851
  return unobserve;
9524
9852
  }, [containerMounted, initialPriority, isInPreloadZone]);
9525
- useEffect31(() => {
9853
+ useEffect32(() => {
9526
9854
  if (!realtimeUrl) return;
9527
9855
  if (realtimeUrl === lastUrlRef.current) return;
9528
9856
  lastUrlRef.current = realtimeUrl;
@@ -9530,7 +9858,7 @@ var HeroProductImage = memo2(function HeroProductImage2({
9530
9858
  const isInitialLoad = layersLengthRef.current === 0;
9531
9859
  addLayerDirectly(realtimeUrl, { skipTransition: isInitialLoad });
9532
9860
  }, [realtimeUrl, addLayerDirectly, actualMockupId, placement]);
9533
- useEffect31(() => {
9861
+ useEffect32(() => {
9534
9862
  if (mode === "static") {
9535
9863
  return;
9536
9864
  }
@@ -9574,7 +9902,7 @@ var HeroProductImage = memo2(function HeroProductImage2({
9574
9902
  addLayerDirectly
9575
9903
  // NOTE: layers.length removed - use layersLengthRef instead to prevent duplicate requests
9576
9904
  ]);
9577
- useEffect31(() => {
9905
+ useEffect32(() => {
9578
9906
  if (mode === "static") return;
9579
9907
  if (!realtimeContext?.subscribePendingBlob || !placement) return;
9580
9908
  const handlePendingExport = (pendingPlacement) => {
@@ -9587,7 +9915,7 @@ var HeroProductImage = memo2(function HeroProductImage2({
9587
9915
  unsubscribe?.();
9588
9916
  };
9589
9917
  }, [mode, realtimeContext?.subscribePendingBlob, placement]);
9590
- useEffect31(() => {
9918
+ useEffect32(() => {
9591
9919
  if (!priorityContext || !actualMockupId || !placement) return;
9592
9920
  priorityContext.registerMockup(actualMockupId, placement, initialPriority);
9593
9921
  priorityRegisteredRef.current = true;
@@ -9598,7 +9926,7 @@ var HeroProductImage = memo2(function HeroProductImage2({
9598
9926
  }
9599
9927
  };
9600
9928
  }, [priorityContext, actualMockupId, placement, initialPriority]);
9601
- useEffect31(() => {
9929
+ useEffect32(() => {
9602
9930
  if (!priorityContext?.updateElementRef || !actualMockupId) return;
9603
9931
  if (containerMounted && containerRef.current) {
9604
9932
  priorityContext.updateElementRef(actualMockupId, containerRef.current);
@@ -9612,7 +9940,7 @@ var HeroProductImage = memo2(function HeroProductImage2({
9612
9940
  const artworkTileCount = artwork?.type === "pattern" ? artwork?.tileCount : void 0;
9613
9941
  const selectedArtworkType = designContext?.selectedArtwork?.type;
9614
9942
  const selectedArtworkTileCount = designContext?.selectedArtwork?.type === "pattern" ? designContext?.selectedArtwork?.tileCount : void 0;
9615
- useEffect31(() => {
9943
+ useEffect32(() => {
9616
9944
  const currentSrc = artworkSrc || selectedArtworkSrc;
9617
9945
  if (currentSrc !== prevArtworkSrcRef.current) {
9618
9946
  lastUrlRef.current = null;
@@ -9622,11 +9950,11 @@ var HeroProductImage = memo2(function HeroProductImage2({
9622
9950
  realtimeArtworkSrcRef.current = void 0;
9623
9951
  }
9624
9952
  }, [artworkSrc, selectedArtworkSrc]);
9625
- const contextSelectionRef = useRef22(context?.selection);
9626
- const contextOptionAttributesRef = useRef22(context?.optionAttributes);
9953
+ const contextSelectionRef = useRef23(context?.selection);
9954
+ const contextOptionAttributesRef = useRef23(context?.optionAttributes);
9627
9955
  contextSelectionRef.current = context?.selection;
9628
9956
  contextOptionAttributesRef.current = context?.optionAttributes;
9629
- const createDesignForPlacementsWrapper = useCallback17(
9957
+ const createDesignForPlacementsWrapper = useCallback18(
9630
9958
  (placements, providedImages) => {
9631
9959
  const effectiveArtworkSrc2 = artworkSrc || selectedArtworkSrc;
9632
9960
  if (!effectiveArtworkSrc2 || effectiveArtworkSrc2.trim() === "" || effectiveArtworkSrc2 === "undefined" || effectiveArtworkSrc2 === "null") {
@@ -9665,7 +9993,7 @@ var HeroProductImage = memo2(function HeroProductImage2({
9665
9993
  selectedArtworkTileCount
9666
9994
  ]
9667
9995
  );
9668
- useEffect31(() => {
9996
+ useEffect32(() => {
9669
9997
  if (mode === "realtime") return;
9670
9998
  if (initialStaticUrl && lastUrlRef.current === initialStaticUrl) {
9671
9999
  return;
@@ -9765,13 +10093,13 @@ var HeroProductImage = memo2(function HeroProductImage2({
9765
10093
  const topLayer = layers[layers.length - 1];
9766
10094
  const displayUrl = topLayer?.url || realtimeUrl || initialStaticUrl;
9767
10095
  const CROSSFADE_MS = 400;
9768
- const [prevUrl, setPrevUrl] = useState30(null);
9769
- const [showNew, setShowNew] = useState30(false);
9770
- const [renderedUrl, setRenderedUrl] = useState30(displayUrl);
9771
- const [firstImageLoaded, setFirstImageLoaded] = useState30(false);
9772
- const prevDisplayUrlRef = useRef22(displayUrl);
9773
- const signHintShownRef = useRef22(false);
9774
- useEffect31(() => {
10096
+ const [prevUrl, setPrevUrl] = useState31(null);
10097
+ const [showNew, setShowNew] = useState31(false);
10098
+ const [renderedUrl, setRenderedUrl] = useState31(displayUrl);
10099
+ const [firstImageLoaded, setFirstImageLoaded] = useState31(false);
10100
+ const prevDisplayUrlRef = useRef23(displayUrl);
10101
+ const signHintShownRef = useRef23(false);
10102
+ useEffect32(() => {
9775
10103
  if (!displayUrl || displayUrl === prevDisplayUrlRef.current) return;
9776
10104
  const oldUrl = prevDisplayUrlRef.current;
9777
10105
  prevDisplayUrlRef.current = displayUrl;
@@ -9796,25 +10124,25 @@ var HeroProductImage = memo2(function HeroProductImage2({
9796
10124
  preload.onload = null;
9797
10125
  };
9798
10126
  }, [displayUrl]);
9799
- const handleCrossfadeEnd = useCallback17(() => {
10127
+ const handleCrossfadeEnd = useCallback18(() => {
9800
10128
  setPrevUrl(null);
9801
10129
  setShowNew(false);
9802
10130
  }, []);
9803
10131
  if (!hasArtwork) {
9804
- return /* @__PURE__ */ jsx59(
10132
+ return /* @__PURE__ */ jsx60(
9805
10133
  "div",
9806
10134
  {
9807
10135
  className: `bg-gray-100 flex items-center justify-center ${className || ""}`,
9808
10136
  style,
9809
- children: /* @__PURE__ */ jsxs38("div", { className: "text-gray-400 text-center p-4", children: [
9810
- /* @__PURE__ */ jsx59(
10137
+ children: /* @__PURE__ */ jsxs39("div", { className: "text-gray-400 text-center p-4", children: [
10138
+ /* @__PURE__ */ jsx60(
9811
10139
  "svg",
9812
10140
  {
9813
10141
  className: "w-8 h-8 mx-auto mb-2",
9814
10142
  fill: "none",
9815
10143
  stroke: "currentColor",
9816
10144
  viewBox: "0 0 24 24",
9817
- children: /* @__PURE__ */ jsx59(
10145
+ children: /* @__PURE__ */ jsx60(
9818
10146
  "path",
9819
10147
  {
9820
10148
  strokeLinecap: "round",
@@ -9825,22 +10153,22 @@ var HeroProductImage = memo2(function HeroProductImage2({
9825
10153
  )
9826
10154
  }
9827
10155
  ),
9828
- /* @__PURE__ */ jsx59("p", { className: "text-xs", children: "No artwork" })
10156
+ /* @__PURE__ */ jsx60("p", { className: "text-xs", children: "No artwork" })
9829
10157
  ] })
9830
10158
  }
9831
10159
  );
9832
10160
  }
9833
10161
  if (error) {
9834
- return /* @__PURE__ */ jsx59(
10162
+ return /* @__PURE__ */ jsx60(
9835
10163
  "div",
9836
10164
  {
9837
10165
  className: `bg-red-50 flex items-center justify-center ${className || ""}`,
9838
10166
  style,
9839
- children: /* @__PURE__ */ jsx59("div", { className: "text-red-600 text-center p-4", children: /* @__PURE__ */ jsx59("p", { className: "text-xs", children: "Error loading" }) })
10167
+ children: /* @__PURE__ */ jsx60("div", { className: "text-red-600 text-center p-4", children: /* @__PURE__ */ jsx60("p", { className: "text-xs", children: "Error loading" }) })
9840
10168
  }
9841
10169
  );
9842
10170
  }
9843
- return /* @__PURE__ */ jsxs38(
10171
+ return /* @__PURE__ */ jsxs39(
9844
10172
  "div",
9845
10173
  {
9846
10174
  ref: setContainerRef,
@@ -9848,8 +10176,8 @@ var HeroProductImage = memo2(function HeroProductImage2({
9848
10176
  style,
9849
10177
  "data-hero-image": "true",
9850
10178
  children: [
9851
- !firstImageLoaded && /* @__PURE__ */ jsx59("div", { className: "absolute inset-0 bg-muted-foreground/20 animate-pulse" }),
9852
- renderedUrl && /* @__PURE__ */ jsx59(
10179
+ !firstImageLoaded && /* @__PURE__ */ jsx60("div", { className: "absolute inset-0 bg-muted-foreground/20 animate-pulse" }),
10180
+ renderedUrl && /* @__PURE__ */ jsx60(
9853
10181
  "img",
9854
10182
  {
9855
10183
  alt: `Product mockup${placement ? ` - ${placement}` : ""}`,
@@ -9881,7 +10209,7 @@ var HeroProductImage = memo2(function HeroProductImage2({
9881
10209
  }
9882
10210
  }
9883
10211
  ),
9884
- prevUrl && /* @__PURE__ */ jsx59(
10212
+ prevUrl && /* @__PURE__ */ jsx60(
9885
10213
  "img",
9886
10214
  {
9887
10215
  alt: "",
@@ -9924,11 +10252,11 @@ var { searchClient } = instantMeiliSearch(
9924
10252
  );
9925
10253
 
9926
10254
  // src/composed/search/SearchProvider.tsx
9927
- import { useEffect as useEffect32 } from "react";
9928
- import { jsx as jsx60, jsxs as jsxs39 } from "react/jsx-runtime";
10255
+ import { useEffect as useEffect33 } from "react";
10256
+ import { jsx as jsx61, jsxs as jsxs40 } from "react/jsx-runtime";
9929
10257
  function InitialSearchTrigger() {
9930
10258
  const { refine } = useSearchBox();
9931
- useEffect32(() => {
10259
+ useEffect33(() => {
9932
10260
  refine("");
9933
10261
  }, [refine]);
9934
10262
  return null;
@@ -9952,7 +10280,7 @@ function SearchProvider({
9952
10280
  ],
9953
10281
  children
9954
10282
  }) {
9955
- return /* @__PURE__ */ jsxs39(
10283
+ return /* @__PURE__ */ jsxs40(
9956
10284
  InstantSearch,
9957
10285
  {
9958
10286
  searchClient,
@@ -9980,7 +10308,7 @@ function SearchProvider({
9980
10308
  }
9981
10309
  },
9982
10310
  children: [
9983
- /* @__PURE__ */ jsx60(
10311
+ /* @__PURE__ */ jsx61(
9984
10312
  Configure,
9985
10313
  {
9986
10314
  hitsPerPage,
@@ -9989,7 +10317,7 @@ function SearchProvider({
9989
10317
  attributesToRetrieve
9990
10318
  }
9991
10319
  ),
9992
- /* @__PURE__ */ jsx60(InitialSearchTrigger, {}),
10320
+ /* @__PURE__ */ jsx61(InitialSearchTrigger, {}),
9993
10321
  children
9994
10322
  ]
9995
10323
  }
@@ -9999,17 +10327,17 @@ function SearchProvider({
9999
10327
  // src/composed/search/SearchBox.tsx
10000
10328
  import { useSearchBox as useSearchBox2 } from "react-instantsearch";
10001
10329
  import { Search, X } from "lucide-react";
10002
- import { useEffect as useEffect33, useRef as useRef23, useState as useState31 } from "react";
10003
- import { jsx as jsx61, jsxs as jsxs40 } from "react/jsx-runtime";
10330
+ import { useEffect as useEffect34, useRef as useRef24, useState as useState32 } from "react";
10331
+ import { jsx as jsx62, jsxs as jsxs41 } from "react/jsx-runtime";
10004
10332
  function SearchBox() {
10005
10333
  const { query, refine, clear } = useSearchBox2();
10006
10334
  const searchParams = useUiSearchParams();
10007
10335
  const router = useUiRouter();
10008
- const inputRef = useRef23(null);
10009
- const [showShimmer, setShowShimmer] = useState31(false);
10336
+ const inputRef = useRef24(null);
10337
+ const [showShimmer, setShowShimmer] = useState32(false);
10010
10338
  const inputId = "search-products-input";
10011
10339
  const descriptionId = "search-description";
10012
- useEffect33(() => {
10340
+ useEffect34(() => {
10013
10341
  const handleSpotlight = () => {
10014
10342
  inputRef.current?.focus();
10015
10343
  inputRef.current?.scrollIntoView({ behavior: "smooth", block: "center" });
@@ -10019,7 +10347,7 @@ function SearchBox() {
10019
10347
  window.addEventListener("search-spotlight", handleSpotlight);
10020
10348
  return () => window.removeEventListener("search-spotlight", handleSpotlight);
10021
10349
  }, []);
10022
- useEffect33(() => {
10350
+ useEffect34(() => {
10023
10351
  const shouldFocus = searchParams.get("focus") === "search";
10024
10352
  if (shouldFocus && inputRef.current) {
10025
10353
  const timer = setTimeout(() => {
@@ -10034,8 +10362,8 @@ function SearchBox() {
10034
10362
  return () => clearTimeout(timer);
10035
10363
  }
10036
10364
  }, [searchParams, router]);
10037
- return /* @__PURE__ */ jsx61("form", { role: "search", onSubmit: (e) => e.preventDefault(), children: /* @__PURE__ */ jsxs40("div", { className: "relative", children: [
10038
- /* @__PURE__ */ jsx61(
10365
+ return /* @__PURE__ */ jsx62("form", { role: "search", onSubmit: (e) => e.preventDefault(), children: /* @__PURE__ */ jsxs41("div", { className: "relative", children: [
10366
+ /* @__PURE__ */ jsx62(
10039
10367
  Input,
10040
10368
  {
10041
10369
  ref: inputRef,
@@ -10044,15 +10372,15 @@ function SearchBox() {
10044
10372
  value: query,
10045
10373
  onChange: (e) => refine(e.target.value),
10046
10374
  placeholder: "Search products...",
10047
- startContent: /* @__PURE__ */ jsx61(Search, { className: "w-5 h-5", strokeWidth: 1.5, "aria-hidden": "true" }),
10048
- endContent: query ? /* @__PURE__ */ jsx61(
10375
+ startContent: /* @__PURE__ */ jsx62(Search, { className: "w-5 h-5", strokeWidth: 1.5, "aria-hidden": "true" }),
10376
+ endContent: query ? /* @__PURE__ */ jsx62(
10049
10377
  "button",
10050
10378
  {
10051
10379
  type: "button",
10052
10380
  onClick: clear,
10053
10381
  className: "hover:text-foreground transition-colors",
10054
10382
  "aria-label": "Clear search",
10055
- children: /* @__PURE__ */ jsx61(X, { className: "w-4 h-4", strokeWidth: 2, "aria-hidden": "true" })
10383
+ children: /* @__PURE__ */ jsx62(X, { className: "w-4 h-4", strokeWidth: 2, "aria-hidden": "true" })
10056
10384
  }
10057
10385
  ) : void 0,
10058
10386
  "aria-label": "Search products",
@@ -10062,11 +10390,11 @@ function SearchBox() {
10062
10390
  className: "[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden"
10063
10391
  }
10064
10392
  ),
10065
- showShimmer && /* @__PURE__ */ jsx61(
10393
+ showShimmer && /* @__PURE__ */ jsx62(
10066
10394
  "div",
10067
10395
  {
10068
10396
  className: "absolute inset-0 pointer-events-none rounded-input z-20 overflow-hidden",
10069
- children: /* @__PURE__ */ jsx61(
10397
+ children: /* @__PURE__ */ jsx62(
10070
10398
  "div",
10071
10399
  {
10072
10400
  className: "absolute inset-0",
@@ -10079,13 +10407,13 @@ function SearchBox() {
10079
10407
  )
10080
10408
  }
10081
10409
  ),
10082
- /* @__PURE__ */ jsx61("style", { dangerouslySetInnerHTML: { __html: `
10410
+ /* @__PURE__ */ jsx62("style", { dangerouslySetInnerHTML: { __html: `
10083
10411
  @keyframes searchShimmer {
10084
10412
  0% { transform: translateX(-100%); }
10085
10413
  100% { transform: translateX(100%); }
10086
10414
  }
10087
10415
  ` } }),
10088
- /* @__PURE__ */ jsx61("span", { id: descriptionId, className: "sr-only", children: "Search results will update as you type" })
10416
+ /* @__PURE__ */ jsx62("span", { id: descriptionId, className: "sr-only", children: "Search results will update as you type" })
10089
10417
  ] }) });
10090
10418
  }
10091
10419
 
@@ -10093,7 +10421,7 @@ function SearchBox() {
10093
10421
  import { Hits, useStats, useInstantSearch } from "react-instantsearch";
10094
10422
 
10095
10423
  // src/composed/search/ProductHit.tsx
10096
- import { jsx as jsx62 } from "react/jsx-runtime";
10424
+ import { jsx as jsx63 } from "react/jsx-runtime";
10097
10425
  function ProductHitComponent({
10098
10426
  hit: product,
10099
10427
  variant = "overlay"
@@ -10110,12 +10438,12 @@ function ProductHitComponent({
10110
10438
  }
10111
10439
  return "";
10112
10440
  };
10113
- return /* @__PURE__ */ jsx62(
10441
+ return /* @__PURE__ */ jsx63(
10114
10442
  Product,
10115
10443
  {
10116
10444
  productId,
10117
10445
  productData: product,
10118
- children: /* @__PURE__ */ jsx62(
10446
+ children: /* @__PURE__ */ jsx63(
10119
10447
  ProductCard,
10120
10448
  {
10121
10449
  variant,
@@ -10136,10 +10464,10 @@ function ProductHitComponent({
10136
10464
  }
10137
10465
 
10138
10466
  // src/composed/search/ProductGrid.tsx
10139
- import { useState as useState32, useEffect as useEffect34, useCallback as useCallback18 } from "react";
10140
- import { jsx as jsx63, jsxs as jsxs41 } from "react/jsx-runtime";
10467
+ import { useState as useState33, useEffect as useEffect35, useCallback as useCallback19 } from "react";
10468
+ import { jsx as jsx64, jsxs as jsxs42 } from "react/jsx-runtime";
10141
10469
  function ProductGridSkeletonItem() {
10142
- return /* @__PURE__ */ jsx63("div", { className: "aspect-square bg-muted animate-pulse" });
10470
+ return /* @__PURE__ */ jsx64("div", { className: "aspect-square bg-muted animate-pulse" });
10143
10471
  }
10144
10472
  function ProductGrid({
10145
10473
  className = "",
@@ -10149,26 +10477,26 @@ function ProductGrid({
10149
10477
  }) {
10150
10478
  const { nbHits } = useStats();
10151
10479
  const { status, results } = useInstantSearch();
10152
- const [announcement, setAnnouncement] = useState32("");
10480
+ const [announcement, setAnnouncement] = useState33("");
10153
10481
  const hitsCount = results?.hits?.length ?? 0;
10154
10482
  const showSkeleton = hitsCount === 0 && status !== "error";
10155
- useEffect34(() => {
10483
+ useEffect35(() => {
10156
10484
  const timer = setTimeout(() => {
10157
10485
  setAnnouncement(`${nbHits} ${nbHits === 1 ? "product" : "products"} found`);
10158
10486
  }, 1e3);
10159
10487
  return () => clearTimeout(timer);
10160
10488
  }, [nbHits]);
10161
- const HitComponent = useCallback18(({ hit }) => /* @__PURE__ */ jsx63(
10489
+ const HitComponent = useCallback19(({ hit }) => /* @__PURE__ */ jsx64(
10162
10490
  ProductHitComponent,
10163
10491
  {
10164
10492
  hit,
10165
10493
  variant
10166
10494
  }
10167
10495
  ), [variant]);
10168
- return /* @__PURE__ */ jsxs41("div", { className, children: [
10169
- /* @__PURE__ */ jsx63("div", { className: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", children: announcement }),
10170
- showSkeleton && /* @__PURE__ */ jsx63("div", { className: `grid ${gridClassName}`, children: Array.from({ length: skeletonCount }).map((_, i) => /* @__PURE__ */ jsx63(ProductGridSkeletonItem, {}, i)) }),
10171
- /* @__PURE__ */ jsx63("div", { className: showSkeleton ? "hidden" : "", children: /* @__PURE__ */ jsx63(
10496
+ return /* @__PURE__ */ jsxs42("div", { className, children: [
10497
+ /* @__PURE__ */ jsx64("div", { className: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", children: announcement }),
10498
+ showSkeleton && /* @__PURE__ */ jsx64("div", { className: `grid ${gridClassName}`, children: Array.from({ length: skeletonCount }).map((_, i) => /* @__PURE__ */ jsx64(ProductGridSkeletonItem, {}, i)) }),
10499
+ /* @__PURE__ */ jsx64("div", { className: showSkeleton ? "hidden" : "", children: /* @__PURE__ */ jsx64(
10172
10500
  Hits,
10173
10501
  {
10174
10502
  hitComponent: HitComponent,
@@ -10183,18 +10511,18 @@ function ProductGrid({
10183
10511
  }
10184
10512
 
10185
10513
  // src/composed/search/Filters.tsx
10186
- import { useState as useState34 } from "react";
10514
+ import { useState as useState35 } from "react";
10187
10515
 
10188
10516
  // src/composed/search/FiltersButton.tsx
10189
10517
  import { SlidersHorizontal as LucideSlidersHorizontal } from "lucide-react";
10190
- import { jsx as jsx64, jsxs as jsxs42 } from "react/jsx-runtime";
10518
+ import { jsx as jsx65, jsxs as jsxs43 } from "react/jsx-runtime";
10191
10519
  var SlidersHorizontalIcon = LucideSlidersHorizontal;
10192
10520
  function FiltersButton({
10193
10521
  onClick,
10194
10522
  className = "",
10195
10523
  children = "Filters"
10196
10524
  }) {
10197
- return /* @__PURE__ */ jsxs42(
10525
+ return /* @__PURE__ */ jsxs43(
10198
10526
  Button,
10199
10527
  {
10200
10528
  variant: "field",
@@ -10202,8 +10530,8 @@ function FiltersButton({
10202
10530
  className,
10203
10531
  "aria-label": "Open filters",
10204
10532
  children: [
10205
- /* @__PURE__ */ jsx64(SlidersHorizontalIcon, { className: "w-4 h-4" }),
10206
- /* @__PURE__ */ jsx64("span", { children })
10533
+ /* @__PURE__ */ jsx65(SlidersHorizontalIcon, { className: "w-4 h-4" }),
10534
+ /* @__PURE__ */ jsx65("span", { children })
10207
10535
  ]
10208
10536
  }
10209
10537
  );
@@ -10212,15 +10540,15 @@ function FiltersButton({
10212
10540
  // src/composed/search/FiltersDrawer.tsx
10213
10541
  import { useRefinementList, useRange, useStats as useStats2 } from "react-instantsearch";
10214
10542
  import { X as LucideX2, SlidersHorizontal as LucideSlidersHorizontal2 } from "lucide-react";
10215
- import { useState as useState33, useEffect as useEffect35 } from "react";
10543
+ import { useState as useState34, useEffect as useEffect36 } from "react";
10216
10544
  import * as Slider2 from "@radix-ui/react-slider";
10217
- import { Fragment as Fragment11, jsx as jsx65, jsxs as jsxs43 } from "react/jsx-runtime";
10545
+ import { Fragment as Fragment12, jsx as jsx66, jsxs as jsxs44 } from "react/jsx-runtime";
10218
10546
  var XIcon2 = LucideX2;
10219
10547
  function FiltersDrawer({ isOpen, onClose }) {
10220
- const [showCounts, setShowCounts] = useState33(false);
10548
+ const [showCounts, setShowCounts] = useState34(false);
10221
10549
  const { nbHits } = useStats2();
10222
10550
  const containerRef = useFocusTrap(isOpen, onClose);
10223
- useEffect35(() => {
10551
+ useEffect36(() => {
10224
10552
  if (isOpen) {
10225
10553
  document.body.style.overflow = "hidden";
10226
10554
  } else {
@@ -10230,7 +10558,7 @@ function FiltersDrawer({ isOpen, onClose }) {
10230
10558
  document.body.style.overflow = "";
10231
10559
  };
10232
10560
  }, [isOpen]);
10233
- useEffect35(() => {
10561
+ useEffect36(() => {
10234
10562
  const handleEscape = (e) => {
10235
10563
  if (e.key === "Escape" && isOpen) {
10236
10564
  onClose();
@@ -10239,8 +10567,8 @@ function FiltersDrawer({ isOpen, onClose }) {
10239
10567
  document.addEventListener("keydown", handleEscape);
10240
10568
  return () => document.removeEventListener("keydown", handleEscape);
10241
10569
  }, [isOpen, onClose]);
10242
- return /* @__PURE__ */ jsxs43(Fragment11, { children: [
10243
- /* @__PURE__ */ jsx65(
10570
+ return /* @__PURE__ */ jsxs44(Fragment12, { children: [
10571
+ /* @__PURE__ */ jsx66(
10244
10572
  "div",
10245
10573
  {
10246
10574
  className: `fixed inset-0 bg-black/50 z-40 transition-opacity ${isOpen ? "opacity-100" : "opacity-0 pointer-events-none"}`,
@@ -10248,7 +10576,7 @@ function FiltersDrawer({ isOpen, onClose }) {
10248
10576
  "aria-hidden": "true"
10249
10577
  }
10250
10578
  ),
10251
- /* @__PURE__ */ jsxs43(
10579
+ /* @__PURE__ */ jsxs44(
10252
10580
  "div",
10253
10581
  {
10254
10582
  ref: containerRef,
@@ -10257,26 +10585,26 @@ function FiltersDrawer({ isOpen, onClose }) {
10257
10585
  "aria-modal": "true",
10258
10586
  "aria-labelledby": "filters-drawer-title",
10259
10587
  children: [
10260
- /* @__PURE__ */ jsxs43("div", { className: "flex items-center justify-between px-4 py-4", children: [
10261
- /* @__PURE__ */ jsx65("h2", { id: "filters-drawer-title", className: "text-xl font-bold", children: "Filters" }),
10262
- /* @__PURE__ */ jsx65(
10588
+ /* @__PURE__ */ jsxs44("div", { className: "flex items-center justify-between px-4 py-4", children: [
10589
+ /* @__PURE__ */ jsx66("h2", { id: "filters-drawer-title", className: "text-xl font-bold", children: "Filters" }),
10590
+ /* @__PURE__ */ jsx66(
10263
10591
  "button",
10264
10592
  {
10265
10593
  onClick: onClose,
10266
10594
  className: "p-2 hover:bg-foreground/5 rounded-full transition-colors",
10267
10595
  "aria-label": "Close filters",
10268
- children: /* @__PURE__ */ jsx65(XIcon2, { className: "w-5 h-5" })
10596
+ children: /* @__PURE__ */ jsx66(XIcon2, { className: "w-5 h-5" })
10269
10597
  }
10270
10598
  )
10271
10599
  ] }),
10272
- /* @__PURE__ */ jsx65("div", { className: "px-4 pb-4", children: /* @__PURE__ */ jsxs43("p", { className: "text-sm font-caption text-foreground/60", role: "status", "aria-live": "polite", children: [
10600
+ /* @__PURE__ */ jsx66("div", { className: "px-4 pb-4", children: /* @__PURE__ */ jsxs44("p", { className: "text-sm font-caption text-foreground/60", role: "status", "aria-live": "polite", children: [
10273
10601
  nbHits.toLocaleString(),
10274
10602
  " ",
10275
10603
  nbHits === 1 ? "result" : "results"
10276
10604
  ] }) }),
10277
- /* @__PURE__ */ jsx65("div", { className: "flex-1 overflow-y-auto px-4 pb-4", children: /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-8", children: [
10278
- /* @__PURE__ */ jsx65(TagsSection, { showCounts, setShowCounts }),
10279
- /* @__PURE__ */ jsx65(PriceSection, {})
10605
+ /* @__PURE__ */ jsx66("div", { className: "flex-1 overflow-y-auto px-4 pb-4", children: /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-8", children: [
10606
+ /* @__PURE__ */ jsx66(TagsSection, { showCounts, setShowCounts }),
10607
+ /* @__PURE__ */ jsx66(PriceSection, {})
10280
10608
  ] }) })
10281
10609
  ]
10282
10610
  }
@@ -10292,9 +10620,9 @@ function TagsSection({
10292
10620
  sortBy: ["count:desc", "name:asc"],
10293
10621
  limit: 100
10294
10622
  });
10295
- const [isExpanded, setIsExpanded] = useState33(true);
10296
- return /* @__PURE__ */ jsxs43("div", { className: "bg-foreground/5 rounded-lg p-4", children: [
10297
- /* @__PURE__ */ jsxs43(
10623
+ const [isExpanded, setIsExpanded] = useState34(true);
10624
+ return /* @__PURE__ */ jsxs44("div", { className: "bg-foreground/5 rounded-lg p-4", children: [
10625
+ /* @__PURE__ */ jsxs44(
10298
10626
  "button",
10299
10627
  {
10300
10628
  onClick: () => setIsExpanded(!isExpanded),
@@ -10302,8 +10630,8 @@ function TagsSection({
10302
10630
  "aria-expanded": isExpanded,
10303
10631
  "aria-controls": "tags-content",
10304
10632
  children: [
10305
- /* @__PURE__ */ jsx65("h3", { className: "text-base font-semibold text-primary", children: "Tags" }),
10306
- /* @__PURE__ */ jsx65(
10633
+ /* @__PURE__ */ jsx66("h3", { className: "text-base font-semibold text-primary", children: "Tags" }),
10634
+ /* @__PURE__ */ jsx66(
10307
10635
  "svg",
10308
10636
  {
10309
10637
  className: `w-5 h-5 transition-transform text-foreground/40 group-hover:text-foreground/60 ${isExpanded ? "rotate-180" : ""}`,
@@ -10312,14 +10640,14 @@ function TagsSection({
10312
10640
  stroke: "currentColor",
10313
10641
  strokeWidth: 2.5,
10314
10642
  "aria-hidden": "true",
10315
- children: /* @__PURE__ */ jsx65("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
10643
+ children: /* @__PURE__ */ jsx66("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
10316
10644
  }
10317
10645
  )
10318
10646
  ]
10319
10647
  }
10320
10648
  ),
10321
- isExpanded && /* @__PURE__ */ jsxs43("div", { className: "space-y-4", id: "tags-content", children: [
10322
- /* @__PURE__ */ jsx65("div", { className: "flex flex-wrap gap-2", role: "group", "aria-label": "Product tags filter", children: items.map((item) => /* @__PURE__ */ jsxs43(
10649
+ isExpanded && /* @__PURE__ */ jsxs44("div", { className: "space-y-4", id: "tags-content", children: [
10650
+ /* @__PURE__ */ jsx66("div", { className: "flex flex-wrap gap-2", role: "group", "aria-label": "Product tags filter", children: items.map((item) => /* @__PURE__ */ jsxs44(
10323
10651
  "button",
10324
10652
  {
10325
10653
  onClick: () => refine(item.value),
@@ -10330,15 +10658,15 @@ function TagsSection({
10330
10658
  "aria-label": `${item.isRefined ? "Remove" : "Apply"} ${item.label} filter${showCounts ? ` (${item.count} products)` : ""}`,
10331
10659
  "aria-pressed": item.isRefined,
10332
10660
  children: [
10333
- /* @__PURE__ */ jsx65("span", { "aria-hidden": "true", children: item.label }),
10334
- showCounts && /* @__PURE__ */ jsx65("span", { className: `text-xs font-caption ${item.isRefined ? "opacity-80" : "opacity-60"}`, "aria-hidden": "true", children: item.count })
10661
+ /* @__PURE__ */ jsx66("span", { "aria-hidden": "true", children: item.label }),
10662
+ showCounts && /* @__PURE__ */ jsx66("span", { className: `text-xs font-caption ${item.isRefined ? "opacity-80" : "opacity-60"}`, "aria-hidden": "true", children: item.count })
10335
10663
  ]
10336
10664
  },
10337
10665
  item.value
10338
10666
  )) }),
10339
- /* @__PURE__ */ jsxs43("div", { className: "flex items-center justify-between pt-2", children: [
10340
- /* @__PURE__ */ jsx65("span", { className: "text-sm font-label text-foreground/60", id: "show-counts-label", children: "Show counts" }),
10341
- /* @__PURE__ */ jsx65(
10667
+ /* @__PURE__ */ jsxs44("div", { className: "flex items-center justify-between pt-2", children: [
10668
+ /* @__PURE__ */ jsx66("span", { className: "text-sm font-label text-foreground/60", id: "show-counts-label", children: "Show counts" }),
10669
+ /* @__PURE__ */ jsx66(
10342
10670
  "button",
10343
10671
  {
10344
10672
  onClick: () => setShowCounts(!showCounts),
@@ -10346,7 +10674,7 @@ function TagsSection({
10346
10674
  role: "switch",
10347
10675
  "aria-checked": showCounts,
10348
10676
  "aria-labelledby": "show-counts-label",
10349
- children: /* @__PURE__ */ jsx65(
10677
+ children: /* @__PURE__ */ jsx66(
10350
10678
  "span",
10351
10679
  {
10352
10680
  className: `inline-block h-4 w-4 transform rounded-full bg-background shadow-sm transition-transform ${showCounts ? "translate-x-6" : "translate-x-1"}`,
@@ -10363,11 +10691,11 @@ function PriceSection() {
10363
10691
  const { range, refine, start, canRefine } = useRange({ attribute: "price" });
10364
10692
  const rangeMin = typeof range.min === "number" && isFinite(range.min) ? range.min : 0;
10365
10693
  const rangeMax = typeof range.max === "number" && isFinite(range.max) ? range.max : 15e3;
10366
- const [localRange, setLocalRange] = useState33([
10694
+ const [localRange, setLocalRange] = useState34([
10367
10695
  typeof start?.[0] === "number" && isFinite(start[0]) ? start[0] : rangeMin,
10368
10696
  typeof start?.[1] === "number" && isFinite(start[1]) ? start[1] : rangeMax
10369
10697
  ]);
10370
- useEffect35(() => {
10698
+ useEffect36(() => {
10371
10699
  if (start && Array.isArray(start)) {
10372
10700
  setLocalRange([
10373
10701
  typeof start[0] === "number" && isFinite(start[0]) ? start[0] : rangeMin,
@@ -10377,7 +10705,7 @@ function PriceSection() {
10377
10705
  setLocalRange([rangeMin, rangeMax]);
10378
10706
  }
10379
10707
  }, [start, rangeMin, rangeMax]);
10380
- const [isExpanded, setIsExpanded] = useState33(true);
10708
+ const [isExpanded, setIsExpanded] = useState34(true);
10381
10709
  if (!canRefine) {
10382
10710
  return null;
10383
10711
  }
@@ -10392,8 +10720,8 @@ function PriceSection() {
10392
10720
  return `$${priceInDollars.toFixed(2)}`;
10393
10721
  }
10394
10722
  };
10395
- return /* @__PURE__ */ jsxs43("div", { className: "bg-foreground/5 rounded-lg p-4", children: [
10396
- /* @__PURE__ */ jsxs43(
10723
+ return /* @__PURE__ */ jsxs44("div", { className: "bg-foreground/5 rounded-lg p-4", children: [
10724
+ /* @__PURE__ */ jsxs44(
10397
10725
  "button",
10398
10726
  {
10399
10727
  onClick: () => setIsExpanded(!isExpanded),
@@ -10401,8 +10729,8 @@ function PriceSection() {
10401
10729
  "aria-expanded": isExpanded,
10402
10730
  "aria-controls": "price-content",
10403
10731
  children: [
10404
- /* @__PURE__ */ jsx65("h3", { className: "text-base font-semibold text-primary", children: "Price" }),
10405
- /* @__PURE__ */ jsx65(
10732
+ /* @__PURE__ */ jsx66("h3", { className: "text-base font-semibold text-primary", children: "Price" }),
10733
+ /* @__PURE__ */ jsx66(
10406
10734
  "svg",
10407
10735
  {
10408
10736
  className: `w-5 h-5 transition-transform text-foreground/40 group-hover:text-foreground/60 ${isExpanded ? "rotate-180" : ""}`,
@@ -10411,22 +10739,22 @@ function PriceSection() {
10411
10739
  stroke: "currentColor",
10412
10740
  strokeWidth: 2.5,
10413
10741
  "aria-hidden": "true",
10414
- children: /* @__PURE__ */ jsx65("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
10742
+ children: /* @__PURE__ */ jsx66("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
10415
10743
  }
10416
10744
  )
10417
10745
  ]
10418
10746
  }
10419
10747
  ),
10420
- isExpanded && /* @__PURE__ */ jsxs43("div", { className: "space-y-6", id: "price-content", children: [
10421
- /* @__PURE__ */ jsxs43("div", { className: "flex items-center justify-between text-sm font-display", children: [
10422
- /* @__PURE__ */ jsx65("span", { children: formatPrice2(localRange[0]) }),
10423
- /* @__PURE__ */ jsx65("span", { className: "text-foreground/70", children: formatPrice2(localRange[1]) })
10748
+ isExpanded && /* @__PURE__ */ jsxs44("div", { className: "space-y-6", id: "price-content", children: [
10749
+ /* @__PURE__ */ jsxs44("div", { className: "flex items-center justify-between text-sm font-display", children: [
10750
+ /* @__PURE__ */ jsx66("span", { children: formatPrice2(localRange[0]) }),
10751
+ /* @__PURE__ */ jsx66("span", { className: "text-foreground/70", children: formatPrice2(localRange[1]) })
10424
10752
  ] }),
10425
- /* @__PURE__ */ jsx65("div", { className: "relative h-24 flex items-end justify-between gap-0.5 px-1", "aria-hidden": "true", role: "presentation", children: [60, 40, 80, 50, 60, 30, 20, 15, 10, 5, 30, 20, 15, 10, 5, 3, 3, 60, 40].map((height, i) => {
10753
+ /* @__PURE__ */ jsx66("div", { className: "relative h-24 flex items-end justify-between gap-0.5 px-1", "aria-hidden": "true", role: "presentation", children: [60, 40, 80, 50, 60, 30, 20, 15, 10, 5, 30, 20, 15, 10, 5, 3, 3, 60, 40].map((height, i) => {
10426
10754
  const totalBars = 19;
10427
10755
  const barPrice = rangeMin + (rangeMax - rangeMin) / totalBars * i;
10428
10756
  const isInRange = barPrice >= localRange[0] && barPrice <= localRange[1];
10429
- return /* @__PURE__ */ jsx65(
10757
+ return /* @__PURE__ */ jsx66(
10430
10758
  "div",
10431
10759
  {
10432
10760
  className: `flex-1 rounded-t-sm transition-opacity ${isInRange ? "bg-foreground" : "bg-foreground/20"}`,
@@ -10435,7 +10763,7 @@ function PriceSection() {
10435
10763
  i
10436
10764
  );
10437
10765
  }) }),
10438
- /* @__PURE__ */ jsx65("div", { style: { touchAction: "none" }, className: "my-6", children: /* @__PURE__ */ jsxs43(
10766
+ /* @__PURE__ */ jsx66("div", { style: { touchAction: "none" }, className: "my-6", children: /* @__PURE__ */ jsxs44(
10439
10767
  Slider2.Root,
10440
10768
  {
10441
10769
  className: "relative flex w-full touch-none select-none items-center",
@@ -10453,8 +10781,8 @@ function PriceSection() {
10453
10781
  step: 1,
10454
10782
  minStepsBetweenThumbs: 1,
10455
10783
  children: [
10456
- /* @__PURE__ */ jsx65(Slider2.Track, { className: "relative h-3 w-full grow overflow-hidden rounded-full bg-foreground/20", children: /* @__PURE__ */ jsx65(Slider2.Range, { className: "absolute h-full bg-foreground" }) }),
10457
- /* @__PURE__ */ jsx65(
10784
+ /* @__PURE__ */ jsx66(Slider2.Track, { className: "relative h-3 w-full grow overflow-hidden rounded-full bg-foreground/20", children: /* @__PURE__ */ jsx66(Slider2.Range, { className: "absolute h-full bg-foreground" }) }),
10785
+ /* @__PURE__ */ jsx66(
10458
10786
  Slider2.Thumb,
10459
10787
  {
10460
10788
  className: "block h-6 w-6 rounded-full bg-background shadow transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:pointer-events-none disabled:opacity-50 cursor-grab active:cursor-grabbing hover:scale-105 border-2 border-primary",
@@ -10468,7 +10796,7 @@ function PriceSection() {
10468
10796
  "aria-valuetext": formatPrice2(localRange[0])
10469
10797
  }
10470
10798
  ),
10471
- /* @__PURE__ */ jsx65(
10799
+ /* @__PURE__ */ jsx66(
10472
10800
  Slider2.Thumb,
10473
10801
  {
10474
10802
  className: "block h-6 w-6 rounded-full bg-background shadow transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:pointer-events-none disabled:opacity-50 cursor-grab active:cursor-grabbing hover:scale-105 border-2 border-primary",
@@ -10485,10 +10813,10 @@ function PriceSection() {
10485
10813
  ]
10486
10814
  }
10487
10815
  ) }),
10488
- /* @__PURE__ */ jsxs43("div", { className: "grid grid-cols-2 gap-3", children: [
10489
- /* @__PURE__ */ jsxs43("div", { children: [
10490
- /* @__PURE__ */ jsx65("label", { htmlFor: "price-min", className: "text-xs font-label text-foreground/60 mb-1.5 block", children: "Min" }),
10491
- /* @__PURE__ */ jsx65(
10816
+ /* @__PURE__ */ jsxs44("div", { className: "grid grid-cols-2 gap-3", children: [
10817
+ /* @__PURE__ */ jsxs44("div", { children: [
10818
+ /* @__PURE__ */ jsx66("label", { htmlFor: "price-min", className: "text-xs font-label text-foreground/60 mb-1.5 block", children: "Min" }),
10819
+ /* @__PURE__ */ jsx66(
10492
10820
  "input",
10493
10821
  {
10494
10822
  id: "price-min",
@@ -10506,9 +10834,9 @@ function PriceSection() {
10506
10834
  }
10507
10835
  )
10508
10836
  ] }),
10509
- /* @__PURE__ */ jsxs43("div", { children: [
10510
- /* @__PURE__ */ jsx65("label", { htmlFor: "price-max", className: "text-xs font-label text-foreground/60 mb-1.5 block", children: "Max" }),
10511
- /* @__PURE__ */ jsx65(
10837
+ /* @__PURE__ */ jsxs44("div", { children: [
10838
+ /* @__PURE__ */ jsx66("label", { htmlFor: "price-max", className: "text-xs font-label text-foreground/60 mb-1.5 block", children: "Max" }),
10839
+ /* @__PURE__ */ jsx66(
10512
10840
  "input",
10513
10841
  {
10514
10842
  id: "price-max",
@@ -10532,11 +10860,11 @@ function PriceSection() {
10532
10860
  }
10533
10861
 
10534
10862
  // src/composed/search/Filters.tsx
10535
- import { Fragment as Fragment12, jsx as jsx66, jsxs as jsxs44 } from "react/jsx-runtime";
10863
+ import { Fragment as Fragment13, jsx as jsx67, jsxs as jsxs45 } from "react/jsx-runtime";
10536
10864
  function Filters({ buttonClassName, buttonText }) {
10537
- const [isOpen, setIsOpen] = useState34(false);
10538
- return /* @__PURE__ */ jsxs44(Fragment12, { children: [
10539
- /* @__PURE__ */ jsx66(
10865
+ const [isOpen, setIsOpen] = useState35(false);
10866
+ return /* @__PURE__ */ jsxs45(Fragment13, { children: [
10867
+ /* @__PURE__ */ jsx67(
10540
10868
  FiltersButton,
10541
10869
  {
10542
10870
  onClick: () => setIsOpen(true),
@@ -10544,14 +10872,14 @@ function Filters({ buttonClassName, buttonText }) {
10544
10872
  children: buttonText
10545
10873
  }
10546
10874
  ),
10547
- /* @__PURE__ */ jsx66(FiltersDrawer, { isOpen, onClose: () => setIsOpen(false) })
10875
+ /* @__PURE__ */ jsx67(FiltersDrawer, { isOpen, onClose: () => setIsOpen(false) })
10548
10876
  ] });
10549
10877
  }
10550
10878
 
10551
10879
  // src/composed/search/CurrentRefinements.tsx
10552
10880
  import { useCurrentRefinements } from "react-instantsearch";
10553
10881
  import { X as LucideX3 } from "lucide-react";
10554
- import { jsx as jsx67, jsxs as jsxs45 } from "react/jsx-runtime";
10882
+ import { jsx as jsx68, jsxs as jsxs46 } from "react/jsx-runtime";
10555
10883
  var XIcon3 = LucideX3;
10556
10884
  function CurrentRefinements() {
10557
10885
  const { items, refine } = useCurrentRefinements();
@@ -10597,15 +10925,15 @@ function CurrentRefinements() {
10597
10925
  if (allRefinements.length === 0) {
10598
10926
  return null;
10599
10927
  }
10600
- return /* @__PURE__ */ jsx67("div", { className: "flex flex-wrap items-center gap-2 mb-4 -mt-1", role: "group", "aria-label": "Active filters", children: allRefinements.map((refinement, index) => /* @__PURE__ */ jsxs45(
10928
+ return /* @__PURE__ */ jsx68("div", { className: "flex flex-wrap items-center gap-2 mb-4 -mt-1", role: "group", "aria-label": "Active filters", children: allRefinements.map((refinement, index) => /* @__PURE__ */ jsxs46(
10601
10929
  "button",
10602
10930
  {
10603
10931
  className: "bg-primary text-on-primary hover:bg-primary/90 inline-flex h-7 items-center gap-1.5 rounded-full px-3 text-sm transition-colors",
10604
10932
  onClick: () => refinement.refine(),
10605
10933
  "aria-label": `Remove filter: ${refinement.displayLabel}`,
10606
10934
  children: [
10607
- /* @__PURE__ */ jsx67("span", { className: "truncate", children: refinement.displayLabel }),
10608
- /* @__PURE__ */ jsx67(XIcon3, { className: "w-3 h-3" })
10935
+ /* @__PURE__ */ jsx68("span", { className: "truncate", children: refinement.displayLabel }),
10936
+ /* @__PURE__ */ jsx68(XIcon3, { className: "w-3 h-3" })
10609
10937
  ]
10610
10938
  },
10611
10939
  `${refinement.attribute}-${refinement.value}-${index}`
@@ -10629,12 +10957,12 @@ var FACET_SECTIONS = [
10629
10957
  ];
10630
10958
 
10631
10959
  // src/composed/zoom/ResponsiveZoom.tsx
10632
- import { useState as useState37, useEffect as useEffect37 } from "react";
10960
+ import { useState as useState38, useEffect as useEffect38 } from "react";
10633
10961
 
10634
10962
  // src/composed/zoom/ZoomOverlay.tsx
10635
- import { useState as useState35, useCallback as useCallback19 } from "react";
10963
+ import { useState as useState36, useCallback as useCallback20 } from "react";
10636
10964
  import { Plus as LucidePlus2, Minus as LucideMinus2 } from "lucide-react";
10637
- import { Fragment as Fragment13, jsx as jsx68, jsxs as jsxs46 } from "react/jsx-runtime";
10965
+ import { Fragment as Fragment14, jsx as jsx69, jsxs as jsxs47 } from "react/jsx-runtime";
10638
10966
  var PlusIcon2 = LucidePlus2;
10639
10967
  var MinusIcon2 = LucideMinus2;
10640
10968
  function ZoomOverlay({
@@ -10646,13 +10974,13 @@ function ZoomOverlay({
10646
10974
  className,
10647
10975
  style
10648
10976
  }) {
10649
- const [zoomedImageIndex, setZoomedImageIndex] = useState35(null);
10650
- const [zoomOrigin, setZoomOrigin] = useState35({ x: 50, y: 50 });
10651
- const [hoveredImageIndex, setHoveredImageIndex] = useState35(null);
10652
- const [cursorPos, setCursorPos] = useState35({ x: 0, y: 0 });
10653
- const [announcement, setAnnouncement] = useState35("");
10654
- const [isZooming, setIsZooming] = useState35(false);
10655
- const handleZoomClick = useCallback19(
10977
+ const [zoomedImageIndex, setZoomedImageIndex] = useState36(null);
10978
+ const [zoomOrigin, setZoomOrigin] = useState36({ x: 50, y: 50 });
10979
+ const [hoveredImageIndex, setHoveredImageIndex] = useState36(null);
10980
+ const [cursorPos, setCursorPos] = useState36({ x: 0, y: 0 });
10981
+ const [announcement, setAnnouncement] = useState36("");
10982
+ const [isZooming, setIsZooming] = useState36(false);
10983
+ const handleZoomClick = useCallback20(
10656
10984
  (e) => {
10657
10985
  e.stopPropagation();
10658
10986
  if (isLargeTouchDevice && onEnhancedViewer) {
@@ -10677,7 +11005,7 @@ function ZoomOverlay({
10677
11005
  },
10678
11006
  [zoomedImageIndex, isLargeTouchDevice, onEnhancedViewer, imageIndex]
10679
11007
  );
10680
- const handleZoomMouseMove = useCallback19(
11008
+ const handleZoomMouseMove = useCallback20(
10681
11009
  (e) => {
10682
11010
  setCursorPos({ x: e.clientX, y: e.clientY });
10683
11011
  if (zoomedImageIndex === imageIndex) {
@@ -10693,9 +11021,9 @@ function ZoomOverlay({
10693
11021
  const isZoomed = zoomedImageIndex === imageIndex;
10694
11022
  const isHovered = hoveredImageIndex === imageIndex;
10695
11023
  const cursorStyle = isLargeTouchDevice ? "pointer" : isTouchDevice ? "default" : "none";
10696
- return /* @__PURE__ */ jsxs46(Fragment13, { children: [
10697
- /* @__PURE__ */ jsx68("div", { className: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", children: announcement }),
10698
- /* @__PURE__ */ jsx68(
11024
+ return /* @__PURE__ */ jsxs47(Fragment14, { children: [
11025
+ /* @__PURE__ */ jsx69("div", { className: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", children: announcement }),
11026
+ /* @__PURE__ */ jsx69(
10699
11027
  "div",
10700
11028
  {
10701
11029
  className,
@@ -10703,7 +11031,7 @@ function ZoomOverlay({
10703
11031
  ...style,
10704
11032
  position: "relative"
10705
11033
  },
10706
- children: /* @__PURE__ */ jsx68(
11034
+ children: /* @__PURE__ */ jsx69(
10707
11035
  "div",
10708
11036
  {
10709
11037
  style: {
@@ -10726,7 +11054,7 @@ function ZoomOverlay({
10726
11054
  handleZoomClick(e);
10727
11055
  }
10728
11056
  },
10729
- children: /* @__PURE__ */ jsx68(
11057
+ children: /* @__PURE__ */ jsx69(
10730
11058
  "div",
10731
11059
  {
10732
11060
  style: {
@@ -10742,7 +11070,7 @@ function ZoomOverlay({
10742
11070
  )
10743
11071
  }
10744
11072
  ),
10745
- isHovered && !isTouchDevice && /* @__PURE__ */ jsx68(
11073
+ isHovered && !isTouchDevice && /* @__PURE__ */ jsx69(
10746
11074
  "div",
10747
11075
  {
10748
11076
  className: "fixed pointer-events-none z-50 hidden md:block",
@@ -10752,7 +11080,7 @@ function ZoomOverlay({
10752
11080
  transform: "translate(-50%, -50%)"
10753
11081
  },
10754
11082
  "aria-hidden": "true",
10755
- children: /* @__PURE__ */ jsx68("div", { className: "bg-white dark:bg-gray-800 rounded-full p-2 shadow-sm dark:shadow-gray-950/50", children: isZoomed ? /* @__PURE__ */ jsx68(
11083
+ children: /* @__PURE__ */ jsx69("div", { className: "bg-white dark:bg-gray-800 rounded-full p-2 shadow-sm dark:shadow-gray-950/50", children: isZoomed ? /* @__PURE__ */ jsx69(
10756
11084
  MinusIcon2,
10757
11085
  {
10758
11086
  size: 20,
@@ -10760,7 +11088,7 @@ function ZoomOverlay({
10760
11088
  strokeWidth: 1.5,
10761
11089
  "aria-hidden": "true"
10762
11090
  }
10763
- ) : /* @__PURE__ */ jsx68(
11091
+ ) : /* @__PURE__ */ jsx69(
10764
11092
  PlusIcon2,
10765
11093
  {
10766
11094
  size: 20,
@@ -10776,19 +11104,19 @@ function ZoomOverlay({
10776
11104
 
10777
11105
  // src/composed/zoom/EnhancedImageViewer.tsx
10778
11106
  import {
10779
- useState as useState36,
10780
- useRef as useRef24,
10781
- useEffect as useEffect36,
10782
- useLayoutEffect as useLayoutEffect5,
10783
- useCallback as useCallback20
11107
+ useState as useState37,
11108
+ useRef as useRef25,
11109
+ useEffect as useEffect37,
11110
+ useLayoutEffect as useLayoutEffect6,
11111
+ useCallback as useCallback21
10784
11112
  } from "react";
10785
- import { createPortal as createPortal2 } from "react-dom";
11113
+ import { createPortal as createPortal3 } from "react-dom";
10786
11114
  import {
10787
11115
  TransformWrapper as OriginalTransformWrapper,
10788
11116
  TransformComponent as OriginalTransformComponent
10789
11117
  } from "react-zoom-pan-pinch";
10790
11118
  import { X as X2 } from "lucide-react";
10791
- import { Fragment as Fragment14, jsx as jsx69, jsxs as jsxs47 } from "react/jsx-runtime";
11119
+ import { Fragment as Fragment15, jsx as jsx70, jsxs as jsxs48 } from "react/jsx-runtime";
10792
11120
  var TransformWrapper = OriginalTransformWrapper;
10793
11121
  var TransformComponent = OriginalTransformComponent;
10794
11122
  var EnhancedImageViewer = ({
@@ -10799,17 +11127,17 @@ var EnhancedImageViewer = ({
10799
11127
  onIndexChange,
10800
11128
  currentIndex: propCurrentIndex
10801
11129
  }) => {
10802
- const [isMounted, setIsMounted] = useState36(false);
10803
- const [isClient, setIsClient] = useState36(false);
10804
- const [scale, setScale] = useState36({ initial: 1, min: 1, max: 8 });
10805
- const [cropDimensions, setCropDimensions] = useState36({ width: 0, height: 0 });
10806
- const [currentZoomScale, setCurrentZoomScale] = useState36(1);
10807
- const imgRef = useRef24(null);
10808
- const touchStartRef = useRef24(
11130
+ const [isMounted, setIsMounted] = useState37(false);
11131
+ const [isClient, setIsClient] = useState37(false);
11132
+ const [scale, setScale] = useState37({ initial: 1, min: 1, max: 8 });
11133
+ const [cropDimensions, setCropDimensions] = useState37({ width: 0, height: 0 });
11134
+ const [currentZoomScale, setCurrentZoomScale] = useState37(1);
11135
+ const imgRef = useRef25(null);
11136
+ const touchStartRef = useRef25(
10809
11137
  null
10810
11138
  );
10811
- const isSwipingRef = useRef24(false);
10812
- const calculateScale = useCallback20(() => {
11139
+ const isSwipingRef = useRef25(false);
11140
+ const calculateScale = useCallback21(() => {
10813
11141
  const viewport = {
10814
11142
  width: window.innerWidth,
10815
11143
  height: window.innerHeight
@@ -10821,10 +11149,10 @@ var EnhancedImageViewer = ({
10821
11149
  max: 8
10822
11150
  });
10823
11151
  }, []);
10824
- const handleImageLoad = useCallback20(() => {
11152
+ const handleImageLoad = useCallback21(() => {
10825
11153
  calculateScale();
10826
11154
  }, [calculateScale]);
10827
- useLayoutEffect5(() => {
11155
+ useLayoutEffect6(() => {
10828
11156
  setIsClient(true);
10829
11157
  setIsMounted(true);
10830
11158
  document.body.style.overflow = "hidden";
@@ -10833,17 +11161,17 @@ var EnhancedImageViewer = ({
10833
11161
  document.body.style.overflow = "";
10834
11162
  };
10835
11163
  }, [calculateScale]);
10836
- useEffect36(() => {
11164
+ useEffect37(() => {
10837
11165
  calculateScale();
10838
11166
  }, [calculateScale]);
10839
- useEffect36(() => {
11167
+ useEffect37(() => {
10840
11168
  const handleResize = () => {
10841
11169
  calculateScale();
10842
11170
  };
10843
11171
  window.addEventListener("resize", handleResize);
10844
11172
  return () => window.removeEventListener("resize", handleResize);
10845
11173
  }, [calculateScale]);
10846
- useEffect36(() => {
11174
+ useEffect37(() => {
10847
11175
  const handleKeyDown = (e) => {
10848
11176
  if (e.key === "Escape") {
10849
11177
  onClose();
@@ -10869,7 +11197,7 @@ var EnhancedImageViewer = ({
10869
11197
  document.addEventListener("keydown", handleKeyDown);
10870
11198
  return () => document.removeEventListener("keydown", handleKeyDown);
10871
11199
  }, [onClose, imageUrl, images, onIndexChange, propCurrentIndex]);
10872
- const handleSwipeNavigation = useCallback20(
11200
+ const handleSwipeNavigation = useCallback21(
10873
11201
  (direction) => {
10874
11202
  let currentIndex = propCurrentIndex !== void 0 ? propCurrentIndex : -1;
10875
11203
  if (currentIndex === -1) {
@@ -10890,7 +11218,7 @@ var EnhancedImageViewer = ({
10890
11218
  },
10891
11219
  [propCurrentIndex, images, imageUrl, onIndexChange]
10892
11220
  );
10893
- const handleTouchStart = useCallback20(
11221
+ const handleTouchStart = useCallback21(
10894
11222
  (e) => {
10895
11223
  const isAtInitialZoom = Math.abs(currentZoomScale - scale.initial) < 0.1;
10896
11224
  if (!isAtInitialZoom) return;
@@ -10904,7 +11232,7 @@ var EnhancedImageViewer = ({
10904
11232
  },
10905
11233
  [currentZoomScale, scale.initial]
10906
11234
  );
10907
- const handleTouchEnd = useCallback20(
11235
+ const handleTouchEnd = useCallback21(
10908
11236
  (e) => {
10909
11237
  if (!touchStartRef.current) return;
10910
11238
  const touch = e.changedTouches[0];
@@ -10927,13 +11255,13 @@ var EnhancedImageViewer = ({
10927
11255
  [handleSwipeNavigation]
10928
11256
  );
10929
11257
  if (!isMounted || !isClient) {
10930
- return createPortal2(
10931
- /* @__PURE__ */ jsx69(
11258
+ return createPortal3(
11259
+ /* @__PURE__ */ jsx70(
10932
11260
  "div",
10933
11261
  {
10934
11262
  className: "fixed inset-0 bg-black flex items-center justify-center",
10935
11263
  style: { zIndex: 999999 },
10936
- children: /* @__PURE__ */ jsx69(
11264
+ children: /* @__PURE__ */ jsx70(
10937
11265
  "div",
10938
11266
  {
10939
11267
  style: {
@@ -10948,8 +11276,8 @@ var EnhancedImageViewer = ({
10948
11276
  document.body
10949
11277
  );
10950
11278
  }
10951
- return createPortal2(
10952
- /* @__PURE__ */ jsxs47(
11279
+ return createPortal3(
11280
+ /* @__PURE__ */ jsxs48(
10953
11281
  "div",
10954
11282
  {
10955
11283
  className: "fixed inset-0 bg-black flex items-center justify-center",
@@ -10958,7 +11286,7 @@ var EnhancedImageViewer = ({
10958
11286
  "aria-modal": "true",
10959
11287
  "aria-label": "Image viewer",
10960
11288
  children: [
10961
- /* @__PURE__ */ jsx69(
11289
+ /* @__PURE__ */ jsx70(
10962
11290
  "button",
10963
11291
  {
10964
11292
  onClick: (e) => {
@@ -10984,10 +11312,10 @@ var EnhancedImageViewer = ({
10984
11312
  touchAction: "manipulation",
10985
11313
  marginBottom: "env(safe-area-inset-bottom, 0px)"
10986
11314
  },
10987
- children: /* @__PURE__ */ jsx69(X2, { className: "w-7 h-7", strokeWidth: 2.5 })
11315
+ children: /* @__PURE__ */ jsx70(X2, { className: "w-7 h-7", strokeWidth: 2.5 })
10988
11316
  }
10989
11317
  ),
10990
- /* @__PURE__ */ jsx69(
11318
+ /* @__PURE__ */ jsx70(
10991
11319
  TransformWrapper,
10992
11320
  {
10993
11321
  initialScale: scale.initial,
@@ -11021,7 +11349,7 @@ var EnhancedImageViewer = ({
11021
11349
  onTransformed: (ref) => {
11022
11350
  setCurrentZoomScale(ref.state.scale);
11023
11351
  },
11024
- children: ({ zoomIn, zoomOut, resetTransform }) => /* @__PURE__ */ jsxs47(
11352
+ children: ({ zoomIn, zoomOut, resetTransform }) => /* @__PURE__ */ jsxs48(
11025
11353
  "div",
11026
11354
  {
11027
11355
  style: {
@@ -11034,14 +11362,14 @@ var EnhancedImageViewer = ({
11034
11362
  onTouchStart: handleTouchStart,
11035
11363
  onTouchEnd: handleTouchEnd,
11036
11364
  children: [
11037
- /* @__PURE__ */ jsx69(
11365
+ /* @__PURE__ */ jsx70(
11038
11366
  TransformComponent,
11039
11367
  {
11040
11368
  wrapperStyle: {
11041
11369
  width: "100%",
11042
11370
  height: "100%"
11043
11371
  },
11044
- children: /* @__PURE__ */ jsx69(
11372
+ children: /* @__PURE__ */ jsx70(
11045
11373
  "div",
11046
11374
  {
11047
11375
  style: {
@@ -11052,7 +11380,7 @@ var EnhancedImageViewer = ({
11052
11380
  alignItems: "center",
11053
11381
  justifyContent: "center"
11054
11382
  },
11055
- children: /* @__PURE__ */ jsx69(
11383
+ children: /* @__PURE__ */ jsx70(
11056
11384
  "img",
11057
11385
  {
11058
11386
  ref: imgRef,
@@ -11073,8 +11401,8 @@ var EnhancedImageViewer = ({
11073
11401
  )
11074
11402
  }
11075
11403
  ),
11076
- /* @__PURE__ */ jsxs47("div", { className: "fixed bottom-5 left-0 right-0 z-50", children: [
11077
- /* @__PURE__ */ jsx69("div", { className: "flex justify-center gap-2", children: (() => {
11404
+ /* @__PURE__ */ jsxs48("div", { className: "fixed bottom-5 left-0 right-0 z-50", children: [
11405
+ /* @__PURE__ */ jsx70("div", { className: "flex justify-center gap-2", children: (() => {
11078
11406
  let currentIndex = propCurrentIndex !== void 0 ? propCurrentIndex : -1;
11079
11407
  if (currentIndex === -1) {
11080
11408
  currentIndex = images.findIndex(
@@ -11107,8 +11435,8 @@ var EnhancedImageViewer = ({
11107
11435
  };
11108
11436
  const nextIndex = findNextAvailableIndex(currentIndex, 1);
11109
11437
  const prevIndex = findNextAvailableIndex(currentIndex, -1);
11110
- return /* @__PURE__ */ jsxs47(Fragment14, { children: [
11111
- /* @__PURE__ */ jsx69(
11438
+ return /* @__PURE__ */ jsxs48(Fragment15, { children: [
11439
+ /* @__PURE__ */ jsx70(
11112
11440
  "button",
11113
11441
  {
11114
11442
  onClick: () => {
@@ -11121,7 +11449,7 @@ var EnhancedImageViewer = ({
11121
11449
  className: `w-10 h-10 rounded-full shadow-lg flex items-center justify-center transition-all duration-200 ${prevIndex === -1 ? "bg-white/40 text-black opacity-50 cursor-not-allowed" : "bg-white/90 hover:bg-white text-black"}`,
11122
11450
  style: { touchAction: "manipulation" },
11123
11451
  "aria-label": "Previous image",
11124
- children: /* @__PURE__ */ jsx69(
11452
+ children: /* @__PURE__ */ jsx70(
11125
11453
  "svg",
11126
11454
  {
11127
11455
  className: "w-4 h-4",
@@ -11129,7 +11457,7 @@ var EnhancedImageViewer = ({
11129
11457
  stroke: "currentColor",
11130
11458
  viewBox: "0 0 24 24",
11131
11459
  "aria-hidden": "true",
11132
- children: /* @__PURE__ */ jsx69(
11460
+ children: /* @__PURE__ */ jsx70(
11133
11461
  "path",
11134
11462
  {
11135
11463
  strokeLinecap: "round",
@@ -11142,7 +11470,7 @@ var EnhancedImageViewer = ({
11142
11470
  )
11143
11471
  }
11144
11472
  ),
11145
- /* @__PURE__ */ jsx69(
11473
+ /* @__PURE__ */ jsx70(
11146
11474
  "button",
11147
11475
  {
11148
11476
  onClick: () => {
@@ -11155,7 +11483,7 @@ var EnhancedImageViewer = ({
11155
11483
  className: `w-10 h-10 rounded-full shadow-lg flex items-center justify-center transition-all duration-200 ${nextIndex === -1 ? "bg-white/40 text-black opacity-50 cursor-not-allowed" : "bg-white/90 hover:bg-white text-black"}`,
11156
11484
  style: { touchAction: "manipulation" },
11157
11485
  "aria-label": "Next image",
11158
- children: /* @__PURE__ */ jsx69(
11486
+ children: /* @__PURE__ */ jsx70(
11159
11487
  "svg",
11160
11488
  {
11161
11489
  className: "w-4 h-4",
@@ -11163,7 +11491,7 @@ var EnhancedImageViewer = ({
11163
11491
  stroke: "currentColor",
11164
11492
  viewBox: "0 0 24 24",
11165
11493
  "aria-hidden": "true",
11166
- children: /* @__PURE__ */ jsx69(
11494
+ children: /* @__PURE__ */ jsx70(
11167
11495
  "path",
11168
11496
  {
11169
11497
  strokeLinecap: "round",
@@ -11178,7 +11506,7 @@ var EnhancedImageViewer = ({
11178
11506
  )
11179
11507
  ] });
11180
11508
  })() }),
11181
- /* @__PURE__ */ jsx69("div", { style: { position: "fixed", bottom: 20, left: 24, zIndex: 10, marginBottom: "env(safe-area-inset-bottom, 0px)" }, className: "h-10 px-3 rounded-full bg-white/90 text-black text-sm font-medium flex items-center justify-center shadow-lg", children: (() => {
11509
+ /* @__PURE__ */ jsx70("div", { style: { position: "fixed", bottom: 20, left: 24, zIndex: 10, marginBottom: "env(safe-area-inset-bottom, 0px)" }, className: "h-10 px-3 rounded-full bg-white/90 text-black text-sm font-medium flex items-center justify-center shadow-lg", children: (() => {
11182
11510
  const total = Math.max(images.length, 1);
11183
11511
  const current = propCurrentIndex !== void 0 ? Math.min(propCurrentIndex + 1, total) : 1;
11184
11512
  return `${current} / ${total}`;
@@ -11190,7 +11518,7 @@ var EnhancedImageViewer = ({
11190
11518
  },
11191
11519
  `${scale.initial}-${scale.min}-${scale.max}`
11192
11520
  ),
11193
- /* @__PURE__ */ jsx69(
11521
+ /* @__PURE__ */ jsx70(
11194
11522
  "div",
11195
11523
  {
11196
11524
  className: "absolute inset-0 bg-black",
@@ -11209,7 +11537,7 @@ var EnhancedImageViewer = ({
11209
11537
  };
11210
11538
 
11211
11539
  // src/composed/zoom/ResponsiveZoom.tsx
11212
- import { Fragment as Fragment15, jsx as jsx70, jsxs as jsxs48 } from "react/jsx-runtime";
11540
+ import { Fragment as Fragment16, jsx as jsx71, jsxs as jsxs49 } from "react/jsx-runtime";
11213
11541
  function ResponsiveZoom({
11214
11542
  imageIndex,
11215
11543
  children,
@@ -11219,11 +11547,11 @@ function ResponsiveZoom({
11219
11547
  imageUrl,
11220
11548
  alt = "Product image"
11221
11549
  }) {
11222
- const [isTouchDevice, setIsTouchDevice] = useState37(false);
11223
- const [showEnhancedViewer, setShowEnhancedViewer] = useState37(false);
11224
- const [viewerIndex, setViewerIndex] = useState37(0);
11225
- const [currentImageUrl, setCurrentImageUrl] = useState37(imageUrl || "");
11226
- useEffect37(() => {
11550
+ const [isTouchDevice, setIsTouchDevice] = useState38(false);
11551
+ const [showEnhancedViewer, setShowEnhancedViewer] = useState38(false);
11552
+ const [viewerIndex, setViewerIndex] = useState38(0);
11553
+ const [currentImageUrl, setCurrentImageUrl] = useState38(imageUrl || "");
11554
+ useEffect38(() => {
11227
11555
  const checkDeviceType = () => {
11228
11556
  const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
11229
11557
  setIsTouchDevice(hasTouch);
@@ -11250,8 +11578,8 @@ function ResponsiveZoom({
11250
11578
  }
11251
11579
  }
11252
11580
  };
11253
- return /* @__PURE__ */ jsxs48(Fragment15, { children: [
11254
- isTouchDevice ? /* @__PURE__ */ jsx70(
11581
+ return /* @__PURE__ */ jsxs49(Fragment16, { children: [
11582
+ isTouchDevice ? /* @__PURE__ */ jsx71(
11255
11583
  "div",
11256
11584
  {
11257
11585
  className,
@@ -11268,7 +11596,7 @@ function ResponsiveZoom({
11268
11596
  },
11269
11597
  children
11270
11598
  }
11271
- ) : /* @__PURE__ */ jsx70(
11599
+ ) : /* @__PURE__ */ jsx71(
11272
11600
  ZoomOverlay,
11273
11601
  {
11274
11602
  imageIndex,
@@ -11279,7 +11607,7 @@ function ResponsiveZoom({
11279
11607
  children
11280
11608
  }
11281
11609
  ),
11282
- showEnhancedViewer && isTouchDevice && currentImageUrl && /* @__PURE__ */ jsx70(
11610
+ showEnhancedViewer && isTouchDevice && currentImageUrl && /* @__PURE__ */ jsx71(
11283
11611
  EnhancedImageViewer,
11284
11612
  {
11285
11613
  imageUrl: currentImageUrl,
@@ -11303,15 +11631,15 @@ function ResponsiveZoom({
11303
11631
 
11304
11632
  // src/composed/carousels/MobileProductCarousel.tsx
11305
11633
  import {
11306
- useState as useState38,
11307
- useRef as useRef25,
11308
- useEffect as useEffect38,
11309
- useCallback as useCallback21,
11634
+ useState as useState39,
11635
+ useRef as useRef26,
11636
+ useEffect as useEffect39,
11637
+ useCallback as useCallback22,
11310
11638
  useMemo as useMemo15,
11311
- memo as memo3
11639
+ memo as memo4
11312
11640
  } from "react";
11313
- import { jsx as jsx71, jsxs as jsxs49 } from "react/jsx-runtime";
11314
- var MobileProductCarousel = memo3(function MobileProductCarousel2({
11641
+ import { jsx as jsx72, jsxs as jsxs50 } from "react/jsx-runtime";
11642
+ var MobileProductCarousel = memo4(function MobileProductCarousel2({
11315
11643
  images,
11316
11644
  currentIndex = 0,
11317
11645
  onIndexChange,
@@ -11326,42 +11654,42 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11326
11654
  mockupWidth,
11327
11655
  onMockupUrlGenerated
11328
11656
  }) {
11329
- const [activeIndex, setActiveIndex] = useState38(currentIndex);
11330
- const [touchStart, setTouchStart] = useState38(
11657
+ const [activeIndex, setActiveIndex] = useState39(currentIndex);
11658
+ const [touchStart, setTouchStart] = useState39(
11331
11659
  null
11332
11660
  );
11333
- const [touchEnd, setTouchEnd] = useState38(
11661
+ const [touchEnd, setTouchEnd] = useState39(
11334
11662
  null
11335
11663
  );
11336
- const [showImageViewer, setShowImageViewer] = useState38(false);
11337
- const [viewerKey, setViewerKey] = useState38(0);
11338
- const [isDragging, setIsDragging] = useState38(false);
11339
- const [dragOffset, setDragOffset] = useState38(0);
11340
- const [isTransitioning, setIsTransitioning] = useState38(false);
11341
- const [isHorizontalSwipe, setIsHorizontalSwipe] = useState38(
11664
+ const [showImageViewer, setShowImageViewer] = useState39(false);
11665
+ const [viewerKey, setViewerKey] = useState39(0);
11666
+ const [isDragging, setIsDragging] = useState39(false);
11667
+ const [dragOffset, setDragOffset] = useState39(0);
11668
+ const [isTransitioning, setIsTransitioning] = useState39(false);
11669
+ const [isHorizontalSwipe, setIsHorizontalSwipe] = useState39(
11342
11670
  null
11343
11671
  );
11344
- const [isPeeking, setIsPeeking] = useState38(false);
11345
- const [isPeekReturning, setIsPeekReturning] = useState38(false);
11346
- const carouselRef = useRef25(null);
11347
- const indicatorRef = useRef25(null);
11348
- const touchStartRef = useRef25(
11672
+ const [isPeeking, setIsPeeking] = useState39(false);
11673
+ const [isPeekReturning, setIsPeekReturning] = useState39(false);
11674
+ const carouselRef = useRef26(null);
11675
+ const indicatorRef = useRef26(null);
11676
+ const touchStartRef = useRef26(
11349
11677
  null
11350
11678
  );
11351
- const horizontalGestureRef = useRef25(false);
11352
- const hasShownPeekRef = useRef25(false);
11353
- const hasSwipedThisSessionRef = useRef25(false);
11354
- const generatedUrlsRef = useRef25(/* @__PURE__ */ new Map());
11355
- const prevArtworkSrcRef = useRef25(currentArtwork?.src);
11356
- useEffect38(() => {
11679
+ const horizontalGestureRef = useRef26(false);
11680
+ const hasShownPeekRef = useRef26(false);
11681
+ const hasSwipedThisSessionRef = useRef26(false);
11682
+ const generatedUrlsRef = useRef26(/* @__PURE__ */ new Map());
11683
+ const prevArtworkSrcRef = useRef26(currentArtwork?.src);
11684
+ useEffect39(() => {
11357
11685
  if (currentArtwork?.src !== prevArtworkSrcRef.current) {
11358
11686
  generatedUrlsRef.current.clear();
11359
11687
  prevArtworkSrcRef.current = currentArtwork?.src;
11360
11688
  }
11361
11689
  }, [currentArtwork?.src]);
11362
- const onMockupUrlGeneratedRef = useRef25(onMockupUrlGenerated);
11690
+ const onMockupUrlGeneratedRef = useRef26(onMockupUrlGenerated);
11363
11691
  onMockupUrlGeneratedRef.current = onMockupUrlGenerated;
11364
- const handleUrlGenerated = useCallback21((mockupId, url) => {
11692
+ const handleUrlGenerated = useCallback22((mockupId, url) => {
11365
11693
  generatedUrlsRef.current.set(mockupId, url);
11366
11694
  onMockupUrlGeneratedRef.current?.(mockupId, url);
11367
11695
  }, []);
@@ -11369,8 +11697,8 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11369
11697
  const shouldHideDots = stickyHeroContext?.shouldHideDots ?? false;
11370
11698
  const priorityContext = useMockupPriorityOptional();
11371
11699
  const realtimeContext = useRealtimeOptional();
11372
- const [urlUpdateCounter, setUrlUpdateCounter] = useState38(0);
11373
- useEffect38(() => {
11700
+ const [urlUpdateCounter, setUrlUpdateCounter] = useState39(0);
11701
+ useEffect39(() => {
11374
11702
  if (!realtimeContext?.subscribeMockupResults) return;
11375
11703
  const unsubscribe = realtimeContext.subscribeMockupResults(() => {
11376
11704
  setUrlUpdateCounter((c) => c + 1);
@@ -11398,10 +11726,10 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11398
11726
  });
11399
11727
  }, [images, realtimeMockupUrls]);
11400
11728
  const minSwipeDistance = 50;
11401
- useEffect38(() => {
11729
+ useEffect39(() => {
11402
11730
  setActiveIndex(currentIndex);
11403
11731
  }, [currentIndex]);
11404
- useEffect38(() => {
11732
+ useEffect39(() => {
11405
11733
  if (!priorityContext) return;
11406
11734
  const realMockups = images.map((img, idx) => ({ img, originalIdx: idx })).filter(({ img }) => img.isRealMockup && img.mockupId);
11407
11735
  const mockupIdsList = realMockups.map(({ img }) => img.mockupId);
@@ -11429,7 +11757,7 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11429
11757
  priorityContext.clearMobileCarouselMode?.();
11430
11758
  };
11431
11759
  }, [priorityContext, activeIndex, images]);
11432
- useEffect38(() => {
11760
+ useEffect39(() => {
11433
11761
  const indicator = indicatorRef.current;
11434
11762
  if (!indicator) return;
11435
11763
  let ticking = false;
@@ -11470,7 +11798,7 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11470
11798
  }, []);
11471
11799
  const SWIPE_TRACKING_KEY = "carousel-swipe-tracking";
11472
11800
  const PDP_VIEWS_BEFORE_PEEK = 10;
11473
- const getSwipeTracking = useCallback21(() => {
11801
+ const getSwipeTracking = useCallback22(() => {
11474
11802
  try {
11475
11803
  const stored = localStorage.getItem(SWIPE_TRACKING_KEY);
11476
11804
  if (stored) {
@@ -11480,7 +11808,7 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11480
11808
  }
11481
11809
  return { viewsWithoutSwipe: 0, hasEverSwiped: false };
11482
11810
  }, []);
11483
- const recordSwipe = useCallback21(() => {
11811
+ const recordSwipe = useCallback22(() => {
11484
11812
  if (hasSwipedThisSessionRef.current) return;
11485
11813
  hasSwipedThisSessionRef.current = true;
11486
11814
  try {
@@ -11494,7 +11822,7 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11494
11822
  } catch {
11495
11823
  }
11496
11824
  }, []);
11497
- useEffect38(() => {
11825
+ useEffect39(() => {
11498
11826
  if (!enablePeekAnimation || images.length <= 1) return;
11499
11827
  const tracking = getSwipeTracking();
11500
11828
  const newViewCount = tracking.viewsWithoutSwipe + 1;
@@ -11535,14 +11863,14 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11535
11863
  clearTimeout(clearTimeout_);
11536
11864
  };
11537
11865
  }, [images.length, getSwipeTracking, enablePeekAnimation]);
11538
- const wasTapRef = useRef25(false);
11539
- const handleImageTap = useCallback21(() => {
11866
+ const wasTapRef = useRef26(false);
11867
+ const handleImageTap = useCallback22(() => {
11540
11868
  if (!enableZoom) return;
11541
11869
  setViewerKey((prev) => prev + 1);
11542
11870
  setShowImageViewer(true);
11543
11871
  onZoomChange?.(true);
11544
11872
  }, [enableZoom, onZoomChange]);
11545
- const calculateDragOffset = useCallback21(
11873
+ const calculateDragOffset = useCallback22(
11546
11874
  (startX, currentX, containerWidth) => {
11547
11875
  const distance = startX - currentX;
11548
11876
  const offsetPercent = distance / containerWidth * 100;
@@ -11567,7 +11895,7 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11567
11895
  },
11568
11896
  [activeIndex, images.length]
11569
11897
  );
11570
- const handleSwipeEnd = useCallback21(
11898
+ const handleSwipeEnd = useCallback22(
11571
11899
  (startX, endX, containerWidth) => {
11572
11900
  const distance = startX - endX;
11573
11901
  const distancePercent = Math.abs(distance) / containerWidth * 100;
@@ -11598,7 +11926,7 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11598
11926
  },
11599
11927
  [activeIndex, images.length, onIndexChange, recordSwipe]
11600
11928
  );
11601
- useEffect38(() => {
11929
+ useEffect39(() => {
11602
11930
  const container = carouselRef.current;
11603
11931
  if (!container) return;
11604
11932
  const handleTouchStart = (e) => {
@@ -11687,11 +12015,11 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11687
12015
  handleSwipeEnd,
11688
12016
  handleImageTap
11689
12017
  ]);
11690
- const mouseStartRef = useRef25(
12018
+ const mouseStartRef = useRef26(
11691
12019
  null
11692
12020
  );
11693
- const isMouseDraggingRef = useRef25(false);
11694
- useEffect38(() => {
12021
+ const isMouseDraggingRef = useRef26(false);
12022
+ useEffect39(() => {
11695
12023
  const container = carouselRef.current;
11696
12024
  if (!container) return;
11697
12025
  const handleMouseDown = (e) => {
@@ -11767,7 +12095,7 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11767
12095
  container.removeEventListener("mouseleave", handleMouseLeave);
11768
12096
  };
11769
12097
  }, [calculateDragOffset, handleSwipeEnd, handleImageTap]);
11770
- const goToSlide = useCallback21(
12098
+ const goToSlide = useCallback22(
11771
12099
  (index, withTransition = true) => {
11772
12100
  if (withTransition) {
11773
12101
  setIsTransitioning(true);
@@ -11785,16 +12113,16 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11785
12113
  },
11786
12114
  [onIndexChange]
11787
12115
  );
11788
- useEffect38(() => {
12116
+ useEffect39(() => {
11789
12117
  if (stickyHeroContext?.setCarouselIndicator && images.length > 1) {
11790
- const indicator = /* @__PURE__ */ jsx71(
12118
+ const indicator = /* @__PURE__ */ jsx72(
11791
12119
  "div",
11792
12120
  {
11793
12121
  className: "w-full",
11794
12122
  role: "group",
11795
12123
  "aria-label": "Product image navigation",
11796
- children: /* @__PURE__ */ jsxs49("div", { className: "relative h-1", children: [
11797
- /* @__PURE__ */ jsx71("div", { className: "flex h-full", children: images.map((_, index) => /* @__PURE__ */ jsx71(
12124
+ children: /* @__PURE__ */ jsxs50("div", { className: "relative h-1", children: [
12125
+ /* @__PURE__ */ jsx72("div", { className: "flex h-full", children: images.map((_, index) => /* @__PURE__ */ jsx72(
11798
12126
  "button",
11799
12127
  {
11800
12128
  onClick: () => goToSlide(index),
@@ -11804,7 +12132,7 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11804
12132
  },
11805
12133
  index
11806
12134
  )) }),
11807
- /* @__PURE__ */ jsx71(
12135
+ /* @__PURE__ */ jsx72(
11808
12136
  "div",
11809
12137
  {
11810
12138
  className: "absolute top-0 h-full bg-primary transition-all duration-300 ease-out",
@@ -11827,10 +12155,10 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11827
12155
  };
11828
12156
  }, [activeIndex, images.length, goToSlide, stickyHeroContext]);
11829
12157
  if (!images || images.length === 0) {
11830
- return /* @__PURE__ */ jsx71("div", { className: "w-full aspect-video bg-muted rounded-lg" });
12158
+ return /* @__PURE__ */ jsx72("div", { className: "w-full aspect-video bg-muted rounded-lg" });
11831
12159
  }
11832
- return /* @__PURE__ */ jsxs49("div", { className: `relative w-full h-full ${className}`, children: [
11833
- /* @__PURE__ */ jsx71(
12160
+ return /* @__PURE__ */ jsxs50("div", { className: `relative w-full h-full ${className}`, children: [
12161
+ /* @__PURE__ */ jsx72(
11834
12162
  "div",
11835
12163
  {
11836
12164
  ref: carouselRef,
@@ -11848,7 +12176,7 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11848
12176
  role: "region",
11849
12177
  "aria-roledescription": "carousel",
11850
12178
  "aria-label": "Product images",
11851
- children: /* @__PURE__ */ jsx71(
12179
+ children: /* @__PURE__ */ jsx72(
11852
12180
  "div",
11853
12181
  {
11854
12182
  className: `flex h-full ${isPeekReturning ? "transition-transform duration-300 ease-[cubic-bezier(0,0,0.2,1)]" : isPeeking ? "transition-transform duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]" : isTransitioning || !isDragging ? "transition-transform duration-300 ease-[cubic-bezier(0.25,0.46,0.45,0.94)]" : ""}`,
@@ -11858,11 +12186,11 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11858
12186
  children: images.map((image, index) => {
11859
12187
  const DECODE_WINDOW = 1;
11860
12188
  const isWithinDecodeWindow = Math.abs(index - activeIndex) <= DECODE_WINDOW;
11861
- return /* @__PURE__ */ jsx71(
12189
+ return /* @__PURE__ */ jsx72(
11862
12190
  "div",
11863
12191
  {
11864
12192
  className: "w-full h-full flex-shrink-0 relative select-none",
11865
- children: !isWithinDecodeWindow ? /* @__PURE__ */ jsx71("div", { className: "w-full h-full bg-muted" }) : image.isPlaceholder ? /* @__PURE__ */ jsx71("div", { className: "w-full h-full bg-muted-foreground/20 animate-pulse" }) : image.isRealMockup && currentArtwork ? /* @__PURE__ */ jsx71(
12193
+ children: !isWithinDecodeWindow ? /* @__PURE__ */ jsx72("div", { className: "w-full h-full bg-muted" }) : image.isPlaceholder ? /* @__PURE__ */ jsx72("div", { className: "w-full h-full bg-muted-foreground/20 animate-pulse" }) : image.isRealMockup && currentArtwork ? /* @__PURE__ */ jsx72(
11866
12194
  HeroProductImage,
11867
12195
  {
11868
12196
  productId,
@@ -11874,7 +12202,7 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11874
12202
  onUrlGenerated: image.mockupId ? (url) => handleUrlGenerated(image.mockupId, url) : void 0,
11875
12203
  className: "w-full h-full object-cover cursor-pointer pointer-events-none"
11876
12204
  }
11877
- ) : image.isRealMockup && !currentArtwork ? /* @__PURE__ */ jsx71("div", { className: "w-full h-full bg-muted animate-pulse" }) : /* @__PURE__ */ jsx71(
12205
+ ) : image.isRealMockup && !currentArtwork ? /* @__PURE__ */ jsx72("div", { className: "w-full h-full bg-muted animate-pulse" }) : /* @__PURE__ */ jsx72(
11878
12206
  "img",
11879
12207
  {
11880
12208
  src: image.src,
@@ -11894,7 +12222,7 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11894
12222
  )
11895
12223
  }
11896
12224
  ),
11897
- showIndicators && images.length > 1 && /* @__PURE__ */ jsx71(
12225
+ showIndicators && images.length > 1 && /* @__PURE__ */ jsx72(
11898
12226
  "div",
11899
12227
  {
11900
12228
  ref: indicatorRef,
@@ -11902,8 +12230,8 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11902
12230
  className: "relative z-20 w-full",
11903
12231
  role: "group",
11904
12232
  "aria-label": "Product image navigation",
11905
- children: /* @__PURE__ */ jsxs49("div", { className: "relative h-1", children: [
11906
- /* @__PURE__ */ jsx71("div", { className: "flex h-full absolute inset-0", children: images.map((_, index) => /* @__PURE__ */ jsx71(
12233
+ children: /* @__PURE__ */ jsxs50("div", { className: "relative h-1", children: [
12234
+ /* @__PURE__ */ jsx72("div", { className: "flex h-full absolute inset-0", children: images.map((_, index) => /* @__PURE__ */ jsx72(
11907
12235
  "button",
11908
12236
  {
11909
12237
  onClick: () => goToSlide(index),
@@ -11913,7 +12241,7 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11913
12241
  },
11914
12242
  index
11915
12243
  )) }),
11916
- /* @__PURE__ */ jsx71(
12244
+ /* @__PURE__ */ jsx72(
11917
12245
  "div",
11918
12246
  {
11919
12247
  className: `absolute top-0 h-full bg-foreground ${isPeekReturning ? "transition-all duration-300 ease-[cubic-bezier(0,0,0.2,1)]" : isPeeking ? "transition-all duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]" : isDragging ? "" : "transition-all duration-300 ease-out"}`,
@@ -11948,7 +12276,7 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11948
12276
  naturalHeight: img.naturalHeight
11949
12277
  } : null;
11950
12278
  }).filter((img) => img !== null);
11951
- return /* @__PURE__ */ jsx71(
12279
+ return /* @__PURE__ */ jsx72(
11952
12280
  EnhancedImageViewer,
11953
12281
  {
11954
12282
  imageUrl,
@@ -11987,8 +12315,8 @@ var MobileProductCarousel = memo3(function MobileProductCarousel2({
11987
12315
  });
11988
12316
 
11989
12317
  // src/composed/carousels/HeroCarousel.tsx
11990
- import { useState as useState39, useRef as useRef26, useCallback as useCallback22, useEffect as useEffect39 } from "react";
11991
- import { jsx as jsx72, jsxs as jsxs50 } from "react/jsx-runtime";
12318
+ import { useState as useState40, useRef as useRef27, useCallback as useCallback23, useEffect as useEffect40 } from "react";
12319
+ import { jsx as jsx73, jsxs as jsxs51 } from "react/jsx-runtime";
11992
12320
  function HeroCarousel({
11993
12321
  images,
11994
12322
  currentIndex = 0,
@@ -11998,16 +12326,16 @@ function HeroCarousel({
11998
12326
  productId,
11999
12327
  onImageTap
12000
12328
  }) {
12001
- const [activeIndex, setActiveIndex] = useState39(currentIndex);
12002
- const containerRef = useRef26(null);
12003
- const touchStartRef = useRef26(
12329
+ const [activeIndex, setActiveIndex] = useState40(currentIndex);
12330
+ const containerRef = useRef27(null);
12331
+ const touchStartRef = useRef27(
12004
12332
  null
12005
12333
  );
12006
- const isSwipingRef = useRef26(false);
12007
- useEffect39(() => {
12334
+ const isSwipingRef = useRef27(false);
12335
+ useEffect40(() => {
12008
12336
  setActiveIndex(currentIndex);
12009
12337
  }, [currentIndex]);
12010
- const goToSlide = useCallback22(
12338
+ const goToSlide = useCallback23(
12011
12339
  (index) => {
12012
12340
  const clampedIndex = Math.max(0, Math.min(images.length - 1, index));
12013
12341
  setActiveIndex(clampedIndex);
@@ -12015,7 +12343,7 @@ function HeroCarousel({
12015
12343
  },
12016
12344
  [images.length, onIndexChange]
12017
12345
  );
12018
- useEffect39(() => {
12346
+ useEffect40(() => {
12019
12347
  const container = containerRef.current;
12020
12348
  if (!container) return;
12021
12349
  const handleTouchStart = (e) => {
@@ -12067,9 +12395,9 @@ function HeroCarousel({
12067
12395
  };
12068
12396
  }, [activeIndex, images.length, goToSlide, onImageTap]);
12069
12397
  if (!images || images.length === 0) {
12070
- return /* @__PURE__ */ jsx72("div", { className: "w-full h-full bg-muted" });
12398
+ return /* @__PURE__ */ jsx73("div", { className: "w-full h-full bg-muted" });
12071
12399
  }
12072
- return /* @__PURE__ */ jsxs50(
12400
+ return /* @__PURE__ */ jsxs51(
12073
12401
  "div",
12074
12402
  {
12075
12403
  ref: containerRef,
@@ -12080,7 +12408,7 @@ function HeroCarousel({
12080
12408
  overflow: "hidden"
12081
12409
  },
12082
12410
  children: [
12083
- /* @__PURE__ */ jsx72(
12411
+ /* @__PURE__ */ jsx73(
12084
12412
  "div",
12085
12413
  {
12086
12414
  className: "flex h-full transition-transform duration-300 ease-out",
@@ -12091,14 +12419,14 @@ function HeroCarousel({
12091
12419
  backfaceVisibility: "hidden",
12092
12420
  WebkitBackfaceVisibility: "hidden"
12093
12421
  },
12094
- children: images.map((image, index) => /* @__PURE__ */ jsx72(
12422
+ children: images.map((image, index) => /* @__PURE__ */ jsx73(
12095
12423
  "div",
12096
12424
  {
12097
12425
  className: "w-full h-full flex-shrink-0",
12098
12426
  style: {
12099
12427
  contain: "layout paint"
12100
12428
  },
12101
- children: image.isRealMockup && currentArtwork ? /* @__PURE__ */ jsx72(
12429
+ children: image.isRealMockup && currentArtwork ? /* @__PURE__ */ jsx73(
12102
12430
  HeroProductImage,
12103
12431
  {
12104
12432
  productId,
@@ -12107,7 +12435,7 @@ function HeroCarousel({
12107
12435
  mockupId: image.mockupId,
12108
12436
  className: "w-full h-full object-cover"
12109
12437
  }
12110
- ) : /* @__PURE__ */ jsx72(
12438
+ ) : /* @__PURE__ */ jsx73(
12111
12439
  "img",
12112
12440
  {
12113
12441
  src: image.src,
@@ -12124,12 +12452,12 @@ function HeroCarousel({
12124
12452
  ))
12125
12453
  }
12126
12454
  ),
12127
- images.length > 1 && /* @__PURE__ */ jsx72(
12455
+ images.length > 1 && /* @__PURE__ */ jsx73(
12128
12456
  "div",
12129
12457
  {
12130
12458
  className: "absolute bottom-4 left-0 right-0 flex justify-center gap-2 z-10",
12131
12459
  style: { contain: "layout style" },
12132
- children: images.map((_, index) => /* @__PURE__ */ jsx72(
12460
+ children: images.map((_, index) => /* @__PURE__ */ jsx73(
12133
12461
  "button",
12134
12462
  {
12135
12463
  onClick: () => goToSlide(index),
@@ -12146,8 +12474,8 @@ function HeroCarousel({
12146
12474
  }
12147
12475
 
12148
12476
  // src/composed/grids/MasonryGrid.tsx
12149
- import { useState as useState40, useEffect as useEffect40, useMemo as useMemo16 } from "react";
12150
- import { Fragment as Fragment16, jsx as jsx73 } from "react/jsx-runtime";
12477
+ import { useState as useState41, useEffect as useEffect41, useMemo as useMemo16 } from "react";
12478
+ import { Fragment as Fragment17, jsx as jsx74 } from "react/jsx-runtime";
12151
12479
  var BREAKPOINTS = {
12152
12480
  sm: 640,
12153
12481
  md: 768,
@@ -12199,13 +12527,13 @@ function MasonryGrid({
12199
12527
  className = "",
12200
12528
  emptyContent
12201
12529
  }) {
12202
- const [columnCount, setColumnCount] = useState40(
12530
+ const [columnCount, setColumnCount] = useState41(
12203
12531
  () => typeof columns === "number" ? columns : getColumnCount(
12204
12532
  typeof window !== "undefined" ? window.innerWidth : 1024,
12205
12533
  columns
12206
12534
  )
12207
12535
  );
12208
- useEffect40(() => {
12536
+ useEffect41(() => {
12209
12537
  const updateColumnCount = () => {
12210
12538
  setColumnCount(getColumnCount(window.innerWidth, columns));
12211
12539
  };
@@ -12219,24 +12547,24 @@ function MasonryGrid({
12219
12547
  );
12220
12548
  if (items.length === 0) {
12221
12549
  if (emptyContent) {
12222
- return /* @__PURE__ */ jsx73(Fragment16, { children: emptyContent });
12550
+ return /* @__PURE__ */ jsx74(Fragment17, { children: emptyContent });
12223
12551
  }
12224
12552
  return null;
12225
12553
  }
12226
- return /* @__PURE__ */ jsx73(
12554
+ return /* @__PURE__ */ jsx74(
12227
12555
  "div",
12228
12556
  {
12229
12557
  className: `flex ${className}`,
12230
12558
  style: { gap: `${gap}px` },
12231
12559
  role: "list",
12232
- children: distributedColumns.map((columnItems, columnIndex) => /* @__PURE__ */ jsx73(
12560
+ children: distributedColumns.map((columnItems, columnIndex) => /* @__PURE__ */ jsx74(
12233
12561
  "div",
12234
12562
  {
12235
12563
  className: "flex-1 flex flex-col",
12236
12564
  style: { gap: `${gap}px` },
12237
12565
  children: columnItems.map((item, itemIndex) => {
12238
12566
  const originalIndex = itemIndex * columnCount + columnIndex;
12239
- return /* @__PURE__ */ jsx73("div", { role: "listitem", children: renderItem(item, originalIndex) }, originalIndex);
12567
+ return /* @__PURE__ */ jsx74("div", { role: "listitem", children: renderItem(item, originalIndex) }, originalIndex);
12240
12568
  })
12241
12569
  },
12242
12570
  columnIndex
@@ -12246,7 +12574,7 @@ function MasonryGrid({
12246
12574
  }
12247
12575
 
12248
12576
  // src/layouts/hero-zoom/HeroZoomLayout.tsx
12249
- import { useEffect as useEffect42, useRef as useRef27 } from "react";
12577
+ import { useEffect as useEffect43, useRef as useRef28 } from "react";
12250
12578
 
12251
12579
  // src/layouts/hero-zoom/types.ts
12252
12580
  var DEFAULT_HERO_ZOOM_CONFIG = {
@@ -12258,19 +12586,19 @@ var DEFAULT_HERO_ZOOM_CONFIG = {
12258
12586
  };
12259
12587
 
12260
12588
  // src/layouts/hero-zoom/useHeroZoomScales.ts
12261
- import { useEffect as useEffect41, useState as useState41, useCallback as useCallback23 } from "react";
12589
+ import { useEffect as useEffect42, useState as useState42, useCallback as useCallback24 } from "react";
12262
12590
  function useHeroZoomScales(config = {}) {
12263
12591
  const { initialScale, accountForRetina, maxRetinaMultiplier } = {
12264
12592
  ...DEFAULT_HERO_ZOOM_CONFIG,
12265
12593
  ...config
12266
12594
  };
12267
- const [isHydrated, setIsHydrated] = useState41(false);
12595
+ const [isHydrated, setIsHydrated] = useState42(false);
12268
12596
  const ssrMultiplier = accountForRetina ? maxRetinaMultiplier : 2;
12269
- const [scales, setScales] = useState41(() => ({
12597
+ const [scales, setScales] = useState42(() => ({
12270
12598
  visual: initialScale,
12271
12599
  render: initialScale * ssrMultiplier
12272
12600
  }));
12273
- const calculateScales = useCallback23(() => {
12601
+ const calculateScales = useCallback24(() => {
12274
12602
  const visualScale = Math.max(1, Math.min(4, initialScale));
12275
12603
  let renderScale;
12276
12604
  if (accountForRetina) {
@@ -12285,7 +12613,7 @@ function useHeroZoomScales(config = {}) {
12285
12613
  renderScale = Math.max(1, Math.min(8, renderScale));
12286
12614
  return { visual: visualScale, render: renderScale };
12287
12615
  }, [initialScale, accountForRetina, maxRetinaMultiplier]);
12288
- useEffect41(() => {
12616
+ useEffect42(() => {
12289
12617
  const supportsScrollTimeline = CSS.supports(
12290
12618
  "animation-timeline",
12291
12619
  "scroll()"
@@ -12335,7 +12663,7 @@ function useHeroZoomScales(config = {}) {
12335
12663
  }
12336
12664
 
12337
12665
  // src/layouts/hero-zoom/HeroZoomLayout.tsx
12338
- import { jsx as jsx74, jsxs as jsxs51 } from "react/jsx-runtime";
12666
+ import { jsx as jsx75, jsxs as jsxs52 } from "react/jsx-runtime";
12339
12667
  function HeroZoomLayout({
12340
12668
  config = {},
12341
12669
  header,
@@ -12350,9 +12678,9 @@ function HeroZoomLayout({
12350
12678
  };
12351
12679
  const { aspectRatio, initialScale, headerHeight } = mergedConfig;
12352
12680
  const { visual, render, isHydrated } = useHeroZoomScales(mergedConfig);
12353
- const imageContainerRef = useRef27(null);
12354
- const headerRef = useRef27(null);
12355
- useEffect42(() => {
12681
+ const imageContainerRef = useRef28(null);
12682
+ const headerRef = useRef28(null);
12683
+ useEffect43(() => {
12356
12684
  if (typeof window === "undefined") return;
12357
12685
  const originalRestoration = "scrollRestoration" in history ? history.scrollRestoration : "auto";
12358
12686
  if ("scrollRestoration" in history) {
@@ -12365,7 +12693,7 @@ function HeroZoomLayout({
12365
12693
  }
12366
12694
  };
12367
12695
  }, []);
12368
- useEffect42(() => {
12696
+ useEffect43(() => {
12369
12697
  const supportsScrollTimeline = CSS.supports(
12370
12698
  "animation-timeline",
12371
12699
  "scroll()"
@@ -12494,7 +12822,7 @@ function HeroZoomLayout({
12494
12822
  The drawer covers the hero completely, so let animation run continuously. */
12495
12823
  }
12496
12824
  `;
12497
- return /* @__PURE__ */ jsxs51(
12825
+ return /* @__PURE__ */ jsxs52(
12498
12826
  "div",
12499
12827
  {
12500
12828
  className: `relative min-h-screen ${className}`,
@@ -12508,8 +12836,8 @@ function HeroZoomLayout({
12508
12836
  "--hero-zoom-final-transform": 1 / activeRender
12509
12837
  },
12510
12838
  children: [
12511
- /* @__PURE__ */ jsx74("style", { dangerouslySetInnerHTML: { __html: scopedStyles } }),
12512
- /* @__PURE__ */ jsx74(
12839
+ /* @__PURE__ */ jsx75("style", { dangerouslySetInnerHTML: { __html: scopedStyles } }),
12840
+ /* @__PURE__ */ jsx75(
12513
12841
  "div",
12514
12842
  {
12515
12843
  style: {
@@ -12517,7 +12845,7 @@ function HeroZoomLayout({
12517
12845
  }
12518
12846
  }
12519
12847
  ),
12520
- header && /* @__PURE__ */ jsx74(
12848
+ header && /* @__PURE__ */ jsx75(
12521
12849
  "div",
12522
12850
  {
12523
12851
  ref: headerRef,
@@ -12530,7 +12858,7 @@ function HeroZoomLayout({
12530
12858
  children: header
12531
12859
  }
12532
12860
  ),
12533
- /* @__PURE__ */ jsx74(
12861
+ /* @__PURE__ */ jsx75(
12534
12862
  "div",
12535
12863
  {
12536
12864
  ref: imageContainerRef,
@@ -12550,15 +12878,15 @@ function HeroZoomLayout({
12550
12878
  children: hero
12551
12879
  }
12552
12880
  ),
12553
- /* @__PURE__ */ jsx74("div", { className: "relative z-10", children })
12881
+ /* @__PURE__ */ jsx75("div", { className: "relative z-10", children })
12554
12882
  ]
12555
12883
  }
12556
12884
  );
12557
12885
  }
12558
12886
 
12559
12887
  // src/layouts/hero-zoom/HeroShrinkLayout.tsx
12560
- import { useEffect as useEffect43, useRef as useRef28, useState as useState42 } from "react";
12561
- import { jsx as jsx75, jsxs as jsxs52 } from "react/jsx-runtime";
12888
+ import { useEffect as useEffect44, useRef as useRef29, useState as useState43 } from "react";
12889
+ import { jsx as jsx76, jsxs as jsxs53 } from "react/jsx-runtime";
12562
12890
  var DEFAULT_CONFIG = {
12563
12891
  aspectRatio: 16 / 9,
12564
12892
  initialHeightPercent: 70,
@@ -12578,13 +12906,13 @@ function HeroShrinkLayout({
12578
12906
  ...config
12579
12907
  };
12580
12908
  const { aspectRatio, initialHeightPercent, minHeightPercent, headerHeight } = mergedConfig;
12581
- const heroRef = useRef28(null);
12582
- const headerRef = useRef28(null);
12583
- const [isClient, setIsClient] = useState42(false);
12584
- useEffect43(() => {
12909
+ const heroRef = useRef29(null);
12910
+ const headerRef = useRef29(null);
12911
+ const [isClient, setIsClient] = useState43(false);
12912
+ useEffect44(() => {
12585
12913
  setIsClient(true);
12586
12914
  }, []);
12587
- useEffect43(() => {
12915
+ useEffect44(() => {
12588
12916
  if (!isClient) return;
12589
12917
  const supportsScrollTimeline = CSS.supports("animation-timeline", "scroll()");
12590
12918
  if (supportsScrollTimeline) return;
@@ -12671,15 +12999,15 @@ function HeroShrinkLayout({
12671
12999
  }
12672
13000
  `;
12673
13001
  const spacerHeight = `calc(${initialHeightPercent}svh + ${headerHeight}px)`;
12674
- return /* @__PURE__ */ jsxs52(
13002
+ return /* @__PURE__ */ jsxs53(
12675
13003
  "div",
12676
13004
  {
12677
13005
  className: `relative min-h-screen ${className}`,
12678
13006
  style: { ...style, ...cssVars },
12679
13007
  children: [
12680
- /* @__PURE__ */ jsx75("style", { dangerouslySetInnerHTML: { __html: scopedStyles } }),
12681
- /* @__PURE__ */ jsx75("div", { style: { height: spacerHeight } }),
12682
- header && /* @__PURE__ */ jsx75(
13008
+ /* @__PURE__ */ jsx76("style", { dangerouslySetInnerHTML: { __html: scopedStyles } }),
13009
+ /* @__PURE__ */ jsx76("div", { style: { height: spacerHeight } }),
13010
+ header && /* @__PURE__ */ jsx76(
12683
13011
  "div",
12684
13012
  {
12685
13013
  ref: headerRef,
@@ -12688,7 +13016,7 @@ function HeroShrinkLayout({
12688
13016
  children: header
12689
13017
  }
12690
13018
  ),
12691
- /* @__PURE__ */ jsx75(
13019
+ /* @__PURE__ */ jsx76(
12692
13020
  "div",
12693
13021
  {
12694
13022
  ref: heroRef,
@@ -12696,7 +13024,7 @@ function HeroShrinkLayout({
12696
13024
  children: hero
12697
13025
  }
12698
13026
  ),
12699
- /* @__PURE__ */ jsx75("div", { className: "relative z-10 bg-background", children })
13027
+ /* @__PURE__ */ jsx76("div", { className: "relative z-10 bg-background", children })
12700
13028
  ]
12701
13029
  }
12702
13030
  );
@@ -12704,7 +13032,7 @@ function HeroShrinkLayout({
12704
13032
 
12705
13033
  // src/layouts/pdp/ImageEdgeBlur.tsx
12706
13034
  import React50 from "react";
12707
- import { jsx as jsx76 } from "react/jsx-runtime";
13035
+ import { jsx as jsx77 } from "react/jsx-runtime";
12708
13036
  var BLUR_CONFIG = {
12709
13037
  blur: 24,
12710
13038
  crossfade: 68
@@ -12759,7 +13087,7 @@ var ImageEdgeBlur = React50.memo(
12759
13087
  viewportWidth / LAYOUT_CONFIG2.IMAGE.ASPECT_RATIO,
12760
13088
  maxWidthPx / LAYOUT_CONFIG2.IMAGE.ASPECT_RATIO
12761
13089
  );
12762
- return /* @__PURE__ */ jsx76(
13090
+ return /* @__PURE__ */ jsx77(
12763
13091
  "div",
12764
13092
  {
12765
13093
  className: `absolute inset-0 pointer-events-none overflow-hidden ${className}`,
@@ -12767,7 +13095,7 @@ var ImageEdgeBlur = React50.memo(
12767
13095
  children: BLUR_LAYERS.map((layer, index) => {
12768
13096
  const layerMask = index === BLUR_LAYERS.length - 1 ? void 0 : `linear-gradient(to right, black 0%, black ${layer.zone * 100}%, transparent ${layer.zone * 100 + 10}%)`;
12769
13097
  const blurScale = 1 + layer.blur * 3 / containerHeightPx;
12770
- return /* @__PURE__ */ jsx76(
13098
+ return /* @__PURE__ */ jsx77(
12771
13099
  "img",
12772
13100
  {
12773
13101
  src: imageSrc,
@@ -12814,7 +13142,7 @@ var ImageEdgeBlur = React50.memo(
12814
13142
  );
12815
13143
 
12816
13144
  // src/layouts/pdp/PDPLayout.tsx
12817
- import { jsx as jsx77, jsxs as jsxs53 } from "react/jsx-runtime";
13145
+ import { jsx as jsx78, jsxs as jsxs54 } from "react/jsx-runtime";
12818
13146
  function PDPLayout({
12819
13147
  renderHeroImage,
12820
13148
  renderContent,
@@ -12842,15 +13170,15 @@ function PDPLayout({
12842
13170
  isDesktop,
12843
13171
  isWideMonitor: isWideMonitor2
12844
13172
  };
12845
- return /* @__PURE__ */ jsxs53("div", { className: `pdp-layout ${className}`, children: [
12846
- (isDesktop === false || isDesktop === null) && /* @__PURE__ */ jsxs53("div", { className: "md:hidden", children: [
12847
- renderMobileCarousel && /* @__PURE__ */ jsx77("div", { className: "mobile-carousel-container", children: renderMobileCarousel({ images: carouselImages }) }),
12848
- /* @__PURE__ */ jsx77("div", { className: "mobile-content p-4", children: renderContent(contentProps) })
13173
+ return /* @__PURE__ */ jsxs54("div", { className: `pdp-layout ${className}`, children: [
13174
+ (isDesktop === false || isDesktop === null) && /* @__PURE__ */ jsxs54("div", { className: "md:hidden", children: [
13175
+ renderMobileCarousel && /* @__PURE__ */ jsx78("div", { className: "mobile-carousel-container", children: renderMobileCarousel({ images: carouselImages }) }),
13176
+ /* @__PURE__ */ jsx78("div", { className: "mobile-content p-4", children: renderContent(contentProps) })
12849
13177
  ] }),
12850
- (isDesktop === true || isDesktop === null) && /* @__PURE__ */ jsxs53("div", { className: "hidden md:block relative", children: [
12851
- /* @__PURE__ */ jsxs53("div", { className: "desktop-hero relative", children: [
13178
+ (isDesktop === true || isDesktop === null) && /* @__PURE__ */ jsxs54("div", { className: "hidden md:block relative", children: [
13179
+ /* @__PURE__ */ jsxs54("div", { className: "desktop-hero relative", children: [
12852
13180
  renderHeroImage(heroProps),
12853
- showEdgeBlur && blurImageSrc && isWideMonitor2 && /* @__PURE__ */ jsx77(
13181
+ showEdgeBlur && blurImageSrc && isWideMonitor2 && /* @__PURE__ */ jsx78(
12854
13182
  ImageEdgeBlur,
12855
13183
  {
12856
13184
  imageSrc: blurImageSrc,
@@ -12861,7 +13189,7 @@ function PDPLayout({
12861
13189
  }
12862
13190
  )
12863
13191
  ] }),
12864
- /* @__PURE__ */ jsx77(
13192
+ /* @__PURE__ */ jsx78(
12865
13193
  "div",
12866
13194
  {
12867
13195
  className: "desktop-sidebar",
@@ -12879,7 +13207,7 @@ function PDPLayout({
12879
13207
 
12880
13208
  // src/layouts/pdp/SimpleImageBlur.tsx
12881
13209
  import React51 from "react";
12882
- import { jsx as jsx78 } from "react/jsx-runtime";
13210
+ import { jsx as jsx79 } from "react/jsx-runtime";
12883
13211
  var BLUR_CONFIG2 = {
12884
13212
  blur: 24,
12885
13213
  crossfade: 60
@@ -12912,7 +13240,7 @@ var SimpleImageBlur = React51.memo(function SimpleImageBlur2({
12912
13240
  if (!imageSrc || width <= 0) return null;
12913
13241
  const fadeInMask = getFadeInMask(BLUR_CONFIG2.crossfade);
12914
13242
  const extendedWidth = width + BLUR_CONFIG2.blur * 2;
12915
- return /* @__PURE__ */ jsx78(
13243
+ return /* @__PURE__ */ jsx79(
12916
13244
  "div",
12917
13245
  {
12918
13246
  className: `relative overflow-hidden ${className}`,
@@ -12925,7 +13253,7 @@ var SimpleImageBlur = React51.memo(function SimpleImageBlur2({
12925
13253
  black 0%,
12926
13254
  black ${layer.zone * 100}%,
12927
13255
  transparent ${layer.zone * 100 + 10}%)`;
12928
- return /* @__PURE__ */ jsx78(
13256
+ return /* @__PURE__ */ jsx79(
12929
13257
  "img",
12930
13258
  {
12931
13259
  src: imageSrc,
@@ -12956,7 +13284,7 @@ var SimpleImageBlur = React51.memo(function SimpleImageBlur2({
12956
13284
 
12957
13285
  // src/layouts/pdp/EdgeBlurBox.tsx
12958
13286
  import React52 from "react";
12959
- import { jsx as jsx79, jsxs as jsxs54 } from "react/jsx-runtime";
13287
+ import { jsx as jsx80, jsxs as jsxs55 } from "react/jsx-runtime";
12960
13288
  var BLUR_CONFIG3 = {
12961
13289
  blur: 24,
12962
13290
  crossfade: 60
@@ -12995,7 +13323,7 @@ var EdgeBlurBox = React52.memo(function EdgeBlurBox2({
12995
13323
  const blurExtend = BLUR_CONFIG3.blur * 2;
12996
13324
  const actualSharpWidth = sharpImageWidth ?? width + overlapLeft;
12997
13325
  const hasOverlap = overlapLeft > 0;
12998
- return /* @__PURE__ */ jsxs54(
13326
+ return /* @__PURE__ */ jsxs55(
12999
13327
  "div",
13000
13328
  {
13001
13329
  className: `relative ${className}`,
@@ -13006,7 +13334,7 @@ var EdgeBlurBox = React52.memo(function EdgeBlurBox2({
13006
13334
  overflow: hasOverlap ? "visible" : "hidden"
13007
13335
  },
13008
13336
  children: [
13009
- /* @__PURE__ */ jsx79(
13337
+ /* @__PURE__ */ jsx80(
13010
13338
  "div",
13011
13339
  {
13012
13340
  style: {
@@ -13020,7 +13348,7 @@ var EdgeBlurBox = React52.memo(function EdgeBlurBox2({
13020
13348
  transparent ${100 - (layer.zone * 100 + 10)}%,
13021
13349
  black ${100 - layer.zone * 100}%,
13022
13350
  black 100%)`;
13023
- return /* @__PURE__ */ jsx79(
13351
+ return /* @__PURE__ */ jsx80(
13024
13352
  "img",
13025
13353
  {
13026
13354
  src: imageSrc,
@@ -13048,7 +13376,7 @@ var EdgeBlurBox = React52.memo(function EdgeBlurBox2({
13048
13376
  })
13049
13377
  }
13050
13378
  ),
13051
- /* @__PURE__ */ jsx79(
13379
+ /* @__PURE__ */ jsx80(
13052
13380
  "img",
13053
13381
  {
13054
13382
  src: imageSrc,
@@ -13077,7 +13405,7 @@ var EdgeBlurBox = React52.memo(function EdgeBlurBox2({
13077
13405
 
13078
13406
  // src/layouts/pdp/ImageBlurExtension.tsx
13079
13407
  import React53 from "react";
13080
- import { jsx as jsx80, jsxs as jsxs55 } from "react/jsx-runtime";
13408
+ import { jsx as jsx81, jsxs as jsxs56 } from "react/jsx-runtime";
13081
13409
  var BLUR_CONFIG4 = {
13082
13410
  blur: 24,
13083
13411
  crossfadeWidth: 80
@@ -13114,7 +13442,7 @@ var ImageBlurExtension = React53.memo(function ImageBlurExtension2({
13114
13442
  const internalImageLeft = `calc(${heroImageLeft} - 100vw + ${width}px)`;
13115
13443
  const fadeOutMask = getFadeOutMask2(crossfadeWidth);
13116
13444
  const heightValue = typeof height === "number" ? `${height}px` : height;
13117
- return /* @__PURE__ */ jsxs55(
13445
+ return /* @__PURE__ */ jsxs56(
13118
13446
  "div",
13119
13447
  {
13120
13448
  className: `relative overflow-hidden ${className}`,
@@ -13123,7 +13451,7 @@ var ImageBlurExtension = React53.memo(function ImageBlurExtension2({
13123
13451
  height: heightValue
13124
13452
  },
13125
13453
  children: [
13126
- BLUR_LAYERS4.map((layer, index) => /* @__PURE__ */ jsx80(
13454
+ BLUR_LAYERS4.map((layer, index) => /* @__PURE__ */ jsx81(
13127
13455
  "img",
13128
13456
  {
13129
13457
  src: imageSrc,
@@ -13147,7 +13475,7 @@ var ImageBlurExtension = React53.memo(function ImageBlurExtension2({
13147
13475
  },
13148
13476
  `blur-${index}`
13149
13477
  )),
13150
- /* @__PURE__ */ jsx80(
13478
+ /* @__PURE__ */ jsx81(
13151
13479
  "img",
13152
13480
  {
13153
13481
  src: imageSrc,
@@ -13175,39 +13503,39 @@ var ImageBlurExtension = React53.memo(function ImageBlurExtension2({
13175
13503
  });
13176
13504
 
13177
13505
  // src/design-system/ColorSwatch.tsx
13178
- import { jsx as jsx81, jsxs as jsxs56 } from "react/jsx-runtime";
13506
+ import { jsx as jsx82, jsxs as jsxs57 } from "react/jsx-runtime";
13179
13507
  function ColorTokenSwatch({ name, cssVar, className = "" }) {
13180
- return /* @__PURE__ */ jsxs56("div", { className: `flex flex-col gap-1 ${className}`, children: [
13181
- /* @__PURE__ */ jsx81(
13508
+ return /* @__PURE__ */ jsxs57("div", { className: `flex flex-col gap-1 ${className}`, children: [
13509
+ /* @__PURE__ */ jsx82(
13182
13510
  "div",
13183
13511
  {
13184
13512
  className: "h-16 w-full rounded-lg border border-border shadow-sm",
13185
13513
  style: { backgroundColor: `var(${cssVar})` }
13186
13514
  }
13187
13515
  ),
13188
- /* @__PURE__ */ jsx81("div", { className: "text-sm font-medium text-foreground", children: name }),
13189
- /* @__PURE__ */ jsx81("code", { className: "text-xs text-muted-foreground font-mono", children: cssVar })
13516
+ /* @__PURE__ */ jsx82("div", { className: "text-sm font-medium text-foreground", children: name }),
13517
+ /* @__PURE__ */ jsx82("code", { className: "text-xs text-muted-foreground font-mono", children: cssVar })
13190
13518
  ] });
13191
13519
  }
13192
13520
  function ColorRow({ name, cssVar, description }) {
13193
- return /* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-4 py-2", children: [
13194
- /* @__PURE__ */ jsx81(
13521
+ return /* @__PURE__ */ jsxs57("div", { className: "flex items-center gap-4 py-2", children: [
13522
+ /* @__PURE__ */ jsx82(
13195
13523
  "div",
13196
13524
  {
13197
13525
  className: "h-10 w-10 rounded-lg border border-border shadow-sm flex-shrink-0",
13198
13526
  style: { backgroundColor: `var(${cssVar})` }
13199
13527
  }
13200
13528
  ),
13201
- /* @__PURE__ */ jsxs56("div", { className: "flex-1 min-w-0", children: [
13202
- /* @__PURE__ */ jsx81("div", { className: "text-sm font-medium text-foreground", children: name }),
13203
- description && /* @__PURE__ */ jsx81("div", { className: "text-xs text-muted-foreground", children: description })
13529
+ /* @__PURE__ */ jsxs57("div", { className: "flex-1 min-w-0", children: [
13530
+ /* @__PURE__ */ jsx82("div", { className: "text-sm font-medium text-foreground", children: name }),
13531
+ description && /* @__PURE__ */ jsx82("div", { className: "text-xs text-muted-foreground", children: description })
13204
13532
  ] }),
13205
- /* @__PURE__ */ jsx81("code", { className: "text-xs text-muted-foreground font-mono bg-muted px-2 py-1 rounded", children: cssVar })
13533
+ /* @__PURE__ */ jsx82("code", { className: "text-xs text-muted-foreground font-mono bg-muted px-2 py-1 rounded", children: cssVar })
13206
13534
  ] });
13207
13535
  }
13208
13536
 
13209
13537
  // src/design-system/ColorPalette.tsx
13210
- import { jsx as jsx82, jsxs as jsxs57 } from "react/jsx-runtime";
13538
+ import { jsx as jsx83, jsxs as jsxs58 } from "react/jsx-runtime";
13211
13539
  var COLOR_GROUPS = [
13212
13540
  {
13213
13541
  name: "Base",
@@ -13288,17 +13616,17 @@ var COLOR_GROUPS = [
13288
13616
  }
13289
13617
  ];
13290
13618
  function ColorPalette({ layout = "list", className = "" }) {
13291
- return /* @__PURE__ */ jsx82("div", { className: `space-y-8 ${className}`, children: COLOR_GROUPS.map((group) => /* @__PURE__ */ jsxs57("section", { children: [
13292
- /* @__PURE__ */ jsx82("h3", { className: "text-lg font-semibold text-foreground mb-1", children: group.name }),
13293
- /* @__PURE__ */ jsx82("p", { className: "text-sm text-muted-foreground mb-4", children: group.description }),
13294
- layout === "grid" ? /* @__PURE__ */ jsx82("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-4", children: group.colors.map((color) => /* @__PURE__ */ jsx82(
13619
+ return /* @__PURE__ */ jsx83("div", { className: `space-y-8 ${className}`, children: COLOR_GROUPS.map((group) => /* @__PURE__ */ jsxs58("section", { children: [
13620
+ /* @__PURE__ */ jsx83("h3", { className: "text-lg font-semibold text-foreground mb-1", children: group.name }),
13621
+ /* @__PURE__ */ jsx83("p", { className: "text-sm text-muted-foreground mb-4", children: group.description }),
13622
+ layout === "grid" ? /* @__PURE__ */ jsx83("div", { className: "grid grid-cols-2 sm:grid-cols-4 gap-4", children: group.colors.map((color) => /* @__PURE__ */ jsx83(
13295
13623
  ColorTokenSwatch,
13296
13624
  {
13297
13625
  name: color.name,
13298
13626
  cssVar: color.cssVar
13299
13627
  },
13300
13628
  color.cssVar
13301
- )) }) : /* @__PURE__ */ jsx82("div", { className: "bg-card rounded-lg border border-border p-4 divide-y divide-border", children: group.colors.map((color) => /* @__PURE__ */ jsx82(
13629
+ )) }) : /* @__PURE__ */ jsx83("div", { className: "bg-card rounded-lg border border-border p-4 divide-y divide-border", children: group.colors.map((color) => /* @__PURE__ */ jsx83(
13302
13630
  ColorRow,
13303
13631
  {
13304
13632
  name: color.name,
@@ -13311,7 +13639,7 @@ function ColorPalette({ layout = "list", className = "" }) {
13311
13639
  }
13312
13640
 
13313
13641
  // src/design-system/TypographyScale.tsx
13314
- import { jsx as jsx83, jsxs as jsxs58 } from "react/jsx-runtime";
13642
+ import { jsx as jsx84, jsxs as jsxs59 } from "react/jsx-runtime";
13315
13643
  var FONT_SAMPLES = [
13316
13644
  {
13317
13645
  name: "Heading",
@@ -13345,14 +13673,14 @@ var FONT_SAMPLES = [
13345
13673
  }
13346
13674
  ];
13347
13675
  function TypographyScale({ className = "" }) {
13348
- return /* @__PURE__ */ jsx83("div", { className: `space-y-8 ${className}`, children: FONT_SAMPLES.map((font) => /* @__PURE__ */ jsxs58("section", { className: "bg-card rounded-lg border border-border p-6", children: [
13349
- /* @__PURE__ */ jsxs58("div", { className: "flex items-center justify-between mb-4", children: [
13350
- /* @__PURE__ */ jsx83("h3", { className: "text-lg font-semibold text-foreground", children: font.name }),
13351
- /* @__PURE__ */ jsx83("code", { className: "text-xs text-muted-foreground font-mono bg-muted px-2 py-1 rounded", children: font.cssVar })
13676
+ return /* @__PURE__ */ jsx84("div", { className: `space-y-8 ${className}`, children: FONT_SAMPLES.map((font) => /* @__PURE__ */ jsxs59("section", { className: "bg-card rounded-lg border border-border p-6", children: [
13677
+ /* @__PURE__ */ jsxs59("div", { className: "flex items-center justify-between mb-4", children: [
13678
+ /* @__PURE__ */ jsx84("h3", { className: "text-lg font-semibold text-foreground", children: font.name }),
13679
+ /* @__PURE__ */ jsx84("code", { className: "text-xs text-muted-foreground font-mono bg-muted px-2 py-1 rounded", children: font.cssVar })
13352
13680
  ] }),
13353
- /* @__PURE__ */ jsx83("div", { className: "space-y-4", children: font.sizes.map((size) => /* @__PURE__ */ jsxs58("div", { className: "flex items-baseline gap-4", children: [
13354
- /* @__PURE__ */ jsx83("span", { className: "text-xs text-muted-foreground w-20 flex-shrink-0", children: size }),
13355
- /* @__PURE__ */ jsx83(
13681
+ /* @__PURE__ */ jsx84("div", { className: "space-y-4", children: font.sizes.map((size) => /* @__PURE__ */ jsxs59("div", { className: "flex items-baseline gap-4", children: [
13682
+ /* @__PURE__ */ jsx84("span", { className: "text-xs text-muted-foreground w-20 flex-shrink-0", children: size }),
13683
+ /* @__PURE__ */ jsx84(
13356
13684
  "p",
13357
13685
  {
13358
13686
  className: `${size} text-foreground`,
@@ -13371,8 +13699,8 @@ var RADIUS_SAMPLES = [
13371
13699
  { name: "Full", value: "9999px" }
13372
13700
  ];
13373
13701
  function RadiusScale({ className = "" }) {
13374
- return /* @__PURE__ */ jsx83("div", { className: `space-y-4 ${className}`, children: /* @__PURE__ */ jsx83("div", { className: "grid grid-cols-5 gap-4", children: RADIUS_SAMPLES.map((radius) => /* @__PURE__ */ jsxs58("div", { className: "flex flex-col items-center gap-2", children: [
13375
- /* @__PURE__ */ jsx83(
13702
+ return /* @__PURE__ */ jsx84("div", { className: `space-y-4 ${className}`, children: /* @__PURE__ */ jsx84("div", { className: "grid grid-cols-5 gap-4", children: RADIUS_SAMPLES.map((radius) => /* @__PURE__ */ jsxs59("div", { className: "flex flex-col items-center gap-2", children: [
13703
+ /* @__PURE__ */ jsx84(
13376
13704
  "div",
13377
13705
  {
13378
13706
  className: "h-16 w-16 bg-primary",
@@ -13381,14 +13709,14 @@ function RadiusScale({ className = "" }) {
13381
13709
  }
13382
13710
  }
13383
13711
  ),
13384
- /* @__PURE__ */ jsx83("span", { className: "text-sm font-medium text-foreground", children: radius.name }),
13385
- /* @__PURE__ */ jsx83("code", { className: "text-xs text-muted-foreground font-mono", children: radius.cssVar || radius.value })
13712
+ /* @__PURE__ */ jsx84("span", { className: "text-sm font-medium text-foreground", children: radius.name }),
13713
+ /* @__PURE__ */ jsx84("code", { className: "text-xs text-muted-foreground font-mono", children: radius.cssVar || radius.value })
13386
13714
  ] }, radius.name)) }) });
13387
13715
  }
13388
13716
 
13389
13717
  // src/design-system/ThemeSwitcher.tsx
13390
- import { useState as useState43, useEffect as useEffect44 } from "react";
13391
- import { Fragment as Fragment17, jsx as jsx84, jsxs as jsxs59 } from "react/jsx-runtime";
13718
+ import { useState as useState44, useEffect as useEffect45 } from "react";
13719
+ import { Fragment as Fragment18, jsx as jsx85, jsxs as jsxs60 } from "react/jsx-runtime";
13392
13720
  function readThemeFromDOM() {
13393
13721
  if (typeof document === "undefined") {
13394
13722
  return { themeName: "Linear", isDark: false };
@@ -13406,10 +13734,10 @@ function readThemeFromDOM() {
13406
13734
  return { themeName: "Linear", isDark: dark };
13407
13735
  }
13408
13736
  function ThemeSwitcher({ className = "", showBaseThemesOnly = true }) {
13409
- const [currentTheme, setCurrentTheme] = useState43("Linear");
13410
- const [isDark, setIsDark] = useState43(false);
13411
- const [isOpen, setIsOpen] = useState43(false);
13412
- useEffect44(() => {
13737
+ const [currentTheme, setCurrentTheme] = useState44("Linear");
13738
+ const [isDark, setIsDark] = useState44(false);
13739
+ const [isOpen, setIsOpen] = useState44(false);
13740
+ useEffect45(() => {
13413
13741
  const { themeName, isDark: dark } = readThemeFromDOM();
13414
13742
  setCurrentTheme(themeName);
13415
13743
  setIsDark(dark);
@@ -13448,61 +13776,61 @@ function ThemeSwitcher({ className = "", showBaseThemesOnly = true }) {
13448
13776
  applyTheme(config);
13449
13777
  };
13450
13778
  const themes = showBaseThemesOnly ? baseThemes : baseThemes;
13451
- return /* @__PURE__ */ jsxs59("div", { className: `flex items-center gap-3 ${className}`, children: [
13452
- /* @__PURE__ */ jsxs59("div", { className: "relative", children: [
13453
- /* @__PURE__ */ jsxs59(
13779
+ return /* @__PURE__ */ jsxs60("div", { className: `flex items-center gap-3 ${className}`, children: [
13780
+ /* @__PURE__ */ jsxs60("div", { className: "relative", children: [
13781
+ /* @__PURE__ */ jsxs60(
13454
13782
  "button",
13455
13783
  {
13456
13784
  onClick: () => setIsOpen(!isOpen),
13457
13785
  className: "flex items-center gap-2 px-4 py-2 bg-card border border-border rounded-lg hover:bg-muted transition-colors text-foreground",
13458
13786
  children: [
13459
- /* @__PURE__ */ jsx84("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx84("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01" }) }),
13460
- /* @__PURE__ */ jsx84("span", { className: "font-medium", children: currentTheme }),
13461
- /* @__PURE__ */ jsx84("svg", { className: `w-4 h-4 transition-transform ${isOpen ? "rotate-180" : ""}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx84("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) })
13787
+ /* @__PURE__ */ jsx85("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx85("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01" }) }),
13788
+ /* @__PURE__ */ jsx85("span", { className: "font-medium", children: currentTheme }),
13789
+ /* @__PURE__ */ jsx85("svg", { className: `w-4 h-4 transition-transform ${isOpen ? "rotate-180" : ""}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx85("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) })
13462
13790
  ]
13463
13791
  }
13464
13792
  ),
13465
- isOpen && /* @__PURE__ */ jsxs59(Fragment17, { children: [
13466
- /* @__PURE__ */ jsx84(
13793
+ isOpen && /* @__PURE__ */ jsxs60(Fragment18, { children: [
13794
+ /* @__PURE__ */ jsx85(
13467
13795
  "div",
13468
13796
  {
13469
13797
  className: "fixed inset-0 z-40",
13470
13798
  onClick: () => setIsOpen(false)
13471
13799
  }
13472
13800
  ),
13473
- /* @__PURE__ */ jsx84("div", { className: "absolute top-full left-0 mt-2 w-56 max-h-80 overflow-auto bg-card border border-border rounded-lg shadow-lg z-50", children: themes.map((theme) => /* @__PURE__ */ jsxs59(
13801
+ /* @__PURE__ */ jsx85("div", { className: "absolute top-full left-0 mt-2 w-56 max-h-80 overflow-auto bg-card border border-border rounded-lg shadow-lg z-50", children: themes.map((theme) => /* @__PURE__ */ jsxs60(
13474
13802
  "button",
13475
13803
  {
13476
13804
  onClick: () => handleThemeSelect(theme.name),
13477
13805
  className: `w-full px-4 py-2 text-left hover:bg-muted transition-colors flex items-center gap-3 ${currentTheme === theme.name ? "bg-muted" : ""}`,
13478
13806
  children: [
13479
- /* @__PURE__ */ jsx84(
13807
+ /* @__PURE__ */ jsx85(
13480
13808
  "div",
13481
13809
  {
13482
13810
  className: "w-4 h-4 rounded-full border border-border",
13483
13811
  style: { backgroundColor: theme.primaryColor || "#888" }
13484
13812
  }
13485
13813
  ),
13486
- /* @__PURE__ */ jsx84("span", { className: "text-foreground", children: theme.name }),
13487
- currentTheme === theme.name && /* @__PURE__ */ jsx84("svg", { className: "w-4 h-4 ml-auto text-primary", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx84("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) })
13814
+ /* @__PURE__ */ jsx85("span", { className: "text-foreground", children: theme.name }),
13815
+ currentTheme === theme.name && /* @__PURE__ */ jsx85("svg", { className: "w-4 h-4 ml-auto text-primary", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx85("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) })
13488
13816
  ]
13489
13817
  },
13490
13818
  theme.name
13491
13819
  )) })
13492
13820
  ] })
13493
13821
  ] }),
13494
- /* @__PURE__ */ jsxs59(
13822
+ /* @__PURE__ */ jsxs60(
13495
13823
  "button",
13496
13824
  {
13497
13825
  onClick: handleDarkModeToggle,
13498
13826
  className: "flex items-center gap-2 px-4 py-2 bg-card border border-border rounded-lg hover:bg-muted transition-colors text-foreground",
13499
13827
  title: `Switch to ${isDark ? "light" : "dark"} mode`,
13500
13828
  children: [
13501
- isDark ? /* @__PURE__ */ jsxs59("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [
13502
- /* @__PURE__ */ jsx84("circle", { cx: "12", cy: "12", r: "5" }),
13503
- /* @__PURE__ */ jsx84("path", { d: "M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42" })
13504
- ] }) : /* @__PURE__ */ jsx84("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx84("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) }),
13505
- /* @__PURE__ */ jsx84("span", { className: "text-sm", children: isDark ? "Light" : "Dark" })
13829
+ isDark ? /* @__PURE__ */ jsxs60("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [
13830
+ /* @__PURE__ */ jsx85("circle", { cx: "12", cy: "12", r: "5" }),
13831
+ /* @__PURE__ */ jsx85("path", { d: "M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42" })
13832
+ ] }) : /* @__PURE__ */ jsx85("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx85("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) }),
13833
+ /* @__PURE__ */ jsx85("span", { className: "text-sm", children: isDark ? "Light" : "Dark" })
13506
13834
  ]
13507
13835
  }
13508
13836
  )
@@ -13510,7 +13838,7 @@ function ThemeSwitcher({ className = "", showBaseThemesOnly = true }) {
13510
13838
  }
13511
13839
 
13512
13840
  // src/design-system/DesignSystemPage.tsx
13513
- import { jsx as jsx85, jsxs as jsxs60 } from "react/jsx-runtime";
13841
+ import { jsx as jsx86, jsxs as jsxs61 } from "react/jsx-runtime";
13514
13842
  function DesignSystemPage({
13515
13843
  showThemeSwitcher = true,
13516
13844
  showColors = true,
@@ -13520,29 +13848,29 @@ function DesignSystemPage({
13520
13848
  colorLayout = "list",
13521
13849
  className = ""
13522
13850
  }) {
13523
- return /* @__PURE__ */ jsxs60("div", { className: `max-w-4xl mx-auto px-4 py-8 ${className}`, children: [
13524
- /* @__PURE__ */ jsx85("header", { className: "mb-12", children: /* @__PURE__ */ jsxs60("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4", children: [
13525
- /* @__PURE__ */ jsxs60("div", { children: [
13526
- /* @__PURE__ */ jsx85("h1", { className: "text-4xl font-bold text-foreground mb-2", children: "Design System" }),
13527
- /* @__PURE__ */ jsx85("p", { className: "text-lg text-muted-foreground", children: "Visual reference for theme tokens and styles" })
13851
+ return /* @__PURE__ */ jsxs61("div", { className: `max-w-4xl mx-auto px-4 py-8 ${className}`, children: [
13852
+ /* @__PURE__ */ jsx86("header", { className: "mb-12", children: /* @__PURE__ */ jsxs61("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4", children: [
13853
+ /* @__PURE__ */ jsxs61("div", { children: [
13854
+ /* @__PURE__ */ jsx86("h1", { className: "text-4xl font-bold text-foreground mb-2", children: "Design System" }),
13855
+ /* @__PURE__ */ jsx86("p", { className: "text-lg text-muted-foreground", children: "Visual reference for theme tokens and styles" })
13528
13856
  ] }),
13529
- showThemeSwitcher && /* @__PURE__ */ jsx85(ThemeSwitcher, {})
13857
+ showThemeSwitcher && /* @__PURE__ */ jsx86(ThemeSwitcher, {})
13530
13858
  ] }) }),
13531
- showColors && /* @__PURE__ */ jsxs60("section", { className: "mb-16", children: [
13532
- /* @__PURE__ */ jsx85("h2", { className: "text-2xl font-semibold text-foreground mb-6 pb-2 border-b border-border", children: "Color Palette" }),
13533
- /* @__PURE__ */ jsx85(ColorPalette, { layout: colorLayout })
13859
+ showColors && /* @__PURE__ */ jsxs61("section", { className: "mb-16", children: [
13860
+ /* @__PURE__ */ jsx86("h2", { className: "text-2xl font-semibold text-foreground mb-6 pb-2 border-b border-border", children: "Color Palette" }),
13861
+ /* @__PURE__ */ jsx86(ColorPalette, { layout: colorLayout })
13534
13862
  ] }),
13535
- showTypography && /* @__PURE__ */ jsxs60("section", { className: "mb-16", children: [
13536
- /* @__PURE__ */ jsx85("h2", { className: "text-2xl font-semibold text-foreground mb-6 pb-2 border-b border-border", children: "Typography" }),
13537
- /* @__PURE__ */ jsx85(TypographyScale, {})
13863
+ showTypography && /* @__PURE__ */ jsxs61("section", { className: "mb-16", children: [
13864
+ /* @__PURE__ */ jsx86("h2", { className: "text-2xl font-semibold text-foreground mb-6 pb-2 border-b border-border", children: "Typography" }),
13865
+ /* @__PURE__ */ jsx86(TypographyScale, {})
13538
13866
  ] }),
13539
- showRadius && /* @__PURE__ */ jsxs60("section", { className: "mb-16", children: [
13540
- /* @__PURE__ */ jsx85("h2", { className: "text-2xl font-semibold text-foreground mb-6 pb-2 border-b border-border", children: "Border Radius" }),
13541
- /* @__PURE__ */ jsx85(RadiusScale, {})
13867
+ showRadius && /* @__PURE__ */ jsxs61("section", { className: "mb-16", children: [
13868
+ /* @__PURE__ */ jsx86("h2", { className: "text-2xl font-semibold text-foreground mb-6 pb-2 border-b border-border", children: "Border Radius" }),
13869
+ /* @__PURE__ */ jsx86(RadiusScale, {})
13542
13870
  ] }),
13543
- showSpacing && /* @__PURE__ */ jsxs60("section", { className: "mb-16", children: [
13544
- /* @__PURE__ */ jsx85("h2", { className: "text-2xl font-semibold text-foreground mb-6 pb-2 border-b border-border", children: "Spacing Scale" }),
13545
- /* @__PURE__ */ jsx85(SpacingScale, {})
13871
+ showSpacing && /* @__PURE__ */ jsxs61("section", { className: "mb-16", children: [
13872
+ /* @__PURE__ */ jsx86("h2", { className: "text-2xl font-semibold text-foreground mb-6 pb-2 border-b border-border", children: "Spacing Scale" }),
13873
+ /* @__PURE__ */ jsx86(SpacingScale, {})
13546
13874
  ] })
13547
13875
  ] });
13548
13876
  }
@@ -13557,25 +13885,25 @@ function SpacingScale() {
13557
13885
  { name: "12", value: "3rem" },
13558
13886
  { name: "16", value: "4rem" }
13559
13887
  ];
13560
- return /* @__PURE__ */ jsx85("div", { className: "space-y-2", children: spaces.map((space) => /* @__PURE__ */ jsxs60("div", { className: "flex items-center gap-4", children: [
13561
- /* @__PURE__ */ jsx85("code", { className: "text-xs text-muted-foreground font-mono w-8", children: space.name }),
13562
- /* @__PURE__ */ jsx85(
13888
+ return /* @__PURE__ */ jsx86("div", { className: "space-y-2", children: spaces.map((space) => /* @__PURE__ */ jsxs61("div", { className: "flex items-center gap-4", children: [
13889
+ /* @__PURE__ */ jsx86("code", { className: "text-xs text-muted-foreground font-mono w-8", children: space.name }),
13890
+ /* @__PURE__ */ jsx86(
13563
13891
  "div",
13564
13892
  {
13565
13893
  className: "h-4 bg-primary rounded",
13566
13894
  style: { width: space.value }
13567
13895
  }
13568
13896
  ),
13569
- /* @__PURE__ */ jsx85("span", { className: "text-sm text-muted-foreground", children: space.value })
13897
+ /* @__PURE__ */ jsx86("span", { className: "text-sm text-muted-foreground", children: space.value })
13570
13898
  ] }, space.name)) });
13571
13899
  }
13572
13900
 
13573
13901
  // src/personalization/PersonalizationProvider.tsx
13574
13902
  import React54, {
13575
- useState as useState44,
13576
- useCallback as useCallback25,
13577
- useRef as useRef29,
13578
- useEffect as useEffect45
13903
+ useState as useState45,
13904
+ useCallback as useCallback26,
13905
+ useRef as useRef30,
13906
+ useEffect as useEffect46
13579
13907
  } from "react";
13580
13908
 
13581
13909
  // src/personalization/PersonalizationContext.ts
@@ -13586,7 +13914,7 @@ function usePersonalizationContext() {
13586
13914
  }
13587
13915
 
13588
13916
  // src/personalization/PersonalizationProvider.tsx
13589
- import { Fragment as Fragment18, jsx as jsx86, jsxs as jsxs61 } from "react/jsx-runtime";
13917
+ import { Fragment as Fragment19, jsx as jsx87, jsxs as jsxs62 } from "react/jsx-runtime";
13590
13918
  function createBridgeFromCanvas(canvasModule) {
13591
13919
  const { useEditor, useCommands, useImageBinding } = canvasModule;
13592
13920
  function TextBinder({ name, value }) {
@@ -13674,15 +14002,15 @@ function createBridgeFromCanvas(canvasModule) {
13674
14002
  return null;
13675
14003
  }
13676
14004
  return function PersonalizationBridge({ fields = [], values = {} } = {}) {
13677
- return /* @__PURE__ */ jsx86(Fragment18, { children: fields.map((field) => {
14005
+ return /* @__PURE__ */ jsx87(Fragment19, { children: fields.map((field) => {
13678
14006
  if (field.type === "text") {
13679
- return /* @__PURE__ */ jsx86(TextBinder, { name: field.name, value: values[field.name] ?? "" }, `text-${field.name}`);
14007
+ return /* @__PURE__ */ jsx87(TextBinder, { name: field.name, value: values[field.name] ?? "" }, `text-${field.name}`);
13680
14008
  }
13681
14009
  if (field.type === "color") {
13682
- return /* @__PURE__ */ jsx86(ColorBinder, { originalColor: field.color, newColor: values[field.color] ?? field.color }, `color-${field.color}`);
14010
+ return /* @__PURE__ */ jsx87(ColorBinder, { originalColor: field.color, newColor: values[field.color] ?? field.color }, `color-${field.color}`);
13683
14011
  }
13684
14012
  if (field.type === "image") {
13685
- return /* @__PURE__ */ jsx86(ImageBinder, { name: field.name, value: values[field.name] ?? "", fit: field.fit ?? "cover" }, `image-${field.name}`);
14013
+ return /* @__PURE__ */ jsx87(ImageBinder, { name: field.name, value: values[field.name] ?? "", fit: field.fit ?? "cover" }, `image-${field.name}`);
13686
14014
  }
13687
14015
  return null;
13688
14016
  }) });
@@ -13704,19 +14032,19 @@ function PersonalizationProvider({
13704
14032
  children
13705
14033
  }) {
13706
14034
  const realtime = useRealtimeOptional();
13707
- const [personValues, setPersonValues] = useState44(initialValues ?? {});
13708
- const [isActive, setIsActive] = useState44(!!(initialValues && Object.keys(initialValues).length > 0));
13709
- const [isExporting, setIsExporting] = useState44(false);
13710
- const [exportedBlobUrls, setExportedBlobUrls] = useState44({});
13711
- const [exportCount, setExportCount] = useState44(0);
13712
- const blobUrlsRef = useRef29({});
13713
- const [CanvasComponent, setCanvasComponent] = useState44(
14035
+ const [personValues, setPersonValues] = useState45(initialValues ?? {});
14036
+ const [isActive, setIsActive] = useState45(!!(initialValues && Object.keys(initialValues).length > 0));
14037
+ const [isExporting, setIsExporting] = useState45(false);
14038
+ const [exportedBlobUrls, setExportedBlobUrls] = useState45({});
14039
+ const [exportCount, setExportCount] = useState45(0);
14040
+ const blobUrlsRef = useRef30({});
14041
+ const [CanvasComponent, setCanvasComponent] = useState45(
13714
14042
  cachedCanvasComponent
13715
14043
  );
13716
- const [BridgeComponent, setBridgeComponent] = useState44(
14044
+ const [BridgeComponent, setBridgeComponent] = useState45(
13717
14045
  cachedBridgeComponent
13718
14046
  );
13719
- useEffect45(() => {
14047
+ useEffect46(() => {
13720
14048
  if (CanvasComponent && BridgeComponent) return;
13721
14049
  if (!canvasImport) return;
13722
14050
  if (!canvasLoadPromise) {
@@ -13734,8 +14062,8 @@ function PersonalizationProvider({
13734
14062
  }
13735
14063
  });
13736
14064
  }, [CanvasComponent, BridgeComponent, canvasImport]);
13737
- const realtimeEnabledRef = useRef29(false);
13738
- useEffect45(() => {
14065
+ const realtimeEnabledRef = useRef30(false);
14066
+ useEffect46(() => {
13739
14067
  return () => {
13740
14068
  for (const url of Object.values(blobUrlsRef.current)) {
13741
14069
  try {
@@ -13745,16 +14073,16 @@ function PersonalizationProvider({
13745
14073
  }
13746
14074
  };
13747
14075
  }, []);
13748
- const updateField = useCallback25((key, value) => {
14076
+ const updateField = useCallback26((key, value) => {
13749
14077
  setIsActive(true);
13750
14078
  setPersonValues((prev) => ({ ...prev, [key]: value }));
13751
14079
  }, []);
13752
- const reset = useCallback25(() => {
14080
+ const reset = useCallback26(() => {
13753
14081
  setPersonValues({});
13754
14082
  setIsActive(false);
13755
14083
  setIsExporting(false);
13756
14084
  }, []);
13757
- const handleExport = useCallback25(
14085
+ const handleExport = useCallback26(
13758
14086
  (exports) => {
13759
14087
  const newUrls = {};
13760
14088
  for (const [name, data] of Object.entries(exports)) {
@@ -13788,7 +14116,7 @@ function PersonalizationProvider({
13788
14116
  },
13789
14117
  [realtime, placementOverride]
13790
14118
  );
13791
- const handleExportScheduled = useCallback25(() => {
14119
+ const handleExportScheduled = useCallback26(() => {
13792
14120
  setIsExporting(true);
13793
14121
  }, []);
13794
14122
  const shouldMountCanvas = CanvasComponent && BridgeComponent && canvasState?.elements && canvasState.elements.length > 0 && (!lazy || isActive);
@@ -13805,8 +14133,8 @@ function PersonalizationProvider({
13805
14133
  }),
13806
14134
  [fields, personValues, updateField, isActive, isExporting, exportedBlobUrls, exportCount, reset]
13807
14135
  );
13808
- return /* @__PURE__ */ jsxs61(PersonalizationContext.Provider, { value: contextValue, children: [
13809
- shouldMountCanvas && CanvasComponent && BridgeComponent && /* @__PURE__ */ jsx86(
14136
+ return /* @__PURE__ */ jsxs62(PersonalizationContext.Provider, { value: contextValue, children: [
14137
+ shouldMountCanvas && CanvasComponent && BridgeComponent && /* @__PURE__ */ jsx87(
13810
14138
  "div",
13811
14139
  {
13812
14140
  style: {
@@ -13819,7 +14147,7 @@ function PersonalizationProvider({
13819
14147
  pointerEvents: "none"
13820
14148
  },
13821
14149
  "aria-hidden": true,
13822
- children: /* @__PURE__ */ jsx86(
14150
+ children: /* @__PURE__ */ jsx87(
13823
14151
  CanvasComponent,
13824
14152
  {
13825
14153
  initialElements: canvasState?.elements,
@@ -13839,7 +14167,7 @@ function PersonalizationProvider({
13839
14167
  exportImageQuality: exportConfig?.imageQuality ?? 0.85,
13840
14168
  onExport: handleExport,
13841
14169
  onExportScheduled: handleExportScheduled,
13842
- overlay: /* @__PURE__ */ jsx86(BridgeComponent, { fields, values: personValues })
14170
+ overlay: /* @__PURE__ */ jsx87(BridgeComponent, { fields, values: personValues })
13843
14171
  }
13844
14172
  )
13845
14173
  },
@@ -13864,7 +14192,7 @@ function usePersonalizationOptional() {
13864
14192
  }
13865
14193
 
13866
14194
  // src/personalization/PersonalizationInputs.tsx
13867
- import { jsx as jsx87, jsxs as jsxs62 } from "react/jsx-runtime";
14195
+ import { jsx as jsx88, jsxs as jsxs63 } from "react/jsx-runtime";
13868
14196
  function PersonalizationInputs({
13869
14197
  className,
13870
14198
  inputClassName = "w-full px-4 py-3 rounded-lg border text-base text-foreground placeholder:text-muted-foreground bg-white/50 outline-none focus:ring-2 focus:ring-foreground/20",
@@ -13888,8 +14216,8 @@ function PersonalizationInputs({
13888
14216
  scrollInputAboveKeyboard(e.target);
13889
14217
  }
13890
14218
  };
13891
- return /* @__PURE__ */ jsxs62("div", { className: className || "flex flex-col gap-3", children: [
13892
- textFields.map((field) => /* @__PURE__ */ jsx87(
14219
+ return /* @__PURE__ */ jsxs63("div", { className: className || "flex flex-col gap-3", children: [
14220
+ textFields.map((field) => /* @__PURE__ */ jsx88(
13893
14221
  "input",
13894
14222
  {
13895
14223
  type: "text",
@@ -13903,8 +14231,8 @@ function PersonalizationInputs({
13903
14231
  },
13904
14232
  `text-${field.name}`
13905
14233
  )),
13906
- colorFields.map((field) => /* @__PURE__ */ jsxs62("div", { className: "flex items-center gap-3", children: [
13907
- /* @__PURE__ */ jsx87(
14234
+ colorFields.map((field) => /* @__PURE__ */ jsxs63("div", { className: "flex items-center gap-3", children: [
14235
+ /* @__PURE__ */ jsx88(
13908
14236
  "input",
13909
14237
  {
13910
14238
  type: "color",
@@ -13913,9 +14241,9 @@ function PersonalizationInputs({
13913
14241
  onChange: (e) => updateField(field.color, e.target.value)
13914
14242
  }
13915
14243
  ),
13916
- /* @__PURE__ */ jsx87("span", { className: "text-base text-muted-foreground", children: field.label })
14244
+ /* @__PURE__ */ jsx88("span", { className: "text-base text-muted-foreground", children: field.label })
13917
14245
  ] }, `color-${field.color}`)),
13918
- imageFields.map((field) => /* @__PURE__ */ jsx87(
14246
+ imageFields.map((field) => /* @__PURE__ */ jsx88(
13919
14247
  "input",
13920
14248
  {
13921
14249
  type: "text",
@@ -13933,15 +14261,15 @@ function PersonalizationInputs({
13933
14261
  }
13934
14262
 
13935
14263
  // src/personalization/usePersonalizationShimmer.ts
13936
- import { useState as useState45, useEffect as useEffect46, useRef as useRef30, useCallback as useCallback26 } from "react";
14264
+ import { useState as useState46, useEffect as useEffect47, useRef as useRef31, useCallback as useCallback27 } from "react";
13937
14265
  function usePersonalizationShimmer(containerRef, safetyTimeoutMs = 1e4) {
13938
14266
  const personCtx = usePersonalizationContext();
13939
14267
  const realtime = useRealtimeOptional();
13940
- const [shimmerActive, setShimmerActive] = useState45(false);
13941
- const sdkSettledRef = useRef30(false);
13942
- const manualTriggerRef = useRef30(false);
13943
- const safetyTimeoutRef = useRef30(void 0);
13944
- const startShimmer = useCallback26(() => {
14268
+ const [shimmerActive, setShimmerActive] = useState46(false);
14269
+ const sdkSettledRef = useRef31(false);
14270
+ const manualTriggerRef = useRef31(false);
14271
+ const safetyTimeoutRef = useRef31(void 0);
14272
+ const startShimmer = useCallback27(() => {
13945
14273
  setShimmerActive(true);
13946
14274
  if (safetyTimeoutRef.current) clearTimeout(safetyTimeoutRef.current);
13947
14275
  safetyTimeoutRef.current = setTimeout(
@@ -13953,25 +14281,25 @@ function usePersonalizationShimmer(containerRef, safetyTimeoutMs = 1e4) {
13953
14281
  safetyTimeoutMs
13954
14282
  );
13955
14283
  }, [safetyTimeoutMs]);
13956
- useEffect46(() => {
14284
+ useEffect47(() => {
13957
14285
  if (!personCtx?.isActive) return;
13958
14286
  sdkSettledRef.current = false;
13959
14287
  manualTriggerRef.current = false;
13960
14288
  realtime?.resetPipelineSettled();
13961
14289
  startShimmer();
13962
14290
  }, [personCtx?.personValues, personCtx?.isActive, startShimmer]);
13963
- const triggerShimmer = useCallback26(() => {
14291
+ const triggerShimmer = useCallback27(() => {
13964
14292
  sdkSettledRef.current = false;
13965
14293
  manualTriggerRef.current = true;
13966
14294
  startShimmer();
13967
14295
  }, [startShimmer]);
13968
- useEffect46(() => {
14296
+ useEffect47(() => {
13969
14297
  if (!realtime?.subscribePipelineSettled) return;
13970
14298
  return realtime.subscribePipelineSettled(() => {
13971
14299
  sdkSettledRef.current = true;
13972
14300
  });
13973
14301
  }, [realtime]);
13974
- useEffect46(() => {
14302
+ useEffect47(() => {
13975
14303
  const container = containerRef.current;
13976
14304
  if (!container) return;
13977
14305
  const observer = new MutationObserver((mutations) => {
@@ -14014,7 +14342,7 @@ function usePersonalizationShimmer(containerRef, safetyTimeoutMs = 1e4) {
14014
14342
  });
14015
14343
  return () => observer.disconnect();
14016
14344
  }, [containerRef]);
14017
- useEffect46(() => {
14345
+ useEffect47(() => {
14018
14346
  return () => {
14019
14347
  if (safetyTimeoutRef.current) clearTimeout(safetyTimeoutRef.current);
14020
14348
  };
@@ -14119,6 +14447,8 @@ export {
14119
14447
  Link,
14120
14448
  LinkIcon,
14121
14449
  LoadingOverlayPrism,
14450
+ LoadingOverlayPrismCandy,
14451
+ LoadingOverlayPrismCandyInline,
14122
14452
  MasonryGrid,
14123
14453
  MobileProductCarousel,
14124
14454
  MockupPriorityProvider,