@vtex/faststore 0.0.1

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 (538) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/LICENSE +21 -0
  3. package/README.md +95 -0
  4. package/dist/actions.json +334 -0
  5. package/dist/catalog.json +6615 -0
  6. package/dist/client.d.ts +17 -0
  7. package/dist/client.js +8 -0
  8. package/dist/components.d.ts +87 -0
  9. package/dist/components.js +87 -0
  10. package/dist/content-types.json +684 -0
  11. package/dist/core/dist/actions/mock-action.d.ts +24 -0
  12. package/dist/core/dist/actions/mock-action.js +28 -0
  13. package/dist/core/dist/actions/mock-action.js.map +1 -0
  14. package/dist/core/dist/actions/registry.d.ts +24 -0
  15. package/dist/core/dist/actions/registry.js +28 -0
  16. package/dist/core/dist/actions/registry.js.map +1 -0
  17. package/dist/core/dist/define-component.d.ts +100 -0
  18. package/dist/core/dist/define-component.js +8 -0
  19. package/dist/core/dist/define-component.js.map +1 -0
  20. package/dist/core/dist/define-content-type.d.ts +95 -0
  21. package/dist/core/dist/define-content-type.js +283 -0
  22. package/dist/core/dist/define-content-type.js.map +1 -0
  23. package/dist/core/dist/index.d.ts +7 -0
  24. package/dist/core/dist/index.js +5 -0
  25. package/dist/core/dist/schema/generated/schema.d.ts +28 -0
  26. package/dist/core/dist/types.d.ts +1 -0
  27. package/dist/docs/access-code-field.md +100 -0
  28. package/dist/docs/access-code-sign-in.md +174 -0
  29. package/dist/docs/account-entry-point.md +155 -0
  30. package/dist/docs/address-summary.md +50 -0
  31. package/dist/docs/buy-button.md +162 -0
  32. package/dist/docs/carousel.md +105 -0
  33. package/dist/docs/cart-item.md +162 -0
  34. package/dist/docs/cart-totalizer.md +197 -0
  35. package/dist/docs/cart.md +495 -0
  36. package/dist/docs/client-preferences.md +184 -0
  37. package/dist/docs/client-profile-form.md +192 -0
  38. package/dist/docs/client-profile.md +117 -0
  39. package/dist/docs/container.md +97 -0
  40. package/dist/docs/document-field.md +97 -0
  41. package/dist/docs/email-field.md +93 -0
  42. package/dist/docs/email-identification.md +102 -0
  43. package/dist/docs/footer-copyright.md +112 -0
  44. package/dist/docs/footer-link-group.md +162 -0
  45. package/dist/docs/footer-root.md +145 -0
  46. package/dist/docs/footer-social.md +151 -0
  47. package/dist/docs/free-shipping-progress.md +87 -0
  48. package/dist/docs/gallery.md +84 -0
  49. package/dist/docs/header-root.md +150 -0
  50. package/dist/docs/identity-edit.md +88 -0
  51. package/dist/docs/identity-summary.md +106 -0
  52. package/dist/docs/incentives.md +151 -0
  53. package/dist/docs/logo.md +135 -0
  54. package/dist/docs/meter.md +67 -0
  55. package/dist/docs/navigation-link-list.md +171 -0
  56. package/dist/docs/navigation-link.md +163 -0
  57. package/dist/docs/navigation-menu.md +264 -0
  58. package/dist/docs/payment-methods.md +139 -0
  59. package/dist/docs/phone-field.md +106 -0
  60. package/dist/docs/postal-code-field.md +126 -0
  61. package/dist/docs/pricing.md +499 -0
  62. package/dist/docs/product-gallery.md +409 -0
  63. package/dist/docs/product-information.md +295 -0
  64. package/dist/docs/product-list.md +170 -0
  65. package/dist/docs/product-quantity.md +88 -0
  66. package/dist/docs/product-shelf.md +141 -0
  67. package/dist/docs/promotion.md +109 -0
  68. package/dist/docs/region.md +225 -0
  69. package/dist/docs/session.md +123 -0
  70. package/dist/docs/shipping-address.md +390 -0
  71. package/dist/docs/shipping-simulator.md +147 -0
  72. package/dist/docs/sign-in-form.md +117 -0
  73. package/dist/docs/tabs.md +176 -0
  74. package/dist/docs/toast.md +124 -0
  75. package/dist/docs/variant-selector.md +450 -0
  76. package/dist/graphql/define-subgraph.d.ts +12 -0
  77. package/dist/graphql/define-subgraph.js +15 -0
  78. package/dist/graphql/define-subgraph.js.map +1 -0
  79. package/dist/graphql/gql.d.ts +10 -0
  80. package/dist/graphql/gql.js +16 -0
  81. package/dist/graphql/gql.js.map +1 -0
  82. package/dist/graphql/types.d.ts +88 -0
  83. package/dist/graphql.d.ts +4 -0
  84. package/dist/graphql.js +3 -0
  85. package/dist/index.d.ts +19 -0
  86. package/dist/index.js +5 -0
  87. package/dist/internal/client.d.ts +24 -0
  88. package/dist/internal/client.js +23 -0
  89. package/dist/internal/content.d.ts +2 -0
  90. package/dist/internal/content.js +2 -0
  91. package/dist/internal/server.d.ts +7 -0
  92. package/dist/internal/server.js +6 -0
  93. package/dist/matter/access-code-sign-in/access-code-sign-in.d.ts +111 -0
  94. package/dist/matter/access-code-sign-in/access-code-sign-in.js +387 -0
  95. package/dist/matter/access-code-sign-in/access-code-sign-in.js.map +1 -0
  96. package/dist/matter/account-entry-point/account-entry-point.d.ts +64 -0
  97. package/dist/matter/account-entry-point/account-entry-point.js +151 -0
  98. package/dist/matter/account-entry-point/account-entry-point.js.map +1 -0
  99. package/dist/matter/breadcrumb/breadcrumb.d.ts +40 -0
  100. package/dist/matter/breadcrumb/breadcrumb.js +155 -0
  101. package/dist/matter/breadcrumb/breadcrumb.js.map +1 -0
  102. package/dist/matter/buy-button/buy-button.d.ts +95 -0
  103. package/dist/matter/buy-button/buy-button.js +259 -0
  104. package/dist/matter/buy-button/buy-button.js.map +1 -0
  105. package/dist/matter/cart/cart-namespace.d.ts +48 -0
  106. package/dist/matter/cart/cart-namespace.js +50 -0
  107. package/dist/matter/cart/cart-namespace.js.map +1 -0
  108. package/dist/matter/cart/cart.d.ts +312 -0
  109. package/dist/matter/cart/cart.js +1034 -0
  110. package/dist/matter/cart/cart.js.map +1 -0
  111. package/dist/matter/cart-item/cart-item.d.ts +103 -0
  112. package/dist/matter/cart-item/cart-item.js +672 -0
  113. package/dist/matter/cart-item/cart-item.js.map +1 -0
  114. package/dist/matter/cart-item-compositions/cart-item-compositions.d.ts +49 -0
  115. package/dist/matter/cart-item-compositions/cart-item-compositions.js +165 -0
  116. package/dist/matter/cart-item-compositions/cart-item-compositions.js.map +1 -0
  117. package/dist/matter/cart-item-customizations/cart-item-customizations.d.ts +28 -0
  118. package/dist/matter/cart-item-customizations/cart-item-customizations.js +73 -0
  119. package/dist/matter/cart-item-customizations/cart-item-customizations.js.map +1 -0
  120. package/dist/matter/cart-item-discounts/cart-item-discounts.d.ts +33 -0
  121. package/dist/matter/cart-item-discounts/cart-item-discounts.js +70 -0
  122. package/dist/matter/cart-item-discounts/cart-item-discounts.js.map +1 -0
  123. package/dist/matter/cart-item-seller-info/cart-item-seller-info.d.ts +24 -0
  124. package/dist/matter/cart-item-seller-info/cart-item-seller-info.js +54 -0
  125. package/dist/matter/cart-item-seller-info/cart-item-seller-info.js.map +1 -0
  126. package/dist/matter/cart-item-variations/cart-item-variations.d.ts +27 -0
  127. package/dist/matter/cart-item-variations/cart-item-variations.js +69 -0
  128. package/dist/matter/cart-item-variations/cart-item-variations.js.map +1 -0
  129. package/dist/matter/cart-totalizer/cart-totalizer.d.ts +78 -0
  130. package/dist/matter/cart-totalizer/cart-totalizer.js +220 -0
  131. package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -0
  132. package/dist/matter/client-preferences/client-preferences.d.ts +50 -0
  133. package/dist/matter/client-preferences/client-preferences.js +206 -0
  134. package/dist/matter/client-preferences/client-preferences.js.map +1 -0
  135. package/dist/matter/client-profile/client-profile.d.ts +59 -0
  136. package/dist/matter/client-profile/client-profile.js +185 -0
  137. package/dist/matter/client-profile/client-profile.js.map +1 -0
  138. package/dist/matter/client-profile-form/client-profile-form.d.ts +126 -0
  139. package/dist/matter/client-profile-form/client-profile-form.js +660 -0
  140. package/dist/matter/client-profile-form/client-profile-form.js.map +1 -0
  141. package/dist/matter/delivery-options/delivery-options-accordion.d.ts +30 -0
  142. package/dist/matter/delivery-options/delivery-options-accordion.js +189 -0
  143. package/dist/matter/delivery-options/delivery-options-accordion.js.map +1 -0
  144. package/dist/matter/delivery-options/delivery-options-controller.d.ts +49 -0
  145. package/dist/matter/delivery-options/delivery-options-controller.js +203 -0
  146. package/dist/matter/delivery-options/delivery-options-controller.js.map +1 -0
  147. package/dist/matter/delivery-options/delivery-options.d.ts +31 -0
  148. package/dist/matter/delivery-options/delivery-options.js +103 -0
  149. package/dist/matter/delivery-options/delivery-options.js.map +1 -0
  150. package/dist/matter/delivery-options/use-delivery-option-selection.d.ts +9 -0
  151. package/dist/matter/delivery-options/use-delivery-option-selection.js +76 -0
  152. package/dist/matter/delivery-options/use-delivery-option-selection.js.map +1 -0
  153. package/dist/matter/email-identification/email-identification.d.ts +37 -0
  154. package/dist/matter/email-identification/email-identification.js +111 -0
  155. package/dist/matter/email-identification/email-identification.js.map +1 -0
  156. package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +44 -0
  157. package/dist/matter/free-shipping-progress/free-shipping-progress.js +170 -0
  158. package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -0
  159. package/dist/matter/identity-edit/identity-edit.d.ts +52 -0
  160. package/dist/matter/identity-edit/identity-edit.js +148 -0
  161. package/dist/matter/identity-edit/identity-edit.js.map +1 -0
  162. package/dist/matter/identity-summary/identity-summary.d.ts +128 -0
  163. package/dist/matter/identity-summary/identity-summary.js +344 -0
  164. package/dist/matter/identity-summary/identity-summary.js.map +1 -0
  165. package/dist/matter/pricing/pricing.d.ts +162 -0
  166. package/dist/matter/pricing/pricing.js +793 -0
  167. package/dist/matter/pricing/pricing.js.map +1 -0
  168. package/dist/matter/product-gallery/product-gallery.d.ts +23 -0
  169. package/dist/matter/product-gallery/product-gallery.js +188 -0
  170. package/dist/matter/product-gallery/product-gallery.js.map +1 -0
  171. package/dist/matter/product-information/product-information.d.ts +61 -0
  172. package/dist/matter/product-information/product-information.js +355 -0
  173. package/dist/matter/product-information/product-information.js.map +1 -0
  174. package/dist/matter/product-list/product-list.d.ts +86 -0
  175. package/dist/matter/product-list/product-list.js +342 -0
  176. package/dist/matter/product-list/product-list.js.map +1 -0
  177. package/dist/matter/product-quantity/product-quantity.d.ts +50 -0
  178. package/dist/matter/product-quantity/product-quantity.js +111 -0
  179. package/dist/matter/product-quantity/product-quantity.js.map +1 -0
  180. package/dist/matter/product-shelf/product-shelf.d.ts +125 -0
  181. package/dist/matter/product-shelf/product-shelf.js +376 -0
  182. package/dist/matter/product-shelf/product-shelf.js.map +1 -0
  183. package/dist/matter/region/region.d.ts +211 -0
  184. package/dist/matter/region/region.js +579 -0
  185. package/dist/matter/region/region.js.map +1 -0
  186. package/dist/matter/session/session.d.ts +58 -0
  187. package/dist/matter/session/session.js +112 -0
  188. package/dist/matter/session/session.js.map +1 -0
  189. package/dist/matter/shipping-address/country-descriptors.js +101 -0
  190. package/dist/matter/shipping-address/country-descriptors.js.map +1 -0
  191. package/dist/matter/shipping-address/shipping-address.d.ts +284 -0
  192. package/dist/matter/shipping-address/shipping-address.js +1036 -0
  193. package/dist/matter/shipping-address/shipping-address.js.map +1 -0
  194. package/dist/matter/shipping-simulator/shipping-simulator.d.ts +143 -0
  195. package/dist/matter/shipping-simulator/shipping-simulator.js +644 -0
  196. package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -0
  197. package/dist/matter/sign-in-form/sign-in-form.d.ts +79 -0
  198. package/dist/matter/sign-in-form/sign-in-form.js +226 -0
  199. package/dist/matter/sign-in-form/sign-in-form.js.map +1 -0
  200. package/dist/matter/variant-selector/variant-selector.d.ts +183 -0
  201. package/dist/matter/variant-selector/variant-selector.js +840 -0
  202. package/dist/matter/variant-selector/variant-selector.js.map +1 -0
  203. package/dist/message-locales.json +7 -0
  204. package/dist/particles/access-code-field/access-code-field.d.ts +33 -0
  205. package/dist/particles/access-code-field/access-code-field.js +95 -0
  206. package/dist/particles/access-code-field/access-code-field.js.map +1 -0
  207. package/dist/particles/accordion/accordion.d.ts +45 -0
  208. package/dist/particles/accordion/accordion.js +156 -0
  209. package/dist/particles/accordion/accordion.js.map +1 -0
  210. package/dist/particles/address-summary/address-summary.d.ts +50 -0
  211. package/dist/particles/address-summary/address-summary.js +129 -0
  212. package/dist/particles/address-summary/address-summary.js.map +1 -0
  213. package/dist/particles/badge/badge.d.ts +10 -0
  214. package/dist/particles/badge/badge.js +27 -0
  215. package/dist/particles/badge/badge.js.map +1 -0
  216. package/dist/particles/button/button.d.ts +18 -0
  217. package/dist/particles/button/button.js +37 -0
  218. package/dist/particles/button/button.js.map +1 -0
  219. package/dist/particles/carousel/carousel.d.ts +60 -0
  220. package/dist/particles/carousel/carousel.js +335 -0
  221. package/dist/particles/carousel/carousel.js.map +1 -0
  222. package/dist/particles/checkbox/checkbox.d.ts +40 -0
  223. package/dist/particles/checkbox/checkbox.js +82 -0
  224. package/dist/particles/checkbox/checkbox.js.map +1 -0
  225. package/dist/particles/container/container.d.ts +20 -0
  226. package/dist/particles/container/container.js +36 -0
  227. package/dist/particles/container/container.js.map +1 -0
  228. package/dist/particles/dialog/dialog.d.ts +54 -0
  229. package/dist/particles/dialog/dialog.js +192 -0
  230. package/dist/particles/dialog/dialog.js.map +1 -0
  231. package/dist/particles/document-field/document-field.d.ts +61 -0
  232. package/dist/particles/document-field/document-field.js +146 -0
  233. package/dist/particles/document-field/document-field.js.map +1 -0
  234. package/dist/particles/drawer/drawer.d.ts +52 -0
  235. package/dist/particles/drawer/drawer.js +183 -0
  236. package/dist/particles/drawer/drawer.js.map +1 -0
  237. package/dist/particles/email-field/email-field.d.ts +37 -0
  238. package/dist/particles/email-field/email-field.js +106 -0
  239. package/dist/particles/email-field/email-field.js.map +1 -0
  240. package/dist/particles/field/field.d.ts +50 -0
  241. package/dist/particles/field/field.js +133 -0
  242. package/dist/particles/field/field.js.map +1 -0
  243. package/dist/particles/fieldset/fieldset.d.ts +16 -0
  244. package/dist/particles/fieldset/fieldset.js +52 -0
  245. package/dist/particles/fieldset/fieldset.js.map +1 -0
  246. package/dist/particles/footer-copyright/footer-copyright.d.ts +32 -0
  247. package/dist/particles/footer-copyright/footer-copyright.js +50 -0
  248. package/dist/particles/footer-copyright/footer-copyright.js.map +1 -0
  249. package/dist/particles/footer-link-group/footer-link-group.d.ts +66 -0
  250. package/dist/particles/footer-link-group/footer-link-group.js +154 -0
  251. package/dist/particles/footer-link-group/footer-link-group.js.map +1 -0
  252. package/dist/particles/footer-root/footer-root.d.ts +21 -0
  253. package/dist/particles/footer-root/footer-root.js +38 -0
  254. package/dist/particles/footer-root/footer-root.js.map +1 -0
  255. package/dist/particles/footer-social/footer-social.d.ts +79 -0
  256. package/dist/particles/footer-social/footer-social.js +176 -0
  257. package/dist/particles/footer-social/footer-social.js.map +1 -0
  258. package/dist/particles/gallery/gallery.d.ts +181 -0
  259. package/dist/particles/gallery/gallery.js +920 -0
  260. package/dist/particles/gallery/gallery.js.map +1 -0
  261. package/dist/particles/header-root/header-root.d.ts +21 -0
  262. package/dist/particles/header-root/header-root.js +38 -0
  263. package/dist/particles/header-root/header-root.js.map +1 -0
  264. package/dist/particles/icon/icon.d.ts +22 -0
  265. package/dist/particles/icon/icon.js +48 -0
  266. package/dist/particles/icon/icon.js.map +1 -0
  267. package/dist/particles/image/image.d.ts +13 -0
  268. package/dist/particles/image/image.js +59 -0
  269. package/dist/particles/image/image.js.map +1 -0
  270. package/dist/particles/incentives/incentives.d.ts +85 -0
  271. package/dist/particles/incentives/incentives.js +200 -0
  272. package/dist/particles/incentives/incentives.js.map +1 -0
  273. package/dist/particles/input/input.d.ts +9 -0
  274. package/dist/particles/input/input.js +28 -0
  275. package/dist/particles/input/input.js.map +1 -0
  276. package/dist/particles/logo/logo.d.ts +55 -0
  277. package/dist/particles/logo/logo.js +96 -0
  278. package/dist/particles/logo/logo.js.map +1 -0
  279. package/dist/particles/menu/menu.d.ts +103 -0
  280. package/dist/particles/menu/menu.js +409 -0
  281. package/dist/particles/menu/menu.js.map +1 -0
  282. package/dist/particles/menubar/menubar.d.ts +18 -0
  283. package/dist/particles/menubar/menubar.js +42 -0
  284. package/dist/particles/menubar/menubar.js.map +1 -0
  285. package/dist/particles/meter/meter.d.ts +36 -0
  286. package/dist/particles/meter/meter.js +132 -0
  287. package/dist/particles/meter/meter.js.map +1 -0
  288. package/dist/particles/navigation-link/navigation-link.d.ts +43 -0
  289. package/dist/particles/navigation-link/navigation-link.js +82 -0
  290. package/dist/particles/navigation-link/navigation-link.js.map +1 -0
  291. package/dist/particles/navigation-link-list/navigation-link-list.d.ts +59 -0
  292. package/dist/particles/navigation-link-list/navigation-link-list.js +103 -0
  293. package/dist/particles/navigation-link-list/navigation-link-list.js.map +1 -0
  294. package/dist/particles/navigation-menu/navigation-menu.d.ts +78 -0
  295. package/dist/particles/navigation-menu/navigation-menu.js +295 -0
  296. package/dist/particles/navigation-menu/navigation-menu.js.map +1 -0
  297. package/dist/particles/number-field/number-field.d.ts +46 -0
  298. package/dist/particles/number-field/number-field.js +169 -0
  299. package/dist/particles/number-field/number-field.js.map +1 -0
  300. package/dist/particles/password-field/password-field.d.ts +31 -0
  301. package/dist/particles/password-field/password-field.js +109 -0
  302. package/dist/particles/password-field/password-field.js.map +1 -0
  303. package/dist/particles/payment-methods/payment-methods.d.ts +72 -0
  304. package/dist/particles/payment-methods/payment-methods.js +151 -0
  305. package/dist/particles/payment-methods/payment-methods.js.map +1 -0
  306. package/dist/particles/phone-field/phone-field.d.ts +67 -0
  307. package/dist/particles/phone-field/phone-field.js +250 -0
  308. package/dist/particles/phone-field/phone-field.js.map +1 -0
  309. package/dist/particles/popover/popover.d.ts +68 -0
  310. package/dist/particles/popover/popover.js +284 -0
  311. package/dist/particles/popover/popover.js.map +1 -0
  312. package/dist/particles/postal-code-field/postal-code-field.d.ts +75 -0
  313. package/dist/particles/postal-code-field/postal-code-field.js +169 -0
  314. package/dist/particles/postal-code-field/postal-code-field.js.map +1 -0
  315. package/dist/particles/promotion/promotion.d.ts +46 -0
  316. package/dist/particles/promotion/promotion.js +78 -0
  317. package/dist/particles/promotion/promotion.js.map +1 -0
  318. package/dist/particles/quantity-selector/quantity-selector.d.ts +30 -0
  319. package/dist/particles/quantity-selector/quantity-selector.js +116 -0
  320. package/dist/particles/quantity-selector/quantity-selector.js.map +1 -0
  321. package/dist/particles/radio/radio.d.ts +36 -0
  322. package/dist/particles/radio/radio.js +76 -0
  323. package/dist/particles/radio/radio.js.map +1 -0
  324. package/dist/particles/scroll-area/scroll-area.d.ts +36 -0
  325. package/dist/particles/scroll-area/scroll-area.js +145 -0
  326. package/dist/particles/scroll-area/scroll-area.js.map +1 -0
  327. package/dist/particles/select/select.d.ts +125 -0
  328. package/dist/particles/select/select.js +478 -0
  329. package/dist/particles/select/select.js.map +1 -0
  330. package/dist/particles/separator/separator.d.ts +12 -0
  331. package/dist/particles/separator/separator.js +33 -0
  332. package/dist/particles/separator/separator.js.map +1 -0
  333. package/dist/particles/shared/input-mask.d.ts +5 -0
  334. package/dist/particles/shared/input-mask.js +58 -0
  335. package/dist/particles/shared/input-mask.js.map +1 -0
  336. package/dist/particles/spinner/spinner.d.ts +13 -0
  337. package/dist/particles/spinner/spinner.js +31 -0
  338. package/dist/particles/spinner/spinner.js.map +1 -0
  339. package/dist/particles/switch/switch.d.ts +27 -0
  340. package/dist/particles/switch/switch.js +59 -0
  341. package/dist/particles/switch/switch.js.map +1 -0
  342. package/dist/particles/tabs/tabs.d.ts +45 -0
  343. package/dist/particles/tabs/tabs.js +164 -0
  344. package/dist/particles/tabs/tabs.js.map +1 -0
  345. package/dist/particles/text/text.d.ts +24 -0
  346. package/dist/particles/text/text.js +40 -0
  347. package/dist/particles/text/text.js.map +1 -0
  348. package/dist/particles/toast/toast.d.ts +83 -0
  349. package/dist/particles/toast/toast.js +194 -0
  350. package/dist/particles/toast/toast.js.map +1 -0
  351. package/dist/particles/toggle/toggle.d.ts +26 -0
  352. package/dist/particles/toggle/toggle.js +61 -0
  353. package/dist/particles/toggle/toggle.js.map +1 -0
  354. package/dist/particles/tooltip/tooltip.d.ts +61 -0
  355. package/dist/particles/tooltip/tooltip.js +240 -0
  356. package/dist/particles/tooltip/tooltip.js.map +1 -0
  357. package/dist/schema.graphql +2953 -0
  358. package/dist/sdk/actions/cart-action-provider.d.ts +19 -0
  359. package/dist/sdk/actions/cart-action-provider.js +23 -0
  360. package/dist/sdk/actions/cart-action-provider.js.map +1 -0
  361. package/dist/sdk/actions/identity-action-provider.d.ts +15 -0
  362. package/dist/sdk/actions/identity-action-provider.js +19 -0
  363. package/dist/sdk/actions/identity-action-provider.js.map +1 -0
  364. package/dist/sdk/actions/index.d.ts +7 -0
  365. package/dist/sdk/actions/index.js +6 -0
  366. package/dist/sdk/actions/inject-actions.d.ts +14 -0
  367. package/dist/sdk/actions/inject-actions.js +36 -0
  368. package/dist/sdk/actions/inject-actions.js.map +1 -0
  369. package/dist/sdk/actions/region-action-provider.d.ts +15 -0
  370. package/dist/sdk/actions/region-action-provider.js +19 -0
  371. package/dist/sdk/actions/region-action-provider.js.map +1 -0
  372. package/dist/sdk/actions/session-action-provider.d.ts +15 -0
  373. package/dist/sdk/actions/session-action-provider.js +19 -0
  374. package/dist/sdk/actions/session-action-provider.js.map +1 -0
  375. package/dist/sdk/actions/shipping-action-provider.d.ts +15 -0
  376. package/dist/sdk/actions/shipping-action-provider.js +19 -0
  377. package/dist/sdk/actions/shipping-action-provider.js.map +1 -0
  378. package/dist/sdk/actions/types.d.ts +21 -0
  379. package/dist/sdk/cache/storefront-cache.js +35 -0
  380. package/dist/sdk/cache/storefront-cache.js.map +1 -0
  381. package/dist/sdk/cart/operations.d.ts +31 -0
  382. package/dist/sdk/cart/operations.js +215 -0
  383. package/dist/sdk/cart/operations.js.map +1 -0
  384. package/dist/sdk/cart/optimistic.d.ts +24 -0
  385. package/dist/sdk/cart/optimistic.js +164 -0
  386. package/dist/sdk/cart/optimistic.js.map +1 -0
  387. package/dist/sdk/cart/use-cart-actions.d.ts +56 -0
  388. package/dist/sdk/cart/use-cart-actions.js +348 -0
  389. package/dist/sdk/cart/use-cart-actions.js.map +1 -0
  390. package/dist/sdk/cart/use-cart-validate-on-open.js +50 -0
  391. package/dist/sdk/cart/use-cart-validate-on-open.js.map +1 -0
  392. package/dist/sdk/cart/write-gate.js +54 -0
  393. package/dist/sdk/cart/write-gate.js.map +1 -0
  394. package/dist/sdk/client/assert-api-url.js +20 -0
  395. package/dist/sdk/client/assert-api-url.js.map +1 -0
  396. package/dist/sdk/client/create-client.d.ts +23 -0
  397. package/dist/sdk/client/create-client.js +46 -0
  398. package/dist/sdk/client/create-client.js.map +1 -0
  399. package/dist/sdk/client/fetch-page-data.d.ts +39 -0
  400. package/dist/sdk/client/fetch-page-data.js +33 -0
  401. package/dist/sdk/client/fetch-page-data.js.map +1 -0
  402. package/dist/sdk/client/register-preload-query.d.ts +24 -0
  403. package/dist/sdk/client/register-preload-query.js +33 -0
  404. package/dist/sdk/client/register-preload-query.js.map +1 -0
  405. package/dist/sdk/content/create-content-runtime.d.ts +68 -0
  406. package/dist/sdk/content/create-content-runtime.js +503 -0
  407. package/dist/sdk/content/create-content-runtime.js.map +1 -0
  408. package/dist/sdk/context/headers.d.ts +15 -0
  409. package/dist/sdk/context/headers.js +21 -0
  410. package/dist/sdk/context/headers.js.map +1 -0
  411. package/dist/sdk/context/storefront-context.d.ts +11 -0
  412. package/dist/sdk/context/storefront-context.js +29 -0
  413. package/dist/sdk/context/storefront-context.js.map +1 -0
  414. package/dist/sdk/data/data-override-context.d.ts +12 -0
  415. package/dist/sdk/data/data-override-context.js +19 -0
  416. package/dist/sdk/data/data-override-context.js.map +1 -0
  417. package/dist/sdk/data/entity-subscriber.js +28 -0
  418. package/dist/sdk/data/entity-subscriber.js.map +1 -0
  419. package/dist/sdk/data/hot-data-provider.d.ts +19 -0
  420. package/dist/sdk/data/hot-data-provider.js +33 -0
  421. package/dist/sdk/data/hot-data-provider.js.map +1 -0
  422. package/dist/sdk/data/index.d.ts +8 -0
  423. package/dist/sdk/data/index.js +8 -0
  424. package/dist/sdk/data/list-item-ref-context.d.ts +20 -0
  425. package/dist/sdk/data/list-item-ref-context.js +11 -0
  426. package/dist/sdk/data/list-item-ref-context.js.map +1 -0
  427. package/dist/sdk/data/multiple-reactive-data-provider.d.ts +32 -0
  428. package/dist/sdk/data/multiple-reactive-data-provider.js +20 -0
  429. package/dist/sdk/data/multiple-reactive-data-provider.js.map +1 -0
  430. package/dist/sdk/data/page-reactive-data-root.d.ts +53 -0
  431. package/dist/sdk/data/page-reactive-data-root.js +153 -0
  432. package/dist/sdk/data/page-reactive-data-root.js.map +1 -0
  433. package/dist/sdk/data/reactive-data-provider.d.ts +25 -0
  434. package/dist/sdk/data/reactive-data-provider.js +24 -0
  435. package/dist/sdk/data/reactive-data-provider.js.map +1 -0
  436. package/dist/sdk/data/reactive-list-item-data-provider.d.ts +26 -0
  437. package/dist/sdk/data/reactive-list-item-data-provider.js +42 -0
  438. package/dist/sdk/data/reactive-list-item-data-provider.js.map +1 -0
  439. package/dist/sdk/data/use-reactive-entity.js +40 -0
  440. package/dist/sdk/data/use-reactive-entity.js.map +1 -0
  441. package/dist/sdk/format/client.d.ts +12 -0
  442. package/dist/sdk/format/client.js +20 -0
  443. package/dist/sdk/format/client.js.map +1 -0
  444. package/dist/sdk/format/formatters.d.ts +32 -0
  445. package/dist/sdk/format/formatters.js +45 -0
  446. package/dist/sdk/format/formatters.js.map +1 -0
  447. package/dist/sdk/generated/fragment-types.js +23 -0
  448. package/dist/sdk/generated/fragment-types.js.map +1 -0
  449. package/dist/sdk/generated/gql.js +51 -0
  450. package/dist/sdk/generated/gql.js.map +1 -0
  451. package/dist/sdk/generated/graphql.d.ts +622 -0
  452. package/dist/sdk/generated/graphql.js +11917 -0
  453. package/dist/sdk/generated/graphql.js.map +1 -0
  454. package/dist/sdk/graphql-tag.d.ts +10 -0
  455. package/dist/sdk/graphql-tag.js +21 -0
  456. package/dist/sdk/graphql-tag.js.map +1 -0
  457. package/dist/sdk/i18n/client.d.ts +4 -0
  458. package/dist/sdk/i18n/client.js +4 -0
  459. package/dist/sdk/i18n/locales.d.ts +8 -0
  460. package/dist/sdk/i18n/locales.js +57 -0
  461. package/dist/sdk/i18n/locales.js.map +1 -0
  462. package/dist/sdk/i18n/messages/en-US.js +24 -0
  463. package/dist/sdk/i18n/messages/en-US.js.map +1 -0
  464. package/dist/sdk/i18n/messages/en-US.json +19 -0
  465. package/dist/sdk/i18n/messages/en-US.json.d.ts +23 -0
  466. package/dist/sdk/i18n/messages/es-ES.js +24 -0
  467. package/dist/sdk/i18n/messages/es-ES.js.map +1 -0
  468. package/dist/sdk/i18n/messages/es-ES.json +19 -0
  469. package/dist/sdk/i18n/messages/pt-BR.js +24 -0
  470. package/dist/sdk/i18n/messages/pt-BR.js.map +1 -0
  471. package/dist/sdk/i18n/messages/pt-BR.json +19 -0
  472. package/dist/sdk/i18n/provider.d.ts +1 -0
  473. package/dist/sdk/i18n/provider.js +30 -0
  474. package/dist/sdk/i18n/provider.js.map +1 -0
  475. package/dist/sdk/i18n/server.d.ts +28 -0
  476. package/dist/sdk/i18n/server.js +59 -0
  477. package/dist/sdk/i18n/server.js.map +1 -0
  478. package/dist/sdk/identity/operations.d.ts +34 -0
  479. package/dist/sdk/identity/operations.js +78 -0
  480. package/dist/sdk/identity/operations.js.map +1 -0
  481. package/dist/sdk/identity/use-identity-actions.d.ts +62 -0
  482. package/dist/sdk/identity/use-identity-actions.js +180 -0
  483. package/dist/sdk/identity/use-identity-actions.js.map +1 -0
  484. package/dist/sdk/provider/index.d.ts +2 -0
  485. package/dist/sdk/provider/index.js +2 -0
  486. package/dist/sdk/provider/storefront-provider.d.ts +32 -0
  487. package/dist/sdk/provider/storefront-provider.js +111 -0
  488. package/dist/sdk/provider/storefront-provider.js.map +1 -0
  489. package/dist/sdk/region/operations.d.ts +6 -0
  490. package/dist/sdk/region/region-operations.d.ts +30 -0
  491. package/dist/sdk/region/region-operations.js +23 -0
  492. package/dist/sdk/region/region-operations.js.map +1 -0
  493. package/dist/sdk/region/use-region-actions.d.ts +23 -0
  494. package/dist/sdk/region/use-region-actions.js +66 -0
  495. package/dist/sdk/region/use-region-actions.js.map +1 -0
  496. package/dist/sdk/seller.js +11 -0
  497. package/dist/sdk/seller.js.map +1 -0
  498. package/dist/sdk/session/auth-operations.d.ts +47 -0
  499. package/dist/sdk/session/auth-operations.js +79 -0
  500. package/dist/sdk/session/auth-operations.js.map +1 -0
  501. package/dist/sdk/session/operations.d.ts +6 -0
  502. package/dist/sdk/session/use-session-actions.d.ts +27 -0
  503. package/dist/sdk/session/use-session-actions.js +126 -0
  504. package/dist/sdk/session/use-session-actions.js.map +1 -0
  505. package/dist/sdk/shipping/cart-operations.d.ts +3 -0
  506. package/dist/sdk/shipping/cart-operations.js +33 -0
  507. package/dist/sdk/shipping/cart-operations.js.map +1 -0
  508. package/dist/sdk/shipping/operations.d.ts +3 -0
  509. package/dist/sdk/shipping/operations.js +33 -0
  510. package/dist/sdk/shipping/operations.js.map +1 -0
  511. package/dist/sdk/shipping/option-select-operations.d.ts +24 -0
  512. package/dist/sdk/shipping/option-select-operations.js +45 -0
  513. package/dist/sdk/shipping/option-select-operations.js.map +1 -0
  514. package/dist/sdk/shipping/request-timeout.js +41 -0
  515. package/dist/sdk/shipping/request-timeout.js.map +1 -0
  516. package/dist/sdk/shipping/shipping-operations.d.ts +38 -0
  517. package/dist/sdk/shipping/shipping-operations.js +77 -0
  518. package/dist/sdk/shipping/shipping-operations.js.map +1 -0
  519. package/dist/sdk/shipping/use-cart-shipping-simulation.d.ts +7 -0
  520. package/dist/sdk/shipping/use-cart-shipping-simulation.js +72 -0
  521. package/dist/sdk/shipping/use-cart-shipping-simulation.js.map +1 -0
  522. package/dist/sdk/shipping/use-shipping-actions.d.ts +27 -0
  523. package/dist/sdk/shipping/use-shipping-actions.js +113 -0
  524. package/dist/sdk/shipping/use-shipping-actions.js.map +1 -0
  525. package/dist/sdk/shipping/use-shipping-simulation.d.ts +7 -0
  526. package/dist/sdk/shipping/use-shipping-simulation.js +72 -0
  527. package/dist/sdk/shipping/use-shipping-simulation.js.map +1 -0
  528. package/dist/sdk/state/cart.d.ts +42 -0
  529. package/dist/sdk/state/cart.js +64 -0
  530. package/dist/sdk/state/cart.js.map +1 -0
  531. package/dist/sdk/state/index.js +3 -0
  532. package/dist/sdk/state/variant-selector.d.ts +17 -0
  533. package/dist/sdk/state/variant-selector.js +14 -0
  534. package/dist/sdk/state/variant-selector.js.map +1 -0
  535. package/dist/utils/safe-href.js +63 -0
  536. package/dist/utils/safe-href.js.map +1 -0
  537. package/package.json +84 -0
  538. package/src/styles/tailwind.css +32 -0
