@salla.sa/twilight-theme-engine 1.0.130 → 1.0.131

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 (228) hide show
  1. package/dist/{AddToCartForm-ZJIIU4I4.js → AddToCartForm-S73TIRFL.js} +3 -3
  2. package/dist/{AddToCartForm-ZJIIU4I4.js.map → AddToCartForm-S73TIRFL.js.map} +1 -1
  3. package/dist/{BlogAuthorPage-DNZSR42D.js → BlogAuthorPage-ISOONUBI.js} +17 -17
  4. package/dist/{BlogAuthorPage-DNZSR42D.js.map → BlogAuthorPage-ISOONUBI.js.map} +1 -1
  5. package/dist/{BlogCategoryPage-AC4DDQ7N.js → BlogCategoryPage-3CEQWDB7.js} +17 -17
  6. package/dist/{BlogCategoryPage-AC4DDQ7N.js.map → BlogCategoryPage-3CEQWDB7.js.map} +1 -1
  7. package/dist/{BlogPage-F5OY24RP.js → BlogPage-AYYUM3GY.js} +15 -15
  8. package/dist/{BlogPage-F5OY24RP.js.map → BlogPage-AYYUM3GY.js.map} +1 -1
  9. package/dist/{BlogSinglePage-YXC5WU3N.js → BlogSinglePage-NH7RZVLA.js} +15 -15
  10. package/dist/{BlogSinglePage-YXC5WU3N.js.map → BlogSinglePage-NH7RZVLA.js.map} +1 -1
  11. package/dist/{BlogTagPage-6QQ2CF2B.js → BlogTagPage-LONJWWDW.js} +17 -17
  12. package/dist/{BlogTagPage-6QQ2CF2B.js.map → BlogTagPage-LONJWWDW.js.map} +1 -1
  13. package/dist/{BrandsPage-UXWNTTT3.js → BrandsPage-DTV4FJBP.js} +16 -16
  14. package/dist/{BrandsPage-UXWNTTT3.js.map → BrandsPage-DTV4FJBP.js.map} +1 -1
  15. package/dist/{Breadcrumb-TUXEVRZZ.js → Breadcrumb-JCEPGH5A.js} +15 -15
  16. package/dist/{Breadcrumb-TUXEVRZZ.js.map → Breadcrumb-JCEPGH5A.js.map} +1 -1
  17. package/dist/{CartItem-B7AYUFGZ.js → CartItem-NTIU45BB.js} +15 -15
  18. package/dist/{CartItem-B7AYUFGZ.js.map → CartItem-NTIU45BB.js.map} +1 -1
  19. package/dist/{CartSummary-LSFD7QUY.js → CartSummary-GETYV24Q.js} +15 -15
  20. package/dist/{CartSummary-LSFD7QUY.js.map → CartSummary-GETYV24Q.js.map} +1 -1
  21. package/dist/{Copyright-HH2S2KDM.js → Copyright-W7RY445F.js} +3 -3
  22. package/dist/{Copyright-HH2S2KDM.js.map → Copyright-W7RY445F.js.map} +1 -1
  23. package/dist/{CustomerLayout-2NVQ6G72.js → CustomerLayout-P5QZJDMR.js} +15 -15
  24. package/dist/{CustomerLayout-2NVQ6G72.js.map → CustomerLayout-P5QZJDMR.js.map} +1 -1
  25. package/dist/{Footer-4LQIBAHJ.js → Footer-GANB36WN.js} +4 -4
  26. package/dist/{Footer-4LQIBAHJ.js.map → Footer-GANB36WN.js.map} +1 -1
  27. package/dist/{Header-VQTPIQPS.js → Header-IZ3UWIEO.js} +8 -8
  28. package/dist/{Header-VQTPIQPS.js.map → Header-IZ3UWIEO.js.map} +1 -1
  29. package/dist/{LiveEditorBar-DOSRO35J.js → LiveEditorBar-4AWOAJYX.js} +58 -9
  30. package/dist/LiveEditorBar-4AWOAJYX.js.map +1 -0
  31. package/dist/{LoyaltyPage-NSHSLS4O.js → LoyaltyPage-BNJO3BTK.js} +15 -15
  32. package/dist/{LoyaltyPage-NSHSLS4O.js.map → LoyaltyPage-BNJO3BTK.js.map} +1 -1
  33. package/dist/{LoyaltyPointsPage-7CUUKDLR.js → LoyaltyPointsPage-2OGOGII3.js} +6 -6
  34. package/dist/{LoyaltyPointsPage-7CUUKDLR.js.map → LoyaltyPointsPage-2OGOGII3.js.map} +1 -1
  35. package/dist/{MainMenu-NTSSUK6R.js → MainMenu-56OTUHET.js} +5 -5
  36. package/dist/{MainMenu-NTSSUK6R.js.map → MainMenu-56OTUHET.js.map} +1 -1
  37. package/dist/{MasterLayout-ZOT7XICQ.js → MasterLayout-DWXUEODB.js} +15 -15
  38. package/dist/{MasterLayout-ZOT7XICQ.js.map → MasterLayout-DWXUEODB.js.map} +1 -1
  39. package/dist/{MobileMenu-RBTT3KLS.js → MobileMenu-JJA7PHVS.js} +16 -16
  40. package/dist/{MobileMenu-RBTT3KLS.js.map → MobileMenu-JJA7PHVS.js.map} +1 -1
  41. package/dist/{NotificationsPage-T775PMFX.js → NotificationsPage-L57HNZRC.js} +15 -15
  42. package/dist/{NotificationsPage-T775PMFX.js.map → NotificationsPage-L57HNZRC.js.map} +1 -1
  43. package/dist/{OrderSinglePage-T5SKWUNW.js → OrderSinglePage-5FWWZ4TJ.js} +16 -16
  44. package/dist/{OrderSinglePage-T5SKWUNW.js.map → OrderSinglePage-5FWWZ4TJ.js.map} +1 -1
  45. package/dist/{OrdersPage-PGAD6DDY.js → OrdersPage-AE674QJO.js} +15 -15
  46. package/dist/{OrdersPage-PGAD6DDY.js.map → OrdersPage-AE674QJO.js.map} +1 -1
  47. package/dist/{PageSingle-6W7U5YLG.js → PageSingle-N5G42IIX.js} +3 -3
  48. package/dist/{PageSingle-6W7U5YLG.js.map → PageSingle-N5G42IIX.js.map} +1 -1
  49. package/dist/{ProductDetails-JFOFLMLV.js → ProductDetails-FWN3T7H7.js} +4 -4
  50. package/dist/{ProductDetails-JFOFLMLV.js.map → ProductDetails-FWN3T7H7.js.map} +1 -1
  51. package/dist/{ProfilePage-2HZYDJBM.js → ProfilePage-BXZJY55Z.js} +15 -15
  52. package/dist/{ProfilePage-2HZYDJBM.js.map → ProfilePage-BXZJY55Z.js.map} +1 -1
  53. package/dist/{ReviewsPage-FYAZU7FT.js → ReviewsPage-A7OXTEXY.js} +3 -3
  54. package/dist/{ReviewsPage-FYAZU7FT.js.map → ReviewsPage-A7OXTEXY.js.map} +1 -1
  55. package/dist/{SeoCartWidget-7SUVC6MT.js → SeoCartWidget-N3MOUSW7.js} +15 -15
  56. package/dist/{SeoCartWidget-7SUVC6MT.js.map → SeoCartWidget-N3MOUSW7.js.map} +1 -1
  57. package/dist/{SettingsPage-IBWVB4ZJ.js → SettingsPage-DFHGU5OH.js} +15 -15
  58. package/dist/{SettingsPage-IBWVB4ZJ.js.map → SettingsPage-DFHGU5OH.js.map} +1 -1
  59. package/dist/{StoreClosedNotification-CMOHA4LU.js → StoreClosedNotification-GNSQYWDS.js} +16 -16
  60. package/dist/{StoreClosedNotification-CMOHA4LU.js.map → StoreClosedNotification-GNSQYWDS.js.map} +1 -1
  61. package/dist/{TestimonialsPage-WJMIDBRM.js → TestimonialsPage-26OBKQAG.js} +3 -3
  62. package/dist/{TestimonialsPage-WJMIDBRM.js.map → TestimonialsPage-26OBKQAG.js.map} +1 -1
  63. package/dist/{ThankYouPage-NILOPG4H.js → ThankYouPage-7C3OC6P5.js} +15 -15
  64. package/dist/{ThankYouPage-NILOPG4H.js.map → ThankYouPage-7C3OC6P5.js.map} +1 -1
  65. package/dist/{WalletPage-5O553SIT.js → WalletPage-RA354UQQ.js} +16 -16
  66. package/dist/{WalletPage-5O553SIT.js.map → WalletPage-RA354UQQ.js.map} +1 -1
  67. package/dist/{WishlistPage-JPLKEMDX.js → WishlistPage-NTJW33VF.js} +17 -17
  68. package/dist/{WishlistPage-JPLKEMDX.js.map → WishlistPage-NTJW33VF.js.map} +1 -1
  69. package/dist/api/advertisement.js +2 -2
  70. package/dist/api/apps.js +2 -2
  71. package/dist/api/blog.js +3 -3
  72. package/dist/api/brands.js +3 -3
  73. package/dist/api/cart.js +3 -3
  74. package/dist/api/category.js +3 -3
  75. package/dist/api/client.js +1 -1
  76. package/dist/api/home.js +2 -2
  77. package/dist/api/loyalty.js +3 -3
  78. package/dist/api/menu.js +2 -2
  79. package/dist/api/notification.js +2 -2
  80. package/dist/api/order.js +3 -3
  81. package/dist/api/page.js +3 -3
  82. package/dist/api/product.js +3 -3
  83. package/dist/api/profile.js +1 -1
  84. package/dist/api/store.js +2 -2
  85. package/dist/api/translations.js +2 -2
  86. package/dist/api/user.js +2 -2
  87. package/dist/api/wallet.js +2 -2
  88. package/dist/api/wishlist.js +4 -4
  89. package/dist/{chunk-WYWI77EA.js → chunk-2Z7XKCT3.js} +3 -3
  90. package/dist/{chunk-WYWI77EA.js.map → chunk-2Z7XKCT3.js.map} +1 -1
  91. package/dist/{chunk-AN2PETFM.js → chunk-3FXRE7JW.js} +6 -6
  92. package/dist/{chunk-AN2PETFM.js.map → chunk-3FXRE7JW.js.map} +1 -1
  93. package/dist/{chunk-NLT6YWUD.js → chunk-4YYB4AUZ.js} +4 -4
  94. package/dist/{chunk-NLT6YWUD.js.map → chunk-4YYB4AUZ.js.map} +1 -1
  95. package/dist/{chunk-ITMXD75H.js → chunk-5LOWNXWH.js} +10 -10
  96. package/dist/{chunk-ITMXD75H.js.map → chunk-5LOWNXWH.js.map} +1 -1
  97. package/dist/{chunk-NITRRCQV.js → chunk-67XC4WLH.js} +4 -4
  98. package/dist/{chunk-NITRRCQV.js.map → chunk-67XC4WLH.js.map} +1 -1
  99. package/dist/{chunk-RQ72QOIC.js → chunk-6A42EQCV.js} +7 -7
  100. package/dist/{chunk-RQ72QOIC.js.map → chunk-6A42EQCV.js.map} +1 -1
  101. package/dist/{chunk-672DTSG4.js → chunk-6S2SIUOD.js} +7 -7
  102. package/dist/{chunk-672DTSG4.js.map → chunk-6S2SIUOD.js.map} +1 -1
  103. package/dist/{chunk-D423MW2M.js → chunk-77Z3U5JT.js} +3 -3
  104. package/dist/{chunk-D423MW2M.js.map → chunk-77Z3U5JT.js.map} +1 -1
  105. package/dist/{chunk-QYHNS2KS.js → chunk-B3EKF5HJ.js} +4 -4
  106. package/dist/{chunk-QYHNS2KS.js.map → chunk-B3EKF5HJ.js.map} +1 -1
  107. package/dist/{chunk-4SMWY54W.js → chunk-CBYM3JIG.js} +3 -3
  108. package/dist/{chunk-4SMWY54W.js.map → chunk-CBYM3JIG.js.map} +1 -1
  109. package/dist/{chunk-JLBDDH4N.js → chunk-CR3EY7K7.js} +3 -3
  110. package/dist/{chunk-JLBDDH4N.js.map → chunk-CR3EY7K7.js.map} +1 -1
  111. package/dist/{chunk-K3PQSDGA.js → chunk-DJHYJ2VY.js} +4 -4
  112. package/dist/{chunk-K3PQSDGA.js.map → chunk-DJHYJ2VY.js.map} +1 -1
  113. package/dist/{chunk-YSSJ2CQC.js → chunk-DSJE2TS2.js} +4 -4
  114. package/dist/{chunk-YSSJ2CQC.js.map → chunk-DSJE2TS2.js.map} +1 -1
  115. package/dist/{chunk-AIPIJWOC.js → chunk-EAKEYWYL.js} +3 -3
  116. package/dist/{chunk-AIPIJWOC.js.map → chunk-EAKEYWYL.js.map} +1 -1
  117. package/dist/{chunk-I5XU5BQH.js → chunk-ECMFNYPW.js} +3 -3
  118. package/dist/{chunk-I5XU5BQH.js.map → chunk-ECMFNYPW.js.map} +1 -1
  119. package/dist/{chunk-KME6DTES.js → chunk-FU52JCUN.js} +7 -7
  120. package/dist/{chunk-KME6DTES.js.map → chunk-FU52JCUN.js.map} +1 -1
  121. package/dist/{chunk-CGDUSBLK.js → chunk-GHACVKKD.js} +16 -16
  122. package/dist/{chunk-CGDUSBLK.js.map → chunk-GHACVKKD.js.map} +1 -1
  123. package/dist/{chunk-FHAHE46U.js → chunk-H2QBHOF2.js} +2 -2
  124. package/dist/{chunk-FHAHE46U.js.map → chunk-H2QBHOF2.js.map} +1 -1
  125. package/dist/{chunk-OR6HPFZT.js → chunk-HCCSVECA.js} +4 -4
  126. package/dist/{chunk-OR6HPFZT.js.map → chunk-HCCSVECA.js.map} +1 -1
  127. package/dist/chunk-IXHM24Z4.js +28 -0
  128. package/dist/chunk-IXHM24Z4.js.map +1 -0
  129. package/dist/{chunk-ELARAFMR.js → chunk-J2OPSCWD.js} +3 -3
  130. package/dist/{chunk-ELARAFMR.js.map → chunk-J2OPSCWD.js.map} +1 -1
  131. package/dist/{chunk-54FS47CL.js → chunk-KSGBNVBQ.js} +3 -3
  132. package/dist/{chunk-54FS47CL.js.map → chunk-KSGBNVBQ.js.map} +1 -1
  133. package/dist/{chunk-IUEYRDEI.js → chunk-MYW5QYWO.js} +3 -3
  134. package/dist/{chunk-IUEYRDEI.js.map → chunk-MYW5QYWO.js.map} +1 -1
  135. package/dist/{chunk-EDCRELH3.js → chunk-ONK7RUTK.js} +3 -3
  136. package/dist/{chunk-EDCRELH3.js.map → chunk-ONK7RUTK.js.map} +1 -1
  137. package/dist/{chunk-HH7WFQLN.js → chunk-OSIFK62D.js} +3 -3
  138. package/dist/{chunk-HH7WFQLN.js.map → chunk-OSIFK62D.js.map} +1 -1
  139. package/dist/{chunk-4FYLW5WS.js → chunk-QT5YXTED.js} +3 -3
  140. package/dist/{chunk-4FYLW5WS.js.map → chunk-QT5YXTED.js.map} +1 -1
  141. package/dist/{chunk-RXWWNPCR.js → chunk-R4CQNOSV.js} +27 -12
  142. package/dist/chunk-R4CQNOSV.js.map +1 -0
  143. package/dist/{chunk-52MZ4V5T.js → chunk-R5AR7QRY.js} +4 -4
  144. package/dist/{chunk-52MZ4V5T.js.map → chunk-R5AR7QRY.js.map} +1 -1
  145. package/dist/{chunk-T55LMU5R.js → chunk-RHMJ6VR7.js} +3 -3
  146. package/dist/{chunk-T55LMU5R.js.map → chunk-RHMJ6VR7.js.map} +1 -1
  147. package/dist/{chunk-BSGHOYMT.js → chunk-SOQN5WKL.js} +3 -3
  148. package/dist/{chunk-BSGHOYMT.js.map → chunk-SOQN5WKL.js.map} +1 -1
  149. package/dist/{chunk-5JN6P5L5.js → chunk-TUW2BXB3.js} +6 -6
  150. package/dist/{chunk-5JN6P5L5.js.map → chunk-TUW2BXB3.js.map} +1 -1
  151. package/dist/{chunk-YGCPRUT6.js → chunk-USDRQPA3.js} +3 -3
  152. package/dist/{chunk-YGCPRUT6.js.map → chunk-USDRQPA3.js.map} +1 -1
  153. package/dist/{chunk-SCM4P6QG.js → chunk-VRLPOATQ.js} +3 -3
  154. package/dist/{chunk-SCM4P6QG.js.map → chunk-VRLPOATQ.js.map} +1 -1
  155. package/dist/{chunk-2UQKQTPB.js → chunk-W4OJM7BD.js} +4 -4
  156. package/dist/{chunk-2UQKQTPB.js.map → chunk-W4OJM7BD.js.map} +1 -1
  157. package/dist/chunk-WW6B37EO.js +14 -0
  158. package/dist/{chunk-2A2NODLC.js.map → chunk-WW6B37EO.js.map} +1 -1
  159. package/dist/{chunk-AXPZEXJN.js → chunk-XDPKYHQJ.js} +3 -3
  160. package/dist/{chunk-AXPZEXJN.js.map → chunk-XDPKYHQJ.js.map} +1 -1
  161. package/dist/{chunk-GSI42HHP.js → chunk-XH36I3IM.js} +3 -3
  162. package/dist/{chunk-GSI42HHP.js.map → chunk-XH36I3IM.js.map} +1 -1
  163. package/dist/{chunk-ORBMN52O.js → chunk-Y22HI53V.js} +4 -4
  164. package/dist/{chunk-ORBMN52O.js.map → chunk-Y22HI53V.js.map} +1 -1
  165. package/dist/{chunk-5DVSAKNY.js → chunk-YOJTLXNS.js} +4 -4
  166. package/dist/{chunk-5DVSAKNY.js.map → chunk-YOJTLXNS.js.map} +1 -1
  167. package/dist/{chunk-EZP2KOEL.js → chunk-Z4MMMPKI.js} +4 -4
  168. package/dist/{chunk-EZP2KOEL.js.map → chunk-Z4MMMPKI.js.map} +1 -1
  169. package/dist/{chunk-X4A3D5O4.js → chunk-ZGU7B5F4.js} +3 -3
  170. package/dist/{chunk-X4A3D5O4.js.map → chunk-ZGU7B5F4.js.map} +1 -1
  171. package/dist/components/cart/index.js +1 -1
  172. package/dist/components/common/index.js +1 -1
  173. package/dist/components/drawer/index.js +13 -13
  174. package/dist/components/home/index.js +17 -17
  175. package/dist/components/layout/index.js +4 -4
  176. package/dist/components/live-editor/LiveEditorBar.d.ts.map +1 -1
  177. package/dist/components/live-editor/frame.d.ts +2 -0
  178. package/dist/components/live-editor/frame.d.ts.map +1 -1
  179. package/dist/components/live-editor/moves.d.ts +14 -0
  180. package/dist/components/live-editor/moves.d.ts.map +1 -0
  181. package/dist/components/product/index.js +14 -14
  182. package/dist/components/store/index.js +14 -14
  183. package/dist/dev/editor/index.js +1 -1
  184. package/dist/dev/index.js +1 -1
  185. package/dist/{document-class-2SKG4YZE.js → document-class-ZHPKTBSI.js} +11 -11
  186. package/dist/{document-class-2SKG4YZE.js.map → document-class-ZHPKTBSI.js.map} +1 -1
  187. package/dist/hooks/index.js +13 -13
  188. package/dist/hooks/useGtm.js +13 -13
  189. package/dist/hooks/useMoney.js +13 -13
  190. package/dist/hooks/useStore.js +13 -13
  191. package/dist/hooks/useUser.js +3 -3
  192. package/dist/index.js +13 -13
  193. package/dist/{navigation-WVVYQOOZ.js → navigation-7DJCQ7MJ.js} +5 -5
  194. package/dist/{navigation-WVVYQOOZ.js.map → navigation-7DJCQ7MJ.js.map} +1 -1
  195. package/dist/{navigation-7HBHI524.js → navigation-HC3IK4P7.js} +4 -4
  196. package/dist/{navigation-7HBHI524.js.map → navigation-HC3IK4P7.js.map} +1 -1
  197. package/dist/{not-found-ZN7HOUO4.js → not-found-ANC6EGYO.js} +16 -16
  198. package/dist/{not-found-ZN7HOUO4.js.map → not-found-ANC6EGYO.js.map} +1 -1
  199. package/dist/providers/index.js +13 -13
  200. package/dist/routes/account/orders.js +4 -4
  201. package/dist/routes/account.js +13 -13
  202. package/dist/routes/blog.js +8 -8
  203. package/dist/routes/brands.js +4 -4
  204. package/dist/routes/cart.js +22 -21
  205. package/dist/routes/cart.js.map +1 -1
  206. package/dist/routes/home/HomePage.d.ts.map +1 -1
  207. package/dist/routes/home.js +19 -18
  208. package/dist/routes/index.js +3 -3
  209. package/dist/routes/loyalty.js +5 -5
  210. package/dist/routes/page.js +4 -4
  211. package/dist/routes/product-listing.js +19 -19
  212. package/dist/routes/product.js +17 -17
  213. package/dist/routes/seo-redirects.js +3 -3
  214. package/dist/routes/testimonials.js +2 -2
  215. package/dist/routes/thank-you.js +4 -4
  216. package/dist/skeleton.js +19 -18
  217. package/dist/{store-lookup-KSHMPOFT.js → store-lookup-5SPFTCPN.js} +8 -8
  218. package/dist/{store-lookup-KSHMPOFT.js.map → store-lookup-5SPFTCPN.js.map} +1 -1
  219. package/dist/tanstack.js +11 -11
  220. package/dist/utils/index.js +2 -2
  221. package/package.json +1 -1
  222. package/tailwind/components/live-editor/LiveEditorBar.tsx.txt +80 -8
  223. package/tailwind/components/live-editor/frame.ts.txt +1 -1
  224. package/tailwind/components/live-editor/moves.ts.txt +38 -0
  225. package/tailwind/routes/home/HomePage.tsx.txt +32 -6
  226. package/dist/LiveEditorBar-DOSRO35J.js.map +0 -1
  227. package/dist/chunk-2A2NODLC.js +0 -14
  228. package/dist/chunk-RXWWNPCR.js.map +0 -1
