@vtex/faststore 0.0.10 → 0.0.11

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 (506) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +0 -1
  3. package/dist/actions.json +6 -1
  4. package/dist/catalog.json +789 -1701
  5. package/dist/cli/index.d.ts +66 -28
  6. package/dist/cli/index.js +7371 -512
  7. package/dist/cli/index.js.map +1 -1
  8. package/dist/cli/server-runtime.js +41 -60
  9. package/dist/cli/server-runtime.js.map +1 -1
  10. package/dist/client.d.ts +3 -3
  11. package/dist/client.js +2 -2
  12. package/dist/components.d.ts +63 -57
  13. package/dist/components.js +60 -54
  14. package/dist/content-types.json +5785 -754
  15. package/dist/core/dist/define-component.d.ts +1 -1
  16. package/dist/core/dist/define-content-type.d.ts +50 -2
  17. package/dist/core/dist/define-content-type.js +107 -3
  18. package/dist/core/dist/define-content-type.js.map +1 -1
  19. package/dist/core/dist/index.d.ts +2 -2
  20. package/dist/docs/access-code-field.md +1 -1
  21. package/dist/docs/access-code-sign-in.md +126 -77
  22. package/dist/docs/account-address-book.md +210 -95
  23. package/dist/docs/account-menu.md +14 -15
  24. package/dist/docs/account-saved-cards.md +44 -39
  25. package/dist/docs/alert-dialog.md +3 -1
  26. package/dist/docs/avatar.md +4 -2
  27. package/dist/docs/billing-address.md +99 -30
  28. package/dist/docs/binding-switcher.md +5 -2
  29. package/dist/docs/buy-button.md +7 -8
  30. package/dist/docs/card-entry.md +39 -26
  31. package/dist/docs/card-summary.md +18 -8
  32. package/dist/docs/cardholder-document.md +5 -3
  33. package/dist/docs/carousel.md +5 -4
  34. package/dist/docs/cart-destination.md +39 -26
  35. package/dist/docs/cart-item.md +29 -14
  36. package/dist/docs/cart-totalizer.md +7 -5
  37. package/dist/docs/cart.md +135 -41
  38. package/dist/docs/challenge-return.md +135 -0
  39. package/dist/docs/client-preferences-fieldset.md +10 -5
  40. package/dist/docs/client-preferences.md +31 -8
  41. package/dist/docs/client-profile-fieldset.md +20 -6
  42. package/dist/docs/client-profile.md +12 -3
  43. package/dist/docs/copy-text.md +9 -7
  44. package/dist/docs/document-field.md +1 -1
  45. package/dist/docs/email-field.md +2 -1
  46. package/dist/docs/email-identification.md +12 -2
  47. package/dist/docs/footer-copyright.md +4 -2
  48. package/dist/docs/form.md +54 -18
  49. package/dist/docs/free-shipping-progress.md +6 -5
  50. package/dist/docs/identity-edit.md +8 -2
  51. package/dist/docs/identity-summary.md +18 -5
  52. package/dist/docs/installments.md +46 -32
  53. package/dist/docs/my-account-profile.md +16 -11
  54. package/dist/docs/navigation-link.md +5 -3
  55. package/dist/docs/order-cancel.md +3 -1
  56. package/dist/docs/order-delivery-address.md +7 -5
  57. package/dist/docs/order-delivery-group.md +1 -3
  58. package/dist/docs/order-details-back.md +1 -1
  59. package/dist/docs/order-details-header.md +1 -4
  60. package/dist/docs/order-invoice-download.md +60 -0
  61. package/dist/docs/order-list-row.md +1 -1
  62. package/dist/docs/order-list-search.md +13 -20
  63. package/dist/docs/order-list-views.md +11 -17
  64. package/dist/docs/order-list.md +12 -5
  65. package/dist/docs/order-payment.md +9 -7
  66. package/dist/docs/order-placed-date.md +1 -1
  67. package/dist/docs/order-placed-payment-summary.md +28 -15
  68. package/dist/docs/order-placed.md +49 -14
  69. package/dist/docs/order-progress.md +1 -1
  70. package/dist/docs/order-status-badge.md +20 -9
  71. package/dist/docs/order-summary.md +2 -2
  72. package/dist/docs/order-tracking-link.md +58 -0
  73. package/dist/docs/payment-method-badges.md +30 -4
  74. package/dist/docs/payment-methods.md +1 -1
  75. package/dist/docs/payment.md +36 -17
  76. package/dist/docs/phone-field.md +4 -4
  77. package/dist/docs/place-order.md +84 -36
  78. package/dist/docs/postal-code-field.md +3 -1
  79. package/dist/docs/pricing.md +21 -23
  80. package/dist/docs/product-gallery.md +19 -20
  81. package/dist/docs/product-information.md +13 -9
  82. package/dist/docs/product-list.md +7 -6
  83. package/dist/docs/product-shelf.md +0 -1
  84. package/dist/docs/promotion.md +4 -2
  85. package/dist/docs/region.md +23 -15
  86. package/dist/docs/save-card.md +7 -6
  87. package/dist/docs/saved-cards.md +65 -36
  88. package/dist/docs/shipping-address.md +57 -21
  89. package/dist/docs/shipping-simulator.md +53 -15
  90. package/dist/docs/sign-in-disclosure.md +176 -0
  91. package/dist/docs/sign-in-form.md +78 -47
  92. package/dist/docs/sign-in-redirect.md +4 -2
  93. package/dist/docs/sign-in.md +173 -0
  94. package/dist/docs/toast.md +15 -4
  95. package/dist/docs/variant-selector.md +15 -11
  96. package/dist/graphql/types.d.ts +4 -14
  97. package/dist/index.d.ts +2 -2
  98. package/dist/internal/client.d.ts +1 -3
  99. package/dist/internal/client.js +1 -1
  100. package/dist/internal/server.d.ts +7 -4
  101. package/dist/internal/server.js +7 -4
  102. package/dist/matter/access-code-sign-in/access-code-sign-in.d.ts +250 -66
  103. package/dist/matter/access-code-sign-in/access-code-sign-in.js +459 -188
  104. package/dist/matter/access-code-sign-in/access-code-sign-in.js.map +1 -1
  105. package/dist/matter/account-address-book/account-address-book-delete.d.ts +78 -40
  106. package/dist/matter/account-address-book/account-address-book-delete.js +86 -50
  107. package/dist/matter/account-address-book/account-address-book-delete.js.map +1 -1
  108. package/dist/matter/account-address-book/account-address-book-deliverability.d.ts +21 -4
  109. package/dist/matter/account-address-book/account-address-book-deliverability.js +45 -17
  110. package/dist/matter/account-address-book/account-address-book-deliverability.js.map +1 -1
  111. package/dist/matter/account-address-book/account-address-book-form-parts.d.ts +74 -19
  112. package/dist/matter/account-address-book/account-address-book-form-parts.js +77 -26
  113. package/dist/matter/account-address-book/account-address-book-form-parts.js.map +1 -1
  114. package/dist/matter/account-address-book/account-address-book-profile-notice.d.ts +27 -6
  115. package/dist/matter/account-address-book/account-address-book-profile-notice.js +55 -28
  116. package/dist/matter/account-address-book/account-address-book-profile-notice.js.map +1 -1
  117. package/dist/matter/account-address-book/account-address-book.d.ts +67 -14
  118. package/dist/matter/account-address-book/account-address-book.js +74 -33
  119. package/dist/matter/account-address-book/account-address-book.js.map +1 -1
  120. package/dist/matter/account-address-book/account-address-country-switch.js +3 -3
  121. package/dist/matter/account-address-book/account-address-country-switch.js.map +1 -1
  122. package/dist/matter/account-address-book/account-address-country.d.ts +66 -20
  123. package/dist/matter/account-address-book/account-address-country.js +83 -49
  124. package/dist/matter/account-address-book/account-address-country.js.map +1 -1
  125. package/dist/matter/account-address-book/account-address-form-context.d.ts +8 -4
  126. package/dist/matter/account-address-book/account-address-form-context.js.map +1 -1
  127. package/dist/matter/account-address-book/account-address-form.d.ts +468 -45
  128. package/dist/matter/account-address-book/account-address-form.js +518 -155
  129. package/dist/matter/account-address-book/account-address-form.js.map +1 -1
  130. package/dist/matter/account-address-book/account-address-record.d.ts +27 -6
  131. package/dist/matter/account-address-book/account-address-record.js +32 -17
  132. package/dist/matter/account-address-book/account-address-record.js.map +1 -1
  133. package/dist/matter/account-menu/account-menu.d.ts +34 -17
  134. package/dist/matter/account-menu/account-menu.js +46 -54
  135. package/dist/matter/account-menu/account-menu.js.map +1 -1
  136. package/dist/matter/account-menu-identity/account-menu-identity.js +1 -1
  137. package/dist/matter/account-saved-cards/account-saved-cards.d.ts +108 -28
  138. package/dist/matter/account-saved-cards/account-saved-cards.js +177 -122
  139. package/dist/matter/account-saved-cards/account-saved-cards.js.map +1 -1
  140. package/dist/matter/billing-address/billing-address.d.ts +156 -74
  141. package/dist/matter/billing-address/billing-address.js +227 -156
  142. package/dist/matter/billing-address/billing-address.js.map +1 -1
  143. package/dist/matter/breadcrumb/breadcrumb.d.ts +21 -3
  144. package/dist/matter/breadcrumb/breadcrumb.js +24 -9
  145. package/dist/matter/breadcrumb/breadcrumb.js.map +1 -1
  146. package/dist/matter/buy-button/buy-button.d.ts +8 -11
  147. package/dist/matter/buy-button/buy-button.js +10 -19
  148. package/dist/matter/buy-button/buy-button.js.map +1 -1
  149. package/dist/matter/card-entry/card-capture.js +12 -4
  150. package/dist/matter/card-entry/card-capture.js.map +1 -1
  151. package/dist/matter/card-entry/card-entry.d.ts +123 -32
  152. package/dist/matter/card-entry/card-entry.js +348 -221
  153. package/dist/matter/card-entry/card-entry.js.map +1 -1
  154. package/dist/matter/cart/cart-namespace.d.ts +7 -1
  155. package/dist/matter/cart/cart-namespace.js +7 -1
  156. package/dist/matter/cart/cart-namespace.js.map +1 -1
  157. package/dist/matter/cart/cart.d.ts +402 -61
  158. package/dist/matter/cart/cart.js +624 -153
  159. package/dist/matter/cart/cart.js.map +1 -1
  160. package/dist/matter/cart-destination/cart-destination.d.ts +30 -19
  161. package/dist/matter/cart-destination/cart-destination.js +160 -70
  162. package/dist/matter/cart-destination/cart-destination.js.map +1 -1
  163. package/dist/matter/cart-item/cart-item.d.ts +144 -17
  164. package/dist/matter/cart-item/cart-item.js +166 -49
  165. package/dist/matter/cart-item/cart-item.js.map +1 -1
  166. package/dist/matter/cart-item-compositions/cart-item-compositions.js +1 -1
  167. package/dist/matter/cart-item-compositions/cart-item-compositions.js.map +1 -1
  168. package/dist/matter/cart-item-customizations/cart-item-customizations.js +1 -1
  169. package/dist/matter/cart-item-customizations/cart-item-customizations.js.map +1 -1
  170. package/dist/matter/cart-item-discounts/cart-item-discounts.js +1 -1
  171. package/dist/matter/cart-item-discounts/cart-item-discounts.js.map +1 -1
  172. package/dist/matter/cart-item-seller-info/cart-item-seller-info.js +1 -1
  173. package/dist/matter/cart-item-seller-info/cart-item-seller-info.js.map +1 -1
  174. package/dist/matter/cart-item-variations/cart-item-variations.js +1 -1
  175. package/dist/matter/cart-item-variations/cart-item-variations.js.map +1 -1
  176. package/dist/matter/cart-totalizer/cart-totalizer.d.ts +43 -9
  177. package/dist/matter/cart-totalizer/cart-totalizer.js +46 -17
  178. package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -1
  179. package/dist/matter/challenge-return/challenge-return.d.ts +62 -0
  180. package/dist/matter/challenge-return/challenge-return.js +241 -0
  181. package/dist/matter/challenge-return/challenge-return.js.map +1 -0
  182. package/dist/matter/client-preferences/client-preferences-fieldset.d.ts +86 -17
  183. package/dist/matter/client-preferences/client-preferences-fieldset.js +126 -54
  184. package/dist/matter/client-preferences/client-preferences-fieldset.js.map +1 -1
  185. package/dist/matter/client-preferences/client-preferences.d.ts +50 -7
  186. package/dist/matter/client-preferences/client-preferences.js +84 -15
  187. package/dist/matter/client-preferences/client-preferences.js.map +1 -1
  188. package/dist/matter/client-profile/client-profile.d.ts +44 -9
  189. package/dist/matter/client-profile/client-profile.js +64 -24
  190. package/dist/matter/client-profile/client-profile.js.map +1 -1
  191. package/dist/matter/client-profile-form/client-profile-fieldset.d.ts +119 -22
  192. package/dist/matter/client-profile-form/client-profile-fieldset.js +161 -73
  193. package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -1
  194. package/dist/matter/delivery-options/delivery-options-accordion.d.ts +49 -4
  195. package/dist/matter/delivery-options/delivery-options-accordion.js +67 -14
  196. package/dist/matter/delivery-options/delivery-options-accordion.js.map +1 -1
  197. package/dist/matter/delivery-options/delivery-options-controller.d.ts +69 -9
  198. package/dist/matter/delivery-options/delivery-options-controller.js +80 -14
  199. package/dist/matter/delivery-options/delivery-options-controller.js.map +1 -1
  200. package/dist/matter/delivery-options/delivery-options.d.ts +37 -2
  201. package/dist/matter/delivery-options/delivery-options.js +75 -12
  202. package/dist/matter/delivery-options/delivery-options.js.map +1 -1
  203. package/dist/matter/delivery-options/use-delivery-option-selection.d.ts +1 -0
  204. package/dist/matter/delivery-options/use-delivery-option-selection.js +1 -1
  205. package/dist/matter/delivery-options/use-delivery-option-selection.js.map +1 -1
  206. package/dist/matter/email-identification/email-identification.d.ts +25 -3
  207. package/dist/matter/email-identification/email-identification.js +49 -12
  208. package/dist/matter/email-identification/email-identification.js.map +1 -1
  209. package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +79 -7
  210. package/dist/matter/free-shipping-progress/free-shipping-progress.js +77 -20
  211. package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -1
  212. package/dist/matter/identity-edit/identity-edit.d.ts +52 -10
  213. package/dist/matter/identity-edit/identity-edit.js +47 -19
  214. package/dist/matter/identity-edit/identity-edit.js.map +1 -1
  215. package/dist/matter/identity-summary/identity-summary.d.ts +76 -22
  216. package/dist/matter/identity-summary/identity-summary.js +95 -45
  217. package/dist/matter/identity-summary/identity-summary.js.map +1 -1
  218. package/dist/matter/installments/installments-select.d.ts +98 -16
  219. package/dist/matter/installments/installments-select.js +156 -48
  220. package/dist/matter/installments/installments-select.js.map +1 -1
  221. package/dist/matter/installments/installments.d.ts +96 -16
  222. package/dist/matter/installments/installments.js +115 -40
  223. package/dist/matter/installments/installments.js.map +1 -1
  224. package/dist/matter/installments/use-installments-selection.d.ts +1 -0
  225. package/dist/matter/installments/use-installments-selection.js +8 -3
  226. package/dist/matter/installments/use-installments-selection.js.map +1 -1
  227. package/dist/matter/my-account-profile/my-account-profile.d.ts +358 -103
  228. package/dist/matter/my-account-profile/my-account-profile.js +370 -174
  229. package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
  230. package/dist/matter/order-cancel/order-cancel.d.ts +65 -19
  231. package/dist/matter/order-cancel/order-cancel.js +118 -51
  232. package/dist/matter/order-cancel/order-cancel.js.map +1 -1
  233. package/dist/matter/order-delivery-address/order-delivery-address.d.ts +8 -18
  234. package/dist/matter/order-delivery-address/order-delivery-address.js +14 -23
  235. package/dist/matter/order-delivery-address/order-delivery-address.js.map +1 -1
  236. package/dist/matter/order-delivery-group/order-delivery-group.d.ts +40 -24
  237. package/dist/matter/order-delivery-group/order-delivery-group.js +64 -74
  238. package/dist/matter/order-delivery-group/order-delivery-group.js.map +1 -1
  239. package/dist/matter/order-details-header/order-details-header.d.ts +32 -15
  240. package/dist/matter/order-details-header/order-details-header.js +66 -58
  241. package/dist/matter/order-details-header/order-details-header.js.map +1 -1
  242. package/dist/matter/order-invoice-download/order-invoice-download.d.ts +78 -0
  243. package/dist/matter/order-invoice-download/order-invoice-download.js +173 -0
  244. package/dist/matter/order-invoice-download/order-invoice-download.js.map +1 -0
  245. package/dist/matter/order-list/order-list.d.ts +164 -19
  246. package/dist/matter/order-list/order-list.js +229 -87
  247. package/dist/matter/order-list/order-list.js.map +1 -1
  248. package/dist/matter/order-list-row/order-list-row.d.ts +6 -1
  249. package/dist/matter/order-list-row/order-list-row.js +3 -2
  250. package/dist/matter/order-list-row/order-list-row.js.map +1 -1
  251. package/dist/matter/order-list-search/order-list-search.d.ts +18 -26
  252. package/dist/matter/order-list-search/order-list-search.js +30 -69
  253. package/dist/matter/order-list-search/order-list-search.js.map +1 -1
  254. package/dist/matter/order-list-views/order-list-views.d.ts +15 -22
  255. package/dist/matter/order-list-views/order-list-views.js +22 -68
  256. package/dist/matter/order-list-views/order-list-views.js.map +1 -1
  257. package/dist/matter/order-payment/order-payment.d.ts +33 -10
  258. package/dist/matter/order-payment/order-payment.js +44 -39
  259. package/dist/matter/order-payment/order-payment.js.map +1 -1
  260. package/dist/matter/order-placed/order-placed-deliveries.d.ts +144 -12
  261. package/dist/matter/order-placed/order-placed-deliveries.js +115 -40
  262. package/dist/matter/order-placed/order-placed-deliveries.js.map +1 -1
  263. package/dist/matter/order-placed/order-placed.d.ts +198 -31
  264. package/dist/matter/order-placed/order-placed.js +230 -139
  265. package/dist/matter/order-placed/order-placed.js.map +1 -1
  266. package/dist/matter/order-placed-date/order-placed-date.d.ts +5 -8
  267. package/dist/matter/order-placed-date/order-placed-date.js +7 -8
  268. package/dist/matter/order-placed-date/order-placed-date.js.map +1 -1
  269. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +90 -17
  270. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +93 -117
  271. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -1
  272. package/dist/matter/order-progress/order-progress.d.ts +19 -8
  273. package/dist/matter/order-progress/order-progress.js +37 -45
  274. package/dist/matter/order-progress/order-progress.js.map +1 -1
  275. package/dist/matter/order-summary/order-summary.d.ts +19 -9
  276. package/dist/matter/order-summary/order-summary.js +38 -44
  277. package/dist/matter/order-summary/order-summary.js.map +1 -1
  278. package/dist/matter/order-tracking-link/order-tracking-link.d.ts +43 -0
  279. package/dist/matter/order-tracking-link/order-tracking-link.js +107 -0
  280. package/dist/matter/order-tracking-link/order-tracking-link.js.map +1 -0
  281. package/dist/matter/payment/payment-card-capture.js +17 -10
  282. package/dist/matter/payment/payment-card-capture.js.map +1 -1
  283. package/dist/matter/payment/payment-controller.d.ts +4 -2
  284. package/dist/matter/payment/payment-controller.js +30 -9
  285. package/dist/matter/payment/payment-controller.js.map +1 -1
  286. package/dist/matter/payment/payment-method-badges.js +1 -1
  287. package/dist/matter/payment/payment.d.ts +69 -19
  288. package/dist/matter/payment/payment.js +101 -35
  289. package/dist/matter/payment/payment.js.map +1 -1
  290. package/dist/matter/payment/use-payment-method-selection.d.ts +25 -4
  291. package/dist/matter/payment/use-payment-method-selection.js +94 -32
  292. package/dist/matter/payment/use-payment-method-selection.js.map +1 -1
  293. package/dist/matter/payment/use-payment-submit-gate.d.ts +14 -3
  294. package/dist/matter/payment/use-payment-submit-gate.js +47 -8
  295. package/dist/matter/payment/use-payment-submit-gate.js.map +1 -1
  296. package/dist/matter/place-order/place-order.d.ts +171 -57
  297. package/dist/matter/place-order/place-order.js +376 -185
  298. package/dist/matter/place-order/place-order.js.map +1 -1
  299. package/dist/matter/pricing/pricing.d.ts +152 -13
  300. package/dist/matter/pricing/pricing.js +153 -52
  301. package/dist/matter/pricing/pricing.js.map +1 -1
  302. package/dist/matter/product-information/product-information.d.ts +27 -4
  303. package/dist/matter/product-information/product-information.js +32 -15
  304. package/dist/matter/product-information/product-information.js.map +1 -1
  305. package/dist/matter/product-list/product-list.d.ts +24 -6
  306. package/dist/matter/product-list/product-list.js +32 -26
  307. package/dist/matter/product-list/product-list.js.map +1 -1
  308. package/dist/matter/product-shelf/product-shelf.d.ts +1 -3
  309. package/dist/matter/product-shelf/product-shelf.js +2 -15
  310. package/dist/matter/product-shelf/product-shelf.js.map +1 -1
  311. package/dist/matter/region/region.d.ts +33 -16
  312. package/dist/matter/region/region.js +59 -52
  313. package/dist/matter/region/region.js.map +1 -1
  314. package/dist/matter/save-card/save-card.d.ts +43 -8
  315. package/dist/matter/save-card/save-card.js +61 -23
  316. package/dist/matter/save-card/save-card.js.map +1 -1
  317. package/dist/matter/saved-cards/saved-cards.d.ts +113 -21
  318. package/dist/matter/saved-cards/saved-cards.js +349 -77
  319. package/dist/matter/saved-cards/saved-cards.js.map +1 -1
  320. package/dist/matter/shipping-address/address-payload.js +25 -0
  321. package/dist/matter/shipping-address/address-payload.js.map +1 -0
  322. package/dist/matter/shipping-address/country-descriptors.js +71 -71
  323. package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
  324. package/dist/matter/shipping-address/library-country-descriptors.js +136 -0
  325. package/dist/matter/shipping-address/library-country-descriptors.js.map +1 -0
  326. package/dist/matter/shipping-address/shipping-address.d.ts +312 -45
  327. package/dist/matter/shipping-address/shipping-address.js +443 -188
  328. package/dist/matter/shipping-address/shipping-address.js.map +1 -1
  329. package/dist/matter/shipping-simulator/shipping-simulator.d.ts +250 -24
  330. package/dist/matter/shipping-simulator/shipping-simulator.js +257 -51
  331. package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
  332. package/dist/matter/sign-in/sign-in.d.ts +108 -0
  333. package/dist/matter/sign-in/sign-in.js +285 -0
  334. package/dist/matter/sign-in/sign-in.js.map +1 -0
  335. package/dist/matter/sign-in-disclosure/sign-in-disclosure.d.ts +81 -0
  336. package/dist/matter/sign-in-disclosure/sign-in-disclosure.js +232 -0
  337. package/dist/matter/sign-in-disclosure/sign-in-disclosure.js.map +1 -0
  338. package/dist/matter/sign-in-form/sign-in-form.d.ts +93 -62
  339. package/dist/matter/sign-in-form/sign-in-form.js +134 -144
  340. package/dist/matter/sign-in-form/sign-in-form.js.map +1 -1
  341. package/dist/particles/binding-switcher/binding-switcher.d.ts +29 -8
  342. package/dist/particles/binding-switcher/binding-switcher.js +37 -26
  343. package/dist/particles/binding-switcher/binding-switcher.js.map +1 -1
  344. package/dist/particles/card-summary/card-summary.d.ts +38 -8
  345. package/dist/particles/card-summary/card-summary.js +55 -22
  346. package/dist/particles/card-summary/card-summary.js.map +1 -1
  347. package/dist/particles/carousel/carousel.d.ts +99 -11
  348. package/dist/particles/carousel/carousel.js +103 -35
  349. package/dist/particles/carousel/carousel.js.map +1 -1
  350. package/dist/particles/copy-text/copy-text.js +5 -15
  351. package/dist/particles/copy-text/copy-text.js.map +1 -1
  352. package/dist/particles/dialog/dialog.d.ts +14 -6
  353. package/dist/particles/dialog/dialog.js +6 -3
  354. package/dist/particles/dialog/dialog.js.map +1 -1
  355. package/dist/particles/drawer/drawer.js +1 -1
  356. package/dist/particles/drawer/drawer.js.map +1 -1
  357. package/dist/particles/email-field/email-field.d.ts +2 -1
  358. package/dist/particles/email-field/email-field.js +2 -1
  359. package/dist/particles/email-field/email-field.js.map +1 -1
  360. package/dist/particles/footer-link-group/footer-link-group.js +1 -0
  361. package/dist/particles/footer-link-group/footer-link-group.js.map +1 -1
  362. package/dist/particles/form/form.d.ts +85 -13
  363. package/dist/particles/form/form.js +91 -42
  364. package/dist/particles/form/form.js.map +1 -1
  365. package/dist/particles/gallery/gallery.d.ts +129 -12
  366. package/dist/particles/gallery/gallery.js +121 -34
  367. package/dist/particles/gallery/gallery.js.map +1 -1
  368. package/dist/particles/order-details-back/order-details-back.d.ts +5 -3
  369. package/dist/particles/order-details-back/order-details-back.js +8 -10
  370. package/dist/particles/order-details-back/order-details-back.js.map +1 -1
  371. package/dist/particles/order-status-badge/order-status-badge.d.ts +3 -3
  372. package/dist/particles/order-status-badge/order-status-badge.js +4 -20
  373. package/dist/particles/order-status-badge/order-status-badge.js.map +1 -1
  374. package/dist/particles/password-field/password-field.d.ts +1 -1
  375. package/dist/particles/password-field/password-field.js +2 -4
  376. package/dist/particles/password-field/password-field.js.map +1 -1
  377. package/dist/particles/phone-field/phone-field.d.ts +4 -4
  378. package/dist/particles/phone-field/phone-field.js +8 -11
  379. package/dist/particles/phone-field/phone-field.js.map +1 -1
  380. package/dist/particles/spinner/spinner.d.ts +24 -4
  381. package/dist/particles/spinner/spinner.js +25 -9
  382. package/dist/particles/spinner/spinner.js.map +1 -1
  383. package/dist/particles/switch/switch.d.ts +4 -1
  384. package/dist/particles/switch/switch.js +3 -1
  385. package/dist/particles/switch/switch.js.map +1 -1
  386. package/dist/particles/toast/toast.d.ts +29 -3
  387. package/dist/particles/toast/toast.js +34 -10
  388. package/dist/particles/toast/toast.js.map +1 -1
  389. package/dist/schema.graphql +164 -56
  390. package/dist/sdk/address/address-fields.js +4 -4
  391. package/dist/sdk/address/address-fields.js.map +1 -1
  392. package/dist/sdk/address/constants.js +1 -6
  393. package/dist/sdk/address/constants.js.map +1 -1
  394. package/dist/sdk/address/messages.js +44 -44
  395. package/dist/sdk/address/messages.js.map +1 -1
  396. package/dist/sdk/address/postal-code.js +15 -2
  397. package/dist/sdk/address/postal-code.js.map +1 -1
  398. package/dist/sdk/address/types.d.ts +5 -3
  399. package/dist/sdk/address/validate-address.js +3 -3
  400. package/dist/sdk/address/validate-address.js.map +1 -1
  401. package/dist/sdk/analytics/use-analytics-actions.d.ts +1 -1
  402. package/dist/sdk/analytics/use-analytics-actions.js.map +1 -1
  403. package/dist/sdk/cart/use-cart-actions.js.map +1 -1
  404. package/dist/sdk/data/index.js +2 -2
  405. package/dist/sdk/data/reactive-list-item-data-provider.js +2 -2
  406. package/dist/sdk/generated/gql.js +1 -1
  407. package/dist/sdk/generated/gql.js.map +1 -1
  408. package/dist/sdk/generated/graphql.d.ts +20 -5
  409. package/dist/sdk/generated/graphql.js +6 -0
  410. package/dist/sdk/generated/graphql.js.map +1 -1
  411. package/dist/sdk/i18n/format-error-code.js +23 -0
  412. package/dist/sdk/i18n/format-error-code.js.map +1 -0
  413. package/dist/sdk/i18n/message-formatter.d.ts +22 -0
  414. package/dist/sdk/i18n/message-formatter.js +140 -0
  415. package/dist/sdk/i18n/message-formatter.js.map +1 -0
  416. package/dist/sdk/i18n/use-message-formatter.d.ts +8 -0
  417. package/dist/sdk/i18n/use-message-formatter.js +18 -0
  418. package/dist/sdk/i18n/use-message-formatter.js.map +1 -0
  419. package/dist/sdk/identity/use-identity-actions.js.map +1 -1
  420. package/dist/sdk/navigation/redirect.d.ts +2 -0
  421. package/dist/sdk/navigation/redirect.js +19 -1
  422. package/dist/sdk/navigation/redirect.js.map +1 -1
  423. package/dist/sdk/navigation/types.d.ts +13 -0
  424. package/dist/sdk/payment/bin-format.js +20 -0
  425. package/dist/sdk/payment/bin-format.js.map +1 -0
  426. package/dist/sdk/payment/challenge-return.js +37 -0
  427. package/dist/sdk/payment/challenge-return.js.map +1 -0
  428. package/dist/sdk/payment/confirmation-last-four.js +39 -0
  429. package/dist/sdk/payment/confirmation-last-four.js.map +1 -0
  430. package/dist/sdk/payment/gateway.d.ts +1 -1
  431. package/dist/sdk/payment/gateway.js +8 -2
  432. package/dist/sdk/payment/gateway.js.map +1 -1
  433. package/dist/sdk/payment/operations.d.ts +1 -0
  434. package/dist/sdk/payment/operations.js +28 -6
  435. package/dist/sdk/payment/operations.js.map +1 -1
  436. package/dist/sdk/payment/resumed-purchase.d.ts +1 -0
  437. package/dist/sdk/payment/resumed-purchase.js +119 -0
  438. package/dist/sdk/payment/resumed-purchase.js.map +1 -0
  439. package/dist/sdk/payment/security-code-mask.js +16 -23
  440. package/dist/sdk/payment/security-code-mask.js.map +1 -1
  441. package/dist/sdk/payment/submission-registry.js +6 -2
  442. package/dist/sdk/payment/submission-registry.js.map +1 -1
  443. package/dist/sdk/payment/use-payment-actions.d.ts +18 -3
  444. package/dist/sdk/payment/use-payment-actions.js +23 -3
  445. package/dist/sdk/payment/use-payment-actions.js.map +1 -1
  446. package/dist/sdk/payment/use-place-order.d.ts +10 -2
  447. package/dist/sdk/payment/use-place-order.js +138 -76
  448. package/dist/sdk/payment/use-place-order.js.map +1 -1
  449. package/dist/sdk/provider/storefront-provider.d.ts +1 -7
  450. package/dist/sdk/provider/storefront-provider.js +4 -11
  451. package/dist/sdk/provider/storefront-provider.js.map +1 -1
  452. package/dist/sdk/seo/entity-landing.d.ts +24 -0
  453. package/dist/sdk/seo/entity-landing.js +30 -0
  454. package/dist/sdk/seo/entity-landing.js.map +1 -0
  455. package/dist/sdk/seo/page-alternates.d.ts +3 -2
  456. package/dist/sdk/seo/page-alternates.js +4 -2
  457. package/dist/sdk/seo/page-alternates.js.map +1 -1
  458. package/dist/sdk/seo/search-landing.d.ts +42 -0
  459. package/dist/sdk/seo/search-landing.js +85 -0
  460. package/dist/sdk/seo/search-landing.js.map +1 -0
  461. package/dist/sdk/session/mock-session.d.ts +9 -0
  462. package/dist/sdk/session/mock-session.js +31 -0
  463. package/dist/sdk/session/mock-session.js.map +1 -0
  464. package/dist/sdk/session/read-server-session.d.ts +3 -0
  465. package/dist/sdk/session/read-server-session.js +5 -0
  466. package/dist/sdk/session/read-server-session.js.map +1 -1
  467. package/dist/sdk/session/return-path-segment.d.ts +10 -0
  468. package/dist/sdk/session/return-path-segment.js +15 -0
  469. package/dist/sdk/session/return-path-segment.js.map +1 -0
  470. package/dist/sdk/session/use-session-actions.js.map +1 -1
  471. package/dist/sdk/shipping/use-cart-shipping-simulation.js.map +1 -1
  472. package/dist/sdk/shipping/use-shipping-actions.js.map +1 -1
  473. package/dist/sdk/shipping/use-shipping-simulation.js.map +1 -1
  474. package/dist/utils/safe-href.d.ts +2 -0
  475. package/package.json +4 -3
  476. package/skills/storefront-asset/SKILL.md +2 -2
  477. package/skills/storefront-asset/references/api-side.md +27 -14
  478. package/skills/storefront-asset/references/findings.md +5 -2
  479. package/src/styles/tailwind.css +8 -0
  480. package/dist/matter/shipping-address/country-descriptors.d.ts +0 -1
  481. package/dist/message-locales.json +0 -7
  482. package/dist/sdk/i18n/client.d.ts +0 -4
  483. package/dist/sdk/i18n/client.js +0 -4
  484. package/dist/sdk/i18n/locales.d.ts +0 -8
  485. package/dist/sdk/i18n/locales.js +0 -57
  486. package/dist/sdk/i18n/locales.js.map +0 -1
  487. package/dist/sdk/i18n/messages/en-US.js +0 -183
  488. package/dist/sdk/i18n/messages/en-US.js.map +0 -1
  489. package/dist/sdk/i18n/messages/en-US.json +0 -178
  490. package/dist/sdk/i18n/messages/en-US.json.d.ts +0 -182
  491. package/dist/sdk/i18n/messages/es-ES.js +0 -183
  492. package/dist/sdk/i18n/messages/es-ES.js.map +0 -1
  493. package/dist/sdk/i18n/messages/es-ES.json +0 -178
  494. package/dist/sdk/i18n/messages/pt-BR.js +0 -183
  495. package/dist/sdk/i18n/messages/pt-BR.js.map +0 -1
  496. package/dist/sdk/i18n/messages/pt-BR.json +0 -178
  497. package/dist/sdk/i18n/provider.d.ts +0 -1
  498. package/dist/sdk/i18n/provider.js +0 -30
  499. package/dist/sdk/i18n/provider.js.map +0 -1
  500. package/dist/sdk/i18n/server.d.ts +0 -28
  501. package/dist/sdk/i18n/server.js +0 -59
  502. package/dist/sdk/i18n/server.js.map +0 -1
  503. package/dist/utils/resolve-authored-copy.js +0 -18
  504. package/dist/utils/resolve-authored-copy.js.map +0 -1
  505. package/dist/utils/substitute-template.js +0 -33
  506. package/dist/utils/substitute-template.js.map +0 -1