@@ -0,0 +1,499 @@
1
+ # Pricing
2
+
3
+ **Category:** commerce
4
+ **Purpose:** Renders the product offer block of a PDP — selling price, list price (strikethrough), spot/cash price, discount badge, and installments. Reads from the active product's variant offer.
5
+
6
+ ---
7
+
8
+ ## Visual cues (how to identify in an image)
9
+
10
+ Use these signals to detect that a Pricing block is present. Position on the page is irrelevant for detection — it can appear anywhere, in any orientation. The image is the source of truth for layout.
11
+
12
+ A Pricing block contains any combination of:
13
+
14
+ - A **bold/large price** (the current selling price).
15
+ - A **strikethrough price** (the original list price).
16
+ - A **discount badge** like `-30%`, often colored.
17
+ - A secondary line like **"R$ 119,90 à vista no Pix"** (spot price).
18
+ - A second **"save extra X% with Pix"** badge or text — the spot-price percentage.
19
+ - A line like **"em 10x de R$ 11,99 sem juros"** (installments).
20
+ - **Multiple installment rows side-by-side**, one per payment method (e.g. a Visa row and a Pix row), each showing its own best plan.
21
+ - A **link or button** like *"ver todas as formas de pagamento"* / *"see all payment options"* that opens a panel listing every payment plan.
22
+ - A panel/popover with **tabs across the top** (one per payment method — Cartão / Pix / Cartão Cliente) and a content area below listing all installments of the selected method (Americanas, KitchenAid style).
23
+ - **Highlight pills/labels** like *"Black Friday"*, *"Cyber Week"*, *"Exclusivo"* — named seasonal labels.
24
+ - **Promotion text** like *"Compre 3 leve 2"*, *"Buy 3 for R$14.99"*, *"Frete grátis"* — structured deals on the offer.
25
+
26
+ If the image shows **any one** of the above, use `PricingRoot`. Pick only the sub-components that match what's visible — never include a sub-component for data that isn't shown.
27
+
28
+ ---
29
+
30
+ ## When to use
31
+
32
+ - PDP price block (canonical use).
33
+ - Anywhere the active product's offer needs to be displayed (e.g. mini-cart upsell using `$data` override).
34
+
35
+ ## When NOT to use
36
+
37
+ - Cart line items → use `CartItemPrice` / `CartItemListPrice` instead.
38
+ - Product shelf / PLP cards → use the shelf's own price particle.
39
+ - Static / mocked prices unrelated to a product → use a plain text element with a class.
40
+
41
+ ---
42
+
43
+ ## Composition
44
+
45
+ `PricingRoot` is the only entry point. All sub-components **must** be descendants of it. They render `null` automatically when their data condition is not met, so it is safe to include them speculatively — but for image-to-schema work, **only include what is visible**.
46
+
47
+ ```
48
+ PricingRoot
49
+ ├── PricingListPrice (renders only when listPrice > price)
50
+ ├── PricingSellingPrice (always renders inside Root)
51
+ ├── PricingSpotPrice (renders only when spotPrice < price)
52
+ ├── PricingDiscount (renders only when listPrice > price)
53
+ ├── PricingSpotDiscount (renders only when spotPrice < price)
54
+ ├── PricingInstallments (single best installment; one row total)
55
+ │ └── PricingInstallment (one entry, picks the best plan)
56
+ ├── PricingInstallmentPlans (one row per payment method)
57
+ │ └── PricingInstallmentPlan
58
+ │ ├── PricingInstallment (best installment of this plan)
59
+ │ └── PricingInstallmentsForPlan (full ladder of this plan)
60
+ │ └── PricingInstallment (one row per installment)
61
+ ├── PricingHighlights (container; null when no discountHighlights)
62
+ │ └── PricingHighlight (one entry per highlight label)
63
+ ├── PricingPromotions (container; null when no promotions)
64
+ │ └── PricingPromotion (one entry per promotion)
65
+ └── PopoverRoot (merchant-composed disclosure)
66
+ ├── PricingPaymentMethodsTrigger (button that opens the panel)
67
+ └── PopoverPortal
68
+ └── PopoverPositioner
69
+ └── PopoverPopup
70
+ ├── PricingPaymentMethodsList (flat: every plan in one list)
71
+ │ └── PricingInstallmentPlan
72
+ │ └── PricingInstallment (or PricingInstallmentsForPlan)
73
+ │
74
+ └── TabsRoot (tab-grouped: one tab per method)
75
+ ├── TabsList
76
+ │ └── PricingPaymentMethodsTabList
77
+ │ └── PricingPaymentMethodName (tab label)
78
+ └── PricingPaymentMethodsTabPanels (sibling of TabsList under TabsRoot)
79
+ └── PricingInstallmentsForPlan
80
+ └── PricingInstallment
81
+ ```
82
+
83
+ Child order reflects visual order — place sub-components in the same sequence they appear in the image. CSS handles edge cases like reordering on mobile, but the schema order is the default.
84
+
85
+ **Composition rules:**
86
+
87
+ - `PricingInstallment` must be a descendant of either `PricingInstallments`, `PricingInstallmentPlan`, or `PricingInstallmentsForPlan` (any container that provides installment context). Never directly under `PricingRoot`.
88
+ - `PricingInstallmentPlan` must be a descendant of `PricingInstallmentPlans` (or `PricingPaymentMethodsList`, which wraps it internally).
89
+ - `PricingInstallmentsForPlan` must be a descendant of `PricingInstallmentPlan`.
90
+ - `PricingHighlight` must be inside `PricingHighlights`.
91
+ - `PricingPromotion` must be inside `PricingPromotions`.
92
+ - `PricingPaymentMethodsTrigger` must be inside a `PopoverRoot`.
93
+ - `PricingPaymentMethodsList` does **not** require a Popover — it can also live inside a `DialogPopup` or `DrawerPopup`.
94
+ - `PricingPaymentMethodsTabList` must be inside `TabsList` (which itself is inside `TabsRoot`).
95
+ - `PricingPaymentMethodsTabPanels` must be a descendant of `TabsRoot` (typically a sibling of `TabsList`, not nested in it).
96
+ - `PricingPaymentMethodName` must be inside a plan context (`PricingInstallmentPlan`, `PricingPaymentMethodsTabList`, or `PricingPaymentMethodsTabPanels`).
97
+ - Use either `PricingInstallments` (shortcut, one best plan) **or** `PricingInstallmentPlans` (breakdown, one row per method) — not both at the same visual level.
98
+ - Use either `PricingPaymentMethodsList` (flat disclosure) **or** the `TabsRoot + PricingPaymentMethodsTabList + PricingPaymentMethodsTabPanels` trio (tab-grouped disclosure) — not both inside the same `PopoverPopup`.
99
+
100
+ ---
101
+
102
+ ## Components
103
+
104
+ ### PricingRoot
105
+
106
+ Root container. Provides the pricing context to all descendants.
107
+
108
+ Prices are formatted from the active storefront context (the resolved binding's locale and
109
+ currency), not from props.
110
+
111
+ | Prop | Type | Default | Notes |
112
+ |------|------|---------|-------|
113
+ | `selectedVariantId` | string | — | Optional pre-selection fallback: the viewed SKU's `Variant` Node ID used to price the block on first paint. A live swatch selection wins over it once the shopper interacts. |
114
+
115
+ **Data:** declares `fragment PricingData on Query`. The compiler merges it into the page query — no explicit `dataSources` entry needed.
116
+
117
+ **Variant reactivity:** `PricingRoot` reads the shopper's published variant selection (the same reactive state the VariantSelector swatches write and the product gallery reads), so selling price, list price, discount, spot price, and installments all recompute when a swatch is picked — no page navigation. The selected variant's offer is fetched lazily; on a fetch error or a null payload it falls back silently to the product-level offer (the price is never blanked). Selections are scoped to the product on screen, so a swatch picked on another PDP never leaks in.
118
+
119
+ ### PricingSellingPrice
120
+
121
+ Current selling price, formatted from the active storefront context. Always renders when inside `PricingRoot` with valid data. No props.
122
+
123
+ ### PricingListPrice
124
+
125
+ Original price (strikethrough). Renders `null` when `listPrice <= price`. No props.
126
+
127
+ ### PricingSpotPrice
128
+
129
+ Best cash/instant-payment price (Pix, boleto). Renders `null` when `spotPrice >= price`. No props.
130
+
131
+ ### PricingDiscount
132
+
133
+ Discount badge for the `listPrice`-vs-`price` markdown. Renders `null` when there is no discount (missing `listPrice`, or `listPrice <= price`) — in either format, so there is never a `-R$ 0,00` / `NaN%` badge. Recomputes automatically when the shopper picks a variant swatch (it reads the variant-reactive pricing context). If `children` are provided, they replace the generated text entirely.
134
+
135
+ | Prop | Type | Default | Notes |
136
+ |------|------|---------|-------|
137
+ | `format` | `"percentage"` \| `"absolute"` | `"percentage"` | `percentage` shows `-25%`; `absolute` shows the currency-formatted markdown `-R$ 10,00` (`listPrice - price`, using the active storefront context). Mirrors `ProductCardDiscount`. |
138
+ | `template` | string | format-derived (`"-{percentage}%"` or `"-{amount}"`) | Placeholders: `{percentage}` (integer markdown) and `{amount}` (currency-formatted `listPrice - price`). Left unset, it defaults to the format-appropriate template; an explicit value overrides it. |
139
+
140
+ ### PricingInstallments
141
+
142
+ Shortcut container that picks the best installment plan **across all methods** (highest count, prefer interest-free). Renders `null` when no plans exist. No props. Must contain `PricingInstallment` to render anything visible. For a per-method breakdown, use `PricingInstallmentPlans` instead.
143
+
144
+ ### PricingInstallmentPlans
145
+
146
+ Iterator that renders one row per payment method (e.g. Visa, Pix, StoreCard). Rows are sorted by best installment count ascending — à vista (1x) first, longest plan last. Renders `null` when no plans exist. No props. Must contain `PricingInstallmentPlan` as a direct child template (rendered once per plan).
147
+
148
+ ### PricingInstallmentPlan
149
+
150
+ A single plan (one method) inside `PricingInstallmentPlans`. By default exposes the plan's best installment via context, so a plain `PricingInstallment` child shows e.g. *"12x de R$ 16,58 sem juros"* for Visa. Wrap a `PricingInstallmentsForPlan` inside it to list every installment (1x, 2x, ... Nx) of the plan instead. No props. Emits `data-fs-pricing-installment-plan-type={paymentType}` for CSS styling per method (`CREDIT_CARD`, `INSTANT`, `DEBIT_CARD`, `BANK_SLIP`, `DIGITAL_WALLET`, `OTHER`).
151
+
152
+ ### PricingInstallmentsForPlan
153
+
154
+ Iterator that lists every installment of the surrounding plan, preserving API order (count ascending: 1x, 2x, ..., Nx). Renders `null` when the plan has no installments. No props. Must contain `PricingInstallment` as a direct child template.
155
+
156
+ ### PricingPaymentMethodsTrigger
157
+
158
+ Button that opens the disclosure panel. Wraps Popover's Trigger and inherits its open-state from the enclosing `PopoverRoot`. Use it for links like *"ver todas as formas de pagamento"*. No props beyond standard button attributes (`className`, `children`).
159
+
160
+ ### PricingPaymentMethodsList
161
+
162
+ Standalone container for the disclosure panel content — renders every plan via `PricingInstallmentPlans` internally. Renders `null` when no plans exist. No props. Place inside any `PopoverPopup`, `DialogPopup`, or `DrawerPopup`.
163
+
164
+ ### PricingPaymentMethodsTabList
165
+
166
+ Bridge between Pricing and Tabs. Iterates every plan in the same order as `PricingInstallmentPlans` (best installment count ascending) and emits one `TabsTab` per plan with `value=${paymentType}-${paymentMethod}` (composite key prevents collisions when two plans share `paymentType`, e.g. Visa and Mastercard both `CREDIT_CARD`). Children are rendered inside each tab and have access to the plan context. Place inside `TabsList`. Renders `null` when no plans exist. No props.
167
+
168
+ ### PricingPaymentMethodsTabPanels
169
+
170
+ Mirrors `PricingPaymentMethodsTabList`: iterates plans in the same order and emits one `TabsPanel` per plan with the matching composite-key `value`. Sets `InstallmentPlanItemContext` inside each panel so descendants like `PricingInstallmentsForPlan` and `PricingInstallment` work without further setup. Place inside `TabsRoot` (typically a sibling of `TabsList`). Renders `null` when no plans exist. No props.
171
+
172
+ ### PricingPaymentMethodName
173
+
174
+ Renders the surrounding plan's `paymentMethod` (e.g. *"Visa"*, *"Pix"*) as a `<span>`. Reads `InstallmentPlanItemContext`. Use as the tab label inside `PricingPaymentMethodsTabList`, or anywhere a plan context is set. When `children` are provided, they replace the text (useful for localized labels). No props.
175
+
176
+ ### PricingInstallment
177
+
178
+ Single installment line. Must be a descendant of `PricingInstallments`, `PricingInstallmentPlan`, or `PricingInstallmentsForPlan`. If `children` are provided, they replace the template text entirely (useful for CTAs like *"Buy with store card"*).
179
+
180
+ | Prop | Type | Default | Notes |
181
+ |------|------|---------|-------|
182
+ | `template` | string | `"{count}x de {value}"` | placeholders: `{count}`, `{value}` |
183
+ | `interestFreeLabel` | string | `"sem juros"` | appended when the plan is interest-free; pass `""` to omit |
184
+
185
+ ### PricingSpotDiscount
186
+
187
+ Discount badge for the cash/Pix difference between `spotPrice` and `price` (e.g. *"com mais 9% OFF no Pix"*). Renders `null` when `spotPrice >= price`. Symmetric to `PricingDiscount` but for the spot-price percentage. Rounding is nearest-integer.
188
+
189
+ | Prop | Type | Default | Notes |
190
+ |------|------|---------|-------|
191
+ | `template` | string | `"-{percentage}%"` | placeholder: `{percentage}` (the rounded spot-discount percentage) |
192
+
193
+ ### PricingHighlights
194
+
195
+ Iterator over `Offer.discountHighlights` — named labels like *"Black Friday"*, *"Exclusivo"*. Renders `null` when the list is empty. No props. Must contain `PricingHighlight` to render anything visible.
196
+
197
+ ### PricingHighlight
198
+
199
+ Renders the current highlight string as a `<span>`. Reads from the context set by `PricingHighlights`. Children override the default text (useful when the merchant wants to add icons or wrap the label). No props.
200
+
201
+ ### PricingPromotions
202
+
203
+ Iterator over `Offer.promotions` — structured deals like *"Compre 3 leve 2"*, *"Frete grátis"*. Renders `null` when the list is empty. No props. Must contain `PricingPromotion` to render anything visible.
204
+
205
+ ### PricingPromotion
206
+
207
+ Renders the current promotion via the `template` prop. Reads from the context set by `PricingPromotions`. Children override the default text.
208
+
209
+ | Prop | Type | Default | Notes |
210
+ |------|------|---------|-------|
211
+ | `template` | string | `"{name}"` | placeholder: `{name}` (the promotion's display name) |
212
+
213
+ ---
214
+
215
+ ## Canonical schema example
216
+
217
+ A full PDP pricing block as it would appear in a generated page schema:
218
+
219
+ ```json
220
+ {
221
+ "pricing": {
222
+ "type": "PricingRoot",
223
+ "children": [
224
+ "pricing-list",
225
+ "pricing-selling",
226
+ "pricing-discount",
227
+ "pricing-spot",
228
+ "pricing-installments"
229
+ ]
230
+ },
231
+ "pricing-list": { "type": "PricingListPrice" },
232
+ "pricing-selling": { "type": "PricingSellingPrice" },
233
+ "pricing-discount": { "type": "PricingDiscount", "props": { "template": "-{percentage}%" } },
234
+ "pricing-spot": { "type": "PricingSpotPrice" },
235
+ "pricing-installments": {
236
+ "type": "PricingInstallments",
237
+ "children": ["pricing-installment"]
238
+ },
239
+ "pricing-installment": {
240
+ "type": "PricingInstallment",
241
+ "props": { "template": "{count}x de {value}", "interestFreeLabel": "sem juros" }
242
+ }
243
+ }
244
+ ```
245
+
246
+ ### Minimal variant (only selling price visible in the image)
247
+
248
+ ```json
249
+ {
250
+ "pricing": {
251
+ "type": "PricingRoot",
252
+ "children": ["pricing-selling"]
253
+ },
254
+ "pricing-selling": { "type": "PricingSellingPrice" }
255
+ }
256
+ ```
257
+
258
+ ### Multi-method variant (one row per payment method visible in the image)
259
+
260
+ ```json
261
+ {
262
+ "pricing": {
263
+ "type": "PricingRoot",
264
+ "children": ["pricing-selling", "pricing-plans"]
265
+ },
266
+ "pricing-selling": { "type": "PricingSellingPrice" },
267
+ "pricing-plans": {
268
+ "type": "PricingInstallmentPlans",
269
+ "children": ["pricing-plan"]
270
+ },
271
+ "pricing-plan": {
272
+ "type": "PricingInstallmentPlan",
273
+ "children": ["pricing-installment"]
274
+ },
275
+ "pricing-installment": {
276
+ "type": "PricingInstallment",
277
+ "props": { "template": "{count}x de {value}", "interestFreeLabel": "sem juros" }
278
+ }
279
+ }
280
+ ```
281
+
282
+ ### Disclosure variant ("ver todas as formas de pagamento" link in the image)
283
+
284
+ ```json
285
+ {
286
+ "pricing": {
287
+ "type": "PricingRoot",
288
+ "children": ["pricing-selling", "pricing-installments", "payment-popover"]
289
+ },
290
+ "pricing-selling": { "type": "PricingSellingPrice" },
291
+ "pricing-installments": {
292
+ "type": "PricingInstallments",
293
+ "children": ["pricing-installment-default"]
294
+ },
295
+ "pricing-installment-default": { "type": "PricingInstallment" },
296
+ "payment-popover": {
297
+ "type": "PopoverRoot",
298
+ "children": ["payment-trigger", "payment-portal"]
299
+ },
300
+ "payment-trigger": {
301
+ "type": "PricingPaymentMethodsTrigger",
302
+ "props": { "children": "ver todas as formas de pagamento" }
303
+ },
304
+ "payment-portal": {
305
+ "type": "PopoverPortal",
306
+ "children": ["payment-positioner"]
307
+ },
308
+ "payment-positioner": {
309
+ "type": "PopoverPositioner",
310
+ "props": { "side": "bottom", "align": "start" },
311
+ "children": ["payment-popup"]
312
+ },
313
+ "payment-popup": {
314
+ "type": "PopoverPopup",
315
+ "children": ["payment-list"]
316
+ },
317
+ "payment-list": {
318
+ "type": "PricingPaymentMethodsList",
319
+ "children": ["payment-plan"]
320
+ },
321
+ "payment-plan": {
322
+ "type": "PricingInstallmentPlan",
323
+ "children": ["payment-installments-for-plan"]
324
+ },
325
+ "payment-installments-for-plan": {
326
+ "type": "PricingInstallmentsForPlan",
327
+ "children": ["payment-installment"]
328
+ },
329
+ "payment-installment": { "type": "PricingInstallment" }
330
+ }
331
+ ```
332
+
333
+ ### Highlights + promotions + spot discount variant
334
+
335
+ ```json
336
+ {
337
+ "pricing": {
338
+ "type": "PricingRoot",
339
+ "children": [
340
+ "pricing-highlights",
341
+ "pricing-selling",
342
+ "pricing-spot-discount",
343
+ "pricing-promotions"
344
+ ]
345
+ },
346
+ "pricing-highlights": {
347
+ "type": "PricingHighlights",
348
+ "children": ["pricing-highlight"]
349
+ },
350
+ "pricing-highlight": { "type": "PricingHighlight" },
351
+ "pricing-selling": { "type": "PricingSellingPrice" },
352
+ "pricing-spot-discount": {
353
+ "type": "PricingSpotDiscount",
354
+ "props": { "template": "com mais {percentage}% OFF no Pix" }
355
+ },
356
+ "pricing-promotions": {
357
+ "type": "PricingPromotions",
358
+ "children": ["pricing-promotion"]
359
+ },
360
+ "pricing-promotion": {
361
+ "type": "PricingPromotion",
362
+ "props": { "template": "{name}" }
363
+ }
364
+ }
365
+ ```
366
+
367
+ ### Tab-grouped disclosure variant (tabs per method inside the popover — Americanas / KitchenAid)
368
+
369
+ ```json
370
+ {
371
+ "pricing": {
372
+ "type": "PricingRoot",
373
+ "children": ["pricing-selling", "payment-popover"]
374
+ },
375
+ "pricing-selling": { "type": "PricingSellingPrice" },
376
+ "payment-popover": {
377
+ "type": "PopoverRoot",
378
+ "children": ["payment-trigger", "payment-portal"]
379
+ },
380
+ "payment-trigger": {
381
+ "type": "PricingPaymentMethodsTrigger",
382
+ "props": { "children": "ver todas as formas de pagamento" }
383
+ },
384
+ "payment-portal": {
385
+ "type": "PopoverPortal",
386
+ "children": ["payment-positioner"]
387
+ },
388
+ "payment-positioner": {
389
+ "type": "PopoverPositioner",
390
+ "props": { "side": "bottom", "align": "start" },
391
+ "children": ["payment-popup"]
392
+ },
393
+ "payment-popup": {
394
+ "type": "PopoverPopup",
395
+ "children": ["payment-tabs"]
396
+ },
397
+ "payment-tabs": {
398
+ "type": "TabsRoot",
399
+ "children": ["payment-tabs-list", "payment-tabs-panels"]
400
+ },
401
+ "payment-tabs-list": {
402
+ "type": "TabsList",
403
+ "children": ["payment-tabs-bridge-list"]
404
+ },
405
+ "payment-tabs-bridge-list": {
406
+ "type": "PricingPaymentMethodsTabList",
407
+ "children": ["payment-method-name"]
408
+ },
409
+ "payment-method-name": { "type": "PricingPaymentMethodName" },
410
+ "payment-tabs-panels": {
411
+ "type": "PricingPaymentMethodsTabPanels",
412
+ "children": ["payment-installments-for-plan"]
413
+ },
414
+ "payment-installments-for-plan": {
415
+ "type": "PricingInstallmentsForPlan",
416
+ "children": ["payment-installment"]
417
+ },
418
+ "payment-installment": { "type": "PricingInstallment" }
419
+ }
420
+ ```
421
+
422
+ ---
423
+
424
+ ## Common mistakes
425
+
426
+ - **Inventing `PricingPrice` or `Price`.** The component is `PricingSellingPrice`. There is no `Price`, no `ProductPrice`, no `PricingPrice`.
427
+ - **Inventing `PricingPaymentMethod` or `PricingMethod`.** The disclosure entry point is `PricingPaymentMethodsTrigger`; the panel content is `PricingPaymentMethodsList` (flat) or `PricingPaymentMethodsTabList` + `PricingPaymentMethodsTabPanels` (tabbed). The leaf for the method name is `PricingPaymentMethodName`. There is no singular `PricingPaymentMethod`.
428
+ - **Inventing `PricingTag`, `PricingLabel`, `PricingBadge` for highlight labels.** The pair is `PricingHighlights` (iterator) + `PricingHighlight` (leaf). There is no singular `PricingLabel`.
429
+ - **Using `PricingDiscount` for the Pix/cash savings.** `PricingDiscount` shows the listPrice-vs-price discount (e.g. *"-30%"* when there is a list-price markdown). For the *"save extra X% on Pix"* badge, use `PricingSpotDiscount`.
430
+ - **Using `paymentType` alone as the tab value.** Two plans with the same `paymentType` (e.g. Visa + Mastercard, both `CREDIT_CARD`) would collide. The bridge particles use the composite key `${paymentType}-${paymentMethod}` automatically — do not override it.
431
+ - **Placing `PricingPaymentMethodsTabList` outside `TabsList`.** Base UI registers tabs via `TabsList`; the bridge must be inside it.
432
+ - **Nesting `PricingPaymentMethodsTabPanels` inside `TabsList`.** It must be a sibling under `TabsRoot`, not a child of `TabsList`.
433
+ - **Putting `PricingInstallment` directly under `PricingRoot`.** It must be inside `PricingInstallments`, `PricingInstallmentPlan`, or `PricingInstallmentsForPlan`. Without an installment-context container, it throws.
434
+ - **Putting `PricingInstallmentPlan` directly under `PricingRoot`.** It must be inside `PricingInstallmentPlans` (or `PricingPaymentMethodsList`, which wraps `PricingInstallmentPlans` internally).
435
+ - **Putting `PricingInstallmentsForPlan` outside `PricingInstallmentPlan`.** It reads the surrounding plan's context and throws otherwise.
436
+ - **Putting `PricingHighlight` directly under `PricingRoot`.** It must be inside `PricingHighlights`; the leaf reads the highlight from a per-item context that only the iterator sets.
437
+ - **Putting `PricingPromotion` directly under `PricingRoot`.** Same rule: must be inside `PricingPromotions`.
438
+ - **Using `PricingInstallments` AND `PricingInstallmentPlans` for the same row.** They are alternatives: `PricingInstallments` shows one global best plan; `PricingInstallmentPlans` shows one row per method. Pick one for the inline area; the other can still appear inside a disclosure panel.
439
+ - **Placing `PricingPaymentMethodsTrigger` without a `PopoverRoot` ancestor.** The trigger only works when a `PopoverRoot` provides the open/close state.
440
+ - **Including sub-components for data not shown in the image.** They will render `null`, but they still bloat the schema and signal wrong intent. If the image has no installments, do not include `PricingInstallments`; the same holds for `PricingHighlights`, `PricingPromotions`, and `PricingSpotDiscount`.
441
+ - **Passing a `price` prop.** Pricing reads from `$data` (the merged fragment). It has no `price` / `listPrice` / `spotPrice` props, and no locale or currency props either — the active storefront context supplies those.
442
+ - **Wrapping `PricingRoot` in a non-PDP page.** It requires `productBySlug` in the page query context. Use only on routes that resolve a product.
443
+ - **Splitting Root across siblings.** `PricingSellingPrice` outside a `PricingRoot` throws at render time.
444
+
445
+ ---
446
+
447
+ ## Styling
448
+
449
+ Style `PricingRoot` as a vertical stack and each price line as its own typographic line. The selling price is the loud one; list and installment lines are quieter. Read the price color and sizes off the image.
450
+
451
+ | Component | What you style | Plausible classes |
452
+ |---|---|---|
453
+ | `PricingRoot` | Stacks the price lines | `flex flex-col gap-[4px] mt-[8px] w-full` |
454
+ | `PricingSellingPrice` | The headline price — large, bold, often the brand color | `text-[28px] leading-[1.15] font-bold text-[#C8102E] tracking-[-0.01em] block` |
455
+ | `PricingListPrice` | The struck-through original price — small and muted | `text-[13px] leading-[1.4] font-normal text-[#8A8A8A] line-through` |
456
+ | `PricingDiscount` / `PricingSpotDiscount` | Savings badge — small, often a colored chip | `inline-flex items-center px-[6px] py-[2px] rounded-[4px] bg-[#C8102E] text-white text-[12px] font-semibold` |
457
+ | `PricingInstallments` / `PricingInstallment` | Installment line — small, secondary | `text-[13px] leading-[1.4] text-[#666666] mt-[2px] block` |
458
+
459
+ Read the selling-price color straight off the image as an arbitrary hex; reuse it on the discount chip. `line-through` is what makes the list price read as the old price.
460
+
461
+ Styled minimal example (list + selling + installments):
462
+
463
+ ```json
464
+ {
465
+ "pricing": {
466
+ "type": "PricingRoot",
467
+ "children": ["pricing-list", "pricing-selling", "pricing-installments"],
468
+ "style": ["flex", "flex-col", "gap-[4px]", "mt-[8px]", "w-full"]
469
+ },
470
+ "pricing-list": {
471
+ "type": "PricingListPrice",
472
+ "style": ["text-[13px]", "leading-[1.4]", "font-normal", "text-[#8A8A8A]", "line-through"]
473
+ },
474
+ "pricing-selling": {
475
+ "type": "PricingSellingPrice",
476
+ "style": ["text-[28px]", "leading-[1.15]", "font-bold", "text-[#C8102E]", "tracking-[-0.01em]", "block"]
477
+ },
478
+ "pricing-installments": {
479
+ "type": "PricingInstallments",
480
+ "children": ["pricing-installment"],
481
+ "style": ["mt-[2px]", "block"]
482
+ },
483
+ "pricing-installment": {
484
+ "type": "PricingInstallment",
485
+ "props": { "template": "ou em até {count}x de {value}", "interestFreeLabel": "sem juros" },
486
+ "style": ["text-[13px]", "leading-[1.4]", "text-[#666666]"]
487
+ }
488
+ }
489
+ ```
490
+
491
+ ---
492
+
493
+ ## Related
494
+
495
+ - [[buy-button]] — the action paired with Pricing on a PDP. Distinct block; do not nest.
496
+ - [[product-information]] — title/description of the same product. Distinct block; do not nest.
497
+ - [[cart-item-price]] — equivalent price particle for cart line items. Use Pricing only on routes that resolve a product.
498
+ - [[popover]] — provides the open/close state and positioning for the payment-methods disclosure pattern. `PricingPaymentMethodsTrigger` is the Pricing-aware Popover trigger; `PricingPaymentMethodsList` is the content rendered inside `PopoverPopup`.
499
+ - [[tabs]] — generic tabbed UI primitive. Used by the tab-grouped payment-methods disclosure (Americanas / KitchenAid pattern) via `PricingPaymentMethodsTabList` and `PricingPaymentMethodsTabPanels`.