@vtex/faststore 0.0.10 → 0.0.12

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 (509) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +0 -1
  3. package/dist/_virtual/_rolldown/runtime.js +4 -0
  4. package/dist/actions.json +6 -1
  5. package/dist/catalog.json +789 -1701
  6. package/dist/cli/index.d.ts +66 -28
  7. package/dist/cli/index.js +7371 -512
  8. package/dist/cli/index.js.map +1 -1
  9. package/dist/cli/server-runtime.js +41 -60
  10. package/dist/cli/server-runtime.js.map +1 -1
  11. package/dist/client.d.ts +3 -3
  12. package/dist/client.js +2 -2
  13. package/dist/components.d.ts +63 -57
  14. package/dist/components.js +60 -54
  15. package/dist/content-types.json +5785 -754
  16. package/dist/core/dist/define-component.d.ts +1 -1
  17. package/dist/core/dist/define-content-type.d.ts +50 -2
  18. package/dist/core/dist/define-content-type.js +107 -3
  19. package/dist/core/dist/define-content-type.js.map +1 -1
  20. package/dist/core/dist/index.d.ts +2 -2
  21. package/dist/docs/access-code-field.md +1 -1
  22. package/dist/docs/access-code-sign-in.md +126 -77
  23. package/dist/docs/account-address-book.md +210 -95
  24. package/dist/docs/account-menu.md +14 -15
  25. package/dist/docs/account-saved-cards.md +44 -39
  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 +5 -2
  30. package/dist/docs/buy-button.md +7 -8
  31. package/dist/docs/card-entry.md +39 -26
  32. package/dist/docs/card-summary.md +18 -8
  33. package/dist/docs/cardholder-document.md +5 -3
  34. package/dist/docs/carousel.md +5 -4
  35. package/dist/docs/cart-destination.md +39 -26
  36. package/dist/docs/cart-item.md +29 -14
  37. package/dist/docs/cart-totalizer.md +7 -5
  38. package/dist/docs/cart.md +135 -41
  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/form.md +54 -18
  50. package/dist/docs/free-shipping-progress.md +6 -5
  51. package/dist/docs/identity-edit.md +8 -2
  52. package/dist/docs/identity-summary.md +18 -5
  53. package/dist/docs/installments.md +46 -32
  54. package/dist/docs/my-account-profile.md +16 -11
  55. package/dist/docs/navigation-link.md +5 -3
  56. package/dist/docs/order-cancel.md +3 -1
  57. package/dist/docs/order-delivery-address.md +7 -5
  58. package/dist/docs/order-delivery-group.md +1 -3
  59. package/dist/docs/order-details-back.md +1 -1
  60. package/dist/docs/order-details-header.md +1 -4
  61. package/dist/docs/order-invoice-download.md +60 -0
  62. package/dist/docs/order-list-row.md +1 -1
  63. package/dist/docs/order-list-search.md +13 -20
  64. package/dist/docs/order-list-views.md +11 -17
  65. package/dist/docs/order-list.md +12 -5
  66. package/dist/docs/order-payment.md +9 -7
  67. package/dist/docs/order-placed-date.md +1 -1
  68. package/dist/docs/order-placed-payment-summary.md +28 -15
  69. package/dist/docs/order-placed.md +49 -14
  70. package/dist/docs/order-progress.md +1 -1
  71. package/dist/docs/order-status-badge.md +20 -9
  72. package/dist/docs/order-summary.md +2 -2
  73. package/dist/docs/order-tracking-link.md +58 -0
  74. package/dist/docs/payment-method-badges.md +30 -4
  75. package/dist/docs/payment-methods.md +1 -1
  76. package/dist/docs/payment.md +36 -17
  77. package/dist/docs/phone-field.md +4 -4
  78. package/dist/docs/place-order.md +84 -36
  79. package/dist/docs/postal-code-field.md +3 -1
  80. package/dist/docs/pricing.md +21 -23
  81. package/dist/docs/product-gallery.md +19 -20
  82. package/dist/docs/product-information.md +13 -9
  83. package/dist/docs/product-list.md +7 -6
  84. package/dist/docs/product-shelf.md +0 -1
  85. package/dist/docs/promotion.md +4 -2
  86. package/dist/docs/region.md +23 -15
  87. package/dist/docs/save-card.md +7 -6
  88. package/dist/docs/saved-cards.md +65 -36
  89. package/dist/docs/shipping-address.md +57 -21
  90. package/dist/docs/shipping-simulator.md +53 -15
  91. package/dist/docs/sign-in-disclosure.md +176 -0
  92. package/dist/docs/sign-in-form.md +78 -47
  93. package/dist/docs/sign-in-redirect.md +4 -2
  94. package/dist/docs/sign-in.md +173 -0
  95. package/dist/docs/toast.md +15 -4
  96. package/dist/docs/variant-selector.md +15 -11
  97. package/dist/domain-logic/dist/checkout/rules.js +33 -0
  98. package/dist/domain-logic/dist/checkout/rules.js.map +1 -0
  99. package/dist/graphql/types.d.ts +4 -14
  100. package/dist/index.d.ts +2 -2
  101. package/dist/internal/client.d.ts +1 -3
  102. package/dist/internal/client.js +1 -1
  103. package/dist/internal/server.d.ts +7 -4
  104. package/dist/internal/server.js +7 -4
  105. package/dist/matter/access-code-sign-in/access-code-sign-in.d.ts +250 -66
  106. package/dist/matter/access-code-sign-in/access-code-sign-in.js +459 -188
  107. package/dist/matter/access-code-sign-in/access-code-sign-in.js.map +1 -1
  108. package/dist/matter/account-address-book/account-address-book-delete.d.ts +78 -40
  109. package/dist/matter/account-address-book/account-address-book-delete.js +86 -50
  110. package/dist/matter/account-address-book/account-address-book-delete.js.map +1 -1
  111. package/dist/matter/account-address-book/account-address-book-deliverability.d.ts +21 -4
  112. package/dist/matter/account-address-book/account-address-book-deliverability.js +45 -17
  113. package/dist/matter/account-address-book/account-address-book-deliverability.js.map +1 -1
  114. package/dist/matter/account-address-book/account-address-book-form-parts.d.ts +74 -19
  115. package/dist/matter/account-address-book/account-address-book-form-parts.js +77 -26
  116. package/dist/matter/account-address-book/account-address-book-form-parts.js.map +1 -1
  117. package/dist/matter/account-address-book/account-address-book-profile-notice.d.ts +27 -6
  118. package/dist/matter/account-address-book/account-address-book-profile-notice.js +55 -28
  119. package/dist/matter/account-address-book/account-address-book-profile-notice.js.map +1 -1
  120. package/dist/matter/account-address-book/account-address-book.d.ts +67 -14
  121. package/dist/matter/account-address-book/account-address-book.js +74 -33
  122. package/dist/matter/account-address-book/account-address-book.js.map +1 -1
  123. package/dist/matter/account-address-book/account-address-country-switch.js +3 -3
  124. package/dist/matter/account-address-book/account-address-country-switch.js.map +1 -1
  125. package/dist/matter/account-address-book/account-address-country.d.ts +66 -20
  126. package/dist/matter/account-address-book/account-address-country.js +83 -49
  127. package/dist/matter/account-address-book/account-address-country.js.map +1 -1
  128. package/dist/matter/account-address-book/account-address-form-context.d.ts +8 -4
  129. package/dist/matter/account-address-book/account-address-form-context.js.map +1 -1
  130. package/dist/matter/account-address-book/account-address-form.d.ts +468 -45
  131. package/dist/matter/account-address-book/account-address-form.js +518 -155
  132. package/dist/matter/account-address-book/account-address-form.js.map +1 -1
  133. package/dist/matter/account-address-book/account-address-record.d.ts +27 -6
  134. package/dist/matter/account-address-book/account-address-record.js +32 -17
  135. package/dist/matter/account-address-book/account-address-record.js.map +1 -1
  136. package/dist/matter/account-menu/account-menu.d.ts +34 -17
  137. package/dist/matter/account-menu/account-menu.js +46 -54
  138. package/dist/matter/account-menu/account-menu.js.map +1 -1
  139. package/dist/matter/account-menu-identity/account-menu-identity.js +1 -1
  140. package/dist/matter/account-saved-cards/account-saved-cards.d.ts +108 -28
  141. package/dist/matter/account-saved-cards/account-saved-cards.js +177 -122
  142. package/dist/matter/account-saved-cards/account-saved-cards.js.map +1 -1
  143. package/dist/matter/billing-address/billing-address.d.ts +156 -74
  144. package/dist/matter/billing-address/billing-address.js +227 -156
  145. package/dist/matter/billing-address/billing-address.js.map +1 -1
  146. package/dist/matter/breadcrumb/breadcrumb.d.ts +21 -3
  147. package/dist/matter/breadcrumb/breadcrumb.js +24 -9
  148. package/dist/matter/breadcrumb/breadcrumb.js.map +1 -1
  149. package/dist/matter/buy-button/buy-button.d.ts +8 -11
  150. package/dist/matter/buy-button/buy-button.js +10 -19
  151. package/dist/matter/buy-button/buy-button.js.map +1 -1
  152. package/dist/matter/card-entry/card-capture.js +12 -4
  153. package/dist/matter/card-entry/card-capture.js.map +1 -1
  154. package/dist/matter/card-entry/card-entry.d.ts +123 -32
  155. package/dist/matter/card-entry/card-entry.js +348 -221
  156. package/dist/matter/card-entry/card-entry.js.map +1 -1
  157. package/dist/matter/cart/cart-namespace.d.ts +7 -1
  158. package/dist/matter/cart/cart-namespace.js +7 -1
  159. package/dist/matter/cart/cart-namespace.js.map +1 -1
  160. package/dist/matter/cart/cart.d.ts +402 -61
  161. package/dist/matter/cart/cart.js +624 -153
  162. package/dist/matter/cart/cart.js.map +1 -1
  163. package/dist/matter/cart-destination/cart-destination.d.ts +30 -19
  164. package/dist/matter/cart-destination/cart-destination.js +160 -70
  165. package/dist/matter/cart-destination/cart-destination.js.map +1 -1
  166. package/dist/matter/cart-item/cart-item.d.ts +144 -17
  167. package/dist/matter/cart-item/cart-item.js +166 -49
  168. package/dist/matter/cart-item/cart-item.js.map +1 -1
  169. package/dist/matter/cart-item-compositions/cart-item-compositions.js +1 -1
  170. package/dist/matter/cart-item-compositions/cart-item-compositions.js.map +1 -1
  171. package/dist/matter/cart-item-customizations/cart-item-customizations.js +1 -1
  172. package/dist/matter/cart-item-customizations/cart-item-customizations.js.map +1 -1
  173. package/dist/matter/cart-item-discounts/cart-item-discounts.js +1 -1
  174. package/dist/matter/cart-item-discounts/cart-item-discounts.js.map +1 -1
  175. package/dist/matter/cart-item-seller-info/cart-item-seller-info.js +1 -1
  176. package/dist/matter/cart-item-seller-info/cart-item-seller-info.js.map +1 -1
  177. package/dist/matter/cart-item-variations/cart-item-variations.js +1 -1
  178. package/dist/matter/cart-item-variations/cart-item-variations.js.map +1 -1
  179. package/dist/matter/cart-totalizer/cart-totalizer.d.ts +43 -9
  180. package/dist/matter/cart-totalizer/cart-totalizer.js +46 -17
  181. package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -1
  182. package/dist/matter/challenge-return/challenge-return.d.ts +62 -0
  183. package/dist/matter/challenge-return/challenge-return.js +241 -0
  184. package/dist/matter/challenge-return/challenge-return.js.map +1 -0
  185. package/dist/matter/client-preferences/client-preferences-fieldset.d.ts +86 -17
  186. package/dist/matter/client-preferences/client-preferences-fieldset.js +126 -54
  187. package/dist/matter/client-preferences/client-preferences-fieldset.js.map +1 -1
  188. package/dist/matter/client-preferences/client-preferences.d.ts +50 -7
  189. package/dist/matter/client-preferences/client-preferences.js +84 -15
  190. package/dist/matter/client-preferences/client-preferences.js.map +1 -1
  191. package/dist/matter/client-profile/client-profile.d.ts +44 -9
  192. package/dist/matter/client-profile/client-profile.js +64 -24
  193. package/dist/matter/client-profile/client-profile.js.map +1 -1
  194. package/dist/matter/client-profile-form/client-profile-fieldset.d.ts +119 -22
  195. package/dist/matter/client-profile-form/client-profile-fieldset.js +161 -73
  196. package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -1
  197. package/dist/matter/delivery-options/delivery-options-accordion.d.ts +49 -4
  198. package/dist/matter/delivery-options/delivery-options-accordion.js +67 -14
  199. package/dist/matter/delivery-options/delivery-options-accordion.js.map +1 -1
  200. package/dist/matter/delivery-options/delivery-options-controller.d.ts +69 -9
  201. package/dist/matter/delivery-options/delivery-options-controller.js +80 -14
  202. package/dist/matter/delivery-options/delivery-options-controller.js.map +1 -1
  203. package/dist/matter/delivery-options/delivery-options.d.ts +37 -2
  204. package/dist/matter/delivery-options/delivery-options.js +75 -12
  205. package/dist/matter/delivery-options/delivery-options.js.map +1 -1
  206. package/dist/matter/delivery-options/use-delivery-option-selection.d.ts +1 -0
  207. package/dist/matter/delivery-options/use-delivery-option-selection.js +1 -1
  208. package/dist/matter/delivery-options/use-delivery-option-selection.js.map +1 -1
  209. package/dist/matter/email-identification/email-identification.d.ts +25 -3
  210. package/dist/matter/email-identification/email-identification.js +49 -12
  211. package/dist/matter/email-identification/email-identification.js.map +1 -1
  212. package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +79 -7
  213. package/dist/matter/free-shipping-progress/free-shipping-progress.js +77 -20
  214. package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -1
  215. package/dist/matter/identity-edit/identity-edit.d.ts +52 -10
  216. package/dist/matter/identity-edit/identity-edit.js +47 -19
  217. package/dist/matter/identity-edit/identity-edit.js.map +1 -1
  218. package/dist/matter/identity-summary/identity-summary.d.ts +76 -22
  219. package/dist/matter/identity-summary/identity-summary.js +95 -45
  220. package/dist/matter/identity-summary/identity-summary.js.map +1 -1
  221. package/dist/matter/installments/installments-select.d.ts +98 -16
  222. package/dist/matter/installments/installments-select.js +156 -48
  223. package/dist/matter/installments/installments-select.js.map +1 -1
  224. package/dist/matter/installments/installments.d.ts +96 -16
  225. package/dist/matter/installments/installments.js +115 -40
  226. package/dist/matter/installments/installments.js.map +1 -1
  227. package/dist/matter/installments/use-installments-selection.d.ts +1 -0
  228. package/dist/matter/installments/use-installments-selection.js +8 -3
  229. package/dist/matter/installments/use-installments-selection.js.map +1 -1
  230. package/dist/matter/my-account-profile/my-account-profile.d.ts +358 -103
  231. package/dist/matter/my-account-profile/my-account-profile.js +370 -174
  232. package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
  233. package/dist/matter/order-cancel/order-cancel.d.ts +65 -19
  234. package/dist/matter/order-cancel/order-cancel.js +118 -51
  235. package/dist/matter/order-cancel/order-cancel.js.map +1 -1
  236. package/dist/matter/order-delivery-address/order-delivery-address.d.ts +8 -18
  237. package/dist/matter/order-delivery-address/order-delivery-address.js +14 -23
  238. package/dist/matter/order-delivery-address/order-delivery-address.js.map +1 -1
  239. package/dist/matter/order-delivery-group/order-delivery-group.d.ts +40 -24
  240. package/dist/matter/order-delivery-group/order-delivery-group.js +64 -74
  241. package/dist/matter/order-delivery-group/order-delivery-group.js.map +1 -1
  242. package/dist/matter/order-details-header/order-details-header.d.ts +32 -15
  243. package/dist/matter/order-details-header/order-details-header.js +66 -58
  244. package/dist/matter/order-details-header/order-details-header.js.map +1 -1
  245. package/dist/matter/order-invoice-download/order-invoice-download.d.ts +78 -0
  246. package/dist/matter/order-invoice-download/order-invoice-download.js +173 -0
  247. package/dist/matter/order-invoice-download/order-invoice-download.js.map +1 -0
  248. package/dist/matter/order-list/order-list.d.ts +164 -19
  249. package/dist/matter/order-list/order-list.js +229 -87
  250. package/dist/matter/order-list/order-list.js.map +1 -1
  251. package/dist/matter/order-list-row/order-list-row.d.ts +6 -1
  252. package/dist/matter/order-list-row/order-list-row.js +3 -2
  253. package/dist/matter/order-list-row/order-list-row.js.map +1 -1
  254. package/dist/matter/order-list-search/order-list-search.d.ts +18 -26
  255. package/dist/matter/order-list-search/order-list-search.js +30 -69
  256. package/dist/matter/order-list-search/order-list-search.js.map +1 -1
  257. package/dist/matter/order-list-views/order-list-views.d.ts +15 -22
  258. package/dist/matter/order-list-views/order-list-views.js +22 -68
  259. package/dist/matter/order-list-views/order-list-views.js.map +1 -1
  260. package/dist/matter/order-payment/order-payment.d.ts +33 -10
  261. package/dist/matter/order-payment/order-payment.js +44 -39
  262. package/dist/matter/order-payment/order-payment.js.map +1 -1
  263. package/dist/matter/order-placed/order-placed-deliveries.d.ts +144 -12
  264. package/dist/matter/order-placed/order-placed-deliveries.js +115 -40
  265. package/dist/matter/order-placed/order-placed-deliveries.js.map +1 -1
  266. package/dist/matter/order-placed/order-placed.d.ts +198 -31
  267. package/dist/matter/order-placed/order-placed.js +230 -139
  268. package/dist/matter/order-placed/order-placed.js.map +1 -1
  269. package/dist/matter/order-placed-date/order-placed-date.d.ts +5 -8
  270. package/dist/matter/order-placed-date/order-placed-date.js +7 -8
  271. package/dist/matter/order-placed-date/order-placed-date.js.map +1 -1
  272. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +90 -17
  273. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +93 -117
  274. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -1
  275. package/dist/matter/order-progress/order-progress.d.ts +19 -8
  276. package/dist/matter/order-progress/order-progress.js +37 -45
  277. package/dist/matter/order-progress/order-progress.js.map +1 -1
  278. package/dist/matter/order-summary/order-summary.d.ts +19 -9
  279. package/dist/matter/order-summary/order-summary.js +38 -44
  280. package/dist/matter/order-summary/order-summary.js.map +1 -1
  281. package/dist/matter/order-tracking-link/order-tracking-link.d.ts +43 -0
  282. package/dist/matter/order-tracking-link/order-tracking-link.js +107 -0
  283. package/dist/matter/order-tracking-link/order-tracking-link.js.map +1 -0
  284. package/dist/matter/payment/payment-card-capture.js +17 -10
  285. package/dist/matter/payment/payment-card-capture.js.map +1 -1
  286. package/dist/matter/payment/payment-controller.d.ts +4 -2
  287. package/dist/matter/payment/payment-controller.js +30 -9
  288. package/dist/matter/payment/payment-controller.js.map +1 -1
  289. package/dist/matter/payment/payment-method-badges.js +1 -1
  290. package/dist/matter/payment/payment.d.ts +69 -19
  291. package/dist/matter/payment/payment.js +101 -35
  292. package/dist/matter/payment/payment.js.map +1 -1
  293. package/dist/matter/payment/use-payment-method-selection.d.ts +25 -4
  294. package/dist/matter/payment/use-payment-method-selection.js +94 -32
  295. package/dist/matter/payment/use-payment-method-selection.js.map +1 -1
  296. package/dist/matter/payment/use-payment-submit-gate.d.ts +14 -3
  297. package/dist/matter/payment/use-payment-submit-gate.js +47 -8
  298. package/dist/matter/payment/use-payment-submit-gate.js.map +1 -1
  299. package/dist/matter/place-order/place-order.d.ts +171 -57
  300. package/dist/matter/place-order/place-order.js +376 -185
  301. package/dist/matter/place-order/place-order.js.map +1 -1
  302. package/dist/matter/pricing/pricing.d.ts +152 -13
  303. package/dist/matter/pricing/pricing.js +153 -52
  304. package/dist/matter/pricing/pricing.js.map +1 -1
  305. package/dist/matter/product-information/product-information.d.ts +27 -4
  306. package/dist/matter/product-information/product-information.js +32 -15
  307. package/dist/matter/product-information/product-information.js.map +1 -1
  308. package/dist/matter/product-list/product-list.d.ts +24 -6
  309. package/dist/matter/product-list/product-list.js +32 -26
  310. package/dist/matter/product-list/product-list.js.map +1 -1
  311. package/dist/matter/product-shelf/product-shelf.d.ts +1 -3
  312. package/dist/matter/product-shelf/product-shelf.js +2 -15
  313. package/dist/matter/product-shelf/product-shelf.js.map +1 -1
  314. package/dist/matter/region/region.d.ts +33 -16
  315. package/dist/matter/region/region.js +59 -52
  316. package/dist/matter/region/region.js.map +1 -1
  317. package/dist/matter/save-card/save-card.d.ts +43 -8
  318. package/dist/matter/save-card/save-card.js +61 -23
  319. package/dist/matter/save-card/save-card.js.map +1 -1
  320. package/dist/matter/saved-cards/saved-cards.d.ts +113 -21
  321. package/dist/matter/saved-cards/saved-cards.js +349 -77
  322. package/dist/matter/saved-cards/saved-cards.js.map +1 -1
  323. package/dist/matter/shipping-address/address-payload.js +25 -0
  324. package/dist/matter/shipping-address/address-payload.js.map +1 -0
  325. package/dist/matter/shipping-address/country-descriptors.js +71 -71
  326. package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
  327. package/dist/matter/shipping-address/library-country-descriptors.js +136 -0
  328. package/dist/matter/shipping-address/library-country-descriptors.js.map +1 -0
  329. package/dist/matter/shipping-address/shipping-address.d.ts +312 -45
  330. package/dist/matter/shipping-address/shipping-address.js +443 -188
  331. package/dist/matter/shipping-address/shipping-address.js.map +1 -1
  332. package/dist/matter/shipping-simulator/shipping-simulator.d.ts +250 -24
  333. package/dist/matter/shipping-simulator/shipping-simulator.js +257 -51
  334. package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
  335. package/dist/matter/sign-in/sign-in.d.ts +108 -0
  336. package/dist/matter/sign-in/sign-in.js +285 -0
  337. package/dist/matter/sign-in/sign-in.js.map +1 -0
  338. package/dist/matter/sign-in-disclosure/sign-in-disclosure.d.ts +81 -0
  339. package/dist/matter/sign-in-disclosure/sign-in-disclosure.js +232 -0
  340. package/dist/matter/sign-in-disclosure/sign-in-disclosure.js.map +1 -0
  341. package/dist/matter/sign-in-form/sign-in-form.d.ts +93 -62
  342. package/dist/matter/sign-in-form/sign-in-form.js +134 -144
  343. package/dist/matter/sign-in-form/sign-in-form.js.map +1 -1
  344. package/dist/particles/binding-switcher/binding-switcher.d.ts +29 -8
  345. package/dist/particles/binding-switcher/binding-switcher.js +37 -26
  346. package/dist/particles/binding-switcher/binding-switcher.js.map +1 -1
  347. package/dist/particles/card-summary/card-summary.d.ts +38 -8
  348. package/dist/particles/card-summary/card-summary.js +55 -22
  349. package/dist/particles/card-summary/card-summary.js.map +1 -1
  350. package/dist/particles/carousel/carousel.d.ts +99 -11
  351. package/dist/particles/carousel/carousel.js +103 -35
  352. package/dist/particles/carousel/carousel.js.map +1 -1
  353. package/dist/particles/copy-text/copy-text.js +5 -15
  354. package/dist/particles/copy-text/copy-text.js.map +1 -1
  355. package/dist/particles/dialog/dialog.d.ts +14 -6
  356. package/dist/particles/dialog/dialog.js +6 -3
  357. package/dist/particles/dialog/dialog.js.map +1 -1
  358. package/dist/particles/drawer/drawer.js +1 -1
  359. package/dist/particles/drawer/drawer.js.map +1 -1
  360. package/dist/particles/email-field/email-field.d.ts +2 -1
  361. package/dist/particles/email-field/email-field.js +2 -1
  362. package/dist/particles/email-field/email-field.js.map +1 -1
  363. package/dist/particles/footer-link-group/footer-link-group.js +1 -0
  364. package/dist/particles/footer-link-group/footer-link-group.js.map +1 -1
  365. package/dist/particles/form/form.d.ts +85 -13
  366. package/dist/particles/form/form.js +91 -42
  367. package/dist/particles/form/form.js.map +1 -1
  368. package/dist/particles/gallery/gallery.d.ts +129 -12
  369. package/dist/particles/gallery/gallery.js +121 -34
  370. package/dist/particles/gallery/gallery.js.map +1 -1
  371. package/dist/particles/order-details-back/order-details-back.d.ts +5 -3
  372. package/dist/particles/order-details-back/order-details-back.js +8 -10
  373. package/dist/particles/order-details-back/order-details-back.js.map +1 -1
  374. package/dist/particles/order-status-badge/order-status-badge.d.ts +3 -3
  375. package/dist/particles/order-status-badge/order-status-badge.js +4 -20
  376. package/dist/particles/order-status-badge/order-status-badge.js.map +1 -1
  377. package/dist/particles/password-field/password-field.d.ts +1 -1
  378. package/dist/particles/password-field/password-field.js +2 -4
  379. package/dist/particles/password-field/password-field.js.map +1 -1
  380. package/dist/particles/phone-field/phone-field.d.ts +4 -4
  381. package/dist/particles/phone-field/phone-field.js +8 -11
  382. package/dist/particles/phone-field/phone-field.js.map +1 -1
  383. package/dist/particles/spinner/spinner.d.ts +24 -4
  384. package/dist/particles/spinner/spinner.js +25 -9
  385. package/dist/particles/spinner/spinner.js.map +1 -1
  386. package/dist/particles/switch/switch.d.ts +4 -1
  387. package/dist/particles/switch/switch.js +3 -1
  388. package/dist/particles/switch/switch.js.map +1 -1
  389. package/dist/particles/toast/toast.d.ts +29 -3
  390. package/dist/particles/toast/toast.js +34 -10
  391. package/dist/particles/toast/toast.js.map +1 -1
  392. package/dist/schema.graphql +164 -56
  393. package/dist/sdk/address/address-fields.js +4 -4
  394. package/dist/sdk/address/address-fields.js.map +1 -1
  395. package/dist/sdk/address/constants.js +1 -6
  396. package/dist/sdk/address/constants.js.map +1 -1
  397. package/dist/sdk/address/messages.js +44 -44
  398. package/dist/sdk/address/messages.js.map +1 -1
  399. package/dist/sdk/address/postal-code.js +15 -2
  400. package/dist/sdk/address/postal-code.js.map +1 -1
  401. package/dist/sdk/address/types.d.ts +5 -3
  402. package/dist/sdk/address/validate-address.js +3 -3
  403. package/dist/sdk/address/validate-address.js.map +1 -1
  404. package/dist/sdk/analytics/use-analytics-actions.d.ts +1 -1
  405. package/dist/sdk/analytics/use-analytics-actions.js.map +1 -1
  406. package/dist/sdk/cart/use-cart-actions.js.map +1 -1
  407. package/dist/sdk/data/index.js +2 -2
  408. package/dist/sdk/data/reactive-list-item-data-provider.js +2 -2
  409. package/dist/sdk/generated/gql.js +1 -1
  410. package/dist/sdk/generated/gql.js.map +1 -1
  411. package/dist/sdk/generated/graphql.d.ts +20 -5
  412. package/dist/sdk/generated/graphql.js +6 -0
  413. package/dist/sdk/generated/graphql.js.map +1 -1
  414. package/dist/sdk/i18n/format-error-code.js +23 -0
  415. package/dist/sdk/i18n/format-error-code.js.map +1 -0
  416. package/dist/sdk/i18n/message-formatter.d.ts +22 -0
  417. package/dist/sdk/i18n/message-formatter.js +140 -0
  418. package/dist/sdk/i18n/message-formatter.js.map +1 -0
  419. package/dist/sdk/i18n/use-message-formatter.d.ts +8 -0
  420. package/dist/sdk/i18n/use-message-formatter.js +18 -0
  421. package/dist/sdk/i18n/use-message-formatter.js.map +1 -0
  422. package/dist/sdk/identity/use-identity-actions.js.map +1 -1
  423. package/dist/sdk/navigation/redirect.d.ts +2 -0
  424. package/dist/sdk/navigation/redirect.js +19 -1
  425. package/dist/sdk/navigation/redirect.js.map +1 -1
  426. package/dist/sdk/navigation/types.d.ts +13 -0
  427. package/dist/sdk/payment/bin-format.js +21 -0
  428. package/dist/sdk/payment/bin-format.js.map +1 -0
  429. package/dist/sdk/payment/challenge-return.js +37 -0
  430. package/dist/sdk/payment/challenge-return.js.map +1 -0
  431. package/dist/sdk/payment/confirmation-last-four.js +39 -0
  432. package/dist/sdk/payment/confirmation-last-four.js.map +1 -0
  433. package/dist/sdk/payment/gateway.d.ts +1 -1
  434. package/dist/sdk/payment/gateway.js +8 -2
  435. package/dist/sdk/payment/gateway.js.map +1 -1
  436. package/dist/sdk/payment/operations.d.ts +1 -0
  437. package/dist/sdk/payment/operations.js +28 -6
  438. package/dist/sdk/payment/operations.js.map +1 -1
  439. package/dist/sdk/payment/resumed-purchase.d.ts +1 -0
  440. package/dist/sdk/payment/resumed-purchase.js +119 -0
  441. package/dist/sdk/payment/resumed-purchase.js.map +1 -0
  442. package/dist/sdk/payment/security-code-mask.js +16 -23
  443. package/dist/sdk/payment/security-code-mask.js.map +1 -1
  444. package/dist/sdk/payment/submission-registry.js +6 -2
  445. package/dist/sdk/payment/submission-registry.js.map +1 -1
  446. package/dist/sdk/payment/use-payment-actions.d.ts +18 -3
  447. package/dist/sdk/payment/use-payment-actions.js +23 -4
  448. package/dist/sdk/payment/use-payment-actions.js.map +1 -1
  449. package/dist/sdk/payment/use-place-order.d.ts +10 -2
  450. package/dist/sdk/payment/use-place-order.js +138 -76
  451. package/dist/sdk/payment/use-place-order.js.map +1 -1
  452. package/dist/sdk/provider/storefront-provider.d.ts +1 -7
  453. package/dist/sdk/provider/storefront-provider.js +4 -11
  454. package/dist/sdk/provider/storefront-provider.js.map +1 -1
  455. package/dist/sdk/seo/entity-landing.d.ts +24 -0
  456. package/dist/sdk/seo/entity-landing.js +30 -0
  457. package/dist/sdk/seo/entity-landing.js.map +1 -0
  458. package/dist/sdk/seo/page-alternates.d.ts +3 -2
  459. package/dist/sdk/seo/page-alternates.js +4 -2
  460. package/dist/sdk/seo/page-alternates.js.map +1 -1
  461. package/dist/sdk/seo/search-landing.d.ts +42 -0
  462. package/dist/sdk/seo/search-landing.js +85 -0
  463. package/dist/sdk/seo/search-landing.js.map +1 -0
  464. package/dist/sdk/session/mock-session.d.ts +9 -0
  465. package/dist/sdk/session/mock-session.js +31 -0
  466. package/dist/sdk/session/mock-session.js.map +1 -0
  467. package/dist/sdk/session/read-server-session.d.ts +3 -0
  468. package/dist/sdk/session/read-server-session.js +5 -0
  469. package/dist/sdk/session/read-server-session.js.map +1 -1
  470. package/dist/sdk/session/return-path-segment.d.ts +10 -0
  471. package/dist/sdk/session/return-path-segment.js +15 -0
  472. package/dist/sdk/session/return-path-segment.js.map +1 -0
  473. package/dist/sdk/session/use-session-actions.js.map +1 -1
  474. package/dist/sdk/shipping/use-cart-shipping-simulation.js.map +1 -1
  475. package/dist/sdk/shipping/use-shipping-actions.js.map +1 -1
  476. package/dist/sdk/shipping/use-shipping-simulation.js.map +1 -1
  477. package/dist/utils/safe-href.d.ts +2 -0
  478. package/package.json +4 -3
  479. package/skills/storefront-asset/SKILL.md +2 -2
  480. package/skills/storefront-asset/references/api-side.md +27 -14
  481. package/skills/storefront-asset/references/findings.md +5 -2
  482. package/src/styles/tailwind.css +8 -0
  483. package/dist/matter/shipping-address/country-descriptors.d.ts +0 -1
  484. package/dist/message-locales.json +0 -7
  485. package/dist/sdk/i18n/client.d.ts +0 -4
  486. package/dist/sdk/i18n/client.js +0 -4
  487. package/dist/sdk/i18n/locales.d.ts +0 -8
  488. package/dist/sdk/i18n/locales.js +0 -57
  489. package/dist/sdk/i18n/locales.js.map +0 -1
  490. package/dist/sdk/i18n/messages/en-US.js +0 -183
  491. package/dist/sdk/i18n/messages/en-US.js.map +0 -1
  492. package/dist/sdk/i18n/messages/en-US.json +0 -178
  493. package/dist/sdk/i18n/messages/en-US.json.d.ts +0 -182
  494. package/dist/sdk/i18n/messages/es-ES.js +0 -183
  495. package/dist/sdk/i18n/messages/es-ES.js.map +0 -1
  496. package/dist/sdk/i18n/messages/es-ES.json +0 -178
  497. package/dist/sdk/i18n/messages/pt-BR.js +0 -183
  498. package/dist/sdk/i18n/messages/pt-BR.js.map +0 -1
  499. package/dist/sdk/i18n/messages/pt-BR.json +0 -178
  500. package/dist/sdk/i18n/provider.d.ts +0 -1
  501. package/dist/sdk/i18n/provider.js +0 -30
  502. package/dist/sdk/i18n/provider.js.map +0 -1
  503. package/dist/sdk/i18n/server.d.ts +0 -28
  504. package/dist/sdk/i18n/server.js +0 -59
  505. package/dist/sdk/i18n/server.js.map +0 -1
  506. package/dist/utils/resolve-authored-copy.js +0 -18
  507. package/dist/utils/resolve-authored-copy.js.map +0 -1
  508. package/dist/utils/substitute-template.js +0 -33
  509. package/dist/utils/substitute-template.js.map +0 -1