@@ -1,10 +1,104 @@
1
1
  "use client";
2
2
  import { defineComponent } from "../../core/dist/define-component.js";
3
+ import { defineContentType } from "../../core/dist/define-content-type.js";
3
4
  import "../../core/dist/index.js";
5
+ import { useMessageFormatter } from "../../sdk/i18n/use-message-formatter.js";
4
6
  import { DialogBackdrop, DialogClose, DialogPopup, DialogPortal, DialogRoot, DialogTitle, DialogViewport } from "../dialog/dialog.js";
5
7
  import { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
6
8
  import { jsx, jsxs } from "react/jsx-runtime";
7
9
  //#region src/particles/gallery/gallery.tsx
10
+ const GalleryOverflowCountContent = defineContentType({
11
+ id: "gallery-overflow-count",
12
+ title: "Gallery Overflow Count",
13
+ description: "Text and accessible name of the overflow indicator that opens the fullscreen gallery.",
14
+ schema: {
15
+ type: "object",
16
+ additionalProperties: false,
17
+ properties: {
18
+ template: {
19
+ type: "string",
20
+ title: "Text",
21
+ description: "The count argument is the number of hidden media items.",
22
+ format: "icu-message",
23
+ messageSource: "+{count}",
24
+ messageArguments: {
25
+ type: "object",
26
+ properties: { count: { type: "integer" } }
27
+ },
28
+ messageExample: { count: 3 }
29
+ },
30
+ ariaLabel: {
31
+ type: "string",
32
+ title: "Accessible label",
33
+ description: "The total argument is the number of media items in the gallery.",
34
+ format: "icu-message",
35
+ messageSource: "View all {total} images",
36
+ messageArguments: {
37
+ type: "object",
38
+ properties: { total: { type: "integer" } }
39
+ },
40
+ messageExample: { total: 8 }
41
+ }
42
+ }
43
+ }
44
+ });
45
+ const GalleryFullscreenContent = defineContentType({
46
+ id: "gallery-fullscreen",
47
+ title: "Gallery Fullscreen",
48
+ description: "Accessible name of the fullscreen dialog when no GalleryFullscreenTitle is composed.",
49
+ schema: {
50
+ type: "object",
51
+ additionalProperties: false,
52
+ properties: { title: {
53
+ type: "string",
54
+ title: "Fallback title",
55
+ format: "icu-message",
56
+ messageSource: "Gallery"
57
+ } }
58
+ }
59
+ });
60
+ const GalleryFullscreenTitleContent = defineContentType({
61
+ id: "gallery-fullscreen-title",
62
+ title: "Gallery Fullscreen Title",
63
+ description: "Title of the fullscreen dialog, used when no children are composed.",
64
+ schema: {
65
+ type: "object",
66
+ additionalProperties: false,
67
+ properties: { label: {
68
+ type: "string",
69
+ title: "Title",
70
+ format: "icu-message",
71
+ messageSource: "Gallery"
72
+ } }
73
+ }
74
+ });
75
+ const GalleryMediaCountContent = defineContentType({
76
+ id: "gallery-media-count",
77
+ title: "Gallery Media Count",
78
+ description: "Position of the selected media item in the gallery.",
79
+ schema: {
80
+ type: "object",
81
+ additionalProperties: false,
82
+ properties: { template: {
83
+ type: "string",
84
+ title: "Text",
85
+ description: "current is the 1-based position of the selected item; total is the item count.",
86
+ format: "icu-message",
87
+ messageSource: "{current} / {total}",
88
+ messageArguments: {
89
+ type: "object",
90
+ properties: {
91
+ current: { type: "integer" },
92
+ total: { type: "integer" }
93
+ }
94
+ },
95
+ messageExample: {
96
+ current: 2,
97
+ total: 8
98
+ }
99
+ } }
100
+ }
101
+ });
8
102
  const GalleryContext = createContext(null);
9
103
  const GalleryItemContext = createContext(null);
10
104
  const FullscreenTitleRegistryContext = createContext(null);
@@ -190,23 +284,13 @@ const GalleryOverflowCountDefinition = defineComponent({
190
284
  name: "GalleryOverflowCount",
191
285
  importPath: "@vtex/faststore/components",
192
286
  component: GalleryOverflowCount,
287
+ content: GalleryOverflowCountContent,
193
288
  editor: {
194
289
  label: "Gallery Overflow Count",
195
290
  category: "content"
196
291
  },
197
- schema: {
198
- template: {
199
- type: "string",
200
- default: "+{count}",
201
- label: "Template"
202
- },
203
- ariaLabel: {
204
- type: "string",
205
- default: "View all {total} images",
206
- label: "Aria Label"
207
- }
208
- },
209
- guideline: "Overflow indicator. Only renders when isOverflow=true in GalleryItemContext — place alongside GalleryThumbnail inside GalleryThumbnails. Clicking opens fullscreen. Use template=\"+{count}\" to customize the visible label. The rendered button carries an aria-label (default \"View all {total} images\") so screen readers announce the full action, not just the count.",
292
+ schema: {},
293
+ guideline: "Overflow indicator. Only renders when isOverflow=true in GalleryItemContext — place alongside GalleryThumbnail inside GalleryThumbnails. Clicking opens fullscreen. Its text and aria-label come from the $content fields template ({count} hidden items) and ariaLabel ({total} items); the aria-label makes screen readers announce the full action, not just the count.",
210
294
  docPath: GALLERY_DOC
211
295
  });
212
296
  const GalleryMediaDefinition = defineComponent({
@@ -303,24 +387,26 @@ const GalleryFullscreenDefinition = defineComponent({
303
387
  name: "GalleryFullscreen",
304
388
  importPath: "@vtex/faststore/components",
305
389
  component: GalleryFullscreen,
390
+ content: GalleryFullscreenContent,
306
391
  editor: {
307
392
  label: "Gallery Fullscreen",
308
393
  category: "content"
309
394
  },
310
395
  schema: {},
311
- guideline: "Fullscreen overlay controlled by GalleryRoot state. Opens via GalleryOverflowCount, GalleryFullscreenTrigger, or thumbnailOpensFullscreen=true. Wraps a Dialog internally — place GalleryFullscreenClose, GalleryPrevious, GalleryMainMedia, GalleryNext, and optionally GalleryThumbnails as children. If no GalleryFullscreenTitle is composed, a default sr-only \"Gallery\" title is rendered automatically so the dialog always has an accessible name. Must be inside GalleryRoot.",
396
+ guideline: "Fullscreen overlay controlled by GalleryRoot state. Opens via GalleryOverflowCount, GalleryFullscreenTrigger, or thumbnailOpensFullscreen=true. Wraps a Dialog internally — place GalleryFullscreenClose, GalleryPrevious, GalleryMainMedia, GalleryNext, and optionally GalleryThumbnails as children. If no GalleryFullscreenTitle is composed, an sr-only title from the $content field title is rendered so the dialog always has an accessible name. Must be inside GalleryRoot.",
312
397
  docPath: GALLERY_DOC
313
398
  });
314
399
  const GalleryFullscreenTitleDefinition = defineComponent({
315
400
  name: "GalleryFullscreenTitle",
316
401
  importPath: "@vtex/faststore/components",
317
402
  component: GalleryFullscreenTitle,
403
+ content: GalleryFullscreenTitleContent,
318
404
  editor: {
319
405
  label: "Gallery Fullscreen Title",
320
406
  category: "content"
321
407
  },
322
408
  schema: {},
323
- guideline: "Accessible title for the fullscreen dialog. Required for screen readers. Use sr-only to hide it visually or omit the class to display it. Must be inside GalleryFullscreen.",
409
+ guideline: "Accessible title for the fullscreen dialog. Required for screen readers. Renders its children, or the $content field label when it has none. Use sr-only to hide it visually or omit the class to display it. Must be inside GalleryFullscreen.",
324
410
  docPath: GALLERY_DOC
325
411
  });
326
412
  const GalleryFullscreenCloseDefinition = defineComponent({
@@ -371,16 +457,13 @@ const GalleryMediaCountDefinition = defineComponent({
371
457
  name: "GalleryMediaCount",
372
458
  importPath: "@vtex/faststore/components",
373
459
  component: GalleryMediaCount,
460
+ content: GalleryMediaCountContent,
374
461
  editor: {
375
462
  label: "Gallery Media Count",
376
463
  category: "content"
377
464
  },
378
- schema: { template: {
379
- type: "string",
380
- default: "{current} / {total}",
381
- label: "Template"
382
- } },
383
- guideline: "Displays the current media position and total count (e.g. \"2 / 10\"). Use {current} and {total} placeholders in template. Place anywhere inside GalleryRoot — typically in GalleryFullscreen or above GalleryMainMedia.",
465
+ schema: {},
466
+ guideline: "Displays the current media position and total count (e.g. \"2 / 10\"). The text is the $content field template, an ICU message with current and total arguments. Place anywhere inside GalleryRoot — typically in GalleryFullscreen or above GalleryMainMedia.",
384
467
  docPath: GALLERY_DOC
385
468
  });
386
469
  function GalleryRoot({ media = [], defaultIndex = 0, selectOnHover = false, thumbnailOpensFullscreen = false, children, ...props }) {
@@ -623,19 +706,18 @@ function GalleryThumbnail({ objectFit = "contain", aspectRatio, style, ...props
623
706
  })
624
707
  });
625
708
  }
626
- function GalleryOverflowCount({ template = "+{count}", ariaLabel = "View all {total} images", ...props }) {
709
+ function GalleryOverflowCount({ $locale, $content, ...props }) {
627
710
  const { media, openFullscreen } = useGallery();
628
711
  const { isOverflow, overflowCount } = useGalleryItem();
712
+ const messages = useMessageFormatter(GalleryOverflowCountContent, $content);
629
713
  if (!isOverflow) return null;
630
- const label = template.replace("{count}", String(overflowCount));
631
- const resolvedAriaLabel = ariaLabel.replace("{total}", String(media.length));
632
714
  return /* @__PURE__ */ jsx("button", {
633
715
  type: "button",
634
716
  onClick: openFullscreen,
635
- "aria-label": resolvedAriaLabel,
717
+ "aria-label": messages.format("ariaLabel", { total: media.length }),
636
718
  "data-fs-gallery-overflow-count": "",
637
719
  ...props,
638
- children: label
720
+ children: messages.format("template", { count: overflowCount })
639
721
  });
640
722
  }
641
723
  function GalleryMedia({ objectFit = "contain", aspectRatio, videoAutoPlay = false, videoControls = true, clickOpensFullscreen = false, style, ...props }) {
@@ -782,8 +864,9 @@ function GalleryZoomResult({ style, ...props }) {
782
864
  "data-fs-gallery-zoom-result": ""
783
865
  });
784
866
  }
785
- function GalleryFullscreen({ children, ...props }) {
867
+ function GalleryFullscreen({ $locale, $content, children, ...props }) {
786
868
  const { fullscreenOpen, closeFullscreen } = useGallery();
869
+ const messages = useMessageFormatter(GalleryFullscreenContent, $content);
787
870
  const [hasExplicitTitle, setHasExplicitTitle] = useState(false);
788
871
  const register = useCallback(() => setHasExplicitTitle(true), []);
789
872
  const registry = useMemo(() => ({ register }), [register]);
@@ -805,22 +888,23 @@ function GalleryFullscreen({ children, ...props }) {
805
888
  children: [!hasExplicitTitle && /* @__PURE__ */ jsx(DialogTitle, {
806
889
  className: "sr-only",
807
890
  "data-fs-gallery-fullscreen-title": "",
808
- children: "Gallery"
891
+ children: messages.format("title")
809
892
  }), children]
810
893
  })
811
894
  })
812
895
  })] })
