storefront-layouts 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/editor/blocks/defaults/clothing-minimal-home.d.ts.map +1 -1
  2. package/dist/editor/blocks/defaults/clothing-minimal-home.js +0 -17
  3. package/dist/editor/payaza-form/PayazaFormEditor.d.ts.map +1 -1
  4. package/dist/editor/payaza-form/PayazaFormEditor.js +0 -2
  5. package/dist/editor/payaza-form/data-transformer.d.ts.map +1 -1
  6. package/dist/editor/payaza-form/data-transformer.js +1 -8
  7. package/dist/editor/shared/useEditorChromeMetrics.js +1 -2
  8. package/dist/hooks/use-pdp-variation.d.ts +1 -13
  9. package/dist/hooks/use-pdp-variation.d.ts.map +1 -1
  10. package/dist/hooks/use-product-variation-selection.d.ts +1 -13
  11. package/dist/hooks/use-product-variation-selection.d.ts.map +1 -1
  12. package/dist/index.d.ts +8 -4
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +7 -4
  15. package/dist/layouts/booking/pages/ProductDetailPage.d.ts.map +1 -1
  16. package/dist/layouts/booking/pages/ProductDetailPage.js +2 -1
  17. package/dist/layouts/booking-agenda/pages/ProductDetailPage.d.ts.map +1 -1
  18. package/dist/layouts/booking-agenda/pages/ProductDetailPage.js +2 -1
  19. package/dist/layouts/clothing/components/ClothingHomePage.d.ts.map +1 -1
  20. package/dist/layouts/clothing/components/ClothingHomePage.js +7 -11
  21. package/dist/layouts/clothing/pages/ProductDetailPage.d.ts.map +1 -1
  22. package/dist/layouts/clothing/pages/ProductDetailPage.js +1 -1
  23. package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.d.ts.map +1 -1
  24. package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.js +1 -7
  25. package/dist/layouts/clothing-minimal/components/clothing-minimal-block-render.d.ts +1 -1
  26. package/dist/layouts/clothing-minimal/components/clothing-minimal-block-render.d.ts.map +1 -1
  27. package/dist/layouts/clothing-minimal/components/clothing-minimal-block-render.js +5 -21
  28. package/dist/layouts/clothing-minimal/pages/ProductDetailPage.d.ts.map +1 -1
  29. package/dist/layouts/clothing-minimal/pages/ProductDetailPage.js +1 -1
  30. package/dist/layouts/electronics/components/ElectronicsGridProductCard.d.ts.map +1 -1
  31. package/dist/layouts/electronics/components/ElectronicsGridProductCard.js +2 -2
  32. package/dist/layouts/electronics/pages/ProductDetailPage.d.ts.map +1 -1
  33. package/dist/layouts/electronics/pages/ProductDetailPage.js +2 -1
  34. package/dist/layouts/electronics-grid/components/ElectronicsGridProductCard.d.ts.map +1 -1
  35. package/dist/layouts/electronics-grid/components/ElectronicsGridProductCard.js +2 -2
  36. package/dist/layouts/electronics-grid/pages/ProductDetailPage.d.ts.map +1 -1
  37. package/dist/layouts/electronics-grid/pages/ProductDetailPage.js +2 -1
  38. package/dist/layouts/food/pages/MenuPage.d.ts.map +1 -1
  39. package/dist/layouts/food/pages/MenuPage.js +1 -0
  40. package/dist/layouts/food/pages/ProductDetailPage.d.ts.map +1 -1
  41. package/dist/layouts/food/pages/ProductDetailPage.js +2 -1
  42. package/dist/layouts/food-modern/components/FoodHomePageModern.js +1 -1
  43. package/dist/layouts/food-modern/pages/MenuPage.d.ts.map +1 -1
  44. package/dist/layouts/food-modern/pages/MenuPage.js +1 -0
  45. package/dist/layouts/food-modern/pages/ProductDetailPage.d.ts.map +1 -1
  46. package/dist/layouts/food-modern/pages/ProductDetailPage.js +2 -1
  47. package/dist/layouts/shared/components/PromoBanner.d.ts +4 -1
  48. package/dist/layouts/shared/components/PromoBanner.d.ts.map +1 -1
  49. package/dist/layouts/shared/components/PromoBanner.js +2 -2
  50. package/dist/layouts/shared/components/StoreCartSheet.d.ts.map +1 -1
  51. package/dist/layouts/shared/components/StoreCartSheet.js +4 -2
  52. package/dist/layouts/shared/components/StoreFooter.js +2 -2
  53. package/dist/layouts/shared/components/StoreHeader.js +4 -4
  54. package/dist/layouts/shared/pages/CartPage.d.ts.map +1 -1
  55. package/dist/layouts/shared/pages/CartPage.js +4 -28
  56. package/dist/layouts/shared/pages/CheckoutPage.d.ts.map +1 -1
  57. package/dist/layouts/shared/pages/CheckoutPage.js +203 -81
  58. package/dist/layouts/shared/pages/MaintenancePage.js +1 -1
  59. package/dist/layouts/shared/wrappers/ClothingLayout.js +5 -5
  60. package/dist/layouts/shared/wrappers/ClothingMinimalLayout.js +4 -4
  61. package/dist/layouts/shared/wrappers/ElectronicsLayout.js +4 -4
  62. package/dist/layouts/shared/wrappers/FoodModernLayout.js +4 -4
  63. package/dist/layouts/shared/wrappers/MotivationalLayout.js +4 -4
  64. package/dist/layouts/shared/wrappers/StandardLayout.js +4 -4
  65. package/dist/lib/cart-charge-currency.d.ts +16 -0
  66. package/dist/lib/cart-charge-currency.d.ts.map +1 -0
  67. package/dist/lib/cart-charge-currency.js +38 -0
  68. package/dist/lib/checkout-phone-validation.d.ts +3 -0
  69. package/dist/lib/checkout-phone-validation.d.ts.map +1 -0
  70. package/dist/lib/checkout-phone-validation.js +41 -0
  71. package/dist/lib/preview-data.d.ts.map +1 -1
  72. package/dist/lib/preview-data.js +2 -0
  73. package/dist/lib/rich-html.d.ts +1 -2
  74. package/dist/lib/rich-html.d.ts.map +1 -1
  75. package/dist/lib/services/fees.service.d.ts +40 -57
  76. package/dist/lib/services/fees.service.d.ts.map +1 -1
  77. package/dist/lib/services/fees.service.js +24 -120
  78. package/dist/lib/store-types.d.ts +27 -34
  79. package/dist/lib/store-types.d.ts.map +1 -1
  80. package/dist/lib/utils/fee-calculations.d.ts.map +1 -1
  81. package/dist/lib/utils/fee-calculations.js +23 -11
  82. package/dist/preview/LayoutPreview.d.ts.map +1 -1
  83. package/dist/preview/LayoutPreview.js +5 -22
  84. package/dist/styles/index.css +36 -0
  85. package/dist/utils/price-display.d.ts +3 -0
  86. package/dist/utils/price-display.d.ts.map +1 -0
  87. package/dist/utils/price-display.js +8 -0
  88. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"clothing-minimal-home.d.ts","sourceRoot":"","sources":["../../../../src/editor/blocks/defaults/clothing-minimal-home.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAOtD,wBAAgB,gCAAgC,IAAI,qBAAqB,EAAE,CA2D1E;AAED,wBAAgB,oCAAoC,IAAI,qBAAqB,EAAE,CA2B9E;AAED,wBAAgB,sCAAsC,IAAI,qBAAqB,EAAE,CAWhF;AAED,wBAAgB,4CAA4C,IAAI,qBAAqB,EAAE,CAkBtF;AAED,wBAAgB,iCAAiC,IAAI,qBAAqB,EAAE,CAsD3E;AAED,wBAAgB,iCAAiC,IAAI,qBAAqB,EAAE,CAa3E;AAED,wBAAgB,6CAA6C,CAC3D,UAAU,EAAE,MAAM,GACjB,qBAAqB,EAAE,GAAG,IAAI,CAiBhC"}
1
+ {"version":3,"file":"clothing-minimal-home.d.ts","sourceRoot":"","sources":["../../../../src/editor/blocks/defaults/clothing-minimal-home.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAOtD,wBAAgB,gCAAgC,IAAI,qBAAqB,EAAE,CA0C1E;AAED,wBAAgB,oCAAoC,IAAI,qBAAqB,EAAE,CA2B9E;AAED,wBAAgB,sCAAsC,IAAI,qBAAqB,EAAE,CAWhF;AAED,wBAAgB,4CAA4C,IAAI,qBAAqB,EAAE,CAkBtF;AAED,wBAAgB,iCAAiC,IAAI,qBAAqB,EAAE,CAsD3E;AAED,wBAAgB,iCAAiC,IAAI,qBAAqB,EAAE,CAa3E;AAED,wBAAgB,6CAA6C,CAC3D,UAAU,EAAE,MAAM,GACjB,qBAAqB,EAAE,GAAG,IAAI,CAiBhC"}
@@ -40,23 +40,6 @@ export function defaultClothingMinimalHeroBlocks() {
40
40
  name: 'payaza/image',
41
41
  attributes: { url: IMG.hero, alt: 'Minimal Fashion' },
42
42
  },
43
- {
44
- name: 'payaza/group',
45
- attributes: { variant: 'hero-caption' },
46
- innerBlocks: [
47
- {
48
- name: 'payaza/paragraph',
49
- attributes: { content: '<p>Featured Look</p>', variant: 'caption-title' },
50
- },
51
- {
52
- name: 'payaza/paragraph',
53
- attributes: {
54
- content: '<p>Linen Blend Blazer · $299</p>',
55
- variant: 'caption-body',
56
- },
57
- },
58
- ],
59
- },
60
43
  ],
61
44
  },