@@ -1,8 +1,32 @@
1
+ import { ContentValue, MessageLocaleProp } from "../../core/dist/define-content-type.js";
1
2
  import { ComponentDefinition } from "../../core/dist/define-component.js";
2
3
  import "../../core/dist/index.js";
3
4
  import { ProductInformationDataFragment } from "../../sdk/generated/graphql.js";
4
5
  import { ComponentPropsWithRef, ComponentPropsWithoutRef } from "react";
5
6
  //#region src/matter/product-information/product-information.d.ts
7
+ export declare const ProductInformationDescriptionContent: {
8
+ readonly id: "product-information-description";
9
+ readonly title: "Product Information Description";
10
+ readonly description: "Labels of the trigger that expands and collapses the product description.";
11
+ readonly schema: {
12
+ readonly type: "object";
13
+ readonly additionalProperties: false;
14
+ readonly properties: {
15
+ readonly moreLabel: {
16
+ readonly type: "string";
17
+ readonly title: "Trigger label (collapsed)";
18
+ readonly format: "icu-message";
19
+ readonly messageSource: "Show more";
20
+ };
21
+ readonly lessLabel: {
22
+ readonly type: "string";
23
+ readonly title: "Trigger label (expanded)";
24
+ readonly format: "icu-message";
25
+ readonly messageSource: "Show less";
26
+ };
27
+ };
28
+ };
29
+ };
6
30
  type ProductSlice = NonNullable<ProductInformationDataFragment['productBySlug']>;
