@vtex/faststore 0.0.8 → 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 (568) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/README.md +0 -1
  3. package/dist/actions.json +48 -1
  4. package/dist/catalog.json +1397 -1594
  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 +67 -56
  13. package/dist/components.js +64 -53
  14. package/dist/content-types.json +5886 -555
  15. package/dist/core/dist/define-component.d.ts +7 -2
  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-entry-point.md +4 -4
  24. package/dist/docs/account-menu.md +16 -17
  25. package/dist/docs/account-saved-cards.md +306 -0
  26. package/dist/docs/alert-dialog.md +3 -1
  27. package/dist/docs/avatar.md +4 -2
  28. package/dist/docs/billing-address.md +99 -30
  29. package/dist/docs/binding-switcher.md +157 -0
  30. package/dist/docs/buy-button.md +7 -8
  31. package/dist/docs/card-entry.md +42 -29
  32. package/dist/docs/card-summary.md +185 -0
  33. package/dist/docs/cardholder-document.md +5 -3
  34. package/dist/docs/carousel.md +5 -4
  35. package/dist/docs/cart-destination.md +251 -0
  36. package/dist/docs/cart-item.md +48 -15
  37. package/dist/docs/cart-totalizer.md +8 -6
  38. package/dist/docs/cart.md +240 -39
  39. package/dist/docs/challenge-return.md +135 -0
  40. package/dist/docs/client-preferences-fieldset.md +10 -5
  41. package/dist/docs/client-preferences.md +31 -8
  42. package/dist/docs/client-profile-fieldset.md +20 -6
  43. package/dist/docs/client-profile.md +12 -3
  44. package/dist/docs/copy-text.md +9 -7
  45. package/dist/docs/document-field.md +1 -1
  46. package/dist/docs/email-field.md +2 -1
  47. package/dist/docs/email-identification.md +12 -2
  48. package/dist/docs/footer-copyright.md +4 -2
  49. package/dist/docs/footer-social.md +1 -1
  50. package/dist/docs/form.md +54 -18
  51. package/dist/docs/free-shipping-progress.md +18 -13
  52. package/dist/docs/identity-edit.md +8 -2
  53. package/dist/docs/identity-summary.md +18 -5
  54. package/dist/docs/incentives.md +2 -2
  55. package/dist/docs/installments.md +46 -32
  56. package/dist/docs/logo.md +1 -1
  57. package/dist/docs/my-account-profile.md +16 -11
  58. package/dist/docs/navigation-link.md +5 -3
  59. package/dist/docs/order-cancel.md +3 -1
  60. package/dist/docs/order-delivery-address.md +7 -5
  61. package/dist/docs/order-delivery-group.md +1 -3
  62. package/dist/docs/order-details-back.md +1 -1
  63. package/dist/docs/order-details-header.md +1 -4
  64. package/dist/docs/order-invoice-download.md +60 -0
  65. package/dist/docs/order-list-row.md +1 -1
  66. package/dist/docs/order-list-search.md +13 -20
  67. package/dist/docs/order-list-views.md +11 -17
  68. package/dist/docs/order-list.md +12 -5
  69. package/dist/docs/order-payment.md +9 -7
  70. package/dist/docs/order-placed-date.md +1 -1
  71. package/dist/docs/order-placed-payment-summary.md +28 -15
  72. package/dist/docs/order-placed.md +49 -14
  73. package/dist/docs/order-progress.md +1 -1
  74. package/dist/docs/order-status-badge.md +20 -9
  75. package/dist/docs/order-summary.md +2 -2
  76. package/dist/docs/order-tracking-link.md +58 -0
  77. package/dist/docs/payment-method-badges.md +32 -6
  78. package/dist/docs/payment-methods.md +2 -2
  79. package/dist/docs/payment.md +36 -17
  80. package/dist/docs/phone-field.md +4 -4
  81. package/dist/docs/place-order.md +84 -36
  82. package/dist/docs/postal-code-field.md +3 -1
  83. package/dist/docs/pricing.md +21 -23
  84. package/dist/docs/product-gallery.md +19 -20
  85. package/dist/docs/product-information.md +14 -10
  86. package/dist/docs/product-list.md +7 -6
  87. package/dist/docs/product-shelf.md +7 -1
  88. package/dist/docs/promotion.md +4 -2
  89. package/dist/docs/region.md +23 -15
  90. package/dist/docs/save-card.md +7 -6
  91. package/dist/docs/saved-cards.md +65 -36
  92. package/dist/docs/select.md +3 -4
  93. package/dist/docs/shipping-address.md +57 -21
  94. package/dist/docs/shipping-simulator.md +53 -15
  95. package/dist/docs/sign-in-disclosure.md +176 -0
  96. package/dist/docs/sign-in-form.md +78 -47
  97. package/dist/docs/sign-in-redirect.md +5 -3
  98. package/dist/docs/sign-in.md +173 -0
  99. package/dist/docs/toast.md +45 -16
  100. package/dist/docs/variant-selector.md +15 -11
  101. package/dist/graphql/types.d.ts +4 -14
  102. package/dist/index.d.ts +3 -2
  103. package/dist/internal/client.d.ts +4 -3
  104. package/dist/internal/client.js +5 -2
  105. package/dist/internal/server.d.ts +10 -5
  106. package/dist/internal/server.js +9 -4
  107. package/dist/matter/access-code-sign-in/access-code-sign-in.d.ts +250 -66
  108. package/dist/matter/access-code-sign-in/access-code-sign-in.js +459 -188
  109. package/dist/matter/access-code-sign-in/access-code-sign-in.js.map +1 -1
  110. package/dist/matter/account-address-book/account-address-book-delete.d.ts +78 -40
  111. package/dist/matter/account-address-book/account-address-book-delete.js +86 -50
  112. package/dist/matter/account-address-book/account-address-book-delete.js.map +1 -1
  113. package/dist/matter/account-address-book/account-address-book-deliverability.d.ts +21 -4
  114. package/dist/matter/account-address-book/account-address-book-deliverability.js +45 -17
  115. package/dist/matter/account-address-book/account-address-book-deliverability.js.map +1 -1
  116. package/dist/matter/account-address-book/account-address-book-form-parts.d.ts +74 -19
  117. package/dist/matter/account-address-book/account-address-book-form-parts.js +77 -26
  118. package/dist/matter/account-address-book/account-address-book-form-parts.js.map +1 -1
  119. package/dist/matter/account-address-book/account-address-book-profile-notice.d.ts +27 -6
  120. package/dist/matter/account-address-book/account-address-book-profile-notice.js +55 -28
  121. package/dist/matter/account-address-book/account-address-book-profile-notice.js.map +1 -1
  122. package/dist/matter/account-address-book/account-address-book.d.ts +67 -14
  123. package/dist/matter/account-address-book/account-address-book.js +74 -33
  124. package/dist/matter/account-address-book/account-address-book.js.map +1 -1
  125. package/dist/matter/account-address-book/account-address-country-switch.js +3 -3
  126. package/dist/matter/account-address-book/account-address-country-switch.js.map +1 -1
  127. package/dist/matter/account-address-book/account-address-country.d.ts +66 -20
  128. package/dist/matter/account-address-book/account-address-country.js +83 -49
  129. package/dist/matter/account-address-book/account-address-country.js.map +1 -1
  130. package/dist/matter/account-address-book/account-address-form-context.d.ts +8 -4
  131. package/dist/matter/account-address-book/account-address-form-context.js.map +1 -1
  132. package/dist/matter/account-address-book/account-address-form.d.ts +468 -45
  133. package/dist/matter/account-address-book/account-address-form.js +518 -155
  134. package/dist/matter/account-address-book/account-address-form.js.map +1 -1
  135. package/dist/matter/account-address-book/account-address-record.d.ts +27 -6
  136. package/dist/matter/account-address-book/account-address-record.js +32 -17
  137. package/dist/matter/account-address-book/account-address-record.js.map +1 -1
  138. package/dist/matter/account-menu/account-menu.d.ts +34 -17
  139. package/dist/matter/account-menu/account-menu.js +46 -54
  140. package/dist/matter/account-menu/account-menu.js.map +1 -1
  141. package/dist/matter/account-menu-identity/account-menu-identity.js +1 -1
  142. package/dist/matter/account-saved-cards/account-saved-cards.d.ts +463 -0
  143. package/dist/matter/account-saved-cards/account-saved-cards.js +1011 -0
  144. package/dist/matter/account-saved-cards/account-saved-cards.js.map +1 -0
  145. package/dist/matter/billing-address/billing-address.d.ts +156 -74
  146. package/dist/matter/billing-address/billing-address.js +227 -156
  147. package/dist/matter/billing-address/billing-address.js.map +1 -1
  148. package/dist/matter/breadcrumb/breadcrumb.d.ts +21 -3
  149. package/dist/matter/breadcrumb/breadcrumb.js +24 -9
  150. package/dist/matter/breadcrumb/breadcrumb.js.map +1 -1
  151. package/dist/matter/buy-button/buy-button.d.ts +8 -11
  152. package/dist/matter/buy-button/buy-button.js +10 -19
  153. package/dist/matter/buy-button/buy-button.js.map +1 -1
  154. package/dist/matter/card-entry/card-capture.js +12 -4
  155. package/dist/matter/card-entry/card-capture.js.map +1 -1
  156. package/dist/matter/card-entry/card-entry.d.ts +123 -32
  157. package/dist/matter/card-entry/card-entry.js +348 -221
  158. package/dist/matter/card-entry/card-entry.js.map +1 -1
  159. package/dist/matter/cart/cart-namespace.d.ts +11 -1
  160. package/dist/matter/cart/cart-namespace.js +11 -1
  161. package/dist/matter/cart/cart-namespace.js.map +1 -1
  162. package/dist/matter/cart/cart.d.ts +416 -45
  163. package/dist/matter/cart/cart.js +782 -101
  164. package/dist/matter/cart/cart.js.map +1 -1
  165. package/dist/matter/cart-destination/cart-destination.d.ts +233 -0
  166. package/dist/matter/cart-destination/cart-destination.js +703 -0
  167. package/dist/matter/cart-destination/cart-destination.js.map +1 -0
  168. package/dist/matter/cart-item/cart-item.d.ts +145 -16
  169. package/dist/matter/cart-item/cart-item.js +230 -54
  170. package/dist/matter/cart-item/cart-item.js.map +1 -1
  171. package/dist/matter/cart-item-compositions/cart-item-compositions.js +1 -1
  172. package/dist/matter/cart-item-compositions/cart-item-compositions.js.map +1 -1
  173. package/dist/matter/cart-item-customizations/cart-item-customizations.js +1 -1
  174. package/dist/matter/cart-item-customizations/cart-item-customizations.js.map +1 -1
  175. package/dist/matter/cart-item-discounts/cart-item-discounts.js +1 -1
  176. package/dist/matter/cart-item-discounts/cart-item-discounts.js.map +1 -1
  177. package/dist/matter/cart-item-seller-info/cart-item-seller-info.js +1 -1
  178. package/dist/matter/cart-item-seller-info/cart-item-seller-info.js.map +1 -1
  179. package/dist/matter/cart-item-variations/cart-item-variations.js +1 -1
  180. package/dist/matter/cart-item-variations/cart-item-variations.js.map +1 -1
  181. package/dist/matter/cart-totalizer/cart-totalizer.d.ts +43 -9
  182. package/dist/matter/cart-totalizer/cart-totalizer.js +49 -19
  183. package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -1
  184. package/dist/matter/challenge-return/challenge-return.d.ts +62 -0
  185. package/dist/matter/challenge-return/challenge-return.js +241 -0
  186. package/dist/matter/challenge-return/challenge-return.js.map +1 -0
  187. package/dist/matter/client-preferences/client-preferences-fieldset.d.ts +86 -17
  188. package/dist/matter/client-preferences/client-preferences-fieldset.js +126 -54
  189. package/dist/matter/client-preferences/client-preferences-fieldset.js.map +1 -1
  190. package/dist/matter/client-preferences/client-preferences.d.ts +50 -7
  191. package/dist/matter/client-preferences/client-preferences.js +84 -15
  192. package/dist/matter/client-preferences/client-preferences.js.map +1 -1
  193. package/dist/matter/client-profile/client-profile.d.ts +44 -9
  194. package/dist/matter/client-profile/client-profile.js +64 -24
  195. package/dist/matter/client-profile/client-profile.js.map +1 -1
  196. package/dist/matter/client-profile-form/client-profile-fieldset.d.ts +119 -22
  197. package/dist/matter/client-profile-form/client-profile-fieldset.js +161 -73
  198. package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -1
  199. package/dist/matter/delivery-options/delivery-options-accordion.d.ts +49 -4
  200. package/dist/matter/delivery-options/delivery-options-accordion.js +67 -14
  201. package/dist/matter/delivery-options/delivery-options-accordion.js.map +1 -1
  202. package/dist/matter/delivery-options/delivery-options-controller.d.ts +69 -9
  203. package/dist/matter/delivery-options/delivery-options-controller.js +80 -14
  204. package/dist/matter/delivery-options/delivery-options-controller.js.map +1 -1
  205. package/dist/matter/delivery-options/delivery-options.d.ts +37 -2
  206. package/dist/matter/delivery-options/delivery-options.js +75 -12
  207. package/dist/matter/delivery-options/delivery-options.js.map +1 -1
  208. package/dist/matter/delivery-options/use-delivery-option-selection.d.ts +1 -0
  209. package/dist/matter/delivery-options/use-delivery-option-selection.js +1 -1
  210. package/dist/matter/delivery-options/use-delivery-option-selection.js.map +1 -1
  211. package/dist/matter/email-identification/email-identification.d.ts +25 -3
  212. package/dist/matter/email-identification/email-identification.js +49 -12
  213. package/dist/matter/email-identification/email-identification.js.map +1 -1
  214. package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +85 -10
  215. package/dist/matter/free-shipping-progress/free-shipping-progress.js +153 -53
  216. package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -1
  217. package/dist/matter/identity-edit/identity-edit.d.ts +52 -10
  218. package/dist/matter/identity-edit/identity-edit.js +47 -19
  219. package/dist/matter/identity-edit/identity-edit.js.map +1 -1
  220. package/dist/matter/identity-summary/identity-summary.d.ts +76 -22
  221. package/dist/matter/identity-summary/identity-summary.js +95 -45
  222. package/dist/matter/identity-summary/identity-summary.js.map +1 -1
  223. package/dist/matter/installments/installments-select.d.ts +98 -16
  224. package/dist/matter/installments/installments-select.js +156 -48
  225. package/dist/matter/installments/installments-select.js.map +1 -1
  226. package/dist/matter/installments/installments.d.ts +96 -16
  227. package/dist/matter/installments/installments.js +115 -40
  228. package/dist/matter/installments/installments.js.map +1 -1
  229. package/dist/matter/installments/use-installments-selection.d.ts +1 -0
  230. package/dist/matter/installments/use-installments-selection.js +8 -3
  231. package/dist/matter/installments/use-installments-selection.js.map +1 -1
  232. package/dist/matter/my-account-profile/my-account-profile.d.ts +358 -103
  233. package/dist/matter/my-account-profile/my-account-profile.js +370 -174
  234. package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
  235. package/dist/matter/order-cancel/order-cancel.d.ts +65 -19
  236. package/dist/matter/order-cancel/order-cancel.js +118 -51
  237. package/dist/matter/order-cancel/order-cancel.js.map +1 -1
  238. package/dist/matter/order-delivery-address/order-delivery-address.d.ts +8 -18
  239. package/dist/matter/order-delivery-address/order-delivery-address.js +14 -23
  240. package/dist/matter/order-delivery-address/order-delivery-address.js.map +1 -1
  241. package/dist/matter/order-delivery-group/order-delivery-group.d.ts +40 -24
  242. package/dist/matter/order-delivery-group/order-delivery-group.js +64 -74
  243. package/dist/matter/order-delivery-group/order-delivery-group.js.map +1 -1
  244. package/dist/matter/order-details-header/order-details-header.d.ts +32 -15
  245. package/dist/matter/order-details-header/order-details-header.js +66 -58
  246. package/dist/matter/order-details-header/order-details-header.js.map +1 -1
  247. package/dist/matter/order-invoice-download/order-invoice-download.d.ts +78 -0
  248. package/dist/matter/order-invoice-download/order-invoice-download.js +173 -0
  249. package/dist/matter/order-invoice-download/order-invoice-download.js.map +1 -0
  250. package/dist/matter/order-list/order-list.d.ts +164 -19
  251. package/dist/matter/order-list/order-list.js +229 -87
  252. package/dist/matter/order-list/order-list.js.map +1 -1
  253. package/dist/matter/order-list-row/order-list-row.d.ts +6 -1
  254. package/dist/matter/order-list-row/order-list-row.js +3 -2
  255. package/dist/matter/order-list-row/order-list-row.js.map +1 -1
  256. package/dist/matter/order-list-search/order-list-search.d.ts +18 -26
  257. package/dist/matter/order-list-search/order-list-search.js +30 -69
  258. package/dist/matter/order-list-search/order-list-search.js.map +1 -1
  259. package/dist/matter/order-list-views/order-list-views.d.ts +15 -22
  260. package/dist/matter/order-list-views/order-list-views.js +22 -68
  261. package/dist/matter/order-list-views/order-list-views.js.map +1 -1
  262. package/dist/matter/order-payment/order-payment.d.ts +33 -10
  263. package/dist/matter/order-payment/order-payment.js +44 -39
  264. package/dist/matter/order-payment/order-payment.js.map +1 -1
  265. package/dist/matter/order-placed/order-placed-deliveries.d.ts +144 -12
  266. package/dist/matter/order-placed/order-placed-deliveries.js +115 -40
  267. package/dist/matter/order-placed/order-placed-deliveries.js.map +1 -1
  268. package/dist/matter/order-placed/order-placed.d.ts +198 -31
  269. package/dist/matter/order-placed/order-placed.js +230 -139
  270. package/dist/matter/order-placed/order-placed.js.map +1 -1
  271. package/dist/matter/order-placed-date/order-placed-date.d.ts +5 -8
  272. package/dist/matter/order-placed-date/order-placed-date.js +7 -8
  273. package/dist/matter/order-placed-date/order-placed-date.js.map +1 -1
  274. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +90 -17
  275. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +93 -117
  276. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -1
  277. package/dist/matter/order-progress/order-progress.d.ts +19 -8
  278. package/dist/matter/order-progress/order-progress.js +37 -45
  279. package/dist/matter/order-progress/order-progress.js.map +1 -1
  280. package/dist/matter/order-summary/order-summary.d.ts +19 -9
  281. package/dist/matter/order-summary/order-summary.js +38 -44
  282. package/dist/matter/order-summary/order-summary.js.map +1 -1
  283. package/dist/matter/order-tracking-link/order-tracking-link.d.ts +43 -0
  284. package/dist/matter/order-tracking-link/order-tracking-link.js +107 -0
  285. package/dist/matter/order-tracking-link/order-tracking-link.js.map +1 -0
  286. package/dist/matter/payment/payment-card-capture.js +17 -10
  287. package/dist/matter/payment/payment-card-capture.js.map +1 -1
  288. package/dist/matter/payment/payment-controller.d.ts +4 -2
  289. package/dist/matter/payment/payment-controller.js +30 -9
  290. package/dist/matter/payment/payment-controller.js.map +1 -1
  291. package/dist/matter/payment/payment-method-badges.js +1 -1
  292. package/dist/matter/payment/payment.d.ts +69 -19
  293. package/dist/matter/payment/payment.js +101 -35
  294. package/dist/matter/payment/payment.js.map +1 -1
  295. package/dist/matter/payment/use-payment-method-selection.d.ts +25 -4
  296. package/dist/matter/payment/use-payment-method-selection.js +94 -32
  297. package/dist/matter/payment/use-payment-method-selection.js.map +1 -1
  298. package/dist/matter/payment/use-payment-submit-gate.d.ts +14 -3
  299. package/dist/matter/payment/use-payment-submit-gate.js +47 -8
  300. package/dist/matter/payment/use-payment-submit-gate.js.map +1 -1
  301. package/dist/matter/place-order/place-order.d.ts +171 -57
  302. package/dist/matter/place-order/place-order.js +376 -185
  303. package/dist/matter/place-order/place-order.js.map +1 -1
  304. package/dist/matter/pricing/pricing.d.ts +152 -13
  305. package/dist/matter/pricing/pricing.js +153 -52
  306. package/dist/matter/pricing/pricing.js.map +1 -1
  307. package/dist/matter/product-information/product-information.d.ts +27 -4
  308. package/dist/matter/product-information/product-information.js +32 -15
  309. package/dist/matter/product-information/product-information.js.map +1 -1
  310. package/dist/matter/product-list/product-list.d.ts +24 -6
  311. package/dist/matter/product-list/product-list.js +32 -26
  312. package/dist/matter/product-list/product-list.js.map +1 -1
  313. package/dist/matter/product-shelf/product-shelf.d.ts +8 -3
  314. package/dist/matter/product-shelf/product-shelf.js +111 -10
  315. package/dist/matter/product-shelf/product-shelf.js.map +1 -1
  316. package/dist/matter/region/region.d.ts +33 -16
  317. package/dist/matter/region/region.js +59 -52
  318. package/dist/matter/region/region.js.map +1 -1
  319. package/dist/matter/save-card/save-card.d.ts +43 -8
  320. package/dist/matter/save-card/save-card.js +61 -23
  321. package/dist/matter/save-card/save-card.js.map +1 -1
  322. package/dist/matter/saved-cards/saved-cards.d.ts +113 -21
  323. package/dist/matter/saved-cards/saved-cards.js +349 -77
  324. package/dist/matter/saved-cards/saved-cards.js.map +1 -1
  325. package/dist/matter/shipping-address/address-payload.js +25 -0
  326. package/dist/matter/shipping-address/address-payload.js.map +1 -0
  327. package/dist/matter/shipping-address/country-descriptors.js +71 -71
  328. package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
  329. package/dist/matter/shipping-address/library-country-descriptors.js +136 -0
  330. package/dist/matter/shipping-address/library-country-descriptors.js.map +1 -0
  331. package/dist/matter/shipping-address/shipping-address.d.ts +312 -45
  332. package/dist/matter/shipping-address/shipping-address.js +443 -188
  333. package/dist/matter/shipping-address/shipping-address.js.map +1 -1
  334. package/dist/matter/shipping-simulator/shipping-simulator.d.ts +251 -25
  335. package/dist/matter/shipping-simulator/shipping-simulator.js +261 -51
  336. package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
  337. package/dist/matter/sign-in/sign-in.d.ts +108 -0
  338. package/dist/matter/sign-in/sign-in.js +285 -0
  339. package/dist/matter/sign-in/sign-in.js.map +1 -0
  340. package/dist/matter/sign-in-disclosure/sign-in-disclosure.d.ts +81 -0
  341. package/dist/matter/sign-in-disclosure/sign-in-disclosure.js +232 -0
  342. package/dist/matter/sign-in-disclosure/sign-in-disclosure.js.map +1 -0
  343. package/dist/matter/sign-in-form/sign-in-form.d.ts +93 -62
  344. package/dist/matter/sign-in-form/sign-in-form.js +134 -144
  345. package/dist/matter/sign-in-form/sign-in-form.js.map +1 -1
  346. package/dist/particles/binding-switcher/binding-switcher.d.ts +59 -0
  347. package/dist/particles/binding-switcher/binding-switcher.js +194 -0
  348. package/dist/particles/binding-switcher/binding-switcher.js.map +1 -0
  349. package/dist/particles/card-summary/card-network.d.ts +17 -0
  350. package/dist/particles/card-summary/card-network.js +25 -0
  351. package/dist/particles/card-summary/card-network.js.map +1 -0
  352. package/dist/particles/card-summary/card-summary.d.ts +113 -0
  353. package/dist/particles/card-summary/card-summary.js +221 -0
  354. package/dist/particles/card-summary/card-summary.js.map +1 -0
  355. package/dist/particles/carousel/carousel.d.ts +99 -11
  356. package/dist/particles/carousel/carousel.js +103 -35
  357. package/dist/particles/carousel/carousel.js.map +1 -1
  358. package/dist/particles/copy-text/copy-text.js +5 -15
  359. package/dist/particles/copy-text/copy-text.js.map +1 -1
  360. package/dist/particles/dialog/dialog.d.ts +14 -6
  361. package/dist/particles/dialog/dialog.js +6 -3
  362. package/dist/particles/dialog/dialog.js.map +1 -1
  363. package/dist/particles/drawer/drawer.js +1 -1
  364. package/dist/particles/drawer/drawer.js.map +1 -1
  365. package/dist/particles/email-field/email-field.d.ts +2 -1
  366. package/dist/particles/email-field/email-field.js +2 -1
  367. package/dist/particles/email-field/email-field.js.map +1 -1
  368. package/dist/particles/footer-link-group/footer-link-group.js +1 -0
  369. package/dist/particles/footer-link-group/footer-link-group.js.map +1 -1
  370. package/dist/particles/footer-social/footer-social.d.ts +1 -1
  371. package/dist/particles/footer-social/footer-social.js +1 -1
  372. package/dist/particles/footer-social/footer-social.js.map +1 -1
  373. package/dist/particles/form/form.d.ts +85 -13
  374. package/dist/particles/form/form.js +91 -42
  375. package/dist/particles/form/form.js.map +1 -1
  376. package/dist/particles/gallery/gallery.d.ts +129 -12
  377. package/dist/particles/gallery/gallery.js +121 -34
  378. package/dist/particles/gallery/gallery.js.map +1 -1
  379. package/dist/particles/incentives/incentives.d.ts +1 -1
  380. package/dist/particles/incentives/incentives.js +1 -1
  381. package/dist/particles/incentives/incentives.js.map +1 -1
  382. package/dist/particles/order-details-back/order-details-back.d.ts +5 -3
  383. package/dist/particles/order-details-back/order-details-back.js +8 -10
  384. package/dist/particles/order-details-back/order-details-back.js.map +1 -1
  385. package/dist/particles/order-status-badge/order-status-badge.d.ts +3 -3
  386. package/dist/particles/order-status-badge/order-status-badge.js +4 -20
  387. package/dist/particles/order-status-badge/order-status-badge.js.map +1 -1
  388. package/dist/particles/password-field/password-field.d.ts +1 -1
  389. package/dist/particles/password-field/password-field.js +2 -4
  390. package/dist/particles/password-field/password-field.js.map +1 -1
  391. package/dist/particles/payment-methods/payment-methods.d.ts +1 -1
  392. package/dist/particles/payment-methods/payment-methods.js +1 -1
  393. package/dist/particles/payment-methods/payment-methods.js.map +1 -1
  394. package/dist/particles/phone-field/phone-field.d.ts +4 -4
  395. package/dist/particles/phone-field/phone-field.js +8 -11
  396. package/dist/particles/phone-field/phone-field.js.map +1 -1
  397. package/dist/particles/spinner/spinner.d.ts +24 -4
  398. package/dist/particles/spinner/spinner.js +25 -9
  399. package/dist/particles/spinner/spinner.js.map +1 -1
  400. package/dist/particles/switch/switch.d.ts +4 -1
  401. package/dist/particles/switch/switch.js +3 -1
  402. package/dist/particles/switch/switch.js.map +1 -1
  403. package/dist/particles/toast/toast.d.ts +49 -9
  404. package/dist/particles/toast/toast.js +81 -15
  405. package/dist/particles/toast/toast.js.map +1 -1
  406. package/dist/schema.graphql +461 -89
  407. package/dist/sdk/actions/index.d.ts +3 -1
  408. package/dist/sdk/actions/index.js +3 -1
  409. package/dist/sdk/actions/locale-action-provider.d.ts +16 -0
  410. package/dist/sdk/actions/locale-action-provider.js +20 -0
  411. package/dist/sdk/actions/locale-action-provider.js.map +1 -0
  412. package/dist/sdk/actions/saved-card-action-provider.d.ts +12 -0
  413. package/dist/sdk/actions/saved-card-action-provider.js +16 -0
  414. package/dist/sdk/actions/saved-card-action-provider.js.map +1 -0
  415. package/dist/sdk/actions/types.d.ts +6 -2
  416. package/dist/sdk/address/address-fields.js +4 -4
  417. package/dist/sdk/address/address-fields.js.map +1 -1
  418. package/dist/sdk/address/constants.js +1 -6
  419. package/dist/sdk/address/constants.js.map +1 -1
  420. package/dist/sdk/address/messages.js +44 -44
  421. package/dist/sdk/address/messages.js.map +1 -1
  422. package/dist/sdk/address/postal-code.js +15 -2
  423. package/dist/sdk/address/postal-code.js.map +1 -1
  424. package/dist/sdk/address/types.d.ts +5 -3
  425. package/dist/sdk/address/validate-address.js +3 -3
  426. package/dist/sdk/address/validate-address.js.map +1 -1
  427. package/dist/sdk/analytics/use-analytics-actions.d.ts +1 -1
  428. package/dist/sdk/analytics/use-analytics-actions.js.map +1 -1
  429. package/dist/sdk/cache/storefront-cache.js +2 -1
  430. package/dist/sdk/cache/storefront-cache.js.map +1 -1
  431. package/dist/sdk/cart/operations.d.ts +2 -1
  432. package/dist/sdk/cart/operations.js +55 -1
  433. package/dist/sdk/cart/operations.js.map +1 -1
  434. package/dist/sdk/cart/optimistic.d.ts +30 -7
  435. package/dist/sdk/cart/optimistic.js +78 -41
  436. package/dist/sdk/cart/optimistic.js.map +1 -1
  437. package/dist/sdk/cart/use-cart-actions.d.ts +7 -0
  438. package/dist/sdk/cart/use-cart-actions.js +61 -15
  439. package/dist/sdk/cart/use-cart-actions.js.map +1 -1
  440. package/dist/sdk/cart/use-cart-sync-sales-channel.js +70 -0
  441. package/dist/sdk/cart/use-cart-sync-sales-channel.js.map +1 -0
  442. package/dist/sdk/data/index.js +2 -2
  443. package/dist/sdk/data/reactive-list-item-data-provider.js +2 -2
  444. package/dist/sdk/generated/gql.js +16 -12
  445. package/dist/sdk/generated/gql.js.map +1 -1
  446. package/dist/sdk/generated/graphql.d.ts +197 -51
  447. package/dist/sdk/generated/graphql.js +2318 -91
  448. package/dist/sdk/generated/graphql.js.map +1 -1
  449. package/dist/sdk/i18n/format-error-code.js +23 -0
  450. package/dist/sdk/i18n/format-error-code.js.map +1 -0
  451. package/dist/sdk/i18n/message-formatter.d.ts +22 -0
  452. package/dist/sdk/i18n/message-formatter.js +140 -0
  453. package/dist/sdk/i18n/message-formatter.js.map +1 -0
  454. package/dist/sdk/i18n/use-message-formatter.d.ts +8 -0
  455. package/dist/sdk/i18n/use-message-formatter.js +18 -0
  456. package/dist/sdk/i18n/use-message-formatter.js.map +1 -0
  457. package/dist/sdk/identity/use-identity-actions.js.map +1 -1
  458. package/dist/sdk/locale/binding-switch-provider.d.ts +13 -0
  459. package/dist/sdk/locale/binding-switch-provider.js +20 -0
  460. package/dist/sdk/locale/binding-switch-provider.js.map +1 -0
  461. package/dist/sdk/locale/use-locale-actions.d.ts +16 -0
  462. package/dist/sdk/locale/use-locale-actions.js +70 -0
  463. package/dist/sdk/locale/use-locale-actions.js.map +1 -0
  464. package/dist/sdk/navigation/binding-switch.d.ts +39 -0
  465. package/dist/sdk/navigation/binding-switch.js +129 -0
  466. package/dist/sdk/navigation/binding-switch.js.map +1 -0
  467. package/dist/sdk/navigation/decode-route-params.d.ts +11 -0
  468. package/dist/sdk/navigation/decode-route-params.js +32 -0
  469. package/dist/sdk/navigation/decode-route-params.js.map +1 -0
  470. package/dist/sdk/navigation/redirect.d.ts +2 -0
  471. package/dist/sdk/navigation/redirect.js +19 -1
  472. package/dist/sdk/navigation/redirect.js.map +1 -1
  473. package/dist/sdk/navigation/types.d.ts +13 -0
  474. package/dist/sdk/payment/bin-format.js +20 -0
  475. package/dist/sdk/payment/bin-format.js.map +1 -0
  476. package/dist/sdk/payment/challenge-return.js +37 -0
  477. package/dist/sdk/payment/challenge-return.js.map +1 -0
  478. package/dist/sdk/payment/confirmation-last-four.js +39 -0
  479. package/dist/sdk/payment/confirmation-last-four.js.map +1 -0
  480. package/dist/sdk/payment/gateway.d.ts +1 -1
  481. package/dist/sdk/payment/gateway.js +8 -2
  482. package/dist/sdk/payment/gateway.js.map +1 -1
  483. package/dist/sdk/payment/operations.d.ts +1 -0
  484. package/dist/sdk/payment/operations.js +28 -6
  485. package/dist/sdk/payment/operations.js.map +1 -1
  486. package/dist/sdk/payment/resumed-purchase.d.ts +1 -0
  487. package/dist/sdk/payment/resumed-purchase.js +119 -0
  488. package/dist/sdk/payment/resumed-purchase.js.map +1 -0
  489. package/dist/sdk/payment/security-code-mask.js +16 -23
  490. package/dist/sdk/payment/security-code-mask.js.map +1 -1
  491. package/dist/sdk/payment/submission-registry.js +6 -2
  492. package/dist/sdk/payment/submission-registry.js.map +1 -1
  493. package/dist/sdk/payment/use-payment-actions.d.ts +18 -3
  494. package/dist/sdk/payment/use-payment-actions.js +23 -3
  495. package/dist/sdk/payment/use-payment-actions.js.map +1 -1
  496. package/dist/sdk/payment/use-place-order.d.ts +10 -2
  497. package/dist/sdk/payment/use-place-order.js +138 -76
  498. package/dist/sdk/payment/use-place-order.js.map +1 -1
  499. package/dist/sdk/provider/storefront-provider.d.ts +1 -7
  500. package/dist/sdk/provider/storefront-provider.js +4 -11
  501. package/dist/sdk/provider/storefront-provider.js.map +1 -1
  502. package/dist/sdk/saved-cards/operations.d.ts +16 -0
  503. package/dist/sdk/saved-cards/operations.js +41 -0
  504. package/dist/sdk/saved-cards/operations.js.map +1 -0
  505. package/dist/sdk/saved-cards/use-saved-card-actions.d.ts +26 -0
  506. package/dist/sdk/saved-cards/use-saved-card-actions.js +86 -0
  507. package/dist/sdk/saved-cards/use-saved-card-actions.js.map +1 -0
  508. package/dist/sdk/seo/entity-landing.d.ts +24 -0
  509. package/dist/sdk/seo/entity-landing.js +30 -0
  510. package/dist/sdk/seo/entity-landing.js.map +1 -0
  511. package/dist/sdk/seo/page-alternates.d.ts +8 -5
  512. package/dist/sdk/seo/page-alternates.js +11 -14
  513. package/dist/sdk/seo/page-alternates.js.map +1 -1
  514. package/dist/sdk/seo/search-landing.d.ts +42 -0
  515. package/dist/sdk/seo/search-landing.js +85 -0
  516. package/dist/sdk/seo/search-landing.js.map +1 -0
  517. package/dist/sdk/session/mock-session.d.ts +9 -0
  518. package/dist/sdk/session/mock-session.js +31 -0
  519. package/dist/sdk/session/mock-session.js.map +1 -0
  520. package/dist/sdk/session/read-server-session.d.ts +3 -0
  521. package/dist/sdk/session/read-server-session.js +5 -0
  522. package/dist/sdk/session/read-server-session.js.map +1 -1
  523. package/dist/sdk/session/return-path-segment.d.ts +10 -0
  524. package/dist/sdk/session/return-path-segment.js +15 -0
  525. package/dist/sdk/session/return-path-segment.js.map +1 -0
  526. package/dist/sdk/session/use-session-actions.js.map +1 -1
  527. package/dist/sdk/shipping/shipping-operations.d.ts +1 -1
  528. package/dist/sdk/shipping/shipping-operations.js +13 -0
  529. package/dist/sdk/shipping/shipping-operations.js.map +1 -1
  530. package/dist/sdk/shipping/use-cart-shipping-simulation.js.map +1 -1
  531. package/dist/sdk/shipping/use-shipping-actions.js.map +1 -1
  532. package/dist/sdk/shipping/use-shipping-simulation.js.map +1 -1
  533. package/dist/sdk/state/cart.d.ts +9 -2
  534. package/dist/sdk/state/cart.js +9 -2
  535. package/dist/sdk/state/cart.js.map +1 -1
  536. package/dist/utils/safe-href.d.ts +2 -0
  537. package/package.json +4 -3
  538. package/skills/storefront-asset/SKILL.md +2 -2
  539. package/skills/storefront-asset/references/api-side.md +27 -14
  540. package/skills/storefront-asset/references/findings.md +5 -2
  541. package/src/styles/tailwind.css +9 -2
  542. package/dist/matter/shipping-address/country-descriptors.d.ts +0 -1
  543. package/dist/message-locales.json +0 -7
  544. package/dist/sdk/i18n/client.d.ts +0 -4
  545. package/dist/sdk/i18n/client.js +0 -4
  546. package/dist/sdk/i18n/locales.d.ts +0 -8
  547. package/dist/sdk/i18n/locales.js +0 -57
  548. package/dist/sdk/i18n/locales.js.map +0 -1
  549. package/dist/sdk/i18n/messages/en-US.js +0 -164
  550. package/dist/sdk/i18n/messages/en-US.js.map +0 -1
  551. package/dist/sdk/i18n/messages/en-US.json +0 -159
  552. package/dist/sdk/i18n/messages/en-US.json.d.ts +0 -163
  553. package/dist/sdk/i18n/messages/es-ES.js +0 -164
  554. package/dist/sdk/i18n/messages/es-ES.js.map +0 -1
  555. package/dist/sdk/i18n/messages/es-ES.json +0 -159
  556. package/dist/sdk/i18n/messages/pt-BR.js +0 -164
  557. package/dist/sdk/i18n/messages/pt-BR.js.map +0 -1
  558. package/dist/sdk/i18n/messages/pt-BR.json +0 -159
  559. package/dist/sdk/i18n/provider.d.ts +0 -1
  560. package/dist/sdk/i18n/provider.js +0 -30
  561. package/dist/sdk/i18n/provider.js.map +0 -1
  562. package/dist/sdk/i18n/server.d.ts +0 -28
  563. package/dist/sdk/i18n/server.js +0 -59
  564. package/dist/sdk/i18n/server.js.map +0 -1
  565. package/dist/utils/resolve-authored-copy.js +0 -18
  566. package/dist/utils/resolve-authored-copy.js.map +0 -1
  567. package/dist/utils/substitute-template.js +0 -33
  568. package/dist/utils/substitute-template.js.map +0 -1
