@salla.sa/twilight-theme-engine 1.0.107 → 1.0.108

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 (130) hide show
  1. package/dist/{AddToCartForm-ROYGCSVX.js → AddToCartForm-CF4H32X7.js} +3 -3
  2. package/dist/{AddToCartForm-ROYGCSVX.js.map → AddToCartForm-CF4H32X7.js.map} +1 -1
  3. package/dist/{BlogAuthorPage-V4QPVVWU.js → BlogAuthorPage-LHYDUFDA.js} +7 -7
  4. package/dist/{BlogAuthorPage-V4QPVVWU.js.map → BlogAuthorPage-LHYDUFDA.js.map} +1 -1
  5. package/dist/{BlogCategoryPage-BSM63G5Q.js → BlogCategoryPage-6BORI4YG.js} +7 -7
  6. package/dist/{BlogCategoryPage-BSM63G5Q.js.map → BlogCategoryPage-6BORI4YG.js.map} +1 -1
  7. package/dist/{BlogPage-4QXLITAA.js → BlogPage-TSRWNX6M.js} +6 -6
  8. package/dist/{BlogPage-4QXLITAA.js.map → BlogPage-TSRWNX6M.js.map} +1 -1
  9. package/dist/{BlogSinglePage-TRYJUPCB.js → BlogSinglePage-TLTW67S7.js} +6 -6
  10. package/dist/{BlogSinglePage-TRYJUPCB.js.map → BlogSinglePage-TLTW67S7.js.map} +1 -1
  11. package/dist/{BlogTagPage-2JKCTBIU.js → BlogTagPage-RAMP5XNR.js} +7 -7
  12. package/dist/{BlogTagPage-2JKCTBIU.js.map → BlogTagPage-RAMP5XNR.js.map} +1 -1
  13. package/dist/{BrandsPage-PGCDHGOI.js → BrandsPage-KUFEUFVZ.js} +6 -6
  14. package/dist/{BrandsPage-PGCDHGOI.js.map → BrandsPage-KUFEUFVZ.js.map} +1 -1
  15. package/dist/{Breadcrumb-ACO63JUO.js → Breadcrumb-ZS3ZMMTM.js} +6 -6
  16. package/dist/{Breadcrumb-ACO63JUO.js.map → Breadcrumb-ZS3ZMMTM.js.map} +1 -1
  17. package/dist/{CartItem-TYWGDMRV.js → CartItem-7QCAQ3QQ.js} +6 -6
  18. package/dist/{CartItem-TYWGDMRV.js.map → CartItem-7QCAQ3QQ.js.map} +1 -1
  19. package/dist/{CartSummary-AKDPJ4OY.js → CartSummary-ZPG7IAXE.js} +6 -6
  20. package/dist/{CartSummary-AKDPJ4OY.js.map → CartSummary-ZPG7IAXE.js.map} +1 -1
  21. package/dist/{Copyright-TOKRGLFM.js → Copyright-VPJMIQSO.js} +3 -3
  22. package/dist/{Copyright-TOKRGLFM.js.map → Copyright-VPJMIQSO.js.map} +1 -1
  23. package/dist/{CustomerLayout-WTD5QAR7.js → CustomerLayout-E5FYPKT4.js} +6 -6
  24. package/dist/{CustomerLayout-WTD5QAR7.js.map → CustomerLayout-E5FYPKT4.js.map} +1 -1
  25. package/dist/{Footer-SSNPHJ2G.js → Footer-GIPFBQEY.js} +4 -4
  26. package/dist/{Footer-SSNPHJ2G.js.map → Footer-GIPFBQEY.js.map} +1 -1
  27. package/dist/{Header-W6XMMZIA.js → Header-HYTNO4IR.js} +4 -4
  28. package/dist/{Header-W6XMMZIA.js.map → Header-HYTNO4IR.js.map} +1 -1
  29. package/dist/{LoyaltyPage-QJIAYRU4.js → LoyaltyPage-YMK7SISF.js} +6 -6
  30. package/dist/{LoyaltyPage-QJIAYRU4.js.map → LoyaltyPage-YMK7SISF.js.map} +1 -1
  31. package/dist/{LoyaltyPointsPage-A4QHYJXF.js → LoyaltyPointsPage-V2463UQ6.js} +3 -3
  32. package/dist/{LoyaltyPointsPage-A4QHYJXF.js.map → LoyaltyPointsPage-V2463UQ6.js.map} +1 -1
  33. package/dist/{MainMenu-HBN4SWXP.js → MainMenu-IP6AVEIF.js} +3 -3
  34. package/dist/{MainMenu-HBN4SWXP.js.map → MainMenu-IP6AVEIF.js.map} +1 -1
  35. package/dist/{MasterLayout-DTLAOTWI.js → MasterLayout-3YSR4VFQ.js} +6 -6
  36. package/dist/{MasterLayout-DTLAOTWI.js.map → MasterLayout-3YSR4VFQ.js.map} +1 -1
  37. package/dist/{MobileMenu-ZC5D4KGJ.js → MobileMenu-ZJLXCG4P.js} +6 -6
  38. package/dist/{MobileMenu-ZC5D4KGJ.js.map → MobileMenu-ZJLXCG4P.js.map} +1 -1
  39. package/dist/{NotificationsPage-TKJLPSGS.js → NotificationsPage-XKSW3DFD.js} +6 -6
  40. package/dist/{NotificationsPage-TKJLPSGS.js.map → NotificationsPage-XKSW3DFD.js.map} +1 -1
  41. package/dist/{OrderSinglePage-GT2E2CZN.js → OrderSinglePage-WSUNHCY6.js} +6 -6
  42. package/dist/{OrderSinglePage-GT2E2CZN.js.map → OrderSinglePage-WSUNHCY6.js.map} +1 -1
  43. package/dist/{OrdersPage-CBXEYWBH.js → OrdersPage-TAME5ACG.js} +6 -6
  44. package/dist/{OrdersPage-CBXEYWBH.js.map → OrdersPage-TAME5ACG.js.map} +1 -1
  45. package/dist/{PageSingle-K4W6RVAT.js → PageSingle-MYDLIP55.js} +3 -3
  46. package/dist/{PageSingle-K4W6RVAT.js.map → PageSingle-MYDLIP55.js.map} +1 -1
  47. package/dist/{ProductDetails-X2UNOW2P.js → ProductDetails-MFAKRQ72.js} +3 -3
  48. package/dist/{ProductDetails-X2UNOW2P.js.map → ProductDetails-MFAKRQ72.js.map} +1 -1
  49. package/dist/{ProfilePage-3AHOU5XQ.js → ProfilePage-4W7DBXLW.js} +6 -6
  50. package/dist/{ProfilePage-3AHOU5XQ.js.map → ProfilePage-4W7DBXLW.js.map} +1 -1
  51. package/dist/{ReviewsPage-R6DODVH6.js → ReviewsPage-G3IEPOOO.js} +3 -3
  52. package/dist/{ReviewsPage-R6DODVH6.js.map → ReviewsPage-G3IEPOOO.js.map} +1 -1
  53. package/dist/{SeoCartWidget-NJK3YIPC.js → SeoCartWidget-7UDOVSWP.js} +6 -6
  54. package/dist/{SeoCartWidget-NJK3YIPC.js.map → SeoCartWidget-7UDOVSWP.js.map} +1 -1
  55. package/dist/{SettingsPage-6STAABBW.js → SettingsPage-TEMXC3OF.js} +6 -6
  56. package/dist/{SettingsPage-6STAABBW.js.map → SettingsPage-TEMXC3OF.js.map} +1 -1
  57. package/dist/{StoreClosedNotification-LLXVKVC7.js → StoreClosedNotification-YMPBP56U.js} +7 -7
  58. package/dist/{StoreClosedNotification-LLXVKVC7.js.map → StoreClosedNotification-YMPBP56U.js.map} +1 -1
  59. package/dist/{TestimonialsPage-SUBZSLPR.js → TestimonialsPage-G2S3JQNT.js} +3 -3
  60. package/dist/{TestimonialsPage-SUBZSLPR.js.map → TestimonialsPage-G2S3JQNT.js.map} +1 -1
  61. package/dist/{ThankYouPage-UA7EIVQ2.js → ThankYouPage-HPF3PIAT.js} +6 -6
  62. package/dist/{ThankYouPage-UA7EIVQ2.js.map → ThankYouPage-HPF3PIAT.js.map} +1 -1
  63. package/dist/{WalletPage-WSM62ZDH.js → WalletPage-G7FOMHFX.js} +6 -6
  64. package/dist/{WalletPage-WSM62ZDH.js.map → WalletPage-G7FOMHFX.js.map} +1 -1
  65. package/dist/{WishlistPage-XG3S4T5U.js → WishlistPage-VULTU6K2.js} +6 -6
  66. package/dist/{WishlistPage-XG3S4T5U.js.map → WishlistPage-VULTU6K2.js.map} +1 -1
  67. package/dist/{chunk-2B74CKXM.js → chunk-3DVAXIY3.js} +3 -3
  68. package/dist/{chunk-2B74CKXM.js.map → chunk-3DVAXIY3.js.map} +1 -1
  69. package/dist/chunk-47C3MTZI.js +14 -0
  70. package/dist/{chunk-BHGZ622P.js.map → chunk-47C3MTZI.js.map} +1 -1
  71. package/dist/{chunk-KLYTTMXN.js → chunk-5L37UNQQ.js} +3 -3
  72. package/dist/{chunk-KLYTTMXN.js.map → chunk-5L37UNQQ.js.map} +1 -1
  73. package/dist/{chunk-QBIPTWOR.js → chunk-5N74JJ2Z.js} +3 -3
  74. package/dist/{chunk-QBIPTWOR.js.map → chunk-5N74JJ2Z.js.map} +1 -1
  75. package/dist/{chunk-6YI5J5ZN.js → chunk-6UG4IVUF.js} +8 -8
  76. package/dist/{chunk-6YI5J5ZN.js.map → chunk-6UG4IVUF.js.map} +1 -1
  77. package/dist/{chunk-TO6CJI2H.js → chunk-B2OJZKU4.js} +6 -6
  78. package/dist/{chunk-TO6CJI2H.js.map → chunk-B2OJZKU4.js.map} +1 -1
  79. package/dist/{chunk-NZBBYJID.js → chunk-FQLF555I.js} +4 -4
  80. package/dist/{chunk-NZBBYJID.js.map → chunk-FQLF555I.js.map} +1 -1
  81. package/dist/{chunk-L26XGP65.js → chunk-GFUXGVER.js} +3 -3
  82. package/dist/{chunk-L26XGP65.js.map → chunk-GFUXGVER.js.map} +1 -1
  83. package/dist/{chunk-YCHSWHTJ.js → chunk-GKKHNGLI.js} +4 -4
  84. package/dist/{chunk-YCHSWHTJ.js.map → chunk-GKKHNGLI.js.map} +1 -1
  85. package/dist/{chunk-ZI5XWXWG.js → chunk-PTQVBPPN.js} +3 -3
  86. package/dist/{chunk-ZI5XWXWG.js.map → chunk-PTQVBPPN.js.map} +1 -1
  87. package/dist/{chunk-IQA2UPXP.js → chunk-S5EVFWAL.js} +19 -9
  88. package/dist/chunk-S5EVFWAL.js.map +1 -0
  89. package/dist/{chunk-VCSFCUFT.js → chunk-T4BRWJSI.js} +7 -7
  90. package/dist/{chunk-VCSFCUFT.js.map → chunk-T4BRWJSI.js.map} +1 -1
  91. package/dist/{chunk-SZ65XCSZ.js → chunk-ZLLHL3NI.js} +5 -5
  92. package/dist/{chunk-SZ65XCSZ.js.map → chunk-ZLLHL3NI.js.map} +1 -1
  93. package/dist/components/cart/index.js +1 -1
  94. package/dist/components/common/index.js +1 -1
  95. package/dist/components/drawer/index.js +4 -4
  96. package/dist/components/home/FeaturedProductsStyle2.d.ts.map +1 -1
  97. package/dist/components/home/FixedProducts.d.ts.map +1 -1
  98. package/dist/components/home/index.js +6 -6
  99. package/dist/components/layout/index.js +1 -1
  100. package/dist/components/product/index.js +5 -5
  101. package/dist/components/store/index.js +5 -5
  102. package/dist/{document-class-O2LUUQTZ.js → document-class-B2MXKYAQ.js} +3 -3
  103. package/dist/{document-class-O2LUUQTZ.js.map → document-class-B2MXKYAQ.js.map} +1 -1
  104. package/dist/hooks/index.js +4 -4
  105. package/dist/hooks/useGtm.js +4 -4
  106. package/dist/hooks/useMoney.js +4 -4
  107. package/dist/hooks/useStore.js +4 -4
  108. package/dist/index.js +4 -4
  109. package/dist/{not-found-WFK6JU2O.js → not-found-M3ZPUVVC.js} +6 -6
  110. package/dist/{not-found-WFK6JU2O.js.map → not-found-M3ZPUVVC.js.map} +1 -1
  111. package/dist/providers/index.js +4 -4
  112. package/dist/routes/account/orders.js +1 -1
  113. package/dist/routes/account.js +6 -6
  114. package/dist/routes/blog.js +5 -5
  115. package/dist/routes/brands.js +1 -1
  116. package/dist/routes/cart.js +8 -8
  117. package/dist/routes/home.js +7 -7
  118. package/dist/routes/loyalty.js +2 -2
  119. package/dist/routes/page.js +1 -1
  120. package/dist/routes/product-listing.js +6 -6
  121. package/dist/routes/product.js +6 -6
  122. package/dist/routes/testimonials.js +2 -2
  123. package/dist/routes/thank-you.js +1 -1
  124. package/dist/skeleton.js +7 -7
  125. package/dist/tanstack.js +1 -1
  126. package/package.json +1 -1
  127. package/tailwind/components/home/FeaturedProductsStyle2.tsx.txt +8 -2
  128. package/tailwind/components/home/FixedProducts.tsx.txt +9 -2
  129. package/dist/chunk-BHGZ622P.js +0 -14
  130. package/dist/chunk-IQA2UPXP.js.map +0 -1