813
896
  });
814
897
  }
815
- function GalleryFullscreenTitle({ children = "Gallery", ...props }) {
898
+ function GalleryFullscreenTitle({ $locale, $content, children, ...props }) {
816
899
  const registry = useContext(FullscreenTitleRegistryContext);
900
+ const messages = useMessageFormatter(GalleryFullscreenTitleContent, $content);
817
901
  useLayoutEffect(() => {
818
902
  registry?.register();
819
903
  }, [registry]);
820
904
  return /* @__PURE__ */ jsx(DialogTitle, {
821
905
  "data-fs-gallery-fullscreen-title": "",
822
906
  ...props,
823
- children
907
+ children: children ?? messages.format("label")
824
908
  });
825
909
  }
826
910
  function GalleryFullscreenClose({ children, ...props }) {
@@ -886,13 +970,16 @@ function GalleryThumbnailsNext({ step = 1, children, ...props }) {
886
970
  children
887
971
  });
888
972
  }
889
- function GalleryMediaCount({ template = "{current} / {total}", ...props }) {
973
+ function GalleryMediaCount({ $locale, $content, ...props }) {
890
974
  const { selectedIndex, media } = useGallery();
891
- const label = template.replace("{current}", String(selectedIndex + 1)).replace("{total}", String(media.length));
975
+ const messages = useMessageFormatter(GalleryMediaCountContent, $content);
892
976
  return /* @__PURE__ */ jsx("span", {
893
977
  "data-fs-gallery-media-count": "",
894
978
  ...props,
895
- children: label
979
+ children: messages.format("template", {
980
+ current: selectedIndex + 1,
981
+ total: media.length
982
+ })
896
983
  });
897
984
  }
898
985
  const Gallery = {
@@ -915,6 +1002,6 @@ const Gallery = {
915
1002
  MediaCount: GalleryMediaCount
916
1003
  };
917
1004
  //#endregion
918
- export { Gallery, GalleryFullscreen, GalleryFullscreenClose, GalleryFullscreenCloseDefinition, GalleryFullscreenDefinition, GalleryFullscreenTitle, GalleryFullscreenTitleDefinition, GalleryItemContext, GalleryMainMedia, GalleryMainMediaDefinition, GalleryMedia, GalleryMediaCount, GalleryMediaCountDefinition, GalleryMediaDefinition, GalleryNext, GalleryNextDefinition, GalleryOverflowCount, GalleryOverflowCountDefinition, GalleryPrevious, GalleryPreviousDefinition, GalleryRoot, GalleryRootDefinition, GalleryThumbnail, GalleryThumbnailDefinition, GalleryThumbnails, GalleryThumbnailsDefinition, GalleryThumbnailsNext, GalleryThumbnailsNextDefinition, GalleryThumbnailsPrevious, GalleryThumbnailsPreviousDefinition, GalleryZoom, GalleryZoomDefinition, GalleryZoomLens, GalleryZoomLensDefinition, GalleryZoomResult, GalleryZoomResultDefinition, useGallery, useGalleryItem };
1005
+ export { Gallery, GalleryFullscreen, GalleryFullscreenClose, GalleryFullscreenCloseDefinition, GalleryFullscreenContent, GalleryFullscreenDefinition, GalleryFullscreenTitle, GalleryFullscreenTitleContent, GalleryFullscreenTitleDefinition, GalleryItemContext, GalleryMainMedia, GalleryMainMediaDefinition, GalleryMedia, GalleryMediaCount, GalleryMediaCountContent, GalleryMediaCountDefinition, GalleryMediaDefinition, GalleryNext, GalleryNextDefinition, GalleryOverflowCount, GalleryOverflowCountContent, GalleryOverflowCountDefinition, GalleryPrevious, GalleryPreviousDefinition, GalleryRoot, GalleryRootDefinition, GalleryThumbnail, GalleryThumbnailDefinition, GalleryThumbnails, GalleryThumbnailsDefinition, GalleryThumbnailsNext, GalleryThumbnailsNextDefinition, GalleryThumbnailsPrevious, GalleryThumbnailsPreviousDefinition, GalleryZoom, GalleryZoomDefinition, GalleryZoomLens, GalleryZoomLensDefinition, GalleryZoomResult, GalleryZoomResultDefinition, useGallery, useGalleryItem };
919
1006
 
920
1007
  //# sourceMappingURL=gallery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.js","names":[],"sources":["../../../src/particles/gallery/gallery.tsx"],"sourcesContent":["'use client';\n\nimport { defineComponent } from '@vtex/fs-core';\nimport {\n type ComponentPropsWithRef,\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n DialogBackdrop,\n DialogClose,\n DialogPopup,\n DialogPortal,\n DialogRoot,\n DialogTitle,\n DialogViewport,\n} from '../dialog/dialog.js';\n\nexport type GalleryMediaType = 'image' | 'video';\n\nexport type GalleryMediaItem = {\n type: GalleryMediaType;\n url: string;\n altText: string;\n previewImageUrl?: string;\n};\n\nexport type GalleryContextValue = {\n media: GalleryMediaItem[];\n selectedIndex: number;\n setSelectedIndex: (index: number) => void;\n fullscreenOpen: boolean;\n openFullscreen: () => void;\n closeFullscreen: () => void;\n selectOnHover: boolean;\n thumbnailOpensFullscreen: boolean;\n zoomActive: boolean;\n setZoomActive: (active: boolean) => void;\n zoomPosition: { x: number; y: number };\n setZoomPosition: (pos: { x: number; y: number }) => void;\n magnification: number;\n lensSize: number;\n setZoomConfig: (config: { magnification: number; lensSize: number }) => void;\n zoomContainerSize: { width: number; height: number };\n setZoomContainerSize: (size: { width: number; height: number }) => void;\n thumbnailOffset: number;\n setThumbnailOffset: (offset: number) => void;\n thumbnailsWindowSize: number;\n setThumbnailsWindowSize: (size: number) => void;\n};\n\nexport type GalleryItemContextValue = {\n item: GalleryMediaItem;\n index: number;\n isOverflow: boolean;\n overflowCount: number;\n};\n\nexport type GalleryRootProps = ComponentPropsWithRef<'div'> & {\n media?: GalleryMediaItem[];\n defaultIndex?: number;\n selectOnHover?: boolean;\n thumbnailOpensFullscreen?: boolean;\n};\n\nexport type GalleryMainMediaProps = ComponentPropsWithRef<'div'> & {\n objectFit?: 'contain' | 'cover' | 'fill' | 'none';\n aspectRatio?: string;\n videoAutoPlay?: boolean;\n videoControls?: boolean;\n clickOpensFullscreen?: boolean;\n};\n\nexport type GalleryThumbnailsProps = ComponentPropsWithRef<'div'> & {\n maxVisible?: number;\n slider?: boolean;\n animated?: boolean;\n direction?: 'horizontal' | 'vertical';\n hideWhenSingle?: boolean;\n children?: ReactNode;\n};\n\nexport type GalleryThumbnailsPreviousProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n step?: number;\n};\n\nexport type GalleryThumbnailsNextProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n step?: number;\n};\n\nexport type GalleryThumbnailProps = ComponentPropsWithRef<'button'> & {\n objectFit?: 'contain' | 'cover' | 'fill' | 'none';\n aspectRatio?: string;\n};\n\nexport type GalleryOverflowCountProps = ComponentPropsWithRef<'button'> & {\n template?: string;\n ariaLabel?: string;\n};\n\nexport type GalleryMediaProps = ComponentPropsWithRef<'div'> & {\n objectFit?: 'contain' | 'cover' | 'fill' | 'none';\n aspectRatio?: string;\n videoAutoPlay?: boolean;\n videoControls?: boolean;\n clickOpensFullscreen?: boolean;\n};\n\nexport type GalleryZoomProps = ComponentPropsWithRef<'div'> & {\n magnification?: number;\n lensSize?: number;\n};\n\nexport type GalleryZoomLensProps = ComponentPropsWithRef<'div'>;\n\nexport type GalleryZoomResultProps = ComponentPropsWithRef<'div'>;\n\nexport type GalleryFullscreenProps = ComponentPropsWithRef<'div'> & {\n children?: ReactNode;\n};\n\nexport type GalleryFullscreenTitleProps = ComponentPropsWithRef<'h2'>;\n\nexport type GalleryFullscreenCloseProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n};\n\nexport type GalleryPreviousProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n wrap?: boolean;\n};\n\nexport type GalleryNextProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n wrap?: boolean;\n};\n\nexport type GalleryMediaCountProps = ComponentPropsWithRef<'span'> & {\n template?: string;\n};\n\nconst GalleryContext = createContext<GalleryContextValue | null>(null);\n\nexport const GalleryItemContext = createContext<GalleryItemContextValue | null>(null);\n\ntype FullscreenTitleRegistry = { register: () => void };\n\nconst FullscreenTitleRegistryContext = createContext<FullscreenTitleRegistry | null>(null);\n\nexport function useGallery(): GalleryContextValue {\n const ctx = useContext(GalleryContext);\n if (!ctx) throw new Error('Gallery components must be used inside GalleryRoot.');\n return ctx;\n}\n\nexport function useGalleryItem(): GalleryItemContextValue {\n const ctx = useContext(GalleryItemContext);\n if (!ctx) throw new Error('GalleryThumbnail and GalleryOverflowCount must be used inside GalleryThumbnails.');\n return ctx;\n}\n\nconst GALLERY_DOC = './gallery.md';\n\nexport const GalleryRootDefinition = defineComponent<GalleryRootProps>({\n name: 'GalleryRoot',\n importPath: '@vtex/faststore/components',\n component: GalleryRoot,\n editor: { label: 'Gallery Root', category: 'content' },\n schema: {\n defaultIndex: { type: 'number', default: 0, label: 'Default Index' },\n selectOnHover: { type: 'boolean', default: false, label: 'Select on Hover' },\n thumbnailOpensFullscreen: { type: 'boolean', default: false, label: 'Thumbnail Opens Fullscreen' },\n },\n guideline:\n 'Root of the gallery. Manages selected media index, fullscreen state, and zoom state. Compose as: GalleryRoot > (GalleryMainMedia (or GalleryZoom > (GalleryMainMedia + GalleryZoomLens + GalleryZoomResult)) + GalleryThumbnails > [GalleryThumbnail + GalleryOverflowCount] + GalleryFullscreen > [GalleryFullscreenClose + GalleryPrevious + GalleryMainMedia + GalleryNext + GalleryThumbnails]). Set selectOnHover=true for hover-to-preview; thumbnailOpensFullscreen=true to open fullscreen on thumbnail click.',\n});\n\nexport const GalleryMainMediaDefinition = defineComponent<GalleryMainMediaProps>({\n name: 'GalleryMainMedia',\n importPath: '@vtex/faststore/components',\n component: GalleryMainMedia,\n editor: { label: 'Gallery Main Media', category: 'content' },\n schema: {\n objectFit: { type: ['contain', 'cover', 'fill', 'none'] as const, default: 'contain', label: 'Object Fit' },\n aspectRatio: { type: 'string', default: '1 / 1', label: 'Aspect Ratio' },\n videoAutoPlay: { type: 'boolean', default: false, label: 'Video Auto Play' },\n videoControls: { type: 'boolean', default: true, label: 'Video Controls' },\n clickOpensFullscreen: { type: 'boolean', default: false, label: 'Click Opens Fullscreen' },\n },\n guideline:\n 'Renders the currently selected media item from GalleryRoot context: <img> for images, <video> for videos. Supports swipe gestures (50px threshold) to navigate. Set clickOpensFullscreen=true to open the fullscreen overlay on click. Must be inside GalleryRoot or GalleryZoom.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryThumbnailsDefinition = defineComponent<GalleryThumbnailsProps>({\n name: 'GalleryThumbnails',\n importPath: '@vtex/faststore/components',\n component: GalleryThumbnails,\n editor: { label: 'Gallery Thumbnails', category: 'content' },\n schema: {\n maxVisible: { type: 'number', label: 'Max Visible' },\n slider: { type: 'boolean', default: false, label: 'Slider Mode' },\n animated: { type: 'boolean', default: false, label: 'Animated' },\n direction: { type: ['horizontal', 'vertical'] as const, default: 'horizontal', label: 'Direction' },\n hideWhenSingle: { type: 'boolean', default: true, label: 'Hide when single image' },\n },\n guideline:\n 'Iterates media items and renders its children once per item. Returns null when there are 0 or 1 media items unless hideWhenSingle={false}. Set maxVisible to cap visible thumbnails. Without slider: last slot gets isOverflow=true for GalleryOverflowCount. With slider=true: window driven by GalleryThumbnailsPrevious/Next. Add animated=true for smooth scroll — also set direction to match the flex axis of the container.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryThumbnailsPreviousDefinition = defineComponent<GalleryThumbnailsPreviousProps>({\n name: 'GalleryThumbnailsPrevious',\n importPath: '@vtex/faststore/components',\n component: GalleryThumbnailsPrevious,\n editor: { label: 'Gallery Thumbnails Previous', category: 'content' },\n schema: {\n step: { type: 'number', default: 1, label: 'Step' },\n },\n guideline:\n 'Scrolls the thumbnail strip backward. Only active when GalleryThumbnails slider=true. Disabled at the first thumbnail. step=1 (default) moves one at a time; pass step equal to maxVisible to jump a full window. Place as sibling of GalleryThumbnails.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryThumbnailsNextDefinition = defineComponent<GalleryThumbnailsNextProps>({\n name: 'GalleryThumbnailsNext',\n importPath: '@vtex/faststore/components',\n component: GalleryThumbnailsNext,\n editor: { label: 'Gallery Thumbnails Next', category: 'content' },\n schema: {\n step: { type: 'number', default: 1, label: 'Step' },\n },\n guideline:\n 'Scrolls the thumbnail strip forward. Only active when GalleryThumbnails slider=true. Disabled at the last visible thumbnail. step=1 (default) moves one at a time; pass step equal to maxVisible to jump a full window. Place as sibling of GalleryThumbnails.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryThumbnailDefinition = defineComponent<GalleryThumbnailProps>({\n name: 'GalleryThumbnail',\n importPath: '@vtex/faststore/components',\n component: GalleryThumbnail,\n editor: { label: 'Gallery Thumbnail', category: 'content' },\n schema: {\n objectFit: { type: ['contain', 'cover', 'fill', 'none'] as const, default: 'contain', label: 'Object Fit' },\n aspectRatio: { type: 'string', default: '1 / 1', label: 'Aspect Ratio' },\n },\n guideline:\n 'Thumbnail button for a single media item. Reads from GalleryItemContext — must be inside GalleryThumbnails. Adds data-fs-gallery-thumbnail-selected=\"true\" when active. For videos, renders previewImageUrl as the thumbnail src.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryOverflowCountDefinition = defineComponent<GalleryOverflowCountProps>({\n name: 'GalleryOverflowCount',\n importPath: '@vtex/faststore/components',\n component: GalleryOverflowCount,\n editor: { label: 'Gallery Overflow Count', category: 'content' },\n schema: {\n template: { type: 'string', default: '+{count}', label: 'Template' },\n ariaLabel: { type: 'string', default: 'View all {total} images', label: 'Aria Label' },\n },\n guideline:\n 'Overflow indicator. Only renders when isOverflow=true in GalleryItemContext — place alongside GalleryThumbnail inside GalleryThumbnails. Clicking opens fullscreen. Use template=\"+{count}\" to customize the visible label. The rendered button carries an aria-label (default \"View all {total} images\") so screen readers announce the full action, not just the count.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryMediaDefinition = defineComponent<GalleryMediaProps>({\n name: 'GalleryMedia',\n importPath: '@vtex/faststore/components',\n component: GalleryMedia,\n editor: { label: 'Gallery Media', category: 'content' },\n schema: {\n objectFit: { type: ['contain', 'cover', 'fill', 'none'] as const, default: 'contain', label: 'Object Fit' },\n aspectRatio: { type: 'string', default: '1 / 1', label: 'Aspect Ratio' },\n videoAutoPlay: { type: 'boolean', default: false, label: 'Video Auto Play' },\n videoControls: { type: 'boolean', default: true, label: 'Video Controls' },\n clickOpensFullscreen: { type: 'boolean', default: false, label: 'Click Opens Fullscreen' },\n },\n guideline:\n 'Full-size media display for items inside GalleryThumbnails. Unlike GalleryThumbnail, renders as a div (not a button) — use for grid layouts and vertical fullscreen stacks. Set clickOpensFullscreen=true to select the item and open fullscreen on click. Must be inside GalleryThumbnails.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryZoomDefinition = defineComponent<GalleryZoomProps>({\n name: 'GalleryZoom',\n importPath: '@vtex/faststore/components',\n component: GalleryZoom,\n editor: { label: 'Gallery Zoom', category: 'content' },\n schema: {\n magnification: { type: 'number', default: 2, label: 'Magnification' },\n lensSize: { type: 'number', default: 150, label: 'Lens Size (px)' },\n },\n guideline:\n 'Zoom container. Wrap GalleryMainMedia inside it to activate zoom on pointer enter (images only, not videos). Place GalleryZoomLens as a sibling of GalleryMainMedia inside GalleryZoom for the cursor indicator. Place GalleryZoomResult anywhere in GalleryRoot — as a sibling of GalleryZoom (side-panel) or absolute inside GalleryZoom (on-image overlay). Set magnification to control zoom level (default 2).',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryZoomLensDefinition = defineComponent<GalleryZoomLensProps>({\n name: 'GalleryZoomLens',\n importPath: '@vtex/faststore/components',\n component: GalleryZoomLens,\n editor: { label: 'Gallery Zoom Lens', category: 'content' },\n schema: {},\n guideline:\n 'Cursor focus indicator inside GalleryZoom. Only renders when zoom is active. Must be inside GalleryZoom. Style as absolute-positioned square — uses CSS custom properties --zoom-x, --zoom-y, --lens-size for positioning.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryZoomResultDefinition = defineComponent<GalleryZoomResultProps>({\n name: 'GalleryZoomResult',\n importPath: '@vtex/faststore/components',\n component: GalleryZoomResult,\n editor: { label: 'Gallery Zoom Result', category: 'content' },\n schema: {},\n guideline:\n 'Magnified view driven by cursor position from GalleryZoom context. Only renders when zoom is active on an image. Place as sibling of GalleryZoom for side-panel zoom, or absolute inside GalleryZoom for on-image zoom.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryFullscreenDefinition = defineComponent<GalleryFullscreenProps>({\n name: 'GalleryFullscreen',\n importPath: '@vtex/faststore/components',\n component: GalleryFullscreen,\n editor: { label: 'Gallery Fullscreen', category: 'content' },\n schema: {},\n guideline:\n 'Fullscreen overlay controlled by GalleryRoot state. Opens via GalleryOverflowCount, GalleryFullscreenTrigger, or thumbnailOpensFullscreen=true. Wraps a Dialog internally — place GalleryFullscreenClose, GalleryPrevious, GalleryMainMedia, GalleryNext, and optionally GalleryThumbnails as children. If no GalleryFullscreenTitle is composed, a default sr-only \"Gallery\" title is rendered automatically so the dialog always has an accessible name. Must be inside GalleryRoot.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryFullscreenTitleDefinition = defineComponent<GalleryFullscreenTitleProps>({\n name: 'GalleryFullscreenTitle',\n importPath: '@vtex/faststore/components',\n component: GalleryFullscreenTitle,\n editor: { label: 'Gallery Fullscreen Title', category: 'content' },\n schema: {},\n guideline:\n 'Accessible title for the fullscreen dialog. Required for screen readers. Use sr-only to hide it visually or omit the class to display it. Must be inside GalleryFullscreen.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryFullscreenCloseDefinition = defineComponent<GalleryFullscreenCloseProps>({\n name: 'GalleryFullscreenClose',\n importPath: '@vtex/faststore/components',\n component: GalleryFullscreenClose,\n editor: { label: 'Gallery Fullscreen Close', category: 'content' },\n schema: {},\n guideline:\n 'Closes the fullscreen overlay. Must be inside GalleryFullscreen. Place at the top-right corner. Accepts any children (Icon, text).',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryPreviousDefinition = defineComponent<GalleryPreviousProps>({\n name: 'GalleryPrevious',\n importPath: '@vtex/faststore/components',\n component: GalleryPrevious,\n editor: { label: 'Gallery Previous', category: 'content' },\n schema: {\n wrap: { type: 'boolean', default: true, label: 'Wrap Around' },\n },\n guideline:\n 'Navigates to the previous media item; wraps to the last by default, or stops at the first with wrap={false}. Use inside GalleryFullscreen or inline for carousel controls. Accepts any children (Icon, text).',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryNextDefinition = defineComponent<GalleryNextProps>({\n name: 'GalleryNext',\n importPath: '@vtex/faststore/components',\n component: GalleryNext,\n editor: { label: 'Gallery Next', category: 'content' },\n schema: {\n wrap: { type: 'boolean', default: true, label: 'Wrap Around' },\n },\n guideline:\n 'Navigates to the next media item; wraps to the first by default, or stops at the last with wrap={false}. Use inside GalleryFullscreen or inline for carousel controls. Accepts any children (Icon, text).',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryMediaCountDefinition = defineComponent<GalleryMediaCountProps>({\n name: 'GalleryMediaCount',\n importPath: '@vtex/faststore/components',\n component: GalleryMediaCount,\n editor: { label: 'Gallery Media Count', category: 'content' },\n schema: {\n template: { type: 'string', default: '{current} / {total}', label: 'Template' },\n },\n guideline:\n 'Displays the current media position and total count (e.g. \"2 / 10\"). Use {current} and {total} placeholders in template. Place anywhere inside GalleryRoot — typically in GalleryFullscreen or above GalleryMainMedia.',\n docPath: GALLERY_DOC,\n});\n\nexport function GalleryRoot({\n media = [],\n defaultIndex = 0,\n selectOnHover = false,\n thumbnailOpensFullscreen = false,\n children,\n ...props\n}: GalleryRootProps) {\n const [selectedIndex, setSelectedIndex] = useState(defaultIndex);\n const [fullscreenOpen, setFullscreenOpen] = useState(false);\n const [zoomActive, setZoomActive] = useState(false);\n const [zoomPosition, setZoomPosition] = useState({ x: 0, y: 0 });\n const [zoomConfig, setZoomConfig] = useState({ magnification: 2, lensSize: 150 });\n const [zoomContainerSize, setZoomContainerSize] = useState({ width: 0, height: 0 });\n const [thumbnailOffset, setThumbnailOffset] = useState(0);\n const [thumbnailsWindowSize, setThumbnailsWindowSize] = useState(0);\n\n const openFullscreen = useCallback(() => setFullscreenOpen(true), []);\n const closeFullscreen = useCallback(() => setFullscreenOpen(false), []);\n\n const ctx = useMemo<GalleryContextValue>(\n () => ({\n media,\n selectedIndex,\n setSelectedIndex,\n fullscreenOpen,\n openFullscreen,\n closeFullscreen,\n selectOnHover,\n thumbnailOpensFullscreen,\n zoomActive,\n setZoomActive,\n zoomPosition,\n setZoomPosition,\n magnification: zoomConfig.magnification,\n lensSize: zoomConfig.lensSize,\n setZoomConfig,\n zoomContainerSize,\n setZoomContainerSize,\n thumbnailOffset,\n setThumbnailOffset,\n thumbnailsWindowSize,\n setThumbnailsWindowSize,\n }),\n [\n media,\n selectedIndex,\n fullscreenOpen,\n openFullscreen,\n closeFullscreen,\n selectOnHover,\n thumbnailOpensFullscreen,\n zoomActive,\n zoomPosition,\n zoomConfig,\n zoomContainerSize,\n thumbnailOffset,\n thumbnailsWindowSize,\n ],\n );\n\n return (\n <GalleryContext value={ctx}>\n <div {...props} data-fs-gallery=\"\">\n {children}\n </div>\n </GalleryContext>\n );\n}\n\nconst SWIPE_THRESHOLD = 50;\n\nexport function GalleryMainMedia({\n objectFit = 'contain',\n aspectRatio,\n videoAutoPlay = false,\n videoControls = true,\n clickOpensFullscreen = false,\n style,\n ...props\n}: GalleryMainMediaProps) {\n const { media, selectedIndex, setSelectedIndex, openFullscreen } = useGallery();\n const currentItem = media[selectedIndex] ?? media[0];\n const pointerStartX = useRef<number | null>(null);\n\n function handlePointerDown(e: React.PointerEvent) {\n pointerStartX.current = e.clientX;\n }\n\n function handlePointerUp(e: React.PointerEvent) {\n if (pointerStartX.current === null) return;\n const delta = e.clientX - pointerStartX.current;\n pointerStartX.current = null;\n\n if (Math.abs(delta) < SWIPE_THRESHOLD) {\n if (clickOpensFullscreen) openFullscreen();\n return;\n }\n if (media.length === 0) return;\n if (delta < 0) {\n setSelectedIndex(selectedIndex < media.length - 1 ? selectedIndex + 1 : 0);\n } else {\n setSelectedIndex(selectedIndex > 0 ? selectedIndex - 1 : media.length - 1);\n }\n }\n\n if (!currentItem) {\n return <div {...props} data-fs-gallery-main-media=\"\" />;\n }\n\n if (currentItem.type === 'video') {\n return (\n <div {...props} data-fs-gallery-main-media=\"\" data-fs-gallery-main-media-type=\"video\">\n <video\n src={currentItem.url}\n controls={videoControls}\n autoPlay={videoAutoPlay}\n poster={currentItem.previewImageUrl}\n style={{ objectFit, aspectRatio, ...style } as React.CSSProperties}\n >\n <track kind=\"captions\" />\n </video>\n </div>\n );\n }\n\n return (\n <div\n {...props}\n data-fs-gallery-main-media=\"\"\n data-fs-gallery-main-media-type=\"image\"\n onPointerDown={handlePointerDown}\n onPointerUp={handlePointerUp}\n style={{ touchAction: 'pan-y', ...style }}\n >\n <img\n src={currentItem.url}\n alt={currentItem.altText}\n style={{ display: 'block', width: '100%', objectFit, aspectRatio } as React.CSSProperties}\n draggable={false}\n />\n </div>\n );\n}\n\nexport function GalleryThumbnails({ hideWhenSingle = true, ...rest }: GalleryThumbnailsProps) {\n const { media } = useGallery();\n if (hideWhenSingle && media.length <= 1) return null;\n return <GalleryThumbnailsInner {...rest} />;\n}\n\nfunction GalleryThumbnailsInner({\n maxVisible,\n slider = false,\n animated = false,\n direction = 'horizontal',\n children,\n style,\n ...props\n}: Omit<GalleryThumbnailsProps, 'hideWhenSingle'>) {\n const { media, thumbnailOffset, setThumbnailsWindowSize } = useGallery();\n const trackRef = useRef<HTMLDivElement>(null);\n const [containerSize, setContainerSize] = useState<number | null>(null);\n\n useEffect(() => {\n if (slider && maxVisible != null) setThumbnailsWindowSize(maxVisible);\n }, [slider, maxVisible, setThumbnailsWindowSize]);\n\n // Measure the exact size needed to show maxVisible items so overflow:hidden clips correctly.\n // useLayoutEffect runs after DOM commit but before paint — no visual flash.\n useLayoutEffect(() => {\n if (!animated || !slider || maxVisible == null || !trackRef.current) return;\n const lastVisible = trackRef.current.children[maxVisible - 1] as HTMLElement | undefined;\n if (!lastVisible) return;\n const size =\n direction === 'horizontal'\n ? lastVisible.offsetLeft + lastVisible.offsetWidth\n : lastVisible.offsetTop + lastVisible.offsetHeight;\n setContainerSize(size);\n }, [animated, slider, maxVisible, direction]);\n\n useEffect(() => {\n if (!animated || !slider || !trackRef.current) return;\n const target = trackRef.current.children[thumbnailOffset] as HTMLElement | undefined;\n if (!target) return;\n trackRef.current.scrollTo({\n left: direction === 'horizontal' ? target.offsetLeft : 0,\n top: direction === 'vertical' ? target.offsetTop : 0,\n behavior: 'smooth',\n });\n }, [thumbnailOffset, animated, slider, direction]);\n\n const visibleItems = (() => {\n if (animated && slider) return media; // render all; scroll handles visibility\n if (maxVisible == null) return media;\n if (slider) return media.slice(thumbnailOffset, thumbnailOffset + maxVisible);\n // overflow mode: show first maxVisible items, last slot is overflow\n return media.slice(0, maxVisible);\n })();\n\n const containerStyle: React.CSSProperties =\n animated && slider\n ? {\n overflow: 'hidden',\n position: 'relative',\n ...(direction === 'horizontal' && containerSize != null ? { width: containerSize } : {}),\n ...(direction === 'vertical' && containerSize != null ? { height: containerSize } : {}),\n ...style,\n }\n : { ...style };\n\n return (\n <div {...props} ref={trackRef} style={containerStyle} data-fs-gallery-thumbnails=\"\">\n {visibleItems.map((item, slotIndex) => {\n const index = animated && slider ? slotIndex : slider ? thumbnailOffset + slotIndex : slotIndex;\n const isOverflow = !slider && maxVisible != null && media.length > maxVisible && slotIndex === maxVisible - 1;\n const overflowCount = isOverflow ? media.length - maxVisible + 1 : 0;\n\n return (\n <GalleryItemContext key={index} value={{ item, index, isOverflow, overflowCount }}>\n {children}\n </GalleryItemContext>\n );\n })}\n </div>\n );\n}\n\nexport function GalleryThumbnail({ objectFit = 'contain', aspectRatio, style, ...props }: GalleryThumbnailProps) {\n const { selectedIndex, setSelectedIndex, openFullscreen, selectOnHover, thumbnailOpensFullscreen } = useGallery();\n const { item, index, isOverflow } = useGalleryItem();\n\n const thumbSrc = item.type === 'video' ? (item.previewImageUrl ?? '') : item.url;\n\n function handleClick() {\n setSelectedIndex(index);\n if (thumbnailOpensFullscreen || isOverflow) openFullscreen();\n }\n\n function handlePointerEnter() {\n if (selectOnHover && !isOverflow) setSelectedIndex(index);\n }\n\n return (\n <button\n type=\"button\"\n onClick={handleClick}\n onPointerEnter={handlePointerEnter}\n data-fs-gallery-thumbnail=\"\"\n data-fs-gallery-thumbnail-selected={String(index === selectedIndex)}\n data-fs-gallery-thumbnail-type={item.type}\n {...props}\n >\n <img\n src={thumbSrc}\n alt={item.altText}\n style={\n { display: 'block', width: '100%', height: '100%', objectFit, aspectRatio, ...style } as React.CSSProperties\n }\n />\n </button>\n );\n}\n\nexport function GalleryOverflowCount({\n template = '+{count}',\n ariaLabel = 'View all {total} images',\n ...props\n}: GalleryOverflowCountProps) {\n const { media, openFullscreen } = useGallery();\n const { isOverflow, overflowCount } = useGalleryItem();\n\n if (!isOverflow) return null;\n\n const label = template.replace('{count}', String(overflowCount));\n const resolvedAriaLabel = ariaLabel.replace('{total}', String(media.length));\n\n return (\n <button\n type=\"button\"\n onClick={openFullscreen}\n aria-label={resolvedAriaLabel}\n data-fs-gallery-overflow-count=\"\"\n {...props}\n >\n {label}\n </button>\n );\n}\n\nexport function GalleryMedia({\n objectFit = 'contain',\n aspectRatio,\n videoAutoPlay = false,\n videoControls = true,\n clickOpensFullscreen = false,\n style,\n ...props\n}: GalleryMediaProps) {\n const { setSelectedIndex, openFullscreen } = useGallery();\n const { item, index } = useGalleryItem();\n\n function handleClick() {\n setSelectedIndex(index);\n openFullscreen();\n }\n\n function handleKeyDown(e: React.KeyboardEvent) {\n if (e.key === 'Enter' || e.key === ' ') handleClick();\n }\n\n const interactiveProps = clickOpensFullscreen\n ? { onClick: handleClick, onKeyDown: handleKeyDown, role: 'button' as const, tabIndex: 0 }\n : {};\n\n const wrapperStyle: React.CSSProperties = {\n ...style,\n ...(aspectRatio ? { aspectRatio, position: 'relative' } : {}),\n };\n const mediaStyle: React.CSSProperties = aspectRatio\n ? { position: 'absolute', inset: 0, width: '100%', height: '100%', objectFit }\n : { display: 'block', width: '100%', height: '100%', objectFit };\n\n if (item.type === 'video') {\n return (\n <div\n {...props}\n {...interactiveProps}\n style={wrapperStyle}\n data-fs-gallery-media-item=\"\"\n data-fs-gallery-media-item-type=\"video\"\n >\n <video\n src={item.url}\n controls={videoControls}\n autoPlay={videoAutoPlay}\n poster={item.previewImageUrl}\n style={mediaStyle as React.CSSProperties}\n >\n <track kind=\"captions\" />\n </video>\n </div>\n );\n }\n\n return (\n <div\n {...props}\n {...interactiveProps}\n style={wrapperStyle}\n data-fs-gallery-media-item=\"\"\n data-fs-gallery-media-item-type=\"image\"\n >\n <img src={item.url} alt={item.altText} style={mediaStyle as React.CSSProperties} draggable={false} />\n </div>\n );\n}\n\nexport function GalleryZoom({ magnification = 2, lensSize = 150, children, ...props }: GalleryZoomProps) {\n const { media, selectedIndex, setZoomActive, setZoomPosition, setZoomConfig, setZoomContainerSize } = useGallery();\n const containerRef = useRef<HTMLDivElement>(null);\n const currentItem = media[selectedIndex];\n const isImage = currentItem?.type === 'image';\n\n function handlePointerMove(e: React.PointerEvent) {\n if (!containerRef.current || !isImage) return;\n const rect = containerRef.current.getBoundingClientRect();\n const x = (e.clientX - rect.left) / rect.width;\n const y = (e.clientY - rect.top) / rect.height;\n setZoomPosition({ x: Math.max(0, Math.min(1, x)), y: Math.max(0, Math.min(1, y)) });\n }\n\n function handlePointerEnter() {\n setZoomConfig({ magnification, lensSize });\n if (containerRef.current) {\n const rect = containerRef.current.getBoundingClientRect();\n setZoomContainerSize({ width: rect.width, height: rect.height });\n }\n if (isImage) setZoomActive(true);\n }\n\n function handlePointerLeave() {\n setZoomActive(false);\n }\n\n return (\n <div\n ref={containerRef}\n {...props}\n onPointerMove={handlePointerMove}\n onPointerEnter={handlePointerEnter}\n onPointerLeave={handlePointerLeave}\n data-fs-gallery-zoom=\"\"\n >\n {children}\n </div>\n );\n}\n\nexport function GalleryZoomLens({ style, ...props }: GalleryZoomLensProps) {\n const { zoomActive, zoomPosition, lensSize, zoomContainerSize } = useGallery();\n\n if (!zoomActive) return null;\n\n // Center the lens on the cursor, then clamp so the full square stays inside the container\n // (snaps at the edges instead of overflowing the image).\n const { width, height } = zoomContainerSize;\n const maxLeft = Math.max(0, width - lensSize);\n const maxTop = Math.max(0, height - lensSize);\n const left = width > 0 ? Math.min(Math.max(zoomPosition.x * width - lensSize / 2, 0), maxLeft) : 0;\n const top = height > 0 ? Math.min(Math.max(zoomPosition.y * height - lensSize / 2, 0), maxTop) : 0;\n\n const lensStyle: React.CSSProperties = {\n top,\n left,\n width: lensSize,\n height: lensSize,\n ...style,\n };\n\n return <div {...props} style={lensStyle} data-fs-gallery-zoom-lens=\"\" />;\n}\n\nexport function GalleryZoomResult({ style, ...props }: GalleryZoomResultProps) {\n const { media, selectedIndex, zoomActive, zoomPosition, magnification } = useGallery();\n const currentItem = media[selectedIndex];\n const isVisible = zoomActive && !!currentItem && currentItem.type === 'image';\n\n // Always renders to prevent layout shifts in flex/grid containers.\n // Returning null when inactive would change the container dimensions and\n // trigger pointerleave on GalleryZoom, causing a flicker loop.\n const resultStyle: React.CSSProperties = isVisible\n ? {\n backgroundImage: `url(${currentItem.url})`,\n backgroundSize: `${magnification * 100}%`,\n backgroundPosition: `${zoomPosition.x * 100}% ${zoomPosition.y * 100}%`,\n backgroundRepeat: 'no-repeat',\n ...style,\n }\n : { visibility: 'hidden', ...style };\n\n return <div {...props} style={resultStyle} data-fs-gallery-zoom-result=\"\" />;\n}\n\nexport function GalleryFullscreen({ children, ...props }: GalleryFullscreenProps) {\n const { fullscreenOpen, closeFullscreen } = useGallery();\n const [hasExplicitTitle, setHasExplicitTitle] = useState(false);\n const register = useCallback(() => setHasExplicitTitle(true), []);\n const registry = useMemo<FullscreenTitleRegistry>(() => ({ register }), [register]);\n\n return (\n <DialogRoot\n open={fullscreenOpen}\n onOpenChange={(open) => {\n if (!open) closeFullscreen();\n }}\n >\n <DialogPortal>\n <DialogBackdrop className=\"fixed inset-0 bg-black/80\" data-fs-gallery-fullscreen-backdrop=\"\" />\n <DialogViewport className=\"fixed inset-0 flex items-center justify-center\">\n <DialogPopup {...props} data-fs-gallery-fullscreen=\"\">\n <FullscreenTitleRegistryContext.Provider value={registry}>\n {!hasExplicitTitle && (\n <DialogTitle className=\"sr-only\" data-fs-gallery-fullscreen-title=\"\">\n Gallery\n </DialogTitle>\n )}\n {children}\n </FullscreenTitleRegistryContext.Provider>\n </DialogPopup>\n </DialogViewport>\n </DialogPortal>\n </DialogRoot>\n );\n}\n\nexport function GalleryFullscreenTitle({ children = 'Gallery', ...props }: GalleryFullscreenTitleProps) {\n const registry = useContext(FullscreenTitleRegistryContext);\n useLayoutEffect(() => {\n registry?.register();\n }, [registry]);\n return (\n <DialogTitle data-fs-gallery-fullscreen-title=\"\" {...props}>\n {children}\n </DialogTitle>\n );\n}\n\nexport function GalleryFullscreenClose({ children, ...props }: GalleryFullscreenCloseProps) {\n return (\n <DialogClose data-fs-gallery-fullscreen-close=\"\" {...props}>\n {children}\n </DialogClose>\n );\n}\n\nexport function GalleryPrevious({ children, wrap = true, ...props }: GalleryPreviousProps) {\n const { media, selectedIndex, setSelectedIndex } = useGallery();\n\n function handleClick() {\n if (media.length === 0) return;\n if (selectedIndex > 0) {\n setSelectedIndex(selectedIndex - 1);\n } else if (wrap) {\n setSelectedIndex(media.length - 1);\n }\n // wrap === false at index 0 → no-op\n }\n\n return (\n <button\n type=\"button\"\n disabled={media.length === 0 || (!wrap && selectedIndex === 0)}\n onClick={handleClick}\n data-fs-gallery-previous=\"\"\n {...props}\n >\n {children}\n </button>\n );\n}\n\nexport function GalleryNext({ children, wrap = true, ...props }: GalleryNextProps) {\n const { media, selectedIndex, setSelectedIndex } = useGallery();\n\n function handleClick() {\n if (media.length === 0) return;\n if (selectedIndex < media.length - 1) {\n setSelectedIndex(selectedIndex + 1);\n } else if (wrap) {\n setSelectedIndex(0);\n }\n // wrap === false at last index → no-op\n }\n\n return (\n <button\n type=\"button\"\n disabled={media.length === 0 || (!wrap && selectedIndex === media.length - 1)}\n onClick={handleClick}\n data-fs-gallery-next=\"\"\n {...props}\n >\n {children}\n </button>\n );\n}\n\nexport function GalleryThumbnailsPrevious({ step = 1, children, ...props }: GalleryThumbnailsPreviousProps) {\n const { thumbnailOffset, setThumbnailOffset } = useGallery();\n const isDisabled = thumbnailOffset === 0;\n return (\n <button\n type=\"button\"\n disabled={isDisabled}\n onClick={() => setThumbnailOffset(Math.max(0, thumbnailOffset - step))}\n data-fs-gallery-thumbnails-previous=\"\"\n {...props}\n >\n {children}\n </button>\n );\n}\n\nexport function GalleryThumbnailsNext({ step = 1, children, ...props }: GalleryThumbnailsNextProps) {\n const { media, thumbnailOffset, setThumbnailOffset, thumbnailsWindowSize } = useGallery();\n const isDisabled = thumbnailsWindowSize > 0 && thumbnailOffset + thumbnailsWindowSize >= media.length;\n const maxOffset = Math.max(0, media.length - thumbnailsWindowSize);\n\n return (\n <button\n type=\"button\"\n disabled={isDisabled}\n onClick={() => setThumbnailOffset(Math.min(maxOffset, thumbnailOffset + step))}\n data-fs-gallery-thumbnails-next=\"\"\n {...props}\n >\n {children}\n </button>\n );\n}\n\nexport function GalleryMediaCount({ template = '{current} / {total}', ...props }: GalleryMediaCountProps) {\n const { selectedIndex, media } = useGallery();\n const label = template.replace('{current}', String(selectedIndex + 1)).replace('{total}', String(media.length));\n\n return (\n <span data-fs-gallery-media-count=\"\" {...props}>\n {label}\n </span>\n );\n}\n\nexport const Gallery = {\n Root: GalleryRoot,\n MainMedia: GalleryMainMedia,\n Media: GalleryMedia,\n Thumbnails: GalleryThumbnails,\n ThumbnailsPrevious: GalleryThumbnailsPrevious,\n ThumbnailsNext: GalleryThumbnailsNext,\n Thumbnail: GalleryThumbnail,\n OverflowCount: GalleryOverflowCount,\n Zoom: GalleryZoom,\n ZoomLens: GalleryZoomLens,\n ZoomResult: GalleryZoomResult,\n Fullscreen: GalleryFullscreen,\n FullscreenTitle: GalleryFullscreenTitle,\n FullscreenClose: GalleryFullscreenClose,\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;AAEA,SAAgB,kBAAkB,EAAE,WAAW,uBAAuB,GAAG,SAAiC;CACxG,MAAM,EAAE,eAAe,UAAU,WAAW;CAC5C,MAAM,QAAQ,SAAS,QAAQ,aAAa,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,QAAQ,WAAW,OAAO,MAAM,MAAM,CAAC;CAE9G,OACE,oBAAC,QAAD;EAAM,+BAA4B;EAAG,GAAI;EACtC,UAAA;CACG,CAAA;AAEV;AAEA,MAAa,UAAU;CACrB,MAAM;CACN,WAAW;CACX,OAAO;CACP,YAAY;CACZ,oBAAoB;CACpB,gBAAgB;CAChB,WAAW;CACX,eAAe;CACf,MAAM;CACN,UAAU;CACV,YAAY;CACZ,YAAY;CACZ,iBAAiB;CACjB,iBAAiB;CACjB,UAAU;CACV,MAAM;CACN,YAAY;AACd"}
1
+ {"version":3,"file":"gallery.js","names":[],"sources":["../../../src/particles/gallery/gallery.tsx"],"sourcesContent":["'use client';\n\nimport { type ContentValue, defineComponent, defineContentType, type MessageLocaleProp } from '@vtex/fs-core';\nimport {\n type ComponentPropsWithRef,\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useMessageFormatter } from '../../sdk/i18n/use-message-formatter.js';\nimport {\n DialogBackdrop,\n DialogClose,\n DialogPopup,\n DialogPortal,\n DialogRoot,\n DialogTitle,\n DialogViewport,\n} from '../dialog/dialog.js';\n\nexport const GalleryOverflowCountContent = defineContentType({\n id: 'gallery-overflow-count',\n title: 'Gallery Overflow Count',\n description: 'Text and accessible name of the overflow indicator that opens the fullscreen gallery.',\n schema: {\n type: 'object',\n additionalProperties: false,\n properties: {\n template: {\n type: 'string',\n title: 'Text',\n description: 'The count argument is the number of hidden media items.',\n format: 'icu-message',\n messageSource: '+{count}',\n messageArguments: { type: 'object', properties: { count: { type: 'integer' } } },\n messageExample: { count: 3 },\n },\n ariaLabel: {\n type: 'string',\n title: 'Accessible label',\n description: 'The total argument is the number of media items in the gallery.',\n format: 'icu-message',\n messageSource: 'View all {total} images',\n messageArguments: { type: 'object', properties: { total: { type: 'integer' } } },\n messageExample: { total: 8 },\n },\n },\n },\n});\n\nexport const GalleryFullscreenContent = defineContentType({\n id: 'gallery-fullscreen',\n title: 'Gallery Fullscreen',\n description: 'Accessible name of the fullscreen dialog when no GalleryFullscreenTitle is composed.',\n schema: {\n type: 'object',\n additionalProperties: false,\n properties: {\n title: { type: 'string', title: 'Fallback title', format: 'icu-message', messageSource: 'Gallery' },\n },\n },\n});\n\nexport const GalleryFullscreenTitleContent = defineContentType({\n id: 'gallery-fullscreen-title',\n title: 'Gallery Fullscreen Title',\n description: 'Title of the fullscreen dialog, used when no children are composed.',\n schema: {\n type: 'object',\n additionalProperties: false,\n properties: {\n label: { type: 'string', title: 'Title', format: 'icu-message', messageSource: 'Gallery' },\n },\n },\n});\n\nexport const GalleryMediaCountContent = defineContentType({\n id: 'gallery-media-count',\n title: 'Gallery Media Count',\n description: 'Position of the selected media item in the gallery.',\n schema: {\n type: 'object',\n additionalProperties: false,\n properties: {\n template: {\n type: 'string',\n title: 'Text',\n description: 'current is the 1-based position of the selected item; total is the item count.',\n format: 'icu-message',\n messageSource: '{current} / {total}',\n messageArguments: {\n type: 'object',\n properties: { current: { type: 'integer' }, total: { type: 'integer' } },\n },\n messageExample: { current: 2, total: 8 },\n },\n },\n },\n});\n\nexport type GalleryMediaType = 'image' | 'video';\n\nexport type GalleryMediaItem = {\n type: GalleryMediaType;\n url: string;\n altText: string;\n previewImageUrl?: string;\n};\n\nexport type GalleryContextValue = {\n media: GalleryMediaItem[];\n selectedIndex: number;\n setSelectedIndex: (index: number) => void;\n fullscreenOpen: boolean;\n openFullscreen: () => void;\n closeFullscreen: () => void;\n selectOnHover: boolean;\n thumbnailOpensFullscreen: boolean;\n zoomActive: boolean;\n setZoomActive: (active: boolean) => void;\n zoomPosition: { x: number; y: number };\n setZoomPosition: (pos: { x: number; y: number }) => void;\n magnification: number;\n lensSize: number;\n setZoomConfig: (config: { magnification: number; lensSize: number }) => void;\n zoomContainerSize: { width: number; height: number };\n setZoomContainerSize: (size: { width: number; height: number }) => void;\n thumbnailOffset: number;\n setThumbnailOffset: (offset: number) => void;\n thumbnailsWindowSize: number;\n setThumbnailsWindowSize: (size: number) => void;\n};\n\nexport type GalleryItemContextValue = {\n item: GalleryMediaItem;\n index: number;\n isOverflow: boolean;\n overflowCount: number;\n};\n\nexport type GalleryRootProps = ComponentPropsWithRef<'div'> & {\n media?: GalleryMediaItem[];\n defaultIndex?: number;\n selectOnHover?: boolean;\n thumbnailOpensFullscreen?: boolean;\n};\n\nexport type GalleryMainMediaProps = ComponentPropsWithRef<'div'> & {\n objectFit?: 'contain' | 'cover' | 'fill' | 'none';\n aspectRatio?: string;\n videoAutoPlay?: boolean;\n videoControls?: boolean;\n clickOpensFullscreen?: boolean;\n};\n\nexport type GalleryThumbnailsProps = ComponentPropsWithRef<'div'> & {\n maxVisible?: number;\n slider?: boolean;\n animated?: boolean;\n direction?: 'horizontal' | 'vertical';\n hideWhenSingle?: boolean;\n children?: ReactNode;\n};\n\nexport type GalleryThumbnailsPreviousProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n step?: number;\n};\n\nexport type GalleryThumbnailsNextProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n step?: number;\n};\n\nexport type GalleryThumbnailProps = ComponentPropsWithRef<'button'> & {\n objectFit?: 'contain' | 'cover' | 'fill' | 'none';\n aspectRatio?: string;\n};\n\nexport type GalleryOverflowCountProps = ComponentPropsWithRef<'button'> &\n MessageLocaleProp & {\n $content?: ContentValue<typeof GalleryOverflowCountContent>;\n };\n\nexport type GalleryMediaProps = ComponentPropsWithRef<'div'> & {\n objectFit?: 'contain' | 'cover' | 'fill' | 'none';\n aspectRatio?: string;\n videoAutoPlay?: boolean;\n videoControls?: boolean;\n clickOpensFullscreen?: boolean;\n};\n\nexport type GalleryZoomProps = ComponentPropsWithRef<'div'> & {\n magnification?: number;\n lensSize?: number;\n};\n\nexport type GalleryZoomLensProps = ComponentPropsWithRef<'div'>;\n\nexport type GalleryZoomResultProps = ComponentPropsWithRef<'div'>;\n\nexport type GalleryFullscreenProps = ComponentPropsWithRef<'div'> &\n MessageLocaleProp & {\n children?: ReactNode;\n $content?: ContentValue<typeof GalleryFullscreenContent>;\n };\n\nexport type GalleryFullscreenTitleProps = ComponentPropsWithRef<'h2'> &\n MessageLocaleProp & {\n $content?: ContentValue<typeof GalleryFullscreenTitleContent>;\n };\n\nexport type GalleryFullscreenCloseProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n};\n\nexport type GalleryPreviousProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n wrap?: boolean;\n};\n\nexport type GalleryNextProps = ComponentPropsWithRef<'button'> & {\n children?: ReactNode;\n wrap?: boolean;\n};\n\nexport type GalleryMediaCountProps = ComponentPropsWithRef<'span'> &\n MessageLocaleProp & {\n $content?: ContentValue<typeof GalleryMediaCountContent>;\n };\n\nconst GalleryContext = createContext<GalleryContextValue | null>(null);\n\nexport const GalleryItemContext = createContext<GalleryItemContextValue | null>(null);\n\ntype FullscreenTitleRegistry = { register: () => void };\n\nconst FullscreenTitleRegistryContext = createContext<FullscreenTitleRegistry | null>(null);\n\nexport function useGallery(): GalleryContextValue {\n const ctx = useContext(GalleryContext);\n if (!ctx) throw new Error('Gallery components must be used inside GalleryRoot.');\n return ctx;\n}\n\nexport function useGalleryItem(): GalleryItemContextValue {\n const ctx = useContext(GalleryItemContext);\n if (!ctx) throw new Error('GalleryThumbnail and GalleryOverflowCount must be used inside GalleryThumbnails.');\n return ctx;\n}\n\nconst GALLERY_DOC = './gallery.md';\n\nexport const GalleryRootDefinition = defineComponent<GalleryRootProps>({\n name: 'GalleryRoot',\n importPath: '@vtex/faststore/components',\n component: GalleryRoot,\n editor: { label: 'Gallery Root', category: 'content' },\n schema: {\n defaultIndex: { type: 'number', default: 0, label: 'Default Index' },\n selectOnHover: { type: 'boolean', default: false, label: 'Select on Hover' },\n thumbnailOpensFullscreen: { type: 'boolean', default: false, label: 'Thumbnail Opens Fullscreen' },\n },\n guideline:\n 'Root of the gallery. Manages selected media index, fullscreen state, and zoom state. Compose as: GalleryRoot > (GalleryMainMedia (or GalleryZoom > (GalleryMainMedia + GalleryZoomLens + GalleryZoomResult)) + GalleryThumbnails > [GalleryThumbnail + GalleryOverflowCount] + GalleryFullscreen > [GalleryFullscreenClose + GalleryPrevious + GalleryMainMedia + GalleryNext + GalleryThumbnails]). Set selectOnHover=true for hover-to-preview; thumbnailOpensFullscreen=true to open fullscreen on thumbnail click.',\n});\n\nexport const GalleryMainMediaDefinition = defineComponent<GalleryMainMediaProps>({\n name: 'GalleryMainMedia',\n importPath: '@vtex/faststore/components',\n component: GalleryMainMedia,\n editor: { label: 'Gallery Main Media', category: 'content' },\n schema: {\n objectFit: { type: ['contain', 'cover', 'fill', 'none'] as const, default: 'contain', label: 'Object Fit' },\n aspectRatio: { type: 'string', default: '1 / 1', label: 'Aspect Ratio' },\n videoAutoPlay: { type: 'boolean', default: false, label: 'Video Auto Play' },\n videoControls: { type: 'boolean', default: true, label: 'Video Controls' },\n clickOpensFullscreen: { type: 'boolean', default: false, label: 'Click Opens Fullscreen' },\n },\n guideline:\n 'Renders the currently selected media item from GalleryRoot context: <img> for images, <video> for videos. Supports swipe gestures (50px threshold) to navigate. Set clickOpensFullscreen=true to open the fullscreen overlay on click. Must be inside GalleryRoot or GalleryZoom.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryThumbnailsDefinition = defineComponent<GalleryThumbnailsProps>({\n name: 'GalleryThumbnails',\n importPath: '@vtex/faststore/components',\n component: GalleryThumbnails,\n editor: { label: 'Gallery Thumbnails', category: 'content' },\n schema: {\n maxVisible: { type: 'number', label: 'Max Visible' },\n slider: { type: 'boolean', default: false, label: 'Slider Mode' },\n animated: { type: 'boolean', default: false, label: 'Animated' },\n direction: { type: ['horizontal', 'vertical'] as const, default: 'horizontal', label: 'Direction' },\n hideWhenSingle: { type: 'boolean', default: true, label: 'Hide when single image' },\n },\n guideline:\n 'Iterates media items and renders its children once per item. Returns null when there are 0 or 1 media items unless hideWhenSingle={false}. Set maxVisible to cap visible thumbnails. Without slider: last slot gets isOverflow=true for GalleryOverflowCount. With slider=true: window driven by GalleryThumbnailsPrevious/Next. Add animated=true for smooth scroll — also set direction to match the flex axis of the container.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryThumbnailsPreviousDefinition = defineComponent<GalleryThumbnailsPreviousProps>({\n name: 'GalleryThumbnailsPrevious',\n importPath: '@vtex/faststore/components',\n component: GalleryThumbnailsPrevious,\n editor: { label: 'Gallery Thumbnails Previous', category: 'content' },\n schema: {\n step: { type: 'number', default: 1, label: 'Step' },\n },\n guideline:\n 'Scrolls the thumbnail strip backward. Only active when GalleryThumbnails slider=true. Disabled at the first thumbnail. step=1 (default) moves one at a time; pass step equal to maxVisible to jump a full window. Place as sibling of GalleryThumbnails.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryThumbnailsNextDefinition = defineComponent<GalleryThumbnailsNextProps>({\n name: 'GalleryThumbnailsNext',\n importPath: '@vtex/faststore/components',\n component: GalleryThumbnailsNext,\n editor: { label: 'Gallery Thumbnails Next', category: 'content' },\n schema: {\n step: { type: 'number', default: 1, label: 'Step' },\n },\n guideline:\n 'Scrolls the thumbnail strip forward. Only active when GalleryThumbnails slider=true. Disabled at the last visible thumbnail. step=1 (default) moves one at a time; pass step equal to maxVisible to jump a full window. Place as sibling of GalleryThumbnails.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryThumbnailDefinition = defineComponent<GalleryThumbnailProps>({\n name: 'GalleryThumbnail',\n importPath: '@vtex/faststore/components',\n component: GalleryThumbnail,\n editor: { label: 'Gallery Thumbnail', category: 'content' },\n schema: {\n objectFit: { type: ['contain', 'cover', 'fill', 'none'] as const, default: 'contain', label: 'Object Fit' },\n aspectRatio: { type: 'string', default: '1 / 1', label: 'Aspect Ratio' },\n },\n guideline:\n 'Thumbnail button for a single media item. Reads from GalleryItemContext — must be inside GalleryThumbnails. Adds data-fs-gallery-thumbnail-selected=\"true\" when active. For videos, renders previewImageUrl as the thumbnail src.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryOverflowCountDefinition = defineComponent<GalleryOverflowCountProps>({\n name: 'GalleryOverflowCount',\n importPath: '@vtex/faststore/components',\n component: GalleryOverflowCount,\n content: GalleryOverflowCountContent,\n editor: { label: 'Gallery Overflow Count', category: 'content' },\n schema: {},\n guideline:\n 'Overflow indicator. Only renders when isOverflow=true in GalleryItemContext — place alongside GalleryThumbnail inside GalleryThumbnails. Clicking opens fullscreen. Its text and aria-label come from the $content fields template ({count} hidden items) and ariaLabel ({total} items); the aria-label makes screen readers announce the full action, not just the count.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryMediaDefinition = defineComponent<GalleryMediaProps>({\n name: 'GalleryMedia',\n importPath: '@vtex/faststore/components',\n component: GalleryMedia,\n editor: { label: 'Gallery Media', category: 'content' },\n schema: {\n objectFit: { type: ['contain', 'cover', 'fill', 'none'] as const, default: 'contain', label: 'Object Fit' },\n aspectRatio: { type: 'string', default: '1 / 1', label: 'Aspect Ratio' },\n videoAutoPlay: { type: 'boolean', default: false, label: 'Video Auto Play' },\n videoControls: { type: 'boolean', default: true, label: 'Video Controls' },\n clickOpensFullscreen: { type: 'boolean', default: false, label: 'Click Opens Fullscreen' },\n },\n guideline:\n 'Full-size media display for items inside GalleryThumbnails. Unlike GalleryThumbnail, renders as a div (not a button) — use for grid layouts and vertical fullscreen stacks. Set clickOpensFullscreen=true to select the item and open fullscreen on click. Must be inside GalleryThumbnails.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryZoomDefinition = defineComponent<GalleryZoomProps>({\n name: 'GalleryZoom',\n importPath: '@vtex/faststore/components',\n component: GalleryZoom,\n editor: { label: 'Gallery Zoom', category: 'content' },\n schema: {\n magnification: { type: 'number', default: 2, label: 'Magnification' },\n lensSize: { type: 'number', default: 150, label: 'Lens Size (px)' },\n },\n guideline:\n 'Zoom container. Wrap GalleryMainMedia inside it to activate zoom on pointer enter (images only, not videos). Place GalleryZoomLens as a sibling of GalleryMainMedia inside GalleryZoom for the cursor indicator. Place GalleryZoomResult anywhere in GalleryRoot — as a sibling of GalleryZoom (side-panel) or absolute inside GalleryZoom (on-image overlay). Set magnification to control zoom level (default 2).',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryZoomLensDefinition = defineComponent<GalleryZoomLensProps>({\n name: 'GalleryZoomLens',\n importPath: '@vtex/faststore/components',\n component: GalleryZoomLens,\n editor: { label: 'Gallery Zoom Lens', category: 'content' },\n schema: {},\n guideline:\n 'Cursor focus indicator inside GalleryZoom. Only renders when zoom is active. Must be inside GalleryZoom. Style as absolute-positioned square — uses CSS custom properties --zoom-x, --zoom-y, --lens-size for positioning.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryZoomResultDefinition = defineComponent<GalleryZoomResultProps>({\n name: 'GalleryZoomResult',\n importPath: '@vtex/faststore/components',\n component: GalleryZoomResult,\n editor: { label: 'Gallery Zoom Result', category: 'content' },\n schema: {},\n guideline:\n 'Magnified view driven by cursor position from GalleryZoom context. Only renders when zoom is active on an image. Place as sibling of GalleryZoom for side-panel zoom, or absolute inside GalleryZoom for on-image zoom.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryFullscreenDefinition = defineComponent<GalleryFullscreenProps>({\n name: 'GalleryFullscreen',\n importPath: '@vtex/faststore/components',\n component: GalleryFullscreen,\n content: GalleryFullscreenContent,\n editor: { label: 'Gallery Fullscreen', category: 'content' },\n schema: {},\n guideline:\n 'Fullscreen overlay controlled by GalleryRoot state. Opens via GalleryOverflowCount, GalleryFullscreenTrigger, or thumbnailOpensFullscreen=true. Wraps a Dialog internally — place GalleryFullscreenClose, GalleryPrevious, GalleryMainMedia, GalleryNext, and optionally GalleryThumbnails as children. If no GalleryFullscreenTitle is composed, an sr-only title from the $content field title is rendered so the dialog always has an accessible name. Must be inside GalleryRoot.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryFullscreenTitleDefinition = defineComponent<GalleryFullscreenTitleProps>({\n name: 'GalleryFullscreenTitle',\n importPath: '@vtex/faststore/components',\n component: GalleryFullscreenTitle,\n content: GalleryFullscreenTitleContent,\n editor: { label: 'Gallery Fullscreen Title', category: 'content' },\n schema: {},\n guideline:\n 'Accessible title for the fullscreen dialog. Required for screen readers. Renders its children, or the $content field label when it has none. Use sr-only to hide it visually or omit the class to display it. Must be inside GalleryFullscreen.',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryFullscreenCloseDefinition = defineComponent<GalleryFullscreenCloseProps>({\n name: 'GalleryFullscreenClose',\n importPath: '@vtex/faststore/components',\n component: GalleryFullscreenClose,\n editor: { label: 'Gallery Fullscreen Close', category: 'content' },\n schema: {},\n guideline:\n 'Closes the fullscreen overlay. Must be inside GalleryFullscreen. Place at the top-right corner. Accepts any children (Icon, text).',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryPreviousDefinition = defineComponent<GalleryPreviousProps>({\n name: 'GalleryPrevious',\n importPath: '@vtex/faststore/components',\n component: GalleryPrevious,\n editor: { label: 'Gallery Previous', category: 'content' },\n schema: {\n wrap: { type: 'boolean', default: true, label: 'Wrap Around' },\n },\n guideline:\n 'Navigates to the previous media item; wraps to the last by default, or stops at the first with wrap={false}. Use inside GalleryFullscreen or inline for carousel controls. Accepts any children (Icon, text).',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryNextDefinition = defineComponent<GalleryNextProps>({\n name: 'GalleryNext',\n importPath: '@vtex/faststore/components',\n component: GalleryNext,\n editor: { label: 'Gallery Next', category: 'content' },\n schema: {\n wrap: { type: 'boolean', default: true, label: 'Wrap Around' },\n },\n guideline:\n 'Navigates to the next media item; wraps to the first by default, or stops at the last with wrap={false}. Use inside GalleryFullscreen or inline for carousel controls. Accepts any children (Icon, text).',\n docPath: GALLERY_DOC,\n});\n\nexport const GalleryMediaCountDefinition = defineComponent<GalleryMediaCountProps>({\n name: 'GalleryMediaCount',\n importPath: '@vtex/faststore/components',\n component: GalleryMediaCount,\n content: GalleryMediaCountContent,\n editor: { label: 'Gallery Media Count', category: 'content' },\n schema: {},\n guideline:\n 'Displays the current media position and total count (e.g. \"2 / 10\"). The text is the $content field template, an ICU message with current and total arguments. Place anywhere inside GalleryRoot — typically in GalleryFullscreen or above GalleryMainMedia.',\n docPath: GALLERY_DOC,\n});\n\nexport function GalleryRoot({\n media = [],\n defaultIndex = 0,\n selectOnHover = false,\n thumbnailOpensFullscreen = false,\n children,\n ...props\n}: GalleryRootProps) {\n const [selectedIndex, setSelectedIndex] = useState(defaultIndex);\n const [fullscreenOpen, setFullscreenOpen] = useState(false);\n const [zoomActive, setZoomActive] = useState(false);\n const [zoomPosition, setZoomPosition] = useState({ x: 0, y: 0 });\n const [zoomConfig, setZoomConfig] = useState({ magnification: 2, lensSize: 150 });\n const [zoomContainerSize, setZoomContainerSize] = useState({ width: 0, height: 0 });\n const [thumbnailOffset, setThumbnailOffset] = useState(0);\n const [thumbnailsWindowSize, setThumbnailsWindowSize] = useState(0);\n\n const openFullscreen = useCallback(() => setFullscreenOpen(true), []);\n const closeFullscreen = useCallback(() => setFullscreenOpen(false), []);\n\n const ctx = useMemo<GalleryContextValue>(\n () => ({\n media,\n selectedIndex,\n setSelectedIndex,\n fullscreenOpen,\n openFullscreen,\n closeFullscreen,\n selectOnHover,\n thumbnailOpensFullscreen,\n zoomActive,\n setZoomActive,\n zoomPosition,\n setZoomPosition,\n magnification: zoomConfig.magnification,\n lensSize: zoomConfig.lensSize,\n setZoomConfig,\n zoomContainerSize,\n setZoomContainerSize,\n thumbnailOffset,\n setThumbnailOffset,\n thumbnailsWindowSize,\n setThumbnailsWindowSize,\n }),\n [\n media,\n selectedIndex,\n fullscreenOpen,\n openFullscreen,\n closeFullscreen,\n selectOnHover,\n thumbnailOpensFullscreen,\n zoomActive,\n zoomPosition,\n zoomConfig,\n zoomContainerSize,\n thumbnailOffset,\n thumbnailsWindowSize,\n ],\n );\n\n return (\n <GalleryContext value={ctx}>\n <div {...props} data-fs-gallery=\"\">\n {children}\n </div>\n </GalleryContext>\n );\n}\n\nconst SWIPE_THRESHOLD = 50;\n\nexport function GalleryMainMedia({\n objectFit = 'contain',\n aspectRatio,\n videoAutoPlay = false,\n videoControls = true,\n clickOpensFullscreen = false,\n style,\n ...props\n}: GalleryMainMediaProps) {\n const { media, selectedIndex, setSelectedIndex, openFullscreen } = useGallery();\n const currentItem = media[selectedIndex] ?? media[0];\n const pointerStartX = useRef<number | null>(null);\n\n function handlePointerDown(e: React.PointerEvent) {\n pointerStartX.current = e.clientX;\n }\n\n function handlePointerUp(e: React.PointerEvent) {\n if (pointerStartX.current === null) return;\n const delta = e.clientX - pointerStartX.current;\n pointerStartX.current = null;\n\n if (Math.abs(delta) < SWIPE_THRESHOLD) {\n if (clickOpensFullscreen) openFullscreen();\n return;\n }\n if (media.length === 0) return;\n if (delta < 0) {\n setSelectedIndex(selectedIndex < media.length - 1 ? selectedIndex + 1 : 0);\n } else {\n setSelectedIndex(selectedIndex > 0 ? selectedIndex - 1 : media.length - 1);\n }\n }\n\n if (!currentItem) {\n return <div {...props} data-fs-gallery-main-media=\"\" />;\n }\n\n if (currentItem.type === 'video') {\n return (\n <div {...props} data-fs-gallery-main-media=\"\" data-fs-gallery-main-media-type=\"video\">\n <video\n src={currentItem.url}\n controls={videoControls}\n autoPlay={videoAutoPlay}\n poster={currentItem.previewImageUrl}\n style={{ objectFit, aspectRatio, ...style } as React.CSSProperties}\n >\n <track kind=\"captions\" />\n </video>\n </div>\n );\n }\n\n return (\n <div\n {...props}\n data-fs-gallery-main-media=\"\"\n data-fs-gallery-main-media-type=\"image\"\n onPointerDown={handlePointerDown}\n onPointerUp={handlePointerUp}\n style={{ touchAction: 'pan-y', ...style }}\n >\n <img\n src={currentItem.url}\n alt={currentItem.altText}\n style={{ display: 'block', width: '100%', objectFit, aspectRatio } as React.CSSProperties}\n draggable={false}\n />\n </div>\n );\n}\n\nexport function GalleryThumbnails({ hideWhenSingle = true, ...rest }: GalleryThumbnailsProps) {\n const { media } = useGallery();\n if (hideWhenSingle && media.length <= 1) return null;\n return <GalleryThumbnailsInner {...rest} />;\n}\n\nfunction GalleryThumbnailsInner({\n maxVisible,\n slider = false,\n animated = false,\n direction = 'horizontal',\n children,\n style,\n ...props\n}: Omit<GalleryThumbnailsProps, 'hideWhenSingle'>) {\n const { media, thumbnailOffset, setThumbnailsWindowSize } = useGallery();\n const trackRef = useRef<HTMLDivElement>(null);\n const [containerSize, setContainerSize] = useState<number | null>(null);\n\n useEffect(() => {\n if (slider && maxVisible != null) setThumbnailsWindowSize(maxVisible);\n }, [slider, maxVisible, setThumbnailsWindowSize]);\n\n // Measure the exact size needed to show maxVisible items so overflow:hidden clips correctly.\n // useLayoutEffect runs after DOM commit but before paint — no visual flash.\n useLayoutEffect(() => {\n if (!animated || !slider || maxVisible == null || !trackRef.current) return;\n const lastVisible = trackRef.current.children[maxVisible - 1] as HTMLElement | undefined;\n if (!lastVisible) return;\n const size =\n direction === 'horizontal'\n ? lastVisible.offsetLeft + lastVisible.offsetWidth\n : lastVisible.offsetTop + lastVisible.offsetHeight;\n setContainerSize(size);\n }, [animated, slider, maxVisible, direction]);\n\n useEffect(() => {\n if (!animated || !slider || !trackRef.current) return;\n const target = trackRef.current.children[thumbnailOffset] as HTMLElement | undefined;\n if (!target) return;\n trackRef.current.scrollTo({\n left: direction === 'horizontal' ? target.offsetLeft : 0,\n top: direction === 'vertical' ? target.offsetTop : 0,\n behavior: 'smooth',\n });\n }, [thumbnailOffset, animated, slider, direction]);\n\n const visibleItems = (() => {\n if (animated && slider) return media; // render all; scroll handles visibility\n if (maxVisible == null) return media;\n if (slider) return media.slice(thumbnailOffset, thumbnailOffset + maxVisible);\n // overflow mode: show first maxVisible items, last slot is overflow\n return media.slice(0, maxVisible);\n })();\n\n const containerStyle: React.CSSProperties =\n animated && slider\n ? {\n overflow: 'hidden',\n position: 'relative',\n ...(direction === 'horizontal' && containerSize != null ? { width: containerSize } : {}),\n ...(direction === 'vertical' && containerSize != null ? { height: containerSize } : {}),\n ...style,\n }\n : { ...style };\n\n return (\n <div {...props} ref={trackRef} style={containerStyle} data-fs-gallery-thumbnails=\"\">\n {visibleItems.map((item, slotIndex) => {\n const index = animated && slider ? slotIndex : slider ? thumbnailOffset + slotIndex : slotIndex;\n const isOverflow = !slider && maxVisible != null && media.length > maxVisible && slotIndex === maxVisible - 1;\n const overflowCount = isOverflow ? media.length - maxVisible + 1 : 0;\n\n return (\n <GalleryItemContext key={index} value={{ item, index, isOverflow, overflowCount }}>\n {children}\n </GalleryItemContext>\n );\n })}\n </div>\n );\n}\n\nexport function GalleryThumbnail({ objectFit = 'contain', aspectRatio, style, ...props }: GalleryThumbnailProps) {\n const { selectedIndex, setSelectedIndex, openFullscreen, selectOnHover, thumbnailOpensFullscreen } = useGallery();\n const { item, index, isOverflow } = useGalleryItem();\n\n const thumbSrc = item.type === 'video' ? (item.previewImageUrl ?? '') : item.url;\n\n function handleClick() {\n setSelectedIndex(index);\n if (thumbnailOpensFullscreen || isOverflow) openFullscreen();\n }\n\n function handlePointerEnter() {\n if (selectOnHover && !isOverflow) setSelectedIndex(index);\n }\n\n return (\n <button\n type=\"button\"\n onClick={handleClick}\n onPointerEnter={handlePointerEnter}\n data-fs-gallery-thumbnail=\"\"\n data-fs-gallery-thumbnail-selected={String(index === selectedIndex)}\n data-fs-gallery-thumbnail-type={item.type}\n {...props}\n >\n <img\n src={thumbSrc}\n alt={item.altText}\n style={\n { display: 'block', width: '100%', height: '100%', objectFit, aspectRatio, ...style } as React.CSSProperties\n }\n />\n </button>\n );\n}\n\nexport function GalleryOverflowCount({ $locale, $content, ...props }: GalleryOverflowCountProps) {\n const { media, openFullscreen } = useGallery();\n const { isOverflow, overflowCount } = useGalleryItem();\n const messages = useMessageFormatter(GalleryOverflowCountContent, $content);\n\n if (!isOverflow) return null;\n\n return (\n <button\n type=\"button\"\n onClick={openFullscreen}\n aria-label={messages.format('ariaLabel', { total: media.length })}\n data-fs-gallery-overflow-count=\"\"\n {...props}\n >\n {messages.format('template', { count: overflowCount })}\n </button>\n );\n}\n\nexport function GalleryMedia({\n objectFit = 'contain',\n aspectRatio,\n videoAutoPlay = false,\n videoControls = true,\n clickOpensFullscreen = false,\n style,\n ...props\n}: GalleryMediaProps) {\n const { setSelectedIndex, openFullscreen } = useGallery();\n const { item, index } = useGalleryItem();\n\n function handleClick() {\n setSelectedIndex(index);\n openFullscreen();\n }\n\n function handleKeyDown(e: React.KeyboardEvent) {\n if (e.key === 'Enter' || e.key === ' ') handleClick();\n }\n\n const interactiveProps = clickOpensFullscreen\n ? { onClick: handleClick, onKeyDown: handleKeyDown, role: 'button' as const, tabIndex: 0 }\n : {};\n\n const wrapperStyle: React.CSSProperties = {\n ...style,\n ...(aspectRatio ? { aspectRatio, position: 'relative' } : {}),\n };\n const mediaStyle: React.CSSProperties = aspectRatio\n ? { position: 'absolute', inset: 0, width: '100%', height: '100%', objectFit }\n : { display: 'block', width: '100%', height: '100%', objectFit };\n\n if (item.type === 'video') {\n return (\n <div\n {...props}\n {...interactiveProps}\n style={wrapperStyle}\n data-fs-gallery-media-item=\"\"\n data-fs-gallery-media-item-type=\"video\"\n >\n <video\n src={item.url}\n controls={videoControls}\n autoPlay={videoAutoPlay}\n poster={item.previewImageUrl}\n style={mediaStyle as React.CSSProperties}\n >\n <track kind=\"captions\" />\n </video>\n </div>\n );\n }\n\n return (\n <div\n {...props}\n {...interactiveProps}\n style={wrapperStyle}\n data-fs-gallery-media-item=\"\"\n data-fs-gallery-media-item-type=\"image\"\n >\n <img src={item.url} alt={item.altText} style={mediaStyle as React.CSSProperties} draggable={false} />\n </div>\n );\n}\n\nexport function GalleryZoom({ magnification = 2, lensSize = 150, children, ...props }: GalleryZoomProps) {\n const { media, selectedIndex, setZoomActive, setZoomPosition, setZoomConfig, setZoomContainerSize } = useGallery();\n const containerRef = useRef<HTMLDivElement>(null);\n const currentItem = media[selectedIndex];\n const isImage = currentItem?.type === 'image';\n\n function handlePointerMove(e: React.PointerEvent) {\n if (!containerRef.current || !isImage) return;\n const rect = containerRef.current.getBoundingClientRect();\n const x = (e.clientX - rect.left) / rect.width;\n const y = (e.clientY - rect.top) / rect.height;\n setZoomPosition({ x: Math.max(0, Math.min(1, x)), y: Math.max(0, Math.min(1, y)) });\n }\n\n function handlePointerEnter() {\n setZoomConfig({ magnification, lensSize });\n if (containerRef.current) {\n const rect = containerRef.current.getBoundingClientRect();\n setZoomContainerSize({ width: rect.width, height: rect.height });\n }\n if (isImage) setZoomActive(true);\n }\n\n function handlePointerLeave() {\n setZoomActive(false);\n }\n\n return (\n <div\n ref={containerRef}\n {...props}\n onPointerMove={handlePointerMove}\n onPointerEnter={handlePointerEnter}\n onPointerLeave={handlePointerLeave}\n data-fs-gallery-zoom=\"\"\n >\n {children}\n </div>\n );\n}\n\nexport function GalleryZoomLens({ style, ...props }: GalleryZoomLensProps) {\n const { zoomActive, zoomPosition, lensSize, zoomContainerSize } = useGallery();\n\n if (!zoomActive) return null;\n\n // Center the lens on the cursor, then clamp so the full square stays inside the container\n // (snaps at the edges instead of overflowing the image).\n const { width, height } = zoomContainerSize;\n const maxLeft = Math.max(0, width - lensSize);\n const maxTop = Math.max(0, height - lensSize);\n const left = width > 0 ? Math.min(Math.max(zoomPosition.x * width - lensSize / 2, 0), maxLeft) : 0;\n const top = height > 0 ? Math.min(Math.max(zoomPosition.y * height - lensSize / 2, 0), maxTop) : 0;\n\n const lensStyle: React.CSSProperties = {\n top,\n left,\n width: lensSize,\n height: lensSize,\n ...style,\n };\n\n return <div {...props} style={lensStyle} data-fs-gallery-zoom-lens=\"\" />;\n}\n\nexport function GalleryZoomResult({ style, ...props }: GalleryZoomResultProps) {\n const { media, selectedIndex, zoomActive, zoomPosition, magnification } = useGallery();\n const currentItem = media[selectedIndex];\n const isVisible = zoomActive && !!currentItem && currentItem.type === 'image';\n\n // Always renders to prevent layout shifts in flex/grid containers.\n // Returning null when inactive would change the container dimensions and\n // trigger pointerleave on GalleryZoom, causing a flicker loop.\n const resultStyle: React.CSSProperties = isVisible\n ? {\n backgroundImage: `url(${currentItem.url})`,\n backgroundSize: `${magnification * 100}%`,\n backgroundPosition: `${zoomPosition.x * 100}% ${zoomPosition.y * 100}%`,\n backgroundRepeat: 'no-repeat',\n ...style,\n }\n : { visibility: 'hidden', ...style };\n\n return <div {...props} style={resultStyle} data-fs-gallery-zoom-result=\"\" />;\n}\n\nexport function GalleryFullscreen({ $locale, $content, children, ...props }: GalleryFullscreenProps) {\n const { fullscreenOpen, closeFullscreen } = useGallery();\n const messages = useMessageFormatter(GalleryFullscreenContent, $content);\n const [hasExplicitTitle, setHasExplicitTitle] = useState(false);\n const register = useCallback(() => setHasExplicitTitle(true), []);\n const registry = useMemo<FullscreenTitleRegistry>(() => ({ register }), [register]);\n\n return (\n <DialogRoot\n open={fullscreenOpen}\n onOpenChange={(open) => {\n if (!open) closeFullscreen();\n }}\n >\n <DialogPortal>\n <DialogBackdrop className=\"fixed inset-0 bg-black/80\" data-fs-gallery-fullscreen-backdrop=\"\" />\n <DialogViewport className=\"fixed inset-0 flex items-center justify-center\">\n <DialogPopup {...props} data-fs-gallery-fullscreen=\"\">\n <FullscreenTitleRegistryContext.Provider value={registry}>\n {!hasExplicitTitle && (\n <DialogTitle className=\"sr-only\" data-fs-gallery-fullscreen-title=\"\">\n {messages.format('title')}\n </DialogTitle>\n )}\n {children}\n </FullscreenTitleRegistryContext.Provider>\n </DialogPopup>\n </DialogViewport>\n </DialogPortal>\n </DialogRoot>\n );\n}\n\nexport function GalleryFullscreenTitle({ $locale, $content, children, ...props }: GalleryFullscreenTitleProps) {\n const registry = useContext(FullscreenTitleRegistryContext);\n const messages = useMessageFormatter(GalleryFullscreenTitleContent, $content);\n useLayoutEffect(() => {\n registry?.register();\n }, [registry]);\n return (\n <DialogTitle data-fs-gallery-fullscreen-title=\"\" {...props}>\n {children ?? messages.format('label')}\n </DialogTitle>\n );\n}\n\nexport function GalleryFullscreenClose({ children, ...props }: GalleryFullscreenCloseProps) {\n return (\n <DialogClose data-fs-gallery-fullscreen-close=\"\" {...props}>\n {children}\n </DialogClose>\n );\n}\n\nexport function GalleryPrevious({ children, wrap = true, ...props }: GalleryPreviousProps) {\n const { media, selectedIndex, setSelectedIndex } = useGallery();\n\n function handleClick() {\n if (media.length === 0) return;\n if (selectedIndex > 0) {\n setSelectedIndex(selectedIndex - 1);\n } else if (wrap) {\n setSelectedIndex(media.length - 1);\n }\n // wrap === false at index 0 → no-op\n }\n\n return (\n <button\n type=\"button\"\n disabled={media.length === 0 || (!wrap && selectedIndex === 0)}\n onClick={handleClick}\n data-fs-gallery-previous=\"\"\n {...props}\n >\n {children}\n </button>\n );\n}\n\nexport function GalleryNext({ children, wrap = true, ...props }: GalleryNextProps) {\n const { media, selectedIndex, setSelectedIndex } = useGallery();\n\n function handleClick() {\n if (media.length === 0) return;\n if (selectedIndex < media.length - 1) {\n setSelectedIndex(selectedIndex + 1);\n } else if (wrap) {\n setSelectedIndex(0);\n }\n // wrap === false at last index → no-op\n }\n\n return (\n <button\n type=\"button\"\n disabled={media.length === 0 || (!wrap && selectedIndex === media.length - 1)}\n onClick={handleClick}\n data-fs-gallery-next=\"\"\n {...props}\n >\n {children}\n </button>\n );\n}\n\nexport function GalleryThumbnailsPrevious({ step = 1, children, ...props }: GalleryThumbnailsPreviousProps) {\n const { thumbnailOffset, setThumbnailOffset } = useGallery();\n const isDisabled = thumbnailOffset === 0;\n return (\n <button\n type=\"button\"\n disabled={isDisabled}\n onClick={() => setThumbnailOffset(Math.max(0, thumbnailOffset - step))}\n data-fs-gallery-thumbnails-previous=\"\"\n {...props}\n >\n {children}\n </button>\n );\n}\n\nexport function GalleryThumbnailsNext({ step = 1, children, ...props }: GalleryThumbnailsNextProps) {\n const { media, thumbnailOffset, setThumbnailOffset, thumbnailsWindowSize } = useGallery();\n const isDisabled = thumbnailsWindowSize > 0 && thumbnailOffset + thumbnailsWindowSize >= media.length;\n const maxOffset = Math.max(0, media.length - thumbnailsWindowSize);\n\n return (\n <button\n type=\"button\"\n disabled={isDisabled}\n onClick={() => setThumbnailOffset(Math.min(maxOffset, thumbnailOffset + step))}\n data-fs-gallery-thumbnails-next=\"\"\n {...props}\n >\n {children}\n </button>\n );\n}\n\nexport function GalleryMediaCount({ $locale, $content, ...props }: GalleryMediaCountProps) {\n const { selectedIndex, media } = useGallery();\n const messages = useMessageFormatter(GalleryMediaCountContent, $content);\n\n return (\n <span data-fs-gallery-media-count=\"\" {...props}>\n {messages.format('template', { current: selectedIndex + 1, total: media.length })}\n </span>\n );\n}\n\nexport const Gallery = {\n Root: GalleryRoot,\n MainMedia: GalleryMainMedia,\n Media: GalleryMedia,\n Thumbnails: GalleryThumbnails,\n ThumbnailsPrevious: GalleryThumbnailsPrevious,\n ThumbnailsNext: GalleryThumbnailsNext,\n Thumbnail: GalleryThumbnail,\n OverflowCount: GalleryOverflowCount,\n Zoom: GalleryZoom,\n ZoomLens: GalleryZoomLens,\n ZoomResult: GalleryZoomResult,\n Fullscreen: GalleryFullscreen,\n FullscreenTitle: GalleryFullscreenTitle,\n FullscreenClose: GalleryFullscreenClose,\n Previous: GalleryPrevious,\n Next: GalleryNext,\n MediaCount: GalleryMediaCount,\n};\n"],"mappings":";;;;;;;;;AA0BA,MAAa,8BAA8B,kBAAkB;CAC3D,IAAI;CACJ,OAAO;CACP,aAAa;CACb,QAAQ;EACN,MAAM;EACN,sBAAsB;EACtB,YAAY;GACV,UAAU;IACR,MAAM;IACN,OAAO;IACP,aAAa;IACb,QAAQ;IACR,eAAe;IACf,kBAAkB;KAAE,MAAM;KAAU,YAAY,EAAE,OAAO,EAAE,MAAM,UAAU,EAAE;IAAE;IAC/E,gBAAgB,EAAE,OAAO,EAAE;GAC7B;GACA,WAAW;IACT,MAAM;IACN,OAAO;IACP,aAAa;IACb,QAAQ;IACR,eA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AgB;CAChB,WAAW;CACX,eAAe;CACf,MAAM;CACN,UAAU;CACV,YAAY;CACZ,YAAY;CACZ,iBAAiB;CACjB,iBAAiB;CACjB,UAAU;CACV,MAAM;CACN,YAAY;AACd"}
@@ -1,4 +1,4 @@
1
- import { ContentValue } from "../../core/dist/define-content-type.js";
1
+ import { ContentValue, MessageLocaleProp } from "../../core/dist/define-content-type.js";
2
2
  import { ComponentDefinition } from "../../core/dist/define-component.js";
3
3
  import "../../core/dist/index.js";
4
4
  import { ComponentPropsWithRef } from "react";
@@ -14,15 +14,17 @@ export declare const OrderDetailsBackContent: {
14
14
  readonly label: {
15
15
  readonly type: "string";
16
16
  readonly title: "Label";
17
+ readonly format: "icu-message";
18
+ readonly messageSource: "Back to orders";
17
19
  };
18
20
  };
19
21
  };
20
22
  };