@@ -1,7 +1,9 @@
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";
4
5
  import { useStorefrontContext } from "../../sdk/context/storefront-context.js";
6
+ import { useMessageFormatter } from "../../sdk/i18n/use-message-formatter.js";
5
7
  import { graphql } from "../../sdk/generated/gql.js";
6
8
  import { useDataOverride } from "../../sdk/data/data-override-context.js";
7
9
  import { HotDataProvider } from "../../sdk/data/hot-data-provider.js";
@@ -89,6 +91,113 @@ const variantQuery = graphql(`
89
91
  }
90
92
  }
91
93
  `);
94
+ const PricingInstallmentContent = defineContentType({
95
+ id: "pricing-installment",
96
+ title: "Pricing Installment",
97
+ description: "Text of an installment line.",
98
+ schema: {
99
+ type: "object",
100
+ additionalProperties: false,
101
+ properties: {
102
+ template: {
103
+ type: "string",
104
+ title: "Installment",
105
+ format: "icu-message",
106
+ messageSource: "{count}x of {value}",
107
+ messageArguments: {
108
+ type: "object",
109
+ properties: {
110
+ count: { type: "integer" },
111
+ value: { type: "string" }
112
+ }
113
+ },
114
+ messageExample: {
115
+ count: 10,
116
+ value: "$19.90"
117
+ }
118
+ },
119
+ interestFreeLabel: {
120
+ type: "string",
121
+ title: "Interest-free label",
122
+ format: "icu-message",
123
+ messageSource: "interest-free"
124
+ }
125
+ }
126
+ }
127
+ });
128
+ const PricingDiscountContent = defineContentType({
129
+ id: "pricing-discount",
130
+ title: "Pricing Discount",
131
+ description: "Text of the list-price discount badge.",
132
+ schema: {
133
+ type: "object",
134
+ additionalProperties: false,
135
+ properties: {
136
+ percentageTemplate: {
137
+ type: "string",
138
+ title: "Percentage discount",
139
+ format: "icu-message",
140
+ messageSource: "-{percentage}%",
141
+ messageArguments: {
142
+ type: "object",
143
+ properties: { percentage: { type: "integer" } }
144
+ },
145
+ messageExample: { percentage: 25 }
146
+ },
147
+ amountTemplate: {
148
+ type: "string",
149
+ title: "Amount discount",
150
+ format: "icu-message",
151
+ messageSource: "-{amount}",
152
+ messageArguments: {
153
+ type: "object",
154
+ properties: { amount: { type: "string" } }
155
+ },
156
+ messageExample: { amount: "$10.00" }
157
+ }
158
+ }
159
+ }
160
+ });
161
+ const PricingSpotDiscountContent = defineContentType({
162
+ id: "pricing-spot-discount",
163
+ title: "Pricing Spot Discount",
164
+ description: "Text of the spot-price discount badge.",
165
+ schema: {
166
+ type: "object",
167
+ additionalProperties: false,
168
+ properties: { template: {
169
+ type: "string",
170
+ title: "Spot discount",
171
+ format: "icu-message",
172
+ messageSource: "-{percentage}%",
173
+ messageArguments: {
174
+ type: "object",
175
+ properties: { percentage: { type: "integer" } }
176
+ },
177
+ messageExample: { percentage: 10 }
178
+ } }
179
+ }
180
+ });
181
+ const PricingPromotionContent = defineContentType({
182
+ id: "pricing-promotion",
183
+ title: "Pricing Promotion",
184
+ description: "Text of a promotion line.",
185
+ schema: {
186
+ type: "object",
187
+ additionalProperties: false,
188
+ properties: { template: {
189
+ type: "string",
190
+ title: "Promotion",
191
+ format: "icu-message",
192
+ messageSource: "{name}",
193
+ messageArguments: {
194
+ type: "object",
195
+ properties: { name: { type: "string" } }
196
+ },
197
+ messageExample: { name: "Buy 3, get 2" }
198
+ } }
199
+ }
200
+ });
92
201
  const PRICING_CONTEXT_UNSET = Symbol("PricingContextUnset");