@@ -1,6 +1,6 @@
1
- export { useMoney } from '../chunk-6YI5J5ZN.js';
2
- import '../chunk-SZ65XCSZ.js';
3
- import '../chunk-ZI5XWXWG.js';
1
+ export { useMoney } from '../chunk-6UG4IVUF.js';
2
+ import '../chunk-ZLLHL3NI.js';
3
+ import '../chunk-PTQVBPPN.js';
4
4
  import '../chunk-W354TTIE.js';
5
5
  import '../chunk-EHX45KZG.js';
6
6
  import '../chunk-BR56OEPZ.js';
@@ -33,7 +33,7 @@ import '../chunk-5XDPAKF5.js';
33
33
  import '../chunk-GCPEMNSU.js';
34
34
  import '../chunk-YDSWLCOY.js';
35
35
  import '../chunk-TYNZ5B2B.js';
36
- import '../chunk-L26XGP65.js';
36
+ import '../chunk-GFUXGVER.js';
37
37
  import '../chunk-AXW67SY7.js';
38
38
  import '../chunk-BYMOPN2S.js';
39
39
  import '../chunk-SKLEJJ6M.js';
@@ -1,6 +1,6 @@
1
- export { useStore } from '../chunk-6YI5J5ZN.js';
2
- import '../chunk-SZ65XCSZ.js';
3
- import '../chunk-ZI5XWXWG.js';
1
+ export { useStore } from '../chunk-6UG4IVUF.js';
2
+ import '../chunk-ZLLHL3NI.js';
3
+ import '../chunk-PTQVBPPN.js';
4
4
  import '../chunk-W354TTIE.js';