7
31
  type TitleAs = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
8
32
  export type DescriptionFormat = 'auto' | 'plain' | 'html';
@@ -14,7 +38,7 @@ export type ProductInformationTitleProps = Omit<ComponentPropsWithRef<'h1'>, 'ch
14
38
  as?: TitleAs;
15
39
  separator?: string;
16
40
  };
17
- export type ProductInformationDescriptionProps = Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'dangerouslySetInnerHTML'> & {
41
+ export type ProductInformationDescriptionProps = Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'dangerouslySetInnerHTML'> & MessageLocaleProp & {
18
42
  /**
19
43
  * Controls how the description renders.
20
44
  * - `'auto'` (default) — prefers `descriptionHtml`; falls back to plain `description`; renders nothing when both are absent.
@@ -31,8 +55,7 @@ export type ProductInformationDescriptionProps = Omit<ComponentPropsWithoutRef<'
31
55
  collapse?: Collapse;
32
56
  defaultExpanded?: boolean;
33
57
  collapsedLines?: number;
34
- moreLabel?: string;
35
- lessLabel?: string;
58
+ $content?: ContentValue<typeof ProductInformationDescriptionContent>;
36
59
  };
37
60
  export type ProductInformationBrandProps = Omit<ComponentPropsWithRef<'span'>, 'children'>;
38
61
  export type ProductInformationSkuProps = Omit<ComponentPropsWithRef<'span'>, 'children'>;
@@ -45,7 +68,7 @@ export declare const ProductInformationSkuDefinition: ComponentDefinition<Produc
45
68
  export declare const ProductInformationReferenceIdDefinition: ComponentDefinition<ProductInformationReferenceIdProps>;
46
69
  export declare function ProductInformationRoot({ $data: $dataProp, className, children, ...props }: ProductInformationRootProps): import("react/jsx-runtime").JSX.Element;
47
70
  export declare function ProductInformationTitle({ as, separator, className, ...props }: ProductInformationTitleProps): import("react/jsx-runtime").JSX.Element | null;
48
- export declare function ProductInformationDescription({ format, collapse, defaultExpanded, collapsedLines, moreLabel, lessLabel, className, ...props }: ProductInformationDescriptionProps): import("react/jsx-runtime").JSX.Element | null;
71
+ export declare function ProductInformationDescription({ format, collapse, defaultExpanded, collapsedLines, $content, $locale, className, ...props }: ProductInformationDescriptionProps): import("react/jsx-runtime").JSX.Element | null;
49
72
  export declare function ProductInformationBrand({ className, ...props }: ProductInformationBrandProps): import("react/jsx-runtime").JSX.Element | null;
50
73
  export declare function ProductInformationSku({ className, ...props }: ProductInformationSkuProps): import("react/jsx-runtime").JSX.Element | null;
51
74
  export declare function ProductInformationReferenceId({ className, ...props }: ProductInformationReferenceIdProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,6 +1,8 @@
1
1
  "use client";
2
2
  import { defineComponent } from "../../core/dist/define-component.js";
3
+ import { defineContentType } from "../../core/dist/define-content-type.js";
3
4
  import "../../core/dist/index.js";
5
+ import { useMessageFormatter } from "../../sdk/i18n/use-message-formatter.js";
4
6
  import { graphql } from "../../sdk/generated/gql.js";
5
7
  import { useDataOverride } from "../../sdk/data/data-override-context.js";
6
8
  import { createContext, useContext, useEffect, useId, useRef, useState } from "react";
@@ -38,6 +40,29 @@ const fragment = graphql(`
38
40
  }
39
41
  }
40
42
  `);
43
+ const ProductInformationDescriptionContent = defineContentType({
44
+ id: "product-information-description",
45
+ title: "Product Information Description",
46
+ description: "Labels of the trigger that expands and collapses the product description.",
47
+ schema: {
48
+ type: "object",
49
+ additionalProperties: false,
50
+ properties: {
51
+ moreLabel: {
52
+ type: "string",
53
+ title: "Trigger label (collapsed)",
54
+ format: "icu-message",
55
+ messageSource: "Show more"
56
+ },
57
+ lessLabel: {
58
+ type: "string",
59
+ title: "Trigger label (expanded)",
60
+ format: "icu-message",
61
+ messageSource: "Show less"
62
+ }
63
+ }
64
+ }
65
+ });
41
66
  const PRODUCT_INFORMATION_CONTEXT_UNSET = Symbol("ProductInformationContextUnset");
42
67
  const ProductInformationContext = createContext(PRODUCT_INFORMATION_CONTEXT_UNSET);
43
68
  function useProductInformation() {
@@ -109,6 +134,7 @@ const ProductInformationDescriptionDefinition = defineComponent({
109
134
  name: "ProductInformationDescription",
110
135
  importPath: "@vtex/faststore/components",
111
136
  component: ProductInformationDescription,
137
+ content: ProductInformationDescriptionContent,
112
138
  editor: {
113
139
  label: "Product Description",
114
140
  category: "commerce"
@@ -141,20 +167,10 @@ const ProductInformationDescriptionDefinition = defineComponent({
141
167
  type: "number",
142
168
  default: 4,
143
169
  label: "Collapsed line count"
144
- },
145
- moreLabel: {
146
- type: "string",
147
- default: "Show more",
148
- label: "Trigger label (collapsed)"
149
- },
150
- lessLabel: {
151
- type: "string",
152
- default: "Show less",
153
- label: "Trigger label (expanded)"
154
170
  }
155
171
  },
156
172
  requiresContext: "product-information",
157
- guideline: "Renders the product description inside a ProductInformationRoot (or any ancestor providing `product-information` context); `format` selects the source (`'auto'` default prefers HTML, `'plain'` forces plain text, `'html'` forces HTML only); `collapse` selects the reveal pattern (`'none'` default, `'showMore'` inline line-clamp via `collapsedLines` with `moreLabel`/`lessLabel`, `'section'` Base UI Collapsible disclosure)."
173
+ guideline: "Renders the product description inside a ProductInformationRoot (or any ancestor providing `product-information` context); `format` selects the source (`'auto'` default prefers HTML, `'plain'` forces plain text, `'html'` forces HTML only); `collapse` selects the reveal pattern (`'none'` default, `'showMore'` inline line-clamp via `collapsedLines` with the `$content` trigger labels `moreLabel`/`lessLabel`, `'section'` Base UI Collapsible disclosure)."
158
174
  });
159
175
  const ProductInformationBrandDefinition = defineComponent({
160
176
  name: "ProductInformationBrand",
@@ -233,8 +249,9 @@ function ProductInformationTitle({ as = "h1", separator, className, ...props })
233
249
  children: composed
234
250
  });
235
251
  }
236
- function ProductInformationDescription({ format = "auto", collapse = "none", defaultExpanded = true, collapsedLines = 4, moreLabel = "Show more", lessLabel = "Show less", className, ...props }) {
252
+ function ProductInformationDescription({ format = "auto", collapse = "none", defaultExpanded = true, collapsedLines = 4, $content, $locale, className, ...props }) {
237
253
  const ctx = useProductInformation();
254
+ const { format: formatMessage } = useMessageFormatter(ProductInformationDescriptionContent, $content);
238
255
  if (!ctx) return null;
239
256
  const wantsRich = format === "auto" || format === "html";
240
257
  const wantsPlain = format === "auto" || format === "plain";
@@ -267,8 +284,8 @@ function ProductInformationDescription({ format = "auto", collapse = "none", def
267
284
  collapse,
268
285
  defaultExpanded,
269
286
  collapsedLines,
270
- moreLabel,
271
- lessLabel,
287
+ moreLabel: formatMessage("moreLabel"),
288
+ lessLabel: formatMessage("lessLabel"),
272
289
  htmlProps,
273
290
  panelChildren
274
291
  });
@@ -350,6 +367,6 @@ const ProductInformation = {
350
367
  ReferenceId: ProductInformationReferenceId
351
368
  };
352
369
  //#endregion
353
- export { ProductInformation, ProductInformationBrand, ProductInformationBrandDefinition, ProductInformationDescription, ProductInformationDescriptionDefinition, ProductInformationReferenceId, ProductInformationReferenceIdDefinition, ProductInformationRoot, ProductInformationRootDefinition, ProductInformationSku, ProductInformationSkuDefinition, ProductInformationTitle, ProductInformationTitleDefinition };
370
+ export { ProductInformation, ProductInformationBrand, ProductInformationBrandDefinition, ProductInformationDescription, ProductInformationDescriptionContent, ProductInformationDescriptionDefinition, ProductInformationReferenceId, ProductInformationReferenceIdDefinition, ProductInformationRoot, ProductInformationRootDefinition, ProductInformationSku, ProductInformationSkuDefinition, ProductInformationTitle, ProductInformationTitleDefinition };
354
371
 
355
372
  //# sourceMappingURL=product-information.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-information.js","names":["Component"],"sources":["../../../src/matter/product-information/product-information.tsx"],"sourcesContent":["'use client';\n\nimport { Collapsible } from '@base-ui/react/collapsible';\nimport { defineComponent } from '@vtex/fs-core';\nimport type { ComponentPropsWithoutRef, ComponentPropsWithRef, CSSProperties } from 'react';\nimport { createContext, useContext, useEffect, useId, useRef, useState } from 'react';\nimport { useDataOverride } from '../../sdk/data/data-override-context.js';\nimport { graphql } from '../../sdk/generated/gql.js';\nimport type { ProductInformationDataFragment } from '../../sdk/generated/graphql.js';\n\n// ---------------------------------------------------------------------------\n// GraphQL Fragment — typed via @graphql-codegen client-preset\n// ---------------------------------------------------------------------------\n\nconst fragment = graphql(`\n fragment ProductInformationData on Query {\n productBySlug(slug: $slug) {\n __typename\n id\n title\n description\n descriptionHtml\n referenceId\n vendor\n brand {\n __typename\n id\n name\n }\n variants(first: 1) {\n edges {\n node {\n __typename\n id\n sku\n name\n }\n }\n }\n seo {\n title\n }\n }\n }\n`);\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\ntype ProductSlice = NonNullable<ProductInformationDataFragment['productBySlug']>;\n\ntype ProductInformationContextData = {\n title: string;\n description: string | null;\n descriptionHtml: string | null;\n referenceId: string | null;\n brand: string | null;\n sku: string | null;\n variantName: string | null;\n seoTitle: string | null;\n};\n\ntype ProductInformationContextValue = ProductInformationContextData | null;\n\nconst PRODUCT_INFORMATION_CONTEXT_UNSET = Symbol('ProductInformationContextUnset');\n\ntype TitleAs = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport type DescriptionFormat = 'auto' | 'plain' | 'html';\n\ntype Collapse = 'none' | 'showMore' | 'section';\n\nexport type ProductInformationRootProps = ComponentPropsWithRef<'div'> & {\n $data?: ProductSlice | null;\n};\n\nexport type ProductInformationTitleProps = Omit<ComponentPropsWithRef<'h1'>, 'children'> & {\n as?: TitleAs;\n separator?: string;\n};\n\n// `ComponentPropsWithoutRef` (not `WithRef`) because the wrapper element varies between `<p>`\n// and `<div>` depending on the resolved `format` branch. Exposing a `ref` typed for one element\n// would be unsound when the other branch resolves — the runtime element type and the\n// type-system promise would diverge silently. Refs are intentionally not part of the contract.\nexport type ProductInformationDescriptionProps = Omit<\n ComponentPropsWithoutRef<'div'>,\n 'children' | 'dangerouslySetInnerHTML'\n> & {\n /**\n * Controls how the description renders.\n * - `'auto'` (default) — prefers `descriptionHtml`; falls back to plain `description`; renders nothing when both are absent.\n * - `'plain'` — strict plain text from `description`; never reads `descriptionHtml`.\n * - `'html'` — strict rich HTML from `descriptionHtml` via `dangerouslySetInnerHTML`; renders nothing when absent (no fallback).\n *\n * Rich HTML is safe because Storefront API Core sanitizes `descriptionHtml` upstream.\n *\n * The rendered element follows from the resolved branch: plain text renders as `<p>`;\n * rich HTML renders as `<div>` (so block-level markup inside `descriptionHtml` remains valid DOM).\n * Both wrappers carry `data-fs-text=\"\"` so project-level `Text` typography cascades automatically.\n */\n format?: DescriptionFormat;\n collapse?: Collapse;\n defaultExpanded?: boolean;\n collapsedLines?: number;\n moreLabel?: string;\n lessLabel?: string;\n};\n\nexport type ProductInformationBrandProps = Omit<ComponentPropsWithRef<'span'>, 'children'>;\n\nexport type ProductInformationSkuProps = Omit<ComponentPropsWithRef<'span'>, 'children'>;\n\nexport type ProductInformationReferenceIdProps = Omit<ComponentPropsWithRef<'span'>, 'children'>;\n\n// ---------------------------------------------------------------------------\n// Context\n// ---------------------------------------------------------------------------\n\nconst ProductInformationContext = createContext<\n ProductInformationContextValue | typeof PRODUCT_INFORMATION_CONTEXT_UNSET\n>(PRODUCT_INFORMATION_CONTEXT_UNSET);\n\nfunction useProductInformation(): ProductInformationContextValue {\n const ctx = useContext(ProductInformationContext);\n if (ctx === PRODUCT_INFORMATION_CONTEXT_UNSET) {\n throw new Error('ProductInformation components must be used inside ProductInformationRoot.');\n }\n return ctx;\n}\n\n// ---------------------------------------------------------------------------\n// Transform\n// ---------------------------------------------------------------------------\n\nfunction transformProductInformationData(data: ProductSlice): ProductInformationContextData {\n const brand = data.brand?.name ?? data.vendor ?? null;\n const firstVariant = data.variants.edges[0]?.node ?? null;\n const sku = firstVariant?.sku ?? null;\n const variantName = firstVariant?.name ?? null;\n const seoTitle = data.seo?.title ?? null;\n\n return {\n title: data.title,\n description: data.description,\n descriptionHtml: data.descriptionHtml,\n referenceId: data.referenceId,\n brand,\n sku,\n variantName,\n seoTitle,\n };\n}\n\n// ---------------------------------------------------------------------------\n// Definitions\n// ---------------------------------------------------------------------------\n\nexport const ProductInformationRootDefinition = defineComponent<ProductInformationRootProps>({\n name: 'ProductInformationRoot',\n importPath: '@vtex/faststore/components',\n component: ProductInformationRoot,\n fragment,\n fetchStrategy: 'reactive',\n editor: { label: 'Product Information', category: 'commerce' },\n schema: {},\n providesContext: 'product-information',\n guideline:\n 'Root container for PDP product text — wraps ProductInformationTitle, ProductInformationDescription, ProductInformationBrand, ProductInformationSku, and ProductInformationReferenceId (any subset, any order). See product-information.md.',\n});\n\nexport const ProductInformationTitleDefinition = defineComponent<ProductInformationTitleProps>({\n name: 'ProductInformationTitle',\n importPath: '@vtex/faststore/components',\n component: ProductInformationTitle,\n editor: { label: 'Product Title', category: 'commerce' },\n schema: {\n as: {\n type: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const,\n default: 'h1',\n label: 'Element tag',\n },\n separator: { type: 'string', label: 'Variant separator' },\n },\n requiresContext: 'product-information',\n guideline:\n 'Renders the product title inside a ProductInformationRoot (or any ancestor providing `product-information` context); `as` controls the heading level (`h1`–`h6`, default `h1`) and `separator` optionally appends the selected variant name.',\n});\n\nexport const ProductInformationDescriptionDefinition = defineComponent<ProductInformationDescriptionProps>({\n name: 'ProductInformationDescription',\n importPath: '@vtex/faststore/components',\n component: ProductInformationDescription,\n editor: { label: 'Product Description', category: 'commerce' },\n schema: {\n format: {\n type: ['auto', 'plain', 'html'] as const,\n default: 'auto',\n label: 'Description format',\n },\n collapse: {\n type: ['none', 'showMore', 'section'] as const,\n default: 'none',\n label: 'Collapse pattern',\n },\n defaultExpanded: { type: 'boolean', default: true, label: 'Expanded by default' },\n collapsedLines: { type: 'number', default: 4, label: 'Collapsed line count' },\n moreLabel: { type: 'string', default: 'Show more', label: 'Trigger label (collapsed)' },\n lessLabel: { type: 'string', default: 'Show less', label: 'Trigger label (expanded)' },\n },\n requiresContext: 'product-information',\n guideline:\n \"Renders the product description inside a ProductInformationRoot (or any ancestor providing `product-information` context); `format` selects the source (`'auto'` default prefers HTML, `'plain'` forces plain text, `'html'` forces HTML only); `collapse` selects the reveal pattern (`'none'` default, `'showMore'` inline line-clamp via `collapsedLines` with `moreLabel`/`lessLabel`, `'section'` Base UI Collapsible disclosure).\",\n});\n\nexport const ProductInformationBrandDefinition = defineComponent<ProductInformationBrandProps>({\n name: 'ProductInformationBrand',\n importPath: '@vtex/faststore/components',\n component: ProductInformationBrand,\n editor: { label: 'Product Brand', category: 'commerce' },\n schema: {},\n requiresContext: 'product-information',\n guideline:\n 'Renders the product brand name inside a ProductInformationRoot (or any ancestor providing `product-information` context); prefers `brand.name` and falls back to `vendor`.',\n});\n\nexport const ProductInformationSkuDefinition = defineComponent<ProductInformationSkuProps>({\n name: 'ProductInformationSku',\n importPath: '@vtex/faststore/components',\n component: ProductInformationSku,\n editor: { label: 'Product SKU', category: 'commerce' },\n schema: {},\n requiresContext: 'product-information',\n guideline:\n 'Renders the first-variant SKU code inside a ProductInformationRoot (or any ancestor providing `product-information` context).',\n});\n\nexport const ProductInformationReferenceIdDefinition = defineComponent<ProductInformationReferenceIdProps>({\n name: 'ProductInformationReferenceId',\n importPath: '@vtex/faststore/components',\n component: ProductInformationReferenceId,\n editor: { label: 'Product Reference ID', category: 'commerce' },\n schema: {},\n requiresContext: 'product-information',\n guideline:\n 'Renders the merchant reference ID inside a ProductInformationRoot (or any ancestor providing `product-information` context).',\n});\n\n// ---------------------------------------------------------------------------\n// Implementations\n// ---------------------------------------------------------------------------\n\nexport function ProductInformationRoot({\n $data: $dataProp,\n className,\n children,\n ...props\n}: ProductInformationRootProps) {\n const $data = useDataOverride($dataProp);\n const contextValue = $data ? transformProductInformationData($data) : null;\n\n return (\n <ProductInformationContext value={contextValue}>\n <div {...props} className={className} data-fs-product-information=\"\">\n {children}\n </div>\n </ProductInformationContext>\n );\n}\n\nexport function ProductInformationTitle({ as = 'h1', separator, className, ...props }: ProductInformationTitleProps) {\n const ctx = useProductInformation();\n const variantName = ctx?.variantName ?? null;\n const warnedRef = useRef(false);\n const nullVariantSeenRef = useRef(false);\n\n // NFR-3: warn once in production when `separator` is set but `variantName` stays null across\n // commits (the SKU Selector gets one commit to hydrate before we conclude it's misconfigured).\n // No deps array: the persistence check needs to evaluate on every commit, independent of any\n // future memoization of the Root's context value.\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production') return;\n if (separator === undefined || !ctx) return;\n\n if (variantName === null) {\n if (nullVariantSeenRef.current && !warnedRef.current) {\n warnedRef.current = true;\n console.warn(\n '[ProductInformationTitle] `separator` is set but the selected variant has no `name`; the title will render the product name alone. Ensure the SKU Selector wires Variant.name into the cache, or omit `separator` to silence this warning.',\n );\n }\n nullVariantSeenRef.current = true;\n return;\n }\n\n nullVariantSeenRef.current = false;\n });\n\n if (!ctx) return null;\n\n const composed = separator !== undefined && variantName ? `${ctx.title}${separator}${variantName}` : ctx.title;\n\n const Component = as;\n return (\n <Component\n {...props}\n className={className}\n data-fs-product-information-title=\"\"\n data-fs-product-information-title-as={as}\n >\n {composed}\n </Component>\n );\n}\n\nexport function ProductInformationDescription({\n format = 'auto',\n collapse = 'none',\n defaultExpanded = true,\n collapsedLines = 4,\n moreLabel = 'Show more',\n lessLabel = 'Show less',\n className,\n ...props\n}: ProductInformationDescriptionProps) {\n const ctx = useProductInformation();\n if (!ctx) return null;\n\n // `'auto'` accepts both branches and prefers HTML; `'html'` and `'plain'` are strict opt-ins.\n const wantsRich = format === 'auto' || format === 'html';\n const wantsPlain = format === 'auto' || format === 'plain';\n const htmlPayload = wantsRich ? ctx.descriptionHtml : null;\n const plain = wantsPlain ? ctx.description : null;\n if (!htmlPayload && !plain) return null;\n\n // `format='auto'|'html'` is the opt-in: `descriptionHtml` is expected to be sanitized upstream by storefront-api-core.\n const htmlProps = htmlPayload ? { dangerouslySetInnerHTML: { __html: htmlPayload } } : undefined;\n const panelChildren = htmlPayload ? undefined : plain;\n\n if (collapse === 'none') {\n if (htmlPayload) {\n return (\n <div\n {...props}\n {...htmlProps}\n className={className}\n data-fs-product-information-description=\"\"\n data-fs-product-information-description-collapse=\"none\"\n data-fs-text=\"\"\n />\n );\n }\n\n return (\n <p\n {...props}\n className={className}\n data-fs-product-information-description=\"\"\n data-fs-product-information-description-collapse=\"none\"\n data-fs-text=\"\"\n >\n {plain}\n </p>\n );\n }\n\n return (\n <DescriptionCollapsible\n {...props}\n className={className}\n collapse={collapse}\n defaultExpanded={defaultExpanded}\n collapsedLines={collapsedLines}\n moreLabel={moreLabel}\n lessLabel={lessLabel}\n htmlProps={htmlProps}\n panelChildren={panelChildren}\n />\n );\n}\n\ntype DescriptionCollapsibleProps = Omit<ComponentPropsWithRef<'div'>, 'children' | 'dangerouslySetInnerHTML'> & {\n collapse: Exclude<Collapse, 'none'>;\n defaultExpanded: boolean;\n collapsedLines: number;\n moreLabel: string;\n lessLabel: string;\n htmlProps: { dangerouslySetInnerHTML: { __html: string } } | undefined;\n panelChildren: string | null | undefined;\n};\n\nfunction DescriptionCollapsible({\n collapse,\n defaultExpanded,\n collapsedLines,\n moreLabel,\n lessLabel,\n className,\n htmlProps,\n panelChildren,\n ...props\n}: DescriptionCollapsibleProps) {\n const [open, setOpen] = useState(defaultExpanded);\n // Only the 'showMore' branch uses panelId — its panel is a plain <div> we own end-to-end,\n // so the trigger needs an explicit aria-controls. 'section' lets Base UI manage both the\n // panel id and the trigger's aria-controls (per APG Disclosure: aria-controls is only\n // required when the panel is open), which keeps the SSR HTML self-consistent without the\n // layout-effect hop that Collapsible.Panel uses to sync an external id.\n const panelId = useId();\n\n // `collapsedLines` is a free `number` at the schema level, so 0, negatives, and decimals\n // can reach the component. `-webkit-line-clamp` accepts an integer ≥ 1; anything else\n // either renders no lines (0, negative) or behaves inconsistently across engines (decimals).\n // Clamp here so invalid values fall back to the smallest visible state instead of leaking\n // into the inline style.\n const normalizedCollapsedLines = Math.max(1, Math.floor(collapsedLines));\n\n const clampStyle: CSSProperties | undefined =\n collapse === 'showMore' && !open\n ? {\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: normalizedCollapsedLines,\n overflow: 'hidden',\n }\n : undefined;\n\n const triggerLabel = open ? lessLabel : moreLabel;\n\n return (\n <Collapsible.Root\n {...props}\n className={className}\n open={open}\n onOpenChange={setOpen}\n data-fs-product-information-description=\"\"\n data-fs-product-information-description-collapse={collapse}\n >\n {collapse === 'section' ? (\n <Collapsible.Panel\n {...htmlProps}\n hiddenUntilFound\n keepMounted\n data-fs-product-information-description-panel=\"\"\n data-fs-text=\"\"\n >\n {panelChildren}\n </Collapsible.Panel>\n ) : (\n <div\n {...htmlProps}\n id={panelId}\n data-fs-product-information-description-panel=\"\"\n data-fs-text=\"\"\n style={clampStyle}\n >\n {panelChildren}\n </div>\n )}\n <Collapsible.Trigger\n // Base UI's `mergeProps` writes every key from `elementProps`, including ones whose\n // value is `undefined` — passing `aria-controls={undefined}` would actively erase the\n // attribute Base UI installs on the trigger when the panel is open. Only attach our\n // own `aria-controls` for 'showMore', where we own the panel element directly.\n {...(collapse === 'section' ? null : { 'aria-controls': panelId })}\n data-fs-product-information-description-trigger=\"\"\n >\n {triggerLabel}\n </Collapsible.Trigger>\n </Collapsible.Root>\n );\n}\n\nexport function ProductInformationBrand({ className, ...props }: ProductInformationBrandProps) {\n const ctx = useProductInformation();\n if (!ctx || !ctx.brand) return null;\n\n return (\n <span {...props} className={className} data-fs-product-information-brand=\"\">\n {ctx.brand}\n </span>\n );\n}\n\nexport function ProductInformationSku({ className, ...props }: ProductInformationSkuProps) {\n const ctx = useProductInformation();\n if (!ctx || !ctx.sku) return null;\n\n return (\n <span {...props} className={className} data-fs-product-information-sku=\"\">\n {ctx.sku}\n </span>\n );\n}\n\nexport function ProductInformationReferenceId({ className, ...props }: ProductInformationReferenceIdProps) {\n const ctx = useProductInformation();\n if (!ctx || !ctx.referenceId) return null;\n\n return (\n <span {...props} className={className} data-fs-product-information-reference-id=\"\">\n {ctx.referenceId}\n </span>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Namespace export\n// ---------------------------------------------------------------------------\n\nexport const ProductInformation = {\n Root: ProductInformationRoot,\n Title: ProductInformationTitle,\n Description: ProductInformationDescription,\n Brand: ProductInformationBrand,\n Sku: ProductInformationSku,\n ReferenceId: ProductInformationReferenceId,\n};\n"],"mappings":";;;;;;;;;AAcA,MAAM,WAAW,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BxB;AAqBD,MAAM,oCAAoC,OAAO,gCAAgC;AAuDjF,MAAM,4BAA4B,cAEhC,iCAAiC;AAEnC,SAAS,wBAAwD;CAC/D,MAAM,MAAM,WAAW,yBAAyB;CAChD,IAAI,QAAQ,mCACV,MAAM,IAAI,MAAM,2EAA2E;CAE7F,OAAO;AACT;AAMA,SAAS,gCAAgC,MAAmD;CAC1F,MAAM,QAAQ,KAAK,OAAO,QAAQ,KAAK,UAAU;CACjD,MAAM,eAAe,KAAK,SAAS,MAAM,EAAE,EAAE,QAAQ;CACrD,MAAM,MAAM,cAAc,OAAO;CACjC,MAAM,cAAc,cAAc,QAAQ;CAC1C,MAAM,WAAW,KAAK,KAAK,SAAS;CAEpC,OAAO;EACL,OAAO,KAAK;EACZ,aAAa,KAAK;EAClB,iBAAiB,KAAK;EACtB,aAAa,KAAK;EAClB;EACA;EACA;EACA;CACF;AACF;AAMA,MAAa,mCAAmC,gBAA6C;CAC3F,MAAM;CACN,YAAY;CACZ,WAAW;CACX;CACA,eAAe;CACf,QAAQ;EAAE,OAAO;EAAuB,UAAU;CAAW;CAC7D,QAAQ,CAAC;CACT,iBAAiB;CACjB,WACE;AACJ,CAAC;AAED,MAAa,oCAAoC,gBAA8C;CAC7F,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE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AAC,YAAY,SAAb;GAKE,GAAK,aAAa,YAAY,OAAO,EAAE,iBAAiB,QAAQ;GAChE,mDAAgD;GAE/C,UAAA;EACkB,CAAA,CACL;;AAEtB;AAEA,SAAgB,wBAAwB,EAAE,WAAW,GAAG,SAAuC;CAC7F,MAAM,MAAM,sBAAsB;CAClC,IAAI,CAAC,OAAO,CAAC,IAAI,OAAO,OAAO;CAE/B,OACE,oBAAC,QAAD;EAAM,GAAI;EAAkB;EAAW,qCAAkC;EACtE,UAAA,IAAI;CACD,CAAA;AAEV;AAEA,SAAgB,sBAAsB,EAAE,WAAW,GAAG,SAAqC;CACzF,MAAM,MAAM,sBAAsB;CAClC,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,OAAO;CAE7B,OACE,oBAAC,QAAD;EAAM,GAAI;EAAkB;EAAW,mCAAgC;EACpE,UAAA,IAAI;CACD,CAAA;AAEV;AAEA,SAAgB,8BAA8B,EAAE,WAAW,GAAG,SAA6C;CACzG,MAAM,MAAM,sBAAsB;CAClC,IAAI,CAAC,OAAO,CAAC,IAAI,aAAa,OAAO;CAErC,OACE,oBAAC,QAAD;EAAM,GAAI;EAAkB;EAAW,4CAAyC;EAC7E,UAAA,IAAI;CACD,CAAA;AAEV;AAMA,MAAa,qBAAqB;CAChC,MAAM;CACN,OAAO;CACP,aAAa;CACb,OAAO;CACP,KAAK;CACL,aAAa;AACf"}
1
+ {"version":3,"file":"product-information.js","names":["Component"],"sources":["../../../src/matter/product-information/product-information.tsx"],"sourcesContent":["'use client';\n\nimport { Collapsible } from '@base-ui/react/collapsible';\nimport { type ContentValue, defineComponent, defineContentType, type MessageLocaleProp } from '@vtex/fs-core';\nimport type { ComponentPropsWithoutRef, ComponentPropsWithRef, CSSProperties } from 'react';\nimport { createContext, useContext, useEffect, useId, useRef, useState } from 'react';\nimport { useDataOverride } from '../../sdk/data/data-override-context.js';\nimport { graphql } from '../../sdk/generated/gql.js';\nimport type { ProductInformationDataFragment } from '../../sdk/generated/graphql.js';\nimport { useMessageFormatter } from '../../sdk/i18n/use-message-formatter.js';\n\n// ---------------------------------------------------------------------------\n// GraphQL Fragment — typed via @graphql-codegen client-preset\n// ---------------------------------------------------------------------------\n\nconst fragment = graphql(`\n fragment ProductInformationData on Query {\n productBySlug(slug: $slug) {\n __typename\n id\n title\n description\n descriptionHtml\n referenceId\n vendor\n brand {\n __typename\n id\n name\n }\n variants(first: 1) {\n edges {\n node {\n __typename\n id\n sku\n name\n }\n }\n }\n seo {\n title\n }\n }\n }\n`);\n\n// ---------------------------------------------------------------------------\n// Content model\n// ---------------------------------------------------------------------------\n\nexport const ProductInformationDescriptionContent = defineContentType({\n id: 'product-information-description',\n title: 'Product Information Description',\n description: 'Labels of the trigger that expands and collapses the product description.',\n schema: {\n type: 'object',\n additionalProperties: false,\n properties: {\n moreLabel: {\n type: 'string',\n title: 'Trigger label (collapsed)',\n format: 'icu-message',\n messageSource: 'Show more',\n },\n lessLabel: {\n type: 'string',\n title: 'Trigger label (expanded)',\n format: 'icu-message',\n messageSource: 'Show less',\n },\n },\n },\n});\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\ntype ProductSlice = NonNullable<ProductInformationDataFragment['productBySlug']>;\n\ntype ProductInformationContextData = {\n title: string;\n description: string | null;\n descriptionHtml: string | null;\n referenceId: string | null;\n brand: string | null;\n sku: string | null;\n variantName: string | null;\n seoTitle: string | null;\n};\n\ntype ProductInformationContextValue = ProductInformationContextData | null;\n\nconst PRODUCT_INFORMATION_CONTEXT_UNSET = Symbol('ProductInformationContextUnset');\n\ntype TitleAs = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport type DescriptionFormat = 'auto' | 'plain' | 'html';\n\ntype Collapse = 'none' | 'showMore' | 'section';\n\nexport type ProductInformationRootProps = ComponentPropsWithRef<'div'> & {\n $data?: ProductSlice | null;\n};\n\nexport type ProductInformationTitleProps = Omit<ComponentPropsWithRef<'h1'>, 'children'> & {\n as?: TitleAs;\n separator?: string;\n};\n\n// `ComponentPropsWithoutRef` (not `WithRef`) because the wrapper element varies between `<p>`\n// and `<div>` depending on the resolved `format` branch. Exposing a `ref` typed for one element\n// would be unsound when the other branch resolves — the runtime element type and the\n// type-system promise would diverge silently. Refs are intentionally not part of the contract.\nexport type ProductInformationDescriptionProps = Omit<\n ComponentPropsWithoutRef<'div'>,\n 'children' | 'dangerouslySetInnerHTML'\n> &\n MessageLocaleProp & {\n /**\n * Controls how the description renders.\n * - `'auto'` (default) — prefers `descriptionHtml`; falls back to plain `description`; renders nothing when both are absent.\n * - `'plain'` — strict plain text from `description`; never reads `descriptionHtml`.\n * - `'html'` — strict rich HTML from `descriptionHtml` via `dangerouslySetInnerHTML`; renders nothing when absent (no fallback).\n *\n * Rich HTML is safe because Storefront API Core sanitizes `descriptionHtml` upstream.\n *\n * The rendered element follows from the resolved branch: plain text renders as `<p>`;\n * rich HTML renders as `<div>` (so block-level markup inside `descriptionHtml` remains valid DOM).\n * Both wrappers carry `data-fs-text=\"\"` so project-level `Text` typography cascades automatically.\n */\n format?: DescriptionFormat;\n collapse?: Collapse;\n defaultExpanded?: boolean;\n collapsedLines?: number;\n $content?: ContentValue<typeof ProductInformationDescriptionContent>;\n };\n\nexport type ProductInformationBrandProps = Omit<ComponentPropsWithRef<'span'>, 'children'>;\n\nexport type ProductInformationSkuProps = Omit<ComponentPropsWithRef<'span'>, 'children'>;\n\nexport type ProductInformationReferenceIdProps = Omit<ComponentPropsWithRef<'span'>, 'children'>;\n\n// ---------------------------------------------------------------------------\n// Context\n// ---------------------------------------------------------------------------\n\nconst ProductInformationContext = createContext<\n ProductInformationContextValue | typeof PRODUCT_INFORMATION_CONTEXT_UNSET\n>(PRODUCT_INFORMATION_CONTEXT_UNSET);\n\nfunction useProductInformation(): ProductInformationContextValue {\n const ctx = useContext(ProductInformationContext);\n if (ctx === PRODUCT_INFORMATION_CONTEXT_UNSET) {\n throw new Error('ProductInformation components must be used inside ProductInformationRoot.');\n }\n return ctx;\n}\n\n// ---------------------------------------------------------------------------\n// Transform\n// ---------------------------------------------------------------------------\n\nfunction transformProductInformationData(data: ProductSlice): ProductInformationContextData {\n const brand = data.brand?.name ?? data.vendor ?? null;\n const firstVariant = data.variants.edges[0]?.node ?? null;\n const sku = firstVariant?.sku ?? null;\n const variantName = firstVariant?.name ?? null;\n const seoTitle = data.seo?.title ?? null;\n\n return {\n title: data.title,\n description: data.description,\n descriptionHtml: data.descriptionHtml,\n referenceId: data.referenceId,\n brand,\n sku,\n variantName,\n seoTitle,\n };\n}\n\n// ---------------------------------------------------------------------------\n// Definitions\n// ---------------------------------------------------------------------------\n\nexport const ProductInformationRootDefinition = defineComponent<ProductInformationRootProps>({\n name: 'ProductInformationRoot',\n importPath: '@vtex/faststore/components',\n component: ProductInformationRoot,\n fragment,\n fetchStrategy: 'reactive',\n editor: { label: 'Product Information', category: 'commerce' },\n schema: {},\n providesContext: 'product-information',\n guideline:\n 'Root container for PDP product text — wraps ProductInformationTitle, ProductInformationDescription, ProductInformationBrand, ProductInformationSku, and ProductInformationReferenceId (any subset, any order). See product-information.md.',\n});\n\nexport const ProductInformationTitleDefinition = defineComponent<ProductInformationTitleProps>({\n name: 'ProductInformationTitle',\n importPath: '@vtex/faststore/components',\n component: ProductInformationTitle,\n editor: { label: 'Product Title', category: 'commerce' },\n schema: {\n as: {\n type: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const,\n default: 'h1',\n label: 'Element tag',\n },\n separator: { type: 'string', label: 'Variant separator' },\n },\n requiresContext: 'product-information',\n guideline:\n 'Renders the product title inside a ProductInformationRoot (or any ancestor providing `product-information` context); `as` controls the heading level (`h1`–`h6`, default `h1`) and `separator` optionally appends the selected variant name.',\n});\n\nexport const ProductInformationDescriptionDefinition = defineComponent<ProductInformationDescriptionProps>({\n name: 'ProductInformationDescription',\n importPath: '@vtex/faststore/components',\n component: ProductInformationDescription,\n content: ProductInformationDescriptionContent,\n editor: { label: 'Product Description', category: 'commerce' },\n schema: {\n format: {\n type: ['auto', 'plain', 'html'] as const,\n default: 'auto',\n label: 'Description format',\n },\n collapse: {\n type: ['none', 'showMore', 'section'] as const,\n default: 'none',\n label: 'Collapse pattern',\n },\n defaultExpanded: { type: 'boolean', default: true, label: 'Expanded by default' },\n collapsedLines: { type: 'number', default: 4, label: 'Collapsed line count' },\n },\n requiresContext: 'product-information',\n guideline:\n \"Renders the product description inside a ProductInformationRoot (or any ancestor providing `product-information` context); `format` selects the source (`'auto'` default prefers HTML, `'plain'` forces plain text, `'html'` forces HTML only); `collapse` selects the reveal pattern (`'none'` default, `'showMore'` inline line-clamp via `collapsedLines` with the `$content` trigger labels `moreLabel`/`lessLabel`, `'section'` Base UI Collapsible disclosure).\",\n});\n\nexport const ProductInformationBrandDefinition = defineComponent<ProductInformationBrandProps>({\n name: 'ProductInformationBrand',\n importPath: '@vtex/faststore/components',\n component: ProductInformationBrand,\n editor: { label: 'Product Brand', category: 'commerce' },\n schema: {},\n requiresContext: 'product-information',\n guideline:\n 'Renders the product brand name inside a ProductInformationRoot (or any ancestor providing `product-information` context); prefers `brand.name` and falls back to `vendor`.',\n});\n\nexport const ProductInformationSkuDefinition = defineComponent<ProductInformationSkuProps>({\n name: 'ProductInformationSku',\n importPath: '@vtex/faststore/components',\n component: ProductInformationSku,\n editor: { label: 'Product SKU', category: 'commerce' },\n schema: {},\n requiresContext: 'product-information',\n guideline:\n 'Renders the first-variant SKU code inside a ProductInformationRoot (or any ancestor providing `product-information` context).',\n});\n\nexport const ProductInformationReferenceIdDefinition = defineComponent<ProductInformationReferenceIdProps>({\n name: 'ProductInformationReferenceId',\n importPath: '@vtex/faststore/components',\n component: ProductInformationReferenceId,\n editor: { label: 'Product Reference ID', category: 'commerce' },\n schema: {},\n requiresContext: 'product-information',\n guideline:\n 'Renders the merchant reference ID inside a ProductInformationRoot (or any ancestor providing `product-information` context).',\n});\n\n// ---------------------------------------------------------------------------\n// Implementations\n// ---------------------------------------------------------------------------\n\nexport function ProductInformationRoot({\n $data: $dataProp,\n className,\n children,\n ...props\n}: ProductInformationRootProps) {\n const $data = useDataOverride($dataProp);\n const contextValue = $data ? transformProductInformationData($data) : null;\n\n return (\n <ProductInformationContext value={contextValue}>\n <div {...props} className={className} data-fs-product-information=\"\">\n {children}\n </div>\n </ProductInformationContext>\n );\n}\n\nexport function ProductInformationTitle({ as = 'h1', separator, className, ...props }: ProductInformationTitleProps) {\n const ctx = useProductInformation();\n const variantName = ctx?.variantName ?? null;\n const warnedRef = useRef(false);\n const nullVariantSeenRef = useRef(false);\n\n // NFR-3: warn once in production when `separator` is set but `variantName` stays null across\n // commits (the SKU Selector gets one commit to hydrate before we conclude it's misconfigured).\n // No deps array: the persistence check needs to evaluate on every commit, independent of any\n // future memoization of the Root's context value.\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production') return;\n if (separator === undefined || !ctx) return;\n\n if (variantName === null) {\n if (nullVariantSeenRef.current && !warnedRef.current) {\n warnedRef.current = true;\n console.warn(\n '[ProductInformationTitle] `separator` is set but the selected variant has no `name`; the title will render the product name alone. Ensure the SKU Selector wires Variant.name into the cache, or omit `separator` to silence this warning.',\n );\n }\n nullVariantSeenRef.current = true;\n return;\n }\n\n nullVariantSeenRef.current = false;\n });\n\n if (!ctx) return null;\n\n const composed = separator !== undefined && variantName ? `${ctx.title}${separator}${variantName}` : ctx.title;\n\n const Component = as;\n return (\n <Component\n {...props}\n className={className}\n data-fs-product-information-title=\"\"\n data-fs-product-information-title-as={as}\n >\n {composed}\n </Component>\n );\n}\n\nexport function ProductInformationDescription({\n format = 'auto',\n collapse = 'none',\n defaultExpanded = true,\n collapsedLines = 4,\n $content,\n $locale,\n className,\n ...props\n}: ProductInformationDescriptionProps) {\n const ctx = useProductInformation();\n const { format: formatMessage } = useMessageFormatter(ProductInformationDescriptionContent, $content);\n if (!ctx) return null;\n\n // `'auto'` accepts both branches and prefers HTML; `'html'` and `'plain'` are strict opt-ins.\n const wantsRich = format === 'auto' || format === 'html';\n const wantsPlain = format === 'auto' || format === 'plain';\n const htmlPayload = wantsRich ? ctx.descriptionHtml : null;\n const plain = wantsPlain ? ctx.description : null;\n if (!htmlPayload && !plain) return null;\n\n // `format='auto'|'html'` is the opt-in: `descriptionHtml` is expected to be sanitized upstream by storefront-api-core.\n const htmlProps = htmlPayload ? { dangerouslySetInnerHTML: { __html: htmlPayload } } : undefined;\n const panelChildren = htmlPayload ? undefined : plain;\n\n if (collapse === 'none') {\n if (htmlPayload) {\n return (\n <div\n {...props}\n {...htmlProps}\n className={className}\n data-fs-product-information-description=\"\"\n data-fs-product-information-description-collapse=\"none\"\n data-fs-text=\"\"\n />\n );\n }\n\n return (\n <p\n {...props}\n className={className}\n data-fs-product-information-description=\"\"\n data-fs-product-information-description-collapse=\"none\"\n data-fs-text=\"\"\n >\n {plain}\n </p>\n );\n }\n\n return (\n <DescriptionCollapsible\n {...props}\n className={className}\n collapse={collapse}\n defaultExpanded={defaultExpanded}\n collapsedLines={collapsedLines}\n moreLabel={formatMessage('moreLabel')}\n lessLabel={formatMessage('lessLabel')}\n htmlProps={htmlProps}\n panelChildren={panelChildren}\n />\n );\n}\n\ntype DescriptionCollapsibleProps = Omit<ComponentPropsWithRef<'div'>, 'children' | 'dangerouslySetInnerHTML'> & {\n collapse: Exclude<Collapse, 'none'>;\n defaultExpanded: boolean;\n collapsedLines: number;\n moreLabel: string;\n lessLabel: string;\n htmlProps: { dangerouslySetInnerHTML: { __html: string } } | undefined;\n panelChildren: string | null | undefined;\n};\n\nfunction DescriptionCollapsible({\n collapse,\n defaultExpanded,\n collapsedLines,\n moreLabel,\n lessLabel,\n className,\n htmlProps,\n panelChildren,\n ...props\n}: DescriptionCollapsibleProps) {\n const [open, setOpen] = useState(defaultExpanded);\n // Only the 'showMore' branch uses panelId — its panel is a plain <div> we own end-to-end,\n // so the trigger needs an explicit aria-controls. 'section' lets Base UI manage both the\n // panel id and the trigger's aria-controls (per APG Disclosure: aria-controls is only\n // required when the panel is open), which keeps the SSR HTML self-consistent without the\n // layout-effect hop that Collapsible.Panel uses to sync an external id.\n const panelId = useId();\n\n // `collapsedLines` is a free `number` at the schema level, so 0, negatives, and decimals\n // can reach the component. `-webkit-line-clamp` accepts an integer ≥ 1; anything else\n // either renders no lines (0, negative) or behaves inconsistently across engines (decimals).\n // Clamp here so invalid values fall back to the smallest visible state instead of leaking\n // into the inline style.\n const normalizedCollapsedLines = Math.max(1, Math.floor(collapsedLines));\n\n const clampStyle: CSSProperties | undefined =\n collapse === 'showMore' && !open\n ? {\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: normalizedCollapsedLines,\n overflow: 'hidden',\n }\n : undefined;\n\n const triggerLabel = open ? lessLabel : moreLabel;\n\n return (\n <Collapsible.Root\n {...props}\n className={className}\n open={open}\n onOpenChange={setOpen}\n data-fs-product-information-description=\"\"\n data-fs-product-information-description-collapse={collapse}\n >\n {collapse === 'section' ? (\n <Collapsible.Panel\n {...htmlProps}\n hiddenUntilFound\n keepMounted\n data-fs-product-information-description-panel=\"\"\n data-fs-text=\"\"\n >\n {panelChildren}\n </Collapsible.Panel>\n ) : (\n <div\n {...htmlProps}\n id={panelId}\n data-fs-product-information-description-panel=\"\"\n data-fs-text=\"\"\n style={clampStyle}\n >\n {panelChildren}\n </div>\n )}\n <Collapsible.Trigger\n // Base UI's `mergeProps` writes every key from `elementProps`, including ones whose\n // value is `undefined` — passing `aria-controls={undefined}` would actively erase the\n // attribute Base UI installs on the trigger when the panel is open. Only attach our\n // own `aria-controls` for 'showMore', where we own the panel element directly.\n {...(collapse === 'section' ? null : { 'aria-controls': panelId })}\n data-fs-product-information-description-trigger=\"\"\n >\n {triggerLabel}\n </Collapsible.Trigger>\n </Collapsible.Root>\n );\n}\n\nexport function ProductInformationBrand({ className, ...props }: ProductInformationBrandProps) {\n const ctx = useProductInformation();\n if (!ctx || !ctx.brand) return null;\n\n return (\n <span {...props} className={className} data-fs-product-information-brand=\"\">\n {ctx.brand}\n </span>\n );\n}\n\nexport function ProductInformationSku({ className, ...props }: ProductInformationSkuProps) {\n const ctx = useProductInformation();\n if (!ctx || !ctx.sku) return null;\n\n return (\n <span {...props} className={className} data-fs-product-information-sku=\"\">\n {ctx.sku}\n </span>\n );\n}\n\nexport function ProductInformationReferenceId({ className, ...props }: ProductInformationReferenceIdProps) {\n const ctx = useProductInformation();\n if (!ctx || !ctx.referenceId) return null;\n\n return (\n <span {...props} className={className} data-fs-product-information-reference-id=\"\">\n {ctx.referenceId}\n </span>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Namespace export\n// ---------------------------------------------------------------------------\n\nexport const ProductInformation = {\n Root: ProductInformationRoot,\n Title: ProductInformationTitle,\n Description: ProductInformationDescription,\n Brand: ProductInformationBrand,\n Sku: ProductInformationSku,\n ReferenceId: ProductInformationReferenceId,\n};\n"],"mappings":";;;;;;;;;;;AAeA,MAAM,WAAW,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BxB;AAMD,MAAa,uCAAuC,kBAAkB;CACpE,IAAI;CACJ,OAAO;CACP,aAAa;CACb,QAAQ;EACN,MAAM;EACN,sBAAsB;EACtB,YAAY;GACV,WAAW;IACT,MAAM;IACN,OAAO;IACP,QAAQ;IACR,eAAe;GACjB;GACA,WAAW;IACT,MAAM;IACN,OAAO;IACP,QAAQ;IACR,eAAe;GACjB;EACF;CACF;AACF,CAAC;AAqBD,MAAM,oCAAoC,OAAO,gCAAgC;AAuDjF,MAAM,4BAA4B,cAEhC,iCAAiC;AAEnC,SAAS,wBAAwD;CAC/D,MAAM,MAAM,WAAW,yBAAyB;CAChD,IAAI,QAAQ,mCACV,MAAM,IAAI,MAAM,2EAA2E;CAE7F,OAAO;AACT;AAMA,SAAS,gCAAgC,MAAmD;CAC1F,MAAM,QAAQ,KAAK,OAAO,QAAQ,KAAK,UAAU;CACjD,MAAM,eAAe,KAAK,SAAS,MAAM,EAAE,EAAE,QAAQ;CACrD,MAAM,MAAM,cAAc,OAAO;CACjC,MAAM,cAAc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Aa;CACb,OAAO;CACP,KAAK;CACL,aAAa;AACf"}
@@ -1,8 +1,26 @@
1
+ import { ContentValue, MessageLocaleProp } from "../../core/dist/define-content-type.js";
1
2
  import { ComponentDefinition } from "../../core/dist/define-component.js";
2
3
  import "../../core/dist/index.js";
3
4
  import { ComponentActions } from "../../sdk/actions/types.js";
4
5
  import { ComponentPropsWithRef } from "react";
5
6
  //#region src/matter/product-list/product-list.d.ts
7
+ export declare const ProductCardTaxLabelContent: {
8
+ readonly id: "product-card-tax-label";
9
+ readonly title: "Product Card Tax Label";
10
+ readonly description: "Text of the tax label beside card prices.";
11
+ readonly schema: {
12
+ readonly type: "object";
13
+ readonly additionalProperties: false;
14
+ readonly properties: {
15
+ readonly label: {
16
+ readonly type: "string";
17
+ readonly title: "Label";
18
+ readonly format: "icu-message";
19
+ readonly messageSource: "Tax included";
20
+ };
21
+ };
22
+ };
23
+ };
6
24
  export type ProductListItemImage = {
7
25
  src: string;
8
26
  alt: string;
@@ -27,8 +45,6 @@ export type ProductListRootProps = ComponentPropsWithRef<'div'> & {
27
45
  products?: ProductListItem[];
28
46
  /** When true, card prices render tax-inclusive (from the item's tax data). Default false. */
29
47
  usePriceWithTaxes?: boolean;
30
- /** Text for the tax label part when tax display is on. Default `'Tax included'`. */
31
- taxesLabel?: string;
32
48
  };
33
49
  export type ProductListGridProps = ComponentPropsWithRef<'div'>;
34
50
  export type ProductCardProps = ComponentPropsWithRef<'div'> & {
@@ -43,7 +59,9 @@ export type ProductCardImageProps = ComponentPropsWithRef<'img'> & {
43
59
  export type ProductCardNameProps = ComponentPropsWithRef<'span'>;
44
60
  export type ProductCardPriceProps = ComponentPropsWithRef<'span'>;
45
61
  export type ProductCardListPriceProps = ComponentPropsWithRef<'span'>;
46
- export type ProductCardTaxLabelProps = ComponentPropsWithRef<'span'>;
62
+ export type ProductCardTaxLabelProps = ComponentPropsWithRef<'span'> & MessageLocaleProp & {
63
+ $content?: ContentValue<typeof ProductCardTaxLabelContent>;
64
+ };
47
65
  export type ProductCardDiscountProps = ComponentPropsWithRef<'span'> & {
48
66
  format?: 'percentage' | 'absolute';
49
67
  };
@@ -58,17 +76,17 @@ export declare const ProductCardImageDefinition: ComponentDefinition<ProductCard
58
76
  export declare const ProductCardNameDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
59
77
  export declare const ProductCardPriceDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
60
78
  export declare const ProductCardListPriceDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
61
- export declare const ProductCardTaxLabelDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
79
+ export declare const ProductCardTaxLabelDefinition: ComponentDefinition<ProductCardTaxLabelProps>;
62
80
  export declare const ProductCardDiscountDefinition: ComponentDefinition<ProductCardDiscountProps>;
63
81
  export declare const ProductCardAddToCartDefinition: ComponentDefinition<ProductCardAddToCartProps>;
64
- export declare function ProductListRoot({ usePriceWithTaxes, taxesLabel, products, className, children, ...props }: ProductListRootProps): import("react/jsx-runtime").JSX.Element;
82
+ export declare function ProductListRoot({ usePriceWithTaxes, products, className, children, ...props }: ProductListRootProps): import("react/jsx-runtime").JSX.Element;
65
83
  export declare function ProductListGrid({ className, children, ...props }: ProductListGridProps): import("react/jsx-runtime").JSX.Element;
66
84
  export declare function ProductCard({ className, children, bordered, ...props }: ProductCardProps): import("react/jsx-runtime").JSX.Element;
67
85
  export declare function ProductCardImage({ className, objectFit, aspectRatio, ...props }: ProductCardImageProps): import("react/jsx-runtime").JSX.Element;
68
86
  export declare function ProductCardName({ className, children, ...props }: ProductCardNameProps): import("react/jsx-runtime").JSX.Element;
69
87
  export declare function ProductCardPrice({ className, children, ...props }: ProductCardPriceProps): import("react/jsx-runtime").JSX.Element;
70
88
  export declare function ProductCardListPrice({ className, children, ...props }: ProductCardListPriceProps): import("react/jsx-runtime").JSX.Element | null;
71
- export declare function ProductCardTaxLabel({ className, children, ...props }: ProductCardTaxLabelProps): import("react/jsx-runtime").JSX.Element | null;
89
+ export declare function ProductCardTaxLabel({ $content, $locale, className, children, ...props }: ProductCardTaxLabelProps): import("react/jsx-runtime").JSX.Element | null;
72
90
  export declare function ProductCardDiscount({ className, children, format, ...props }: ProductCardDiscountProps): import("react/jsx-runtime").JSX.Element | null;
73
91
  export declare function ProductCardAddToCart({ className, children, onClick, $actions: $actionsProp, ...props }: ProductCardAddToCartProps): import("react/jsx-runtime").JSX.Element;
74
92
  export declare const ProductList: {
@@ -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 { useActionsOverride } from "../../sdk/actions/actions-override-context.js";
6
8
  import { Button } from "../../particles/button/button.js";
7
9
  import { Image } from "../../particles/image/image.js";
@@ -11,10 +13,22 @@ import { Text } from "../../particles/text/text.js";
11
13
  import { createContext, useContext, useMemo } from "react";
12
14
  import { jsx } from "react/jsx-runtime";
13
15
  //#region src/matter/product-list/product-list.tsx
14
- const ProductListConfigContext = createContext({
15
- usePriceWithTaxes: false,
16
- taxesLabel: "Tax included"
16
+ const ProductCardTaxLabelContent = defineContentType({
17
+ id: "product-card-tax-label",
18
+ title: "Product Card Tax Label",
19
+ description: "Text of the tax label beside card prices.",
20
+ schema: {
21
+ type: "object",
22
+ additionalProperties: false,
23
+ properties: { label: {
24
+ type: "string",
25
+ title: "Label",
26
+ format: "icu-message",
27
+ messageSource: "Tax included"
28
+ } }
29
+ }
17
30
  });
31
+ const ProductListConfigContext = createContext({ usePriceWithTaxes: false });
18
32
  function useProductListConfig() {
19
33
  return useContext(ProductListConfigContext);
20
34
  }
@@ -47,19 +61,12 @@ const ProductListRootDefinition = defineComponent({
47
61
  label: "Product List Root",
48
62
  category: "commerce"
49
63
  },
50
- schema: {
51
- usePriceWithTaxes: {
52
- type: "boolean",
53
- default: false,
54
- label: "Use Price With Taxes"
55
- },
56
- taxesLabel: {
57
- type: "string",
58
- default: "Tax included",
59
- label: "Taxes Label"
60
- }
61
- },
62
- guideline: "Top-level wrapper for the product list; compose as ProductListRoot > ProductListGrid > ProductCard* children. Set usePriceWithTaxes to render tax-inclusive card prices and compose ProductCardTaxLabel to show the taxesLabel."
64
+ schema: { usePriceWithTaxes: {
65
+ type: "boolean",
66
+ default: false,
67
+ label: "Use Price With Taxes"
68
+ } },
69
+ guideline: "Top-level wrapper for the product list; compose as ProductListRoot > ProductListGrid > ProductCard* children. Set usePriceWithTaxes to render tax-inclusive card prices and compose ProductCardTaxLabel to show the tax label."
63
70
  });
64
71
  const ProductListGridDefinition = defineComponent({
65
72
  name: "ProductListGrid",
@@ -150,12 +157,13 @@ const ProductCardTaxLabelDefinition = defineComponent({
150
157
  name: "ProductCardTaxLabel",
151
158
  importPath: "@vtex/faststore/components",
152
159
  component: ProductCardTaxLabel,
160
+ content: ProductCardTaxLabelContent,
153
161
  editor: {
154
162
  label: "Product Card Tax Label",
155
163
  category: "commerce"
156
164
  },
157
165
  schema: {},
158
- guideline: "Tax label (e.g. \"Tax included\") shown beside the price. Renders only when the ProductListRoot/ProductShelfRoot config usePriceWithTaxes is enabled (state-driven, no toggle); the text comes from the taxesLabel config. Compose it to place the label, omit it to hide it. Must be inside ProductListGrid / ProductShelfItems."
166
+ guideline: "Tax label (e.g. \"Tax included\") shown beside the price. Renders only when the ProductListRoot/ProductShelfRoot config usePriceWithTaxes is enabled (state-driven, no toggle); the text comes from its $content label, and children replace it. Compose it to place the label, omit it to hide it. Must be inside ProductListGrid / ProductShelfItems."
159
167
  });
160
168
  const ProductCardDiscountDefinition = defineComponent({
161
169
  name: "ProductCardDiscount",
@@ -184,11 +192,8 @@ const ProductCardAddToCartDefinition = defineComponent({
184
192
  actions: { cart: ["addItem"] },
185
193
  guideline: "Add-to-cart button for the current product card; must be inside ProductListGrid."
186
194
  });
187
- function ProductListRoot({ usePriceWithTaxes = false, taxesLabel = "Tax included", products = [], className, children, ...props }) {
188
- const config = useMemo(() => ({
189
- usePriceWithTaxes,
190
- taxesLabel
191
- }), [usePriceWithTaxes, taxesLabel]);
195
+ function ProductListRoot({ usePriceWithTaxes = false, products = [], className, children, ...props }) {
196
+ const config = useMemo(() => ({ usePriceWithTaxes }), [usePriceWithTaxes]);
192
197
  return /* @__PURE__ */ jsx(ProductListConfigContext, {
193
198
  value: config,
194
199
  children: /* @__PURE__ */ jsx(ProductListProductsContext, {
@@ -278,15 +283,16 @@ function ProductCardListPrice({ className, children, ...props }) {
278
283
  children: children ?? formatPrice(value, locale, item.currency ?? currency)
279
284
  });
280
285
  }
281
- function ProductCardTaxLabel({ className, children, ...props }) {
282
- const { usePriceWithTaxes, taxesLabel } = useProductListConfig();
286
+ function ProductCardTaxLabel({ $content, $locale, className, children, ...props }) {
287
+ const { usePriceWithTaxes } = useProductListConfig();
288
+ const { format } = useMessageFormatter(ProductCardTaxLabelContent, $content);
283
289
  if (!usePriceWithTaxes) return null;
284
290
  return /* @__PURE__ */ jsx(Text, {
285
291
  ...props,
286
292
  as: "span",
287
293
  className,
288
294
  "data-fs-product-card-tax-label": "",
289
- children: children ?? taxesLabel
295
+ children: children ?? format("label")
290
296
  });
291
297
  }
292
298
  function ProductCardDiscount({ className, children, format = "percentage", ...props }) {
@@ -339,6 +345,6 @@ const ProductList = {
339
345
  CardAddToCart: ProductCardAddToCart
340
346
  };
341
347
  //#endregion
342
- export { ProductCard, ProductCardAddToCart, ProductCardAddToCartDefinition, ProductCardDefinition, ProductCardDiscount, ProductCardDiscountDefinition, ProductCardImage, ProductCardImageDefinition, ProductCardListPrice, ProductCardListPriceDefinition, ProductCardName, ProductCardNameDefinition, ProductCardPrice, ProductCardPriceDefinition, ProductCardTaxLabel, ProductCardTaxLabelDefinition, ProductList, ProductListConfigContext, ProductListGrid, ProductListGridDefinition, ProductListItemContext, ProductListRoot, ProductListRootDefinition };
348
+ export { ProductCard, ProductCardAddToCart, ProductCardAddToCartDefinition, ProductCardDefinition, ProductCardDiscount, ProductCardDiscountDefinition, ProductCardImage, ProductCardImageDefinition, ProductCardListPrice, ProductCardListPriceDefinition, ProductCardName, ProductCardNameDefinition, ProductCardPrice, ProductCardPriceDefinition, ProductCardTaxLabel, ProductCardTaxLabelContent, ProductCardTaxLabelDefinition, ProductList, ProductListConfigContext, ProductListGrid, ProductListGridDefinition, ProductListItemContext, ProductListRoot, ProductListRootDefinition };
343
349
 
344
350
  //# sourceMappingURL=product-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-list.js","names":[],"sources":["../../../src/matter/product-list/product-list.tsx"],"sourcesContent":["'use client';\n\nimport { defineComponent } from '@vtex/fs-core';\nimport { type ComponentPropsWithRef, createContext, useContext, useMemo } from 'react';\nimport { Badge } from '../../particles/badge/badge.js';\nimport { Button } from '../../particles/button/button.js';\nimport { Container } from '../../particles/container/container.js';\nimport { Image } from '../../particles/image/image.js';\nimport { Text } from '../../particles/text/text.js';\nimport { useActionsOverride } from '../../sdk/actions/actions-override-context.js';\nimport type { ComponentActions } from '../../sdk/actions/types.js';\nimport { useStorefrontContext } from '../../sdk/context/storefront-context.js';\n\n// ---------------------------------------------------------------------------\n// Product list config context (tax display)\n// ---------------------------------------------------------------------------\n\ntype ProductListConfig = {\n usePriceWithTaxes: boolean;\n taxesLabel: string;\n};\n\nexport const ProductListConfigContext = createContext<ProductListConfig>({\n usePriceWithTaxes: false,\n taxesLabel: 'Tax included',\n});\n\nfunction useProductListConfig(): ProductListConfig {\n return useContext(ProductListConfigContext);\n}\n\nfunction formatPrice(value: number, locale: string, currency: string): string {\n return new Intl.NumberFormat(locale, { style: 'currency', currency }).format(value);\n}\n\n// Tax rate for the item: the explicit `taxPercentage` (e.g. 0.18) wins; otherwise it is derived\n// from the absolute tax amount over the price. Missing/zero-price data yields 0 (no change).\nfunction taxRate(item: ProductListItem): number {\n if (item.taxPercentage != null) {\n return item.taxPercentage;\n }\n if (item.tax != null && item.price > 0) {\n return item.tax / item.price;\n }\n return 0;\n}\n\nfunction priceWithTaxes(base: number, item: ProductListItem): number {\n return base * (1 + taxRate(item));\n}\n\n// ---------------------------------------------------------------------------\n// Product list item types\n// ---------------------------------------------------------------------------\n\nexport type ProductListItemImage = {\n src: string;\n alt: string;\n};\n\nexport type ProductListItem = {\n id: string;\n name: string;\n image: ProductListItemImage;\n price: number;\n listPrice?: number;\n variant?: string;\n slug?: string;\n // PDP path segment in the active locale; build product links from this, not `slug`.\n routeSlug?: string;\n // Widened for the Product Shelf (T2): fields the card parts T3–T7 read straight off the\n // per-item context. Optional so the plain-`products` ProductListRoot (PLP) stays valid.\n spotPrice?: number;\n tax?: number;\n taxPercentage?: number | null;\n availableForSale?: boolean;\n availableQuantity?: number;\n currency?: string;\n};\n\n// ---------------------------------------------------------------------------\n// Products context (provided by Root, consumed by Grid)\n// ---------------------------------------------------------------------------\n\nconst ProductListProductsContext = createContext<ProductListItem[]>([]);\n\n// ---------------------------------------------------------------------------\n// Item context (provided by Grid per product)\n// ---------------------------------------------------------------------------\n\nexport const ProductListItemContext = createContext<ProductListItem | null>(null);\n\nfunction useProductListItem(): ProductListItem {\n const item = useContext(ProductListItemContext);\n if (!item) {\n throw new Error('ProductCard components must be used inside ProductListGrid.');\n }\n return item;\n}\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type ProductListRootProps = ComponentPropsWithRef<'div'> & {\n products?: ProductListItem[];\n /** When true, card prices render tax-inclusive (from the item's tax data). Default false. */\n usePriceWithTaxes?: boolean;\n /** Text for the tax label part when tax display is on. Default `'Tax included'`. */\n taxesLabel?: string;\n};\n\nexport type ProductListGridProps = ComponentPropsWithRef<'div'>;\n\nexport type ProductCardProps = ComponentPropsWithRef<'div'> & {\n /** Toggles the card border. Reflects onto data-fs-product-card-bordered; a swatch draws the border. Default true. */\n bordered?: boolean;\n};\n\nexport type ProductCardImageProps = ComponentPropsWithRef<'img'> & {\n objectFit?: 'contain' | 'cover' | 'fill' | 'none';\n /** CSS `aspect-ratio` (e.g. `'1/1'`, `'3/4'`, `'16/9'`); lays out the image box, orthogonal to `objectFit`. */\n aspectRatio?: string;\n};\n\nexport type ProductCardNameProps = ComponentPropsWithRef<'span'>;\n\nexport type ProductCardPriceProps = ComponentPropsWithRef<'span'>;\n\nexport type ProductCardListPriceProps = ComponentPropsWithRef<'span'>;\n\nexport type ProductCardTaxLabelProps = ComponentPropsWithRef<'span'>;\n\nexport type ProductCardDiscountProps = ComponentPropsWithRef<'span'> & {\n format?: 'percentage' | 'absolute';\n};\n\nexport type ProductCardAddToCartProps = ComponentPropsWithRef<'button'> & {\n /** Injected by the compiler from `actions: { cart: ['addItem'] }`; the cart write surface. */\n $actions?: ComponentActions;\n};\n\n// ---------------------------------------------------------------------------\n// Definitions\n// ---------------------------------------------------------------------------\n\nexport const ProductListRootDefinition = defineComponent<ProductListRootProps>({\n name: 'ProductListRoot',\n importPath: '@vtex/faststore/components',\n component: ProductListRoot,\n editor: { label: 'Product List Root', category: 'commerce' },\n schema: {\n usePriceWithTaxes: { type: 'boolean', default: false, label: 'Use Price With Taxes' },\n taxesLabel: { type: 'string', default: 'Tax included', label: 'Taxes Label' },\n },\n guideline:\n 'Top-level wrapper for the product list; compose as ProductListRoot > ProductListGrid > ProductCard* children. Set usePriceWithTaxes to render tax-inclusive card prices and compose ProductCardTaxLabel to show the taxesLabel.',\n});\n\nexport const ProductListGridDefinition = defineComponent<ProductListGridProps>({\n name: 'ProductListGrid',\n importPath: '@vtex/faststore/components',\n component: ProductListGrid,\n editor: { label: 'Product List Grid', category: 'commerce' },\n schema: {},\n guideline:\n 'Repeating grid that renders the ProductCard* template for each product; must be a direct child of ProductListRoot.',\n});\n\nexport const ProductCardDefinition = defineComponent<ProductCardProps>({\n name: 'ProductCard',\n importPath: '@vtex/faststore/components',\n component: ProductCard,\n editor: { label: 'Product Card', category: 'commerce' },\n schema: {\n bordered: { type: 'boolean', default: true, label: 'Bordered' },\n },\n guideline:\n 'Optional card wrapper for the ProductCard* parts; always emits data-fs-product-card and data-fs-product-card-bordered (true/false, from the bordered toggle), and adds data-fs-product-card-out-of-stock when the product is unavailable (derived from availability, no prop). The border look is a swatch keyed off data-fs-product-card-bordered. Renders all children unchanged. Must be inside ProductListGrid / ProductShelfItems.',\n});\n\nexport const ProductCardImageDefinition = defineComponent<ProductCardImageProps>({\n name: 'ProductCardImage',\n importPath: '@vtex/faststore/components',\n component: ProductCardImage,\n editor: { label: 'Product Card Image', category: 'commerce' },\n schema: {\n objectFit: { type: ['contain', 'cover', 'fill', 'none'] as const, default: 'cover', label: 'Object Fit' },\n aspectRatio: { type: 'string', label: 'Aspect Ratio' },\n },\n guideline:\n 'Renders the product image with a configurable aspectRatio (e.g. 1/1, 3/4, 16/9) and objectFit. Alt text comes from the catalog. Must be inside ProductListGrid.',\n});\n\nexport const ProductCardNameDefinition = defineComponent<ProductCardNameProps>({\n name: 'ProductCardName',\n importPath: '@vtex/faststore/components',\n component: ProductCardName,\n editor: { label: 'Product Card Name', category: 'commerce' },\n schema: {},\n guideline: 'Renders the product name. Must be inside ProductListGrid.',\n});\n\nexport const ProductCardPriceDefinition = defineComponent<ProductCardPriceProps>({\n name: 'ProductCardPrice',\n importPath: '@vtex/faststore/components',\n component: ProductCardPrice,\n editor: { label: 'Product Card Price', category: 'commerce' },\n schema: {},\n guideline:\n 'Displays the selling price formatted from the active storefront context; renders tax-inclusive when usePriceWithTaxes is enabled. Must be inside ProductListGrid.',\n});\n\nexport const ProductCardListPriceDefinition = defineComponent<ProductCardListPriceProps>({\n name: 'ProductCardListPrice',\n importPath: '@vtex/faststore/components',\n component: ProductCardListPrice,\n editor: { label: 'Product Card List Price', category: 'commerce' },\n schema: {},\n guideline:\n 'Displays the original (strikethrough) list price when it exceeds the selling price; renders tax-inclusive when usePriceWithTaxes is enabled. Must be inside ProductListGrid.',\n});\n\nexport const ProductCardTaxLabelDefinition = defineComponent<ProductCardTaxLabelProps>({\n name: 'ProductCardTaxLabel',\n importPath: '@vtex/faststore/components',\n component: ProductCardTaxLabel,\n editor: { label: 'Product Card Tax Label', category: 'commerce' },\n schema: {},\n guideline:\n 'Tax label (e.g. \"Tax included\") shown beside the price. Renders only when the ProductListRoot/ProductShelfRoot config usePriceWithTaxes is enabled (state-driven, no toggle); the text comes from the taxesLabel config. Compose it to place the label, omit it to hide it. Must be inside ProductListGrid / ProductShelfItems.',\n});\n\nexport const ProductCardDiscountDefinition = defineComponent<ProductCardDiscountProps>({\n name: 'ProductCardDiscount',\n importPath: '@vtex/faststore/components',\n component: ProductCardDiscount,\n editor: { label: 'Product Card Discount', category: 'commerce' },\n schema: {\n format: { type: ['percentage', 'absolute'] as const, default: 'percentage', label: 'Discount Format' },\n },\n guideline:\n 'Discount badge for the current product; auto-computes the markdown from listPrice vs price and renders only when a discount exists. Compose it to show the badge, omit it to hide it (no toggle). Must be inside ProductListGrid / ProductShelfItems.',\n});\n\nexport const ProductCardAddToCartDefinition = defineComponent<ProductCardAddToCartProps>({\n name: 'ProductCardAddToCart',\n importPath: '@vtex/faststore/components',\n component: ProductCardAddToCart,\n editor: { label: 'Product Card Add to Cart', category: 'commerce' },\n schema: {},\n actions: { cart: ['addItem'] },\n guideline: 'Add-to-cart button for the current product card; must be inside ProductListGrid.',\n});\n\n// ---------------------------------------------------------------------------\n// Implementations\n// ---------------------------------------------------------------------------\n\nexport function ProductListRoot({\n usePriceWithTaxes = false,\n taxesLabel = 'Tax included',\n products = [],\n className,\n children,\n ...props\n}: ProductListRootProps) {\n const config = useMemo(() => ({ usePriceWithTaxes, taxesLabel }), [usePriceWithTaxes, taxesLabel]);\n\n return (\n <ProductListConfigContext value={config}>\n <ProductListProductsContext value={products}>\n <Container {...props} className={className} data-fs-product-list-root=\"\">\n {children}\n </Container>\n </ProductListProductsContext>\n </ProductListConfigContext>\n );\n}\n\nexport function ProductListGrid({ className, children, ...props }: ProductListGridProps) {\n const products = useContext(ProductListProductsContext);\n\n return (\n <Container {...props} className={className} data-fs-product-list-grid=\"\">\n {products.map((product) => (\n <ProductListItemContext key={product.id} value={product}>\n {children}\n </ProductListItemContext>\n ))}\n </Container>\n );\n}\n\nexport function ProductCard({ className, children, bordered = true, ...props }: ProductCardProps) {\n const item = useProductListItem();\n const outOfStock = item.availableForSale === false || item.availableQuantity === 0;\n\n return (\n <Container\n {...props}\n className={className}\n data-fs-product-card=\"\"\n data-fs-product-card-bordered={String(bordered)}\n data-fs-product-card-out-of-stock={outOfStock ? '' : undefined}\n >\n {children}\n </Container>\n );\n}\n\nexport function ProductCardImage({ className, objectFit = 'cover', aspectRatio, ...props }: ProductCardImageProps) {\n const item = useProductListItem();\n\n return (\n <Image\n {...props}\n src={item.image.src}\n alt={item.image.alt}\n aspectRatio={aspectRatio}\n className={className}\n style={{ objectFit, ...props.style }}\n data-fs-product-card-image=\"\"\n />\n );\n}\n\nexport function ProductCardName({ className, children, ...props }: ProductCardNameProps) {\n const item = useProductListItem();\n\n return (\n <Text {...props} as=\"span\" className={className} data-fs-product-card-name=\"\">\n {children ?? item.name}\n </Text>\n );\n}\n\nexport function ProductCardPrice({ className, children, ...props }: ProductCardPriceProps) {\n const item = useProductListItem();\n const { usePriceWithTaxes } = useProductListConfig();\n const { locale, currency } = useStorefrontContext();\n const value = usePriceWithTaxes ? priceWithTaxes(item.price, item) : item.price;\n\n return (\n <Text {...props} as=\"span\" className={className} data-fs-product-card-price=\"\">\n {children ?? formatPrice(value, locale, item.currency ?? currency)}\n </Text>\n );\n}\n\nexport function ProductCardListPrice({ className, children, ...props }: ProductCardListPriceProps) {\n const item = useProductListItem();\n const { usePriceWithTaxes } = useProductListConfig();\n const { locale, currency } = useStorefrontContext();\n\n if (!item.listPrice || item.listPrice <= item.price) {\n return null;\n }\n\n const value = usePriceWithTaxes ? priceWithTaxes(item.listPrice, item) : item.listPrice;\n\n return (\n <Text {...props} as=\"span\" className={className} data-fs-product-card-list-price=\"\">\n {children ?? formatPrice(value, locale, item.currency ?? currency)}\n </Text>\n );\n}\n\nexport function ProductCardTaxLabel({ className, children, ...props }: ProductCardTaxLabelProps) {\n const { usePriceWithTaxes, taxesLabel } = useProductListConfig();\n\n if (!usePriceWithTaxes) {\n return null;\n }\n\n return (\n <Text {...props} as=\"span\" className={className} data-fs-product-card-tax-label=\"\">\n {children ?? taxesLabel}\n </Text>\n );\n}\n\nexport function ProductCardDiscount({\n className,\n children,\n format = 'percentage',\n ...props\n}: ProductCardDiscountProps) {\n const item = useProductListItem();\n const { usePriceWithTaxes } = useProductListConfig();\n const { locale, currency } = useStorefrontContext();\n\n const { listPrice, price } = item;\n if (!listPrice || listPrice <= price) {\n return null;\n }\n\n const amountOff = listPrice - price;\n const percentOff = Math.round((amountOff / listPrice) * 100);\n const tier = percentOff >= 30 ? 'high' : percentOff >= 15 ? 'medium' : 'low';\n // The percentage is tax-invariant (both prices scale by the same factor), but the absolute amount\n // must match the displayed prices, which are tax-inclusive when usePriceWithTaxes is enabled.\n const displayedAmountOff = usePriceWithTaxes ? priceWithTaxes(amountOff, item) : amountOff;\n const label =\n format === 'absolute'\n ? `-${formatPrice(displayedAmountOff, locale, item.currency ?? currency)}`\n : `-${percentOff}%`;\n\n return (\n <Badge {...props} className={className} data-fs-product-card-discount=\"\" data-fs-product-card-discount-tier={tier}>\n {children ?? label}\n </Badge>\n );\n}\n\nexport function ProductCardAddToCart({\n className,\n children,\n onClick,\n $actions: $actionsProp,\n ...props\n}: ProductCardAddToCartProps) {\n const $actions = useActionsOverride($actionsProp);\n const item = useProductListItem();\n\n function handleClick(e: React.MouseEvent<HTMLButtonElement>) {\n void $actions?.cart?.addItem?.({ variantId: item.id, seller: '1' });\n onClick?.(e);\n }\n\n return (\n <Button {...props} className={className} onClick={handleClick} data-fs-product-card-add-to-cart=\"\">\n {children}\n </Button>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Namespace export\n// ---------------------------------------------------------------------------\n\nexport const ProductList = {\n Root: ProductListRoot,\n Grid: ProductListGrid,\n Card: ProductCard,\n CardImage: ProductCardImage,\n CardName: ProductCardName,\n CardPrice: ProductCardPrice,\n CardListPrice: ProductCardListPrice,\n CardTaxLabel: ProductCardTaxLabel,\n CardDiscount: ProductCardDiscount,\n CardAddToCart: ProductCardAddToCart,\n};\n"],"mappings":";;;;;;;;;;;;;AAsBA,MAAa,2BAA2B,cAAiC;CACvE,mBAAmB;CACnB,YAAY;AACd,CAAC;AAED,SAAS,uBAA0C;CACjD,OAAO,WAAW,wBAAwB;AAC5C;AAEA,SAAS,YAAY,OAAe,QAAgB,UAA0B;CAC5E,OAAO,IAAI,KAAK,aAAa,QAAQ;EAAE,OAAO;EAAY;CAAS,CAAC,CAAC,CAAC,OAAO,KAAK;AACpF;AAIA,SAAS,QAAQ,MAA+B;CAC9C,IAAI,KAAK,iBAAiB,MACxB,OAAO,KAAK;CAEd,IAAI,KAAK,OAAO,QAAQ,KAAK,QAAQ,GACnC,OAAO,KAAK,MAAM,KAAK;CAEzB,OAAO;AACT;AAEA,SAAS,eAAe,MAAc,MAA+B;CACnE,OAAO,QAAQ,IAAI,QAAQ,IAAI;AACjC;AAmCA,MAAM,6BAA6B,cAAiC,CAAC,CAAC;AAMtE,MAAa,yBAAyB,cAAsC,IAAI;AAEhF,SAAS,qBAAsC;CAC7C,MAAM,OAAO,WAAW,sBAAsB;CAC9C,IAAI,CAAC,MACH,MAAM,IAAI,MAAM,6DAA6D;CAE/E,OAAO;AACT;AAgDA,MAAa,4BAA4B,gBAAsC;CAC7E,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAqB,UAAU;CAAW;CAC3D,QAAQ;EACN,mBAAmB;GAAE,MAAM;GAAW,SAAS;GAAO,OAAO;EAAuB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;EAClE,UAAU,CAAC;CACb;CAEA,OACE,oBAAC,QAAD;EAAQ,GAAI;EAAkB;EAAW,SAAS;EAAa,oCAAiC;EAC7F;CACK,CAAA;AAEZ;AAMA,MAAa,cAAc;CACzB,MAAM;CACN,MAAM;CACN,MAAM;CACN,WAAW;CACX,UAAU;CACV,WAAW;CACX,eAAe;CACf,cAAc;CACd,cAAc;CACd,eAAe;AACjB"}
1
+ {"version":3,"file":"product-list.js","names":[],"sources":["../../../src/matter/product-list/product-list.tsx"],"sourcesContent":["'use client';\n\nimport { type ContentValue, defineComponent, defineContentType, type MessageLocaleProp } from '@vtex/fs-core';\nimport { type ComponentPropsWithRef, createContext, useContext, useMemo } from 'react';\nimport { Badge } from '../../particles/badge/badge.js';\nimport { Button } from '../../particles/button/button.js';\nimport { Container } from '../../particles/container/container.js';\nimport { Image } from '../../particles/image/image.js';\nimport { Text } from '../../particles/text/text.js';\nimport { useActionsOverride } from '../../sdk/actions/actions-override-context.js';\nimport type { ComponentActions } from '../../sdk/actions/types.js';\nimport { useStorefrontContext } from '../../sdk/context/storefront-context.js';\nimport { useMessageFormatter } from '../../sdk/i18n/use-message-formatter.js';\n\n// ---------------------------------------------------------------------------\n// Content model\n// ---------------------------------------------------------------------------\n\nexport const ProductCardTaxLabelContent = defineContentType({\n id: 'product-card-tax-label',\n title: 'Product Card Tax Label',\n description: 'Text of the tax label beside card prices.',\n schema: {\n type: 'object',\n additionalProperties: false,\n properties: {\n label: { type: 'string', title: 'Label', format: 'icu-message', messageSource: 'Tax included' },\n },\n },\n});\n\n// ---------------------------------------------------------------------------\n// Product list config context (tax display)\n// ---------------------------------------------------------------------------\n\ntype ProductListConfig = {\n usePriceWithTaxes: boolean;\n};\n\nexport const ProductListConfigContext = createContext<ProductListConfig>({\n usePriceWithTaxes: false,\n});\n\nfunction useProductListConfig(): ProductListConfig {\n return useContext(ProductListConfigContext);\n}\n\nfunction formatPrice(value: number, locale: string, currency: string): string {\n return new Intl.NumberFormat(locale, { style: 'currency', currency }).format(value);\n}\n\n// Tax rate for the item: the explicit `taxPercentage` (e.g. 0.18) wins; otherwise it is derived\n// from the absolute tax amount over the price. Missing/zero-price data yields 0 (no change).\nfunction taxRate(item: ProductListItem): number {\n if (item.taxPercentage != null) {\n return item.taxPercentage;\n }\n if (item.tax != null && item.price > 0) {\n return item.tax / item.price;\n }\n return 0;\n}\n\nfunction priceWithTaxes(base: number, item: ProductListItem): number {\n return base * (1 + taxRate(item));\n}\n\n// ---------------------------------------------------------------------------\n// Product list item types\n// ---------------------------------------------------------------------------\n\nexport type ProductListItemImage = {\n src: string;\n alt: string;\n};\n\nexport type ProductListItem = {\n id: string;\n name: string;\n image: ProductListItemImage;\n price: number;\n listPrice?: number;\n variant?: string;\n slug?: string;\n // PDP path segment in the active locale; build product links from this, not `slug`.\n routeSlug?: string;\n // Widened for the Product Shelf (T2): fields the card parts T3–T7 read straight off the\n // per-item context. Optional so the plain-`products` ProductListRoot (PLP) stays valid.\n spotPrice?: number;\n tax?: number;\n taxPercentage?: number | null;\n availableForSale?: boolean;\n availableQuantity?: number;\n currency?: string;\n};\n\n// ---------------------------------------------------------------------------\n// Products context (provided by Root, consumed by Grid)\n// ---------------------------------------------------------------------------\n\nconst ProductListProductsContext = createContext<ProductListItem[]>([]);\n\n// ---------------------------------------------------------------------------\n// Item context (provided by Grid per product)\n// ---------------------------------------------------------------------------\n\nexport const ProductListItemContext = createContext<ProductListItem | null>(null);\n\nfunction useProductListItem(): ProductListItem {\n const item = useContext(ProductListItemContext);\n if (!item) {\n throw new Error('ProductCard components must be used inside ProductListGrid.');\n }\n return item;\n}\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type ProductListRootProps = ComponentPropsWithRef<'div'> & {\n products?: ProductListItem[];\n /** When true, card prices render tax-inclusive (from the item's tax data). Default false. */\n usePriceWithTaxes?: boolean;\n};\n\nexport type ProductListGridProps = ComponentPropsWithRef<'div'>;\n\nexport type ProductCardProps = ComponentPropsWithRef<'div'> & {\n /** Toggles the card border. Reflects onto data-fs-product-card-bordered; a swatch draws the border. Default true. */\n bordered?: boolean;\n};\n\nexport type ProductCardImageProps = ComponentPropsWithRef<'img'> & {\n objectFit?: 'contain' | 'cover' | 'fill' | 'none';\n /** CSS `aspect-ratio` (e.g. `'1/1'`, `'3/4'`, `'16/9'`); lays out the image box, orthogonal to `objectFit`. */\n aspectRatio?: string;\n};\n\nexport type ProductCardNameProps = ComponentPropsWithRef<'span'>;\n\nexport type ProductCardPriceProps = ComponentPropsWithRef<'span'>;\n\nexport type ProductCardListPriceProps = ComponentPropsWithRef<'span'>;\n\nexport type ProductCardTaxLabelProps = ComponentPropsWithRef<'span'> &\n MessageLocaleProp & {\n $content?: ContentValue<typeof ProductCardTaxLabelContent>;\n };\n\nexport type ProductCardDiscountProps = ComponentPropsWithRef<'span'> & {\n format?: 'percentage' | 'absolute';\n};\n\nexport type ProductCardAddToCartProps = ComponentPropsWithRef<'button'> & {\n /** Injected by the compiler from `actions: { cart: ['addItem'] }`; the cart write surface. */\n $actions?: ComponentActions;\n};\n\n// ---------------------------------------------------------------------------\n// Definitions\n// ---------------------------------------------------------------------------\n\nexport const ProductListRootDefinition = defineComponent<ProductListRootProps>({\n name: 'ProductListRoot',\n importPath: '@vtex/faststore/components',\n component: ProductListRoot,\n editor: { label: 'Product List Root', category: 'commerce' },\n schema: {\n usePriceWithTaxes: { type: 'boolean', default: false, label: 'Use Price With Taxes' },\n },\n guideline:\n 'Top-level wrapper for the product list; compose as ProductListRoot > ProductListGrid > ProductCard* children. Set usePriceWithTaxes to render tax-inclusive card prices and compose ProductCardTaxLabel to show the tax label.',\n});\n\nexport const ProductListGridDefinition = defineComponent<ProductListGridProps>({\n name: 'ProductListGrid',\n importPath: '@vtex/faststore/components',\n component: ProductListGrid,\n editor: { label: 'Product List Grid', category: 'commerce' },\n schema: {},\n guideline:\n 'Repeating grid that renders the ProductCard* template for each product; must be a direct child of ProductListRoot.',\n});\n\nexport const ProductCardDefinition = defineComponent<ProductCardProps>({\n name: 'ProductCard',\n importPath: '@vtex/faststore/components',\n component: ProductCard,\n editor: { label: 'Product Card', category: 'commerce' },\n schema: {\n bordered: { type: 'boolean', default: true, label: 'Bordered' },\n },\n guideline:\n 'Optional card wrapper for the ProductCard* parts; always emits data-fs-product-card and data-fs-product-card-bordered (true/false, from the bordered toggle), and adds data-fs-product-card-out-of-stock when the product is unavailable (derived from availability, no prop). The border look is a swatch keyed off data-fs-product-card-bordered. Renders all children unchanged. Must be inside ProductListGrid / ProductShelfItems.',\n});\n\nexport const ProductCardImageDefinition = defineComponent<ProductCardImageProps>({\n name: 'ProductCardImage',\n importPath: '@vtex/faststore/components',\n component: ProductCardImage,\n editor: { label: 'Product Card Image', category: 'commerce' },\n schema: {\n objectFit: { type: ['contain', 'cover', 'fill', 'none'] as const, default: 'cover', label: 'Object Fit' },\n aspectRatio: { type: 'string', label: 'Aspect Ratio' },\n },\n guideline:\n 'Renders the product image with a configurable aspectRatio (e.g. 1/1, 3/4, 16/9) and objectFit. Alt text comes from the catalog. Must be inside ProductListGrid.',\n});\n\nexport const ProductCardNameDefinition = defineComponent<ProductCardNameProps>({\n name: 'ProductCardName',\n importPath: '@vtex/faststore/components',\n component: ProductCardName,\n editor: { label: 'Product Card Name', category: 'commerce' },\n schema: {},\n guideline: 'Renders the product name. Must be inside ProductListGrid.',\n});\n\nexport const ProductCardPriceDefinition = defineComponent<ProductCardPriceProps>({\n name: 'ProductCardPrice',\n importPath: '@vtex/faststore/components',\n component: ProductCardPrice,\n editor: { label: 'Product Card Price', category: 'commerce' },\n schema: {},\n guideline:\n 'Displays the selling price formatted from the active storefront context; renders tax-inclusive when usePriceWithTaxes is enabled. Must be inside ProductListGrid.',\n});\n\nexport const ProductCardListPriceDefinition = defineComponent<ProductCardListPriceProps>({\n name: 'ProductCardListPrice',\n importPath: '@vtex/faststore/components',\n component: ProductCardListPrice,\n editor: { label: 'Product Card List Price', category: 'commerce' },\n schema: {},\n guideline:\n 'Displays the original (strikethrough) list price when it exceeds the selling price; renders tax-inclusive when usePriceWithTaxes is enabled. Must be inside ProductListGrid.',\n});\n\nexport const ProductCardTaxLabelDefinition = defineComponent<ProductCardTaxLabelProps>({\n name: 'ProductCardTaxLabel',\n importPath: '@vtex/faststore/components',\n component: ProductCardTaxLabel,\n content: ProductCardTaxLabelContent,\n editor: { label: 'Product Card Tax Label', category: 'commerce' },\n schema: {},\n guideline:\n 'Tax label (e.g. \"Tax included\") shown beside the price. Renders only when the ProductListRoot/ProductShelfRoot config usePriceWithTaxes is enabled (state-driven, no toggle); the text comes from its $content label, and children replace it. Compose it to place the label, omit it to hide it. Must be inside ProductListGrid / ProductShelfItems.',\n});\n\nexport const ProductCardDiscountDefinition = defineComponent<ProductCardDiscountProps>({\n name: 'ProductCardDiscount',\n importPath: '@vtex/faststore/components',\n component: ProductCardDiscount,\n editor: { label: 'Product Card Discount', category: 'commerce' },\n schema: {\n format: { type: ['percentage', 'absolute'] as const, default: 'percentage', label: 'Discount Format' },\n },\n guideline:\n 'Discount badge for the current product; auto-computes the markdown from listPrice vs price and renders only when a discount exists. Compose it to show the badge, omit it to hide it (no toggle). Must be inside ProductListGrid / ProductShelfItems.',\n});\n\nexport const ProductCardAddToCartDefinition = defineComponent<ProductCardAddToCartProps>({\n name: 'ProductCardAddToCart',\n importPath: '@vtex/faststore/components',\n component: ProductCardAddToCart,\n editor: { label: 'Product Card Add to Cart', category: 'commerce' },\n schema: {},\n actions: { cart: ['addItem'] },\n guideline: 'Add-to-cart button for the current product card; must be inside ProductListGrid.',\n});\n\n// ---------------------------------------------------------------------------\n// Implementations\n// ---------------------------------------------------------------------------\n\nexport function ProductListRoot({\n usePriceWithTaxes = false,\n products = [],\n className,\n children,\n ...props\n}: ProductListRootProps) {\n const config = useMemo(() => ({ usePriceWithTaxes }), [usePriceWithTaxes]);\n\n return (\n <ProductListConfigContext value={config}>\n <ProductListProductsContext value={products}>\n <Container {...props} className={className} data-fs-product-list-root=\"\">\n {children}\n </Container>\n </ProductListProductsContext>\n </ProductListConfigContext>\n );\n}\n\nexport function ProductListGrid({ className, children, ...props }: ProductListGridProps) {\n const products = useContext(ProductListProductsContext);\n\n return (\n <Container {...props} className={className} data-fs-product-list-grid=\"\">\n {products.map((product) => (\n <ProductListItemContext key={product.id} value={product}>\n {children}\n </ProductListItemContext>\n ))}\n </Container>\n );\n}\n\nexport function ProductCard({ className, children, bordered = true, ...props }: ProductCardProps) {\n const item = useProductListItem();\n const outOfStock = item.availableForSale === false || item.availableQuantity === 0;\n\n return (\n <Container\n {...props}\n className={className}\n data-fs-product-card=\"\"\n data-fs-product-card-bordered={String(bordered)}\n data-fs-product-card-out-of-stock={outOfStock ? '' : undefined}\n >\n {children}\n </Container>\n );\n}\n\nexport function ProductCardImage({ className, objectFit = 'cover', aspectRatio, ...props }: ProductCardImageProps) {\n const item = useProductListItem();\n\n return (\n <Image\n {...props}\n src={item.image.src}\n alt={item.image.alt}\n aspectRatio={aspectRatio}\n className={className}\n style={{ objectFit, ...props.style }}\n data-fs-product-card-image=\"\"\n />\n );\n}\n\nexport function ProductCardName({ className, children, ...props }: ProductCardNameProps) {\n const item = useProductListItem();\n\n return (\n <Text {...props} as=\"span\" className={className} data-fs-product-card-name=\"\">\n {children ?? item.name}\n </Text>\n );\n}\n\nexport function ProductCardPrice({ className, children, ...props }: ProductCardPriceProps) {\n const item = useProductListItem();\n const { usePriceWithTaxes } = useProductListConfig();\n const { locale, currency } = useStorefrontContext();\n const value = usePriceWithTaxes ? priceWithTaxes(item.price, item) : item.price;\n\n return (\n <Text {...props} as=\"span\" className={className} data-fs-product-card-price=\"\">\n {children ?? formatPrice(value, locale, item.currency ?? currency)}\n </Text>\n );\n}\n\nexport function ProductCardListPrice({ className, children, ...props }: ProductCardListPriceProps) {\n const item = useProductListItem();\n const { usePriceWithTaxes } = useProductListConfig();\n const { locale, currency } = useStorefrontContext();\n\n if (!item.listPrice || item.listPrice <= item.price) {\n return null;\n }\n\n const value = usePriceWithTaxes ? priceWithTaxes(item.listPrice, item) : item.listPrice;\n\n return (\n <Text {...props} as=\"span\" className={className} data-fs-product-card-list-price=\"\">\n {children ?? formatPrice(value, locale, item.currency ?? currency)}\n </Text>\n );\n}\n\nexport function ProductCardTaxLabel({ $content, $locale, className, children, ...props }: ProductCardTaxLabelProps) {\n const { usePriceWithTaxes } = useProductListConfig();\n const { format } = useMessageFormatter(ProductCardTaxLabelContent, $content);\n\n if (!usePriceWithTaxes) {\n return null;\n }\n\n return (\n <Text {...props} as=\"span\" className={className} data-fs-product-card-tax-label=\"\">\n {children ?? format('label')}\n </Text>\n );\n}\n\nexport function ProductCardDiscount({\n className,\n children,\n format = 'percentage',\n ...props\n}: ProductCardDiscountProps) {\n const item = useProductListItem();\n const { usePriceWithTaxes } = useProductListConfig();\n const { locale, currency } = useStorefrontContext();\n\n const { listPrice, price } = item;\n if (!listPrice || listPrice <= price) {\n return null;\n }\n\n const amountOff = listPrice - price;\n const percentOff = Math.round((amountOff / listPrice) * 100);\n const tier = percentOff >= 30 ? 'high' : percentOff >= 15 ? 'medium' : 'low';\n // The percentage is tax-invariant (both prices scale by the same factor), but the absolute amount\n // must match the displayed prices, which are tax-inclusive when usePriceWithTaxes is enabled.\n const displayedAmountOff = usePriceWithTaxes ? priceWithTaxes(amountOff, item) : amountOff;\n const label =\n format === 'absolute'\n ? `-${formatPrice(displayedAmountOff, locale, item.currency ?? currency)}`\n : `-${percentOff}%`;\n\n return (\n <Badge {...props} className={className} data-fs-product-card-discount=\"\" data-fs-product-card-discount-tier={tier}>\n {children ?? label}\n </Badge>\n );\n}\n\nexport function ProductCardAddToCart({\n className,\n children,\n onClick,\n $actions: $actionsProp,\n ...props\n}: ProductCardAddToCartProps) {\n const $actions = useActionsOverride($actionsProp);\n const item = useProductListItem();\n\n function handleClick(e: React.MouseEvent<HTMLButtonElement>) {\n void $actions?.cart?.addItem?.({ variantId: item.id, seller: '1' });\n onClick?.(e);\n }\n\n return (\n <Button {...props} className={className} onClick={handleClick} data-fs-product-card-add-to-cart=\"\">\n {children}\n </Button>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Namespace export\n// ---------------------------------------------------------------------------\n\nexport const ProductList = {\n Root: ProductListRoot,\n Grid: ProductListGrid,\n Card: ProductCard,\n CardImage: ProductCardImage,\n CardName: ProductCardName,\n CardPrice: ProductCardPrice,\n CardListPrice: ProductCardListPrice,\n CardTaxLabel: ProductCardTaxLabel,\n CardDiscount: ProductCardDiscount,\n CardAddToCart: ProductCardAddToCart,\n};\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,MAAa,6BAA6B,kBAAkB;CAC1D,IAAI;CACJ,OAAO;CACP,aAAa;CACb,QAAQ;EACN,MAAM;EACN,sBAAsB;EACtB,YAAY,EACV,OAAO;GAAE,MAAM;GAAU,OAAO;GAAS,QAAQ;GAAe,eAAe;EAAe,EAChG;CACF;AACF,CAAC;AAUD,MAAa,2BAA2B,cAAiC,EACvE,mBAAmB,MACrB,CAAC;AAED,SAAS,uBAA0C;CACjD,OAAO,WAAW,wBAAwB;AAC5C;AAEA,SAAS,YAAY,OAAe,QAAgB,UAA0B;CAC5E,OAAO,IAAI,KAAK,aAAa,QAAQ;EAAE,OAAO;EAAY;CAAS,CAAC,CAAC,CAAC,OAAO,KAAK;AACpF;AAIA,SAAS,QAAQ,MAA+B;CAC9C,IAAI,KAAK,iBAAiB,MACxB,OAAO,KAAK;CAEd,IAAI,KAAK,OAAO,QAAQ,KAAK,QAAQ,GACnC,OAAO,KAAK,MAAM,KAAK;CAEzB,OAAO;AACT;AAEA,SAAS,eAAe,MAAc,MAA+B;CACnE,OAAO,QAAQ,IAAI,QAAQ,IAAI;AACjC;AAmCA,MAAM,6BAA6B,cAAiC,CAAC,CAAC;AAMtE,MAAa,yBAAyB,cAAsC,IAAI;AAEhF,SAAS,qBAAsC;CAC7C,MAAM,OAAO,WAAW,sBAAsB;CAC9C,IAAI,CAAC,MACH,MAAM,IAAI,MAAM,6DAA6D;CAE/E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A,UACA,SACA,UAAU,cACV,GAAG,SACyB;CAC5B,MAAM,WAAW,mBAAmB,YAAY;CAChD,MAAM,OAAO,mBAAmB;CAEhC,SAAS,YAAY,GAAwC;EAC3D,UAAe,MAAM,UAAU;GAAE,WAAW,KAAK;GAAI,QAAQ;EAAI,CAAC;EAClE,UAAU,CAAC;CACb;CAEA,OACE,oBAAC,QAAD;EAAQ,GAAI;EAAkB;EAAW,SAAS;EAAa,oCAAiC;EAC7F;CACK,CAAA;AAEZ;AAMA,MAAa,cAAc;CACzB,MAAM;CACN,MAAM;CACN,MAAM;CACN,WAAW;CACX,UAAU;CACV,WAAW;CACX,eAAe;CACf,cAAc;CACd,cAAc;CACd,eAAe;AACjB"}
@@ -120,8 +120,6 @@ export type ProductShelfRootProps = ComponentPropsWithRef<'section'> & Partial<P
120
120
  itemsPerPage?: number;
121
121
  /** When true, card prices render tax-inclusive (from each item's tax data). Default false. */
122
122
  usePriceWithTaxes?: boolean;
123
- /** Text for the tax label part when tax display is on. Default `'Tax included'`. */
124
- taxesLabel?: string;
125
123
  products?: ProductShelfItem[];
126
124
  /** Injected by the compiler, sliced from the page's or layout's composite content entry. */
127
125
  $content?: ContentValue<typeof ProductShelfContent>;
@@ -141,7 +139,7 @@ export declare const ProductShelfRootDefinition: ComponentDefinition<ProductShel
141
139
  export declare const ProductShelfOnMountRootDefinition: ComponentDefinition<ProductShelfOnMountRootProps>;
142
140
  export declare const ProductShelfItemsDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
143
141
  export declare const ProductShelfHeadingDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
144
- export declare function ProductShelfRoot({ first, itemsPerPage, sort, searchTerm, categoryId, brandId, collectionId, availableOnly, usePriceWithTaxes, taxesLabel, products, $content, $data: $dataProp, className, children, ...props }: ProductShelfRootProps): import("react/jsx-runtime").JSX.Element | null;
142
+ export declare function ProductShelfRoot({ first, itemsPerPage, sort, searchTerm, categoryId, brandId, collectionId, availableOnly, usePriceWithTaxes, products, $content, $data: $dataProp, className, children, ...props }: ProductShelfRootProps): import("react/jsx-runtime").JSX.Element | null;
145
143
  export declare namespace ProductShelfRoot {
146
144
  var Skeleton: typeof ProductShelfSkeleton;
147
145
  }