@@ -82,5 +82,5 @@ function targetOf(node) {
82
82
  }
83
83
 
84
84
  export { BLOCK_ATTRIBUTE, FRAME_LOADED_ACTION, areaOf, editorFrame, postToEditor, previewTheme, targetOf };
85
- //# sourceMappingURL=chunk-FHAHE46U.js.map
86
- //# sourceMappingURL=chunk-FHAHE46U.js.map
85
+ //# sourceMappingURL=chunk-H2QBHOF2.js.map
86
+ //# sourceMappingURL=chunk-H2QBHOF2.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/live-editor/frame.ts"],"names":[],"mappings":";;;AAWO,IAAM,cAAA,GAAiB;AAAA,EAC5B,oBAAA;AAAA,EACA,sBAAA;AAAA,EACA;AACF,CAAA;AAGO,IAAM,mBAAA,GAAsB;AAQ5B,IAAM,eAAA,GAAkB;AAGxB,IAAM,cAAA,GAAiB,kBAAA;AAGvB,IAAM,cAAA,GAAiB;AAAA,EAC5B,MAAA,EAAQ,yCAAA;AAAA,EACR,MAAA,EAAQ;AACV,CAAA;AAKA,SAAS,YAAA,GAA8B;AACrC,EAAA,IAAI,MAAA,CAAO,IAAA,KAAS,MAAA,CAAO,GAAA,EAAK,OAAO,IAAA;AAEvC,EAAA,MAAM,QAAA,GAAW,MAAA,CAAO,QAAA,CAAS,eAAA,GAAkB,CAAC,CAAA;AACpD,EAAA,IAAI,UAAU,OAAO,QAAA;AACrB,EAAA,IAAI;AACF,IAAA,OAAO,SAAS,QAAA,GAAW,I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AK,IAAA,YAAgB,OAAA,GAAU,IAAA,CAAK,OAAA,CAAqB,eAAe,CAAA,GAAI,IAAA;AAChF,EAAA,OAAO,EAAA,EAAI;AACT,IAAA,IAAI,GAAG,YAAA,CAAa,eAAe,KAAK,MAAA,CAAO,EAAE,GAAG,OAAO,EAAA;AAC3D,IAAA,EAAA,GAAK,EAAA,CAAG,aAAA,EAAe,OAAA,CAAqB,eAAe,CAAA,IAAK,IAAA;AAAA,EAClE;AACA,EAAA,OAAO,IAAA;AACT","file":"chunk-FHAHE46U.js","sourcesContent":["/**\n * The storefront's side of the merchant theme editor's live preview: the editor\n * (`s.salla.sa/themes/editor`) frames the store, and the store tells it which\n * block, header or footer the merchant acted on, with the same `postMessage`\n * protocol the twig themes' `live-themes-editor.js` speaks.\n */\n\nimport { isEditorFrame } from '../../dev/schema-types';\nimport type { Theme } from '../../types';\n\n/** Where the theme editor runs. Messages go to the one that framed the page, never to `*`. */\nexport const EDITOR_ORIGINS = [\n 'https://s.salla.sa',\n 'https://salla.design',\n 'https://demostore.salla.sa',\n] as const;\n\n/** Sent once the page has loaded; the editor's preview health check waits for it. */\nexport const FRAME_LOADED_ACTION = 'design::iframe.loaded';\n\nexport type BlockAction = 'edit' | 'hide' | 'moveup' | 'movedown' | 'duplicate' | 'add' | 'delete';\n\nexport type LiveEditorMessage =\n `preview::${BlockAction}.component` | 'preview::edit.header' | 'preview::edit.footer';\n\n/** A home block, rendered by `HomeComponentRenderer`, carries its id here. */\nexport const BLOCK_ATTRIBUTE = 'data-live-block';\n\n/** A theme can name its header or footer for the editor: `data-live-editor=\"header\"`. */\nexport const AREA_ATTRIBUTE = 'data-live-editor';\n\n/** Header and footer of themes that don't mark theirs: the engine's own, and Raed's. */\nexport const AREA_FALLBACKS = {\n header: 'header.store-header, header.site-header',\n footer: '.store-footer',\n} as const;\n\nexport type Area = keyof typeof AREA_FALLBACKS;\n\n/** The origin of the page that frames this one, or `null` at the top or when unknown. */\nfunction parentOrigin(): string | null {\n if (window.self === window.top) return null;\n // Chromium and Safari name it directly; Firefox only through the referrer.\n const ancestor = window.location.ancestorOrigins?.[0];\n if (ancestor) return ancestor;\n try {\n return document.referrer ? new URL(document.referrer).origin : null;\n } catch {\n return null;\n }\n}\n\n/**\n * On a dev server, a page on another localhost port (an editor run locally, or\n * a test harness) can frame the store too. Not its own origin: that is the\n * engine's dev editor, which has its own controls.\n */\nfunction isLocalEditor(origin: string): boolean {\n if (origin === window.location.origin) return false;\n try {\n const { protocol, hostname } = new URL(origin);\n return protocol === 'http:' && (hostname === 'localhost' || hostname === '127.0.0.1');\n } catch {\n return false;\n }\n}\n\n/** The theme editor's origin when it frames this page, otherwise `null`. Browser only. */\nexport function editorOrigin(): string | null {\n if (typeof window === 'undefined') return null;\n let origin: string | null;\n try {\n origin = parentOrigin();\n } catch {\n return null;\n }\n if (!origin) return null;\n if ((EDITOR_ORIGINS as readonly string[]).includes(origin)) return origin;\n return import.meta.env.DEV && isLocalEditor(origin) ? origin : null;\n}\n\nexport interface EditorFrame {\n origin: string;\n /** The engine's own dev editor (`/__twilight/editor`): edits apply live, and blocks can't be hidden. */\n dev: boolean;\n}\n\n/** The editor framing this page, the merchant's or (on a dev server) the engine's own. Browser only. */\nexport function editorFrame(): EditorFrame | null {\n if (typeof window === 'undefined') return null;\n if (import.meta.env.DEV && isEditorFrame()) return { origin: window.location.origin, dev: true };\n const origin = editorOrigin();\n return origin ? { origin, dev: false } : null;\n}\n\n/**\n * The theme as the editor's preview shows it: a sticky header would pin over the\n * blocks scrolled under it and cover their action bar, so the header scrolls away.\n */\nexport function previewTheme(theme: Theme): Theme {\n if (theme.settings?.header_is_sticky === false) return theme;\n return { ...theme, settings: { ...theme.settings, header_is_sticky: false } };\n}\n\nexport function postToEditor(\n origin: string,\n action: LiveEditorMessage | typeof FRAME_LOADED_ACTION,\n data?: { id: string }\n): void {\n window.parent.postMessage({ action, data, is_salla: true }, origin);\n}\n\n/** The header or footer `el` stands for, if any. One inside a dialog (a sheet's copy) is not it. */\nexport function areaOf(el: Element): Area | null {\n if (el.closest('[role=\"dialog\"]')) return null;\n const marked = el.getAttribute(AREA_ATTRIBUTE);\n if (marked === 'header' || marked === 'footer') return marked;\n if (el.matches(AREA_FALLBACKS.header)) return 'header';\n if (el.matches(AREA_FALLBACKS.footer)) return 'footer';\n return null;\n}\n\n/** What the editor can act on: a block with an id, the header, or the footer. */\nexport const TARGET_SELECTOR = [\n `[${BLOCK_ATTRIBUTE}]`,\n `[${AREA_ATTRIBUTE}=\"header\"]`,\n `[${AREA_ATTRIBUTE}=\"footer\"]`,\n AREA_FALLBACKS.header,\n AREA_FALLBACKS.footer,\n].join(', ');\n\n/** The block, header or footer under `node`, nearest first. */\nexport function targetOf(node: EventTarget | null): HTMLElement | null {\n let el = node instanceof Element ? node.closest<HTMLElement>(TARGET_SELECTOR) : null;\n while (el) {\n if (el.hasAttribute(BLOCK_ATTRIBUTE) || areaOf(el)) return el;\n el = el.parentElement?.closest<HTMLElement>(TARGET_SELECTOR) ?? null;\n }\n return null;\n}\n"]}
1
+ {"version":3,"sources":["../src/components/live-editor/frame.ts"],"names":[],"mappings":";;;AAWO,IAAM,cAAA,GAAiB;AAAA,EAC5B,oBAAA;AAAA,EACA,sBAAA;AAAA,EACA;AACF,CAAA;AAGO,IAAM,mBAAA,GAAsB;AAQ5B,IAAM,eAAA,GAAkB;AAGxB,IAAM,cAAA,GAAiB,kBAAA;AAGvB,IAAM,cAAA,GAAiB;AAAA,EAC5B,MAAA,EAAQ,yCAAA;AAAA,EACR,MAAA,EAAQ;AACV,CAAA;AAKA,SAAS,YAAA,GAA8B;AACrC,EAAA,IAAI,MAAA,CAAO,IAAA,KAAS,MAAA,CAAO,GAAA,EAAK,OAAO,IAAA;AAEvC,EAAA,MAAM,QAAA,GAAW,MAAA,CAAO,QAAA,CAAS,eAAA,GAAkB,CAAC,CAAA;AACpD,EAAA,IAAI,UAAU,OAAO,QAAA;AACrB,EAAA,IAAI;AACF,IAAA,OAAO,SAA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,EAAA,IAAI,KAAK,IAAA,YAAgB,OAAA,GAAU,IAAA,CAAK,OAAA,CAAqB,eAAe,CAAA,GAAI,IAAA;AAChF,EAAA,OAAO,EAAA,EAAI;AACT,IAAA,IAAI,GAAG,YAAA,CAAa,eAAe,KAAK,MAAA,CAAO,EAAE,GAAG,OAAO,EAAA;AAC3D,IAAA,EAAA,GAAK,EAAA,CAAG,aAAA,EAAe,OAAA,CAAqB,eAAe,CAAA,IAAK,IAAA;AAAA,EAClE;AACA,EAAA,OAAO,IAAA;AACT","file":"chunk-H2QBHOF2.js","sourcesContent":["/**\n * The storefront's side of the merchant theme editor's live preview: the editor\n * (`s.salla.sa/themes/editor`) frames the store, and the store tells it which\n * block, header or footer the merchant acted on, with the same `postMessage`\n * protocol the twig themes' `live-themes-editor.js` speaks.\n */\n\nimport { isEditorFrame } from '../../dev/schema-types';\nimport type { Theme } from '../../types';\n\n/** Where the theme editor runs. Messages go to the one that framed the page, never to `*`. */\nexport const EDITOR_ORIGINS = [\n 'https://s.salla.sa',\n 'https://salla.design',\n 'https://demostore.salla.sa',\n] as const;\n\n/** Sent once the page has loaded; the editor's preview health check waits for it. */\nexport const FRAME_LOADED_ACTION = 'design::iframe.loaded';\n\nexport type BlockAction = 'edit' | 'hide' | 'moveup' | 'movedown' | 'duplicate' | 'add' | 'delete';\n\nexport type LiveEditorMessage =\n `preview::${BlockAction}.component` | 'preview::edit.header' | 'preview::edit.footer';\n\n/** A home block, rendered by `HomeComponentRenderer`, carries its id here. */\nexport const BLOCK_ATTRIBUTE = 'data-live-block';\n\n/** A theme can name its header or footer for the editor: `data-live-editor=\"header\"`. */\nexport const AREA_ATTRIBUTE = 'data-live-editor';\n\n/** Header and footer of themes that don't mark theirs: the engine's own, and Raed's. */\nexport const AREA_FALLBACKS = {\n header: 'header.store-header, header.site-header',\n footer: '.store-footer',\n} as const;\n\nexport type Area = keyof typeof AREA_FALLBACKS;\n\n/** The origin of the page that frames this one, or `null` at the top or when unknown. */\nfunction parentOrigin(): string | null {\n if (window.self === window.top) return null;\n // Chromium and Safari name it directly; Firefox only through the referrer.\n const ancestor = window.location.ancestorOrigins?.[0];\n if (ancestor) return ancestor;\n try {\n return document.referrer ? new URL(document.referrer).origin : null;\n } catch {\n return null;\n }\n}\n\n/**\n * On a dev server, a page on another localhost port (an editor run locally, or\n * a test harness) can frame the store too. Not its own origin: that is the\n * engine's dev editor, which has its own controls.\n */\nfunction isLocalEditor(origin: string): boolean {\n if (origin === window.location.origin) return false;\n try {\n const { protocol, hostname } = new URL(origin);\n return protocol === 'http:' && (hostname === 'localhost' || hostname === '127.0.0.1');\n } catch {\n return false;\n }\n}\n\n/** The theme editor's origin when it frames this page, otherwise `null`. Browser only. */\nexport function editorOrigin(): string | null {\n if (typeof window === 'undefined') return null;\n let origin: string | null;\n try {\n origin = parentOrigin();\n } catch {\n return null;\n }\n if (!origin) return null;\n if ((EDITOR_ORIGINS as readonly string[]).includes(origin)) return origin;\n return import.meta.env.DEV && isLocalEditor(origin) ? origin : null;\n}\n\nexport interface EditorFrame {\n origin: string;\n /** The engine's own dev editor (`/__twilight/editor`): edits apply live, and blocks can't be hidden. */\n dev: boolean;\n}\n\n/** The editor framing this page, the merchant's or (on a dev server) the engine's own. Browser only. */\nexport function editorFrame(): EditorFrame | null {\n if (typeof window === 'undefined') return null;\n if (import.meta.env.DEV && isEditorFrame()) return { origin: window.location.origin, dev: true };\n const origin = editorOrigin();\n return origin ? { origin, dev: false } : null;\n}\n\n/**\n * The theme as the editor's preview shows it: a sticky header would pin over the\n * blocks scrolled under it and cover their action bar, so the header scrolls away.\n */\nexport function previewTheme(theme: Theme): Theme {\n if (theme.settings?.header_is_sticky === false) return theme;\n return { ...theme, settings: { ...theme.settings, header_is_sticky: false } };\n}\n\nexport function postToEditor(\n origin: string,\n action: LiveEditorMessage | typeof FRAME_LOADED_ACTION,\n data?: { id: string; copy?: number; moved?: boolean }\n): void {\n window.parent.postMessage({ action, data, is_salla: true }, origin);\n}\n\n/** The header or footer `el` stands for, if any. One inside a dialog (a sheet's copy) is not it. */\nexport function areaOf(el: Element): Area | null {\n if (el.closest('[role=\"dialog\"]')) return null;\n const marked = el.getAttribute(AREA_ATTRIBUTE);\n if (marked === 'header' || marked === 'footer') return marked;\n if (el.matches(AREA_FALLBACKS.header)) return 'header';\n if (el.matches(AREA_FALLBACKS.footer)) return 'footer';\n return null;\n}\n\n/** What the editor can act on: a block with an id, the header, or the footer. */\nexport const TARGET_SELECTOR = [\n `[${BLOCK_ATTRIBUTE}]`,\n `[${AREA_ATTRIBUTE}=\"header\"]`,\n `[${AREA_ATTRIBUTE}=\"footer\"]`,\n AREA_FALLBACKS.header,\n AREA_FALLBACKS.footer,\n].join(', ');\n\n/** The block, header or footer under `node`, nearest first. */\nexport function targetOf(node: EventTarget | null): HTMLElement | null {\n let el = node instanceof Element ? node.closest<HTMLElement>(TARGET_SELECTOR) : null;\n while (el) {\n if (el.hasAttribute(BLOCK_ATTRIBUTE) || areaOf(el)) return el;\n el = el.parentElement?.closest<HTMLElement>(TARGET_SELECTOR) ?? null;\n }\n return null;\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { useOpeningHours } from './chunk-CGDUSBLK.js';
2
- import { useIsProduct } from './chunk-WYWI77EA.js';
1
+ import { useOpeningHours } from './chunk-GHACVKKD.js';
2
+ import { useIsProduct } from './chunk-2Z7XKCT3.js';
3
3
  import { useTranslation } from './chunk-TYNZ5B2B.js';
4
4
  import { useTwilight } from './chunk-DF6FBKDN.js';
5
5
  import { useState } from 'react';
@@ -54,5 +54,5 @@ function StoreClosedNotification(_props) {
54
54
  }
55
55
 
56
56
  export { StoreClosedNotification };
57
- //# sourceMappingURL=chunk-OR6HPFZT.js.map
58
- //# sourceMappingURL=chunk-OR6HPFZT.js.map
57
+ //# sourceMappingURL=chunk-HCCSVECA.js.map
58
+ //# sourceMappingURL=chunk-HCCSVECA.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/store/StoreClosedNotification.tsx"],"names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,UAAA,EAAY,MAAM,EAAA,EAAI,KAAA,EAAO,MAAA,EAAQ,cAAA,EAAgB,MAAA,EAAO;AAAA,YAE/E,QAAA,kBAAA,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,cAAA,EAAe;AAAA;AAAA,SAC9B;AAAA,wBACA,GAAA,CAAC,GAAA,EAAA,EAAE,KAAA,EAAO,EAAE,MAAA,EAAQ,CAAA,EAAG,SAAA,EAAW,QAAA,EAAU,IAAA,EAAM,CAAA,EAAE,EACjD,QAAA,EAAA,CAAA,CAAE,2BAAA,EAA6B;AAAA,UAC9B,YAAA,EAAc,qPAAkD,iBAAiB,CAAA,CAAA,CAAA;AAAA,UACjF,QAAA,EAAU;AAAA,SACX,CAAA,EACH;AAAA;AAAA;AAAA,GACF;AAEJ","file":"chunk-OR6HPFZT.js","sourcesContent":["import { useState } from 'react';\nimport { useIsProduct } from '../../providers/NavigationProvider';\nimport { useTwilight } from '../../providers/TwilightProvider';\nimport { useOpeningHours } from '../../hooks/useOpeningHours';\nimport { useTranslation } from '../../providers/I18nProvider';\n\nexport interface StoreClosedNotificationProps {\n /** Whether to show the notification (defaults to true when store is closed on product page) */\n show?: boolean;\n}\n\n/**\n * StoreClosedNotification - Shows a notification bar when the store is closed.\n *\n * Mirrors PHP ReceivingOrdersTimesWidget:\n * - Only shows on product pages\n * - Only shows when store is closed for receiving orders\n * - Displays when the store will open next\n * - Has a close button to dismiss\n *\n * Injected via hook registry at body:start.\n */\nexport function StoreClosedNotification(_props: StoreClosedNotificationProps) {\n const { store } = useTwilight();\n const { t } = useTranslation();\n const { isOpen, isEnabled, nextOpenFormatted } = useOpeningHours(store.settings?.opening_hours);\n const [dismissed, setDismissed] = useState(false);\n\n // Check if we're on a product page\n const isProductPage = useIsProduct();\n\n // Conditions: product page, opening hours enabled, store closed, not dismissed\n if (!isProductPage || !isEnabled || isOpen || dismissed || !nextOpenFormatted) {\n return null;\n }\n\n const handleClose = (e: React.MouseEvent) => {\n e.preventDefault();\n setDismissed(true);\n };\n\n return (\n <div\n className=\"store-notify\"\n id=\"store-closed-notification\"\n data-testid=\"store-closed-notification\"\n style={{\n backgroundColor: '#d63031',\n color: '#fff',\n padding: '10px 15px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n }}\n >\n <a\n href=\"#\"\n id=\"notify-close\"\n onClick={handleClose}\n style={{ position: 'absolute', left: 15, color: '#fff', textDecoration: 'none' }}\n >\n <i className=\"sicon-cancel\" />\n </a>\n <p style={{ margin: 0, textAlign: 'center', flex: 1 }}>\n {t('store.closed_notification', {\n defaultValue: `المتجر حاليا مغلق لاستقبال الطلبات وسيتم فتحه (${nextOpenFormatted})`,\n nextOpen: nextOpenFormatted,\n })}\n </p>\n </div>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/components/store/StoreClosedNotification.tsx"],"names":[],"mappings":";;;;;;;AAsBO,SAAS,wBAAwB,MAAA,EAAsC;AAC5E,EAAA,MAAM,EAAE,KAAA,EAAM,GAAI,WAAA,EAAY;AAC9B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAC7B,EAAA,MAAM,EAAE,QAAQ,SAAA,EAAW,iBAAA,KAAsB,eAAA,CAAgB,KAAA,CAAM,UAAU,aAAa,CAAA;AAC9F,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAI,SAAS,KAAK,CAAA;AAGhD,EAAA,MAAM,gBAAgB,YAAA,EAAa;AAGnC,EAAA,IAAI,CAAC,aAAA,IAAiB,CAAC,aAAa,MAAA,IAAU,SAAA,IAAa,CAAC,iBAAA,EAAmB;AAC7E,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,WAAA,GAAc,CAAC,CAAA,KAAwB;AAC3C,IAAA,CAAA,CAAE,cAAA,EAAe;AACjB,IAAA,YAAA,CAAa,IAAI,CAAA;AAAA,EACnB,CAAA;AAEA,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAU,cAAA;AAAA,MACV,EAAA,EAAG,2BAAA;AAAA,MACH,aAAA,EAAY,2BAAA;AAAA,MACZ,KAAA,EAAO;AAAA,QACL,eAAA,EAAiB,SAAA;AAAA,QACjB,KAAA,EAAO,MAAA;AAAA,QACP,OAAA,EAAS,WAAA;AAAA,QACT,OAAA,EAAS,MAAA;AAAA,QACT,UAAA,EAAY,QAAA;AAAA,QACZ,cAAA,EAAgB,QAAA;AAAA,QAChB,QAAA,EAAU;AAAA,OACZ;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,GAAA;AAAA,UAAA;AAAA,YACC,IAAA,EAAK,GAAA;AAAA,YACL,EAAA,EAAG,cAAA;AAAA,YACH,OAAA,EAAS,WAAA;AAAA,YACT,KAAA,EAAO,EAAE,QAAA,EAAU,UAAA,EAAY,MAAM,EAAA,EAAI,KAAA,EAAO,MAAA,EAAQ,cAAA,EAAgB,MAAA,EAAO;AAAA,YAE/E,QAAA,kBAAA,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,cAAA,EAAe;AAAA;AAAA,SAC9B;AAAA,wBACA,GAAA,CAAC,GAAA,EAAA,EAAE,KAAA,EAAO,EAAE,MAAA,EAAQ,CAAA,EAAG,SAAA,EAAW,QAAA,EAAU,IAAA,EAAM,CAAA,EAAE,EACjD,QAAA,EAAA,CAAA,CAAE,2BAAA,EAA6B;AAAA,UAC9B,YAAA,EAAc,qPAAkD,iBAAiB,CAAA,CAAA,CAAA;AAAA,UACjF,QAAA,EAAU;AAAA,SACX,CAAA,EACH;AAAA;AAAA;AAAA,GACF;AAEJ","file":"chunk-HCCSVECA.js","sourcesContent":["import { useState } from 'react';\nimport { useIsProduct } from '../../providers/NavigationProvider';\nimport { useTwilight } from '../../providers/TwilightProvider';\nimport { useOpeningHours } from '../../hooks/useOpeningHours';\nimport { useTranslation } from '../../providers/I18nProvider';\n\nexport interface StoreClosedNotificationProps {\n /** Whether to show the notification (defaults to true when store is closed on product page) */\n show?: boolean;\n}\n\n/**\n * StoreClosedNotification - Shows a notification bar when the store is closed.\n *\n * Mirrors PHP ReceivingOrdersTimesWidget:\n * - Only shows on product pages\n * - Only shows when store is closed for receiving orders\n * - Displays when the store will open next\n * - Has a close button to dismiss\n *\n * Injected via hook registry at body:start.\n */\nexport function StoreClosedNotification(_props: StoreClosedNotificationProps) {\n const { store } = useTwilight();\n const { t } = useTranslation();\n const { isOpen, isEnabled, nextOpenFormatted } = useOpeningHours(store.settings?.opening_hours);\n const [dismissed, setDismissed] = useState(false);\n\n // Check if we're on a product page\n const isProductPage = useIsProduct();\n\n // Conditions: product page, opening hours enabled, store closed, not dismissed\n if (!isProductPage || !isEnabled || isOpen || dismissed || !nextOpenFormatted) {\n return null;\n }\n\n const handleClose = (e: React.MouseEvent) => {\n e.preventDefault();\n setDismissed(true);\n };\n\n return (\n <div\n className=\"store-notify\"\n id=\"store-closed-notification\"\n data-testid=\"store-closed-notification\"\n style={{\n backgroundColor: '#d63031',\n color: '#fff',\n padding: '10px 15px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n }}\n >\n <a\n href=\"#\"\n id=\"notify-close\"\n onClick={handleClose}\n style={{ position: 'absolute', left: 15, color: '#fff', textDecoration: 'none' }}\n >\n <i className=\"sicon-cancel\" />\n </a>\n <p style={{ margin: 0, textAlign: 'center', flex: 1 }}>\n {t('store.closed_notification', {\n defaultValue: `المتجر حاليا مغلق لاستقبال الطلبات وسيتم فتحه (${nextOpenFormatted})`,\n nextOpen: nextOpenFormatted,\n })}\n </p>\n </div>\n );\n}\n"]}
@@ -0,0 +1,28 @@
1
+ import { useEffect } from 'react';
2
+
3
+ // src/components/live-editor/moves.ts
4
+ var mover = null;
5
+ function useLiveBlockMoves(onMove) {
6
+ useEffect(() => {
7
+ mover = onMove;
8
+ return () => {
9
+ if (mover === onMove) mover = null;
10
+ };
11
+ }, [onMove]);
12
+ }
13
+ function moveLiveBlock(from, to) {
14
+ if (!mover) return false;
15
+ mover(from, to);
16
+ return true;
17
+ }
18
+ function reorder(order, from, to) {
19
+ const next = [...order];
20
+ if (from === to || from < 0 || to < 0 || from >= next.length || to >= next.length) return next;
21
+ const [moved] = next.splice(from, 1);
22
+ next.splice(to, 0, moved);
23
+ return next;
24
+ }
25
+
26
+ export { moveLiveBlock, reorder, useLiveBlockMoves };
27
+ //# sourceMappingURL=chunk-IXHM24Z4.js.map
28
+ //# sourceMappingURL=chunk-IXHM24Z4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/live-editor/moves.ts"],"names":[],"mappings":";;;AAWA,IAAI,KAAA,GAAsB,IAAA;AAGnB,SAAS,kBAAkB,MAAA,EAAqB;AACrD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,KAAA,GAAQ,MAAA;AACR,IAAA,OAAO,MAAM;AACX,MAAA,IAAI,KAAA,KAAU,QAAQ,KAAA,GAAQ,IAAA;AAAA,IAChC,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AACb;AAGO,SAAS,aAAA,CAAc,MAAc,EAAA,EAAqB;AAC/D,EAAA,IAAI,CAAC,OAAO,OAAO,KAAA;AACnB,EAAA,KAAA,CAAM,MAAM,EAAE,CAAA;AACd,EAAA,OAAO,IAAA;AACT;AAGO,SAAS,OAAA,CAAQ,KAAA,EAA0B,IAAA,EAAc,EAAA,EAAsB;AACpF,EAAA,MAAM,IAAA,GAAO,CAAC,GAAG,KAAK,CAAA;AACtB,EAAA,IAAI,IAAA,KAAS,EAAA,IAAM,IAAA,GAAO,CAAA,IAAK,EAAA,GAAK,CAAA,IAAK,IAAA,IAAQ,IAAA,CAAK,MAAA,IAAU,EAAA,IAAM,IAAA,CAAK,MAAA,EAAQ,OAAO,IAAA;AAC1F,EAAA,MAAM,CAAC,KAAK,CAAA,GAAI,IAAA,CAAK,MAAA,CAAO,MAAM,CAAC,CAAA;AACnC,EAAA,IAAA,CAAK,MAAA,CAAO,EAAA,EAAI,CAAA,EAAG,KAAK,CAAA;AACxB,EAAA,OAAO,IAAA;AACT","file":"chunk-IXHM24Z4.js","sourcesContent":["/**\n * Moving a home block in the theme editor's preview without reloading it: the\n * editor saves the new order, and the home page shows it right away, the way\n * the twig themes' `live-themes-editor.js` moves a section on the page.\n */\n\nimport { useEffect } from 'react';\n\ntype Mover = (from: number, to: number) => void;\n\n/** The home page on screen, if any; it alone knows the order its blocks render in. */\nlet mover: Mover | null = null;\n\n/** Lets the bar move the page's blocks while the page is mounted. */\nexport function useLiveBlockMoves(onMove: Mover): void {\n useEffect(() => {\n mover = onMove;\n return () => {\n if (mover === onMove) mover = null;\n };\n }, [onMove]);\n}\n\n/** Moves the block rendered at `from` to `to`; `false` when no home page is on screen. */\nexport function moveLiveBlock(from: number, to: number): boolean {\n if (!mover) return false;\n mover(from, to);\n return true;\n}\n\n/** `order` with the entry at `from` moved to `to`; as it is when either is out of range. */\nexport function reorder(order: readonly number[], from: number, to: number): number[] {\n const next = [...order];\n if (from === to || from < 0 || to < 0 || from >= next.length || to >= next.length) return next;\n const [moved] = next.splice(from, 1);\n next.splice(to, 0, moved);\n return next;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { api } from './chunk-BSGHOYMT.js';
1
+ import { api } from './chunk-SOQN5WKL.js';
2
2
  import { queryOptions } from '@tanstack/react-query';
3
3
 
4
4
  var user = {
@@ -19,5 +19,5 @@ var user = {
19
19
  };
20
20
 
21
21
  export { user };
22
- //# sourceMappingURL=chunk-ELARAFMR.js.map
23
- //# sourceMappingURL=chunk-ELARAFMR.js.map
22
+ //# sourceMappingURL=chunk-J2OPSCWD.js.map
23
+ //# sourceMappingURL=chunk-J2OPSCWD.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/api/user.ts"],"names":[],"mappings":";;;AAIO,IAAM,IAAA,GAAO;AAAA,EAClB,KAAK,YAAkC;AACrC,IAAA,IAAI;AACF,MAAA,OAAO,MAAM,GAAA,CACV,GAAA,CAAI,WAAW,CAAA,CACf,MAAmC,CACnC,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,GAAG,CAAA,CAAE,IAAA,EAAM,IAAA,EAAM,QAAgB,CAAE,CAAA;AAAA,IACvD,SAAS,KAAA,EAAO;AACd,MAAA,OAAA,CAAQ,KAAA,CAAM,sBAAsB,KAAK,CAAA;AACzC,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,EACF,CAAA;AAAA,EAEA,OAAA,EAAS;AAAA,IACP,OAAA,EAAS,MACP,YAAA,CAA0B;AAAA,MACxB,QAAA,EAAU,CAAC,MAAA,EAAQ,SAAS,CAAA;AAAA,MAC5B,SAAS,IAAA,CAAK;AAAA,KACf;AAAA;AAEP","file":"chunk-ELARAFMR.js","sourcesContent":["import { queryOptions } from '@tanstack/react-query';\nimport { api } from './client';\nimport type { User } from '../types';\n\nexport const user = {\n get: async (): Promise<User | null> => {\n try {\n return await api\n .get('auth/user')\n .json<{ data: Omit<User, 'type'> }>()\n .then((r) => ({ ...r.data, type: 'user' as const }));\n } catch (error) {\n console.debug('[user.get] Failed:', error);\n return null;\n }\n },\n\n queries: {\n current: () =>\n queryOptions<User | null>({\n queryKey: ['user', 'current'],\n queryFn: user.get,\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["../src/api/user.ts"],"names":[],"mappings":";;;AAIO,IAAM,IAAA,GAAO;AAAA,EAClB,KAAK,YAAkC;AACrC,IAAA,IAAI;AACF,MAAA,OAAO,MAAM,GAAA,CACV,GAAA,CAAI,WAAW,CAAA,CACf,MAAmC,CACnC,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,GAAG,CAAA,CAAE,IAAA,EAAM,IAAA,EAAM,QAAgB,CAAE,CAAA;AAAA,IACvD,SAAS,KAAA,EAAO;AACd,MAAA,OAAA,CAAQ,KAAA,CAAM,sBAAsB,KAAK,CAAA;AACzC,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,EACF,CAAA;AAAA,EAEA,OAAA,EAAS;AAAA,IACP,OAAA,EAAS,MACP,YAAA,CAA0B;AAAA,MACxB,QAAA,EAAU,CAAC,MAAA,EAAQ,SAAS,CAAA;AAAA,MAC5B,SAAS,IAAA,CAAK;AAAA,KACf;AAAA;AAEP","file":"chunk-J2OPSCWD.js","sourcesContent":["import { queryOptions } from '@tanstack/react-query';\nimport { api } from './client';\nimport type { User } from '../types';\n\nexport const user = {\n get: async (): Promise<User | null> => {\n try {\n return await api\n .get('auth/user')\n .json<{ data: Omit<User, 'type'> }>()\n .then((r) => ({ ...r.data, type: 'user' as const }));\n } catch (error) {\n console.debug('[user.get] Failed:', error);\n return null;\n }\n },\n\n queries: {\n current: () =>\n queryOptions<User | null>({\n queryKey: ['user', 'current'],\n queryFn: user.get,\n }),\n },\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { getActiveScope, api } from './chunk-BSGHOYMT.js';
1
+ import { getActiveScope, api } from './chunk-SOQN5WKL.js';
2
2
  import { getTwilightContext } from './chunk-7VNVCHID.js';
3
3
  import { queryOptions } from '@tanstack/react-query';
4
4
 
@@ -25,5 +25,5 @@ var advertisement = {
25
25
  };
26
26
 
27
27
  export { advertisement, advertisementsFor };
28
- //# sourceMappingURL=chunk-54FS47CL.js.map
29
- //# sourceMappingURL=chunk-54FS47CL.js.map
28
+ //# sourceMappingURL=chunk-KSGBNVBQ.js.map
29
+ //# sourceMappingURL=chunk-KSGBNVBQ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/api/advertisement.ts"],"names":[],"mappings":";;;;AAkBO,SAAS,iBAAA,CACd,KACA,QAAA,EACiB;AACjB,EAAA,OAAO,GAAA,CAAI,MAAA;AAAA,IACT,CAAC,EAAA,KACC,KAAA,CAAM,QAAQ,EAAA,CAAG,KAAK,MACrB,EAAA,CAAG,KAAA,CAAM,QAAA,CAAS,KAAK,KAAM,CAAC,CAAC,YAAY,EAAA,CAAG,KAAA,CAAM,SAAS,QAAQ,CAAA;AAAA,GAC1E;AACF;AAEO,IAAM,aAAA,GAAgB;AAAA;AAAA,EAE3B,MAAM,YAAsC;AAE1C,IAAA,MAAM,EAAE,IAAA,EAAK,GAAI,MAAM,GAAA,CACpB,GAAA,CAAI,gBAAA,EAAkB,EAAE,OAAA,EAAS,GAAA,EAAM,CAAA,CACvC,IAAA,EAAiC;AACpC,IAAA,OAAO,KAAA,CAAM,OAAA,CAAQ,IAAI,CAAA,GAAI,OAAO,EAAC;AAAA,EACvC,CAAA;AAAA,EAEA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,MACJ,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,CAAC,gBAAA,EAAkB,kBAAA,EAAmB,CAAE,QAAQ,EAAE,KAAA,EAAO,cAAA,EAAe,EAAG,CAAA;AAAA,MACrF,OAAA,EAAS,MAAM,aAAA,CAAc,IAAA,EAAK;AAAA,MAClC,SAAA,EAAW,QAAA;AAAA;AAAA,MAEX,KAAA,EAAO;AAAA,KACR;AAAA;AAEP","file":"chunk-54FS47CL.js","sourcesContent":["import { queryOptions } from '@tanstack/react-query';\nimport { api, getActiveScope } from './client';\nimport { getTwilightContext } from '../twilight/context';\n\n/** A merchant's announcement bar, as `GET advertisements` returns it. */\nexport interface Advertisement {\n id: number;\n title?: string;\n description?: string;\n icon?: string | null;\n url?: string | null;\n target?: string | null;\n colors?: { bg?: string; text?: string };\n /** Page slugs the ad shows on (`salla.config` `page.slug`), or `all`. */\n pages?: string[];\n}\n\n/** The ads a page shows: the rule the API applies to `?page=`, run on the full list. */\nexport function advertisementsFor(\n ads: readonly Advertisement[],\n pageSlug: string | null | undefined\n): Advertisement[] {\n return ads.filter(\n (ad) =>\n Array.isArray(ad.pages) &&\n (ad.pages.includes('all') || (!!pageSlug && ad.pages.includes(pageSlug)))\n );\n}\n\nexport const advertisement = {\n /** Every active ad, unfiltered: one request serves all pages, filtered with `advertisementsFor`. */\n list: async (): Promise<Advertisement[]> => {\n // Short timeout: it is fetched with the store settings on every server render.\n const { data } = await api\n .get('advertisements', { timeout: 3000 })\n .json<{ data?: Advertisement[] }>();\n return Array.isArray(data) ? data : [];\n },\n\n queries: {\n list: () =>\n queryOptions({\n queryKey: ['advertisements', getTwilightContext().locale, { scope: getActiveScope() }],\n queryFn: () => advertisement.list(),\n staleTime: Infinity,\n // Awaited in rootBeforeLoad: a retry would double the 3s budget. `PageAdvertisements` retries.\n retry: 0,\n }),\n },\n};\n"]}
1
+ {"version":3,"sources":["../src/api/advertisement.ts"],"names":[],"mappings":";;;;AAkBO,SAAS,iBAAA,CACd,KACA,QAAA,EACiB;AACjB,EAAA,OAAO,GAAA,CAAI,MAAA;AAAA,IACT,CAAC,EAAA,KACC,KAAA,CAAM,QAAQ,EAAA,CAAG,KAAK,MACrB,EAAA,CAAG,KAAA,CAAM,QAAA,CAAS,KAAK,KAAM,CAAC,CAAC,YAAY,EAAA,CAAG,KAAA,CAAM,SAAS,QAAQ,CAAA;AAAA,GAC1E;AACF;AAEO,IAAM,aAAA,GAAgB;AAAA;AAAA,EAE3B,MAAM,YAAsC;AAE1C,IAAA,MAAM,EAAE,IAAA,EAAK,GAAI,MAAM,GAAA,CACpB,GAAA,CAAI,gBAAA,EAAkB,EAAE,OAAA,EAAS,GAAA,EAAM,CAAA,CACvC,IAAA,EAAiC;AACpC,IAAA,OAAO,KAAA,CAAM,OAAA,CAAQ,IAAI,CAAA,GAAI,OAAO,EAAC;AAAA,EACvC,CAAA;AAAA,EAEA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,MACJ,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,CAAC,gBAAA,EAAkB,kBAAA,EAAmB,CAAE,QAAQ,EAAE,KAAA,EAAO,cAAA,EAAe,EAAG,CAAA;AAAA,MACrF,OAAA,EAAS,MAAM,aAAA,CAAc,IAAA,EAAK;AAAA,MAClC,SAAA,EAAW,QAAA;AAAA;AAAA,MAEX,KAAA,EAAO;AAAA,KACR;AAAA;AAEP","file":"chunk-KSGBNVBQ.js","sourcesContent":["import { queryOptions } from '@tanstack/react-query';\nimport { api, getActiveScope } from './client';\nimport { getTwilightContext } from '../twilight/context';\n\n/** A merchant's announcement bar, as `GET advertisements` returns it. */\nexport interface Advertisement {\n id: number;\n title?: string;\n description?: string;\n icon?: string | null;\n url?: string | null;\n target?: string | null;\n colors?: { bg?: string; text?: string };\n /** Page slugs the ad shows on (`salla.config` `page.slug`), or `all`. */\n pages?: string[];\n}\n\n/** The ads a page shows: the rule the API applies to `?page=`, run on the full list. */\nexport function advertisementsFor(\n ads: readonly Advertisement[],\n pageSlug: string | null | undefined\n): Advertisement[] {\n return ads.filter(\n (ad) =>\n Array.isArray(ad.pages) &&\n (ad.pages.includes('all') || (!!pageSlug && ad.pages.includes(pageSlug)))\n );\n}\n\nexport const advertisement = {\n /** Every active ad, unfiltered: one request serves all pages, filtered with `advertisementsFor`. */\n list: async (): Promise<Advertisement[]> => {\n // Short timeout: it is fetched with the store settings on every server render.\n const { data } = await api\n .get('advertisements', { timeout: 3000 })\n .json<{ data?: Advertisement[] }>();\n return Array.isArray(data) ? data : [];\n },\n\n queries: {\n list: () =>\n queryOptions({\n queryKey: ['advertisements', getTwilightContext().locale, { scope: getActiveScope() }],\n queryFn: () => advertisement.list(),\n staleTime: Infinity,\n // Awaited in rootBeforeLoad: a retry would double the 3s budget. `PageAdvertisements` retries.\n retry: 0,\n }),\n },\n};\n"]}
@@ -4,7 +4,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  export { BlogSkeleton, BreadcrumbSkeleton, CustomerLayoutSkeleton, CustomerPageSkeleton, PageSkeleton, ProductCardSkeleton, ProductDetailSkeleton, ProductGridSkeleton, SkeletonPulse } from '@salla.sa/twilight-components-react';
5
5
 
6
6
  var LazyBreadcrumb = lazy(
7
- () => import('./Breadcrumb-TUXEVRZZ.js').then((m) => ({ default: m.Breadcrumb }))
7
+ () => import('./Breadcrumb-JCEPGH5A.js').then((m) => ({ default: m.Breadcrumb }))
8
8
  );
9
9
  var LazyNoContent = lazy(
10
10
  () => import('./NoContent-63TMCPGY.js').then((m) => ({ default: m.NoContent }))
@@ -153,5 +153,5 @@ function DeferredData({ promise, fallback, children }) {
153
153
  }
154
154
 
155
155
  export { DeferredData, Image, LazyBreadcrumb, LazyCurrencySymbol, LazyErrorPage, LazyNoContent, LazyRenderWhenVisible, resolveDeferred };
156
- //# sourceMappingURL=chunk-IUEYRDEI.js.map
157
- //# sourceMappingURL=chunk-IUEYRDEI.js.map
156
+ //# sourceMappingURL=chunk-MYW5QYWO.js.map
157
+ //# sourceMappingURL=chunk-MYW5QYWO.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/common/lazy.ts","../src/components/common/Image.tsx","../src/components/common/DeferredData.tsx"],"names":["Image","memo","DeferredRenderer","jsx"],"mappings":";;;;;AASO,IAAM,cAAA,GAAiB,IAAA;AAAA,EAAK,MACjC,OAAO,0BAAc,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,UAAA,EAAW,CAAE;AAChE;AAEO,IAAM,aAAA,GAAgB,IAAA;AAAA,EAAK,MAChC,OAAO,yBAAa,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,SAAA,EAAU,CAAE;AAC9D;AAEO,IAAM,qBAAA,GAAwB,IAAA;AAAA,EAAK,MACxC,OAAO,iCAAqB,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,iBAAA,EAAkB,CAAE;AAC9E;AAEO,IAAM,kBAAA,GAAqB,IAAA;AAAA,EAAK,MACrC,OAAO,8BAAkB,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,cAAA,EAAe,CAAE;AACxE;AAEO,IAAM,aAAA,GAAgB,IAAA;AAAA,EAAK,MAChC,OAAO,yBAAa,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAA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AA,uBACEA,GAAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,0BACEA,GAAAA,CAAC,oBAAiB,OAAA,EAAS,QAAA,EAAU,UAClC,QAAA,EACH,CAAA;AAAA,MAGF,QAAA,kBAAAA,GAAAA,CAAC,gBAAA,EAAA,EAAiB,OAAA,EAAS,UAAW,QAAA,EAAS;AAAA;AAAA,GACjD;AAEJ","file":"chunk-IUEYRDEI.js","sourcesContent":["import { lazy } from 'react';\n\n/**\n * Lazy-loaded common components\n * Use these for code-splitting non-critical components\n *\n * NOTE: Skeleton components are sourced from @salla.sa/twilight-components-react\n * because they must render instantly during route transitions.\n */\nexport const LazyBreadcrumb = lazy(() =>\n import('./Breadcrumb').then((m) => ({ default: m.Breadcrumb }))\n);\n\nexport const LazyNoContent = lazy(() =>\n import('./NoContent').then((m) => ({ default: m.NoContent }))\n);\n\nexport const LazyRenderWhenVisible = lazy(() =>\n import('./RenderWhenVisible').then((m) => ({ default: m.RenderWhenVisible }))\n);\n\nexport const LazyCurrencySymbol = lazy(() =>\n import('./CurrencySymbol').then((m) => ({ default: m.CurrencySymbol }))\n);\n\nexport const LazyErrorPage = lazy(() =>\n import('./ErrorPage').then((m) => ({ default: m.ErrorPage }))\n);\n","import { memo } from 'react';\nimport { getCdnImageSrcSet, getCdnImageUrl } from '../../utils/cdn-image';\n\nexport interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n /** Image source URL */\n src?: string;\n /** Alt text for accessibility */\n alt: string;\n /** Whether this image is above the fold / LCP candidate */\n priority?: boolean;\n /** Aspect ratio for CLS prevention (e.g. \"16/9\", \"1/1\", \"4/3\") */\n aspectRatio?: string;\n /** Object fit mode */\n objectFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';\n /** Mobile image source for <picture> element */\n mobileSrc?: string;\n /** Mobile breakpoint for <source> media query (default: 768px) */\n mobileBreakpoint?: number;\n /** Skip the wrapper div */\n noWrapper?: boolean;\n /**\n * CDN widths for a density `srcset`. Pass `sizes` so the browser picks a\n * candidate close to the displayed CSS size.\n */\n srcSetWidths?: readonly number[];\n}\n\n/**\n * Optimized Image component with native browser lazy loading.\n *\n * - Uses `loading=\"lazy\"` + `decoding=\"async\"` by default for below-the-fold images.\n * - Uses `loading=\"eager\"` + `fetchPriority=\"high\"` for priority (above-the-fold / LCP) images.\n * - Supports responsive `<picture>` with mobile source.\n * - Provides `aspectRatio` for CLS prevention.\n * - When `srcSetWidths` + `sizes` are set, emits a sized CDN `srcset`.\n */\nexport const Image = memo(function Image({\n src,\n alt,\n priority = false,\n aspectRatio,\n objectFit = 'cover',\n mobileSrc,\n mobileBreakpoint = 768,\n noWrapper = false,\n className = '',\n style,\n width,\n height,\n sizes,\n srcSet: srcSetProp,\n srcSetWidths,\n ...rest\n}: ImageProps) {\n if (!src) return null;\n\n const generatedSrcSet =\n srcSetProp || (srcSetWidths?.length ? getCdnImageSrcSet(src, srcSetWidths) : undefined);\n const generatedMobileSrcSet =\n srcSetWidths?.length && mobileSrc ? getCdnImageSrcSet(mobileSrc, srcSetWidths) : undefined;\n const cdnWidth = srcSetWidths?.length\n ? width != null && srcSetWidths.includes(Number(width))\n ? Number(width)\n : srcSetWidths[0]\n : width;\n // Width-only CDN URLs so `src` matches a srcset candidate for preload.\n const cdnOptions = generatedSrcSet ? { width: cdnWidth } : { width: cdnWidth, height };\n\n const optimizedSrc = getCdnImageUrl(src, cdnOptions);\n const optimizedMobileSrc = getCdnImageUrl(mobileSrc, cdnOptions);\n\n const objectFitClass = `object-${objectFit}`;\n const imgClasses = [className, objectFitClass].filter(Boolean).join(' ');\n\n const loadingProps: React.ImgHTMLAttributes<HTMLImageElement> = priority\n ? { loading: 'eager' as const, fetchPriority: 'high' as const, decoding: 'sync' as const }\n : { loading: 'lazy' as const, decoding: 'async' as const };\n\n const hasWrapper = !noWrapper && !!aspectRatio;\n\n const img = (\n <img\n src={optimizedSrc}\n alt={alt}\n className={imgClasses}\n width={width}\n height={height}\n sizes={sizes}\n srcSet={generatedSrcSet}\n // With a wrapper, `style` goes to the wrapper; otherwise it must land on the <img>.\n style={hasWrapper ? undefined : style}\n {...loadingProps}\n {...rest}\n />\n );\n\n const imgElement = optimizedMobileSrc ? (\n <picture>\n <source\n media={`(max-width: ${mobileBreakpoint}px)`}\n srcSet={generatedMobileSrcSet || optimizedMobileSrc}\n sizes={generatedMobileSrcSet ? sizes : undefined}\n />\n {img}\n </picture>\n ) : (\n img\n );\n\n if (!hasWrapper) {\n return imgElement;\n }\n\n return (\n <div className=\"relative overflow-hidden\" style={{ aspectRatio, ...style }}>\n {imgElement}\n </div>\n );\n});\n","import { Suspense, memo, use, type ReactNode } from 'react';\n\nexport interface DeferredDataProps<T> {\n promise: Promise<T> | T;\n fallback: ReactNode;\n children: (data: T) => ReactNode;\n}\n\nconst DEFERRED_KEY = Symbol.for('twilight.deferred');\n\ninterface DeferredState<T> {\n status: 'pending' | 'success' | 'error';\n value?: T;\n error?: unknown;\n}\n\nexport interface DeferredPromise<T> extends Promise<T> {\n [DEFERRED_KEY]?: DeferredState<T>;\n}\n\nconst seenPromises = typeof WeakSet !== 'undefined' ? new WeakSet() : null;\n\nfunction defer<T>(promise: Promise<T>): DeferredPromise<T> {\n const existing = (promise as DeferredPromise<T>)[DEFERRED_KEY];\n if (existing) return promise as DeferredPromise<T>;\n\n const state: DeferredState<T> = { status: 'pending' };\n\n const deferred = promise as DeferredPromise<T>;\n deferred[DEFERRED_KEY] = state;\n\n promise.then(\n (value) => {\n state.status = 'success';\n state.value = value;\n },\n (error) => {\n state.status = 'error';\n state.error = error;\n }\n );\n\n return deferred;\n}\n\nconst DeferredRenderer = memo(function DeferredRenderer<T>({\n promise,\n children,\n}: {\n promise: DeferredPromise<T>;\n children: (data: T) => ReactNode;\n}) {\n const state = promise[DEFERRED_KEY];\n\n if (state?.status === 'success') {\n return children(state.value!);\n }\n\n if (state?.status === 'error') {\n throw state.error;\n }\n\n const data = use(promise);\n return children(data);\n}) as <T>(props: { promise: DeferredPromise<T>; children: (data: T) => ReactNode }) => ReactNode;\n\nfunction DeferredFallback<T>({\n promise,\n fallback,\n children,\n}: {\n promise: DeferredPromise<T>;\n fallback: ReactNode;\n children: (data: T) => ReactNode;\n}) {\n const state = promise[DEFERRED_KEY];\n if (state?.status === 'success') {\n return children(state.value!);\n }\n return <>{fallback}</>;\n}\n\nexport function resolveDeferred<T>(\n promiseOrValue: Promise<T> | T | undefined\n): T | Promise<T> | undefined {\n if (promiseOrValue == null || !(promiseOrValue instanceof Promise)) return promiseOrValue;\n const deferred = defer(promiseOrValue);\n const state = deferred[DEFERRED_KEY];\n if (state?.status === 'success') return state.value as T;\n return promiseOrValue;\n}\n\nexport function DeferredData<T>({ promise, fallback, children }: DeferredDataProps<T>) {\n if (!(promise instanceof Promise)) {\n return children(promise);\n }\n\n if (seenPromises && promise instanceof Promise) seenPromises.add(promise);\n\n const deferred = defer(promise);\n const state = deferred[DEFERRED_KEY];\n\n if (state?.status === 'success') {\n return children(state.value!);\n }\n\n if (state?.status === 'error') {\n throw state.error;\n }\n\n return (\n <Suspense\n fallback={\n <DeferredFallback promise={deferred} fallback={fallback}>\n {children}\n </DeferredFallback>\n }\n >\n <DeferredRenderer promise={deferred}>{children}</DeferredRenderer>\n </Suspense>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/components/common/lazy.ts","../src/components/common/Image.tsx","../src/components/common/DeferredData.tsx"],"names":["Image","memo","DeferredRenderer","jsx"],"mappings":";;;;;AASO,IAAM,cAAA,GAAiB,IAAA;AAAA,EAAK,MACjC,OAAO,0BAAc,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,UAAA,EAAW,CAAE;AAChE;AAEO,IAAM,aAAA,GAAgB,IAAA;AAAA,EAAK,MAChC,OAAO,yBAAa,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,SAAA,EAAU,CAAE;AAC9D;AAEO,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S,OAAO,CAAA;AAAA,EACzB;AAEA,EAAA,IAAI,YAAA,IAAgB,OAAA,YAAmB,OAAA,EAAS,YAAA,CAAa,IAAI,OAAO,CAAA;AAExE,EAAA,MAAM,QAAA,GAAW,MAAM,OAAO,CAAA;AAC9B,EAAA,MAAM,KAAA,GAAQ,SAAS,YAAY,CAAA;AAEnC,EAAA,IAAI,KAAA,EAAO,WAAW,SAAA,EAAW;AAC/B,IAAA,OAAO,QAAA,CAAS,MAAM,KAAM,CAAA;AAAA,EAC9B;AAEA,EAAA,IAAI,KAAA,EAAO,WAAW,OAAA,EAAS;AAC7B,IAAA,MAAM,KAAA,CAAM,KAAA;AAAA,EACd;AAEA,EAAA,uBACEA,GAAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,0BACEA,GAAAA,CAAC,oBAAiB,OAAA,EAAS,QAAA,EAAU,UAClC,QAAA,EACH,CAAA;AAAA,MAGF,QAAA,kBAAAA,GAAAA,CAAC,gBAAA,EAAA,EAAiB,OAAA,EAAS,UAAW,QAAA,EAAS;AAAA;AAAA,GACjD;AAEJ","file":"chunk-MYW5QYWO.js","sourcesContent":["import { lazy } from 'react';\n\n/**\n * Lazy-loaded common components\n * Use these for code-splitting non-critical components\n *\n * NOTE: Skeleton components are sourced from @salla.sa/twilight-components-react\n * because they must render instantly during route transitions.\n */\nexport const LazyBreadcrumb = lazy(() =>\n import('./Breadcrumb').then((m) => ({ default: m.Breadcrumb }))\n);\n\nexport const LazyNoContent = lazy(() =>\n import('./NoContent').then((m) => ({ default: m.NoContent }))\n);\n\nexport const LazyRenderWhenVisible = lazy(() =>\n import('./RenderWhenVisible').then((m) => ({ default: m.RenderWhenVisible }))\n);\n\nexport const LazyCurrencySymbol = lazy(() =>\n import('./CurrencySymbol').then((m) => ({ default: m.CurrencySymbol }))\n);\n\nexport const LazyErrorPage = lazy(() =>\n import('./ErrorPage').then((m) => ({ default: m.ErrorPage }))\n);\n","import { memo } from 'react';\nimport { getCdnImageSrcSet, getCdnImageUrl } from '../../utils/cdn-image';\n\nexport interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n /** Image source URL */\n src?: string;\n /** Alt text for accessibility */\n alt: string;\n /** Whether this image is above the fold / LCP candidate */\n priority?: boolean;\n /** Aspect ratio for CLS prevention (e.g. \"16/9\", \"1/1\", \"4/3\") */\n aspectRatio?: string;\n /** Object fit mode */\n objectFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';\n /** Mobile image source for <picture> element */\n mobileSrc?: string;\n /** Mobile breakpoint for <source> media query (default: 768px) */\n mobileBreakpoint?: number;\n /** Skip the wrapper div */\n noWrapper?: boolean;\n /**\n * CDN widths for a density `srcset`. Pass `sizes` so the browser picks a\n * candidate close to the displayed CSS size.\n */\n srcSetWidths?: readonly number[];\n}\n\n/**\n * Optimized Image component with native browser lazy loading.\n *\n * - Uses `loading=\"lazy\"` + `decoding=\"async\"` by default for below-the-fold images.\n * - Uses `loading=\"eager\"` + `fetchPriority=\"high\"` for priority (above-the-fold / LCP) images.\n * - Supports responsive `<picture>` with mobile source.\n * - Provides `aspectRatio` for CLS prevention.\n * - When `srcSetWidths` + `sizes` are set, emits a sized CDN `srcset`.\n */\nexport const Image = memo(function Image({\n src,\n alt,\n priority = false,\n aspectRatio,\n objectFit = 'cover',\n mobileSrc,\n mobileBreakpoint = 768,\n noWrapper = false,\n className = '',\n style,\n width,\n height,\n sizes,\n srcSet: srcSetProp,\n srcSetWidths,\n ...rest\n}: ImageProps) {\n if (!src) return null;\n\n const generatedSrcSet =\n srcSetProp || (srcSetWidths?.length ? getCdnImageSrcSet(src, srcSetWidths) : undefined);\n const generatedMobileSrcSet =\n srcSetWidths?.length && mobileSrc ? getCdnImageSrcSet(mobileSrc, srcSetWidths) : undefined;\n const cdnWidth = srcSetWidths?.length\n ? width != null && srcSetWidths.includes(Number(width))\n ? Number(width)\n : srcSetWidths[0]\n : width;\n // Width-only CDN URLs so `src` matches a srcset candidate for preload.\n const cdnOptions = generatedSrcSet ? { width: cdnWidth } : { width: cdnWidth, height };\n\n const optimizedSrc = getCdnImageUrl(src, cdnOptions);\n const optimizedMobileSrc = getCdnImageUrl(mobileSrc, cdnOptions);\n\n const objectFitClass = `object-${objectFit}`;\n const imgClasses = [className, objectFitClass].filter(Boolean).join(' ');\n\n const loadingProps: React.ImgHTMLAttributes<HTMLImageElement> = priority\n ? { loading: 'eager' as const, fetchPriority: 'high' as const, decoding: 'sync' as const }\n : { loading: 'lazy' as const, decoding: 'async' as const };\n\n const hasWrapper = !noWrapper && !!aspectRatio;\n\n const img = (\n <img\n src={optimizedSrc}\n alt={alt}\n className={imgClasses}\n width={width}\n height={height}\n sizes={sizes}\n srcSet={generatedSrcSet}\n // With a wrapper, `style` goes to the wrapper; otherwise it must land on the <img>.\n style={hasWrapper ? undefined : style}\n {...loadingProps}\n {...rest}\n />\n );\n\n const imgElement = optimizedMobileSrc ? (\n <picture>\n <source\n media={`(max-width: ${mobileBreakpoint}px)`}\n srcSet={generatedMobileSrcSet || optimizedMobileSrc}\n sizes={generatedMobileSrcSet ? sizes : undefined}\n />\n {img}\n </picture>\n ) : (\n img\n );\n\n if (!hasWrapper) {\n return imgElement;\n }\n\n return (\n <div className=\"relative overflow-hidden\" style={{ aspectRatio, ...style }}>\n {imgElement}\n </div>\n );\n});\n","import { Suspense, memo, use, type ReactNode } from 'react';\n\nexport interface DeferredDataProps<T> {\n promise: Promise<T> | T;\n fallback: ReactNode;\n children: (data: T) => ReactNode;\n}\n\nconst DEFERRED_KEY = Symbol.for('twilight.deferred');\n\ninterface DeferredState<T> {\n status: 'pending' | 'success' | 'error';\n value?: T;\n error?: unknown;\n}\n\nexport interface DeferredPromise<T> extends Promise<T> {\n [DEFERRED_KEY]?: DeferredState<T>;\n}\n\nconst seenPromises = typeof WeakSet !== 'undefined' ? new WeakSet() : null;\n\nfunction defer<T>(promise: Promise<T>): DeferredPromise<T> {\n const existing = (promise as DeferredPromise<T>)[DEFERRED_KEY];\n if (existing) return promise as DeferredPromise<T>;\n\n const state: DeferredState<T> = { status: 'pending' };\n\n const deferred = promise as DeferredPromise<T>;\n deferred[DEFERRED_KEY] = state;\n\n promise.then(\n (value) => {\n state.status = 'success';\n state.value = value;\n },\n (error) => {\n state.status = 'error';\n state.error = error;\n }\n );\n\n return deferred;\n}\n\nconst DeferredRenderer = memo(function DeferredRenderer<T>({\n promise,\n children,\n}: {\n promise: DeferredPromise<T>;\n children: (data: T) => ReactNode;\n}) {\n const state = promise[DEFERRED_KEY];\n\n if (state?.status === 'success') {\n return children(state.value!);\n }\n\n if (state?.status === 'error') {\n throw state.error;\n }\n\n const data = use(promise);\n return children(data);\n}) as <T>(props: { promise: DeferredPromise<T>; children: (data: T) => ReactNode }) => ReactNode;\n\nfunction DeferredFallback<T>({\n promise,\n fallback,\n children,\n}: {\n promise: DeferredPromise<T>;\n fallback: ReactNode;\n children: (data: T) => ReactNode;\n}) {\n const state = promise[DEFERRED_KEY];\n if (state?.status === 'success') {\n return children(state.value!);\n }\n return <>{fallback}</>;\n}\n\nexport function resolveDeferred<T>(\n promiseOrValue: Promise<T> | T | undefined\n): T | Promise<T> | undefined {\n if (promiseOrValue == null || !(promiseOrValue instanceof Promise)) return promiseOrValue;\n const deferred = defer(promiseOrValue);\n const state = deferred[DEFERRED_KEY];\n if (state?.status === 'success') return state.value as T;\n return promiseOrValue;\n}\n\nexport function DeferredData<T>({ promise, fallback, children }: DeferredDataProps<T>) {\n if (!(promise instanceof Promise)) {\n return children(promise);\n }\n\n if (seenPromises && promise instanceof Promise) seenPromises.add(promise);\n\n const deferred = defer(promise);\n const state = deferred[DEFERRED_KEY];\n\n if (state?.status === 'success') {\n return children(state.value!);\n }\n\n if (state?.status === 'error') {\n throw state.error;\n }\n\n return (\n <Suspense\n fallback={\n <DeferredFallback promise={deferred} fallback={fallback}>\n {children}\n </DeferredFallback>\n }\n >\n <DeferredRenderer promise={deferred}>{children}</DeferredRenderer>\n </Suspense>\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { configureNavigation, UnauthorizedError, NavigationProvider, resolveRelativePath } from './chunk-WYWI77EA.js';
1
+ import { configureNavigation, UnauthorizedError, NavigationProvider, resolveRelativePath } from './chunk-2Z7XKCT3.js';
2
2
  import { LinkProvider } from './chunk-BYMOPN2S.js';
3
3
  import { useIsNativeApp } from './chunk-2TLIULJZ.js';
4
4
  import { onSallaEvent } from './chunk-GYXUYHKO.js';
@@ -188,5 +188,5 @@ function TanStackNavigationProvider({ children }) {
188
188
  }
189
189
 
190
190
  export { NavigationSetup, TanStackLinkAdapter, TanStackNavigationProvider, createTanStackLinkAdapter, requestHostOf };
191
- //# sourceMappingURL=chunk-EDCRELH3.js.map
192
- //# sourceMappingURL=chunk-EDCRELH3.js.map
191
+ //# sourceMappingURL=chunk-ONK7RUTK.js.map
192
+ //# sourceMappingURL=chunk-ONK7RUTK.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/tanstack/link.tsx","../src/tanstack/native-app-events.tsx","../src/utils/request-host.ts","../src/tanstack/navigation.tsx"],"names":["TanStackLink","tanstackNotFound","tanstackRedirect","useParams","jsx"],"mappings":";;;;;;;;;;;;AAWO,SAAS,mBAAA,CAAoB,aAAqB,MAAA,EAAiB;AACxE,EAAA,IAAI,CAAC,MAAA,IAAU,CAAC,WAAA,CAAY,UAAA,CAAW,GAAG,CAAA,IAAK,WAAA,CAAY,UAAA,CAAW,IAAI,CAAA,EAAG,OAAO,WAAA;AACpF,EAAA,MAAM,YAAA,GAAe,WAAA,CAAY,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAAA,EAAG,KAAA,CAAM,MAAM,CAAA,CAAE,CAAC,CAAA;AAC/D,EAAA,IAAI,QAAA,CAAS,YAAY,CAAA,EAAG,OAAO,WAAA;AACnC,EAAA,OAAO,WAAA,KAAgB,MAAM,CAAA,CAAA,EAAI,MAAM,KAAK,CAAA,CAAA,EAAI,MAAM,GAAG,WAAW,CAAA,CAAA;AACtE;AAMO,IAAM,mBA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EAAE,MAAA,EAAQ,OAAO,CAAA;AAC9C,EAAA,MAAM,UAAA,GAAa,WAAA;AAAA,IACjB,CAAC,EAAA,EAAY,IAAA,KACX,QAAA,CAAS,EAAE,EAAA,EAAI,mBAAA,CAAoB,EAAA,EAAI,MAAM,CAAA,EAAG,OAAA,EAAS,IAAA,EAAM,SAAS,CAAA;AAAA,IAC1E,CAAC,UAAU,MAAM;AAAA,GACnB;AAEA,EAAA,uBACE,IAAA,CAAC,kBAAA,EAAA,EAAmB,QAAA,EAAU,UAAA,EAC5B,QAAA,EAAA;AAAA,oBAAAC,GAAAA,CAAC,mBAAgB,MAAA,EAAgB,CAAA;AAAA,oBACjCA,GAAAA,CAAC,YAAA,EAAA,EAAa,OAAA,EAAS,qBAAsB,QAAA,EAAS;AAAA,GAAA,EACxD,CAAA;AAEJ;AAGO,SAAS,0BAAA,CAA2B,EAAE,QAAA,EAAS,EAA4B;AAChF,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,uBACEA,GAAAA;AAAA,IAAC,kBAAA;AAAA,IAAA;AAAA,MACC,QAAA,EAAU,CAAC,EAAA,EAAY,IAAA,KAA2B,QAAA,CAAS,EAAE,EAAA,EAAI,OAAA,EAAS,IAAA,EAAM,OAAA,EAAS,CAAA;AAAA,MAEzF,QAAA,kBAAAA,GAAAA,CAAC,YAAA,EAAA,EAAa,OAAA,EAAS,qBAAsB,QAAA,EAAS;AAAA;AAAA,GACxD;AAEJ","file":"chunk-EDCRELH3.js","sourcesContent":["import { forwardRef, createElement } from 'react';\nimport { Link as TanStackLink, useParams } from '@tanstack/react-router';\nimport { isLocale } from '../providers/locale-constants';\nimport type { BaseLinkProps } from '../components/common/Link.types';\n\n/**\n * Routes live under an optional `/{-$locale}` param, so a bare `to=\"/brands\"`\n * resolves with the locale omitted and the $locale loader bounces the user to\n * the fallback locale. Prefix the current locale onto internal paths that\n * don't already carry one.\n */\nexport function localizeDestination(destination: string, locale?: string) {\n if (!locale || !destination.startsWith('/') || destination.startsWith('//')) return destination;\n const firstSegment = destination.split('/')[1]?.split(/[?#]/)[0];\n if (isLocale(firstSegment)) return destination;\n return destination === '/' ? `/${locale}` : `/${locale}${destination}`;\n}\n\n/**\n * TanStack Router Link adapter.\n * Translates framework-agnostic props to TanStack Router Link props.\n */\nexport const TanStackLinkAdapter = forwardRef<HTMLAnchorElement, BaseLinkProps>(\n (\n {\n to,\n href,\n children,\n className,\n style,\n title,\n target,\n rel,\n onClick,\n preload,\n replace,\n 'aria-label': ariaLabel,\n ...rest\n },\n ref\n ) => {\n const { locale } = useParams({ strict: false }) as { locale?: string };\n const destination = localizeDestination(to ?? href ?? '/', locale);\n\n return createElement(\n TanStackLink,\n {\n ref,\n to: destination,\n className,\n style,\n title,\n target,\n rel,\n onClick,\n preload: preload === 'intent' || preload === false ? preload : undefined,\n replace,\n 'aria-label': ariaLabel,\n ...(rest as Record<string, unknown>),\n },\n children\n );\n }\n);\n\nTanStackLinkAdapter.displayName = 'TanStackLinkAdapter';\n\n/**\n * Create a TanStack Router Link adapter component.\n */\nexport function createTanStackLinkAdapter() {\n return TanStackLinkAdapter;\n}\n","import { useEffect } from 'react';\nimport { useRouter } from '@tanstack/react-router';\nimport { resolveRelativePath } from '../providers/NavigationProvider';\nimport { useTwilight } from '../providers/twilight-context';\nimport { isLocale } from '../providers/locale-constants';\nimport { getTwilightContext } from '../twilight/context';\nimport { useIsNativeApp } from '../native-app';\nimport { onSallaEvent } from '../utils/sdk-helpers';\nimport { hasStoreUrlBase } from '../utils/store-base';\nimport { localizeDestination } from './link';\n\nconst UI_UPDATE_EVENT = 'mobile::ui.update';\nconst OPEN_ORDER_EVENT = 'mobile::open.order';\nconst NAVIGATE_TO_EVENT = 'mobile::navigate.to';\n\n/**\n * Events the native app sends into its webview. `NavigationSetup` mounts this once, so a\n * theme adds no listener of its own:\n *\n * - `mobile::ui.update` re-runs the route loaders and refetches what is on screen.\n * - `mobile::open.order` `{ id }` opens that order, with a fresh cart.\n * - `mobile::navigate.to` `{ url }` opens a notification deep link in-app. Only a link to\n * this store is followed (`deepLinkPath`), so `javascript:`, off-site and other stores'\n * URLs are dropped.\n *\n * Nothing is mounted outside the app (`useIsNativeApp()`), so a browser runs none of it.\n */\nexport function NativeAppEvents({ locale }: { locale?: string }) {\n return useIsNativeApp() ? <Listeners locale={locale} /> : null;\n}\n\nfunction Listeners({ locale }: { locale?: string }) {\n useNativeAppEvents(locale);\n return null;\n}\n\n/** The listeners themselves. `NativeAppEvents` mounts them inside the app only. */\nexport function useNativeAppEvents(locale?: string): void {\n const router = useRouter();\n const { store } = useTwilight();\n const storeUrl = store?.url;\n const username = store?.username;\n\n useEffect(() => {\n // `href`, not `to`: the router parses the query and the hash out of it.\n const open = (path: string) =>\n void router.navigate({ href: localizeDestination(path, locale) });\n\n const refresh = () => {\n void Promise.allSettled([\n router.invalidate(),\n getTwilightContext().queryClient?.refetchQueries({ type: 'active' }),\n ]);\n };\n const openOrder = (data?: unknown) => {\n const rawId = (data as { id?: unknown } | undefined)?.id;\n if (typeof rawId !== 'string' && typeof rawId !== 'number') return;\n\n const id = String(rawId).trim();\n if (!id) return;\n\n void getTwilightContext().queryClient?.invalidateQueries({ queryKey: ['cart'] });\n open(`/account/orders/${encodeURIComponent(id)}`);\n };\n const navigateTo = (data?: unknown) => {\n const url = (data as { url?: unknown } | undefined)?.url;\n if (typeof url !== 'string' || !url.trim() || !storeUrl) return;\n\n const path = deepLinkPath(url.trim(), storeUrl, username);\n if (path) void router.navigate({ href: inLocale(path, locale) });\n };\n\n const offs = [\n onSallaEvent(UI_UPDATE_EVENT, refresh),\n onSallaEvent(OPEN_ORDER_EVENT, openOrder),\n onSallaEvent(NAVIGATE_TO_EVENT, navigateTo),\n ];\n return () => offs.forEach((off) => off());\n }, [router, locale, storeUrl, username]);\n}\n\n/** A URL that names its host: `https://…` or `//…`. Anything else is a path of this app. */\nfunction isAbsoluteUrl(url: string): boolean {\n if (url.startsWith('//')) return true;\n try {\n // Without a base, only a URL with its own scheme parses.\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * The application path of a deep link to this store, or null for any other link.\n *\n * It passes the test a tapped link does (`resolveRelativePath`: the store's origin, the\n * username taken off), and one more. On a shared host that origin is every store's, so\n * an absolute link has to carry this store's username: without it, another store's\n * `/ar/offers` would open this store's offers.\n */\nfunction deepLinkPath(url: string, storeUrl: string, username?: string): string | null {\n const path = resolveRelativePath(url, storeUrl, username);\n if (!path || !isAbsoluteUrl(url)) return path;\n\n // Both parse: `resolveRelativePath` returns null when either does not.\n const { pathname } = new URL(url, window.location.href);\n return hasStoreUrlBase(pathname, new URL(storeUrl).pathname, username) ? path : null;\n}\n\n/**\n * A deep link in the locale the visitor is browsing in. A notification is written in one\n * language and opened in whichever is on screen, so the link's own locale gives way.\n *\n * The prefix is written here, not by `localizeDestination`: that one leaves a path alone\n * when it already starts with a locale, and would take the slug of `/ar/en/p456` for one.\n */\nfunction inLocale(path: string, locale?: string): string {\n const first = path.split('/')[1]?.split(/[?#]/)[0];\n const own = isLocale(first) ? path.slice(first.length + 1) : path;\n const rest = own.startsWith('/') ? own : `/${own}`;\n\n if (!locale) return rest;\n return rest === '/' ? `/${locale}` : `/${locale}${rest}`;\n}\n","/**\n * What the request itself is enough to describe: its host.\n *\n * Small, and deliberately its own module rather than a helper inside the\n * middleware. This value decides two things — which store a live storefront is,\n * and whether the request is allowed to name a store at all — so it is worth\n * testing directly instead of only through the wiring that calls it.\n */\nimport { isLoopback } from './cookies';\n\n/** The part of a `Request` this needs, so a test does not have to build a whole one. */\nexport interface HostSource {\n url: string;\n headers: { get(name: string): string | null };\n}\n\n/**\n * The host this request arrived on, with its port when it has one.\n *\n * Taken from the request URL, which in a Worker is the address the platform\n * actually routed on, and from the `Host` header only when that fails.\n *\n * **`X-Forwarded-Host` is deliberately not consulted.** A client can set it, and\n * this value gates `allowsRequestStoreId` — so honouring it would be a way to\n * talk a merchant's own domain into behaving like the preview host, and from\n * there into serving a stranger's shop. The dispatcher strips that header today;\n * a theme must not be one edit to another repository's allowlist away from a\n * spoofable identity.\n */\nexport function requestHostOf(request: HostSource): string | null {\n try {\n const fromUrl = new URL(request.url).host;\n if (fromUrl) return fromUrl;\n } catch {\n /* an unparseable URL falls through to the header */\n }\n\n return request.headers.get('Host')?.trim() || null;\n}\n\n/** The origin a browser reached this host on: `http` for a dev server, `https` otherwise. */\nexport function requestOriginOf(host: string): string {\n return `${isLoopback(host.replace(/:\\d+$/, '')) ? 'http' : 'https'}://${host}`;\n}\n","import {\n useNavigate,\n useParams,\n redirect as tanstackRedirect,\n notFound as tanstackNotFound,\n} from '@tanstack/react-router';\nimport {\n NavigationProvider,\n configureNavigation,\n type NavigateOptions,\n} from '../providers/NavigationProvider';\nimport { LinkProvider } from '../providers/LinkProvider';\nimport { TanStackLinkAdapter, localizeDestination } from './link';\nimport { NativeAppEvents } from './native-app-events';\nimport { useCallback, type ReactNode } from 'react';\nimport { UnauthorizedError, type RedirectOptions } from '../providers/NavigationProvider';\nimport { getRequestStore, getTwilightContext } from '../twilight/context';\nimport { resolveStoreBase, resolveStoreBaseFollowsLocale } from '../utils/store-identity';\nimport { loginRedirectHref } from '../utils/store-base';\nimport { requestOriginOf } from '../utils/request-host';\n\nfunction currentOrigin(): string | null {\n if (typeof window !== 'undefined') return window.location.origin;\n const host = getRequestStore().requestHost;\n return host ? requestOriginOf(host) : null;\n}\n\nconfigureNavigation({\n notFound: (message?: string) => {\n throw tanstackNotFound({ data: message });\n },\n redirect: (path: string, opts?: RedirectOptions) => {\n throw tanstackRedirect({ to: path, replace: opts?.replace, statusCode: opts?.statusCode });\n },\n unauthorized: (message?: string) => {\n const origin = currentOrigin();\n const { pathname, searchStr } = getTwilightContext().location;\n const href =\n origin &&\n loginRedirectHref({\n pathname,\n searchStr,\n origin,\n base: resolveStoreBase(),\n baseFollowsLocale: resolveStoreBaseFollowsLocale(),\n });\n // A full load, because the SDK only reads `intended_to` when a page starts.\n if (href) throw tanstackRedirect({ href, reloadDocument: true, replace: true });\n throw new UnauthorizedError(message);\n },\n});\n\n/**\n * TanStack navigation setup - wraps children with NavigationProvider and LinkProvider.\n * Called by TwilightProvider when client.framework === 'tanstack'.\n */\nexport function NavigationSetup({ children }: { children: ReactNode }) {\n const navigate = useNavigate();\n const { locale } = useParams({ strict: false }) as { locale?: string };\n const navigateFn = useCallback(\n (to: string, opts?: NavigateOptions) =>\n navigate({ to: localizeDestination(to, locale), replace: opts?.replace }),\n [navigate, locale]\n );\n\n return (\n <NavigationProvider navigate={navigateFn}>\n <NativeAppEvents locale={locale} />\n <LinkProvider adapter={TanStackLinkAdapter}>{children}</LinkProvider>\n </NavigationProvider>\n );\n}\n\n/** @deprecated Use NavigationSetup instead */\nexport function TanStackNavigationProvider({ children }: { children: ReactNode }) {\n const navigate = useNavigate();\n return (\n <NavigationProvider\n navigate={(to: string, opts?: NavigateOptions) => navigate({ to, replace: opts?.replace })}\n >\n <LinkProvider adapter={TanStackLinkAdapter}>{children}</LinkProvider>\n </NavigationProvider>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/tanstack/link.tsx","../src/tanstack/native-app-events.tsx","../src/utils/request-host.ts","../src/tanstack/navigation.tsx"],"names":["TanStackLink","tanstackNotFound","tanstackRedirect","useParams","jsx"],"mappings":";;;;;;;;;;;;AAWO,SAAS,mBAAA,CAAoB,aAAqB,MAAA,EAAiB;AACxE,EAAA,IAAI,CAAC,MAAA,IAAU,CAAC,WAAA,CAAY,UAAA,CAAW,GAAG,CAAA,IAAK,WAAA,CAAY,UAAA,CAAW,IAAI,CAAA,EAAG,OAAO,WAAA;AACpF,EAAA,MAAM,YAAA,GAAe,WAAA,CAAY,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAAA,EAAG,KAAA,CAAM,MAAM,CAAA,CAAE,CAAC,CAAA;AAC/D,EAAA,IAAI,QAAA,CAAS,YAAY,CAAA,EAAG,OAAO,WAAA;AACnC,EAAA,OAAO,WAAA,KAAgB,MAAM,CAAA,CAAA,E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AACrE,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,MAAM,EAAE,MAAA,EAAO,GAAIC,UAAU,EAAE,MAAA,EAAQ,OAAO,CAAA;AAC9C,EAAA,MAAM,UAAA,GAAa,WAAA;AAAA,IACjB,CAAC,EAAA,EAAY,IAAA,KACX,QAAA,CAAS,EAAE,EAAA,EAAI,mBAAA,CAAoB,EAAA,EAAI,MAAM,CAAA,EAAG,OAAA,EAAS,IAAA,EAAM,SAAS,CAAA;AAAA,IAC1E,CAAC,UAAU,MAAM;AAAA,GACnB;AAEA,EAAA,uBACE,IAAA,CAAC,kBAAA,EAAA,EAAmB,QAAA,EAAU,UAAA,EAC5B,QAAA,EAAA;AAAA,oBAAAC,GAAAA,CAAC,mBAAgB,MAAA,EAAgB,CAAA;AAAA,oBACjCA,GAAAA,CAAC,YAAA,EAAA,EAAa,OAAA,EAAS,qBAAsB,QAAA,EAAS;AAAA,GAAA,EACxD,CAAA;AAEJ;AAGO,SAAS,0BAAA,CAA2B,EAAE,QAAA,EAAS,EAA4B;AAChF,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,uBACEA,GAAAA;AAAA,IAAC,kBAAA;AAAA,IAAA;AAAA,MACC,QAAA,EAAU,CAAC,EAAA,EAAY,IAAA,KAA2B,QAAA,CAAS,EAAE,EAAA,EAAI,OAAA,EAAS,IAAA,EAAM,OAAA,EAAS,CAAA;AAAA,MAEzF,QAAA,kBAAAA,GAAAA,CAAC,YAAA,EAAA,EAAa,OAAA,EAAS,qBAAsB,QAAA,EAAS;AAAA;AAAA,GACxD;AAEJ","file":"chunk-ONK7RUTK.js","sourcesContent":["import { forwardRef, createElement } from 'react';\nimport { Link as TanStackLink, useParams } from '@tanstack/react-router';\nimport { isLocale } from '../providers/locale-constants';\nimport type { BaseLinkProps } from '../components/common/Link.types';\n\n/**\n * Routes live under an optional `/{-$locale}` param, so a bare `to=\"/brands\"`\n * resolves with the locale omitted and the $locale loader bounces the user to\n * the fallback locale. Prefix the current locale onto internal paths that\n * don't already carry one.\n */\nexport function localizeDestination(destination: string, locale?: string) {\n if (!locale || !destination.startsWith('/') || destination.startsWith('//')) return destination;\n const firstSegment = destination.split('/')[1]?.split(/[?#]/)[0];\n if (isLocale(firstSegment)) return destination;\n return destination === '/' ? `/${locale}` : `/${locale}${destination}`;\n}\n\n/**\n * TanStack Router Link adapter.\n * Translates framework-agnostic props to TanStack Router Link props.\n */\nexport const TanStackLinkAdapter = forwardRef<HTMLAnchorElement, BaseLinkProps>(\n (\n {\n to,\n href,\n children,\n className,\n style,\n title,\n target,\n rel,\n onClick,\n preload,\n replace,\n 'aria-label': ariaLabel,\n ...rest\n },\n ref\n ) => {\n const { locale } = useParams({ strict: false }) as { locale?: string };\n const destination = localizeDestination(to ?? href ?? '/', locale);\n\n return createElement(\n TanStackLink,\n {\n ref,\n to: destination,\n className,\n style,\n title,\n target,\n rel,\n onClick,\n preload: preload === 'intent' || preload === false ? preload : undefined,\n replace,\n 'aria-label': ariaLabel,\n ...(rest as Record<string, unknown>),\n },\n children\n );\n }\n);\n\nTanStackLinkAdapter.displayName = 'TanStackLinkAdapter';\n\n/**\n * Create a TanStack Router Link adapter component.\n */\nexport function createTanStackLinkAdapter() {\n return TanStackLinkAdapter;\n}\n","import { useEffect } from 'react';\nimport { useRouter } from '@tanstack/react-router';\nimport { resolveRelativePath } from '../providers/NavigationProvider';\nimport { useTwilight } from '../providers/twilight-context';\nimport { isLocale } from '../providers/locale-constants';\nimport { getTwilightContext } from '../twilight/context';\nimport { useIsNativeApp } from '../native-app';\nimport { onSallaEvent } from '../utils/sdk-helpers';\nimport { hasStoreUrlBase } from '../utils/store-base';\nimport { localizeDestination } from './link';\n\nconst UI_UPDATE_EVENT = 'mobile::ui.update';\nconst OPEN_ORDER_EVENT = 'mobile::open.order';\nconst NAVIGATE_TO_EVENT = 'mobile::navigate.to';\n\n/**\n * Events the native app sends into its webview. `NavigationSetup` mounts this once, so a\n * theme adds no listener of its own:\n *\n * - `mobile::ui.update` re-runs the route loaders and refetches what is on screen.\n * - `mobile::open.order` `{ id }` opens that order, with a fresh cart.\n * - `mobile::navigate.to` `{ url }` opens a notification deep link in-app. Only a link to\n * this store is followed (`deepLinkPath`), so `javascript:`, off-site and other stores'\n * URLs are dropped.\n *\n * Nothing is mounted outside the app (`useIsNativeApp()`), so a browser runs none of it.\n */\nexport function NativeAppEvents({ locale }: { locale?: string }) {\n return useIsNativeApp() ? <Listeners locale={locale} /> : null;\n}\n\nfunction Listeners({ locale }: { locale?: string }) {\n useNativeAppEvents(locale);\n return null;\n}\n\n/** The listeners themselves. `NativeAppEvents` mounts them inside the app only. */\nexport function useNativeAppEvents(locale?: string): void {\n const router = useRouter();\n const { store } = useTwilight();\n const storeUrl = store?.url;\n const username = store?.username;\n\n useEffect(() => {\n // `href`, not `to`: the router parses the query and the hash out of it.\n const open = (path: string) =>\n void router.navigate({ href: localizeDestination(path, locale) });\n\n const refresh = () => {\n void Promise.allSettled([\n router.invalidate(),\n getTwilightContext().queryClient?.refetchQueries({ type: 'active' }),\n ]);\n };\n const openOrder = (data?: unknown) => {\n const rawId = (data as { id?: unknown } | undefined)?.id;\n if (typeof rawId !== 'string' && typeof rawId !== 'number') return;\n\n const id = String(rawId).trim();\n if (!id) return;\n\n void getTwilightContext().queryClient?.invalidateQueries({ queryKey: ['cart'] });\n open(`/account/orders/${encodeURIComponent(id)}`);\n };\n const navigateTo = (data?: unknown) => {\n const url = (data as { url?: unknown } | undefined)?.url;\n if (typeof url !== 'string' || !url.trim() || !storeUrl) return;\n\n const path = deepLinkPath(url.trim(), storeUrl, username);\n if (path) void router.navigate({ href: inLocale(path, locale) });\n };\n\n const offs = [\n onSallaEvent(UI_UPDATE_EVENT, refresh),\n onSallaEvent(OPEN_ORDER_EVENT, openOrder),\n onSallaEvent(NAVIGATE_TO_EVENT, navigateTo),\n ];\n return () => offs.forEach((off) => off());\n }, [router, locale, storeUrl, username]);\n}\n\n/** A URL that names its host: `https://…` or `//…`. Anything else is a path of this app. */\nfunction isAbsoluteUrl(url: string): boolean {\n if (url.startsWith('//')) return true;\n try {\n // Without a base, only a URL with its own scheme parses.\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * The application path of a deep link to this store, or null for any other link.\n *\n * It passes the test a tapped link does (`resolveRelativePath`: the store's origin, the\n * username taken off), and one more. On a shared host that origin is every store's, so\n * an absolute link has to carry this store's username: without it, another store's\n * `/ar/offers` would open this store's offers.\n */\nfunction deepLinkPath(url: string, storeUrl: string, username?: string): string | null {\n const path = resolveRelativePath(url, storeUrl, username);\n if (!path || !isAbsoluteUrl(url)) return path;\n\n // Both parse: `resolveRelativePath` returns null when either does not.\n const { pathname } = new URL(url, window.location.href);\n return hasStoreUrlBase(pathname, new URL(storeUrl).pathname, username) ? path : null;\n}\n\n/**\n * A deep link in the locale the visitor is browsing in. A notification is written in one\n * language and opened in whichever is on screen, so the link's own locale gives way.\n *\n * The prefix is written here, not by `localizeDestination`: that one leaves a path alone\n * when it already starts with a locale, and would take the slug of `/ar/en/p456` for one.\n */\nfunction inLocale(path: string, locale?: string): string {\n const first = path.split('/')[1]?.split(/[?#]/)[0];\n const own = isLocale(first) ? path.slice(first.length + 1) : path;\n const rest = own.startsWith('/') ? own : `/${own}`;\n\n if (!locale) return rest;\n return rest === '/' ? `/${locale}` : `/${locale}${rest}`;\n}\n","/**\n * What the request itself is enough to describe: its host.\n *\n * Small, and deliberately its own module rather than a helper inside the\n * middleware. This value decides two things — which store a live storefront is,\n * and whether the request is allowed to name a store at all — so it is worth\n * testing directly instead of only through the wiring that calls it.\n */\nimport { isLoopback } from './cookies';\n\n/** The part of a `Request` this needs, so a test does not have to build a whole one. */\nexport interface HostSource {\n url: string;\n headers: { get(name: string): string | null };\n}\n\n/**\n * The host this request arrived on, with its port when it has one.\n *\n * Taken from the request URL, which in a Worker is the address the platform\n * actually routed on, and from the `Host` header only when that fails.\n *\n * **`X-Forwarded-Host` is deliberately not consulted.** A client can set it, and\n * this value gates `allowsRequestStoreId` — so honouring it would be a way to\n * talk a merchant's own domain into behaving like the preview host, and from\n * there into serving a stranger's shop. The dispatcher strips that header today;\n * a theme must not be one edit to another repository's allowlist away from a\n * spoofable identity.\n */\nexport function requestHostOf(request: HostSource): string | null {\n try {\n const fromUrl = new URL(request.url).host;\n if (fromUrl) return fromUrl;\n } catch {\n /* an unparseable URL falls through to the header */\n }\n\n return request.headers.get('Host')?.trim() || null;\n}\n\n/** The origin a browser reached this host on: `http` for a dev server, `https` otherwise. */\nexport function requestOriginOf(host: string): string {\n return `${isLoopback(host.replace(/:\\d+$/, '')) ? 'http' : 'https'}://${host}`;\n}\n","import {\n useNavigate,\n useParams,\n redirect as tanstackRedirect,\n notFound as tanstackNotFound,\n} from '@tanstack/react-router';\nimport {\n NavigationProvider,\n configureNavigation,\n type NavigateOptions,\n} from '../providers/NavigationProvider';\nimport { LinkProvider } from '../providers/LinkProvider';\nimport { TanStackLinkAdapter, localizeDestination } from './link';\nimport { NativeAppEvents } from './native-app-events';\nimport { useCallback, type ReactNode } from 'react';\nimport { UnauthorizedError, type RedirectOptions } from '../providers/NavigationProvider';\nimport { getRequestStore, getTwilightContext } from '../twilight/context';\nimport { resolveStoreBase, resolveStoreBaseFollowsLocale } from '../utils/store-identity';\nimport { loginRedirectHref } from '../utils/store-base';\nimport { requestOriginOf } from '../utils/request-host';\n\nfunction currentOrigin(): string | null {\n if (typeof window !== 'undefined') return window.location.origin;\n const host = getRequestStore().requestHost;\n return host ? requestOriginOf(host) : null;\n}\n\nconfigureNavigation({\n notFound: (message?: string) => {\n throw tanstackNotFound({ data: message });\n },\n redirect: (path: string, opts?: RedirectOptions) => {\n throw tanstackRedirect({ to: path, replace: opts?.replace, statusCode: opts?.statusCode });\n },\n unauthorized: (message?: string) => {\n const origin = currentOrigin();\n const { pathname, searchStr } = getTwilightContext().location;\n const href =\n origin &&\n loginRedirectHref({\n pathname,\n searchStr,\n origin,\n base: resolveStoreBase(),\n baseFollowsLocale: resolveStoreBaseFollowsLocale(),\n });\n // A full load, because the SDK only reads `intended_to` when a page starts.\n if (href) throw tanstackRedirect({ href, reloadDocument: true, replace: true });\n throw new UnauthorizedError(message);\n },\n});\n\n/**\n * TanStack navigation setup - wraps children with NavigationProvider and LinkProvider.\n * Called by TwilightProvider when client.framework === 'tanstack'.\n */\nexport function NavigationSetup({ children }: { children: ReactNode }) {\n const navigate = useNavigate();\n const { locale } = useParams({ strict: false }) as { locale?: string };\n const navigateFn = useCallback(\n (to: string, opts?: NavigateOptions) =>\n navigate({ to: localizeDestination(to, locale), replace: opts?.replace }),\n [navigate, locale]\n );\n\n return (\n <NavigationProvider navigate={navigateFn}>\n <NativeAppEvents locale={locale} />\n <LinkProvider adapter={TanStackLinkAdapter}>{children}</LinkProvider>\n </NavigationProvider>\n );\n}\n\n/** @deprecated Use NavigationSetup instead */\nexport function TanStackNavigationProvider({ children }: { children: ReactNode }) {\n const navigate = useNavigate();\n return (\n <NavigationProvider\n navigate={(to: string, opts?: NavigateOptions) => navigate({ to, replace: opts?.replace })}\n >\n <LinkProvider adapter={TanStackLinkAdapter}>{children}</LinkProvider>\n </NavigationProvider>\n );\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { MadeWithSalla } from './chunk-OQIIJRAS.js';
2
2
  import { HookSlot, useIsClient } from './chunk-5XDPAKF5.js';
3
3
  import { useTranslation } from './chunk-TYNZ5B2B.js';
4
- import { Image } from './chunk-IUEYRDEI.js';
4
+ import { Image } from './chunk-MYW5QYWO.js';
5
5
  import { Link } from './chunk-AXW67SY7.js';
6
6
  import { LazyImageModal } from './chunk-7V5HOZW4.js';
7
7
  import { useTwilight } from './chunk-DF6FBKDN.js';
@@ -281,5 +281,5 @@ function Footer({ inSheet = false } = {}) {
281
281
  }
282
282
 
283
283
  export { Footer };
284
- //# sourceMappingURL=chunk-HH7WFQLN.js.map
285
- //# sourceMappingURL=chunk-HH7WFQLN.js.map
284
+ //# sourceMappingURL=chunk-OSIFK62D.js.map
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AA;AAAA,oCACrD,IAAA,EAAA,EAAK,EAAA,EAAG,KAAI,SAAA,EAAU,wDAAA,EACpB,gBAAM,IAAA,EACT,CAAA;AAAA,gBAAQ,GAAA;AAAA,gBAAI,OAAA;AAAA,gBACT,IAAA;AAAA,gCACH,GAAA,CAAC,aAAA,EAAA,EAAc,SAAA,EAAU,MAAA,EAAO;AAAA,eAAA,EAClC;AAAA;AAAA,WAEJ,EACF,CAAA;AAAA,8BAEC,aAAA,EAAA,EAAc;AAAA,SAAA,EACjB,CAAA;AAAA,QAEC,CAAC,OAAA,oBAAW,GAAA,CAAC,QAAA,EAAA,EAAS,MAAK,YAAA,EAAa;AAAA;AAAA;AAAA,GAC3C;AAEJ","file":"chunk-HH7WFQLN.js","sourcesContent":["import { useState } from 'react';\nimport { SallaAppsIcons } from '@salla.sa/twilight-components-react/apps-icons';\nimport { SallaContacts } from '@salla.sa/twilight-components-react/contacts';\nimport { SallaSocial } from '@salla.sa/twilight-components-react/social';\nimport { SallaMenu } from '@salla.sa/twilight-components-react/menu';\nimport { SallaTrustBadges } from '@salla.sa/twilight-components-react/trust-badges';\nimport { SallaPayments } from '@salla.sa/twilight-components-react/payments';\nimport { useTwilight } from '../../providers/twilight-context';\nimport { useTranslation } from '../../providers/I18nProvider';\nimport { HookSlot } from '../../hooks/HookSlot';\nimport { useIsClient } from '../../hooks/useIsClient';\nimport { Link, Image } from '../common';\nimport { ImageModal } from '../modal';\nimport { MadeWithSalla } from './MadeWithSalla';\n\n/** Salla's value-added-tax badge icon (70×70, CDN-resized) — a platform\n * asset shared by every store, not specific to any one theme. */\nconst TAX_ICON_URL =\n 'https://cdn.salla.network/cdn-cgi/image/fit=scale-down,width=70,height=70,onerror=redirect,format=auto/images/tax.png?v=2.0.5';\n\n/**\n * The store's value-added-tax registration: the tax number, plus the certificate as\n * the tax icon that opens the certificate image full size in a modal. Nothing shows\n * when the store has no tax number.\n */\nfunction FooterTax({ dark }: { dark: boolean }) {\n const { store } = useTwilight();\n const { t } = useTranslation();\n const [open, setOpen] = useState(false);\n const number = store.settings?.tax?.number;\n const certificate = store.settings?.tax?.certificate;\n if (!number) return null;\n\n return (\n <div\n data-testid=\"store-footer-tax\"\n className=\"store-footer__tax flex items-end gap-2 rtl:space-x-reverse\"\n >\n {certificate && (\n <>\n <button\n type=\"button\"\n data-testid=\"store-footer-tax-certificate\"\n className=\"store-footer__tax-cert shrink-0\"\n aria-label={t('common.elements.tax_certificate', 'Tax Certificate')}\n aria-haspopup=\"dialog\"\n onClick={() => setOpen(true)}\n >\n <img\n src={TAX_ICON_URL}\n alt={t('common.elements.tax_certificate', 'Tax Certificate')}\n width={40}\n height={50}\n loading=\"lazy\"\n decoding=\"async\"\n className=\"w-10 rounded-sm transition-opacity hover:opacity-80\"\n />\n </button>\n <ImageModal\n isOpen={open}\n onClose={() => setOpen(false)}\n src={certificate}\n alt={t('common.elements.tax_certificate', 'Tax Certificate')}\n title={t('common.elements.tax_certificate', 'Tax Certificate')}\n />\n </>\n )}\n <div>\n <p className={`mb-1 text-sm opacity-70 ${dark ? 'text-white' : ''}`}>\n {t('common.elements.tax_number', 'Tax Number')}\n </p>\n <b className=\"text-sm\">{number}</b>\n </div>\n </div>\n );\n}\n\n/** Saudi Business Center (SBC) logo, CDN-versioned like the tax icon -- also a\n * platform asset, not theme-specific. */\nconst SBC_ICON_URL = 'https://cdn.salla.network/images/sbc.png?v=2.0.5';\n\n/**\n * The store's Saudi Business Center certificate: a \"Trusted by Business Platform\" badge that\n * opens the certificate's page on the SBC site so visitors can verify the merchant. Nothing\n * shows when the store has no certificate.\n */\nfunction FooterSbc({ dark }: { dark: boolean }) {\n const { store } = useTwilight();\n const { t } = useTranslation();\n const id = store.settings?.certificate?.id;\n if (!id) return null;\n\n return (\n <a\n href={`https://eauthenticate.saudibusiness.gov.sa/certificate-details/${encodeURIComponent(id)}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n data-testid=\"store-footer-sbc\"\n className=\"store-footer__sbc flex items-center gap-2.5 transition-opacity hover:opacity-75\"\n >\n <img\n src={SBC_ICON_URL}\n alt={`SBC ${id}`}\n width={56}\n height={40}\n loading=\"lazy\"\n decoding=\"async\"\n className=\"h-10 w-14 rounded-sm\"\n />\n <div>\n <p className={`text-xs opacity-70 ${dark ? 'text-white' : ''}`}>\n {t('blocks.footer.sbc_trusted_by', 'Trusted by')}\n </p>\n <b className=\"text-sm\">{t('blocks.footer.sbc_platform', 'Business Platform')}</b>\n </div>\n </a>\n );\n}\n\n/** Trust badges, the tax registration and the SBC badge, side by side (wrapping on narrow columns). */\nfunction FooterTrust({ dark, centered }: { dark: boolean; centered: boolean }) {\n return (\n <div\n data-testid=\"store-footer-trust\"\n className={`store-footer__trust flex flex-wrap items-end gap-x-6 gap-y-3${centered ? ' justify-center' : ''}`}\n >\n <FooterTax dark={dark} />\n <FooterSbc dark={dark} />\n <SallaTrustBadges {...(dark ? { dark: true } : {})} />\n </div>\n );\n}\n\n/**\n * The footer's own menu of (\"important\") links -- skipped entirely when\n * `inSheet`, for a theme that opens it from somewhere else of its own (a\n * mobile account sheet, a dedicated links screen, …) instead; showing it\n * again down here would just be a redundant second copy. `heading` wraps it\n * in the grid layout's own `.store-footer__links` column; the centered\n * layout's inline row has none.\n */\nfunction FooterLinksMenu({\n inSheet,\n className,\n heading,\n dark,\n}: {\n inSheet: boolean;\n className: string;\n heading?: string;\n dark: boolean;\n}) {\n if (inSheet) return null;\n\n const menu = <SallaMenu source=\"footer\" className={className} suppressHydrationWarning />;\n if (!heading) return menu;\n\n return (\n <div className=\"store-footer__links\">\n <h3 className={`mb-3 text-lg font-bold lg:mb-5 ${dark ? 'text-white' : 'text-gray-900'}`}>\n {heading}\n </h3>\n {menu}\n </div>\n );\n}\n\n/** App-store / Google-Play buttons. Nothing shows -- not even the wrapping\n * div -- when the store has neither link set. */\nfunction FooterApps({ className }: { className: string }) {\n const { store } = useTwilight();\n const { t } = useTranslation();\n // The web component fills its light DOM before React hydrates the footer, a hydration error.\n const isClient = useIsClient();\n if (!store.apps?.appstore && !store.apps?.googleplay) return null;\n\n return (\n <div data-testid=\"store-footer-apps\" className={`store-footer__apps ${className}`}>\n {isClient && (\n <SallaAppsIcons\n apps={store.apps}\n appsTitle={t('blocks.footer.download_apps', 'Get our apps')}\n />\n )}\n </div>\n );\n}\n\n/** The logo link, same shape in both layouts -- only its own spacing differs. */\nfunction FooterLogo({ className }: { className: string }) {\n const { store } = useTwilight();\n return (\n <Link\n to=\"/\"\n className={`store-footer__logo inline-flex items-center m-0 transition-opacity hover:opacity-75 ${className}`}\n >\n <Image\n src={store.logo}\n alt={store.name || 'Store'}\n width={150}\n height={44}\n objectFit=\"contain\"\n className=\"h-11 w-auto max-w-[180px]\"\n />\n </Link>\n );\n}\n\n/** Merchant-authored description HTML -- mirrors the Twig theme's\n * `store.description|raw`. Renders nothing when the store has none set. */\nfunction FooterDescription({ className }: { className: string }) {\n const { store } = useTwilight();\n if (!store.description) return null;\n return (\n <div\n className={`store-footer__desc opacity-80 ${className}`}\n dangerouslySetInnerHTML={{ __html: store.description }}\n />\n );\n}\n\n/** The store's phone and email as one \"Contact us: …\" row under the description\n * (`<salla-contacts>`'s compact `isHeader` layout, which shows only those two).\n * Renders nothing when the store has neither. */\nfunction FooterContacts({ className }: { className: string }) {\n const { store } = useTwilight();\n const { t } = useTranslation();\n // The web component fills its light DOM once the SDK is ready, which can come before\n // React hydrates the footer's Suspense boundary: a hydration error (React #418).\n const isClient = useIsClient();\n if (!store.contacts?.phone && !store.contacts?.email) return null;\n return (\n <div className={`store-footer__contacts ${className}`}>\n {isClient && (\n <SallaContacts\n contacts={store.contacts}\n contactsTitle={t('blocks.footer.social', 'Contact us')}\n isHeader\n />\n )}\n </div>\n );\n}\n\n/** Centered layout: logo, description, contacts, social, footer menu, trust\n * badges and app buttons stacked as one centered column. */\nfunction FooterCenteredBody({ inSheet, isDark }: { inSheet: boolean; isDark: boolean }) {\n return (\n <div className=\"container mx-auto flex max-w-2xl flex-col items-center gap-6 text-center\">\n <FooterLogo className=\"\" />\n <FooterDescription className=\"\" />\n <FooterContacts className=\"\" />\n <SallaSocial />\n\n <FooterLinksMenu\n inSheet={inSheet}\n className=\"store-footer__menu store-footer__menu--inline\"\n dark={isDark}\n />\n\n <FooterTrust dark={isDark} centered />\n\n <FooterApps className=\"flex flex-col items-center gap-3\" />\n </div>\n );\n}\n\n/** Columns layout: brand (logo / description / contacts / social / trust) and app\n * buttons side by side, with the footer menu as its own labeled column. */\nfunction FooterColumnsBody({ inSheet, isDark }: { inSheet: boolean; isDark: boolean }) {\n const { t } = useTranslation();\n\n return (\n <div className=\"container grid grid-cols-1 gap-10 sm:grid-cols-2 lg:grid-cols-4 lg:gap-16\">\n <div className=\"store-footer__brand rtl:lg:pl-16 ltr:lg:pr-16 sm:col-span-2\">\n <FooterLogo className=\"mb-5\" />\n <FooterDescription className=\"max-w-sm leading-6 my-5\" />\n <FooterContacts className=\"mb-6\" />\n <SallaSocial className=\"block mb-6\" />\n <FooterTrust dark={isDark} centered={false} />\n </div>\n\n <FooterLinksMenu\n inSheet={inSheet}\n className=\"store-footer__menu store-footer__menu--stacked\"\n heading={t('blocks.footer.important_links', 'Important links')}\n dark={isDark}\n />\n\n <FooterApps className=\"\" />\n </div>\n );\n}\n\nexport interface FooterProps {\n /**\n * Renders as a plain `<div>` (no second `<footer>` landmark) with the\n * `footer:start` / `footer:end` hook slots skipped -- for a theme that\n * repeats these widgets somewhere other than the page's own footer (a\n * mobile sheet, for example) rather than rendering the real page footer a\n * second time.\n */\n inSheet?: boolean;\n}\n\n/**\n * Storefront footer.\n *\n * Two layouts, chosen by the `footer_layout` theme setting:\n * - **columns** (default): logo / description / social / trust badges, the\n * footer menu (\"important links\"), and app-store buttons, side by side.\n * - **centered**: the same pieces stacked as one centered column, with the\n * footer menu laid out as an inline, pipe-separated row.\n *\n * Styling for the handful of pieces rendered by web components this owns no\n * markup for (`<salla-social>`'s `.social-link` icons, `<salla-menu>`'s\n * `.s-menu-footer-item` rows, `<salla-payments>`'s `.s-payments-list-item`\n * icons) is the consuming theme's own responsibility, the same way\n * `inSheet`'s own presentation is -- this component owns structure and data,\n * not every pixel.\n */\nexport function Footer({ inSheet = false }: FooterProps = {}) {\n const { store, theme } = useTwilight();\n const { t } = useTranslation();\n const year = new Date().getFullYear();\n const isCentered = theme.settings?.footer_layout === 'centered';\n const isDark = !!theme.settings?.footer_is_dark;\n\n const Root = inSheet ? 'div' : 'footer';\n\n return (\n <Root\n className={`store-footer store-footer--${isCentered ? 'centered' : 'columns'}${\n inSheet ? ' store-footer--sheet' : ''\n } relative mt-8 sm:mt-16 ${isDark ? 'bg-[#0E0F0F] text-white' : 'bg-[#F4F7F2] text-gray-600'}`}\n suppressHydrationWarning\n >\n {!inSheet && <HookSlot name=\"footer:start\" />}\n\n <div\n aria-label=\"footer\"\n className={`store-footer__inner border-b py-8 lg:py-16 ${\n isDark ? 'bg-[#1D1F1F] border-dashed border-white/10' : 'bg-transparent border-gray-200'\n }`}\n >\n {isCentered ? (\n <FooterCenteredBody inSheet={inSheet} isDark={isDark} />\n ) : (\n <FooterColumnsBody inSheet={inSheet} isDark={isDark} />\n )}\n </div>\n\n <div className=\"store-footer__bottom container md:flex items-center justify-between gap-4 py-4 lg:py-7 text-center\">\n <span className={`text-sm copyright-text ${isDark ? 'text-gray-400' : 'text-gray-700'}`}>\n <HookSlot\n name=\"copyright\"\n context={{ storeName: store.name }}\n fallback={\n <>\n {t('blocks.footer.copyright', 'All rights reserved')}{' '}\n <Link to=\"/\" className=\"transition-opacity hover:opacity-75 hover:text-primary\">\n {store.name}\n </Link>{' '}\n © {year}\n <MadeWithSalla className=\"ms-2\" />\n </>\n }\n />\n </span>\n\n <SallaPayments />\n </div>\n\n {!inSheet && <HookSlot name=\"footer:end\" />}\n </Root>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/components/layout/Footer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAiBA,IAAM,YAAA,GACJ,+HAAA;AAOF,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;AAAA,gCACH,GAAA,CAAC,aAAA,EAAA,EAAc,SAAA,EAAU,MAAA,EAAO;AAAA,eAAA,EAClC;AAAA;AAAA,WAEJ,EACF,CAAA;AAAA,8BAEC,aAAA,EAAA,EAAc;AAAA,SAAA,EACjB,CAAA;AAAA,QAEC,CAAC,OAAA,oBAAW,GAAA,CAAC,QAAA,EAAA,EAAS,MAAK,YAAA,EAAa;AAAA;AAAA;AAAA,GAC3C;AAEJ","file":"chunk-OSIFK62D.js","sourcesContent":["import { useState } from 'react';\nimport { SallaAppsIcons } from '@salla.sa/twilight-components-react/apps-icons';\nimport { SallaContacts } from '@salla.sa/twilight-components-react/contacts';\nimport { SallaSocial } from '@salla.sa/twilight-components-react/social';\nimport { SallaMenu } from '@salla.sa/twilight-components-react/menu';\nimport { SallaTrustBadges } from '@salla.sa/twilight-components-react/trust-badges';\nimport { SallaPayments } from '@salla.sa/twilight-components-react/payments';\nimport { useTwilight } from '../../providers/twilight-context';\nimport { useTranslation } from '../../providers/I18nProvider';\nimport { HookSlot } from '../../hooks/HookSlot';\nimport { useIsClient } from '../../hooks/useIsClient';\nimport { Link, Image } from '../common';\nimport { ImageModal } from '../modal';\nimport { MadeWithSalla } from './MadeWithSalla';\n\n/** Salla's value-added-tax badge icon (70×70, CDN-resized) — a platform\n * asset shared by every store, not specific to any one theme. */\nconst TAX_ICON_URL =\n 'https://cdn.salla.network/cdn-cgi/image/fit=scale-down,width=70,height=70,onerror=redirect,format=auto/images/tax.png?v=2.0.5';\n\n/**\n * The store's value-added-tax registration: the tax number, plus the certificate as\n * the tax icon that opens the certificate image full size in a modal. Nothing shows\n * when the store has no tax number.\n */\nfunction FooterTax({ dark }: { dark: boolean }) {\n const { store } = useTwilight();\n const { t } = useTranslation();\n const [open, setOpen] = useState(false);\n const number = store.settings?.tax?.number;\n const certificate = store.settings?.tax?.certificate;\n if (!number) return null;\n\n return (\n <div\n data-testid=\"store-footer-tax\"\n className=\"store-footer__tax flex items-end gap-2 rtl:space-x-reverse\"\n >\n {certificate && (\n <>\n <button\n type=\"button\"\n data-testid=\"store-footer-tax-certificate\"\n className=\"store-footer__tax-cert shrink-0\"\n aria-label={t('common.elements.tax_certificate', 'Tax Certificate')}\n aria-haspopup=\"dialog\"\n onClick={() => setOpen(true)}\n >\n <img\n src={TAX_ICON_URL}\n alt={t('common.elements.tax_certificate', 'Tax Certificate')}\n width={40}\n height={50}\n loading=\"lazy\"\n decoding=\"async\"\n className=\"w-10 rounded-sm transition-opacity hover:opacity-80\"\n />\n </button>\n <ImageModal\n isOpen={open}\n onClose={() => setOpen(false)}\n src={certificate}\n alt={t('common.elements.tax_certificate', 'Tax Certificate')}\n title={t('common.elements.tax_certificate', 'Tax Certificate')}\n />\n </>\n )}\n <div>\n <p className={`mb-1 text-sm opacity-70 ${dark ? 'text-white' : ''}`}>\n {t('common.elements.tax_number', 'Tax Number')}\n </p>\n <b className=\"text-sm\">{number}</b>\n </div>\n </div>\n );\n}\n\n/** Saudi Business Center (SBC) logo, CDN-versioned like the tax icon -- also a\n * platform asset, not theme-specific. */\nconst SBC_ICON_URL = 'https://cdn.salla.network/images/sbc.png?v=2.0.5';\n\n/**\n * The store's Saudi Business Center certificate: a \"Trusted by Business Platform\" badge that\n * opens the certificate's page on the SBC site so visitors can verify the merchant. Nothing\n * shows when the store has no certificate.\n */\nfunction FooterSbc({ dark }: { dark: boolean }) {\n const { store } = useTwilight();\n const { t } = useTranslation();\n const id = store.settings?.certificate?.id;\n if (!id) return null;\n\n return (\n <a\n href={`https://eauthenticate.saudibusiness.gov.sa/certificate-details/${encodeURIComponent(id)}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n data-testid=\"store-footer-sbc\"\n className=\"store-footer__sbc flex items-center gap-2.5 transition-opacity hover:opacity-75\"\n >\n <img\n src={SBC_ICON_URL}\n alt={`SBC ${id}`}\n width={56}\n height={40}\n loading=\"lazy\"\n decoding=\"async\"\n className=\"h-10 w-14 rounded-sm\"\n />\n <div>\n <p className={`text-xs opacity-70 ${dark ? 'text-white' : ''}`}>\n {t('blocks.footer.sbc_trusted_by', 'Trusted by')}\n </p>\n <b className=\"text-sm\">{t('blocks.footer.sbc_platform', 'Business Platform')}</b>\n </div>\n </a>\n );\n}\n\n/** Trust badges, the tax registration and the SBC badge, side by side (wrapping on narrow columns). */\nfunction FooterTrust({ dark, centered }: { dark: boolean; centered: boolean }) {\n return (\n <div\n data-testid=\"store-footer-trust\"\n className={`store-footer__trust flex flex-wrap items-end gap-x-6 gap-y-3${centered ? ' justify-center' : ''}`}\n >\n <FooterTax dark={dark} />\n <FooterSbc dark={dark} />\n <SallaTrustBadges {...(dark ? { dark: true } : {})} />\n </div>\n );\n}\n\n/**\n * The footer's own menu of (\"important\") links -- skipped entirely when\n * `inSheet`, for a theme that opens it from somewhere else of its own (a\n * mobile account sheet, a dedicated links screen, …) instead; showing it\n * again down here would just be a redundant second copy. `heading` wraps it\n * in the grid layout's own `.store-footer__links` column; the centered\n * layout's inline row has none.\n */\nfunction FooterLinksMenu({\n inSheet,\n className,\n heading,\n dark,\n}: {\n inSheet: boolean;\n className: string;\n heading?: string;\n dark: boolean;\n}) {\n if (inSheet) return null;\n\n const menu = <SallaMenu source=\"footer\" className={className} suppressHydrationWarning />;\n if (!heading) return menu;\n\n return (\n <div className=\"store-footer__links\">\n <h3 className={`mb-3 text-lg font-bold lg:mb-5 ${dark ? 'text-white' : 'text-gray-900'}`}>\n {heading}\n </h3>\n {menu}\n </div>\n );\n}\n\n/** App-store / Google-Play buttons. Nothing shows -- not even the wrapping\n * div -- when the store has neither link set. */\nfunction FooterApps({ className }: { className: string }) {\n const { store } = useTwilight();\n const { t } = useTranslation();\n // The web component fills its light DOM before React hydrates the footer, a hydration error.\n const isClient = useIsClient();\n if (!store.apps?.appstore && !store.apps?.googleplay) return null;\n\n return (\n <div data-testid=\"store-footer-apps\" className={`store-footer__apps ${className}`}>\n {isClient && (\n <SallaAppsIcons\n apps={store.apps}\n appsTitle={t('blocks.footer.download_apps', 'Get our apps')}\n />\n )}\n </div>\n );\n}\n\n/** The logo link, same shape in both layouts -- only its own spacing differs. */\nfunction FooterLogo({ className }: { className: string }) {\n const { store } = useTwilight();\n return (\n <Link\n to=\"/\"\n className={`store-footer__logo inline-flex items-center m-0 transition-opacity hover:opacity-75 ${className}`}\n >\n <Image\n src={store.logo}\n alt={store.name || 'Store'}\n width={150}\n height={44}\n objectFit=\"contain\"\n className=\"h-11 w-auto max-w-[180px]\"\n />\n </Link>\n );\n}\n\n/** Merchant-authored description HTML -- mirrors the Twig theme's\n * `store.description|raw`. Renders nothing when the store has none set. */\nfunction FooterDescription({ className }: { className: string }) {\n const { store } = useTwilight();\n if (!store.description) return null;\n return (\n <div\n className={`store-footer__desc opacity-80 ${className}`}\n dangerouslySetInnerHTML={{ __html: store.description }}\n />\n );\n}\n\n/** The store's phone and email as one \"Contact us: …\" row under the description\n * (`<salla-contacts>`'s compact `isHeader` layout, which shows only those two).\n * Renders nothing when the store has neither. */\nfunction FooterContacts({ className }: { className: string }) {\n const { store } = useTwilight();\n const { t } = useTranslation();\n // The web component fills its light DOM once the SDK is ready, which can come before\n // React hydrates the footer's Suspense boundary: a hydration error (React #418).\n const isClient = useIsClient();\n if (!store.contacts?.phone && !store.contacts?.email) return null;\n return (\n <div className={`store-footer__contacts ${className}`}>\n {isClient && (\n <SallaContacts\n contacts={store.contacts}\n contactsTitle={t('blocks.footer.social', 'Contact us')}\n isHeader\n />\n )}\n </div>\n );\n}\n\n/** Centered layout: logo, description, contacts, social, footer menu, trust\n * badges and app buttons stacked as one centered column. */\nfunction FooterCenteredBody({ inSheet, isDark }: { inSheet: boolean; isDark: boolean }) {\n return (\n <div className=\"container mx-auto flex max-w-2xl flex-col items-center gap-6 text-center\">\n <FooterLogo className=\"\" />\n <FooterDescription className=\"\" />\n <FooterContacts className=\"\" />\n <SallaSocial />\n\n <FooterLinksMenu\n inSheet={inSheet}\n className=\"store-footer__menu store-footer__menu--inline\"\n dark={isDark}\n />\n\n <FooterTrust dark={isDark} centered />\n\n <FooterApps className=\"flex flex-col items-center gap-3\" />\n </div>\n );\n}\n\n/** Columns layout: brand (logo / description / contacts / social / trust) and app\n * buttons side by side, with the footer menu as its own labeled column. */\nfunction FooterColumnsBody({ inSheet, isDark }: { inSheet: boolean; isDark: boolean }) {\n const { t } = useTranslation();\n\n return (\n <div className=\"container grid grid-cols-1 gap-10 sm:grid-cols-2 lg:grid-cols-4 lg:gap-16\">\n <div className=\"store-footer__brand rtl:lg:pl-16 ltr:lg:pr-16 sm:col-span-2\">\n <FooterLogo className=\"mb-5\" />\n <FooterDescription className=\"max-w-sm leading-6 my-5\" />\n <FooterContacts className=\"mb-6\" />\n <SallaSocial className=\"block mb-6\" />\n <FooterTrust dark={isDark} centered={false} />\n </div>\n\n <FooterLinksMenu\n inSheet={inSheet}\n className=\"store-footer__menu store-footer__menu--stacked\"\n heading={t('blocks.footer.important_links', 'Important links')}\n dark={isDark}\n />\n\n <FooterApps className=\"\" />\n </div>\n );\n}\n\nexport interface FooterProps {\n /**\n * Renders as a plain `<div>` (no second `<footer>` landmark) with the\n * `footer:start` / `footer:end` hook slots skipped -- for a theme that\n * repeats these widgets somewhere other than the page's own footer (a\n * mobile sheet, for example) rather than rendering the real page footer a\n * second time.\n */\n inSheet?: boolean;\n}\n\n/**\n * Storefront footer.\n *\n * Two layouts, chosen by the `footer_layout` theme setting:\n * - **columns** (default): logo / description / social / trust badges, the\n * footer menu (\"important links\"), and app-store buttons, side by side.\n * - **centered**: the same pieces stacked as one centered column, with the\n * footer menu laid out as an inline, pipe-separated row.\n *\n * Styling for the handful of pieces rendered by web components this owns no\n * markup for (`<salla-social>`'s `.social-link` icons, `<salla-menu>`'s\n * `.s-menu-footer-item` rows, `<salla-payments>`'s `.s-payments-list-item`\n * icons) is the consuming theme's own responsibility, the same way\n * `inSheet`'s own presentation is -- this component owns structure and data,\n * not every pixel.\n */\nexport function Footer({ inSheet = false }: FooterProps = {}) {\n const { store, theme } = useTwilight();\n const { t } = useTranslation();\n const year = new Date().getFullYear();\n const isCentered = theme.settings?.footer_layout === 'centered';\n const isDark = !!theme.settings?.footer_is_dark;\n\n const Root = inSheet ? 'div' : 'footer';\n\n return (\n <Root\n className={`store-footer store-footer--${isCentered ? 'centered' : 'columns'}${\n inSheet ? ' store-footer--sheet' : ''\n } relative mt-8 sm:mt-16 ${isDark ? 'bg-[#0E0F0F] text-white' : 'bg-[#F4F7F2] text-gray-600'}`}\n suppressHydrationWarning\n >\n {!inSheet && <HookSlot name=\"footer:start\" />}\n\n <div\n aria-label=\"footer\"\n className={`store-footer__inner border-b py-8 lg:py-16 ${\n isDark ? 'bg-[#1D1F1F] border-dashed border-white/10' : 'bg-transparent border-gray-200'\n }`}\n >\n {isCentered ? (\n <FooterCenteredBody inSheet={inSheet} isDark={isDark} />\n ) : (\n <FooterColumnsBody inSheet={inSheet} isDark={isDark} />\n )}\n </div>\n\n <div className=\"store-footer__bottom container md:flex items-center justify-between gap-4 py-4 lg:py-7 text-center\">\n <span className={`text-sm copyright-text ${isDark ? 'text-gray-400' : 'text-gray-700'}`}>\n <HookSlot\n name=\"copyright\"\n context={{ storeName: store.name }}\n fallback={\n <>\n {t('blocks.footer.copyright', 'All rights reserved')}{' '}\n <Link to=\"/\" className=\"transition-opacity hover:opacity-75 hover:text-primary\">\n {store.name}\n </Link>{' '}\n © {year}\n <MadeWithSalla className=\"ms-2\" />\n </>\n }\n />\n </span>\n\n <SallaPayments />\n </div>\n\n {!inSheet && <HookSlot name=\"footer:end\" />}\n </Root>\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { filesCdn, cdn } from './chunk-BSGHOYMT.js';
1
+ import { filesCdn, cdn } from './chunk-SOQN5WKL.js';
2
2
  import { storeTranslationsQueryKey, translationsQueryKey, composeMessages, isPlainObject } from './chunk-7VNVCHID.js';
3
3
  import { queryOptions } from '@tanstack/react-query';
4
4
 
@@ -126,5 +126,5 @@ var translations = {
126
126
  };
127
127
 
128
128
  export { commonTranslationsPath, storeTranslationsPath, translations };
129
- //# sourceMappingURL=chunk-4FYLW5WS.js.map
130
- //# sourceMappingURL=chunk-4FYLW5WS.js.map
129
+ //# sourceMappingURL=chunk-QT5YXTED.js.map
130
+ //# sourceMappingURL=chunk-QT5YXTED.js.map