5
5
  import '../chunk-EHX45KZG.js';
6
6
  import '../chunk-BR56OEPZ.js';
@@ -33,7 +33,7 @@ import '../chunk-5XDPAKF5.js';
33
33
  import '../chunk-GCPEMNSU.js';
34
34
  import '../chunk-YDSWLCOY.js';
35
35
  import '../chunk-TYNZ5B2B.js';
36
- import '../chunk-L26XGP65.js';
36
+ import '../chunk-GFUXGVER.js';
37
37
  import '../chunk-AXW67SY7.js';
38
38
  import '../chunk-BYMOPN2S.js';
39
39
  import '../chunk-SKLEJJ6M.js';
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { registry } from './chunk-Y32RHCOH.js';
2
2
  export { ComponentRegistry, registry } from './chunk-Y32RHCOH.js';
3
- export { TwilightProvider } from './chunk-6YI5J5ZN.js';
4
- import './chunk-SZ65XCSZ.js';
5
- import './chunk-ZI5XWXWG.js';
3
+ export { TwilightProvider } from './chunk-6UG4IVUF.js';
4
+ import './chunk-ZLLHL3NI.js';
5
+ import './chunk-PTQVBPPN.js';
6
6
  import './chunk-W354TTIE.js';
7
7
  import './chunk-EHX45KZG.js';
8
8
  import './chunk-BR56OEPZ.js';
@@ -35,7 +35,7 @@ import './chunk-5XDPAKF5.js';
35
35
  import './chunk-GCPEMNSU.js';
36
36
  import './chunk-YDSWLCOY.js';
37
37
  import './chunk-TYNZ5B2B.js';
38
- import './chunk-L26XGP65.js';
38
+ import './chunk-GFUXGVER.js';
39
39
  import './chunk-AXW67SY7.js';
40
40
  import './chunk-BYMOPN2S.js';
41
41
  import './chunk-SKLEJJ6M.js';
@@ -1,7 +1,7 @@
1
1
  import { product } from './chunk-SQXUWX4B.js';
2
- import './chunk-6YI5J5ZN.js';
3
- import './chunk-SZ65XCSZ.js';
4
- import './chunk-ZI5XWXWG.js';
2
+ import './chunk-6UG4IVUF.js';
3
+ import './chunk-ZLLHL3NI.js';
4
+ import './chunk-PTQVBPPN.js';
5
5
  import './chunk-W354TTIE.js';
6
6
  import './chunk-EHX45KZG.js';
7
7
  import './chunk-BR56OEPZ.js';
@@ -34,7 +34,7 @@ import { HookSlot } from './chunk-5XDPAKF5.js';
34
34
  import './chunk-GCPEMNSU.js';
35
35
  import './chunk-YDSWLCOY.js';
36
36
  import { useTranslation } from './chunk-TYNZ5B2B.js';
37
- import { LazyErrorPage } from './chunk-L26XGP65.js';
37
+ import { LazyErrorPage } from './chunk-GFUXGVER.js';
38
38
  import './chunk-AXW67SY7.js';
39
39
  import './chunk-BYMOPN2S.js';
40
40
  import './chunk-SKLEJJ6M.js';
@@ -151,5 +151,5 @@ function NotFoundPage(props = {}) {
151
151
  }
152
152
 
153
153
  export { NotFoundPage };