21
23
  export type OrderDetailsBackContentValue = ContentValue<typeof OrderDetailsBackContent>;
22
- export type OrderDetailsBackProps = ComponentPropsWithRef<'a'> & {
24
+ export type OrderDetailsBackProps = ComponentPropsWithRef<'a'> & MessageLocaleProp & {
23
25
  $content?: OrderDetailsBackContentValue;
24
26
  };
25
27
  export declare const OrderDetailsBackDefinition: ComponentDefinition<OrderDetailsBackProps>;
26
- export declare function OrderDetailsBack({ className, ref, $content, ...props }: OrderDetailsBackProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare function OrderDetailsBack({ className, ref, $content, $locale, ...props }: OrderDetailsBackProps): import("react/jsx-runtime").JSX.Element;
27
29
  //#endregion
28
30
  //# sourceMappingURL=order-details-back.d.ts.map
@@ -2,7 +2,7 @@
2
2
  import { defineComponent } from "../../core/dist/define-component.js";
3
3
  import { defineContentType } from "../../core/dist/define-content-type.js";
4
4
  import "../../core/dist/index.js";
5
- import { useIntl } from "../../sdk/i18n/client.js";
5
+ import { useMessageFormatter } from "../../sdk/i18n/use-message-formatter.js";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  //#region src/particles/order-details-back/order-details-back.tsx
8
8
  const LIST_HREF = "/pvt/orders";
@@ -15,7 +15,9 @@ const OrderDetailsBackContent = defineContentType({
15
15
  additionalProperties: false,
16
16
  properties: { label: {
17
17
  type: "string",
18
- title: "Label"
18
+ title: "Label",
19
+ format: "icu-message",
20
+ messageSource: "Back to orders"
19
21
  } }
20
22
  }
21
23
  });
@@ -29,21 +31,17 @@ const OrderDetailsBackDefinition = defineComponent({
29
31
  category: "action"
30
32
  },
31
33
  schema: {},
32
- guideline: "The return from one order to the order list. Place it first on the order page when the layout has no account breadcrumb. The label is content; a blank field keeps the catalogue."
34
+ guideline: "The return from one order to the order list. Place it first on the order page when the layout has no account breadcrumb. The label is content."
33
35
  });
34
- function authored(value, fallback) {
35
- return value?.trim() || fallback;
36
- }
37
- function OrderDetailsBack({ className, ref, $content, ...props }) {
38
- const intl = useIntl();
39
- const label = authored($content?.label, intl.formatMessage({ id: "fs/order.back-to-orders" }));
36
+ function OrderDetailsBack({ className, ref, $content, $locale, ...props }) {
37
+ const { format } = useMessageFormatter(OrderDetailsBackContent, $content);
40
38
  return /* @__PURE__ */ jsx("a", {
41
39
  ...props,
42
40
  ref,
43
41
  href: LIST_HREF,
44
42
  className,
45
43
  "data-fs-order-details-back": "",
46
- children: label
44
+ children: format("label")
47
45
  });
48
46
  }
49
47
  //#endregion