62
45
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"PayazaFormEditor.d.ts","sourceRoot":"","sources":["../../../src/editor/payaza-form/PayazaFormEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAoB/C,OAAO,EAA4B,eAAe,EAAgB,MAAM,mBAAmB,CAAC;AA2F5F,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CACjD;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAqzD5D,CAAC"}
1
+ {"version":3,"file":"PayazaFormEditor.d.ts","sourceRoot":"","sources":["../../../src/editor/payaza-form/PayazaFormEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAoB/C,OAAO,EAA4B,eAAe,EAAgB,MAAM,mBAAmB,CAAC;AA0F5F,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CACjD;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAqzD5D,CAAC"}
@@ -35,8 +35,6 @@ import { isMobileEditorViewport, shouldUseInlineEditorPreview } from '../../lib/
35
35
  /** Lightweight fingerprint for undo history on mobile — avoids JSON.stringify on large configs. */
36
36
  function lightweightConfigFingerprint(config) {
37
37
  try {
38
- if (!config)
39
- return '';
40
38
  const layoutConfig = config.layoutConfig;
41
39
  const pages = layoutConfig?.pages;
42
40
  if (Array.isArray(pages)) {
@@ -1 +1 @@
1
- {"version":3,"file":"data-transformer.d.ts","sourceRoot":"","sources":["../../../src/editor/payaza-form/data-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAgC,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAmB,MAAM,uBAAuB,CAAC;AA6CrE;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,MAAM,EACd,eAAe,CAAC,EAAE,WAAW,GAC5B,WAAW,CAqHb;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EAAE,EACnB,KAAK,EAAE,GAAG,GACT,iBAAiB,CA+DnB;AAED,sHAAsH;AACtH,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAS1E;AAED,6FAA6F;AAC7F,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EAAE,GAClB,OAAO,CAKT;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EAAE,EACnB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,GAAG,GACb,iBAAiB,CA8BnB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EAAE,EACnB,OAAO,EAAE,GAAG,GACX,iBAAiB,CA8BnB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EAAE,EACnB,KAAK,EAAE,MAAM,GACZ,iBAAiB,CA8BnB"}
1
+ {"version":3,"file":"data-transformer.d.ts","sourceRoot":"","sources":["../../../src/editor/payaza-form/data-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAgC,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAmB,MAAM,uBAAuB,CAAC;AA6CrE;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,MAAM,EACd,eAAe,CAAC,EAAE,WAAW,GAC5B,WAAW,CA4Gb;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EAAE,EACnB,KAAK,EAAE,GAAG,GACT,iBAAiB,CA+DnB;AAED,sHAAsH;AACtH,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAS1E;AAED,6FAA6F;AAC7F,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EAAE,GAClB,OAAO,CAKT;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EAAE,EACnB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,GAAG,GACb,iBAAiB,CA8BnB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EAAE,EACnB,OAAO,EAAE,GAAG,GACX,iBAAiB,CA8BnB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EAAE,EACnB,KAAK,EAAE,MAAM,GACZ,iBAAiB,CA8BnB"}
@@ -44,14 +44,7 @@ function setValueByPath(obj, path, value) {
44
44
  export function transformToStoreConfig(layoutJson, pageId, baseStoreConfig) {
45
45
  const page = layoutJson.pages.find(p => p.id === pageId);
46
46
  if (!page) {
47
- console.warn(`[transformToStoreConfig] Page ${pageId} not found in layout JSON`);
48
- return (baseStoreConfig ||
49
- {
50
- layout: layoutJson.layoutId,
51
- layoutConfig: { sections: {} },
52
- branding: { primaryColor: '#000000' },
53
- navigation: { main: [], footer: [] },
54
- });
47
+ throw new Error(`Page ${pageId} not found in layout JSON`);
55
48
  }
56
49
  // If no baseStoreConfig, create a minimal one
57
50
  let storeConfig = baseStoreConfig
@@ -18,7 +18,6 @@ export function useEditorChromeMetrics({ headerRef, controlsBarRef, bottomNavRef
18
18
  return document.documentElement;
19
19
  };
20
20
  const observed = new Set();
21
- let observer;
22
21
  const observeEl = (el) => {
23
22
  if (el && !observed.has(el)) {
24
23
  observer.observe(el);
@@ -36,8 +35,8 @@ export function useEditorChromeMetrics({ headerRef, controlsBarRef, bottomNavRef
36
35
  observeEl(controlsBarRef?.current ?? null);
37
36
  observeEl(bottomNavRef?.current ?? null);
38
37
  };
39
- observer = new ResizeObserver(update);
40
38
  update();
39
+ const observer = new ResizeObserver(update);
41
40
  observeEl(header);
42
41
  window.addEventListener('orientationchange', update);
43
42
  window.addEventListener('resize', update);
@@ -4,19 +4,7 @@ export declare function usePdpVariation(product?: StoreProduct): {
4
4
  selectedAttributes: Record<string, string>;
5
5
  setAttribute: (key: string, value: string) => void;
6
6
  isOptionAvailable: (key: string, value: string) => boolean;
7
- selectedVariation: {
8
- id: string;
9
- name: string;
10
- value: string;
11
- price?: number;
12
- sku?: string;
13
- isActive?: boolean;
14
- attributes?: Record<string, string>;
15
- stock?: number;
16
- inStock?: boolean;
17
- images?: string[] | string;
18
- compareAtPrice?: number;
19
- };
7
+ selectedVariation: import("../lib/store-types.js").StoreProductVariant;
20
8
  galleryImages: string[];
21
9
  displayPrice: number;
22
10
  displayCompareAt: number;
@@ -1 +1 @@
1
- {"version":3,"file":"use-pdp-variation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-pdp-variation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AActD,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,YAAY;;;wBAW5C,MAAM,SAAS,MAAM;6BAerB,MAAM,SAAS,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;iBAwBL,OAAO;;;;;8BAKc,MAAM;6BACP,MAAM;;;;;;;;;;;;;;;;;mCA0CjB,MAAM,SAAS,MAAM;;EAIvD"}
1
+ {"version":3,"file":"use-pdp-variation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-pdp-variation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AActD,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,YAAY;;;wBAW5C,MAAM,SAAS,MAAM;6BAerB,MAAM,SAAS,MAAM;;;;;;;;;;;;;iBAwBL,OAAO;;;;;8BAKc,MAAM;6BACP,MAAM;;;;;;;;;;;;;;;;;mCA0CjB,MAAM,SAAS,MAAM;;EAIvD"}
@@ -7,19 +7,7 @@ export declare function useProductVariationSelection(variants?: StoreProductVari
7
7
  selectedSize: string;
8
8
  setSelectedColor: (value: string) => void;
9
9
  setSelectedSize: (value: string) => void;
10
- matchingVariation: {
11
- id: string;
12
- name: string;
13
- value: string;
14
- price?: number;
15
- sku?: string;
16
- isActive?: boolean;
17
- attributes?: Record<string, string>;
18
- stock?: number;
19
- inStock?: boolean;
20
- images?: string[] | string;
21
- compareAtPrice?: number;
22
- };
10
+ matchingVariation: import("../lib/store-types").StoreProductVariant;
23
11
  hasVariations: boolean;
24
12
  /** True when the shopper picked at least one option; empty → use main product. */
25
13
  hasSelectedOptions: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"use-product-variation-selection.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-variation-selection.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAEvC,wBAAgB,4BAA4B,CAAC,QAAQ,CAAC,EAAE,mBAAmB,EAAE;;;wBAYpC,MAAM,SAAS,MAAM;;;8BA8ChC,MAAM;6BACP,MAAM;;;;;;;;;;;;;;;IAG/B,kFAAkF;;;EAIrF"}
1
+ {"version":3,"file":"use-product-variation-selection.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-variation-selection.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAEvC,wBAAgB,4BAA4B,CAAC,QAAQ,CAAC,EAAE,mBAAmB,EAAE;;;wBAYpC,MAAM,SAAS,MAAM;;;8BA8ChC,MAAM;6BACP,MAAM;;;IAG/B,kFAAkF;;;EAIrF"}
package/dist/index.d.ts CHANGED
@@ -56,9 +56,11 @@ export { ElectronicsPageWrapper } from './layouts/electronics/components/Electro
56
56
  export { ElectronicsStoreHeader } from './layouts/electronics/components/ElectronicsStoreHeader';
57
57
  export { ElectronicsStoreFooter } from './layouts/electronics/components/ElectronicsStoreFooter';
58
58
  export { ElectronicsGridProductCard } from './layouts/electronics/components/ElectronicsGridProductCard';
59
+ export { ProductsPage as ElectronicsProductsPagePage } from './layouts/electronics/pages/ProductsPage';
59
60
  export { ProductsPage as ElectronicsProductsListingPage } from './layouts/electronics/pages/ProductsPage';
60
61
  export { ProductDetailPage as ElectronicsProductDetailPage } from './layouts/electronics/pages/ProductDetailPage';
61
62
  export { CategoryPage as ElectronicsCategoryPage } from './layouts/electronics/pages/CategoryPage';
63
+ export { ElectronicsCategoriesListingPage as ElectronicsCategoriesPagePage } from './layouts/electronics/pages/CategoriesPage';
62
64
  export { ElectronicsCategoriesListingPage } from './layouts/electronics/pages/CategoriesPage';
63
65
  export { AboutPage as ElectronicsAboutPage } from './layouts/electronics/pages/AboutPage';
64
66
  export { ContactPage as ElectronicsContactPage } from './layouts/electronics/pages/ContactPage';
@@ -70,9 +72,11 @@ export { ElectronicsTrackOrderPage } from './layouts/electronics/pages/TrackOrde
70
72
  export { ElectronicsGridProductCard as ElectronicsGridProductCardGrid } from './layouts/electronics-grid/components/ElectronicsGridProductCard';
71
73
  export { ElectronicsHomePageGrid } from './layouts/electronics-grid/components/ElectronicsHomePageGrid';
72
74
  export { ElectronicsGridCategoriesPage } from './layouts/electronics-grid/pages/ElectronicsGridCategoriesPage';
75
+ export { ProductsPage as ElectronicsGridProductsPage } from './layouts/electronics-grid/pages/ProductsPage';
73
76
  export { ProductsPage as ElectronicsGridProductsListingPage } from './layouts/electronics-grid/pages/ProductsPage';
74
77
  export { ProductDetailPage as ElectronicsGridProductDetailPage } from './layouts/electronics-grid/pages/ProductDetailPage';
75
78
  export { CategoryPage as ElectronicsGridCategoryPage } from './layouts/electronics-grid/pages/CategoryPage';
79
+ export { ElectronicsGridCategoriesListingPage as ElectronicsGridCategoriesPagePage } from './layouts/electronics-grid/pages/CategoriesPage';
76
80
  export { ElectronicsGridCategoriesListingPage } from './layouts/electronics-grid/pages/CategoriesPage';
77
81
  export { AboutPage as ElectronicsGridAboutPage } from './layouts/electronics-grid/pages/AboutPage';
78
82
  export { ContactPage as ElectronicsGridContactPage } from './layouts/electronics-grid/pages/ContactPage';
@@ -85,7 +89,9 @@ export { MotivationalHomePage } from './layouts/motivational-speaker/components/
85
89
  export { MotivationalSpeakerPageWrapper as MotivationalPageWrapper } from './layouts/motivational-speaker/components/MotivationalSpeakerPageWrapper';
86
90
  export { ProductsPage as MotivationalProductsPage } from './layouts/motivational-speaker/pages/ProductsPage';
87
91
  export { ServiceDetailPage as MotivationalServiceDetailPage } from './layouts/motivational-speaker/pages/ServiceDetailPage';
92
+ export { ServiceDetailPage } from './layouts/motivational-speaker/pages/ServiceDetailPage';
88
93
  export { ServicesPage as MotivationalServicesPage } from './layouts/motivational-speaker/pages/ServicesPage';
94
+ export { MotivationalSubscriptionPage as SubscriptionPage } from './layouts/motivational-speaker/pages/SubscriptionPage';
89
95
  export { MotivationalSubscriptionPage } from './layouts/motivational-speaker/pages/SubscriptionPage';
90
96
  export { CategoryPage as MotivationalCategoryPage } from './layouts/motivational-speaker/pages/CategoryPage';
91
97
  export { AboutPage as MotivationalAboutPage } from './layouts/motivational-speaker/pages/AboutPage';
@@ -125,6 +131,8 @@ export { StoreProvider, useStore, StoreContext } from './lib/store-context';
125
131
  export { LoadingProvider, useLoading, LoadingContext } from './lib/loading-context';
126
132
  export { AuthProvider, useAuth, AuthContext } from './lib/auth-context';
127
133
  export { setAccessToken, getAccessToken } from './lib/api';
134
+ export { resolveCartChargeCurrency } from './lib/cart-charge-currency';
135
+ export type { CartChargeCurrencyLine, CartChargeCurrencyResult } from './lib/cart-charge-currency';
128
136
  export * from './lib/rich-html';
129
137
  export { SafeRichHtml } from './components/rich-text/SafeRichHtml';
130
138
  export { CategoryDescription } from './components/rich-text/CategoryDescription';
@@ -139,9 +147,5 @@ export * from './lib/alignment-schemas';
139
147
  export { LayoutPreview } from './preview';
140
148
  export { ShadowDOMWrapper } from './preview/ShadowDOMWrapper';
141
149
  export { PreviewRouter } from './preview/PreviewRouter';
142
- export { PreviewCanvasEnhancer } from './preview/canvas/PreviewCanvasEnhancer';
143
- export { PREVIEW_MSG } from './preview/canvas/preview-messages';
144
- export { previewRouteToPageId } from './preview/canvas/preview-route';
145
- export { normalizeEditorLayoutId } from './editor/document/layout-id';
146
150
  export { getFoodPreviewData, getClothingPreviewData, getBookingPreviewData, getFoodModernPreviewData, getClothingMinimalPreviewData, getBookingAgendaPreviewData, getElectronicsGridPreviewData, getElectronicsPreviewData, getMotivationalSpeakerPreviewData, getPreviewDataByLayout, getLayoutIdByStoreSlug, } from './lib/preview-data';
147
151
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AACpG,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAGlF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AACzF,OAAO,EAAE,YAAY,IAAI,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EAAE,iBAAiB,IAAI,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AACjH,OAAO,EAAE,YAAY,IAAI,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EAAE,wBAAwB,E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Z,aAAa,EACb,aAAa,EACb,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAGpE,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,eAAe,EACf,6BAA6B,GAC9B,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,+BAA+B,EAC/B,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,4BAA4B,CAAC;AAGpC,cAAc,yBAAyB,CAAC;AAGxC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,yBAAyB,EACzB,iCAAiC,EACjC,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -63,9 +63,11 @@ export { ElectronicsPageWrapper } from './layouts/electronics/components/Electro
63
63
  export { ElectronicsStoreHeader } from './layouts/electronics/components/ElectronicsStoreHeader';
64
64
  export { ElectronicsStoreFooter } from './layouts/electronics/components/ElectronicsStoreFooter';
65
65
  export { ElectronicsGridProductCard } from './layouts/electronics/components/ElectronicsGridProductCard';
66
+ export { ProductsPage as ElectronicsProductsPagePage } from './layouts/electronics/pages/ProductsPage';
66
67
  export { ProductsPage as ElectronicsProductsListingPage } from './layouts/electronics/pages/ProductsPage';
67
68
  export { ProductDetailPage as ElectronicsProductDetailPage } from './layouts/electronics/pages/ProductDetailPage';
68
69
  export { CategoryPage as ElectronicsCategoryPage } from './layouts/electronics/pages/CategoryPage';
70
+ export { ElectronicsCategoriesListingPage as ElectronicsCategoriesPagePage } from './layouts/electronics/pages/CategoriesPage';
69
71
  export { ElectronicsCategoriesListingPage } from './layouts/electronics/pages/CategoriesPage';
70
72
  export { AboutPage as ElectronicsAboutPage } from './layouts/electronics/pages/AboutPage';
71
73
  export { ContactPage as ElectronicsContactPage } from './layouts/electronics/pages/ContactPage';
@@ -78,9 +80,11 @@ export { ElectronicsTrackOrderPage } from './layouts/electronics/pages/TrackOrde
78
80
  export { ElectronicsGridProductCard as ElectronicsGridProductCardGrid } from './layouts/electronics-grid/components/ElectronicsGridProductCard';
79
81
  export { ElectronicsHomePageGrid } from './layouts/electronics-grid/components/ElectronicsHomePageGrid';
80
82
  export { ElectronicsGridCategoriesPage } from './layouts/electronics-grid/pages/ElectronicsGridCategoriesPage';
83
+ export { ProductsPage as ElectronicsGridProductsPage } from './layouts/electronics-grid/pages/ProductsPage';
81
84
  export { ProductsPage as ElectronicsGridProductsListingPage } from './layouts/electronics-grid/pages/ProductsPage';
82
85
  export { ProductDetailPage as ElectronicsGridProductDetailPage } from './layouts/electronics-grid/pages/ProductDetailPage';
83
86
  export { CategoryPage as ElectronicsGridCategoryPage } from './layouts/electronics-grid/pages/CategoryPage';
87
+ export { ElectronicsGridCategoriesListingPage as ElectronicsGridCategoriesPagePage } from './layouts/electronics-grid/pages/CategoriesPage';
84
88
  export { ElectronicsGridCategoriesListingPage } from './layouts/electronics-grid/pages/CategoriesPage';
85
89
  export { AboutPage as ElectronicsGridAboutPage } from './layouts/electronics-grid/pages/AboutPage';
86
90
  export { ContactPage as ElectronicsGridContactPage } from './layouts/electronics-grid/pages/ContactPage';
@@ -94,7 +98,9 @@ export { MotivationalHomePage } from './layouts/motivational-speaker/components/
94
98
  export { MotivationalSpeakerPageWrapper as MotivationalPageWrapper } from './layouts/motivational-speaker/components/MotivationalSpeakerPageWrapper';
95
99
  export { ProductsPage as MotivationalProductsPage } from './layouts/motivational-speaker/pages/ProductsPage';
96
100
  export { ServiceDetailPage as MotivationalServiceDetailPage } from './layouts/motivational-speaker/pages/ServiceDetailPage';
101
+ export { ServiceDetailPage } from './layouts/motivational-speaker/pages/ServiceDetailPage';
97
102
  export { ServicesPage as MotivationalServicesPage } from './layouts/motivational-speaker/pages/ServicesPage';
103
+ export { MotivationalSubscriptionPage as SubscriptionPage } from './layouts/motivational-speaker/pages/SubscriptionPage';
98
104
  export { MotivationalSubscriptionPage } from './layouts/motivational-speaker/pages/SubscriptionPage';
99
105
  export { CategoryPage as MotivationalCategoryPage } from './layouts/motivational-speaker/pages/CategoryPage';
100
106
  export { AboutPage as MotivationalAboutPage } from './layouts/motivational-speaker/pages/AboutPage';
@@ -138,6 +144,7 @@ export { StoreProvider, useStore, StoreContext } from './lib/store-context';
138
144
  export { LoadingProvider, useLoading, LoadingContext } from './lib/loading-context';
139
145
  export { AuthProvider, useAuth, AuthContext } from './lib/auth-context';
140
146
  export { setAccessToken, getAccessToken } from './lib/api';
147
+ export { resolveCartChargeCurrency } from './lib/cart-charge-currency';
141
148
  export * from './lib/rich-html';
142
149
  export { SafeRichHtml } from './components/rich-text/SafeRichHtml';
143
150
  export { CategoryDescription } from './components/rich-text/CategoryDescription';
@@ -154,8 +161,4 @@ export * from './lib/alignment-schemas';
154
161
  export { LayoutPreview } from './preview';
155
162
  export { ShadowDOMWrapper } from './preview/ShadowDOMWrapper';
156
163
  export { PreviewRouter } from './preview/PreviewRouter';
157
- export { PreviewCanvasEnhancer } from './preview/canvas/PreviewCanvasEnhancer';
158
- export { PREVIEW_MSG } from './preview/canvas/preview-messages';
159
- export { previewRouteToPageId } from './preview/canvas/preview-route';
160
- export { normalizeEditorLayoutId } from './editor/document/layout-id';
161
164
  export { getFoodPreviewData, getClothingPreviewData, getBookingPreviewData, getFoodModernPreviewData, getClothingMinimalPreviewData, getBookingAgendaPreviewData, getElectronicsGridPreviewData, getElectronicsPreviewData, getMotivationalSpeakerPreviewData, getPreviewDataByLayout, getLayoutIdByStoreSlug, } from './lib/preview-data';
@@ -1 +1 @@
1
- {"version":3,"file":"ProductDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/booking/pages/ProductDetailPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAA8C,MAAM,mBAAmB,CAAC;AAiC5F,UAAU,sBAAsB;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAsHD,wBAAgB,iBAAiB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,EAAE,sBAAsB,+BA44BpG"}
1
+ {"version":3,"file":"ProductDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/booking/pages/ProductDetailPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAA8C,MAAM,mBAAmB,CAAC;AAiC5F,UAAU,sBAAsB;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAsHD,wBAAgB,iBAAiB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,EAAE,sBAAsB,+BAw4BpG"}
@@ -57,6 +57,7 @@ function ReviewCard({ review }) {
57
57
  export function ProductDetailPage({ storeConfig: initialConfig, productSlug }) {
58
58
  const { store, addToCart, isCartLoading, toggleWishlist, isInWishlist, isWishlistLoading, setBuyNowItem } = useStore();
59
59
  const storeConfig = store || initialConfig;
60
+ const productDetailConfig = storeConfig.layoutConfig?.pages?.productDetail;
60
61
  const products = filterActiveProducts(storeConfig.products || []);
61
62
  const initialProduct = resolvePdpProduct(initialConfig.products, storeConfig.products, productSlug, isEditorPreviewMode(storeConfig));
62
63
  const { product, relatedProducts: apiRelatedProducts, isLoading: isLoadingProduct } = useProductBySlug(storeConfig.id, productSlug, initialProduct);
@@ -402,7 +403,7 @@ export function ProductDetailPage({ storeConfig: initialConfig, productSlug }) {
402
403
  ? 'border-gray-900 ring-2 ring-gray-900 ring-offset-2'
403
404
  : 'border-gray-200 hover:border-gray-300'}`, children: _jsx(ImageWithFallback, { src: image, alt: `${product.name} view ${index + 1}`, className: cn("w-full h-full object-cover", isOutOfStock && "grayscale"), skeletonAspectRatio: "square" }) }, index))), hasMoreImages && (_jsxs("div", { className: "aspect-square rounded-lg border-2 border-gray-200 bg-gray-50 flex items-center justify-center text-xs text-gray-500 font-medium", children: ["+", productImages.length - 5, " more"] }))] }))] }), _jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center justify-between mb-2", children: [_jsx("span", { className: "text-sm font-semibold text-gray-700 uppercase tracking-wide", children: directCategory?.name || storeConfig.name }), _jsx("button", { onClick: handleShare, className: "text-gray-400 hover:text-gray-900 transition-colors p-2 rounded-full hover:bg-gray-100", title: "Share this product", children: _jsx(Share2, { className: "h-5 w-5" }) })] }), _jsx("h1", { "data-product-name": true, className: "text-3xl sm:text-4xl lg:text-5xl font-bold text-gray-900 mb-3 leading-tight tracking-tight", children: product.name }), _jsxs("p", { className: "text-sm text-gray-500 mb-6 font-mono", children: ["SKU: ", displaySKU] }), _jsx("div", { className: "mb-4 flex items-center gap-2", children: !isOutOfStock ? (_jsxs("span", { className: "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800", children: [_jsx(CheckCircle, { className: "w-3 h-3 mr-1" }), "In Stock"] })) : (_jsxs("span", { className: "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800", children: [_jsx(Info, { className: "w-3 h-3 mr-1" }), "Out of Stock"] })) }), _jsxs("div", { className: "mb-8", children: [_jsxs("div", { className: "flex items-baseline gap-4", children: [_jsx("span", { "data-product-price": true, className: "text-4xl lg:text-5xl font-bold text-gray-900", children: formatCurrency(displayPrice, product.currency || 'USD') }), displayCompareAt != null && displayCompareAt > displayPrice && (_jsx("span", { className: "text-2xl text-gray-500 line-through", children: formatCurrency(displayCompareAt, product.currency || 'USD') }))] }), displayCompareAt != null && displayCompareAt > displayPrice && (_jsxs("span", { className: "inline-block mt-2 bg-red-100 text-red-700 text-xs font-bold px-2 py-1 rounded", children: ["SAVE ", Math.round(((displayCompareAt - displayPrice) / displayCompareAt) * 100), "%"] }))] }), _jsx(PdpVariationSelectors, { optionGroups: optionGroups, selectedAttributes: selectedAttributes, setAttribute: setAttribute, isOptionAvailable: isOptionAvailable, getOptionImage: getOptionImage, storeSlug: storeConfig.slug, showSizeGuide: productDetailConfig?.showSizeGuide !== false, onAfterClearAttribute: () => setQuantity(1) }), _jsxs("div", { className: "flex flex-col gap-4 mb-8", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("span", { className: "text-sm font-semibold text-gray-900", children: "Quantity" }), _jsxs("div", { className: "flex items-center border border-gray-300 rounded-lg", children: [_jsx("button", { className: "p-3 text-gray-600 hover:bg-gray-100 rounded-l-lg disabled:opacity-50", onClick: () => setQuantity(Math.max(1, quantity - 1)), disabled: quantity <= 1, children: _jsx(Minus, { className: "h-4 w-4" }) }), _jsx("span", { className: "w-12 text-center font-semibold text-gray-900", children: quantity }), _jsx("button", { className: "p-3 text-gray-600 hover:bg-gray-100 rounded-r-lg", onClick: () => setQuantity(quantity + 1), children: _jsx(Plus, { className: "h-4 w-4" }) })] })] }), _jsxs("div", { className: "flex flex-row items-stretch gap-2 sm:gap-3 mt-2 w-full", children: [_jsx(Button, { "data-add-to-cart": true, variant: "outline", size: "lg", onClick: handleAddToCart, disabled: isCartLoading || isOutOfStock, className: "flex-1 min-w-0 bg-white border-2 border-gray-900 text-gray-900 hover:bg-gray-50 rounded-full h-12 sm:h-14 px-3 sm:px-6 text-sm sm:text-base font-bold [&_svg]:text-gray-900 shadow-sm transition-all disabled:opacity-50 disabled:cursor-not-allowed", children: isCartLoading ? (_jsxs(_Fragment, { children: [_jsx(ButtonLoader, { className: "mr-1.5 sm:mr-2" }), "Adding..."] })) : (_jsxs(_Fragment, { children: [_jsx(ShoppingCart, { className: "h-4 w-4 sm:h-5 sm:w-5 mr-1.5 sm:mr-2 shrink-0 text-gray-900" }), "Add to Cart"] })) }), _jsx(Button, { size: "lg", onClick: handleBuyNow, disabled: isOutOfStock || isBuyNowLoading || isCartLoading, className: "flex-1 min-w-0 bg-gray-900 hover:bg-gray-800 text-white rounded-full h-12 sm:h-14 px-3 sm:px-6 text-sm sm:text-base font-bold shadow-lg hover:shadow-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed", children: isBuyNowLoading || isCartLoading ? (_jsxs(_Fragment, { children: [_jsx(ButtonLoader, { className: "mr-1.5 sm:mr-2" }), "Adding..."] })) : ('Buy Now') }), storeConfig.features.wishlist && (_jsx(Button, { variant: "outline", size: "lg", onClick: handleWishlistClick, disabled: isWishlistLoading || !product, className: cn("h-12 w-12 sm:h-14 sm:w-14 shrink-0 rounded-full border-2 transition-all disabled:opacity-50 disabled:cursor-not-allowed", product && isInWishlist(product.id)
404
405
  ? "border-red-500 bg-red-50 text-red-500 hover:bg-red-100"
405
- : "border-gray-200 hover:border-gray-300 hover:bg-gray-50"), children: isWishlistLoading ? (_jsx(ButtonLoader, { className: "h-5 w-5" })) : (_jsx(Heart, { className: cn("h-5 w-5", product && isInWishlist(product.id) && "fill-current") })) }))] })] }), _jsx(ProductDeliveryInfoSection, { storeConfig: storeConfig, currency: storeConfig.settings?.currency || 'USD', productCurrency: product.currency, productPrice: displayPrice, quantity: quantity, shippingAddress: shippingAddress, updateShippingAddress: (patch) => setShippingAddress((prev) => ({ ...prev, ...patch })), shippingMethods: shippingMethods, isCalculatingShipping: isCalculatingShipping, shippingError: shippingError, freeShippingEligible: freeShippingEligible, freeShippingThreshold: freeShippingThreshold, onToast: addToast }), product.description && (_jsxs("div", { className: "mb-8", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-3", children: "Description" }), _jsxs("div", { className: "prose prose-sm max-w-none text-gray-600 leading-relaxed", children: [_jsx(SafeRichHtml, { value: product.description, fallbackPlain: "", as: "div" }), _jsxs("ul", { className: "list-disc pl-5 space-y-1 mt-2", children: [_jsx("li", { children: "Premium quality material" }), _jsx("li", { children: "Comfortable fit for all-day wear" }), _jsx("li", { children: "Durable stitching and finish" })] })] })] })), product.specifications && Object.keys(product.specifications).length > 0 && (_jsxs("div", { className: "mb-8", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-4", children: "Specifications" }), _jsx("dl", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-4", children: Object.entries(product.specifications).map(([key, value]) => (_jsxs("div", { className: "flex flex-col p-3 bg-gray-50 rounded-lg", children: [_jsx("dt", { className: "text-xs text-gray-500 font-medium uppercase tracking-wider mb-1", children: key }), _jsx("dd", { className: "text-sm font-bold text-gray-900", children: value })] }, key))) })] }))] })] }), _jsx("div", { className: "mt-20 pt-16 border-t border-gray-200", children: _jsxs("div", { className: "max-w-4xl", children: [_jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-6 mb-10", children: [_jsxs("div", { className: "flex-1", children: [_jsx("h2", { className: "text-2xl lg:text-3xl font-bold text-gray-900 mb-4", children: "Customer Reviews" }), reviewCount > 0 && averageRating > 0 && (_jsxs("div", { className: "flex items-center gap-4", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(StarRating, { rating: averageRating, size: "lg" }), _jsx("span", { className: "text-2xl font-bold text-gray-900", children: averageRating.toFixed(1) }), _jsx("span", { className: "text-lg text-gray-500", children: "out of 5" })] }), _jsx("span", { className: "text-gray-300", children: "|" }), _jsxs("span", { className: "text-lg text-gray-600", children: [reviewCount, " ", reviewCount === 1 ? 'review' : 'reviews'] })] }))] }), reviewCount > 0 && (_jsx(Button, { onClick: () => {
406
+ : "border-gray-200 hover:border-gray-300 hover:bg-gray-50"), children: isWishlistLoading ? (_jsx(ButtonLoader, { className: "h-5 w-5" })) : (_jsx(Heart, { className: cn("h-5 w-5", product && isInWishlist(product.id) && "fill-current") })) }))] })] }), _jsx(ProductDeliveryInfoSection, { storeConfig: storeConfig, currency: storeConfig.settings?.currency || 'USD', productCurrency: product.currency, productPrice: displayPrice, quantity: quantity, shippingAddress: shippingAddress, updateShippingAddress: (patch) => setShippingAddress((prev) => ({ ...prev, ...patch })), shippingMethods: shippingMethods, isCalculatingShipping: isCalculatingShipping, shippingError: shippingError, freeShippingEligible: freeShippingEligible, freeShippingThreshold: freeShippingThreshold, onToast: addToast }), product.description && (_jsxs("div", { className: "mb-8", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-3", children: "Description" }), _jsx("div", { className: "prose prose-sm max-w-none text-gray-600 leading-relaxed", children: _jsx(SafeRichHtml, { value: product.description, fallbackPlain: "", as: "div" }) })] })), product.specifications && Object.keys(product.specifications).length > 0 && (_jsxs("div", { className: "mb-8", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-4", children: "Specifications" }), _jsx("dl", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-4", children: Object.entries(product.specifications).map(([key, value]) => (_jsxs("div", { className: "flex flex-col p-3 bg-gray-50 rounded-lg", children: [_jsx("dt", { className: "text-xs text-gray-500 font-medium uppercase tracking-wider mb-1", children: key }), _jsx("dd", { className: "text-sm font-bold text-gray-900", children: value })] }, key))) })] }))] })] }), _jsx("div", { className: "mt-20 pt-16 border-t border-gray-200", children: _jsxs("div", { className: "max-w-4xl", children: [_jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-6 mb-10", children: [_jsxs("div", { className: "flex-1", children: [_jsx("h2", { className: "text-2xl lg:text-3xl font-bold text-gray-900 mb-4", children: "Customer Reviews" }), reviewCount > 0 && averageRating > 0 && (_jsxs("div", { className: "flex items-center gap-4", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(StarRating, { rating: averageRating, size: "lg" }), _jsx("span", { className: "text-2xl font-bold text-gray-900", children: averageRating.toFixed(1) }), _jsx("span", { className: "text-lg text-gray-500", children: "out of 5" })] }), _jsx("span", { className: "text-gray-300", children: "|" }), _jsxs("span", { className: "text-lg text-gray-600", children: [reviewCount, " ", reviewCount === 1 ? 'review' : 'reviews'] })] }))] }), reviewCount > 0 && (_jsx(Button, { onClick: () => {
406
407
  if (!isAuthenticated) {
407
408
  openLogin({ onSuccess: () => setIsReviewModalOpen(true) });
408
409
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"ProductDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/booking-agenda/pages/ProductDetailPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAA8C,MAAM,mBAAmB,CAAC;AAiC5F,UAAU,sBAAsB;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAsHD,wBAAgB,iBAAiB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,EAAE,sBAAsB,+BA44BpG"}
1
+ {"version":3,"file":"ProductDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/booking-agenda/pages/ProductDetailPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAA8C,MAAM,mBAAmB,CAAC;AAiC5F,UAAU,sBAAsB;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAsHD,wBAAgB,iBAAiB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,EAAE,sBAAsB,+BAw4BpG"}
@@ -57,6 +57,7 @@ function ReviewCard({ review }) {
57
57
  export function ProductDetailPage({ storeConfig: initialConfig, productSlug }) {
58
58
  const { store, addToCart, isCartLoading, toggleWishlist, isInWishlist, isWishlistLoading, setBuyNowItem } = useStore();
59
59
  const storeConfig = store || initialConfig;
60
+ const productDetailConfig = storeConfig.layoutConfig?.pages?.productDetail;
60
61
  const products = filterActiveProducts(storeConfig.products || []);
61
62
  const initialProduct = resolvePdpProduct(initialConfig.products, storeConfig.products, productSlug, isEditorPreviewMode(storeConfig));
62
63
  const { product, relatedProducts: apiRelatedProducts, isLoading: isLoadingProduct } = useProductBySlug(storeConfig.id, productSlug, initialProduct);
@@ -402,7 +403,7 @@ export function ProductDetailPage({ storeConfig: initialConfig, productSlug }) {
402
403
  ? 'border-gray-900 ring-2 ring-gray-900 ring-offset-2'
403
404
  : 'border-gray-200 hover:border-gray-300'}`, children: _jsx(ImageWithFallback, { src: image, alt: `${product.name} view ${index + 1}`, className: cn("w-full h-full object-cover", isOutOfStock && "grayscale"), skeletonAspectRatio: "square" }) }, index))), hasMoreImages && (_jsxs("div", { className: "aspect-square rounded-lg border-2 border-gray-200 bg-gray-50 flex items-center justify-center text-xs text-gray-500 font-medium", children: ["+", productImages.length - 5, " more"] }))] }))] }), _jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center justify-between mb-2", children: [_jsx("span", { className: "text-sm font-semibold text-gray-700 uppercase tracking-wide", children: directCategory?.name || storeConfig.name }), _jsx("button", { onClick: handleShare, className: "text-gray-400 hover:text-gray-900 transition-colors p-2 rounded-full hover:bg-gray-100", title: "Share this product", children: _jsx(Share2, { className: "h-5 w-5" }) })] }), _jsx("h1", { "data-product-name": true, className: "text-3xl sm:text-4xl lg:text-5xl font-bold text-gray-900 mb-3 leading-tight tracking-tight", children: product.name }), _jsxs("p", { className: "text-sm text-gray-500 mb-6 font-mono", children: ["SKU: ", displaySKU] }), _jsx("div", { className: "mb-4 flex items-center gap-2", children: !isOutOfStock ? (_jsxs("span", { className: "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800", children: [_jsx(CheckCircle, { className: "w-3 h-3 mr-1" }), "In Stock"] })) : (_jsxs("span", { className: "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800", children: [_jsx(Info, { className: "w-3 h-3 mr-1" }), "Out of Stock"] })) }), _jsxs("div", { className: "mb-8", children: [_jsxs("div", { className: "flex items-baseline gap-4", children: [_jsx("span", { "data-product-price": true, className: "text-4xl lg:text-5xl font-bold text-gray-900", children: formatCurrency(displayPrice, product.currency || 'USD') }), displayCompareAt != null && displayCompareAt > displayPrice && (_jsx("span", { className: "text-2xl text-gray-500 line-through", children: formatCurrency(displayCompareAt, product.currency || 'USD') }))] }), displayCompareAt != null && displayCompareAt > displayPrice && (_jsxs("span", { className: "inline-block mt-2 bg-red-100 text-red-700 text-xs font-bold px-2 py-1 rounded", children: ["SAVE ", Math.round(((displayCompareAt - displayPrice) / displayCompareAt) * 100), "%"] }))] }), _jsx(PdpVariationSelectors, { optionGroups: optionGroups, selectedAttributes: selectedAttributes, setAttribute: setAttribute, isOptionAvailable: isOptionAvailable, getOptionImage: getOptionImage, storeSlug: storeConfig.slug, showSizeGuide: productDetailConfig?.showSizeGuide !== false, onAfterClearAttribute: () => setQuantity(1) }), _jsxs("div", { className: "flex flex-col gap-4 mb-8", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("span", { className: "text-sm font-semibold text-gray-900", children: "Quantity" }), _jsxs("div", { className: "flex items-center border border-gray-300 rounded-lg", children: [_jsx("button", { className: "p-3 text-gray-600 hover:bg-gray-100 rounded-l-lg disabled:opacity-50", onClick: () => setQuantity(Math.max(1, quantity - 1)), disabled: quantity <= 1, children: _jsx(Minus, { className: "h-4 w-4" }) }), _jsx("span", { className: "w-12 text-center font-semibold text-gray-900", children: quantity }), _jsx("button", { className: "p-3 text-gray-600 hover:bg-gray-100 rounded-r-lg", onClick: () => setQuantity(quantity + 1), children: _jsx(Plus, { className: "h-4 w-4" }) })] })] }), _jsxs("div", { className: "flex flex-row items-stretch gap-2 sm:gap-3 mt-2 w-full", children: [_jsx(Button, { "data-add-to-cart": true, variant: "outline", size: "lg", onClick: handleAddToCart, disabled: isCartLoading || isOutOfStock, className: "flex-1 min-w-0 bg-white border-2 border-gray-900 text-gray-900 hover:bg-gray-50 rounded-full h-12 sm:h-14 px-3 sm:px-6 text-sm sm:text-base font-bold [&_svg]:text-gray-900 shadow-sm transition-all disabled:opacity-50 disabled:cursor-not-allowed", children: isCartLoading ? (_jsxs(_Fragment, { children: [_jsx(ButtonLoader, { className: "mr-1.5 sm:mr-2" }), "Adding..."] })) : (_jsxs(_Fragment, { children: [_jsx(ShoppingCart, { className: "h-4 w-4 sm:h-5 sm:w-5 mr-1.5 sm:mr-2 shrink-0 text-gray-900" }), "Add to Cart"] })) }), _jsx(Button, { size: "lg", onClick: handleBuyNow, disabled: isOutOfStock || isBuyNowLoading || isCartLoading, className: "flex-1 min-w-0 bg-gray-900 hover:bg-gray-800 text-white rounded-full h-12 sm:h-14 px-3 sm:px-6 text-sm sm:text-base font-bold shadow-lg hover:shadow-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed", children: isBuyNowLoading || isCartLoading ? (_jsxs(_Fragment, { children: [_jsx(ButtonLoader, { className: "mr-1.5 sm:mr-2" }), "Adding..."] })) : ('Buy Now') }), storeConfig.features.wishlist && (_jsx(Button, { variant: "outline", size: "lg", onClick: handleWishlistClick, disabled: isWishlistLoading || !product, className: cn("h-12 w-12 sm:h-14 sm:w-14 shrink-0 rounded-full border-2 transition-all disabled:opacity-50 disabled:cursor-not-allowed", product && isInWishlist(product.id)
404
405
  ? "border-red-500 bg-red-50 text-red-500 hover:bg-red-100"
405
- : "border-gray-200 hover:border-gray-300 hover:bg-gray-50"), children: isWishlistLoading ? (_jsx(ButtonLoader, { className: "h-5 w-5" })) : (_jsx(Heart, { className: cn("h-5 w-5", product && isInWishlist(product.id) && "fill-current") })) }))] })] }), _jsx(ProductDeliveryInfoSection, { storeConfig: storeConfig, currency: storeConfig.settings?.currency || 'USD', productCurrency: product.currency, productPrice: displayPrice, quantity: quantity, shippingAddress: shippingAddress, updateShippingAddress: (patch) => setShippingAddress((prev) => ({ ...prev, ...patch })), shippingMethods: shippingMethods, isCalculatingShipping: isCalculatingShipping, shippingError: shippingError, freeShippingEligible: freeShippingEligible, freeShippingThreshold: freeShippingThreshold, onToast: addToast }), product.description && (_jsxs("div", { className: "mb-8", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-3", children: "Description" }), _jsxs("div", { className: "prose prose-sm max-w-none text-gray-600 leading-relaxed", children: [_jsx(SafeRichHtml, { value: product.description, fallbackPlain: "", as: "div" }), _jsxs("ul", { className: "list-disc pl-5 space-y-1 mt-2", children: [_jsx("li", { children: "Premium quality material" }), _jsx("li", { children: "Comfortable fit for all-day wear" }), _jsx("li", { children: "Durable stitching and finish" })] })] })] })), product.specifications && Object.keys(product.specifications).length > 0 && (_jsxs("div", { className: "mb-8", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-4", children: "Specifications" }), _jsx("dl", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-4", children: Object.entries(product.specifications).map(([key, value]) => (_jsxs("div", { className: "flex flex-col p-3 bg-gray-50 rounded-lg", children: [_jsx("dt", { className: "text-xs text-gray-500 font-medium uppercase tracking-wider mb-1", children: key }), _jsx("dd", { className: "text-sm font-bold text-gray-900", children: value })] }, key))) })] }))] })] }), _jsx("div", { className: "mt-20 pt-16 border-t border-gray-200", children: _jsxs("div", { className: "max-w-4xl", children: [_jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-6 mb-10", children: [_jsxs("div", { className: "flex-1", children: [_jsx("h2", { className: "text-2xl lg:text-3xl font-bold text-gray-900 mb-4", children: "Customer Reviews" }), reviewCount > 0 && averageRating > 0 && (_jsxs("div", { className: "flex items-center gap-4", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(StarRating, { rating: averageRating, size: "lg" }), _jsx("span", { className: "text-2xl font-bold text-gray-900", children: averageRating.toFixed(1) }), _jsx("span", { className: "text-lg text-gray-500", children: "out of 5" })] }), _jsx("span", { className: "text-gray-300", children: "|" }), _jsxs("span", { className: "text-lg text-gray-600", children: [reviewCount, " ", reviewCount === 1 ? 'review' : 'reviews'] })] }))] }), reviewCount > 0 && (_jsx(Button, { onClick: () => {
406
+ : "border-gray-200 hover:border-gray-300 hover:bg-gray-50"), children: isWishlistLoading ? (_jsx(ButtonLoader, { className: "h-5 w-5" })) : (_jsx(Heart, { className: cn("h-5 w-5", product && isInWishlist(product.id) && "fill-current") })) }))] })] }), _jsx(ProductDeliveryInfoSection, { storeConfig: storeConfig, currency: storeConfig.settings?.currency || 'USD', productCurrency: product.currency, productPrice: displayPrice, quantity: quantity, shippingAddress: shippingAddress, updateShippingAddress: (patch) => setShippingAddress((prev) => ({ ...prev, ...patch })), shippingMethods: shippingMethods, isCalculatingShipping: isCalculatingShipping, shippingError: shippingError, freeShippingEligible: freeShippingEligible, freeShippingThreshold: freeShippingThreshold, onToast: addToast }), product.description && (_jsxs("div", { className: "mb-8", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-3", children: "Description" }), _jsx("div", { className: "prose prose-sm max-w-none text-gray-600 leading-relaxed", children: _jsx(SafeRichHtml, { value: product.description, fallbackPlain: "", as: "div" }) })] })), product.specifications && Object.keys(product.specifications).length > 0 && (_jsxs("div", { className: "mb-8", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-4", children: "Specifications" }), _jsx("dl", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-4", children: Object.entries(product.specifications).map(([key, value]) => (_jsxs("div", { className: "flex flex-col p-3 bg-gray-50 rounded-lg", children: [_jsx("dt", { className: "text-xs text-gray-500 font-medium uppercase tracking-wider mb-1", children: key }), _jsx("dd", { className: "text-sm font-bold text-gray-900", children: value })] }, key))) })] }))] })] }), _jsx("div", { className: "mt-20 pt-16 border-t border-gray-200", children: _jsxs("div", { className: "max-w-4xl", children: [_jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-6 mb-10", children: [_jsxs("div", { className: "flex-1", children: [_jsx("h2", { className: "text-2xl lg:text-3xl font-bold text-gray-900 mb-4", children: "Customer Reviews" }), reviewCount > 0 && averageRating > 0 && (_jsxs("div", { className: "flex items-center gap-4", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(StarRating, { rating: averageRating, size: "lg" }), _jsx("span", { className: "text-2xl font-bold text-gray-900", children: averageRating.toFixed(1) }), _jsx("span", { className: "text-lg text-gray-500", children: "out of 5" })] }), _jsx("span", { className: "text-gray-300", children: "|" }), _jsxs("span", { className: "text-lg text-gray-600", children: [reviewCount, " ", reviewCount === 1 ? 'review' : 'reviews'] })] }))] }), reviewCount > 0 && (_jsx(Button, { onClick: () => {
406
407
  if (!isAuthenticated) {
407
408
  openLogin({ onSuccess: () => setIsReviewModalOpen(true) });
408
409
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"ClothingHomePage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing/components/ClothingHomePage.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAmBvD,UAAU,qBAAqB;IAC7B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAaD,wBAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,qBAAqB,+BAqyBrF"}
1
+ {"version":3,"file":"ClothingHomePage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing/components/ClothingHomePage.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAoBvD,UAAU,qBAAqB;IAC7B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAaD,wBAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,qBAAqB,+BA8yBrF"}
@@ -14,9 +14,8 @@ import { getLayoutText, getBannerImage } from '../../../lib/utils/asset-helpers'
14
14
  import { toStoreHref } from '../../../lib/utils/url-helpers';
15
15
  import { shouldUseAPI } from '../../../lib/utils/demo-detection';
16
16
  import { useStore } from '../../../lib/store-context';
17
- import { DynamicIcon } from '../../../components/ui/dynamic-icon';
18
17
  import { SafeRichHtml } from '../../../components/rich-text/SafeRichHtml';
19
- import { RichTextExcerpt } from '../../../components/rich-text/RichTextExcerpt';
18
+ import { useClothingPayaza } from '../payaza-bindings';
20
19
  export function ClothingHomePage({ storeConfig: initialConfig }) {
21
20
  // Use the store from context which is updated in real-time by the editor
22
21
  const { store, addToCart, toggleWishlist, isInWishlist, isWishlistLoading } = useStore();
@@ -25,6 +24,7 @@ export function ClothingHomePage({ storeConfig: initialConfig }) {
25
24
  const storeConfig = store || initialConfig;
26
25
  const layoutConfig = storeConfig.layoutConfig;
27
26
  const categories = storeConfig.categories || [];
27
+ const { section, image } = useClothingPayaza(storeConfig, 'home');
28
28
  // In preview mode, use mock products if none are available
29
29
  const isPreview = (typeof window !== 'undefined' && window.__IS_PREVIEW__) || storeConfig.layoutConfig?.isPreview;
30
30
  // Randomly select max 2 categories on every page load
@@ -230,7 +230,9 @@ export function ClothingHomePage({ storeConfig: initialConfig }) {
230
230
  const getCategoryGridClass = () => {
231
231
  return 'grid-cols-1 md:grid-cols-2';
232
232
  };
233
- return (_jsxs("div", { className: "min-h-screen bg-white", children: [(layoutConfig?.sections?.hero?.show !== false || layoutConfig?.hero?.show !== false) && heroSlides.length > 0 && (_jsxs("section", { "data-section": "hero", className: "relative h-[85vh] w-full overflow-hidden", onMouseEnter: () => setIsAutoPlaying(false), onMouseLeave: () => layoutConfig?.hero?.autoPlay !== false && setIsAutoPlaying(true), children: [_jsx("div", { className: "relative h-full w-full", children: heroSlides.map((slide, index) => (_jsxs("div", { className: `absolute inset-0 transition-opacity duration-1000 ease-in-out ${index === currentSlide ? 'opacity-100 z-10' : 'opacity-0 z-0'}`, children: [_jsxs("div", { className: "absolute inset-0", children: [_jsx(ImageWithFallback, { src: slide.image, alt: slide.title, className: "absolute inset-0 h-full w-full object-cover", skeletonAspectRatio: "16/9", priority: index === currentSlide }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-black/50 via-black/20 to-transparent" })] }), _jsx("div", { className: "absolute inset-0 flex items-center z-20", children: _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: `max-w-3xl text-white space-y-8 transition-all duration-1000 ${index === currentSlide
233
+ return (_jsxs("div", { className: "min-h-screen bg-white", children: [(layoutConfig?.sections?.hero?.show !== false || layoutConfig?.hero?.show !== false) && heroSlides.length > 0 && (_jsxs("section", { ...section('hero'), "data-section": "hero", className: `relative min-h-[360px] w-full overflow-hidden ${isPreview
234
+ ? 'h-[min(70dvh,28rem)] sm:h-[min(75dvh,32rem)] lg:h-[85vh]'
235
+ : 'h-[70dvh] sm:h-[75dvh] lg:h-[85vh]'}`, onMouseEnter: () => setIsAutoPlaying(false), onMouseLeave: () => layoutConfig?.hero?.autoPlay !== false && setIsAutoPlaying(true), children: [_jsx("div", { className: "relative h-full w-full", children: heroSlides.map((slide, index) => (_jsxs("div", { className: `absolute inset-0 transition-opacity duration-1000 ease-in-out ${index === currentSlide ? 'opacity-100 z-10' : 'opacity-0 z-0'}`, children: [_jsxs("div", { className: "absolute inset-0", children: [_jsx(ImageWithFallback, { src: slide.image, alt: slide.title, className: "absolute inset-0 h-full w-full object-cover", skeletonAspectRatio: "16/9", priority: index === currentSlide }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-black/50 via-black/20 to-transparent" })] }), _jsx("div", { className: "absolute inset-0 flex items-center z-20", children: _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: `max-w-3xl text-white space-y-8 transition-all duration-1000 ${index === currentSlide
234
236
  ? 'opacity-100 translate-y-0'
235
237
  : 'opacity-0 translate-y-8'}`, children: [_jsxs("div", { children: [slide.badge && (_jsx(SafeRichHtml, { as: "span", className: "inline-block px-4 py-1.5 bg-white/20 backdrop-blur-md rounded-full text-sm font-medium border border-white/30 uppercase tracking-wider mb-4 [&_p]:m-0", value: slide.badge, fallbackPlain: "" })), _jsx("h1", { className: "text-4xl sm:text-6xl lg:text-7xl font-bold leading-tight tracking-tight mb-4", children: _jsx(SafeRichHtml, { value: slide.title, fallbackPlain: storeConfig.name }) }), _jsx("div", { className: "h-1 w-24 bg-white/80 rounded-full" })] }), _jsx("div", { className: "text-xl sm:text-2xl text-gray-100 font-light leading-relaxed max-w-lg [&_p]:mb-3 [&_p:last-child]:mb-0", children: _jsx(SafeRichHtml, { value: slide.description, fallbackPlain: "" }) }), _jsxs("div", { className: "flex flex-wrap gap-4 pt-4", children: [layoutConfig?.sections?.hero?.showCTA !== false &&
236
238
  layoutConfig?.hero?.showCTA !== false &&
@@ -240,13 +242,7 @@ export function ClothingHomePage({ storeConfig: initialConfig }) {
240
242
  slide.secondaryButtonText.trim() !== '' &&
241
243
  slide.secondaryButtonLink && (_jsx(Link, { href: slide.secondaryButtonLink, children: _jsx(Button, { size: "lg", variant: "outline", className: "h-14 px-10 text-base rounded-full border-white bg-transparent text-white hover:bg-white/20 hover:text-white backdrop-blur-sm transition-all duration-300", style: { color: 'white' }, children: _jsx(SafeRichHtml, { value: slide.secondaryButtonText, fallbackPlain: "", className: "[&_p]:m-0" }) }) }))] })] }) }) })] }, index))) }), _jsx("button", { onClick: prevSlide, className: "absolute left-4 top-1/2 -translate-y-1/2 z-30 bg-white/10 hover:bg-white/20 backdrop-blur-md rounded-full p-3 transition-all duration-300 hover:scale-110 group", "aria-label": "Previous slide", children: _jsx(ChevronLeft, { className: "h-6 w-6 text-white group-hover:text-white" }) }), _jsx("button", { onClick: nextSlide, className: "absolute right-4 top-1/2 -translate-y-1/2 z-30 bg-white/10 hover:bg-white/20 backdrop-blur-md rounded-full p-3 transition-all duration-300 hover:scale-110 group", "aria-label": "Next slide", children: _jsx(ChevronRight, { className: "h-6 w-6 text-white group-hover:text-white" }) }), _jsx("div", { className: "absolute bottom-8 left-1/2 -translate-x-1/2 z-30 flex gap-2", children: heroSlides.map((_, index) => (_jsx("button", { onClick: () => goToSlide(index), className: `transition-all duration-300 rounded-full ${index === currentSlide
242
244
  ? 'w-12 h-2 bg-white'
243
- : 'w-2 h-2 bg-white/50 hover:bg-white/75'}`, "aria-label": `Go to slide ${index + 1}` }, index))) })] })), layoutConfig?.sections?.features?.show !== false && (_jsx("section", { "data-section": "about", className: "py-8 bg-gray-50 border-b border-gray-100", children: _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8", children: _jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 text-center divide-y md:divide-y-0 md:divide-x divide-gray-200", children: (layoutConfig?.sections?.features?.items || [
244
- { icon: 'Truck', title: 'Free Shipping', description: `On all orders over $${storeConfig.settings.freeShippingThreshold}` },
245
- { icon: 'RefreshCw', title: 'Free Returns', description: '30-day money back guarantee' },
246
- { icon: 'ShieldCheck', title: 'Secure Payment', description: '100% secure checkout process' }
247
- ]).filter(Boolean).map((item, idx) => {
248
- return (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-4", children: [_jsx(DynamicIcon, { name: item.icon, className: "h-6 w-6 text-gray-900" }), _jsx("h3", { className: "font-semibold text-gray-900", children: item.title }), _jsx(RichTextExcerpt, { value: item.description, as: "p", className: "text-sm text-gray-500" })] }, idx));
249
- }) }) }) })), layoutConfig?.sections?.categories?.show !== false && (_jsx("section", { "data-section": "categories", className: "py-12 md:py-20 px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "container mx-auto max-w-7xl", children: [_jsxs("div", { className: "flex flex-col md:flex-row justify-between items-end mb-8 md:mb-12 gap-4", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-3xl md:text-4xl font-bold mb-3 tracking-tight", children: getLayoutText(storeConfig, 'sections.categories.title', 'Shop by Category') }), _jsx("p", { className: "text-gray-500 text-lg", children: getLayoutText(storeConfig, 'sections.categories.subtitle', 'Curated collections for every style') })] }), layoutConfig?.sections?.categories?.showViewAll !== false && (_jsxs(Link, { href: `/${storeConfig.slug}/categories`, className: "group flex items-center gap-2 text-sm font-medium hover:text-gray-600 transition-colors pb-1 border-b border-transparent hover:border-gray-300", children: [getLayoutText(storeConfig, 'sections.categories.viewAll', 'View All Categories'), " ", _jsx(ArrowRight, { className: "h-4 w-4 transition-transform group-hover:translate-x-1" })] }))] }), _jsx("div", { className: `grid ${getCategoryGridClass()} gap-6`, children: displayedCategories.map((category) => {
245
+ : 'w-2 h-2 bg-white/50 hover:bg-white/75'}`, "aria-label": `Go to slide ${index + 1}` }, index))) })] })), layoutConfig?.sections?.categories?.show !== false && (_jsx("section", { "data-section": "categories", className: "py-12 md:py-20 px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "container mx-auto max-w-7xl", children: [_jsxs("div", { className: "flex flex-col md:flex-row justify-between items-end mb-8 md:mb-12 gap-4", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-3xl md:text-4xl font-bold mb-3 tracking-tight", children: getLayoutText(storeConfig, 'sections.categories.title', 'Shop by Category') }), _jsx("p", { className: "text-gray-500 text-lg", children: getLayoutText(storeConfig, 'sections.categories.subtitle', 'Curated collections for every style') })] }), layoutConfig?.sections?.categories?.showViewAll !== false && (_jsxs(Link, { href: `/${storeConfig.slug}/categories`, className: "group flex items-center gap-2 text-sm font-medium hover:text-gray-600 transition-colors pb-1 border-b border-transparent hover:border-gray-300", children: [getLayoutText(storeConfig, 'sections.categories.viewAll', 'View All Categories'), " ", _jsx(ArrowRight, { className: "h-4 w-4 transition-transform group-hover:translate-x-1" })] }))] }), _jsx("div", { className: `grid ${getCategoryGridClass()} gap-6`, children: displayedCategories.map((category) => {
250
246
  // Validate category image - handle all formats
251
247
  const extractCategoryImage = (image) => {
252
248
  if (!image)
@@ -271,7 +267,7 @@ export function ClothingHomePage({ storeConfig: initialConfig }) {
271
267
  };
272
268
  const categoryImage = extractCategoryImage(category.image);
273
269
  return (_jsxs(Link, { href: `/${storeConfig.slug}/categories/${category.slug}`, className: `group relative overflow-hidden rounded-2xl aspect-[3/4]`, children: [_jsxs("div", { className: "absolute inset-0 bg-gray-200", children: [_jsx(ImageWithFallback, { src: categoryImage, alt: category.name, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-110", skeletonAspectRatio: "auto", lazy: true }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/70 via-black/20 to-transparent opacity-80 group-hover:opacity-70 transition-opacity" })] }), _jsxs("div", { className: "absolute inset-0 flex flex-col justify-end p-8", children: [_jsx("h3", { className: "text-2xl font-bold text-white mb-2 transform translate-y-0 transition-transform duration-300", children: category.name }), _jsx("div", { className: "h-0.5 w-12 bg-white/0 group-hover:bg-white/100 transition-all duration-500 mb-4" }), _jsxs("span", { className: "inline-flex items-center text-white text-sm font-medium opacity-0 group-hover:opacity-100 transform translate-y-4 group-hover:translate-y-0 transition-all duration-300", children: [getLayoutText(storeConfig, 'common.shopNow', 'Shop Now'), " ", _jsx(ArrowRight, { className: "ml-2 h-4 w-4" })] })] })] }, category.id));
274
- }) })] }) })), layoutConfig?.sections?.marketing?.editorial?.show !== false && (_jsx("section", { "data-section": "editorial", className: "py-16 md:py-24 px-4 sm:px-6 lg:px-8 bg-stone-50", children: _jsx("div", { className: "container mx-auto max-w-7xl", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-10 md:gap-12 lg:gap-20 items-center", children: [_jsxs("div", { className: "relative", children: [_jsx("div", { className: "aspect-[4/5] rounded-lg overflow-hidden relative", children: _jsx(ImageWithFallback, { src: layoutConfig?.sections?.marketing?.editorial?.image || 'https://images.unsplash.com/photo-1490481651871-ab68de25d43d?q=80&w=2000&auto=format&fit=crop', alt: "Editorial Lookbook", className: "w-full h-full object-cover", skeletonAspectRatio: "4/5", lazy: true }) }), (layoutConfig?.sections?.marketing?.editorial?.detailImage) && (_jsx("div", { className: "absolute w-48 h-48 bg-white p-4 shadow-xl rounded-lg hidden md:block z-20 animate-fade-in-up", style: { bottom: '-2rem', right: '-2rem', animationDelay: '0.2s' }, children: _jsx("div", { className: "w-full h-full relative", children: _jsx(ImageWithFallback, { src: layoutConfig.sections.marketing.editorial.detailImage, alt: "Detail Shot", className: "w-full h-full object-cover rounded", skeletonAspectRatio: "square", lazy: true }) }) }))] }), _jsxs("div", { className: "space-y-8", children: [_jsx("div", { className: "flex flex-col gap-2", children: _jsx("span", { className: "text-sm font-bold tracking-widest text-gray-500 uppercase", children: layoutConfig?.sections?.marketing?.editorial?.badgeText || "Lookbook" }) }), _jsx("h2", { className: "text-4xl md:text-5xl font-bold tracking-tight leading-tight text-gray-900", children: layoutConfig?.sections?.marketing?.editorial?.title ? (layoutConfig.sections.marketing.editorial.title.split('\n').map((line, idx, arr) => (_jsxs("span", { children: [line, idx < arr.length - 1 && _jsx("br", {})] }, idx)))) : (_jsxs(_Fragment, { children: ["Redefining Modern ", _jsx("br", {}), _jsx("span", { className: "italic font-serif", children: "Elegance" })] })) }), _jsx("div", { className: "text-lg text-gray-600 leading-relaxed [&_p]:mb-3 [&_p:last-child]:mb-0", children: _jsx(SafeRichHtml, { value: layoutConfig?.sections?.marketing?.editorial?.description ||
270
+ }) })] }) })), layoutConfig?.sections?.marketing?.editorial?.show !== false && (_jsx("section", { ...section('lookbook'), "data-section": "editorial", className: "py-16 md:py-24 px-4 sm:px-6 lg:px-8 bg-stone-50", children: _jsx("div", { className: "container mx-auto max-w-7xl", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-10 md:gap-12 lg:gap-20 items-center", children: [_jsxs("div", { className: "relative pb-8 md:pb-0", children: [_jsx("div", { className: "aspect-[4/5] rounded-lg overflow-hidden relative", children: _jsx(ImageWithFallback, { src: layoutConfig?.sections?.marketing?.editorial?.image || 'https://images.unsplash.com/photo-1490481651871-ab68de25d43d?q=80&w=2000&auto=format&fit=crop', alt: "Editorial Lookbook", className: "w-full h-full object-cover", skeletonAspectRatio: "4/5", lazy: true }) }), (layoutConfig?.sections?.marketing?.editorial?.detailImage) && (_jsx("div", { className: "z-20 mx-auto mt-6 h-40 w-40 rounded-lg bg-white p-4 shadow-xl animate-fade-in-up md:absolute md:bottom-[-2rem] md:right-[-2rem] md:mx-0 md:mt-0 md:h-48 md:w-48", style: { animationDelay: '0.2s' }, ...image('lookbook', ['detailImage']), children: _jsx("div", { className: "relative h-full w-full", children: _jsx(ImageWithFallback, { src: layoutConfig.sections.marketing.editorial.detailImage, alt: "Detail Shot", className: "w-full h-full object-cover rounded", skeletonAspectRatio: "square", lazy: true }) }) }))] }), _jsxs("div", { className: "space-y-8", children: [_jsx("div", { className: "flex flex-col gap-2", children: _jsx("span", { className: "text-sm font-bold tracking-widest text-gray-500 uppercase", children: layoutConfig?.sections?.marketing?.editorial?.badgeText || "Lookbook" }) }), _jsx("h2", { className: "text-4xl md:text-5xl font-bold tracking-tight leading-tight text-gray-900", children: layoutConfig?.sections?.marketing?.editorial?.title ? (layoutConfig.sections.marketing.editorial.title.split('\n').map((line, idx, arr) => (_jsxs("span", { children: [line, idx < arr.length - 1 && _jsx("br", {})] }, idx)))) : (_jsxs(_Fragment, { children: ["Redefining Modern ", _jsx("br", {}), _jsx("span", { className: "italic font-serif", children: "Elegance" })] })) }), _jsx("div", { className: "text-lg text-gray-600 leading-relaxed [&_p]:mb-3 [&_p:last-child]:mb-0", children: _jsx(SafeRichHtml, { value: layoutConfig?.sections?.marketing?.editorial?.description ||
275
271
  'Explore our latest editorial featuring timeless pieces crafted for the contemporary wardrobe. From essential basics to statement outwear, find your signature look.', fallbackPlain: "Explore our latest editorial featuring timeless pieces crafted for the contemporary wardrobe. From essential basics to statement outwear, find your signature look." }) }), _jsxs("div", { className: "flex flex-col sm:flex-row gap-4 pt-4", children: [layoutConfig?.sections?.marketing?.editorial?.primaryButton?.text && (_jsx(Link, { href: toStoreHref(storeConfig.slug, layoutConfig.sections.marketing.editorial.primaryButton.link, '/style-guide'), children: _jsx(Button, { className: "rounded-full px-8 py-6 bg-gray-900 hover:bg-black text-white transition-all", children: layoutConfig.sections.marketing.editorial.primaryButton.text }) })), layoutConfig?.sections?.marketing?.editorial?.secondaryButton?.text && (_jsx(Link, { href: toStoreHref(storeConfig.slug, layoutConfig.sections.marketing.editorial.secondaryButton.link, '/about'), children: _jsx(Button, { variant: "outline", className: "rounded-full px-8 py-6 border-gray-300 hover:bg-white hover:border-gray-900 transition-all", children: layoutConfig.sections.marketing.editorial.secondaryButton.text }) }))] })] })] }) }) })), layoutConfig?.sections?.featuredProducts?.show !== false && (_jsx("section", { "data-section": "featuredProducts", className: "py-16 md:py-24 px-4 sm:px-6 lg:px-8 bg-white", children: _jsxs("div", { className: "container mx-auto max-w-7xl", children: [_jsxs("div", { className: "text-center max-w-2xl mx-auto mb-10 md:mb-16", children: [_jsx("span", { className: "text-sm font-bold tracking-widest text-gray-500 uppercase mb-3 block", children: layoutConfig?.sections?.featuredProducts?.eyebrow || "Curated For You" }), _jsx("h2", { className: "text-3xl md:text-4xl font-bold mb-4 tracking-tight", children: layoutConfig?.sections?.featuredProducts?.title || getLayoutText(storeConfig, 'sections.featuredProducts.title', 'Trending Now') }), _jsx("div", { className: "h-1 w-20 bg-gray-900 mx-auto mb-6" }), _jsx("div", { className: "text-gray-600 text-lg [&_p]:mb-2 [&_p:last-child]:mb-0", children: _jsx(SafeRichHtml, { value: getLayoutText(storeConfig, 'sections.featuredProducts.subtitle', "Discover the latest trends and essential pieces that define this season's style."), fallbackPlain: "Discover the latest trends and essential pieces that define this season's style." }) })] }), _jsx("div", { className: "grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-4 gap-4 sm:gap-8", children: products.slice(0, 4).map((product) => {
276
272
  // Comprehensive image extraction - handles all formats
277
273
  const extractProductImages = (images) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ProductDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing/pages/ProductDetailPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAA8C,MAAM,0BAA0B,CAAC;AAiCnG,UAAU,sBAAsB;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAsHD,wBAAgB,iBAAiB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,EAAE,sBAAsB,+BA45BpG"}
1
+ {"version":3,"file":"ProductDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing/pages/ProductDetailPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAA8C,MAAM,0BAA0B,CAAC;AAiCnG,UAAU,sBAAsB;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAsHD,wBAAgB,iBAAiB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,EAAE,sBAAsB,+BAu5BpG"}
@@ -408,7 +408,7 @@ export function ProductDetailPage({ storeConfig: initialConfig, productSlug }) {
408
408
  return brandMatch ? brandMatch[1] : storeConfig.name;
409
409
  })() }), _jsx("button", { onClick: handleShare, className: "text-gray-400 hover:text-gray-900 transition-colors p-2 rounded-full hover:bg-gray-100", title: "Share this product", children: _jsx(Share2, { className: "h-5 w-5" }) })] }), _jsx("h1", { "data-product-name": true, className: "text-3xl sm:text-4xl lg:text-5xl font-bold text-gray-900 mb-3 leading-tight tracking-tight", children: product.name }), _jsxs("p", { className: "text-sm text-gray-500 mb-6 font-mono", children: ["SKU: ", displaySKU] }), _jsx("div", { className: "mb-4 flex items-center gap-2", children: !isOutOfStock ? (_jsxs("span", { className: "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800", children: [_jsx(CheckCircle, { className: "w-3 h-3 mr-1" }), "In Stock"] })) : (_jsxs("span", { className: "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800", children: [_jsx(Info, { className: "w-3 h-3 mr-1" }), "Out of Stock"] })) }), _jsxs("div", { className: "mb-8", children: [_jsxs("div", { className: "flex items-baseline gap-4", children: [_jsx("span", { "data-product-price": true, className: "text-4xl lg:text-5xl font-bold text-gray-900", children: formatCurrency(displayPrice, product.currency || 'USD') }), displayCompareAt != null && displayCompareAt > displayPrice && (_jsx("span", { className: "text-2xl text-gray-500 line-through", children: formatCurrency(displayCompareAt, product.currency || 'USD') }))] }), displayCompareAt != null && displayCompareAt > displayPrice && (_jsxs("span", { className: "inline-block mt-2 bg-red-100 text-red-700 text-xs font-bold px-2 py-1 rounded", children: ["SAVE ", Math.round(((displayCompareAt - displayPrice) / displayCompareAt) * 100), "%"] }))] }), _jsx(PdpVariationSelectors, { optionGroups: optionGroups, selectedAttributes: selectedAttributes, setAttribute: setAttribute, isOptionAvailable: isOptionAvailable, getOptionImage: getOptionImage, storeSlug: storeConfig.slug, showSizeGuide: productDetailConfig?.showSizeGuide !== false, onAfterClearAttribute: () => setQuantity(1) }), _jsxs("div", { className: "flex flex-col gap-4 mb-8", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("span", { className: "text-sm font-semibold text-gray-900", children: "Quantity" }), _jsxs("div", { className: "flex items-center border border-gray-300 rounded-lg", children: [_jsx("button", { className: "p-3 text-gray-600 hover:bg-gray-100 rounded-l-lg disabled:opacity-50", onClick: () => setQuantity(Math.max(1, quantity - 1)), disabled: quantity <= 1, children: _jsx(Minus, { className: "h-4 w-4" }) }), _jsx("span", { className: "w-12 text-center font-semibold text-gray-900", children: quantity }), _jsx("button", { className: "p-3 text-gray-600 hover:bg-gray-100 rounded-r-lg", onClick: () => setQuantity(quantity + 1), children: _jsx(Plus, { className: "h-4 w-4" }) })] })] }), _jsxs("div", { className: "flex flex-row items-stretch gap-2 sm:gap-3 mt-2 w-full", children: [productDetailConfig?.showAddToCart !== false && (_jsx(Button, { "data-add-to-cart": true, variant: "outline", size: "lg", onClick: handleAddToCart, disabled: isCartLoading || isOutOfStock, className: "flex-1 min-w-0 bg-white border-2 border-gray-900 text-gray-900 hover:bg-gray-50 rounded-full h-12 sm:h-14 px-3 sm:px-6 text-sm sm:text-base font-bold shadow-sm transition-all disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:text-gray-900", children: isCartLoading ? (_jsxs(_Fragment, { children: [_jsx(ButtonLoader, { className: "mr-1.5 sm:mr-2" }), "Adding..."] })) : (_jsxs(_Fragment, { children: [_jsx(ShoppingCart, { className: "h-4 w-4 sm:h-5 sm:w-5 mr-1.5 sm:mr-2 shrink-0 text-gray-900" }), "Add to Cart"] })) })), productDetailConfig?.showAddToCart !== false && (_jsx(Button, { size: "lg", onClick: handleBuyNow, disabled: isOutOfStock || isBuyNowLoading || isCartLoading, className: "flex-1 min-w-0 bg-gray-900 hover:bg-gray-800 text-white rounded-full h-12 sm:h-14 px-3 sm:px-6 text-sm sm:text-base font-bold shadow-lg hover:shadow-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed", children: isBuyNowLoading || isCartLoading ? (_jsxs(_Fragment, { children: [_jsx(ButtonLoader, { className: "mr-1.5 sm:mr-2" }), "Adding..."] })) : ('Buy Now') })), storeConfig.features.wishlist && productDetailConfig?.showWishlist !== false && (_jsx(Button, { variant: "outline", size: "lg", onClick: handleWishlistClick, disabled: isWishlistLoading || !product, className: cn("h-12 w-12 sm:h-14 sm:w-14 shrink-0 rounded-full border-2 transition-all disabled:opacity-50 disabled:cursor-not-allowed", product && isInWishlist(product.id)
410
410
  ? "border-red-500 bg-red-50 text-red-500 hover:bg-red-100"
411
- : "border-gray-200 hover:border-gray-300 hover:bg-gray-50"), children: isWishlistLoading ? (_jsx(ButtonLoader, { className: "h-5 w-5" })) : (_jsx(Heart, { className: cn("h-5 w-5", product && isInWishlist(product.id) && "fill-current") })) }))] })] }), _jsx(ProductDeliveryInfoSection, { storeConfig: storeConfig, currency: storeConfig.settings?.currency || 'USD', productCurrency: product.currency, productPrice: displayPrice, quantity: quantity, shippingAddress: shippingAddress, updateShippingAddress: (patch) => setShippingAddress((prev) => ({ ...prev, ...patch })), shippingMethods: shippingMethods, isCalculatingShipping: isCalculatingShipping, shippingError: shippingError, freeShippingEligible: freeShippingEligible, freeShippingThreshold: freeShippingThreshold, onToast: addToast }), product.description && (_jsxs("div", { className: "mb-8", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-3", children: "Description" }), _jsxs("div", { className: "prose prose-sm max-w-none text-gray-600 leading-relaxed", children: [_jsx(SafeRichHtml, { value: product.description, fallbackPlain: "", as: "div" }), _jsxs("ul", { className: "list-disc pl-5 space-y-1 mt-2", children: [_jsx("li", { children: "Premium quality material" }), _jsx("li", { children: "Comfortable fit for all-day wear" }), _jsx("li", { children: "Durable stitching and finish" })] })] })] })), product.specifications && Object.keys(product.specifications).length > 0 && (_jsxs("div", { className: "mb-8", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-4", children: "Specifications" }), _jsx("dl", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-4", children: Object.entries(product.specifications).map(([key, value]) => (_jsxs("div", { className: "flex flex-col p-3 bg-gray-50 rounded-lg", children: [_jsx("dt", { className: "text-xs text-gray-500 font-medium uppercase tracking-wider mb-1", children: key }), _jsx("dd", { className: "text-sm font-bold text-gray-900", children: value })] }, key))) })] }))] })] }), productDetailConfig?.showReviews !== false && (_jsx("div", { className: "mt-20 pt-16 border-t border-gray-200", children: _jsxs("div", { className: "max-w-4xl", children: [_jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-6 mb-10", children: [_jsxs("div", { className: "flex-1", children: [_jsx("h2", { className: "text-2xl lg:text-3xl font-bold text-gray-900 mb-4", children: "Customer Reviews" }), reviewCount > 0 && averageRating > 0 && (_jsxs("div", { className: "flex items-center gap-4", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(StarRating, { rating: averageRating, size: "lg" }), _jsx("span", { className: "text-2xl font-bold text-gray-900", children: averageRating.toFixed(1) }), _jsx("span", { className: "text-lg text-gray-500", children: "out of 5" })] }), _jsx("span", { className: "text-gray-300", children: "|" }), _jsxs("span", { className: "text-lg text-gray-600", children: [reviewCount, " ", reviewCount === 1 ? 'review' : 'reviews'] })] }))] }), reviewCount > 0 && (_jsx(Button, { onClick: () => {
411
+ : "border-gray-200 hover:border-gray-300 hover:bg-gray-50"), children: isWishlistLoading ? (_jsx(ButtonLoader, { className: "h-5 w-5" })) : (_jsx(Heart, { className: cn("h-5 w-5", product && isInWishlist(product.id) && "fill-current") })) }))] })] }), _jsx(ProductDeliveryInfoSection, { storeConfig: storeConfig, currency: storeConfig.settings?.currency || 'USD', productCurrency: product.currency, productPrice: displayPrice, quantity: quantity, shippingAddress: shippingAddress, updateShippingAddress: (patch) => setShippingAddress((prev) => ({ ...prev, ...patch })), shippingMethods: shippingMethods, isCalculatingShipping: isCalculatingShipping, shippingError: shippingError, freeShippingEligible: freeShippingEligible, freeShippingThreshold: freeShippingThreshold, onToast: addToast }), product.description && (_jsxs("div", { className: "mb-8", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-3", children: "Description" }), _jsx("div", { className: "prose prose-sm max-w-none text-gray-600 leading-relaxed", children: _jsx(SafeRichHtml, { value: product.description, fallbackPlain: "", as: "div" }) })] })), product.specifications && Object.keys(product.specifications).length > 0 && (_jsxs("div", { className: "mb-8", children: [_jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-4", children: "Specifications" }), _jsx("dl", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-4", children: Object.entries(product.specifications).map(([key, value]) => (_jsxs("div", { className: "flex flex-col p-3 bg-gray-50 rounded-lg", children: [_jsx("dt", { className: "text-xs text-gray-500 font-medium uppercase tracking-wider mb-1", children: key }), _jsx("dd", { className: "text-sm font-bold text-gray-900", children: value })] }, key))) })] }))] })] }), productDetailConfig?.showReviews !== false && (_jsx("div", { className: "mt-20 pt-16 border-t border-gray-200", children: _jsxs("div", { className: "max-w-4xl", children: [_jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-6 mb-10", children: [_jsxs("div", { className: "flex-1", children: [_jsx("h2", { className: "text-2xl lg:text-3xl font-bold text-gray-900 mb-4", children: "Customer Reviews" }), reviewCount > 0 && averageRating > 0 && (_jsxs("div", { className: "flex items-center gap-4", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(StarRating, { rating: averageRating, size: "lg" }), _jsx("span", { className: "text-2xl font-bold text-gray-900", children: averageRating.toFixed(1) }), _jsx("span", { className: "text-lg text-gray-500", children: "out of 5" })] }), _jsx("span", { className: "text-gray-300", children: "|" }), _jsxs("span", { className: "text-lg text-gray-600", children: [reviewCount, " ", reviewCount === 1 ? 'review' : 'reviews'] })] }))] }), reviewCount > 0 && (_jsx(Button, { onClick: () => {
412
412
  if (!isAuthenticated) {
413
413
  openLogin({ onSuccess: () => setIsReviewModalOpen(true) });
414
414
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"ClothingHomePageMinimal.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing-minimal/components/ClothingHomePageMinimal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAgB,MAAM,0BAA0B,CAAC;AAkBrE,UAAU,4BAA4B;IACpC,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,uBAAuB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,4BAA4B,+BAkWnG"}
1
+ {"version":3,"file":"ClothingHomePageMinimal.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing-minimal/components/ClothingHomePageMinimal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAgB,MAAM,0BAA0B,CAAC;AAgBrE,UAAU,4BAA4B;IACpC,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,uBAAuB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,4BAA4B,+BAqUnG"}