154
- //# sourceMappingURL=not-found-WFK6JU2O.js.map
155
- //# sourceMappingURL=not-found-WFK6JU2O.js.map
154
+ //# sourceMappingURL=not-found-M3ZPUVVC.js.map
155
+ //# sourceMappingURL=not-found-M3ZPUVVC.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/routes/product-short-link.ts","../src/routes/not-found.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAM,UAAA,GAAa,qBAAA;AAOZ,SAAS,mBAAmB,QAAA,EAA4D;AAC7F,EAAA,MAAM,WAAW,QAAA,CAAS,KAAA,CAAM,GAAG,CAAA,CAAE,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,MAAK,gBAAA,EAAiB,CAAA;AAAA,wBAChC,GAAA,CAAC,QAAA,EAAA,EAAS,IAAA,EAAK,kBAAA,EAAmB,CAAA;AAAA,wBAClC,GAAA,CAAC,QAAA,EAAA,EAAS,IAAA,EAAK,cAAA,EAAe;AAAA;AAAA;AAAA,GAChC;AAEJ","file":"not-found-WFK6JU2O.js","sourcesContent":["import { useEffect, useState } from 'react';\nimport { product } from '../api/product';\nimport { isLocale } from '../providers/locale-constants';\nimport { useLocation, useNavigate } from '../providers/NavigationProvider';\n\n/** Short codes are 5-10 letters/digits (e.g. `lvXvzln`). */\nconst SHORT_CODE = /^[A-Za-z0-9]{5,10}$/;\n\n/**\n * The product short code in a path shaped `/{locale}/{code}` or `/{code}` (the\n * store base is already stripped from the router's location), plus the locale\n * segment to keep when redirecting. `null` for any other path.\n */\nexport function parseShortLinkPath(pathname: string): { code: string; locale?: string } | null {\n const segments = pathname.split('/').filter(Boolean);\n if (segments.length === 2 && isLocale(segments[0]) && SHORT_CODE.test(segments[1])) {\n return { code: segments[1], locale: segments[0] };\n }\n if (segments.length === 1 && !isLocale(segments[0]) && SHORT_CODE.test(segments[0])) {\n return { code: segments[0] };\n }\n return null;\n}\n\n/** A product URL in the stores' \"new URLs\" format: `{sku}-{name}`, or `p{id}-{name}` without a SKU. */\nconst PRODUCT_KEY = /^([0-9A-Za-z]+)-./;\n\n/** The `{sku}` or `p{id}` key of `/{locale}/{sku}-{name}` or `/{sku}-{name}`, with that locale. */\nexport function parseProductKeyPath(pathname: string): { key: string; locale?: string } | null {\n const segments = pathname.split('/').filter(Boolean);\n const hasLocale = segments.length === 2 && isLocale(segments[0]);\n if (!hasLocale && (segments.length !== 1 || isLocale(segments[0]))) return null;\n const key = segments[segments.length - 1].match(PRODUCT_KEY)?.[1];\n if (!key) return null;\n return hasLocale ? { key, locale: segments[0] } : { key };\n}\n\nfunction productKeyOf(url: string | undefined): string | undefined {\n try {\n const last = new URL(url ?? '').pathname.split('/').filter(Boolean).pop() ?? '';\n return last.match(PRODUCT_KEY)?.[1];\n } catch {\n return undefined;\n }\n}\n\n/** Like Laravel: `p{id}` is the id; anything else is a SKU, which only search can find. */\nasync function findByProductKey(key: string): Promise<number | null> {\n const id = key.match(/^p(\\d+)$/)?.[1];\n if (id) return Number(id);\n const { items } = await product.list({ source: 'search', keyword: key, perPage: 50 });\n const found = items.find((item) => productKeyOf(item.url) === key);\n return found ? Number(found.id) : null;\n}\n\n/** The SEO slug from a product URL (`…/{slug}/p{id}`), `-` when it has none. */\nexport function slugFromProductUrl(url: string | undefined): string {\n try {\n const segments = new URL(url ?? '').pathname.split('/').filter(Boolean);\n const last = segments[segments.length - 1] ?? '';\n return /^p\\d+$/.test(last) && segments.length > 1 ? segments[segments.length - 2] : '-';\n } catch {\n return '-';\n }\n}\n\n/**\n * Resolves a product URL that matched no route, a short link (`/ar/lvXvzln`) or\n * a \"new URLs\" one (`/ar/1213asa-chocolate`), and replaces the URL with the\n * product's page. Returns `true` while a lookup is in flight (so the 404 isn't\n * flashed); settles to `false` when the path is neither or doesn't resolve.\n */\nexport function useProductShortLink(): boolean {\n const { pathname } = useLocation();\n const navigate = useNavigate();\n const shortLink = parseShortLinkPath(pathname);\n const productKey = parseProductKeyPath(pathname);\n const lookup = shortLink?.code ?? productKey?.key;\n const locale = shortLink?.locale ?? productKey?.locale;\n const isShortLink = !!shortLink;\n const [failed, setFailed] = useState<string | null>(null);\n\n useEffect(() => {\n if (!lookup) return;\n let cancelled = false;\n const productPath = isShortLink\n ? product\n .find(lookup)\n .then((found) => (found?.id ? `${slugFromProductUrl(found.url)}/p${found.id}` : null))\n : findByProductKey(lookup).then((id) => (id ? `-/p${id}` : null));\n productPath\n .then((path) => {\n if (cancelled) return;\n if (!path) return setFailed(lookup);\n navigate(`${locale ? `/${locale}` : ''}/${path}`, { replace: true });\n })\n .catch(() => !cancelled && setFailed(lookup));\n return () => {\n cancelled = true;\n };\n }, [lookup, isShortLink, locale, navigate]);\n\n return !!lookup && failed !== lookup;\n}\n","import type { ComponentType, ReactNode } from 'react';\nimport { HookSlot } from '../hooks';\nimport { useTranslation } from '../providers/I18nProvider';\nimport { ErrorPage } from '../components/common';\nimport { useProductShortLink } from './product-short-link';\n\nexport interface NotFoundPageProps {\n title?: string;\n message?: string;\n showHomeLink?: boolean;\n homeLinkText?: string;\n LinkComponent?: ComponentType<{\n to: string;\n className?: string;\n style?: React.CSSProperties;\n children: ReactNode;\n }>;\n}\n\nexport function NotFoundPage(props: NotFoundPageProps = {}) {\n const { t } = useTranslation();\n // A product short link (`/ar/lvXvzln`) or \"new URLs\" link (`/ar/1213asa-name`) matches no route; resolve it instead of 404ing.\n const resolvingShortLink = useProductShortLink();\n\n const {\n title = t('common.errors.404') || 'Page Not Found',\n message = t('common.errors.error_occurred') ||\n 'The page you are looking for does not exist or has been moved.',\n showHomeLink = true,\n homeLinkText = t('common.elements.back_home') || 'Back to Home',\n LinkComponent,\n } = props;\n\n if (resolvingShortLink) return null;\n\n return (\n <ErrorPage\n code={404}\n title={title}\n message={message}\n showAction={showHomeLink}\n actionText={homeLinkText}\n LinkComponent={LinkComponent}\n >\n <HookSlot name=\"notfound:start\" />\n <HookSlot name=\"notfound:content\" />\n <HookSlot name=\"notfound:end\" />\n </ErrorPage>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/routes/product-short-link.ts","../src/routes/not-found.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAM,UAAA,GAAa,qBAAA;AAOZ,SAAS,mBAAmB,QAAA,EAA4D;AAC7F,EAAA,MAAM,WAAW,QAAA,CAAS,KAAA,CAAM,GAAG,CAAA,CAAE,OAAO,OAAO,CAAA;AACnD,EAAA,IAAI,QAAA,CAAS,MAAA,KAAW,CAAA,IAAK,QAAA,CAAS,QAAA,CAAS,CAAC,CAAC,CAAA,IAAK,UAAA,CAAW,IAAA,CAAK,QAAA,CAAS,CAAC,CAAC,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e;AAAA;AAAA;AAAA,GAChC;AAEJ","file":"not-found-M3ZPUVVC.js","sourcesContent":["import { useEffect, useState } from 'react';\nimport { product } from '../api/product';\nimport { isLocale } from '../providers/locale-constants';\nimport { useLocation, useNavigate } from '../providers/NavigationProvider';\n\n/** Short codes are 5-10 letters/digits (e.g. `lvXvzln`). */\nconst SHORT_CODE = /^[A-Za-z0-9]{5,10}$/;\n\n/**\n * The product short code in a path shaped `/{locale}/{code}` or `/{code}` (the\n * store base is already stripped from the router's location), plus the locale\n * segment to keep when redirecting. `null` for any other path.\n */\nexport function parseShortLinkPath(pathname: string): { code: string; locale?: string } | null {\n const segments = pathname.split('/').filter(Boolean);\n if (segments.length === 2 && isLocale(segments[0]) && SHORT_CODE.test(segments[1])) {\n return { code: segments[1], locale: segments[0] };\n }\n if (segments.length === 1 && !isLocale(segments[0]) && SHORT_CODE.test(segments[0])) {\n return { code: segments[0] };\n }\n return null;\n}\n\n/** A product URL in the stores' \"new URLs\" format: `{sku}-{name}`, or `p{id}-{name}` without a SKU. */\nconst PRODUCT_KEY = /^([0-9A-Za-z]+)-./;\n\n/** The `{sku}` or `p{id}` key of `/{locale}/{sku}-{name}` or `/{sku}-{name}`, with that locale. */\nexport function parseProductKeyPath(pathname: string): { key: string; locale?: string } | null {\n const segments = pathname.split('/').filter(Boolean);\n const hasLocale = segments.length === 2 && isLocale(segments[0]);\n if (!hasLocale && (segments.length !== 1 || isLocale(segments[0]))) return null;\n const key = segments[segments.length - 1].match(PRODUCT_KEY)?.[1];\n if (!key) return null;\n return hasLocale ? { key, locale: segments[0] } : { key };\n}\n\nfunction productKeyOf(url: string | undefined): string | undefined {\n try {\n const last = new URL(url ?? '').pathname.split('/').filter(Boolean).pop() ?? '';\n return last.match(PRODUCT_KEY)?.[1];\n } catch {\n return undefined;\n }\n}\n\n/** Like Laravel: `p{id}` is the id; anything else is a SKU, which only search can find. */\nasync function findByProductKey(key: string): Promise<number | null> {\n const id = key.match(/^p(\\d+)$/)?.[1];\n if (id) return Number(id);\n const { items } = await product.list({ source: 'search', keyword: key, perPage: 50 });\n const found = items.find((item) => productKeyOf(item.url) === key);\n return found ? Number(found.id) : null;\n}\n\n/** The SEO slug from a product URL (`…/{slug}/p{id}`), `-` when it has none. */\nexport function slugFromProductUrl(url: string | undefined): string {\n try {\n const segments = new URL(url ?? '').pathname.split('/').filter(Boolean);\n const last = segments[segments.length - 1] ?? '';\n return /^p\\d+$/.test(last) && segments.length > 1 ? segments[segments.length - 2] : '-';\n } catch {\n return '-';\n }\n}\n\n/**\n * Resolves a product URL that matched no route, a short link (`/ar/lvXvzln`) or\n * a \"new URLs\" one (`/ar/1213asa-chocolate`), and replaces the URL with the\n * product's page. Returns `true` while a lookup is in flight (so the 404 isn't\n * flashed); settles to `false` when the path is neither or doesn't resolve.\n */\nexport function useProductShortLink(): boolean {\n const { pathname } = useLocation();\n const navigate = useNavigate();\n const shortLink = parseShortLinkPath(pathname);\n const productKey = parseProductKeyPath(pathname);\n const lookup = shortLink?.code ?? productKey?.key;\n const locale = shortLink?.locale ?? productKey?.locale;\n const isShortLink = !!shortLink;\n const [failed, setFailed] = useState<string | null>(null);\n\n useEffect(() => {\n if (!lookup) return;\n let cancelled = false;\n const productPath = isShortLink\n ? product\n .find(lookup)\n .then((found) => (found?.id ? `${slugFromProductUrl(found.url)}/p${found.id}` : null))\n : findByProductKey(lookup).then((id) => (id ? `-/p${id}` : null));\n productPath\n .then((path) => {\n if (cancelled) return;\n if (!path) return setFailed(lookup);\n navigate(`${locale ? `/${locale}` : ''}/${path}`, { replace: true });\n })\n .catch(() => !cancelled && setFailed(lookup));\n return () => {\n cancelled = true;\n };\n }, [lookup, isShortLink, locale, navigate]);\n\n return !!lookup && failed !== lookup;\n}\n","import type { ComponentType, ReactNode } from 'react';\nimport { HookSlot } from '../hooks';\nimport { useTranslation } from '../providers/I18nProvider';\nimport { ErrorPage } from '../components/common';\nimport { useProductShortLink } from './product-short-link';\n\nexport interface NotFoundPageProps {\n title?: string;\n message?: string;\n showHomeLink?: boolean;\n homeLinkText?: string;\n LinkComponent?: ComponentType<{\n to: string;\n className?: string;\n style?: React.CSSProperties;\n children: ReactNode;\n }>;\n}\n\nexport function NotFoundPage(props: NotFoundPageProps = {}) {\n const { t } = useTranslation();\n // A product short link (`/ar/lvXvzln`) or \"new URLs\" link (`/ar/1213asa-name`) matches no route; resolve it instead of 404ing.\n const resolvingShortLink = useProductShortLink();\n\n const {\n title = t('common.errors.404') || 'Page Not Found',\n message = t('common.errors.error_occurred') ||\n 'The page you are looking for does not exist or has been moved.',\n showHomeLink = true,\n homeLinkText = t('common.elements.back_home') || 'Back to Home',\n LinkComponent,\n } = props;\n\n if (resolvingShortLink) return null;\n\n return (\n <ErrorPage\n code={404}\n title={title}\n message={message}\n showAction={showHomeLink}\n actionText={homeLinkText}\n LinkComponent={LinkComponent}\n >\n <HookSlot name=\"notfound:start\" />\n <HookSlot name=\"notfound:content\" />\n <HookSlot name=\"notfound:end\" />\n </ErrorPage>\n );\n}\n"]}
@@ -1,6 +1,6 @@
1
- export { TwilightProvider, registerDocumentSync, routeDocumentSyncs } from '../chunk-6YI5J5ZN.js';
2
- import '../chunk-SZ65XCSZ.js';
3
- import '../chunk-ZI5XWXWG.js';
1
+ export { TwilightProvider, registerDocumentSync, routeDocumentSyncs } from '../chunk-6UG4IVUF.js';
2
+ import '../chunk-ZLLHL3NI.js';
3
+ import '../chunk-PTQVBPPN.js';
4
4
  import '../chunk-W354TTIE.js';