93
202
  const PricingContext = createContext(PRICING_CONTEXT_UNSET);
94
203
  const InstallmentItemContext = createContext(null);
@@ -320,58 +429,40 @@ const PricingInstallmentDefinition = defineComponent({
320
429
  name: "PricingInstallment",
321
430
  importPath: "@vtex/faststore/components",
322
431
  component: PricingInstallment,
432
+ content: PricingInstallmentContent,
323
433
  editor: {
324
434
  label: "Installment",
325
435
  category: "commerce"
326
436
  },
327
- schema: {
328
- template: {
329
- type: "string",
330
- default: "{count}x de {value}",
331
- label: "Template"
332
- },
333
- interestFreeLabel: {
334
- type: "string",
335
- default: "sem juros",
336
- label: "Interest-free label"
337
- }
338
- },
339
- guideline: "Renders a single installment line using {count} and {value} template placeholders; must be a descendant of PricingInstallments, PricingInstallmentPlan, or PricingInstallmentsForPlan."
437
+ schema: {},
438
+ guideline: "Renders a single installment line from the $content template (count and value arguments), followed by interestFreeLabel for an interest-free installment. Must be a descendant of PricingInstallments, PricingInstallmentPlan, or PricingInstallmentsForPlan."
340
439
  });
341
440
  const PricingDiscountDefinition = defineComponent({
342
441
  name: "PricingDiscount",
343
442
  importPath: "@vtex/faststore/components",
344
443
  component: PricingDiscount,
444
+ content: PricingDiscountContent,
345
445
  editor: {
346
446
  label: "Discount Badge",
347
447
  category: "commerce"
348
448
  },
349
- schema: {
350
- format: {
351
- type: ["percentage", "absolute"],
352
- default: "percentage",
353
- label: "Discount Format"
354
- },
355
- template: {
356
- type: "string",
357
- label: "Template"
358
- }
359
- },
360
- guideline: "Discount badge for the listPrice-vs-price markdown; use PricingSpotDiscount instead for the spotPrice-vs-price (Pix/cash) percentage. The format prop switches between a percentage (-25%, default) and an absolute amount (-R$ 10,00); the template supports {percentage} and {amount} placeholders and defaults to the format-appropriate one. Recomputes automatically on swatch change. Must be a descendant of PricingRoot."
449
+ schema: { format: {
450
+ type: ["percentage", "absolute"],
451
+ default: "percentage",
452
+ label: "Discount Format"
453
+ } },
454
+ guideline: "Discount badge for the listPrice-vs-price markdown; use PricingSpotDiscount instead for the spotPrice-vs-price (Pix/cash) percentage. The format prop picks a percentage (-25%, default) or an absolute amount (-R$ 10,00); the $content percentageTemplate (percentage argument) or amountTemplate (amount argument) renders it. Recomputes automatically on swatch change. Must be a descendant of PricingRoot."
361
455
  });
362
456
  const PricingSpotDiscountDefinition = defineComponent({
363
457
  name: "PricingSpotDiscount",
364
458
  importPath: "@vtex/faststore/components",
365
459
  component: PricingSpotDiscount,
460
+ content: PricingSpotDiscountContent,
366
461
  editor: {
367
462
  label: "Spot Discount Badge",
368
463
  category: "commerce"
369
464
  },
370
- schema: { template: {
371
- type: "string",
372
- default: "-{percentage}%",
373
- label: "Template"
374
- } },
465
+ schema: {},
375
466
  guideline: "Discount badge for the spotPrice-vs-price (cash/Pix) percentage; use PricingDiscount instead for the listPrice-vs-price percentage. Must be a descendant of PricingRoot."
376
467
  });
377
468
  const PricingHighlightsDefinition = defineComponent({
@@ -411,16 +502,13 @@ const PricingPromotionDefinition = defineComponent({
411
502
  name: "PricingPromotion",
412
503
  importPath: "@vtex/faststore/components",
413
504
  component: PricingPromotion,
505
+ content: PricingPromotionContent,
414
506
  editor: {
415
507
  label: "Promotion",
416
508
  category: "commerce"
417
509
  },
418
- schema: { template: {
419
- type: "string",
420
- default: "{name}",
421
- label: "Template"
422
- } },
423
- guideline: "Renders a single promotion using the {name} template placeholder; must be a descendant of PricingPromotions."
510
+ schema: {},
511
+ guideline: "Renders a single promotion from the $content template (name argument). Must be a descendant of PricingPromotions."
424
512
  });
425
513
  function PricingRoot({ $data: $dataProp, selectedVariantId, children, ...props }) {
426
514
  const { locale, currency } = useStorefrontContext();
@@ -672,41 +760,54 @@ function PricingPaymentMethodName({ className, children, ...props }) {
672
760
  children: children ?? plan.paymentMethod
673
761
  });
674
762
  }
675
- function PricingInstallment({ template = "{count}x de {value}", interestFreeLabel = "sem juros", className, children, ...props }) {
763
+ function PricingInstallment({ $content, $locale, className, children, ...props }) {
676
764
  const installment = useInstallmentItem();
677
765
  const ctx = usePricing();
766
+ const { format } = useMessageFormatter(PricingInstallmentContent, $content);
678
767
  if (!ctx) return null;
679
- const formattedValue = formatPrice(installment.value, ctx.locale, ctx.currency);
680
- const base = template.replace("{count}", String(installment.count)).replace("{value}", formattedValue);
681
- const text = installment.interestFree && interestFreeLabel ? `${base} ${interestFreeLabel}` : base;
768
+ function installmentText(pricing) {
769
+ const value = formatPrice(installment.value, pricing.locale, pricing.currency);
770
+ const base = format("template", {
771
+ count: installment.count,
772
+ value
773
+ });
774
+ const interestFree = installment.interestFree ? format("interestFreeLabel") : "";
775
+ return interestFree ? `${base} ${interestFree}` : base;
776
+ }
682
777
  return /* @__PURE__ */ jsx("span", {
683
778
  ...props,
684
779
  className,
685
780
  "data-fs-pricing-installment": "",
686
- children: children ?? text
781
+ children: children ?? installmentText(ctx)
687
782
  });
688
783
  }
689
- function PricingDiscount({ template, format = "percentage", className, children, ...props }) {
784
+ function PricingDiscount({ format = "percentage", $content, $locale, className, children, ...props }) {
690
785
  const ctx = usePricing();
786
+ const messages = useMessageFormatter(PricingDiscountContent, $content);
691
787
  if (!ctx || !ctx.hasDiscount) return null;
692
- const formattedAmount = formatPrice(ctx.listPrice - ctx.price, ctx.locale, ctx.currency);
693
- const text = (template ?? (format === "absolute" ? "-{amount}" : "-{percentage}%")).replaceAll("{percentage}", String(ctx.discountPercentage)).replaceAll("{amount}", formattedAmount);
788
+ function discountText(pricing) {
789
+ if (format === "absolute") {
790
+ const amount = formatPrice(pricing.listPrice - pricing.price, pricing.locale, pricing.currency);
791
+ return messages.format("amountTemplate", { amount });
792
+ }
793
+ return messages.format("percentageTemplate", { percentage: pricing.discountPercentage });
794
+ }
694
795
  return /* @__PURE__ */ jsx("span", {
695
796
  ...props,
696
797
  className,
697
798
  "data-fs-pricing-discount": "",
698
- children: children ?? text
799
+ children: children ?? discountText(ctx)
699
800
  });
700
801
  }
701
- function PricingSpotDiscount({ template = "-{percentage}%", className, children, ...props }) {
802
+ function PricingSpotDiscount({ $content, $locale, className, children, ...props }) {
702
803
  const ctx = usePricing();
804
+ const { format } = useMessageFormatter(PricingSpotDiscountContent, $content);
703
805
  if (!ctx || ctx.spotDiscountPercentage <= 0) return null;
704
- const text = template.replace("{percentage}", String(ctx.spotDiscountPercentage));
705
806
  return /* @__PURE__ */ jsx("span", {
706
807
  ...props,
707
808
  className,
708
809
  "data-fs-pricing-spot-discount": "",
709
- children: children ?? text
810
+ children: children ?? format("template", { percentage: ctx.spotDiscountPercentage })
710
811
  });
711
812
  }
712
813
  function PricingHighlights({ className, children, ...props }) {
@@ -744,14 +845,14 @@ function PricingPromotions({ className, children, ...props }) {
744
845
  }, `${promotion.name}-${index}`))
745
846
  });
746
847
  }