5
5
  import '../chunk-EHX45KZG.js';
6
6
  import '../chunk-BR56OEPZ.js';
@@ -33,7 +33,7 @@ import '../chunk-5XDPAKF5.js';
33
33
  import '../chunk-GCPEMNSU.js';
34
34
  import '../chunk-YDSWLCOY.js';
35
35
  import '../chunk-TYNZ5B2B.js';
36
- import '../chunk-L26XGP65.js';
36
+ import '../chunk-GFUXGVER.js';
37
37
  import '../chunk-AXW67SY7.js';
38
38
  export { LinkProvider, LinkProviderError, createLinkWithAdapter, useLinkAdapter } from '../chunk-BYMOPN2S.js';
39
39
  import '../chunk-SKLEJJ6M.js';
@@ -1,4 +1,4 @@
1
- export { OrderSingle, OrderSinglePage, Orders, OrdersPage, orderSingleLoader, ordersLoader } from '../../chunk-YCHSWHTJ.js';
1
+ export { OrderSingle, OrderSinglePage, Orders, OrdersPage, orderSingleLoader, ordersLoader } from '../../chunk-GKKHNGLI.js';
2
2
  import '../../chunk-UKLYL5LM.js';
3
3
  import '../../chunk-4SZZPXM2.js';
4
4
  import '../../chunk-UWDUMPL7.js';
@@ -1,5 +1,5 @@
1
1
  import { wallet } from '../chunk-2CL6AEO4.js';
2
- export { OrderSingle, OrderSinglePage, Orders, OrdersPage, orderSingleLoader, ordersLoader } from '../chunk-YCHSWHTJ.js';
2
+ export { OrderSingle, OrderSinglePage, Orders, OrdersPage, orderSingleLoader, ordersLoader } from '../chunk-GKKHNGLI.js';
3
3
  import '../chunk-UKLYL5LM.js';
4
4
  import { notification } from '../chunk-BQ2MNEN7.js';
5
5
  import { wishlist } from '../chunk-OHUTM224.js';
@@ -31,7 +31,7 @@ async function profileLoader(_ctx) {
31
31
 
32
32
  // src/routes/account/profile/index.tsx
33
33
  var LazyProfilePage = lazy(
34
- () => import('../ProfilePage-3AHOU5XQ.js').then((m) => ({ default: m.ProfilePage }))
34
+ () => import('../ProfilePage-4W7DBXLW.js').then((m) => ({ default: m.ProfilePage }))
35
35
  );
36
36
  var ProfilePage = LazyProfilePage;
37
37
  var Profile = {
@@ -73,7 +73,7 @@ async function wishlistLoader(ctx) {
73
73
 
74
74
  // src/routes/account/wishlist/index.tsx
75
75
  var LazyWishlistPage = lazy(
76
- () => import('../WishlistPage-XG3S4T5U.js').then((m) => ({ default: m.WishlistPage }))
76
+ () => import('../WishlistPage-VULTU6K2.js').then((m) => ({ default: m.WishlistPage }))
77
77
  );
78
78
  var WishlistPage = LazyWishlistPage;
79
79
  var Wishlist = {
@@ -115,7 +115,7 @@ async function walletLoader(ctx) {
115
115
  }
116
116
 
117
117
  // src/routes/account/wallet/index.tsx
118
- var LazyWalletPage = lazy(() => import('../WalletPage-WSM62ZDH.js').then((m) => ({ default: m.WalletPage })));
118
+ var LazyWalletPage = lazy(() => import('../WalletPage-G7FOMHFX.js').then((m) => ({ default: m.WalletPage })));
119
119
  var WalletPage = LazyWalletPage;
120
120
  var Wallet = {
121
121
  id: RouteId.CUSTOMER_WALLET,
@@ -151,7 +151,7 @@ async function notificationsLoader(_ctx) {
151
151
 
152
152
  // src/routes/account/notifications/index.tsx
153
153
  var LazyNotificationsPage = lazy(
154
- () => import('../NotificationsPage-TKJLPSGS.js').then((m) => ({ default: m.NotificationsPage }))
154
+ () => import('../NotificationsPage-XKSW3DFD.js').then((m) => ({ default: m.NotificationsPage }))
155
155
  );
156
156
  var NotificationsPage = LazyNotificationsPage;
157
157
  var Notifications = {
@@ -184,7 +184,7 @@ async function settingsLoader(_ctx) {
184
184
 
185
185
  // src/routes/account/settings/index.tsx
186
186
  var LazySettingsPage = lazy(
187
- () => import('../SettingsPage-6STAABBW.js').then((m) => ({ default: m.SettingsPage }))
187
+ () => import('../SettingsPage-TEMXC3OF.js').then((m) => ({ default: m.SettingsPage }))
188
188
  );
189
189
  var SettingsPage = LazySettingsPage;
190
190
  var Settings = {
@@ -145,18 +145,18 @@ async function blogTagLoader({
145
145
  }
146
146
 
147
147
  // src/routes/blog/index.tsx
148
- var LazyBlogPage = lazy(() => import('../BlogPage-4QXLITAA.js').then((m) => ({ default: m.BlogPage })));
148
+ var LazyBlogPage = lazy(() => import('../BlogPage-TSRWNX6M.js').then((m) => ({ default: m.BlogPage })));
149
149
  var LazyBlogSinglePage = lazy(
150
- () => import('../BlogSinglePage-TRYJUPCB.js').then((m) => ({ default: m.BlogSinglePage }))
150
+ () => import('../BlogSinglePage-TLTW67S7.js').then((m) => ({ default: m.BlogSinglePage }))
151
151
  );
152
152
  var LazyBlogAuthorPage = lazy(
153
- () => import('../BlogAuthorPage-V4QPVVWU.js').then((m) => ({ default: m.BlogAuthorPage }))
153
+ () => import('../BlogAuthorPage-LHYDUFDA.js').then((m) => ({ default: m.BlogAuthorPage }))
154
154
  );
155
155
  var LazyBlogCategoryPage = lazy(
156
- () => import('../BlogCategoryPage-BSM63G5Q.js').then((m) => ({ default: m.BlogCategoryPage }))
156
+ () => import('../BlogCategoryPage-6BORI4YG.js').then((m) => ({ default: m.BlogCategoryPage }))
157
157
  );
158
158
  var LazyBlogTagPage = lazy(
159
- () => import('../BlogTagPage-2JKCTBIU.js').then((m) => ({ default: m.BlogTagPage }))
159
+ () => import('../BlogTagPage-RAMP5XNR.js').then((m) => ({ default: m.BlogTagPage }))
160
160
  );
161
161
  var BlogPage = LazyBlogPage;
162
162
  var BlogSinglePage = LazyBlogSinglePage;
@@ -24,7 +24,7 @@ async function brandsLoader() {
24
24
  }
25
25
 
26
26
  // src/routes/brands/index.tsx
27
- var LazyBrandsPage = lazy(() => import('../BrandsPage-PGCDHGOI.js').then((m) => ({ default: m.BrandsPage })));
27
+ var LazyBrandsPage = lazy(() => import('../BrandsPage-KUFEUFVZ.js').then((m) => ({ default: m.BrandsPage })));
28
28
  var BrandsPage = LazyBrandsPage;
29
29
  async function brandsLoaderWithExtend(_ctx, extend) {
30
30
  const data = await brandsLoader();
@@ -1,16 +1,16 @@
1
1
  import { cart } from '../chunk-F6XPGONG.js';
2
2
  import { loyalty } from '../chunk-QA4FBMFJ.js';
3
3
  import { CartSkeleton } from '../chunk-N7CCSGZF.js';
4
- import '../chunk-KLYTTMXN.js';
5
- import '../chunk-IQA2UPXP.js';
4
+ import '../chunk-5L37UNQQ.js';
5
+ import '../chunk-S5EVFWAL.js';
6
6
  import '../chunk-TWUOIBO7.js';
7
7
  import '../chunk-SQXUWX4B.js';
8
- import { LazySeoCartWidget, LazyCartItem, LazyCartSummary } from '../chunk-BHGZ622P.js';
9
- import '../chunk-TO6CJI2H.js';
8
+ import { LazySeoCartWidget, LazyCartItem, LazyCartSummary } from '../chunk-47C3MTZI.js';
9
+ import '../chunk-B2OJZKU4.js';
10
10
  import '../chunk-Y32RHCOH.js';
11
- import '../chunk-6YI5J5ZN.js';
12
- import '../chunk-SZ65XCSZ.js';
13
- import '../chunk-ZI5XWXWG.js';
11
+ import '../chunk-6UG4IVUF.js';
12
+ import '../chunk-ZLLHL3NI.js';
13
+ import '../chunk-PTQVBPPN.js';
14
14
  import '../chunk-W354TTIE.js';
15
15
  import '../chunk-EHX45KZG.js';
16
16
  import '../chunk-BR56OEPZ.js';
@@ -43,7 +43,7 @@ import { HookSlot } from '../chunk-5XDPAKF5.js';
43
43
  import '../chunk-GCPEMNSU.js';
44
44
  import '../chunk-YDSWLCOY.js';
45
45
  import { useTranslation } from '../chunk-TYNZ5B2B.js';
46
- import { LazyBreadcrumb, LazyNoContent } from '../chunk-L26XGP65.js';
46
+ import { LazyBreadcrumb, LazyNoContent } from '../chunk-GFUXGVER.js';
47
47
  import '../chunk-AXW67SY7.js';
48
48
  import '../chunk-BYMOPN2S.js';
49
49
  import '../chunk-SKLEJJ6M.js';
@@ -1,12 +1,12 @@
1
- export { Home, HomeSkeleton, homeLoader } from '../chunk-KLYTTMXN.js';
2
- export { DefaultHomeComponents, registerHomeComponentConfig, registerHomeComponents } from '../chunk-IQA2UPXP.js';
1
+ export { Home, HomeSkeleton, homeLoader } from '../chunk-5L37UNQQ.js';
2
+ export { DefaultHomeComponents, registerHomeComponentConfig, registerHomeComponents } from '../chunk-S5EVFWAL.js';
3
3
  import '../chunk-TWUOIBO7.js';
4
4
  import '../chunk-SQXUWX4B.js';
5
- import '../chunk-TO6CJI2H.js';
5
+ import '../chunk-B2OJZKU4.js';
6
6
  import '../chunk-Y32RHCOH.js';
7
- import '../chunk-6YI5J5ZN.js';
8
- import '../chunk-SZ65XCSZ.js';
9
- import '../chunk-ZI5XWXWG.js';
7
+ import '../chunk-6UG4IVUF.js';
8
+ import '../chunk-ZLLHL3NI.js';
9
+ import '../chunk-PTQVBPPN.js';
10
10
  import '../chunk-W354TTIE.js';
11
11
  import '../chunk-EHX45KZG.js';
12
12
  import '../chunk-BR56OEPZ.js';
@@ -39,7 +39,7 @@ import '../chunk-5XDPAKF5.js';
39
39
  import '../chunk-GCPEMNSU.js';
40
40
  import '../chunk-YDSWLCOY.js';
41
41
  import '../chunk-TYNZ5B2B.js';
42
- import '../chunk-L26XGP65.js';
42
+ import '../chunk-GFUXGVER.js';
43
43
  import '../chunk-AXW67SY7.js';
44
44
  import '../chunk-BYMOPN2S.js';
45
45
  import '../chunk-SKLEJJ6M.js';
@@ -58,10 +58,10 @@ async function loyaltyPointsLoader(locale) {
58
58
 
59
59
  // src/routes/loyalty/index.tsx
60
60
  var LazyLoyaltyPage = lazy(
61
- () => import('../LoyaltyPage-QJIAYRU4.js').then((m) => ({ default: m.LoyaltyPage }))
61
+ () => import('../LoyaltyPage-YMK7SISF.js').then((m) => ({ default: m.LoyaltyPage }))
62
62
  );
63
63
  var LazyLoyaltyPointsPage = lazy(
64
- () => import('../LoyaltyPointsPage-A4QHYJXF.js').then((m) => ({ default: m.LoyaltyPointsPage }))
64
+ () => import('../LoyaltyPointsPage-V2463UQ6.js').then((m) => ({ default: m.LoyaltyPointsPage }))
65
65
  );
66
66
  var LoyaltyPage = LazyLoyaltyPage;
67
67
  var LoyaltyPointsPage = LazyLoyaltyPointsPage;
@@ -29,7 +29,7 @@ async function pageSingleLoader({ params }) {
29
29
  }
30
30
 
31
31
  // src/routes/page/index.tsx
32
- var LazyPageSingle = lazy(() => import('../PageSingle-K4W6RVAT.js').then((m) => ({ default: m.PageSingle })));
32
+ var LazyPageSingle = lazy(() => import('../PageSingle-MYDLIP55.js').then((m) => ({ default: m.PageSingle })));
33
33
  var PageSingleLazy = LazyPageSingle;
34
34
  async function loader(ctx, extend) {
35
35
  const data = await pageSingleLoader({ params: ctx.params });
@@ -1,15 +1,15 @@
1
1
  import { SORT_IDS, availableSortIds, sortOptions } from '../chunk-3LZJXKVO.js';
2
2
  import { category } from '../chunk-VUWBGAET.js';
3
3
  import { brand } from '../chunk-ENC6POPF.js';
4
- import { useReorderButtons, LazyTestimonials } from '../chunk-IQA2UPXP.js';
4
+ import { useReorderButtons, LazyTestimonials } from '../chunk-S5EVFWAL.js';
5
5
  import '../chunk-TWUOIBO7.js';
6
6
  import { product, parseNextPageToken } from '../chunk-SQXUWX4B.js';
7
7
  import { Drawer } from '../chunk-6TKIUG5C.js';
8
- import { ProductCard } from '../chunk-TO6CJI2H.js';
8
+ import { ProductCard } from '../chunk-B2OJZKU4.js';
9
9
  import { registry, COMPONENT_KEYS } from '../chunk-Y32RHCOH.js';
10
- import { useStore } from '../chunk-6YI5J5ZN.js';
11
- import '../chunk-SZ65XCSZ.js';
12
- import '../chunk-ZI5XWXWG.js';
10
+ import { useStore } from '../chunk-6UG4IVUF.js';
11
+ import '../chunk-ZLLHL3NI.js';
12
+ import '../chunk-PTQVBPPN.js';
13
13
  import '../chunk-W354TTIE.js';
14
14
  import '../chunk-EHX45KZG.js';
15
15
  import '../chunk-BR56OEPZ.js';
@@ -42,7 +42,7 @@ import { HookSlot } from '../chunk-5XDPAKF5.js';
42
42
  import '../chunk-GCPEMNSU.js';
43
43
  import { getAuthToken } from '../chunk-YDSWLCOY.js';
44
44
  import { useTranslation } from '../chunk-TYNZ5B2B.js';
45
- import { LazyBreadcrumb, Image, LazyNoContent, ProductCardSkeleton, LazyRenderWhenVisible } from '../chunk-L26XGP65.js';
45
+ import { LazyBreadcrumb, Image, LazyNoContent, ProductCardSkeleton, LazyRenderWhenVisible } from '../chunk-GFUXGVER.js';
46
46
  import '../chunk-AXW67SY7.js';
47
47
  import '../chunk-BYMOPN2S.js';
48
48
  import '../chunk-SKLEJJ6M.js';
@@ -1,11 +1,11 @@
1
- import { ProductsSlider, LazyTestimonials } from '../chunk-IQA2UPXP.js';
1
+ import { ProductsSlider, LazyTestimonials } from '../chunk-S5EVFWAL.js';
2
2
  import '../chunk-TWUOIBO7.js';
3
3
  import { product } from '../chunk-SQXUWX4B.js';
4
- import { ProductGallery, LazyProductDetails, LazyAddToCartForm } from '../chunk-TO6CJI2H.js';
4
+ import { ProductGallery, LazyProductDetails, LazyAddToCartForm } from '../chunk-B2OJZKU4.js';
5
5
  import '../chunk-Y32RHCOH.js';
6
- import { fastCheckoutScript } from '../chunk-6YI5J5ZN.js';
7
- import '../chunk-SZ65XCSZ.js';
8
- import '../chunk-ZI5XWXWG.js';
6
+ import { fastCheckoutScript } from '../chunk-6UG4IVUF.js';
7
+ import '../chunk-ZLLHL3NI.js';
8
+ import '../chunk-PTQVBPPN.js';
9
9
  import '../chunk-W354TTIE.js';
10
10
  import '../chunk-EHX45KZG.js';
11
11
  import '../chunk-BR56OEPZ.js';
@@ -38,7 +38,7 @@ import { HookSlot } from '../chunk-5XDPAKF5.js';
38
38
  import '../chunk-GCPEMNSU.js';
39
39
  import { getActiveCurrency } from '../chunk-YDSWLCOY.js';
40
40
  import { useTranslation } from '../chunk-TYNZ5B2B.js';
41
- import { LazyBreadcrumb, LazyRenderWhenVisible } from '../chunk-L26XGP65.js';
41
+ import { LazyBreadcrumb, LazyRenderWhenVisible } from '../chunk-GFUXGVER.js';
42
42
  import '../chunk-AXW67SY7.js';
43
43
  import '../chunk-BYMOPN2S.js';
44
44
  import '../chunk-SKLEJJ6M.js';
@@ -32,10 +32,10 @@ async function reviewsLoader() {
32
32
 
33
33
  // src/routes/testimonials/index.tsx
34
34
  var LazyTestimonialsPage = lazy(
35
- () => import('../TestimonialsPage-SUBZSLPR.js').then((m) => ({ default: m.TestimonialsPage }))
35
+ () => import('../TestimonialsPage-G2S3JQNT.js').then((m) => ({ default: m.TestimonialsPage }))
36
36
  );
37
37
  var LazyReviewsPage = lazy(
38
- () => import('../ReviewsPage-R6DODVH6.js').then((m) => ({ default: m.ReviewsPage }))
38
+ () => import('../ReviewsPage-G3IEPOOO.js').then((m) => ({ default: m.ReviewsPage }))
39
39
  );
40
40
  var TestimonialsPage = LazyTestimonialsPage;
41
41
  var ReviewsPage = LazyReviewsPage;
@@ -40,7 +40,7 @@ async function thankYouLoader({
40
40
 
41
41
  // src/routes/thank-you/index.tsx
42
42
  var LazyThankYouPage = lazy(
43
- () => import('../ThankYouPage-UA7EIVQ2.js').then((m) => ({ default: m.ThankYouPage }))
43
+ () => import('../ThankYouPage-HPF3PIAT.js').then((m) => ({ default: m.ThankYouPage }))
44
44
  );
45
45
  var ThankYouPage = LazyThankYouPage;
46
46
  async function loader(ctx, extend) {
package/dist/skeleton.js CHANGED
@@ -1,13 +1,13 @@
1
1
  export { BlogSkeleton, BreadcrumbSkeleton, CartSkeleton, CustomerLayoutSkeleton, CustomerPageSkeleton, PageSkeleton, ProductCardSkeleton, ProductDetailSkeleton, ProductGridSkeleton, SkeletonPulse } from './chunk-N7CCSGZF.js';
2
- export { HomeSkeleton } from './chunk-KLYTTMXN.js';
3
- import './chunk-IQA2UPXP.js';
2
+ export { HomeSkeleton } from './chunk-5L37UNQQ.js';
3
+ import './chunk-S5EVFWAL.js';
4
4
  import './chunk-TWUOIBO7.js';
5
5
  import './chunk-SQXUWX4B.js';
6
- import './chunk-TO6CJI2H.js';
6
+ import './chunk-B2OJZKU4.js';
7
7
  import './chunk-Y32RHCOH.js';
8
- import './chunk-6YI5J5ZN.js';
9
- import './chunk-SZ65XCSZ.js';
10
- import './chunk-ZI5XWXWG.js';
8
+ import './chunk-6UG4IVUF.js';
9
+ import './chunk-ZLLHL3NI.js';
10
+ import './chunk-PTQVBPPN.js';
11
11
  import './chunk-W354TTIE.js';
12
12
  import './chunk-EHX45KZG.js';
13
13
  import './chunk-BR56OEPZ.js';
@@ -40,7 +40,7 @@ import './chunk-5XDPAKF5.js';
40
40
  import './chunk-GCPEMNSU.js';
41
41
  import './chunk-YDSWLCOY.js';
42
42
  import './chunk-TYNZ5B2B.js';
43
- import './chunk-L26XGP65.js';
43
+ import './chunk-GFUXGVER.js';
44
44
  import './chunk-AXW67SY7.js';
45
45
  import './chunk-BYMOPN2S.js';
46
46
  import './chunk-SKLEJJ6M.js';
package/dist/tanstack.js CHANGED
@@ -1,4 +1,4 @@
1
- export { tanstackDocumentAdapter as attrs, createRouter, createTwilightRootRoute, useTanstackDocumentAttrs as useAttrs } from './chunk-QBIPTWOR.js';
1
+ export { tanstackDocumentAdapter as attrs, createRouter, createTwilightRootRoute, useTanstackDocumentAttrs as useAttrs } from './chunk-5N74JJ2Z.js';
2
2
  import { requestHostOf } from './chunk-LUFLN7WL.js';
3
3
  export { TanStackLinkAdapter, TanStackNavigationProvider, createTanStackLinkAdapter } from './chunk-LUFLN7WL.js';
4
4
  import './chunk-Z4Y55HWX.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-theme-engine",
3
- "version": "1.0.107",
3
+ "version": "1.0.108",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -4,6 +4,7 @@ import { SallaProductsList } from '@salla.sa/twilight-components-react';
4
4
  import { SallaProductsSlider } from '@salla.sa/twilight-components-react';
5
5
  import { product, ProductsListSource } from '../../api/product';
6
6
  import { ProductCard } from '../../components/product';
7
+ import { useTwilight } from '../../providers/TwilightProvider';
7
8
 
8
9
  interface ProductSource {
9
10
  source: ProductsListSource;
@@ -29,11 +30,14 @@ export interface FeaturedProductsStyle2Props {
29
30
  };
30
31
  }
31
32
 
33
+ // Like Twig Raed, the grid honors `vertical_fixed_products`; the slider never does.
32
34
  export const FeaturedProductsStyle2 = memo(function FeaturedProductsStyle2({
33
35
  data,
34
36
  }: FeaturedProductsStyle2Props) {
37
+ const { theme } = useTwilight();
35
38
  const items = data.items || [];
36
39
  const isSlider = data.is_slider ?? true;
40
+ const cardLayout = (theme.settings.vertical_fixed_products ?? true) ? 'vertical' : 'horizontal';
37
41
 
38
42
  const [activeTab, setActiveTab] = useState<string>(items[0]?.id || '');
39
43
  const [isAnimating, setIsAnimating] = useState(false);
@@ -110,10 +114,12 @@ export const FeaturedProductsStyle2 = memo(function FeaturedProductsStyle2({
110
114
  section.products?.source_value,
111
115
  section.products?.limit
112
116
  )}
113
- itemsClassName="s-products-list-horizontal-cards"
117
+ itemsClassName={`s-products-list-${cardLayout}-cards`}
114
118
  >
115
119
  {(products) =>
116
- products.map((product) => <ProductCard key={product.id} product={product} />)
120
+ products.map((product) => (
121
+ <ProductCard key={product.id} product={product} layout={cardLayout} />
122
+ ))
117
123
  }
118
124
  </SallaProductsList>
119
125
  )}
@@ -5,6 +5,7 @@ import { Link } from '../common';
5
5
  import { product, ProductsListSource } from '../../api/product';
6
6
  import { ProductCard } from '../../components/product';
7
7
  import { useTranslation } from '../../providers/I18nProvider';
8
+ import { useTwilight } from '../../providers/TwilightProvider';
8
9
 
9
10
  export interface FixedProductsProps {
10
11
  data: {
@@ -21,13 +22,15 @@ export interface FixedProductsProps {
21
22
 
22
23
  export function FixedProducts({ data }: FixedProductsProps) {
23
24
  const { t } = useTranslation();
25
+ const { theme } = useTwilight();
24
26
 
25
27
  const title = data.title;
26
28
  // The merchant's product count: a number, or the same as a string. Anything that
27
29
  // isn't a positive whole number falls back to what the API returns.
28
30
  const parsedLimit = Number(data.limit);
29
31
  const limit = Number.isInteger(parsedLimit) && parsedLimit > 0 ? parsedLimit : undefined;
30
- const isVertical = data.isVertical ?? true;
32
+ // Matches Twig Raed: `theme.settings.get('vertical_fixed_products', true)`.
33
+ const isVertical = data.isVertical ?? theme.settings.vertical_fixed_products ?? true;
31
34
 
32
35
  const { data: result, isLoading } = useQuery(
33
36
  product.queries.list({
@@ -67,7 +70,11 @@ export function FixedProducts({ data }: FixedProductsProps) {
67
70
  }
68
71
  >
69
72
  {products.slice(0, limit).map((product) => (
70
- <ProductCard key={product.id} product={product} />
73
+ <ProductCard
74
+ key={product.id}
75
+ product={product}
76
+ layout={isVertical ? 'vertical' : 'horizontal'}
77
+ />
71
78
  ))}
72
79
  </div>
73
80
  </Suspense>
@@ -1,14 +0,0 @@
1
- import { lazy } from 'react';
2
-
3
- // src/components/cart/lazy.ts
4
- var LazyCartItem = lazy(() => import('./CartItem-TYWGDMRV.js').then((m) => ({ default: m.CartItem })));
5
- var LazyCartSummary = lazy(
6
- () => import('./CartSummary-AKDPJ4OY.js').then((m) => ({ default: m.CartSummary }))
7
- );
8
- var LazySeoCartWidget = lazy(
9
- () => import('./SeoCartWidget-NJK3YIPC.js').then((m) => ({ default: m.SeoCartWidget }))
10
- );
11
-
12
- export { LazyCartItem, LazyCartSummary, LazySeoCartWidget };
13
- //# sourceMappingURL=chunk-BHGZ622P.js.map
14
- //# sourceMappingURL=chunk-BHGZ622P.js.map