747
- function PricingPromotion({ template = "{name}", className, children, ...props }) {
848
+ function PricingPromotion({ $content, $locale, className, children, ...props }) {
748
849
  const promotion = usePromotionItem();
749
- const text = template.replace("{name}", promotion.name);
850
+ const { format } = useMessageFormatter(PricingPromotionContent, $content);
750
851
  return /* @__PURE__ */ jsx("span", {
751
852
  ...props,
752
853
  className,
753
854
  "data-fs-pricing-promotion": "",
754
- children: children ?? text
855
+ children: children ?? format("template", { name: promotion.name })
755
856
  });
756
857
  }
757
858
  function PricingSkeleton({ className, ...props }) {
@@ -788,6 +889,6 @@ const Pricing = {
788
889
  Skeleton: PricingSkeleton
789
890
  };
790
891
  //#endregion
791
- export { Pricing, PricingDiscount, PricingDiscountDefinition, PricingHighlight, PricingHighlightDefinition, PricingHighlights, PricingHighlightsDefinition, PricingInstallment, PricingInstallmentDefinition, PricingInstallmentPlan, PricingInstallmentPlanDefinition, PricingInstallmentPlans, PricingInstallmentPlansDefinition, PricingInstallments, PricingInstallmentsDefinition, PricingInstallmentsForPlan, PricingInstallmentsForPlanDefinition, PricingListPrice, PricingListPriceDefinition, PricingPaymentMethodName, PricingPaymentMethodNameDefinition, PricingPaymentMethodsList, PricingPaymentMethodsListDefinition, PricingPaymentMethodsTabList, PricingPaymentMethodsTabListDefinition, PricingPaymentMethodsTabPanels, PricingPaymentMethodsTabPanelsDefinition, PricingPaymentMethodsTrigger, PricingPaymentMethodsTriggerDefinition, PricingPromotion, PricingPromotionDefinition, PricingPromotions, PricingPromotionsDefinition, PricingRoot, PricingRootDefinition, PricingSellingPrice, PricingSellingPriceDefinition, PricingSkeleton, PricingSpotDiscount, PricingSpotDiscountDefinition, PricingSpotPrice, PricingSpotPriceDefinition, transformVariantPricingData, useInstallmentPlanItem };
892
+ export { Pricing, PricingDiscount, PricingDiscountContent, PricingDiscountDefinition, PricingHighlight, PricingHighlightDefinition, PricingHighlights, PricingHighlightsDefinition, PricingInstallment, PricingInstallmentContent, PricingInstallmentDefinition, PricingInstallmentPlan, PricingInstallmentPlanDefinition, PricingInstallmentPlans, PricingInstallmentPlansDefinition, PricingInstallments, PricingInstallmentsDefinition, PricingInstallmentsForPlan, PricingInstallmentsForPlanDefinition, PricingListPrice, PricingListPriceDefinition, PricingPaymentMethodName, PricingPaymentMethodNameDefinition, PricingPaymentMethodsList, PricingPaymentMethodsListDefinition, PricingPaymentMethodsTabList, PricingPaymentMethodsTabListDefinition, PricingPaymentMethodsTabPanels, PricingPaymentMethodsTabPanelsDefinition, PricingPaymentMethodsTrigger, PricingPaymentMethodsTriggerDefinition, PricingPromotion, PricingPromotionContent, PricingPromotionDefinition, PricingPromotions, PricingPromotionsDefinition, PricingRoot, PricingRootDefinition, PricingSellingPrice, PricingSellingPriceDefinition, PricingSkeleton, PricingSpotDiscount, PricingSpotDiscountContent, PricingSpotDiscountDefinition, PricingSpotPrice, PricingSpotPriceDefinition, transformVariantPricingData, useInstallmentPlanItem };
792
893
 
793
894
  //# sourceMappingURL=pricing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pricing.js","names":[],"sources":["../../../src/matter/pricing/pricing.tsx"],"sourcesContent":["'use client';\n\nimport { useReactiveVar } from '@apollo/client/react';\nimport { defineComponent } from '@vtex/fs-core';\nimport type { ComponentPropsWithRef } from 'react';\nimport { createContext, Suspense, useContext } from 'react';\nimport { PopoverTrigger } from '../../particles/popover/popover.js';\nimport { TabsPanel, TabsTab } from '../../particles/tabs/tabs.js';\nimport { useStorefrontContext } from '../../sdk/context/storefront-context.js';\nimport { useDataOverride } from '../../sdk/data/data-override-context.js';\nimport { HotDataProvider } from '../../sdk/data/hot-data-provider.js';\nimport { graphql } from '../../sdk/generated/gql.js';\nimport type { VariantPricingDataFragment } from '../../sdk/generated/graphql.js';\nimport { resolveDefaultSeller } from '../../sdk/seller.js';\nimport { publishedVariantIdFor, selectedVariantVar } from '../../sdk/state/variant-selector.js';\n\n// ---------------------------------------------------------------------------\n// GraphQL Fragment\n// ---------------------------------------------------------------------------\n\nconst fragment = /* GraphQL */ `\n fragment PricingData on Query {\n productBySlug(slug: $slug) {\n __typename\n id\n variants(first: 1) {\n edges {\n node {\n sellers {\n isDefault\n offer {\n price { amount currencyCode }\n listPrice { amount currencyCode }\n spotPrice { amount currencyCode }\n installmentPlans {\n paymentMethod\n paymentType\n installments {\n count\n value { amount currencyCode }\n totalAmount { amount currencyCode }\n interestRate\n interestFree\n }\n }\n discountHighlights\n promotions {\n name\n }\n }\n }\n }\n }\n }\n }\n }\n`;\n\n// The variant offer slice, authored via graphql() so HotDataProvider gets a TypedDocumentNode.\n// Declared so codegen scans the source and emits VariantPricingDataFragment; the fragment is spread\n// into variantQuery at the GraphQL layer, so the variable is unused at runtime.\nconst _variantFragment = graphql(`\n fragment VariantPricingData on Variant {\n __typename\n id\n sellers {\n isDefault\n offer {\n price { amount currencyCode }\n listPrice { amount currencyCode }\n spotPrice { amount currencyCode }\n installmentPlans {\n paymentMethod\n paymentType\n installments {\n count\n value { amount currencyCode }\n totalAmount { amount currencyCode }\n interestRate\n interestFree\n }\n }\n discountHighlights\n promotions {\n name\n }\n }\n }\n }\n`);\n\nconst variantQuery = graphql(`\n query VariantPricingQuery($id: ID!) {\n node(id: $id) {\n __typename\n ... on Variant {\n ...VariantPricingData\n }\n }\n }\n`);\n\n// ---------------------------------------------------------------------------\n// Raw data types (shape of the fragment result)\n// ---------------------------------------------------------------------------\n\ntype MoneyValue = {\n amount: number;\n currencyCode: string;\n};\n\ntype RawPromotion = {\n name: string;\n};\n\ntype RawOffer = {\n price: MoneyValue;\n listPrice: MoneyValue;\n spotPrice: MoneyValue;\n installmentPlans: Array<{\n paymentMethod: string;\n paymentType: string;\n installments: Array<{\n count: number;\n value: MoneyValue;\n totalAmount: MoneyValue;\n interestRate: number;\n interestFree: boolean;\n }>;\n }>;\n discountHighlights: string[];\n promotions: RawPromotion[];\n};\n\ntype RawPricingData = {\n // __typename/id are optional so existing fixtures (which omit them) still typecheck; the real\n // page query always supplies id, which scopes the published variant selection to this product.\n __typename?: string;\n id?: string;\n variants: {\n edges: Array<{\n node: {\n sellers: Array<{\n isDefault: boolean;\n offer: RawOffer | null;\n }>;\n };\n }>;\n };\n};\n\ntype VariantSlice = VariantPricingDataFragment;\n\ntype NormalizedPricingOffer = {\n price: number;\n listPrice: number;\n spotPrice: number;\n currency: string;\n installmentPlans: InstallmentPlanData[];\n discountHighlights: string[];\n promotions: PromotionData[];\n};\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\ntype InstallmentData = {\n count: number;\n value: number;\n totalAmount: number;\n interestRate: number;\n interestFree: boolean;\n};\n\ntype InstallmentPlanData = {\n paymentMethod: string;\n paymentType: string;\n installments: InstallmentData[];\n};\n\ntype PromotionData = {\n name: string;\n};\n\ntype PricingContextData = {\n price: number;\n listPrice: number;\n spotPrice: number;\n currency: string;\n /** Undefined only for a directly-rendered view: `Intl` reads it as the platform default. */\n locale: string | undefined;\n installmentPlans: InstallmentPlanData[];\n discountHighlights: string[];\n promotions: PromotionData[];\n hasDiscount: boolean;\n hasSpotDiscount: boolean;\n discountPercentage: number;\n spotDiscountPercentage: number;\n bestInstallment: InstallmentData | null;\n};\n\ntype PricingContextValue = PricingContextData | null;\n\ntype InstallmentPlanItemContextData = {\n paymentMethod: string;\n paymentType: string;\n installments: InstallmentData[];\n bestInstallment: InstallmentData | null;\n};\n\nconst PRICING_CONTEXT_UNSET = Symbol('PricingContextUnset');\n\nexport type PricingRootProps = ComponentPropsWithRef<'div'> & {\n $data?: RawPricingData | null;\n /** Page-supplied viewed SKU; pre-selects the offer on first paint. A published swatch selection\n * wins over it once the shopper interacts. */\n selectedVariantId?: string;\n};\n\nexport type PricingSellingPriceProps = ComponentPropsWithRef<'span'>;\n\nexport type PricingListPriceProps = ComponentPropsWithRef<'span'>;\n\nexport type PricingSpotPriceProps = ComponentPropsWithRef<'span'>;\n\nexport type PricingInstallmentsProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingInstallmentPlansProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingInstallmentPlanProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingInstallmentsForPlanProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingPaymentMethodsTriggerProps = ComponentPropsWithRef<'button'>;\n\nexport type PricingPaymentMethodsListProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingPaymentMethodsTabListProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingPaymentMethodsTabPanelsProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingPaymentMethodNameProps = ComponentPropsWithRef<'span'>;\n\nexport type PricingInstallmentProps = ComponentPropsWithRef<'span'> & {\n template?: string;\n interestFreeLabel?: string;\n};\n\nexport type PricingDiscountProps = ComponentPropsWithRef<'span'> & {\n template?: string;\n format?: 'percentage' | 'absolute';\n};\n\nexport type PricingHighlightsProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingHighlightProps = ComponentPropsWithRef<'span'>;\n\nexport type PricingPromotionsProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingPromotionProps = ComponentPropsWithRef<'span'> & {\n template?: string;\n};\n\nexport type PricingSpotDiscountProps = ComponentPropsWithRef<'span'> & {\n template?: string;\n};\n\n// ---------------------------------------------------------------------------\n// Context\n// ---------------------------------------------------------------------------\n\nconst PricingContext = createContext<PricingContextValue | typeof PRICING_CONTEXT_UNSET>(PRICING_CONTEXT_UNSET);\n\nconst InstallmentItemContext = createContext<InstallmentData | null>(null);\n\nconst InstallmentPlanItemContext = createContext<InstallmentPlanItemContextData | null>(null);\n\nconst HighlightItemContext = createContext<string | null>(null);\n\nconst PromotionItemContext = createContext<PromotionData | null>(null);\n\nfunction usePricing(): PricingContextValue {\n const ctx = useContext(PricingContext);\n if (ctx === PRICING_CONTEXT_UNSET) {\n throw new Error('Pricing components must be used inside PricingRoot.');\n }\n return ctx;\n}\n\nfunction useInstallmentItem(): InstallmentData {\n const ctx = useContext(InstallmentItemContext);\n if (!ctx) {\n throw new Error('PricingInstallment must be used inside PricingInstallments.');\n }\n return ctx;\n}\n\nexport function useInstallmentPlanItem(\n caller = 'PricingInstallmentPlan',\n parent = 'PricingInstallmentPlans',\n): InstallmentPlanItemContextData {\n const ctx = useContext(InstallmentPlanItemContext);\n if (!ctx) {\n throw new Error(`${caller} must be used inside ${parent}.`);\n }\n return ctx;\n}\n\nfunction useHighlightItem(): string {\n const ctx = useContext(HighlightItemContext);\n if (ctx === null) {\n throw new Error('PricingHighlight must be used inside PricingHighlights.');\n }\n return ctx;\n}\n\nfunction usePromotionItem(): PromotionData {\n const ctx = useContext(PromotionItemContext);\n if (!ctx) {\n throw new Error('PricingPromotion must be used inside PricingPromotions.');\n }\n return ctx;\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction formatPrice(value: number, locale: string | undefined, currency: string): string {\n return new Intl.NumberFormat(locale, { style: 'currency', currency }).format(value);\n}\n\nfunction findBestInstallment(plans: InstallmentPlanData[]): InstallmentData | null {\n const allInstallments = plans.flatMap((plan) => plan.installments);\n if (allInstallments.length === 0) return null;\n\n const interestFree = allInstallments.filter((i) => i.interestFree);\n if (interestFree.length > 0) {\n return interestFree.reduce((best, current) => (current.count > best.count ? current : best));\n }\n\n return allInstallments.reduce((best, current) => (current.count > best.count ? current : best));\n}\n\n// ---------------------------------------------------------------------------\n// Transform\n// ---------------------------------------------------------------------------\n\n// The GraphQL `Decimal` scalar is serialized as a string over the wire; convert it here so every\n// later comparison and subtraction works on numbers.\nfunction normalizeOffer(offer: RawOffer): NormalizedPricingOffer {\n return {\n price: Number(offer.price.amount),\n listPrice: Number(offer.listPrice.amount),\n spotPrice: Number(offer.spotPrice.amount),\n currency: offer.price.currencyCode,\n installmentPlans: offer.installmentPlans.map((plan) => ({\n paymentMethod: plan.paymentMethod,\n paymentType: plan.paymentType,\n installments: plan.installments.map((inst) => ({\n count: inst.count,\n value: Number(inst.value.amount),\n totalAmount: Number(inst.totalAmount.amount),\n interestRate: inst.interestRate,\n interestFree: inst.interestFree,\n })),\n })),\n discountHighlights: offer.discountHighlights,\n promotions: offer.promotions.map((promotion) => ({ name: promotion.name })),\n };\n}\n\n// Resolves a variant's default seller and normalizes its offer, or null when that seller has no\n// offer. Shared by the product-level and selected-variant transforms so the default-seller + offer\n// gate lives in one place.\nfunction pricingOfferFromVariant(variant: {\n sellers: readonly { isDefault: boolean; offer: RawOffer | null }[];\n}): NormalizedPricingOffer | null {\n const seller = resolveDefaultSeller(variant.sellers);\n const offer = seller?.offer;\n if (!offer) return null;\n\n return normalizeOffer(offer);\n}\n\nfunction transformPricingData(data: RawPricingData): NormalizedPricingOffer | null {\n const edge = data.variants.edges[0];\n if (!edge) return null;\n\n return pricingOfferFromVariant(edge.node);\n}\n\nexport function transformVariantPricingData(variant: VariantSlice): NormalizedPricingOffer | null {\n return pricingOfferFromVariant(variant);\n}\n\n// ---------------------------------------------------------------------------\n// Definitions\n// ---------------------------------------------------------------------------\n\nexport const PricingRootDefinition = defineComponent<PricingRootProps>({\n name: 'PricingRoot',\n importPath: '@vtex/faststore/components',\n component: PricingRoot,\n fragment,\n fetchStrategy: 'lazy',\n skeleton: PricingSkeleton,\n editor: { label: 'Pricing', category: 'commerce' },\n schema: {\n selectedVariantId: { type: 'string', label: 'Selected Variant ID' },\n },\n guideline:\n 'Root container for the PDP pricing block; all other Pricing sub-components must be descendants of it. Automatically recomputes the offer when a shopper picks a VariantSelector swatch (it reads the published variant selection); the selectedVariantId prop is an optional pre-selection fallback. Falls back silently to the product-level offer on variant fetch error. See pricing.md.',\n});\n\nexport const PricingSellingPriceDefinition = defineComponent<PricingSellingPriceProps>({\n name: 'PricingSellingPrice',\n importPath: '@vtex/faststore/components',\n component: PricingSellingPrice,\n editor: { label: 'Selling Price', category: 'commerce' },\n schema: {},\n guideline: 'Displays the current selling price; must be a descendant of PricingRoot.',\n});\n\nexport const PricingListPriceDefinition = defineComponent<PricingListPriceProps>({\n name: 'PricingListPrice',\n importPath: '@vtex/faststore/components',\n component: PricingListPrice,\n editor: { label: 'List Price', category: 'commerce' },\n schema: {},\n guideline:\n 'Displays the original (strikethrough) list price; only renders when a discount exists. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingSpotPriceDefinition = defineComponent<PricingSpotPriceProps>({\n name: 'PricingSpotPrice',\n importPath: '@vtex/faststore/components',\n component: PricingSpotPrice,\n editor: { label: 'Spot Price', category: 'commerce' },\n schema: {},\n guideline:\n 'Displays the best cash/instant-payment price (e.g. Pix); only renders when spotPrice is lower than the selling price. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingInstallmentsDefinition = defineComponent<PricingInstallmentsProps>({\n name: 'PricingInstallments',\n importPath: '@vtex/faststore/components',\n component: PricingInstallments,\n editor: { label: 'Installments', category: 'commerce' },\n schema: {},\n guideline:\n 'Shortcut container that exposes the single best installment across all plans; use PricingInstallmentPlans instead when a per-payment-method breakdown is needed. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingInstallmentPlansDefinition = defineComponent<PricingInstallmentPlansProps>({\n name: 'PricingInstallmentPlans',\n importPath: '@vtex/faststore/components',\n component: PricingInstallmentPlans,\n editor: { label: 'Installment Plans', category: 'commerce' },\n schema: {},\n guideline:\n 'Renders one row per payment method; use PricingInstallments instead when only the single best plan is needed. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingInstallmentPlanDefinition = defineComponent<PricingInstallmentPlanProps>({\n name: 'PricingInstallmentPlan',\n importPath: '@vtex/faststore/components',\n component: PricingInstallmentPlan,\n editor: { label: 'Installment Plan', category: 'commerce' },\n schema: {},\n guideline:\n 'Renders a single plan row inside PricingInstallmentPlans; nest PricingInstallmentsForPlan inside it to list every installment tier instead of just the best one. Must be a descendant of PricingInstallmentPlans.',\n});\n\nexport const PricingInstallmentsForPlanDefinition = defineComponent<PricingInstallmentsForPlanProps>({\n name: 'PricingInstallmentsForPlan',\n importPath: '@vtex/faststore/components',\n component: PricingInstallmentsForPlan,\n editor: { label: 'Installments For Plan', category: 'commerce' },\n schema: {},\n guideline:\n 'Iterates every installment tier (1x, 2x, … Nx) of the enclosing plan; must be a descendant of PricingInstallmentPlan.',\n});\n\nexport const PricingPaymentMethodsTriggerDefinition = defineComponent<PricingPaymentMethodsTriggerProps>({\n name: 'PricingPaymentMethodsTrigger',\n importPath: '@vtex/faststore/components',\n component: PricingPaymentMethodsTrigger,\n editor: { label: 'Payment Methods Trigger', category: 'action' },\n schema: {},\n guideline: 'Button that opens the payment-methods disclosure panel; must be a descendant of PopoverRoot.',\n});\n\nexport const PricingPaymentMethodsListDefinition = defineComponent<PricingPaymentMethodsListProps>({\n name: 'PricingPaymentMethodsList',\n importPath: '@vtex/faststore/components',\n component: PricingPaymentMethodsList,\n editor: { label: 'Payment Methods List', category: 'commerce' },\n schema: {},\n guideline:\n 'Flat disclosure panel content listing every payment plan; place inside PopoverPopup, DialogPopup, or DrawerPopup. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingPaymentMethodsTabListDefinition = defineComponent<PricingPaymentMethodsTabListProps>({\n name: 'PricingPaymentMethodsTabList',\n importPath: '@vtex/faststore/components',\n component: PricingPaymentMethodsTabList,\n editor: { label: 'Payment Methods Tab List', category: 'commerce' },\n schema: {},\n guideline:\n 'Emits one tab per payment plan for the tab-grouped disclosure pattern; must be a descendant of TabsList (which is inside TabsRoot). Pair with PricingPaymentMethodsTabPanels.',\n});\n\nexport const PricingPaymentMethodsTabPanelsDefinition = defineComponent<PricingPaymentMethodsTabPanelsProps>({\n name: 'PricingPaymentMethodsTabPanels',\n importPath: '@vtex/faststore/components',\n component: PricingPaymentMethodsTabPanels,\n editor: { label: 'Payment Methods Tab Panels', category: 'commerce' },\n schema: {},\n guideline:\n 'Emits one panel per payment plan for the tab-grouped disclosure pattern; must be a sibling of TabsList under TabsRoot (not nested inside TabsList). Pair with PricingPaymentMethodsTabList.',\n});\n\nexport const PricingPaymentMethodNameDefinition = defineComponent<PricingPaymentMethodNameProps>({\n name: 'PricingPaymentMethodName',\n importPath: '@vtex/faststore/components',\n component: PricingPaymentMethodName,\n editor: { label: 'Payment Method Name', category: 'commerce' },\n schema: {},\n guideline:\n 'Renders the enclosing plan\\'s payment method name (e.g. \"Visa\", \"Pix\"); must be inside a plan context — PricingInstallmentPlan, PricingPaymentMethodsTabList, or PricingPaymentMethodsTabPanels.',\n});\n\nexport const PricingInstallmentDefinition = defineComponent<PricingInstallmentProps>({\n name: 'PricingInstallment',\n importPath: '@vtex/faststore/components',\n component: PricingInstallment,\n editor: { label: 'Installment', category: 'commerce' },\n schema: {\n template: { type: 'string', default: '{count}x de {value}', label: 'Template' },\n interestFreeLabel: { type: 'string', default: 'sem juros', label: 'Interest-free label' },\n },\n guideline:\n 'Renders a single installment line using {count} and {value} template placeholders; must be a descendant of PricingInstallments, PricingInstallmentPlan, or PricingInstallmentsForPlan.',\n});\n\nexport const PricingDiscountDefinition = defineComponent<PricingDiscountProps>({\n name: 'PricingDiscount',\n importPath: '@vtex/faststore/components',\n component: PricingDiscount,\n editor: { label: 'Discount Badge', category: 'commerce' },\n schema: {\n format: { type: ['percentage', 'absolute'] as const, default: 'percentage', label: 'Discount Format' },\n template: { type: 'string', label: 'Template' },\n },\n guideline:\n 'Discount badge for the listPrice-vs-price markdown; use PricingSpotDiscount instead for the spotPrice-vs-price (Pix/cash) percentage. The format prop switches between a percentage (-25%, default) and an absolute amount (-R$ 10,00); the template supports {percentage} and {amount} placeholders and defaults to the format-appropriate one. Recomputes automatically on swatch change. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingSpotDiscountDefinition = defineComponent<PricingSpotDiscountProps>({\n name: 'PricingSpotDiscount',\n importPath: '@vtex/faststore/components',\n component: PricingSpotDiscount,\n editor: { label: 'Spot Discount Badge', category: 'commerce' },\n schema: {\n template: { type: 'string', default: '-{percentage}%', label: 'Template' },\n },\n guideline:\n 'Discount badge for the spotPrice-vs-price (cash/Pix) percentage; use PricingDiscount instead for the listPrice-vs-price percentage. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingHighlightsDefinition = defineComponent<PricingHighlightsProps>({\n name: 'PricingHighlights',\n importPath: '@vtex/faststore/components',\n component: PricingHighlights,\n editor: { label: 'Highlights', category: 'commerce' },\n schema: {},\n guideline:\n 'Iterates the offer\\'s discount highlight labels (e.g. \"Black Friday\", \"Exclusivo\"); place PricingHighlight as a child. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingHighlightDefinition = defineComponent<PricingHighlightProps>({\n name: 'PricingHighlight',\n importPath: '@vtex/faststore/components',\n component: PricingHighlight,\n editor: { label: 'Highlight', category: 'commerce' },\n schema: {},\n guideline: 'Renders a single highlight label as a span; must be a descendant of PricingHighlights.',\n});\n\nexport const PricingPromotionsDefinition = defineComponent<PricingPromotionsProps>({\n name: 'PricingPromotions',\n importPath: '@vtex/faststore/components',\n component: PricingPromotions,\n editor: { label: 'Promotions', category: 'commerce' },\n schema: {},\n guideline:\n 'Iterates the offer\\'s structured promotions (e.g. \"Compre 3 leve 2\"); place PricingPromotion as a child. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingPromotionDefinition = defineComponent<PricingPromotionProps>({\n name: 'PricingPromotion',\n importPath: '@vtex/faststore/components',\n component: PricingPromotion,\n editor: { label: 'Promotion', category: 'commerce' },\n schema: {\n template: { type: 'string', default: '{name}', label: 'Template' },\n },\n guideline:\n 'Renders a single promotion using the {name} template placeholder; must be a descendant of PricingPromotions.',\n});\n\n// ---------------------------------------------------------------------------\n// Implementations\n// ---------------------------------------------------------------------------\n\nexport function PricingRoot({ $data: $dataProp, selectedVariantId, children, ...props }: PricingRootProps) {\n const { locale, currency } = useStorefrontContext();\n const productSlice = useDataOverride($dataProp) ?? null;\n\n // The VariantSelector matter publishes the shopper's in-page selection here; reading it lets\n // pricing recompute when a swatch changes without a page navigation. Scope the published selection\n // to this product so a swatch picked on another PDP does not leak in after client-side navigation.\n // The explicit selectedVariantId prop is the pre-selection fallback; the live selection wins.\n const publishedSelection = useReactiveVar(selectedVariantVar);\n const publishedVariantId = publishedVariantIdFor(publishedSelection, productSlice?.id ?? null);\n const activeVariantId = publishedVariantId ?? selectedVariantId;\n\n if (activeVariantId) {\n return (\n <Suspense fallback={null}>\n <HotDataProvider\n query={variantQuery}\n variables={{ id: activeVariantId }}\n field=\"node\"\n fallbackData={productSlice}\n >\n <PricingProvider fallbackProductSlice={productSlice} currency={currency} locale={locale} {...props}>\n {children}\n </PricingProvider>\n </HotDataProvider>\n </Suspense>\n );\n }\n\n const transformed = productSlice ? transformPricingData(productSlice) : null;\n\n return (\n <PricingView transformed={transformed} currency={currency} locale={locale} {...props}>\n {children}\n </PricingView>\n );\n}\n\n/**\n * What `PricingRoot` hands its inner views: the container props plus the locale and currency it read\n * from the storefront context. They are internal parameters, not a public prop — `PricingRootProps`\n * no longer carries either.\n */\ntype PricingViewBaseProps = ComponentPropsWithRef<'div'> & {\n currency?: string;\n locale?: string;\n};\n\ntype PricingProviderProps = PricingViewBaseProps & {\n fallbackProductSlice: RawPricingData | null;\n};\n\n// Reads the override written by the nested HotDataProvider: a Variant node when the variant fetch\n// succeeds, or the product slice (fallbackData) on error/null. Dispatch on __typename and always\n// source the product path from the explicit fallback prop so a mis-passed Product node id can never\n// crash the variant transform.\nfunction PricingProvider({ fallbackProductSlice, ...viewProps }: PricingProviderProps) {\n const override = useDataOverride<unknown>(null);\n const overrideTypename = (override as { __typename?: string } | null)?.__typename;\n\n let transformed: NormalizedPricingOffer | null = null;\n if (overrideTypename === 'Variant') {\n transformed = transformVariantPricingData(override as VariantSlice);\n } else if (fallbackProductSlice) {\n transformed = transformPricingData(fallbackProductSlice);\n }\n\n return <PricingView transformed={transformed} {...viewProps} />;\n}\n\ntype PricingViewProps = PricingViewBaseProps & {\n transformed: NormalizedPricingOffer | null;\n};\n\nfunction PricingView({\n transformed,\n currency: currencyProp,\n locale: localeProp,\n className,\n children,\n ...props\n}: PricingViewProps) {\n let contextValue: PricingContextValue = null;\n\n if (transformed) {\n const { price, listPrice, spotPrice, installmentPlans, discountHighlights, promotions } = transformed;\n // `PricingRoot` always hands these down from the context; the offer's own currency is the same\n // channel's by construction, so it is a fallback only for a directly-rendered view.\n const currency = currencyProp ?? transformed.currency;\n // `PricingRoot` always supplies it from the context; a directly-rendered view falls back to the\n // platform default rather than a Brazilian one.\n const locale = localeProp;\n const hasDiscount = listPrice > price;\n const hasSpotDiscount = spotPrice < price;\n const discountPercentage = hasDiscount ? Math.round(((listPrice - price) / listPrice) * 100) : 0;\n const spotDiscountPercentage = hasSpotDiscount ? Math.round(((price - spotPrice) / price) * 100) : 0;\n const bestInstallment = findBestInstallment(installmentPlans);\n\n contextValue = {\n price,\n listPrice,\n spotPrice,\n currency,\n locale,\n installmentPlans,\n discountHighlights,\n promotions,\n hasDiscount,\n hasSpotDiscount,\n discountPercentage,\n spotDiscountPercentage,\n bestInstallment,\n };\n }\n\n return (\n <PricingContext value={contextValue}>\n <div {...props} className={className} data-fs-pricing=\"\">\n {children}\n </div>\n </PricingContext>\n );\n}\n\nexport function PricingSellingPrice({ className, children, ...props }: PricingSellingPriceProps) {\n const ctx = usePricing();\n if (!ctx) return null;\n\n const formatted = formatPrice(ctx.price, ctx.locale, ctx.currency);\n\n return (\n <span {...props} className={className} data-fs-pricing-selling-price=\"\">\n {children ?? formatted}\n </span>\n );\n}\n\nexport function PricingListPrice({ className, children, ...props }: PricingListPriceProps) {\n const ctx = usePricing();\n if (!ctx || !ctx.hasDiscount) return null;\n\n const formatted = formatPrice(ctx.listPrice, ctx.locale, ctx.currency);\n\n return (\n <span {...props} className={className} data-fs-pricing-list-price=\"\">\n {children ?? formatted}\n </span>\n );\n}\n\nexport function PricingSpotPrice({ className, children, ...props }: PricingSpotPriceProps) {\n const ctx = usePricing();\n if (!ctx || !ctx.hasSpotDiscount) return null;\n\n const formatted = formatPrice(ctx.spotPrice, ctx.locale, ctx.currency);\n\n return (\n <span {...props} className={className} data-fs-pricing-spot-price=\"\">\n {children ?? formatted}\n </span>\n );\n}\n\nexport function PricingInstallments({ className, children, ...props }: PricingInstallmentsProps) {\n const ctx = usePricing();\n if (!ctx || !ctx.bestInstallment) return null;\n\n return (\n <InstallmentItemContext value={ctx.bestInstallment}>\n <div {...props} className={className} data-fs-pricing-installments=\"\">\n {children}\n </div>\n </InstallmentItemContext>\n );\n}\n\nexport function PricingInstallmentPlans({ className, children, ...props }: PricingInstallmentPlansProps) {\n const ctx = usePricing();\n if (!ctx || ctx.installmentPlans.length === 0) return null;\n\n const sortedPlans = ctx.installmentPlans\n .map((plan) => ({ plan, bestInstallment: findBestInstallment([plan]) }))\n .sort((a, b) => {\n const aCount = a.bestInstallment?.count ?? Number.POSITIVE_INFINITY;\n const bCount = b.bestInstallment?.count ?? Number.POSITIVE_INFINITY;\n return aCount - bCount;\n });\n\n return (\n <div {...props} className={className} data-fs-pricing-installment-plans=\"\">\n {sortedPlans.map(({ plan, bestInstallment }, index) => (\n <InstallmentPlanItemContext\n key={`${plan.paymentType}-${plan.paymentMethod}-${index}`}\n value={{\n paymentMethod: plan.paymentMethod,\n paymentType: plan.paymentType,\n installments: plan.installments,\n bestInstallment,\n }}\n >\n {children}\n </InstallmentPlanItemContext>\n ))}\n </div>\n );\n}\n\nexport function PricingInstallmentPlan({ className, children, ...props }: PricingInstallmentPlanProps) {\n const plan = useInstallmentPlanItem();\n if (!plan.bestInstallment) return null;\n\n return (\n <InstallmentItemContext value={plan.bestInstallment}>\n <div\n {...props}\n className={className}\n data-fs-pricing-installment-plan=\"\"\n data-fs-pricing-installment-plan-type={plan.paymentType}\n >\n {children}\n </div>\n </InstallmentItemContext>\n );\n}\n\nexport function PricingInstallmentsForPlan({ className, children, ...props }: PricingInstallmentsForPlanProps) {\n const plan = useInstallmentPlanItem('PricingInstallmentsForPlan', 'PricingInstallmentPlan');\n if (plan.installments.length === 0) return null;\n\n return (\n <div {...props} className={className} data-fs-pricing-installments-for-plan=\"\">\n {plan.installments.map((installment, index) => (\n <InstallmentItemContext key={`${installment.count}-${index}`} value={installment}>\n {children}\n </InstallmentItemContext>\n ))}\n </div>\n );\n}\n\nexport function PricingPaymentMethodsTrigger({ className, children, ...props }: PricingPaymentMethodsTriggerProps) {\n return (\n <PopoverTrigger {...props} className={className} data-fs-pricing-payment-methods-trigger=\"\">\n {children}\n </PopoverTrigger>\n );\n}\n\nexport function PricingPaymentMethodsList({ className, children, ...props }: PricingPaymentMethodsListProps) {\n const ctx = usePricing();\n if (!ctx || ctx.installmentPlans.length === 0) return null;\n\n return (\n <div {...props} className={className} data-fs-pricing-payment-methods-list=\"\">\n <PricingInstallmentPlans>{children}</PricingInstallmentPlans>\n </div>\n );\n}\n\nfunction sortPlansForTabs(plans: InstallmentPlanData[]) {\n return plans\n .map((plan) => ({\n plan,\n bestInstallment: findBestInstallment([plan]),\n tabValue: `${plan.paymentType}-${plan.paymentMethod}`,\n }))\n .sort((a, b) => {\n const aCount = a.bestInstallment?.count ?? Number.POSITIVE_INFINITY;\n const bCount = b.bestInstallment?.count ?? Number.POSITIVE_INFINITY;\n return aCount - bCount;\n });\n}\n\nexport function PricingPaymentMethodsTabList({ className, children, ...props }: PricingPaymentMethodsTabListProps) {\n const ctx = usePricing();\n if (!ctx || ctx.installmentPlans.length === 0) return null;\n\n return (\n <div {...props} className={className} data-fs-pricing-payment-methods-tab-list=\"\">\n {sortPlansForTabs(ctx.installmentPlans).map(({ plan, bestInstallment, tabValue }) => (\n <InstallmentPlanItemContext\n key={tabValue}\n value={{\n paymentMethod: plan.paymentMethod,\n paymentType: plan.paymentType,\n installments: plan.installments,\n bestInstallment,\n }}\n >\n <TabsTab value={tabValue}>{children}</TabsTab>\n </InstallmentPlanItemContext>\n ))}\n </div>\n );\n}\n\nexport function PricingPaymentMethodsTabPanels({ className, children, ...props }: PricingPaymentMethodsTabPanelsProps) {\n const ctx = usePricing();\n if (!ctx || ctx.installmentPlans.length === 0) return null;\n\n return (\n <div {...props} className={className} data-fs-pricing-payment-methods-tab-panels=\"\">\n {sortPlansForTabs(ctx.installmentPlans).map(({ plan, bestInstallment, tabValue }) => (\n <InstallmentPlanItemContext\n key={tabValue}\n value={{\n paymentMethod: plan.paymentMethod,\n paymentType: plan.paymentType,\n installments: plan.installments,\n bestInstallment,\n }}\n >\n <TabsPanel value={tabValue}>{children}</TabsPanel>\n </InstallmentPlanItemContext>\n ))}\n </div>\n );\n}\n\nexport function PricingPaymentMethodName({ className, children, ...props }: PricingPaymentMethodNameProps) {\n const plan = useInstallmentPlanItem();\n\n return (\n <span {...props} className={className} data-fs-pricing-payment-method-name=\"\">\n {children ?? plan.paymentMethod}\n </span>\n );\n}\n\nexport function PricingInstallment({\n template = '{count}x de {value}',\n interestFreeLabel = 'sem juros',\n className,\n children,\n ...props\n}: PricingInstallmentProps) {\n const installment = useInstallmentItem();\n const ctx = usePricing();\n if (!ctx) return null;\n\n const formattedValue = formatPrice(installment.value, ctx.locale, ctx.currency);\n const base = template.replace('{count}', String(installment.count)).replace('{value}', formattedValue);\n const text = installment.interestFree && interestFreeLabel ? `${base} ${interestFreeLabel}` : base;\n\n return (\n <span {...props} className={className} data-fs-pricing-installment=\"\">\n {children ?? text}\n </span>\n );\n}\n\nexport function PricingDiscount({\n template,\n format = 'percentage',\n className,\n children,\n ...props\n}: PricingDiscountProps) {\n const ctx = usePricing();\n if (!ctx || !ctx.hasDiscount) return null;\n\n const amount = ctx.listPrice - ctx.price;\n const formattedAmount = formatPrice(amount, ctx.locale, ctx.currency);\n const resolvedTemplate = template ?? (format === 'absolute' ? '-{amount}' : '-{percentage}%');\n const text = resolvedTemplate\n .replaceAll('{percentage}', String(ctx.discountPercentage))\n .replaceAll('{amount}', formattedAmount);\n\n return (\n <span {...props} className={className} data-fs-pricing-discount=\"\">\n {children ?? text}\n </span>\n );\n}\n\nexport function PricingSpotDiscount({\n template = '-{percentage}%',\n className,\n children,\n ...props\n}: PricingSpotDiscountProps) {\n const ctx = usePricing();\n if (!ctx || ctx.spotDiscountPercentage <= 0) return null;\n\n const text = template.replace('{percentage}', String(ctx.spotDiscountPercentage));\n\n return (\n <span {...props} className={className} data-fs-pricing-spot-discount=\"\">\n {children ?? text}\n </span>\n );\n}\n\nexport function PricingHighlights({ className, children, ...props }: PricingHighlightsProps) {\n const ctx = usePricing();\n if (!ctx || ctx.discountHighlights.length === 0) return null;\n\n return (\n <div {...props} className={className} data-fs-pricing-highlights=\"\">\n {ctx.discountHighlights.map((highlight, index) => (\n <HighlightItemContext key={`${highlight}-${index}`} value={highlight}>\n {children}\n </HighlightItemContext>\n ))}\n </div>\n );\n}\n\nexport function PricingHighlight({ className, children, ...props }: PricingHighlightProps) {\n const highlight = useHighlightItem();\n\n return (\n <span {...props} className={className} data-fs-pricing-highlight=\"\">\n {children ?? highlight}\n </span>\n );\n}\n\nexport function PricingPromotions({ className, children, ...props }: PricingPromotionsProps) {\n const ctx = usePricing();\n if (!ctx || ctx.promotions.length === 0) return null;\n\n return (\n <div {...props} className={className} data-fs-pricing-promotions=\"\">\n {ctx.promotions.map((promotion, index) => (\n <PromotionItemContext key={`${promotion.name}-${index}`} value={promotion}>\n {children}\n </PromotionItemContext>\n ))}\n </div>\n );\n}\n\nexport function PricingPromotion({ template = '{name}', className, children, ...props }: PricingPromotionProps) {\n const promotion = usePromotionItem();\n const text = template.replace('{name}', promotion.name);\n\n return (\n <span {...props} className={className} data-fs-pricing-promotion=\"\">\n {children ?? text}\n </span>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Skeleton\n// ---------------------------------------------------------------------------\n\nexport function PricingSkeleton({ className, ...props }: ComponentPropsWithRef<'div'>) {\n return (\n <div {...props} className={className} data-fs-pricing-skeleton=\"\" aria-hidden=\"true\">\n <span data-fs-pricing-skeleton-line=\"\" />\n <span data-fs-pricing-skeleton-line=\"\" />\n </div>\n );\n}\n\nPricingRoot.Skeleton = PricingSkeleton;\n\n// ---------------------------------------------------------------------------\n// Namespace export\n// ---------------------------------------------------------------------------\n\nexport const Pricing = {\n Root: PricingRoot,\n SellingPrice: PricingSellingPrice,\n ListPrice: PricingListPrice,\n SpotPrice: PricingSpotPrice,\n Installments: PricingInstallments,\n InstallmentPlans: PricingInstallmentPlans,\n InstallmentPlan: PricingInstallmentPlan,\n InstallmentsForPlan: PricingInstallmentsForPlan,\n Installment: PricingInstallment,\n PaymentMethodsTrigger: PricingPaymentMethodsTrigger,\n PaymentMethodsList: PricingPaymentMethodsList,\n PaymentMethodsTabList: PricingPaymentMethodsTabList,\n PaymentMethodsTabPanels: PricingPaymentMethodsTabPanels,\n PaymentMethodName: PricingPaymentMethodName,\n Discount: PricingDiscount,\n SpotDiscount: PricingSpotDiscount,\n Highlights: PricingHighlights,\n Highlight: PricingHighlight,\n Promotions: PricingPromotions,\n Promotion: PricingPromotion,\n Skeleton: PricingSkeleton,\n};\n"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAM,WAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCN,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BhC;AAED,MAAM,eAAe,QAAQ;;;;;;;;;CAS5B;AA+GD,MAAM,wBAAwB,OAAO,qBAAqB;AA6D1D,MAAM,iBAAiB,cAAkE,qBAAqB;AAE9G,MAAM,yBAAyB,cAAsC,IAAI;AAEzE,MAAM,6BAA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,UAAA,CACE,oBAAC,QAAD,EAAM,iCAA8B,GAAI,CAAA,GACxC,oBAAC,QAAD,EAAM,iCAA8B,GAAI,CAAA,CACrC;;AAET;AAEA,YAAY,WAAW;AAMvB,MAAa,UAAU;CACrB,MAAM;CACN,cAAc;CACd,WAAW;CACX,WAAW;CACX,cAAc;CACd,kBAAkB;CAClB,iBAAiB;CACjB,qBAAqB;CACrB,aAAa;CACb,uBAAuB;CACvB,oBAAoB;CACpB,uBAAuB;CACvB,yBAAyB;CACzB,mBAAmB;CACnB,UAAU;CACV,cAAc;CACd,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,WAAW;CACX,UAAU;AACZ"}
1
+ {"version":3,"file":"pricing.js","names":[],"sources":["../../../src/matter/pricing/pricing.tsx"],"sourcesContent":["'use client';\n\nimport { useReactiveVar } from '@apollo/client/react';\nimport { type ContentValue, defineComponent, defineContentType, type MessageLocaleProp } from '@vtex/fs-core';\nimport type { ComponentPropsWithRef } from 'react';\nimport { createContext, Suspense, useContext } from 'react';\nimport { PopoverTrigger } from '../../particles/popover/popover.js';\nimport { TabsPanel, TabsTab } from '../../particles/tabs/tabs.js';\nimport { useStorefrontContext } from '../../sdk/context/storefront-context.js';\nimport { useDataOverride } from '../../sdk/data/data-override-context.js';\nimport { HotDataProvider } from '../../sdk/data/hot-data-provider.js';\nimport { graphql } from '../../sdk/generated/gql.js';\nimport type { VariantPricingDataFragment } from '../../sdk/generated/graphql.js';\nimport { useMessageFormatter } from '../../sdk/i18n/use-message-formatter.js';\nimport { resolveDefaultSeller } from '../../sdk/seller.js';\nimport { publishedVariantIdFor, selectedVariantVar } from '../../sdk/state/variant-selector.js';\n\n// ---------------------------------------------------------------------------\n// GraphQL Fragment\n// ---------------------------------------------------------------------------\n\nconst fragment = /* GraphQL */ `\n fragment PricingData on Query {\n productBySlug(slug: $slug) {\n __typename\n id\n variants(first: 1) {\n edges {\n node {\n sellers {\n isDefault\n offer {\n price { amount currencyCode }\n listPrice { amount currencyCode }\n spotPrice { amount currencyCode }\n installmentPlans {\n paymentMethod\n paymentType\n installments {\n count\n value { amount currencyCode }\n totalAmount { amount currencyCode }\n interestRate\n interestFree\n }\n }\n discountHighlights\n promotions {\n name\n }\n }\n }\n }\n }\n }\n }\n }\n`;\n\n// The variant offer slice, authored via graphql() so HotDataProvider gets a TypedDocumentNode.\n// Declared so codegen scans the source and emits VariantPricingDataFragment; the fragment is spread\n// into variantQuery at the GraphQL layer, so the variable is unused at runtime.\nconst _variantFragment = graphql(`\n fragment VariantPricingData on Variant {\n __typename\n id\n sellers {\n isDefault\n offer {\n price { amount currencyCode }\n listPrice { amount currencyCode }\n spotPrice { amount currencyCode }\n installmentPlans {\n paymentMethod\n paymentType\n installments {\n count\n value { amount currencyCode }\n totalAmount { amount currencyCode }\n interestRate\n interestFree\n }\n }\n discountHighlights\n promotions {\n name\n }\n }\n }\n }\n`);\n\nconst variantQuery = graphql(`\n query VariantPricingQuery($id: ID!) {\n node(id: $id) {\n __typename\n ... on Variant {\n ...VariantPricingData\n }\n }\n }\n`);\n\n// ---------------------------------------------------------------------------\n// Raw data types (shape of the fragment result)\n// ---------------------------------------------------------------------------\n\ntype MoneyValue = {\n amount: number;\n currencyCode: string;\n};\n\ntype RawPromotion = {\n name: string;\n};\n\ntype RawOffer = {\n price: MoneyValue;\n listPrice: MoneyValue;\n spotPrice: MoneyValue;\n installmentPlans: Array<{\n paymentMethod: string;\n paymentType: string;\n installments: Array<{\n count: number;\n value: MoneyValue;\n totalAmount: MoneyValue;\n interestRate: number;\n interestFree: boolean;\n }>;\n }>;\n discountHighlights: string[];\n promotions: RawPromotion[];\n};\n\ntype RawPricingData = {\n // __typename/id are optional so existing fixtures (which omit them) still typecheck; the real\n // page query always supplies id, which scopes the published variant selection to this product.\n __typename?: string;\n id?: string;\n variants: {\n edges: Array<{\n node: {\n sellers: Array<{\n isDefault: boolean;\n offer: RawOffer | null;\n }>;\n };\n }>;\n };\n};\n\ntype VariantSlice = VariantPricingDataFragment;\n\ntype NormalizedPricingOffer = {\n price: number;\n listPrice: number;\n spotPrice: number;\n currency: string;\n installmentPlans: InstallmentPlanData[];\n discountHighlights: string[];\n promotions: PromotionData[];\n};\n\n// ---------------------------------------------------------------------------\n// Content model\n// ---------------------------------------------------------------------------\n\nexport const PricingInstallmentContent = defineContentType({\n id: 'pricing-installment',\n title: 'Pricing Installment',\n description: 'Text of an installment line.',\n schema: {\n type: 'object',\n additionalProperties: false,\n properties: {\n template: {\n type: 'string',\n title: 'Installment',\n format: 'icu-message',\n messageSource: '{count}x of {value}',\n messageArguments: {\n type: 'object',\n properties: { count: { type: 'integer' }, value: { type: 'string' } },\n },\n messageExample: { count: 10, value: '$19.90' },\n },\n interestFreeLabel: {\n type: 'string',\n title: 'Interest-free label',\n format: 'icu-message',\n messageSource: 'interest-free',\n },\n },\n },\n});\n\nexport const PricingDiscountContent = defineContentType({\n id: 'pricing-discount',\n title: 'Pricing Discount',\n description: 'Text of the list-price discount badge.',\n schema: {\n type: 'object',\n additionalProperties: false,\n properties: {\n percentageTemplate: {\n type: 'string',\n title: 'Percentage discount',\n format: 'icu-message',\n messageSource: '-{percentage}%',\n messageArguments: { type: 'object', properties: { percentage: { type: 'integer' } } },\n messageExample: { percentage: 25 },\n },\n amountTemplate: {\n type: 'string',\n title: 'Amount discount',\n format: 'icu-message',\n messageSource: '-{amount}',\n messageArguments: { type: 'object', properties: { amount: { type: 'string' } } },\n messageExample: { amount: '$10.00' },\n },\n },\n },\n});\n\nexport const PricingSpotDiscountContent = defineContentType({\n id: 'pricing-spot-discount',\n title: 'Pricing Spot Discount',\n description: 'Text of the spot-price discount badge.',\n schema: {\n type: 'object',\n additionalProperties: false,\n properties: {\n template: {\n type: 'string',\n title: 'Spot discount',\n format: 'icu-message',\n messageSource: '-{percentage}%',\n messageArguments: { type: 'object', properties: { percentage: { type: 'integer' } } },\n messageExample: { percentage: 10 },\n },\n },\n },\n});\n\nexport const PricingPromotionContent = defineContentType({\n id: 'pricing-promotion',\n title: 'Pricing Promotion',\n description: 'Text of a promotion line.',\n schema: {\n type: 'object',\n additionalProperties: false,\n properties: {\n template: {\n type: 'string',\n title: 'Promotion',\n format: 'icu-message',\n messageSource: '{name}',\n messageArguments: { type: 'object', properties: { name: { type: 'string' } } },\n messageExample: { name: 'Buy 3, get 2' },\n },\n },\n },\n});\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\ntype InstallmentData = {\n count: number;\n value: number;\n totalAmount: number;\n interestRate: number;\n interestFree: boolean;\n};\n\ntype InstallmentPlanData = {\n paymentMethod: string;\n paymentType: string;\n installments: InstallmentData[];\n};\n\ntype PromotionData = {\n name: string;\n};\n\ntype PricingContextData = {\n price: number;\n listPrice: number;\n spotPrice: number;\n currency: string;\n /** Undefined only for a directly-rendered view: `Intl` reads it as the platform default. */\n locale: string | undefined;\n installmentPlans: InstallmentPlanData[];\n discountHighlights: string[];\n promotions: PromotionData[];\n hasDiscount: boolean;\n hasSpotDiscount: boolean;\n discountPercentage: number;\n spotDiscountPercentage: number;\n bestInstallment: InstallmentData | null;\n};\n\ntype PricingContextValue = PricingContextData | null;\n\ntype InstallmentPlanItemContextData = {\n paymentMethod: string;\n paymentType: string;\n installments: InstallmentData[];\n bestInstallment: InstallmentData | null;\n};\n\nconst PRICING_CONTEXT_UNSET = Symbol('PricingContextUnset');\n\nexport type PricingRootProps = ComponentPropsWithRef<'div'> & {\n $data?: RawPricingData | null;\n /** Page-supplied viewed SKU; pre-selects the offer on first paint. A published swatch selection\n * wins over it once the shopper interacts. */\n selectedVariantId?: string;\n};\n\nexport type PricingSellingPriceProps = ComponentPropsWithRef<'span'>;\n\nexport type PricingListPriceProps = ComponentPropsWithRef<'span'>;\n\nexport type PricingSpotPriceProps = ComponentPropsWithRef<'span'>;\n\nexport type PricingInstallmentsProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingInstallmentPlansProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingInstallmentPlanProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingInstallmentsForPlanProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingPaymentMethodsTriggerProps = ComponentPropsWithRef<'button'>;\n\nexport type PricingPaymentMethodsListProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingPaymentMethodsTabListProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingPaymentMethodsTabPanelsProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingPaymentMethodNameProps = ComponentPropsWithRef<'span'>;\n\nexport type PricingInstallmentProps = ComponentPropsWithRef<'span'> &\n MessageLocaleProp & {\n $content?: ContentValue<typeof PricingInstallmentContent>;\n };\n\nexport type PricingDiscountProps = ComponentPropsWithRef<'span'> &\n MessageLocaleProp & {\n format?: 'percentage' | 'absolute';\n $content?: ContentValue<typeof PricingDiscountContent>;\n };\n\nexport type PricingHighlightsProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingHighlightProps = ComponentPropsWithRef<'span'>;\n\nexport type PricingPromotionsProps = ComponentPropsWithRef<'div'>;\n\nexport type PricingPromotionProps = ComponentPropsWithRef<'span'> &\n MessageLocaleProp & {\n $content?: ContentValue<typeof PricingPromotionContent>;\n };\n\nexport type PricingSpotDiscountProps = ComponentPropsWithRef<'span'> &\n MessageLocaleProp & {\n $content?: ContentValue<typeof PricingSpotDiscountContent>;\n };\n\n// ---------------------------------------------------------------------------\n// Context\n// ---------------------------------------------------------------------------\n\nconst PricingContext = createContext<PricingContextValue | typeof PRICING_CONTEXT_UNSET>(PRICING_CONTEXT_UNSET);\n\nconst InstallmentItemContext = createContext<InstallmentData | null>(null);\n\nconst InstallmentPlanItemContext = createContext<InstallmentPlanItemContextData | null>(null);\n\nconst HighlightItemContext = createContext<string | null>(null);\n\nconst PromotionItemContext = createContext<PromotionData | null>(null);\n\nfunction usePricing(): PricingContextValue {\n const ctx = useContext(PricingContext);\n if (ctx === PRICING_CONTEXT_UNSET) {\n throw new Error('Pricing components must be used inside PricingRoot.');\n }\n return ctx;\n}\n\nfunction useInstallmentItem(): InstallmentData {\n const ctx = useContext(InstallmentItemContext);\n if (!ctx) {\n throw new Error('PricingInstallment must be used inside PricingInstallments.');\n }\n return ctx;\n}\n\nexport function useInstallmentPlanItem(\n caller = 'PricingInstallmentPlan',\n parent = 'PricingInstallmentPlans',\n): InstallmentPlanItemContextData {\n const ctx = useContext(InstallmentPlanItemContext);\n if (!ctx) {\n throw new Error(`${caller} must be used inside ${parent}.`);\n }\n return ctx;\n}\n\nfunction useHighlightItem(): string {\n const ctx = useContext(HighlightItemContext);\n if (ctx === null) {\n throw new Error('PricingHighlight must be used inside PricingHighlights.');\n }\n return ctx;\n}\n\nfunction usePromotionItem(): PromotionData {\n const ctx = useContext(PromotionItemContext);\n if (!ctx) {\n throw new Error('PricingPromotion must be used inside PricingPromotions.');\n }\n return ctx;\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction formatPrice(value: number, locale: string | undefined, currency: string): string {\n return new Intl.NumberFormat(locale, { style: 'currency', currency }).format(value);\n}\n\nfunction findBestInstallment(plans: InstallmentPlanData[]): InstallmentData | null {\n const allInstallments = plans.flatMap((plan) => plan.installments);\n if (allInstallments.length === 0) return null;\n\n const interestFree = allInstallments.filter((i) => i.interestFree);\n if (interestFree.length > 0) {\n return interestFree.reduce((best, current) => (current.count > best.count ? current : best));\n }\n\n return allInstallments.reduce((best, current) => (current.count > best.count ? current : best));\n}\n\n// ---------------------------------------------------------------------------\n// Transform\n// ---------------------------------------------------------------------------\n\n// The GraphQL `Decimal` scalar is serialized as a string over the wire; convert it here so every\n// later comparison and subtraction works on numbers.\nfunction normalizeOffer(offer: RawOffer): NormalizedPricingOffer {\n return {\n price: Number(offer.price.amount),\n listPrice: Number(offer.listPrice.amount),\n spotPrice: Number(offer.spotPrice.amount),\n currency: offer.price.currencyCode,\n installmentPlans: offer.installmentPlans.map((plan) => ({\n paymentMethod: plan.paymentMethod,\n paymentType: plan.paymentType,\n installments: plan.installments.map((inst) => ({\n count: inst.count,\n value: Number(inst.value.amount),\n totalAmount: Number(inst.totalAmount.amount),\n interestRate: inst.interestRate,\n interestFree: inst.interestFree,\n })),\n })),\n discountHighlights: offer.discountHighlights,\n promotions: offer.promotions.map((promotion) => ({ name: promotion.name })),\n };\n}\n\n// Resolves a variant's default seller and normalizes its offer, or null when that seller has no\n// offer. Shared by the product-level and selected-variant transforms so the default-seller + offer\n// gate lives in one place.\nfunction pricingOfferFromVariant(variant: {\n sellers: readonly { isDefault: boolean; offer: RawOffer | null }[];\n}): NormalizedPricingOffer | null {\n const seller = resolveDefaultSeller(variant.sellers);\n const offer = seller?.offer;\n if (!offer) return null;\n\n return normalizeOffer(offer);\n}\n\nfunction transformPricingData(data: RawPricingData): NormalizedPricingOffer | null {\n const edge = data.variants.edges[0];\n if (!edge) return null;\n\n return pricingOfferFromVariant(edge.node);\n}\n\nexport function transformVariantPricingData(variant: VariantSlice): NormalizedPricingOffer | null {\n // Generated amounts are strings (what the API sends); `RawOffer` still declares numbers. Typing only:\n // the product page comparisons stay as they are (see \"Cart data\" in docs/storefront-core/reference-cart.md).\n return pricingOfferFromVariant(variant as unknown as Parameters<typeof pricingOfferFromVariant>[0]);\n}\n\n// ---------------------------------------------------------------------------\n// Definitions\n// ---------------------------------------------------------------------------\n\nexport const PricingRootDefinition = defineComponent<PricingRootProps>({\n name: 'PricingRoot',\n importPath: '@vtex/faststore/components',\n component: PricingRoot,\n fragment,\n fetchStrategy: 'lazy',\n skeleton: PricingSkeleton,\n editor: { label: 'Pricing', category: 'commerce' },\n schema: {\n selectedVariantId: { type: 'string', label: 'Selected Variant ID' },\n },\n guideline:\n 'Root container for the PDP pricing block; all other Pricing sub-components must be descendants of it. Automatically recomputes the offer when a shopper picks a VariantSelector swatch (it reads the published variant selection); the selectedVariantId prop is an optional pre-selection fallback. Falls back silently to the product-level offer on variant fetch error. See pricing.md.',\n});\n\nexport const PricingSellingPriceDefinition = defineComponent<PricingSellingPriceProps>({\n name: 'PricingSellingPrice',\n importPath: '@vtex/faststore/components',\n component: PricingSellingPrice,\n editor: { label: 'Selling Price', category: 'commerce' },\n schema: {},\n guideline: 'Displays the current selling price; must be a descendant of PricingRoot.',\n});\n\nexport const PricingListPriceDefinition = defineComponent<PricingListPriceProps>({\n name: 'PricingListPrice',\n importPath: '@vtex/faststore/components',\n component: PricingListPrice,\n editor: { label: 'List Price', category: 'commerce' },\n schema: {},\n guideline:\n 'Displays the original (strikethrough) list price; only renders when a discount exists. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingSpotPriceDefinition = defineComponent<PricingSpotPriceProps>({\n name: 'PricingSpotPrice',\n importPath: '@vtex/faststore/components',\n component: PricingSpotPrice,\n editor: { label: 'Spot Price', category: 'commerce' },\n schema: {},\n guideline:\n 'Displays the best cash/instant-payment price (e.g. Pix); only renders when spotPrice is lower than the selling price. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingInstallmentsDefinition = defineComponent<PricingInstallmentsProps>({\n name: 'PricingInstallments',\n importPath: '@vtex/faststore/components',\n component: PricingInstallments,\n editor: { label: 'Installments', category: 'commerce' },\n schema: {},\n guideline:\n 'Shortcut container that exposes the single best installment across all plans; use PricingInstallmentPlans instead when a per-payment-method breakdown is needed. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingInstallmentPlansDefinition = defineComponent<PricingInstallmentPlansProps>({\n name: 'PricingInstallmentPlans',\n importPath: '@vtex/faststore/components',\n component: PricingInstallmentPlans,\n editor: { label: 'Installment Plans', category: 'commerce' },\n schema: {},\n guideline:\n 'Renders one row per payment method; use PricingInstallments instead when only the single best plan is needed. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingInstallmentPlanDefinition = defineComponent<PricingInstallmentPlanProps>({\n name: 'PricingInstallmentPlan',\n importPath: '@vtex/faststore/components',\n component: PricingInstallmentPlan,\n editor: { label: 'Installment Plan', category: 'commerce' },\n schema: {},\n guideline:\n 'Renders a single plan row inside PricingInstallmentPlans; nest PricingInstallmentsForPlan inside it to list every installment tier instead of just the best one. Must be a descendant of PricingInstallmentPlans.',\n});\n\nexport const PricingInstallmentsForPlanDefinition = defineComponent<PricingInstallmentsForPlanProps>({\n name: 'PricingInstallmentsForPlan',\n importPath: '@vtex/faststore/components',\n component: PricingInstallmentsForPlan,\n editor: { label: 'Installments For Plan', category: 'commerce' },\n schema: {},\n guideline:\n 'Iterates every installment tier (1x, 2x, … Nx) of the enclosing plan; must be a descendant of PricingInstallmentPlan.',\n});\n\nexport const PricingPaymentMethodsTriggerDefinition = defineComponent<PricingPaymentMethodsTriggerProps>({\n name: 'PricingPaymentMethodsTrigger',\n importPath: '@vtex/faststore/components',\n component: PricingPaymentMethodsTrigger,\n editor: { label: 'Payment Methods Trigger', category: 'action' },\n schema: {},\n guideline: 'Button that opens the payment-methods disclosure panel; must be a descendant of PopoverRoot.',\n});\n\nexport const PricingPaymentMethodsListDefinition = defineComponent<PricingPaymentMethodsListProps>({\n name: 'PricingPaymentMethodsList',\n importPath: '@vtex/faststore/components',\n component: PricingPaymentMethodsList,\n editor: { label: 'Payment Methods List', category: 'commerce' },\n schema: {},\n guideline:\n 'Flat disclosure panel content listing every payment plan; place inside PopoverPopup, DialogPopup, or DrawerPopup. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingPaymentMethodsTabListDefinition = defineComponent<PricingPaymentMethodsTabListProps>({\n name: 'PricingPaymentMethodsTabList',\n importPath: '@vtex/faststore/components',\n component: PricingPaymentMethodsTabList,\n editor: { label: 'Payment Methods Tab List', category: 'commerce' },\n schema: {},\n guideline:\n 'Emits one tab per payment plan for the tab-grouped disclosure pattern; must be a descendant of TabsList (which is inside TabsRoot). Pair with PricingPaymentMethodsTabPanels.',\n});\n\nexport const PricingPaymentMethodsTabPanelsDefinition = defineComponent<PricingPaymentMethodsTabPanelsProps>({\n name: 'PricingPaymentMethodsTabPanels',\n importPath: '@vtex/faststore/components',\n component: PricingPaymentMethodsTabPanels,\n editor: { label: 'Payment Methods Tab Panels', category: 'commerce' },\n schema: {},\n guideline:\n 'Emits one panel per payment plan for the tab-grouped disclosure pattern; must be a sibling of TabsList under TabsRoot (not nested inside TabsList). Pair with PricingPaymentMethodsTabList.',\n});\n\nexport const PricingPaymentMethodNameDefinition = defineComponent<PricingPaymentMethodNameProps>({\n name: 'PricingPaymentMethodName',\n importPath: '@vtex/faststore/components',\n component: PricingPaymentMethodName,\n editor: { label: 'Payment Method Name', category: 'commerce' },\n schema: {},\n guideline:\n 'Renders the enclosing plan\\'s payment method name (e.g. \"Visa\", \"Pix\"); must be inside a plan context — PricingInstallmentPlan, PricingPaymentMethodsTabList, or PricingPaymentMethodsTabPanels.',\n});\n\nexport const PricingInstallmentDefinition = defineComponent<PricingInstallmentProps>({\n name: 'PricingInstallment',\n importPath: '@vtex/faststore/components',\n component: PricingInstallment,\n content: PricingInstallmentContent,\n editor: { label: 'Installment', category: 'commerce' },\n schema: {},\n guideline:\n 'Renders a single installment line from the $content template (count and value arguments), followed by interestFreeLabel for an interest-free installment. Must be a descendant of PricingInstallments, PricingInstallmentPlan, or PricingInstallmentsForPlan.',\n});\n\nexport const PricingDiscountDefinition = defineComponent<PricingDiscountProps>({\n name: 'PricingDiscount',\n importPath: '@vtex/faststore/components',\n component: PricingDiscount,\n content: PricingDiscountContent,\n editor: { label: 'Discount Badge', category: 'commerce' },\n schema: {\n format: { type: ['percentage', 'absolute'] as const, default: 'percentage', label: 'Discount Format' },\n },\n guideline:\n 'Discount badge for the listPrice-vs-price markdown; use PricingSpotDiscount instead for the spotPrice-vs-price (Pix/cash) percentage. The format prop picks a percentage (-25%, default) or an absolute amount (-R$ 10,00); the $content percentageTemplate (percentage argument) or amountTemplate (amount argument) renders it. Recomputes automatically on swatch change. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingSpotDiscountDefinition = defineComponent<PricingSpotDiscountProps>({\n name: 'PricingSpotDiscount',\n importPath: '@vtex/faststore/components',\n component: PricingSpotDiscount,\n content: PricingSpotDiscountContent,\n editor: { label: 'Spot Discount Badge', category: 'commerce' },\n schema: {},\n guideline:\n 'Discount badge for the spotPrice-vs-price (cash/Pix) percentage; use PricingDiscount instead for the listPrice-vs-price percentage. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingHighlightsDefinition = defineComponent<PricingHighlightsProps>({\n name: 'PricingHighlights',\n importPath: '@vtex/faststore/components',\n component: PricingHighlights,\n editor: { label: 'Highlights', category: 'commerce' },\n schema: {},\n guideline:\n 'Iterates the offer\\'s discount highlight labels (e.g. \"Black Friday\", \"Exclusivo\"); place PricingHighlight as a child. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingHighlightDefinition = defineComponent<PricingHighlightProps>({\n name: 'PricingHighlight',\n importPath: '@vtex/faststore/components',\n component: PricingHighlight,\n editor: { label: 'Highlight', category: 'commerce' },\n schema: {},\n guideline: 'Renders a single highlight label as a span; must be a descendant of PricingHighlights.',\n});\n\nexport const PricingPromotionsDefinition = defineComponent<PricingPromotionsProps>({\n name: 'PricingPromotions',\n importPath: '@vtex/faststore/components',\n component: PricingPromotions,\n editor: { label: 'Promotions', category: 'commerce' },\n schema: {},\n guideline:\n 'Iterates the offer\\'s structured promotions (e.g. \"Compre 3 leve 2\"); place PricingPromotion as a child. Must be a descendant of PricingRoot.',\n});\n\nexport const PricingPromotionDefinition = defineComponent<PricingPromotionProps>({\n name: 'PricingPromotion',\n importPath: '@vtex/faststore/components',\n component: PricingPromotion,\n content: PricingPromotionContent,\n editor: { label: 'Promotion', category: 'commerce' },\n schema: {},\n guideline:\n 'Renders a single promotion from the $content template (name argument). Must be a descendant of PricingPromotions.',\n});\n\n// ---------------------------------------------------------------------------\n// Implementations\n// ---------------------------------------------------------------------------\n\nexport function PricingRoot({ $data: $dataProp, selectedVariantId, children, ...props }: PricingRootProps) {\n const { locale, currency } = useStorefrontContext();\n const productSlice = useDataOverride($dataProp) ?? null;\n\n // The VariantSelector matter publishes the shopper's in-page selection here; reading it lets\n // pricing recompute when a swatch changes without a page navigation. Scope the published selection\n // to this product so a swatch picked on another PDP does not leak in after client-side navigation.\n // The explicit selectedVariantId prop is the pre-selection fallback; the live selection wins.\n const publishedSelection = useReactiveVar(selectedVariantVar);\n const publishedVariantId = publishedVariantIdFor(publishedSelection, productSlice?.id ?? null);\n const activeVariantId = publishedVariantId ?? selectedVariantId;\n\n if (activeVariantId) {\n return (\n <Suspense fallback={null}>\n <HotDataProvider\n query={variantQuery}\n variables={{ id: activeVariantId }}\n field=\"node\"\n fallbackData={productSlice}\n >\n <PricingProvider fallbackProductSlice={productSlice} currency={currency} locale={locale} {...props}>\n {children}\n </PricingProvider>\n </HotDataProvider>\n </Suspense>\n );\n }\n\n const transformed = productSlice ? transformPricingData(productSlice) : null;\n\n return (\n <PricingView transformed={transformed} currency={currency} locale={locale} {...props}>\n {children}\n </PricingView>\n );\n}\n\n/**\n * What `PricingRoot` hands its inner views: the container props plus the locale and currency it read\n * from the storefront context. They are internal parameters, not a public prop — `PricingRootProps`\n * no longer carries either.\n */\ntype PricingViewBaseProps = ComponentPropsWithRef<'div'> & {\n currency?: string;\n locale?: string;\n};\n\ntype PricingProviderProps = PricingViewBaseProps & {\n fallbackProductSlice: RawPricingData | null;\n};\n\n// Reads the override written by the nested HotDataProvider: a Variant node when the variant fetch\n// succeeds, or the product slice (fallbackData) on error/null. Dispatch on __typename and always\n// source the product path from the explicit fallback prop so a mis-passed Product node id can never\n// crash the variant transform.\nfunction PricingProvider({ fallbackProductSlice, ...viewProps }: PricingProviderProps) {\n const override = useDataOverride<unknown>(null);\n const overrideTypename = (override as { __typename?: string } | null)?.__typename;\n\n let transformed: NormalizedPricingOffer | null = null;\n if (overrideTypename === 'Variant') {\n transformed = transformVariantPricingData(override as VariantSlice);\n } else if (fallbackProductSlice) {\n transformed = transformPricingData(fallbackProductSlice);\n }\n\n return <PricingView transformed={transformed} {...viewProps} />;\n}\n\ntype PricingViewProps = PricingViewBaseProps & {\n transformed: NormalizedPricingOffer | null;\n};\n\nfunction PricingView({\n transformed,\n currency: currencyProp,\n locale: localeProp,\n className,\n children,\n ...props\n}: PricingViewProps) {\n let contextValue: PricingContextValue = null;\n\n if (transformed) {\n const { price, listPrice, spotPrice, installmentPlans, discountHighlights, promotions } = transformed;\n // `PricingRoot` always hands these down from the context; the offer's own currency is the same\n // channel's by construction, so it is a fallback only for a directly-rendered view.\n const currency = currencyProp ?? transformed.currency;\n // `PricingRoot` always supplies it from the context; a directly-rendered view falls back to the\n // platform default rather than a Brazilian one.\n const locale = localeProp;\n const hasDiscount = listPrice > price;\n const hasSpotDiscount = spotPrice < price;\n const discountPercentage = hasDiscount ? Math.round(((listPrice - price) / listPrice) * 100) : 0;\n const spotDiscountPercentage = hasSpotDiscount ? Math.round(((price - spotPrice) / price) * 100) : 0;\n const bestInstallment = findBestInstallment(installmentPlans);\n\n contextValue = {\n price,\n listPrice,\n spotPrice,\n currency,\n locale,\n installmentPlans,\n discountHighlights,\n promotions,\n hasDiscount,\n hasSpotDiscount,\n discountPercentage,\n spotDiscountPercentage,\n bestInstallment,\n };\n }\n\n return (\n <PricingContext value={contextValue}>\n <div {...props} className={className} data-fs-pricing=\"\">\n {children}\n </div>\n </PricingContext>\n );\n}\n\nexport function PricingSellingPrice({ className, children, ...props }: PricingSellingPriceProps) {\n const ctx = usePricing();\n if (!ctx) return null;\n\n const formatted = formatPrice(ctx.price, ctx.locale, ctx.currency);\n\n return (\n <span {...props} className={className} data-fs-pricing-selling-price=\"\">\n {children ?? formatted}\n </span>\n );\n}\n\nexport function PricingListPrice({ className, children, ...props }: PricingListPriceProps) {\n const ctx = usePricing();\n if (!ctx || !ctx.hasDiscount) return null;\n\n const formatted = formatPrice(ctx.listPrice, ctx.locale, ctx.currency);\n\n return (\n <span {...props} className={className} data-fs-pricing-list-price=\"\">\n {children ?? formatted}\n </span>\n );\n}\n\nexport function PricingSpotPrice({ className, children, ...props }: PricingSpotPriceProps) {\n const ctx = usePricing();\n if (!ctx || !ctx.hasSpotDiscount) return null;\n\n const formatted = formatPrice(ctx.spotPrice, ctx.locale, ctx.currency);\n\n return (\n <span {...props} className={className} data-fs-pricing-spot-price=\"\">\n {children ?? formatted}\n </span>\n );\n}\n\nexport function PricingInstallments({ className, children, ...props }: PricingInstallmentsProps) {\n const ctx = usePricing();\n if (!ctx || !ctx.bestInstallment) return null;\n\n return (\n <InstallmentItemContext value={ctx.bestInstallment}>\n <div {...props} className={className} data-fs-pricing-installments=\"\">\n {children}\n </div>\n </InstallmentItemContext>\n );\n}\n\nexport function PricingInstallmentPlans({ className, children, ...props }: PricingInstallmentPlansProps) {\n const ctx = usePricing();\n if (!ctx || ctx.installmentPlans.length === 0) return null;\n\n const sortedPlans = ctx.installmentPlans\n .map((plan) => ({ plan, bestInstallment: findBestInstallment([plan]) }))\n .sort((a, b) => {\n const aCount = a.bestInstallment?.count ?? Number.POSITIVE_INFINITY;\n const bCount = b.bestInstallment?.count ?? Number.POSITIVE_INFINITY;\n return aCount - bCount;\n });\n\n return (\n <div {...props} className={className} data-fs-pricing-installment-plans=\"\">\n {sortedPlans.map(({ plan, bestInstallment }, index) => (\n <InstallmentPlanItemContext\n key={`${plan.paymentType}-${plan.paymentMethod}-${index}`}\n value={{\n paymentMethod: plan.paymentMethod,\n paymentType: plan.paymentType,\n installments: plan.installments,\n bestInstallment,\n }}\n >\n {children}\n </InstallmentPlanItemContext>\n ))}\n </div>\n );\n}\n\nexport function PricingInstallmentPlan({ className, children, ...props }: PricingInstallmentPlanProps) {\n const plan = useInstallmentPlanItem();\n if (!plan.bestInstallment) return null;\n\n return (\n <InstallmentItemContext value={plan.bestInstallment}>\n <div\n {...props}\n className={className}\n data-fs-pricing-installment-plan=\"\"\n data-fs-pricing-installment-plan-type={plan.paymentType}\n >\n {children}\n </div>\n </InstallmentItemContext>\n );\n}\n\nexport function PricingInstallmentsForPlan({ className, children, ...props }: PricingInstallmentsForPlanProps) {\n const plan = useInstallmentPlanItem('PricingInstallmentsForPlan', 'PricingInstallmentPlan');\n if (plan.installments.length === 0) return null;\n\n return (\n <div {...props} className={className} data-fs-pricing-installments-for-plan=\"\">\n {plan.installments.map((installment, index) => (\n <InstallmentItemContext key={`${installment.count}-${index}`} value={installment}>\n {children}\n </InstallmentItemContext>\n ))}\n </div>\n );\n}\n\nexport function PricingPaymentMethodsTrigger({ className, children, ...props }: PricingPaymentMethodsTriggerProps) {\n return (\n <PopoverTrigger {...props} className={className} data-fs-pricing-payment-methods-trigger=\"\">\n {children}\n </PopoverTrigger>\n );\n}\n\nexport function PricingPaymentMethodsList({ className, children, ...props }: PricingPaymentMethodsListProps) {\n const ctx = usePricing();\n if (!ctx || ctx.installmentPlans.length === 0) return null;\n\n return (\n <div {...props} className={className} data-fs-pricing-payment-methods-list=\"\">\n <PricingInstallmentPlans>{children}</PricingInstallmentPlans>\n </div>\n );\n}\n\nfunction sortPlansForTabs(plans: InstallmentPlanData[]) {\n return plans\n .map((plan) => ({\n plan,\n bestInstallment: findBestInstallment([plan]),\n tabValue: `${plan.paymentType}-${plan.paymentMethod}`,\n }))\n .sort((a, b) => {\n const aCount = a.bestInstallment?.count ?? Number.POSITIVE_INFINITY;\n const bCount = b.bestInstallment?.count ?? Number.POSITIVE_INFINITY;\n return aCount - bCount;\n });\n}\n\nexport function PricingPaymentMethodsTabList({ className, children, ...props }: PricingPaymentMethodsTabListProps) {\n const ctx = usePricing();\n if (!ctx || ctx.installmentPlans.length === 0) return null;\n\n return (\n <div {...props} className={className} data-fs-pricing-payment-methods-tab-list=\"\">\n {sortPlansForTabs(ctx.installmentPlans).map(({ plan, bestInstallment, tabValue }) => (\n <InstallmentPlanItemContext\n key={tabValue}\n value={{\n paymentMethod: plan.paymentMethod,\n paymentType: plan.paymentType,\n installments: plan.installments,\n bestInstallment,\n }}\n >\n <TabsTab value={tabValue}>{children}</TabsTab>\n </InstallmentPlanItemContext>\n ))}\n </div>\n );\n}\n\nexport function PricingPaymentMethodsTabPanels({ className, children, ...props }: PricingPaymentMethodsTabPanelsProps) {\n const ctx = usePricing();\n if (!ctx || ctx.installmentPlans.length === 0) return null;\n\n return (\n <div {...props} className={className} data-fs-pricing-payment-methods-tab-panels=\"\">\n {sortPlansForTabs(ctx.installmentPlans).map(({ plan, bestInstallment, tabValue }) => (\n <InstallmentPlanItemContext\n key={tabValue}\n value={{\n paymentMethod: plan.paymentMethod,\n paymentType: plan.paymentType,\n installments: plan.installments,\n bestInstallment,\n }}\n >\n <TabsPanel value={tabValue}>{children}</TabsPanel>\n </InstallmentPlanItemContext>\n ))}\n </div>\n );\n}\n\nexport function PricingPaymentMethodName({ className, children, ...props }: PricingPaymentMethodNameProps) {\n const plan = useInstallmentPlanItem();\n\n return (\n <span {...props} className={className} data-fs-pricing-payment-method-name=\"\">\n {children ?? plan.paymentMethod}\n </span>\n );\n}\n\nexport function PricingInstallment({ $content, $locale, className, children, ...props }: PricingInstallmentProps) {\n const installment = useInstallmentItem();\n const ctx = usePricing();\n const { format } = useMessageFormatter(PricingInstallmentContent, $content);\n if (!ctx) return null;\n\n function installmentText(pricing: PricingContextData) {\n const value = formatPrice(installment.value, pricing.locale, pricing.currency);\n const base = format('template', { count: installment.count, value });\n const interestFree = installment.interestFree ? format('interestFreeLabel') : '';\n return interestFree ? `${base} ${interestFree}` : base;\n }\n\n return (\n <span {...props} className={className} data-fs-pricing-installment=\"\">\n {children ?? installmentText(ctx)}\n </span>\n );\n}\n\nexport function PricingDiscount({\n format = 'percentage',\n $content,\n $locale,\n className,\n children,\n ...props\n}: PricingDiscountProps) {\n const ctx = usePricing();\n const messages = useMessageFormatter(PricingDiscountContent, $content);\n if (!ctx || !ctx.hasDiscount) return null;\n\n function discountText(pricing: PricingContextData) {\n if (format === 'absolute') {\n const amount = formatPrice(pricing.listPrice - pricing.price, pricing.locale, pricing.currency);\n return messages.format('amountTemplate', { amount });\n }\n return messages.format('percentageTemplate', { percentage: pricing.discountPercentage });\n }\n\n return (\n <span {...props} className={className} data-fs-pricing-discount=\"\">\n {children ?? discountText(ctx)}\n </span>\n );\n}\n\nexport function PricingSpotDiscount({ $content, $locale, className, children, ...props }: PricingSpotDiscountProps) {\n const ctx = usePricing();\n const { format } = useMessageFormatter(PricingSpotDiscountContent, $content);\n if (!ctx || ctx.spotDiscountPercentage <= 0) return null;\n\n return (\n <span {...props} className={className} data-fs-pricing-spot-discount=\"\">\n {children ?? format('template', { percentage: ctx.spotDiscountPercentage })}\n </span>\n );\n}\n\nexport function PricingHighlights({ className, children, ...props }: PricingHighlightsProps) {\n const ctx = usePricing();\n if (!ctx || ctx.discountHighlights.length === 0) return null;\n\n return (\n <div {...props} className={className} data-fs-pricing-highlights=\"\">\n {ctx.discountHighlights.map((highlight, index) => (\n <HighlightItemContext key={`${highlight}-${index}`} value={highlight}>\n {children}\n </HighlightItemContext>\n ))}\n </div>\n );\n}\n\nexport function PricingHighlight({ className, children, ...props }: PricingHighlightProps) {\n const highlight = useHighlightItem();\n\n return (\n <span {...props} className={className} data-fs-pricing-highlight=\"\">\n {children ?? highlight}\n </span>\n );\n}\n\nexport function PricingPromotions({ className, children, ...props }: PricingPromotionsProps) {\n const ctx = usePricing();\n if (!ctx || ctx.promotions.length === 0) return null;\n\n return (\n <div {...props} className={className} data-fs-pricing-promotions=\"\">\n {ctx.promotions.map((promotion, index) => (\n <PromotionItemContext key={`${promotion.name}-${index}`} value={promotion}>\n {children}\n </PromotionItemContext>\n ))}\n </div>\n );\n}\n\nexport function PricingPromotion({ $content, $locale, className, children, ...props }: PricingPromotionProps) {\n const promotion = usePromotionItem();\n const { format } = useMessageFormatter(PricingPromotionContent, $content);\n\n return (\n <span {...props} className={className} data-fs-pricing-promotion=\"\">\n {children ?? format('template', { name: promotion.name })}\n </span>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Skeleton\n// ---------------------------------------------------------------------------\n\nexport function PricingSkeleton({ className, ...props }: ComponentPropsWithRef<'div'>) {\n return (\n <div {...props} className={className} data-fs-pricing-skeleton=\"\" aria-hidden=\"true\">\n <span data-fs-pricing-skeleton-line=\"\" />\n <span data-fs-pricing-skeleton-line=\"\" />\n </div>\n );\n}\n\nPricingRoot.Skeleton = PricingSkeleton;\n\n// ---------------------------------------------------------------------------\n// Namespace export\n// ---------------------------------------------------------------------------\n\nexport const Pricing = {\n Root: PricingRoot,\n SellingPrice: PricingSellingPrice,\n ListPrice: PricingListPrice,\n SpotPrice: PricingSpotPrice,\n Installments: PricingInstallments,\n InstallmentPlans: PricingInstallmentPlans,\n InstallmentPlan: PricingInstallmentPlan,\n InstallmentsForPlan: PricingInstallmentsForPlan,\n Installment: PricingInstallment,\n PaymentMethodsTrigger: PricingPaymentMethodsTrigger,\n PaymentMethodsList: PricingPaymentMethodsList,\n PaymentMethodsTabList: PricingPaymentMethodsTabList,\n PaymentMethodsTabPanels: PricingPaymentMethodsTabPanels,\n PaymentMethodName: PricingPaymentMethodName,\n Discount: PricingDiscount,\n SpotDiscount: PricingSpotDiscount,\n Highlights: PricingHighlights,\n Highlight: PricingHighlight,\n Promotions: PricingPromotions,\n Promotion: PricingPromotion,\n Skeleton: PricingSkeleton,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAqBA,MAAM,WAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCN,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BhC;AAED,MAAM,eAAe,QAAQ;;;;;;;;;CAS5B;AAmED,MAAa,4BAA4B,kBAAkB;CACzD,IAAI;CACJ,OAAO;CACP,aAAa;CACb,QAAQ;EACN,MAAM;EACN,sBAAsB;EACtB,YAAY;GACV,UAAU;IACR,MAAM;IACN,OAAO;IACP,QAAQ;IACR,eAAe;IACf,kBAAkB;KAChB,MAAM;KACN,YAAY;MAAE,OAAO,EAAE,MAAM,UAAU;MAAG,OAAO,EAAE,MAAM,SAAS;KAAE;IACtE;IACA,gBAAgB;KAAE,OAAO;KAAI,OAAO;IAAS;GAC/C;GACA,mBAAmB;IACjB,MAAM;IACN,OAAO;IACP,QAAQ;IACR,eAAe;GACjB;EACF;CACF;AACF,CAAC;AAED,MAAa,yBAAy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